@@ -18,15 +18,12 @@ class EstimatesApi
18
18
:create_air_shipping_estimate ,
19
19
:create_bitcoin_estimate ,
20
20
:create_ecommerce_estimate ,
21
- :create_ethereum_estimate ,
22
21
:create_flight_estimate ,
23
22
:create_hotel_estimate ,
24
23
:create_mass_estimate ,
25
24
:create_rail_shipping_estimate ,
26
25
:create_road_shipping_estimate ,
27
26
:create_sea_shipping_estimate ,
28
- :create_shipping_estimate ,
29
- :create_vehicle_estimate ,
30
27
:retrieve_estimate ,
31
28
:retrieve_estimates ,
32
29
]
@@ -258,80 +255,6 @@ def create_ecommerce_estimate_with_http_info(create_ecommerce_estimate_request,
258
255
return data , status_code , headers
259
256
end
260
257
261
- # Create an ethereum estimate
262
- # Creates an ethereum estimate for the amount of CO2 to be compensated. An order in the `draft` state may be created based on the parameters, linked to the estimate.
263
- # @param create_ethereum_estimate_request [CreateEthereumEstimateRequest]
264
- # @param [Hash] opts the optional parameters
265
- # @option opts [Integer] :patch_version
266
- # @return [EstimateResponse]
267
- def create_ethereum_estimate ( create_ethereum_estimate_request = { } , opts = { } )
268
- _create_ethereum_estimate_request = Patch ::CreateEthereumEstimateRequest . new ( create_ethereum_estimate_request )
269
- data , _status_code , _headers = create_ethereum_estimate_with_http_info ( _create_ethereum_estimate_request , opts )
270
- data
271
- end
272
-
273
- # Create an ethereum estimate
274
- # Creates an ethereum estimate for the amount of CO2 to be compensated. An order in the `draft` state may be created based on the parameters, linked to the estimate.
275
- # @param create_ethereum_estimate_request [CreateEthereumEstimateRequest]
276
- # @param [Hash] opts the optional parameters
277
- # @option opts [Integer] :patch_version
278
- # @return [Array<(EstimateResponse, Integer, Hash)>] EstimateResponse data, response status code and response headers
279
- def create_ethereum_estimate_with_http_info ( create_ethereum_estimate_request , opts = { } )
280
- if @api_client . config . debugging
281
- @api_client . config . logger . debug 'Calling API: EstimatesApi.create_ethereum_estimate ...'
282
- end
283
- # verify the required parameter 'create_ethereum_estimate_request' is set
284
- if @api_client . config . client_side_validation && create_ethereum_estimate_request . nil?
285
- fail ArgumentError , "Missing the required parameter 'create_ethereum_estimate_request' when calling EstimatesApi.create_ethereum_estimate"
286
- end
287
- # resource path
288
- local_var_path = '/v1/estimates/crypto/eth'
289
-
290
- # query parameters
291
- query_params = opts [ :query_params ] || { }
292
-
293
- # header parameters
294
- header_params = opts [ :header_params ] || { }
295
-
296
- # HTTP header 'Accept' (if needed)
297
- header_params [ 'Accept' ] = @api_client . select_header_accept ( [ 'application/json' ] )
298
- # HTTP header 'Content-Type'
299
- content_type = @api_client . select_header_content_type ( [ 'application/json' ] )
300
- if !content_type . nil?
301
- header_params [ 'Content-Type' ] = content_type
302
- end
303
- header_params [ 'Patch-Version' ] = 2
304
- header_params [ :'Patch-Version' ] = opts [ :'patch_version' ] if !opts [ :'patch_version' ] . nil?
305
-
306
- # form parameters
307
- form_params = opts [ :form_params ] || { }
308
-
309
- # http body (model)
310
- post_body = opts [ :debug_body ] || @api_client . object_to_http_body ( create_ethereum_estimate_request )
311
-
312
- # return_type
313
- return_type = opts [ :debug_return_type ] || 'EstimateResponse'
314
-
315
- # auth_names
316
- auth_names = opts [ :debug_auth_names ] || [ 'bearer_auth' ]
317
-
318
- new_options = opts . merge (
319
- :operation => :"EstimatesApi.create_ethereum_estimate" ,
320
- :header_params => header_params ,
321
- :query_params => query_params ,
322
- :form_params => form_params ,
323
- :body => post_body ,
324
- :auth_names => auth_names ,
325
- :return_type => return_type
326
- )
327
-
328
- data , status_code , headers = @api_client . call_api ( :POST , local_var_path , new_options )
329
- if @api_client . config . debugging
330
- @api_client . config . logger . debug "API called: EstimatesApi#create_ethereum_estimate\n Data: #{ data . inspect } \n Status code: #{ status_code } \n Headers: #{ headers } "
331
- end
332
- return data , status_code , headers
333
- end
334
-
335
258
# Create a flight estimate given the distance traveled in meters
336
259
# Creates a flight estimate for the amount of CO2 to be compensated. An order in the `draft` state may be created based on the parameters, linked to the estimate.
337
260
# @param create_flight_estimate_request [CreateFlightEstimateRequest]
@@ -776,154 +699,6 @@ def create_sea_shipping_estimate_with_http_info(create_sea_shipping_estimate_req
776
699
return data , status_code , headers
777
700
end
778
701
779
- # Create a shipping estimate given the distance traveled in meters, package weight, and transportation method.
780
- # Creates a shipping estimate for the amount of CO2 to be compensated. An order in the `draft` state may be created based on the parameters.
781
- # @param create_shipping_estimate_request [CreateShippingEstimateRequest]
782
- # @param [Hash] opts the optional parameters
783
- # @option opts [Integer] :patch_version
784
- # @return [EstimateResponse]
785
- def create_shipping_estimate ( create_shipping_estimate_request = { } , opts = { } )
786
- _create_shipping_estimate_request = Patch ::CreateShippingEstimateRequest . new ( create_shipping_estimate_request )
787
- data , _status_code , _headers = create_shipping_estimate_with_http_info ( _create_shipping_estimate_request , opts )
788
- data
789
- end
790
-
791
- # Create a shipping estimate given the distance traveled in meters, package weight, and transportation method.
792
- # Creates a shipping estimate for the amount of CO2 to be compensated. An order in the `draft` state may be created based on the parameters.
793
- # @param create_shipping_estimate_request [CreateShippingEstimateRequest]
794
- # @param [Hash] opts the optional parameters
795
- # @option opts [Integer] :patch_version
796
- # @return [Array<(EstimateResponse, Integer, Hash)>] EstimateResponse data, response status code and response headers
797
- def create_shipping_estimate_with_http_info ( create_shipping_estimate_request , opts = { } )
798
- if @api_client . config . debugging
799
- @api_client . config . logger . debug 'Calling API: EstimatesApi.create_shipping_estimate ...'
800
- end
801
- # verify the required parameter 'create_shipping_estimate_request' is set
802
- if @api_client . config . client_side_validation && create_shipping_estimate_request . nil?
803
- fail ArgumentError , "Missing the required parameter 'create_shipping_estimate_request' when calling EstimatesApi.create_shipping_estimate"
804
- end
805
- # resource path
806
- local_var_path = '/v1/estimates/shipping'
807
-
808
- # query parameters
809
- query_params = opts [ :query_params ] || { }
810
-
811
- # header parameters
812
- header_params = opts [ :header_params ] || { }
813
-
814
- # HTTP header 'Accept' (if needed)
815
- header_params [ 'Accept' ] = @api_client . select_header_accept ( [ 'application/json' ] )
816
- # HTTP header 'Content-Type'
817
- content_type = @api_client . select_header_content_type ( [ 'application/json' ] )
818
- if !content_type . nil?
819
- header_params [ 'Content-Type' ] = content_type
820
- end
821
- header_params [ 'Patch-Version' ] = 2
822
- header_params [ :'Patch-Version' ] = opts [ :'patch_version' ] if !opts [ :'patch_version' ] . nil?
823
-
824
- # form parameters
825
- form_params = opts [ :form_params ] || { }
826
-
827
- # http body (model)
828
- post_body = opts [ :debug_body ] || @api_client . object_to_http_body ( create_shipping_estimate_request )
829
-
830
- # return_type
831
- return_type = opts [ :debug_return_type ] || 'EstimateResponse'
832
-
833
- # auth_names
834
- auth_names = opts [ :debug_auth_names ] || [ 'bearer_auth' ]
835
-
836
- new_options = opts . merge (
837
- :operation => :"EstimatesApi.create_shipping_estimate" ,
838
- :header_params => header_params ,
839
- :query_params => query_params ,
840
- :form_params => form_params ,
841
- :body => post_body ,
842
- :auth_names => auth_names ,
843
- :return_type => return_type
844
- )
845
-
846
- data , status_code , headers = @api_client . call_api ( :POST , local_var_path , new_options )
847
- if @api_client . config . debugging
848
- @api_client . config . logger . debug "API called: EstimatesApi#create_shipping_estimate\n Data: #{ data . inspect } \n Status code: #{ status_code } \n Headers: #{ headers } "
849
- end
850
- return data , status_code , headers
851
- end
852
-
853
- # Create a vehicle estimate given the distance traveled in meters and the type of vehicle
854
- # Creates an estimate and calculates the amount of CO2 to be compensated depending on the distance and the vehicle. An order in the `draft` state may be created based on the parameters, linked to the estimate.
855
- # @param create_vehicle_estimate_request [CreateVehicleEstimateRequest]
856
- # @param [Hash] opts the optional parameters
857
- # @option opts [Integer] :patch_version
858
- # @return [EstimateResponse]
859
- def create_vehicle_estimate ( create_vehicle_estimate_request = { } , opts = { } )
860
- _create_vehicle_estimate_request = Patch ::CreateVehicleEstimateRequest . new ( create_vehicle_estimate_request )
861
- data , _status_code , _headers = create_vehicle_estimate_with_http_info ( _create_vehicle_estimate_request , opts )
862
- data
863
- end
864
-
865
- # Create a vehicle estimate given the distance traveled in meters and the type of vehicle
866
- # Creates an estimate and calculates the amount of CO2 to be compensated depending on the distance and the vehicle. An order in the `draft` state may be created based on the parameters, linked to the estimate.
867
- # @param create_vehicle_estimate_request [CreateVehicleEstimateRequest]
868
- # @param [Hash] opts the optional parameters
869
- # @option opts [Integer] :patch_version
870
- # @return [Array<(EstimateResponse, Integer, Hash)>] EstimateResponse data, response status code and response headers
871
- def create_vehicle_estimate_with_http_info ( create_vehicle_estimate_request , opts = { } )
872
- if @api_client . config . debugging
873
- @api_client . config . logger . debug 'Calling API: EstimatesApi.create_vehicle_estimate ...'
874
- end
875
- # verify the required parameter 'create_vehicle_estimate_request' is set
876
- if @api_client . config . client_side_validation && create_vehicle_estimate_request . nil?
877
- fail ArgumentError , "Missing the required parameter 'create_vehicle_estimate_request' when calling EstimatesApi.create_vehicle_estimate"
878
- end
879
- # resource path
880
- local_var_path = '/v1/estimates/vehicle'
881
-
882
- # query parameters
883
- query_params = opts [ :query_params ] || { }
884
-
885
- # header parameters
886
- header_params = opts [ :header_params ] || { }
887
-
888
- # HTTP header 'Accept' (if needed)
889
- header_params [ 'Accept' ] = @api_client . select_header_accept ( [ 'application/json' ] )
890
- # HTTP header 'Content-Type'
891
- content_type = @api_client . select_header_content_type ( [ 'application/json' ] )
892
- if !content_type . nil?
893
- header_params [ 'Content-Type' ] = content_type
894
- end
895
- header_params [ 'Patch-Version' ] = 2
896
- header_params [ :'Patch-Version' ] = opts [ :'patch_version' ] if !opts [ :'patch_version' ] . nil?
897
-
898
- # form parameters
899
- form_params = opts [ :form_params ] || { }
900
-
901
- # http body (model)
902
- post_body = opts [ :debug_body ] || @api_client . object_to_http_body ( create_vehicle_estimate_request )
903
-
904
- # return_type
905
- return_type = opts [ :debug_return_type ] || 'EstimateResponse'
906
-
907
- # auth_names
908
- auth_names = opts [ :debug_auth_names ] || [ 'bearer_auth' ]
909
-
910
- new_options = opts . merge (
911
- :operation => :"EstimatesApi.create_vehicle_estimate" ,
912
- :header_params => header_params ,
913
- :query_params => query_params ,
914
- :form_params => form_params ,
915
- :body => post_body ,
916
- :auth_names => auth_names ,
917
- :return_type => return_type
918
- )
919
-
920
- data , status_code , headers = @api_client . call_api ( :POST , local_var_path , new_options )
921
- if @api_client . config . debugging
922
- @api_client . config . logger . debug "API called: EstimatesApi#create_vehicle_estimate\n Data: #{ data . inspect } \n Status code: #{ status_code } \n Headers: #{ headers } "
923
- end
924
- return data , status_code , headers
925
- end
926
-
927
702
# Retrieves an estimate
928
703
# Retrieves a given estimate and its associated order. You can only retrieve estimates associated with the organization you are querying for.
929
704
# @param id [String]
@@ -1059,4 +834,4 @@ def retrieve_estimates_with_http_info(opts = {})
1059
834
return data , status_code , headers
1060
835
end
1061
836
end
1062
- end
837
+ end
0 commit comments