Skip to content

Commit c6c2429

Browse files
committed
Remove hotel estimates
1 parent f59e7c7 commit c6c2429

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+92
-423
lines changed

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,26 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [2.4.0] - 2025-05-16
9+
10+
### Removed
11+
12+
- Removes `Patch::Estimate.create_hotel_estimate` method
13+
14+
## [2.3.1] - 2025-04-28
15+
16+
### Removed
17+
18+
- Removes `Patch::Estimate.create_ecommerce_estimate` method
19+
20+
## [2.3.0] - 2025-01-10
21+
22+
### Removed
23+
24+
- Removes `Patch::Estimate.create_ethereum_estimate` method
25+
- Removes `Patch::Estimate.create_shipping_estimate` method
26+
- Removes `Patch::Estimate.create_vehicle_estimate` method
27+
828
## [2.1.1] - 2023-04-18
929

1030
### Added

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
patch_ruby (2.3.1)
4+
patch_ruby (2.4.0)
55
typhoeus (~> 1.0, >= 1.0.1)
66

77
GEM
@@ -21,7 +21,7 @@ GEM
2121
ffi (>= 1.15.0)
2222
factory_bot (6.2.0)
2323
activesupport (>= 5.0.0)
24-
ffi (1.17.1)
24+
ffi (1.17.2)
2525
i18n (1.12.0)
2626
concurrent-ruby (~> 1.0)
2727
jaro_winkler (1.5.6)

lib/patch_ruby.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
require 'patch_ruby/models/create_air_shipping_estimate_request'
2121
require 'patch_ruby/models/create_bitcoin_estimate_request'
2222
require 'patch_ruby/models/create_flight_estimate_request'
23-
require 'patch_ruby/models/create_hotel_estimate_request'
2423
require 'patch_ruby/models/create_mass_estimate_request'
2524
require 'patch_ruby/models/create_order_line_item_request'
2625
require 'patch_ruby/models/create_order_request'

lib/patch_ruby/api/estimates_api.rb

Lines changed: 15 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ class EstimatesApi
1818
:create_air_shipping_estimate,
1919
:create_bitcoin_estimate,
2020
:create_flight_estimate,
21-
:create_hotel_estimate,
2221
:create_mass_estimate,
2322
:create_rail_shipping_estimate,
2423
:create_road_shipping_estimate,
@@ -39,7 +38,7 @@ def initialize(api_client = ApiClient.default)
3938
# @option opts [Integer] :patch_version
4039
# @return [EstimateResponse]
4140
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)
4342
data, _status_code, _headers = create_air_shipping_estimate_with_http_info(_create_air_shipping_estimate_request, opts)
4443
data
4544
end
@@ -72,7 +71,7 @@ def create_air_shipping_estimate_with_http_info(create_air_shipping_estimate_req
7271
# HTTP header 'Content-Type'
7372
content_type = @api_client.select_header_content_type(['application/json'])
7473
if !content_type.nil?
75-
header_params['Content-Type'] = content_type
74+
header_params['Content-Type'] = content_type
7675
end
7776
header_params['Patch-Version'] = 2
7877
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
113112
# @option opts [Integer] :patch_version
114113
# @return [EstimateResponse]
115114
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)
117116
data, _status_code, _headers = create_bitcoin_estimate_with_http_info(_create_bitcoin_estimate_request, opts)
118117
data
119118
end
@@ -146,7 +145,7 @@ def create_bitcoin_estimate_with_http_info(create_bitcoin_estimate_request, opts
146145
# HTTP header 'Content-Type'
147146
content_type = @api_client.select_header_content_type(['application/json'])
148147
if !content_type.nil?
149-
header_params['Content-Type'] = content_type
148+
header_params['Content-Type'] = content_type
150149
end
151150
header_params['Patch-Version'] = 2
152151
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
187186
# @option opts [Integer] :patch_version
188187
# @return [EstimateResponse]
189188
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)
191190
data, _status_code, _headers = create_flight_estimate_with_http_info(_create_flight_estimate_request, opts)
192191
data
193192
end
@@ -220,7 +219,7 @@ def create_flight_estimate_with_http_info(create_flight_estimate_request, opts =
220219
# HTTP header 'Content-Type'
221220
content_type = @api_client.select_header_content_type(['application/json'])
222221
if !content_type.nil?
223-
header_params['Content-Type'] = content_type
222+
header_params['Content-Type'] = content_type
224223
end
225224
header_params['Patch-Version'] = 2
226225
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 =
254253
return data, status_code, headers
255254
end
256255

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\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
327-
end
328-
return data, status_code, headers
329-
end
330-
331256
# Create an estimate based on mass of CO2
332257
# 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.
333258
# @param create_mass_estimate_request [CreateMassEstimateRequest]
334259
# @param [Hash] opts the optional parameters
335260
# @option opts [Integer] :patch_version
336261
# @return [EstimateResponse]
337262
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)
339264
data, _status_code, _headers = create_mass_estimate_with_http_info(_create_mass_estimate_request, opts)
340265
data
341266
end
@@ -368,7 +293,7 @@ def create_mass_estimate_with_http_info(create_mass_estimate_request, opts = {})
368293
# HTTP header 'Content-Type'
369294
content_type = @api_client.select_header_content_type(['application/json'])
370295
if !content_type.nil?
371-
header_params['Content-Type'] = content_type
296+
header_params['Content-Type'] = content_type
372297
end
373298
header_params['Patch-Version'] = 2
374299
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 = {})
409334
# @option opts [Integer] :patch_version
410335
# @return [EstimateResponse]
411336
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)
413338
data, _status_code, _headers = create_rail_shipping_estimate_with_http_info(_create_rail_shipping_estimate_request, opts)
414339
data
415340
end
@@ -442,7 +367,7 @@ def create_rail_shipping_estimate_with_http_info(create_rail_shipping_estimate_r
442367
# HTTP header 'Content-Type'
443368
content_type = @api_client.select_header_content_type(['application/json'])
444369
if !content_type.nil?
445-
header_params['Content-Type'] = content_type
370+
header_params['Content-Type'] = content_type
446371
end
447372
header_params['Patch-Version'] = 2
448373
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
483408
# @option opts [Integer] :patch_version
484409
# @return [EstimateResponse]
485410
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)
487412
data, _status_code, _headers = create_road_shipping_estimate_with_http_info(_create_road_shipping_estimate_request, opts)
488413
data
489414
end
@@ -516,7 +441,7 @@ def create_road_shipping_estimate_with_http_info(create_road_shipping_estimate_r
516441
# HTTP header 'Content-Type'
517442
content_type = @api_client.select_header_content_type(['application/json'])
518443
if !content_type.nil?
519-
header_params['Content-Type'] = content_type
444+
header_params['Content-Type'] = content_type
520445
end
521446
header_params['Patch-Version'] = 2
522447
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
557482
# @option opts [Integer] :patch_version
558483
# @return [EstimateResponse]
559484
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)
561486
data, _status_code, _headers = create_sea_shipping_estimate_with_http_info(_create_sea_shipping_estimate_request, opts)
562487
data
563488
end
@@ -590,7 +515,7 @@ def create_sea_shipping_estimate_with_http_info(create_sea_shipping_estimate_req
590515
# HTTP header 'Content-Type'
591516
content_type = @api_client.select_header_content_type(['application/json'])
592517
if !content_type.nil?
593-
header_params['Content-Type'] = content_type
518+
header_params['Content-Type'] = content_type
594519
end
595520
header_params['Patch-Version'] = 2
596521
header_params[:'Patch-Version'] = opts[:'patch_version'] if !opts[:'patch_version'].nil?
@@ -759,4 +684,4 @@ def retrieve_estimates_with_http_info(opts = {})
759684
return data, status_code, headers
760685
end
761686
end
762-
end
687+
end

lib/patch_ruby/api/order_line_items_api.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def initialize(api_client = ApiClient.default)
3333
# @option opts [Integer] :patch_version
3434
# @return [OrderLineItemResponse]
3535
def create_order_line_item(order_id, create_order_line_item_request = {}, opts = {})
36-
_create_order_line_item_request = Patch::CreateOrderLineItemRequest.new(create_order_line_item_request)
36+
_create_order_line_item_request = Patch::CreateOrderLineItemRequest.new(create_order_line_item_request)
3737
data, _status_code, _headers = create_order_line_item_with_http_info(order_id, _create_order_line_item_request, opts)
3838
data
3939
end
@@ -71,7 +71,7 @@ def create_order_line_item_with_http_info(order_id, create_order_line_item_reque
7171
# HTTP header 'Content-Type'
7272
content_type = @api_client.select_header_content_type(['application/json'])
7373
if !content_type.nil?
74-
header_params['Content-Type'] = content_type
74+
header_params['Content-Type'] = content_type
7575
end
7676
header_params['Patch-Version'] = 2
7777
header_params[:'Patch-Version'] = opts[:'patch_version'] if !opts[:'patch_version'].nil?
@@ -189,7 +189,7 @@ def delete_order_line_item_with_http_info(order_id, serial_number, opts = {})
189189
# @option opts [Integer] :patch_version
190190
# @return [OrderLineItemResponse]
191191
def update_order_line_item(order_id, serial_number, update_order_line_item_request = {}, opts = {})
192-
_update_order_line_item_request = Patch::UpdateOrderLineItemRequest.new(update_order_line_item_request)
192+
_update_order_line_item_request = Patch::UpdateOrderLineItemRequest.new(update_order_line_item_request)
193193
data, _status_code, _headers = update_order_line_item_with_http_info(order_id, serial_number, _update_order_line_item_request, opts)
194194
data
195195
end
@@ -232,7 +232,7 @@ def update_order_line_item_with_http_info(order_id, serial_number, update_order_
232232
# HTTP header 'Content-Type'
233233
content_type = @api_client.select_header_content_type(['application/json'])
234234
if !content_type.nil?
235-
header_params['Content-Type'] = content_type
235+
header_params['Content-Type'] = content_type
236236
end
237237
header_params['Patch-Version'] = 2
238238
header_params[:'Patch-Version'] = opts[:'patch_version'] if !opts[:'patch_version'].nil?
@@ -266,4 +266,4 @@ def update_order_line_item_with_http_info(order_id, serial_number, update_order_
266266
return data, status_code, headers
267267
end
268268
end
269-
end
269+
end

lib/patch_ruby/api/orders_api.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def cancel_order_with_http_info(id, opts = {})
104104
# @option opts [Integer] :patch_version
105105
# @return [OrderResponse]
106106
def create_order(create_order_request = {}, opts = {})
107-
_create_order_request = Patch::CreateOrderRequest.new(create_order_request)
107+
_create_order_request = Patch::CreateOrderRequest.new(create_order_request)
108108
data, _status_code, _headers = create_order_with_http_info(_create_order_request, opts)
109109
data
110110
end
@@ -137,7 +137,7 @@ def create_order_with_http_info(create_order_request, opts = {})
137137
# HTTP header 'Content-Type'
138138
content_type = @api_client.select_header_content_type(['application/json'])
139139
if !content_type.nil?
140-
header_params['Content-Type'] = content_type
140+
header_params['Content-Type'] = content_type
141141
end
142142
header_params['Patch-Version'] = 2
143143
header_params[:'Patch-Version'] = opts[:'patch_version'] if !opts[:'patch_version'].nil?
@@ -282,7 +282,7 @@ def place_order_with_http_info(id, opts = {})
282282
# HTTP header 'Content-Type'
283283
content_type = @api_client.select_header_content_type(['application/json'])
284284
if !content_type.nil?
285-
header_params['Content-Type'] = content_type
285+
header_params['Content-Type'] = content_type
286286
end
287287
header_params['Patch-Version'] = 2
288288
header_params[:'Patch-Version'] = opts[:'patch_version'] if !opts[:'patch_version'].nil?
@@ -460,4 +460,4 @@ def retrieve_orders_with_http_info(opts = {})
460460
return data, status_code, headers
461461
end
462462
end
463-
end
463+
end

lib/patch_ruby/api/projects_api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,4 +174,4 @@ def retrieve_projects_with_http_info(opts = {})
174174
return data, status_code, headers
175175
end
176176
end
177-
end
177+
end

lib/patch_ruby/api/technology_types_api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,4 @@ def retrieve_technology_types_with_http_info(opts = {})
8686
return data, status_code, headers
8787
end
8888
end
89-
end
89+
end

lib/patch_ruby/api_client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class ApiClient
3131
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
3232
def initialize(config = Configuration.default)
3333
@config = config
34-
@user_agent = "patch-ruby/2.3.1"
34+
@user_agent = "patch-ruby/2.4.0"
3535
@default_headers = {
3636
'Content-Type' => 'application/json',
3737
'User-Agent' => @user_agent

lib/patch_ruby/configuration.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,8 @@ def server_settings
242242
end
243243

244244
def operation_server_settings
245-
{}
245+
{
246+
}
246247
end
247248

248249
# Returns URL based on server settings
@@ -278,5 +279,6 @@ def server_url(index, variables = {}, servers = nil)
278279

279280
url
280281
end
282+
281283
end
282284
end

lib/patch_ruby/models/create_air_shipping_estimate_request.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,5 +370,6 @@ def _to_hash(value)
370370
value
371371
end
372372
end
373+
373374
end
374375
end

0 commit comments

Comments
 (0)