@@ -18,7 +18,6 @@ class EstimatesApi
18
18
:create_air_shipping_estimate ,
19
19
:create_bitcoin_estimate ,
20
20
:create_flight_estimate ,
21
- :create_hotel_estimate ,
22
21
:create_mass_estimate ,
23
22
:create_rail_shipping_estimate ,
24
23
:create_road_shipping_estimate ,
@@ -39,7 +38,7 @@ def initialize(api_client = ApiClient.default)
39
38
# @option opts [Integer] :patch_version
40
39
# @return [EstimateResponse]
41
40
def create_air_shipping_estimate ( create_air_shipping_estimate_request = { } , opts = { } )
42
- _create_air_shipping_estimate_request = Patch ::CreateAirShippingEstimateRequest . new ( create_air_shipping_estimate_request )
41
+ _create_air_shipping_estimate_request = Patch ::CreateAirShippingEstimateRequest . new ( create_air_shipping_estimate_request )
43
42
data , _status_code , _headers = create_air_shipping_estimate_with_http_info ( _create_air_shipping_estimate_request , opts )
44
43
data
45
44
end
@@ -72,7 +71,7 @@ def create_air_shipping_estimate_with_http_info(create_air_shipping_estimate_req
72
71
# HTTP header 'Content-Type'
73
72
content_type = @api_client . select_header_content_type ( [ 'application/json' ] )
74
73
if !content_type . nil?
75
- header_params [ 'Content-Type' ] = content_type
74
+ header_params [ 'Content-Type' ] = content_type
76
75
end
77
76
header_params [ 'Patch-Version' ] = 2
78
77
header_params [ :'Patch-Version' ] = opts [ :'patch_version' ] if !opts [ :'patch_version' ] . nil?
@@ -113,7 +112,7 @@ def create_air_shipping_estimate_with_http_info(create_air_shipping_estimate_req
113
112
# @option opts [Integer] :patch_version
114
113
# @return [EstimateResponse]
115
114
def create_bitcoin_estimate ( create_bitcoin_estimate_request = { } , opts = { } )
116
- _create_bitcoin_estimate_request = Patch ::CreateBitcoinEstimateRequest . new ( create_bitcoin_estimate_request )
115
+ _create_bitcoin_estimate_request = Patch ::CreateBitcoinEstimateRequest . new ( create_bitcoin_estimate_request )
117
116
data , _status_code , _headers = create_bitcoin_estimate_with_http_info ( _create_bitcoin_estimate_request , opts )
118
117
data
119
118
end
@@ -146,7 +145,7 @@ def create_bitcoin_estimate_with_http_info(create_bitcoin_estimate_request, opts
146
145
# HTTP header 'Content-Type'
147
146
content_type = @api_client . select_header_content_type ( [ 'application/json' ] )
148
147
if !content_type . nil?
149
- header_params [ 'Content-Type' ] = content_type
148
+ header_params [ 'Content-Type' ] = content_type
150
149
end
151
150
header_params [ 'Patch-Version' ] = 2
152
151
header_params [ :'Patch-Version' ] = opts [ :'patch_version' ] if !opts [ :'patch_version' ] . nil?
@@ -187,7 +186,7 @@ def create_bitcoin_estimate_with_http_info(create_bitcoin_estimate_request, opts
187
186
# @option opts [Integer] :patch_version
188
187
# @return [EstimateResponse]
189
188
def create_flight_estimate ( create_flight_estimate_request = { } , opts = { } )
190
- _create_flight_estimate_request = Patch ::CreateFlightEstimateRequest . new ( create_flight_estimate_request )
189
+ _create_flight_estimate_request = Patch ::CreateFlightEstimateRequest . new ( create_flight_estimate_request )
191
190
data , _status_code , _headers = create_flight_estimate_with_http_info ( _create_flight_estimate_request , opts )
192
191
data
193
192
end
@@ -220,7 +219,7 @@ def create_flight_estimate_with_http_info(create_flight_estimate_request, opts =
220
219
# HTTP header 'Content-Type'
221
220
content_type = @api_client . select_header_content_type ( [ 'application/json' ] )
222
221
if !content_type . nil?
223
- header_params [ 'Content-Type' ] = content_type
222
+ header_params [ 'Content-Type' ] = content_type
224
223
end
225
224
header_params [ 'Patch-Version' ] = 2
226
225
header_params [ :'Patch-Version' ] = opts [ :'patch_version' ] if !opts [ :'patch_version' ] . nil?
@@ -254,88 +253,14 @@ def create_flight_estimate_with_http_info(create_flight_estimate_request, opts =
254
253
return data , status_code , headers
255
254
end
256
255
257
- # Create a hotel estimate.
258
- # Creates a hotel estimate for the amount of CO2 to be compensated. An order in the `draft` state may be created based on the parameters.
259
- # @param create_hotel_estimate_request [CreateHotelEstimateRequest]
260
- # @param [Hash] opts the optional parameters
261
- # @option opts [Integer] :patch_version
262
- # @return [EstimateResponse]
263
- def create_hotel_estimate ( create_hotel_estimate_request = { } , opts = { } )
264
- _create_hotel_estimate_request = Patch ::CreateHotelEstimateRequest . new ( create_hotel_estimate_request )
265
- data , _status_code , _headers = create_hotel_estimate_with_http_info ( _create_hotel_estimate_request , opts )
266
- data
267
- end
268
-
269
- # Create a hotel estimate.
270
- # Creates a hotel estimate for the amount of CO2 to be compensated. An order in the `draft` state may be created based on the parameters.
271
- # @param create_hotel_estimate_request [CreateHotelEstimateRequest]
272
- # @param [Hash] opts the optional parameters
273
- # @option opts [Integer] :patch_version
274
- # @return [Array<(EstimateResponse, Integer, Hash)>] EstimateResponse data, response status code and response headers
275
- def create_hotel_estimate_with_http_info ( create_hotel_estimate_request , opts = { } )
276
- if @api_client . config . debugging
277
- @api_client . config . logger . debug 'Calling API: EstimatesApi.create_hotel_estimate ...'
278
- end
279
- # verify the required parameter 'create_hotel_estimate_request' is set
280
- if @api_client . config . client_side_validation && create_hotel_estimate_request . nil?
281
- fail ArgumentError , "Missing the required parameter 'create_hotel_estimate_request' when calling EstimatesApi.create_hotel_estimate"
282
- end
283
- # resource path
284
- local_var_path = '/v1/estimates/hotel'
285
-
286
- # query parameters
287
- query_params = opts [ :query_params ] || { }
288
-
289
- # header parameters
290
- header_params = opts [ :header_params ] || { }
291
-
292
- # HTTP header 'Accept' (if needed)
293
- header_params [ 'Accept' ] = @api_client . select_header_accept ( [ 'application/json' ] )
294
- # HTTP header 'Content-Type'
295
- content_type = @api_client . select_header_content_type ( [ 'application/json' ] )
296
- if !content_type . nil?
297
- header_params [ 'Content-Type' ] = content_type
298
- end
299
- header_params [ 'Patch-Version' ] = 2
300
- header_params [ :'Patch-Version' ] = opts [ :'patch_version' ] if !opts [ :'patch_version' ] . nil?
301
-
302
- # form parameters
303
- form_params = opts [ :form_params ] || { }
304
-
305
- # http body (model)
306
- post_body = opts [ :debug_body ] || @api_client . object_to_http_body ( create_hotel_estimate_request )
307
-
308
- # return_type
309
- return_type = opts [ :debug_return_type ] || 'EstimateResponse'
310
-
311
- # auth_names
312
- auth_names = opts [ :debug_auth_names ] || [ 'bearer_auth' ]
313
-
314
- new_options = opts . merge (
315
- :operation => :"EstimatesApi.create_hotel_estimate" ,
316
- :header_params => header_params ,
317
- :query_params => query_params ,
318
- :form_params => form_params ,
319
- :body => post_body ,
320
- :auth_names => auth_names ,
321
- :return_type => return_type
322
- )
323
-
324
- data , status_code , headers = @api_client . call_api ( :POST , local_var_path , new_options )
325
- if @api_client . config . debugging
326
- @api_client . config . logger . debug "API called: EstimatesApi#create_hotel_estimate\n Data: #{ data . inspect } \n Status code: #{ status_code } \n Headers: #{ headers } "
327
- end
328
- return data , status_code , headers
329
- end
330
-
331
256
# Create an estimate based on mass of CO2
332
257
# Creates an estimate for the mass of CO2 to be compensated. An order in the `draft` state will also be created, linked to the estimate.
333
258
# @param create_mass_estimate_request [CreateMassEstimateRequest]
334
259
# @param [Hash] opts the optional parameters
335
260
# @option opts [Integer] :patch_version
336
261
# @return [EstimateResponse]
337
262
def create_mass_estimate ( create_mass_estimate_request = { } , opts = { } )
338
- _create_mass_estimate_request = Patch ::CreateMassEstimateRequest . new ( create_mass_estimate_request )
263
+ _create_mass_estimate_request = Patch ::CreateMassEstimateRequest . new ( create_mass_estimate_request )
339
264
data , _status_code , _headers = create_mass_estimate_with_http_info ( _create_mass_estimate_request , opts )
340
265
data
341
266
end
@@ -368,7 +293,7 @@ def create_mass_estimate_with_http_info(create_mass_estimate_request, opts = {})
368
293
# HTTP header 'Content-Type'
369
294
content_type = @api_client . select_header_content_type ( [ 'application/json' ] )
370
295
if !content_type . nil?
371
- header_params [ 'Content-Type' ] = content_type
296
+ header_params [ 'Content-Type' ] = content_type
372
297
end
373
298
header_params [ 'Patch-Version' ] = 2
374
299
header_params [ :'Patch-Version' ] = opts [ :'patch_version' ] if !opts [ :'patch_version' ] . nil?
@@ -409,7 +334,7 @@ def create_mass_estimate_with_http_info(create_mass_estimate_request, opts = {})
409
334
# @option opts [Integer] :patch_version
410
335
# @return [EstimateResponse]
411
336
def create_rail_shipping_estimate ( create_rail_shipping_estimate_request = { } , opts = { } )
412
- _create_rail_shipping_estimate_request = Patch ::CreateRailShippingEstimateRequest . new ( create_rail_shipping_estimate_request )
337
+ _create_rail_shipping_estimate_request = Patch ::CreateRailShippingEstimateRequest . new ( create_rail_shipping_estimate_request )
413
338
data , _status_code , _headers = create_rail_shipping_estimate_with_http_info ( _create_rail_shipping_estimate_request , opts )
414
339
data
415
340
end
@@ -442,7 +367,7 @@ def create_rail_shipping_estimate_with_http_info(create_rail_shipping_estimate_r
442
367
# HTTP header 'Content-Type'
443
368
content_type = @api_client . select_header_content_type ( [ 'application/json' ] )
444
369
if !content_type . nil?
445
- header_params [ 'Content-Type' ] = content_type
370
+ header_params [ 'Content-Type' ] = content_type
446
371
end
447
372
header_params [ 'Patch-Version' ] = 2
448
373
header_params [ :'Patch-Version' ] = opts [ :'patch_version' ] if !opts [ :'patch_version' ] . nil?
@@ -483,7 +408,7 @@ def create_rail_shipping_estimate_with_http_info(create_rail_shipping_estimate_r
483
408
# @option opts [Integer] :patch_version
484
409
# @return [EstimateResponse]
485
410
def create_road_shipping_estimate ( create_road_shipping_estimate_request = { } , opts = { } )
486
- _create_road_shipping_estimate_request = Patch ::CreateRoadShippingEstimateRequest . new ( create_road_shipping_estimate_request )
411
+ _create_road_shipping_estimate_request = Patch ::CreateRoadShippingEstimateRequest . new ( create_road_shipping_estimate_request )
487
412
data , _status_code , _headers = create_road_shipping_estimate_with_http_info ( _create_road_shipping_estimate_request , opts )
488
413
data
489
414
end
@@ -516,7 +441,7 @@ def create_road_shipping_estimate_with_http_info(create_road_shipping_estimate_r
516
441
# HTTP header 'Content-Type'
517
442
content_type = @api_client . select_header_content_type ( [ 'application/json' ] )
518
443
if !content_type . nil?
519
- header_params [ 'Content-Type' ] = content_type
444
+ header_params [ 'Content-Type' ] = content_type
520
445
end
521
446
header_params [ 'Patch-Version' ] = 2
522
447
header_params [ :'Patch-Version' ] = opts [ :'patch_version' ] if !opts [ :'patch_version' ] . nil?
@@ -557,7 +482,7 @@ def create_road_shipping_estimate_with_http_info(create_road_shipping_estimate_r
557
482
# @option opts [Integer] :patch_version
558
483
# @return [EstimateResponse]
559
484
def create_sea_shipping_estimate ( create_sea_shipping_estimate_request = { } , opts = { } )
560
- _create_sea_shipping_estimate_request = Patch ::CreateSeaShippingEstimateRequest . new ( create_sea_shipping_estimate_request )
485
+ _create_sea_shipping_estimate_request = Patch ::CreateSeaShippingEstimateRequest . new ( create_sea_shipping_estimate_request )
561
486
data , _status_code , _headers = create_sea_shipping_estimate_with_http_info ( _create_sea_shipping_estimate_request , opts )
562
487
data
563
488
end
@@ -590,7 +515,7 @@ def create_sea_shipping_estimate_with_http_info(create_sea_shipping_estimate_req
590
515
# HTTP header 'Content-Type'
591
516
content_type = @api_client . select_header_content_type ( [ 'application/json' ] )
592
517
if !content_type . nil?
593
- header_params [ 'Content-Type' ] = content_type
518
+ header_params [ 'Content-Type' ] = content_type
594
519
end
595
520
header_params [ 'Patch-Version' ] = 2
596
521
header_params [ :'Patch-Version' ] = opts [ :'patch_version' ] if !opts [ :'patch_version' ] . nil?
@@ -759,4 +684,4 @@ def retrieve_estimates_with_http_info(opts = {})
759
684
return data , status_code , headers
760
685
end
761
686
end
762
- end
687
+ end
0 commit comments