Skip to content

Remove hotel estimates #80

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,26 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.4.0] - 2025-05-16

### Removed

- Removes `Patch::Estimate.create_hotel_estimate` method

## [2.3.1] - 2025-04-28

### Removed

- Removes `Patch::Estimate.create_ecommerce_estimate` method

## [2.3.0] - 2025-01-10

### Removed

- Removes `Patch::Estimate.create_ethereum_estimate` method
- Removes `Patch::Estimate.create_shipping_estimate` method
- Removes `Patch::Estimate.create_vehicle_estimate` method

## [2.1.1] - 2023-04-18

### Added
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ gemspec
group :development, :test do
gem 'rake', '~> 13.0.1'
gem 'pry-byebug'
gem 'rubocop', '~> 0.66.0'
gem 'rubocop', '~> 1.75.6'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bumped to avoid a bug

end
45 changes: 29 additions & 16 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
patch_ruby (2.3.1)
patch_ruby (2.4.0)
typhoeus (~> 1.0, >= 1.0.1)

GEM
Expand All @@ -12,7 +12,7 @@ GEM
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
ast (2.4.2)
ast (2.4.3)
byebug (11.1.3)
coderay (1.1.3)
concurrent-ruby (1.2.2)
Expand All @@ -21,24 +21,29 @@ GEM
ffi (>= 1.15.0)
factory_bot (6.2.0)
activesupport (>= 5.0.0)
ffi (1.17.1)
ffi (1.17.2)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
jaro_winkler (1.5.6)
json (2.12.0)
language_server-protocol (3.17.0.5)
lint_roller (1.1.0)
method_source (1.0.0)
minitest (5.18.0)
parallel (1.20.1)
parser (3.0.2.0)
parallel (1.27.0)
parser (3.3.8.0)
ast (~> 2.4.1)
racc
prism (1.4.0)
pry (0.14.1)
coderay (~> 1.1)
method_source (~> 1.0)
pry-byebug (3.8.0)
byebug (~> 11.0)
pry (~> 0.10)
psych (4.0.1)
rainbow (3.0.0)
racc (1.8.1)
rainbow (3.1.1)
rake (13.0.6)
regexp_parser (2.10.0)
rspec (3.10.0)
rspec-core (~> 3.10.0)
rspec-expectations (~> 3.10.0)
Expand All @@ -52,20 +57,28 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-support (3.10.2)
rubocop (0.66.0)
jaro_winkler (~> 1.5.1)
rubocop (1.75.6)
json (~> 2.3)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
parallel (~> 1.10)
parser (>= 2.5, != 2.5.1.1)
psych (>= 3.1.0)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.44.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 1.6)
ruby-progressbar (1.11.0)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.44.1)
parser (>= 3.3.7.2)
prism (~> 1.4)
ruby-progressbar (1.13.0)
typhoeus (1.4.1)
ethon (>= 0.9.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (1.5.0)
unicode-display_width (3.1.4)
unicode-emoji (~> 4.0, >= 4.0.4)
unicode-emoji (4.0.4)

PLATFORMS
arm64-darwin-20
Expand All @@ -83,7 +96,7 @@ DEPENDENCIES
pry-byebug
rake (~> 13.0.1)
rspec (~> 3.6, >= 3.6.0)
rubocop (~> 0.66.0)
rubocop (~> 1.75.6)

BUNDLED WITH
2.3.9
1 change: 0 additions & 1 deletion lib/patch_ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
require 'patch_ruby/models/create_air_shipping_estimate_request'
require 'patch_ruby/models/create_bitcoin_estimate_request'
require 'patch_ruby/models/create_flight_estimate_request'
require 'patch_ruby/models/create_hotel_estimate_request'
require 'patch_ruby/models/create_mass_estimate_request'
require 'patch_ruby/models/create_order_line_item_request'
require 'patch_ruby/models/create_order_request'
Expand Down
75 changes: 0 additions & 75 deletions lib/patch_ruby/api/estimates_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class EstimatesApi
:create_air_shipping_estimate,
:create_bitcoin_estimate,
:create_flight_estimate,
:create_hotel_estimate,
:create_mass_estimate,
:create_rail_shipping_estimate,
:create_road_shipping_estimate,
Expand Down Expand Up @@ -254,80 +253,6 @@ def create_flight_estimate_with_http_info(create_flight_estimate_request, opts =
return data, status_code, headers
end

# Create a hotel estimate.
# 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.
# @param create_hotel_estimate_request [CreateHotelEstimateRequest]
# @param [Hash] opts the optional parameters
# @option opts [Integer] :patch_version
# @return [EstimateResponse]
def create_hotel_estimate(create_hotel_estimate_request = {}, opts = {})
_create_hotel_estimate_request = Patch::CreateHotelEstimateRequest.new(create_hotel_estimate_request)
data, _status_code, _headers = create_hotel_estimate_with_http_info(_create_hotel_estimate_request, opts)
data
end

# Create a hotel estimate.
# 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.
# @param create_hotel_estimate_request [CreateHotelEstimateRequest]
# @param [Hash] opts the optional parameters
# @option opts [Integer] :patch_version
# @return [Array<(EstimateResponse, Integer, Hash)>] EstimateResponse data, response status code and response headers
def create_hotel_estimate_with_http_info(create_hotel_estimate_request, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: EstimatesApi.create_hotel_estimate ...'
end
# verify the required parameter 'create_hotel_estimate_request' is set
if @api_client.config.client_side_validation && create_hotel_estimate_request.nil?
fail ArgumentError, "Missing the required parameter 'create_hotel_estimate_request' when calling EstimatesApi.create_hotel_estimate"
end
# resource path
local_var_path = '/v1/estimates/hotel'

# query parameters
query_params = opts[:query_params] || {}

# header parameters
header_params = opts[:header_params] || {}

# HTTP header 'Accept' (if needed)
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
# HTTP header 'Content-Type'
content_type = @api_client.select_header_content_type(['application/json'])
if !content_type.nil?
header_params['Content-Type'] = content_type
end
header_params['Patch-Version'] = 2
header_params[:'Patch-Version'] = opts[:'patch_version'] if !opts[:'patch_version'].nil?

# form parameters
form_params = opts[:form_params] || {}

# http body (model)
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_hotel_estimate_request)

# return_type
return_type = opts[:debug_return_type] || 'EstimateResponse'

# auth_names
auth_names = opts[:debug_auth_names] || ['bearer_auth']

new_options = opts.merge(
:operation => :"EstimatesApi.create_hotel_estimate",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names,
:return_type => return_type
)

data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: EstimatesApi#create_hotel_estimate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end

# Create an estimate based on mass of CO2
# 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.
# @param create_mass_estimate_request [CreateMassEstimateRequest]
Expand Down
2 changes: 1 addition & 1 deletion lib/patch_ruby/api_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class ApiClient
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
def initialize(config = Configuration.default)
@config = config
@user_agent = "patch-ruby/2.3.1"
@user_agent = "patch-ruby/2.4.0"
@default_headers = {
'Content-Type' => 'application/json',
'User-Agent' => @user_agent
Expand Down
Loading