@@ -18,6 +18,7 @@ class EstimatesApi
1818 :create_bitcoin_estimate ,
1919 :create_ethereum_estimate ,
2020 :create_flight_estimate ,
21+ :create_hotel_estimate ,
2122 :create_mass_estimate ,
2223 :create_shipping_estimate ,
2324 :create_vehicle_estimate ,
@@ -237,6 +238,75 @@ def create_flight_estimate_with_http_info(create_flight_estimate_request, opts =
237238 return data , status_code , headers
238239 end
239240
241+ # Create a hotel estimate.
242+ # 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.
243+ # @param create_hotel_estimate_request [CreateHotelEstimateRequest]
244+ # @param [Hash] opts the optional parameters
245+ # @return [EstimateResponse]
246+ def create_hotel_estimate ( create_hotel_estimate_request = { } , opts = { } )
247+ _create_hotel_estimate_request = Patch ::CreateHotelEstimateRequest . new ( create_hotel_estimate_request )
248+ data , _status_code , _headers = create_hotel_estimate_with_http_info ( _create_hotel_estimate_request , opts )
249+ data
250+ end
251+
252+ # Create a hotel estimate.
253+ # 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.
254+ # @param create_hotel_estimate_request [CreateHotelEstimateRequest]
255+ # @param [Hash] opts the optional parameters
256+ # @return [Array<(EstimateResponse, Integer, Hash)>] EstimateResponse data, response status code and response headers
257+ def create_hotel_estimate_with_http_info ( create_hotel_estimate_request , opts = { } )
258+ if @api_client . config . debugging
259+ @api_client . config . logger . debug 'Calling API: EstimatesApi.create_hotel_estimate ...'
260+ end
261+ # verify the required parameter 'create_hotel_estimate_request' is set
262+ if @api_client . config . client_side_validation && create_hotel_estimate_request . nil?
263+ fail ArgumentError , "Missing the required parameter 'create_hotel_estimate_request' when calling EstimatesApi.create_hotel_estimate"
264+ end
265+ # resource path
266+ local_var_path = '/v1/estimates/hotel'
267+
268+ # query parameters
269+ query_params = opts [ :query_params ] || { }
270+
271+ # header parameters
272+ header_params = opts [ :header_params ] || { }
273+ # HTTP header 'Accept' (if needed)
274+ header_params [ 'Accept' ] = @api_client . select_header_accept ( [ 'application/json' ] )
275+ # HTTP header 'Content-Type'
276+ content_type = @api_client . select_header_content_type ( [ 'application/json' ] )
277+ if !content_type . nil?
278+ header_params [ 'Content-Type' ] = content_type
279+ end
280+
281+ # form parameters
282+ form_params = opts [ :form_params ] || { }
283+
284+ # http body (model)
285+ post_body = opts [ :debug_body ] || @api_client . object_to_http_body ( create_hotel_estimate_request )
286+
287+ # return_type
288+ return_type = opts [ :debug_return_type ] || 'EstimateResponse'
289+
290+ # auth_names
291+ auth_names = opts [ :debug_auth_names ] || [ 'bearer_auth' ]
292+
293+ new_options = opts . merge (
294+ :operation => :"EstimatesApi.create_hotel_estimate" ,
295+ :header_params => header_params ,
296+ :query_params => query_params ,
297+ :form_params => form_params ,
298+ :body => post_body ,
299+ :auth_names => auth_names ,
300+ :return_type => return_type
301+ )
302+
303+ data , status_code , headers = @api_client . call_api ( :POST , local_var_path , new_options )
304+ if @api_client . config . debugging
305+ @api_client . config . logger . debug "API called: EstimatesApi#create_hotel_estimate\n Data: #{ data . inspect } \n Status code: #{ status_code } \n Headers: #{ headers } "
306+ end
307+ return data , status_code , headers
308+ end
309+
240310 # Create an estimate based on mass of CO2
241311 # 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.
242312 # @param create_mass_estimate_request [CreateMassEstimateRequest]
0 commit comments