Skip to content

Commit c8a4e0a

Browse files
authored
Remove hotel estimates (#80)
* Remove hotel estimates * Cop
1 parent f59e7c7 commit c8a4e0a

File tree

9 files changed

+52
-410
lines changed

9 files changed

+52
-410
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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ gemspec
55
group :development, :test do
66
gem 'rake', '~> 13.0.1'
77
gem 'pry-byebug'
8-
gem 'rubocop', '~> 0.66.0'
8+
gem 'rubocop', '~> 1.75.6'
99
end

Gemfile.lock

Lines changed: 29 additions & 16 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
@@ -12,7 +12,7 @@ GEM
1212
i18n (>= 1.6, < 2)
1313
minitest (>= 5.1)
1414
tzinfo (~> 2.0)
15-
ast (2.4.2)
15+
ast (2.4.3)
1616
byebug (11.1.3)
1717
coderay (1.1.3)
1818
concurrent-ruby (1.2.2)
@@ -21,24 +21,29 @@ 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)
27-
jaro_winkler (1.5.6)
27+
json (2.12.0)
28+
language_server-protocol (3.17.0.5)
29+
lint_roller (1.1.0)
2830
method_source (1.0.0)
2931
minitest (5.18.0)
30-
parallel (1.20.1)
31-
parser (3.0.2.0)
32+
parallel (1.27.0)
33+
parser (3.3.8.0)
3234
ast (~> 2.4.1)
35+
racc
36+
prism (1.4.0)
3337
pry (0.14.1)
3438
coderay (~> 1.1)
3539
method_source (~> 1.0)
3640
pry-byebug (3.8.0)
3741
byebug (~> 11.0)
3842
pry (~> 0.10)
39-
psych (4.0.1)
40-
rainbow (3.0.0)
43+
racc (1.8.1)
44+
rainbow (3.1.1)
4145
rake (13.0.6)
46+
regexp_parser (2.10.0)
4247
rspec (3.10.0)
4348
rspec-core (~> 3.10.0)
4449
rspec-expectations (~> 3.10.0)
@@ -52,20 +57,28 @@ GEM
5257
diff-lcs (>= 1.2.0, < 2.0)
5358
rspec-support (~> 3.10.0)
5459
rspec-support (3.10.2)
55-
rubocop (0.66.0)
56-
jaro_winkler (~> 1.5.1)
60+
rubocop (1.75.6)
61+
json (~> 2.3)
62+
language_server-protocol (~> 3.17.0.2)
63+
lint_roller (~> 1.1.0)
5764
parallel (~> 1.10)
58-
parser (>= 2.5, != 2.5.1.1)
59-
psych (>= 3.1.0)
65+
parser (>= 3.3.0.2)
6066
rainbow (>= 2.2.2, < 4.0)
67+
regexp_parser (>= 2.9.3, < 3.0)
68+
rubocop-ast (>= 1.44.0, < 2.0)
6169
ruby-progressbar (~> 1.7)
62-
unicode-display_width (>= 1.4.0, < 1.6)
63-
ruby-progressbar (1.11.0)
70+
unicode-display_width (>= 2.4.0, < 4.0)
71+
rubocop-ast (1.44.1)
72+
parser (>= 3.3.7.2)
73+
prism (~> 1.4)
74+
ruby-progressbar (1.13.0)
6475
typhoeus (1.4.1)
6576
ethon (>= 0.9.0)
6677
tzinfo (2.0.6)
6778
concurrent-ruby (~> 1.0)
68-
unicode-display_width (1.5.0)
79+
unicode-display_width (3.1.4)
80+
unicode-emoji (~> 4.0, >= 4.0.4)
81+
unicode-emoji (4.0.4)
6982

7083
PLATFORMS
7184
arm64-darwin-20
@@ -83,7 +96,7 @@ DEPENDENCIES
8396
pry-byebug
8497
rake (~> 13.0.1)
8598
rspec (~> 3.6, >= 3.6.0)
86-
rubocop (~> 0.66.0)
99+
rubocop (~> 1.75.6)
87100

88101
BUNDLED WITH
89102
2.3.9

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: 0 additions & 75 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,
@@ -254,80 +253,6 @@ 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]

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

0 commit comments

Comments
 (0)