diff --git a/CHANGELOG.md b/CHANGELOG.md index 2461b5a..ac5eeda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ 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). +## [1.11.1] - 2021-09-07 + +### Changed + +- Body parameters are validated before being sent to the API. This gives developers faster feedback as they develop their applications. + ## [1.11.0] - 2021-09-07 ### Added diff --git a/Gemfile.lock b/Gemfile.lock index 98eb4c4..1dd90d1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - patch_ruby (1.11.0) + patch_ruby (1.11.1) typhoeus (~> 1.0, >= 1.0.1) GEM diff --git a/lib/patch_ruby/api/estimates_api.rb b/lib/patch_ruby/api/estimates_api.rb index a6ab02a..7041a4e 100644 --- a/lib/patch_ruby/api/estimates_api.rb +++ b/lib/patch_ruby/api/estimates_api.rb @@ -35,8 +35,9 @@ def initialize(api_client = ApiClient.default) # @param create_bitcoin_estimate_request [CreateBitcoinEstimateRequest] # @param [Hash] opts the optional parameters # @return [EstimateResponse] - def create_bitcoin_estimate(create_bitcoin_estimate_request, opts = {}) - data, _status_code, _headers = create_bitcoin_estimate_with_http_info(create_bitcoin_estimate_request, opts) + def create_bitcoin_estimate(create_bitcoin_estimate_request = {}, opts = {}) + _create_bitcoin_estimate_request = Patch::CreateBitcoinEstimateRequest.new(create_bitcoin_estimate_request) + data, _status_code, _headers = create_bitcoin_estimate_with_http_info(_create_bitcoin_estimate_request, opts) data end @@ -100,8 +101,9 @@ def create_bitcoin_estimate_with_http_info(create_bitcoin_estimate_request, opts # @param create_ethereum_estimate_request [CreateEthereumEstimateRequest] # @param [Hash] opts the optional parameters # @return [EstimateResponse] - def create_ethereum_estimate(create_ethereum_estimate_request, opts = {}) - data, _status_code, _headers = create_ethereum_estimate_with_http_info(create_ethereum_estimate_request, opts) + def create_ethereum_estimate(create_ethereum_estimate_request = {}, opts = {}) + _create_ethereum_estimate_request = Patch::CreateEthereumEstimateRequest.new(create_ethereum_estimate_request) + data, _status_code, _headers = create_ethereum_estimate_with_http_info(_create_ethereum_estimate_request, opts) data end @@ -165,8 +167,9 @@ def create_ethereum_estimate_with_http_info(create_ethereum_estimate_request, op # @param create_flight_estimate_request [CreateFlightEstimateRequest] # @param [Hash] opts the optional parameters # @return [EstimateResponse] - def create_flight_estimate(create_flight_estimate_request, opts = {}) - data, _status_code, _headers = create_flight_estimate_with_http_info(create_flight_estimate_request, opts) + def create_flight_estimate(create_flight_estimate_request = {}, opts = {}) + _create_flight_estimate_request = Patch::CreateFlightEstimateRequest.new(create_flight_estimate_request) + data, _status_code, _headers = create_flight_estimate_with_http_info(_create_flight_estimate_request, opts) data end @@ -230,8 +233,9 @@ def create_flight_estimate_with_http_info(create_flight_estimate_request, opts = # @param create_mass_estimate_request [CreateMassEstimateRequest] # @param [Hash] opts the optional parameters # @return [EstimateResponse] - def create_mass_estimate(create_mass_estimate_request, opts = {}) - data, _status_code, _headers = create_mass_estimate_with_http_info(create_mass_estimate_request, opts) + def create_mass_estimate(create_mass_estimate_request = {}, opts = {}) + _create_mass_estimate_request = Patch::CreateMassEstimateRequest.new(create_mass_estimate_request) + data, _status_code, _headers = create_mass_estimate_with_http_info(_create_mass_estimate_request, opts) data end @@ -295,8 +299,9 @@ def create_mass_estimate_with_http_info(create_mass_estimate_request, opts = {}) # @param create_shipping_estimate_request [CreateShippingEstimateRequest] # @param [Hash] opts the optional parameters # @return [EstimateResponse] - def create_shipping_estimate(create_shipping_estimate_request, opts = {}) - data, _status_code, _headers = create_shipping_estimate_with_http_info(create_shipping_estimate_request, opts) + def create_shipping_estimate(create_shipping_estimate_request = {}, opts = {}) + _create_shipping_estimate_request = Patch::CreateShippingEstimateRequest.new(create_shipping_estimate_request) + data, _status_code, _headers = create_shipping_estimate_with_http_info(_create_shipping_estimate_request, opts) data end @@ -360,8 +365,9 @@ def create_shipping_estimate_with_http_info(create_shipping_estimate_request, op # @param create_vehicle_estimate_request [CreateVehicleEstimateRequest] # @param [Hash] opts the optional parameters # @return [EstimateResponse] - def create_vehicle_estimate(create_vehicle_estimate_request, opts = {}) - data, _status_code, _headers = create_vehicle_estimate_with_http_info(create_vehicle_estimate_request, opts) + def create_vehicle_estimate(create_vehicle_estimate_request = {}, opts = {}) + _create_vehicle_estimate_request = Patch::CreateVehicleEstimateRequest.new(create_vehicle_estimate_request) + data, _status_code, _headers = create_vehicle_estimate_with_http_info(_create_vehicle_estimate_request, opts) data end @@ -426,6 +432,7 @@ def create_vehicle_estimate_with_http_info(create_vehicle_estimate_request, opts # @param [Hash] opts the optional parameters # @return [EstimateResponse] def retrieve_estimate(id, opts = {}) + data, _status_code, _headers = retrieve_estimate_with_http_info(id, opts) data end @@ -489,6 +496,7 @@ def retrieve_estimate_with_http_info(id, opts = {}) # @option opts [Integer] :page # @return [EstimateListResponse] def retrieve_estimates(opts = {}) + data, _status_code, _headers = retrieve_estimates_with_http_info(opts) data end diff --git a/lib/patch_ruby/api/orders_api.rb b/lib/patch_ruby/api/orders_api.rb index 18cba61..ffdbbc0 100644 --- a/lib/patch_ruby/api/orders_api.rb +++ b/lib/patch_ruby/api/orders_api.rb @@ -33,6 +33,7 @@ def initialize(api_client = ApiClient.default) # @param [Hash] opts the optional parameters # @return [OrderResponse] def cancel_order(id, opts = {}) + data, _status_code, _headers = cancel_order_with_http_info(id, opts) data end @@ -95,8 +96,9 @@ def cancel_order_with_http_info(id, opts = {}) # @param create_order_request [CreateOrderRequest] # @param [Hash] opts the optional parameters # @return [OrderResponse] - def create_order(create_order_request, opts = {}) - data, _status_code, _headers = create_order_with_http_info(create_order_request, opts) + def create_order(create_order_request = {}, opts = {}) + _create_order_request = Patch::CreateOrderRequest.new(create_order_request) + data, _status_code, _headers = create_order_with_http_info(_create_order_request, opts) data end @@ -161,6 +163,7 @@ def create_order_with_http_info(create_order_request, opts = {}) # @param [Hash] opts the optional parameters # @return [OrderResponse] def place_order(id, opts = {}) + data, _status_code, _headers = place_order_with_http_info(id, opts) data end @@ -224,6 +227,7 @@ def place_order_with_http_info(id, opts = {}) # @param [Hash] opts the optional parameters # @return [OrderResponse] def retrieve_order(id, opts = {}) + data, _status_code, _headers = retrieve_order_with_http_info(id, opts) data end @@ -290,6 +294,7 @@ def retrieve_order_with_http_info(id, opts = {}) # @option opts [String] :metadata_example2 # @return [OrderListResponse] def retrieve_orders(opts = {}) + data, _status_code, _headers = retrieve_orders_with_http_info(opts) data end diff --git a/lib/patch_ruby/api/preferences_api.rb b/lib/patch_ruby/api/preferences_api.rb index facc61a..9b10924 100644 --- a/lib/patch_ruby/api/preferences_api.rb +++ b/lib/patch_ruby/api/preferences_api.rb @@ -31,8 +31,9 @@ def initialize(api_client = ApiClient.default) # @param create_preference_request [CreatePreferenceRequest] # @param [Hash] opts the optional parameters # @return [PreferenceResponse] - def create_preference(create_preference_request, opts = {}) - data, _status_code, _headers = create_preference_with_http_info(create_preference_request, opts) + def create_preference(create_preference_request = {}, opts = {}) + _create_preference_request = Patch::CreatePreferenceRequest.new(create_preference_request) + data, _status_code, _headers = create_preference_with_http_info(_create_preference_request, opts) data end @@ -97,6 +98,7 @@ def create_preference_with_http_info(create_preference_request, opts = {}) # @param [Hash] opts the optional parameters # @return [PreferenceResponse] def delete_preference(id, opts = {}) + data, _status_code, _headers = delete_preference_with_http_info(id, opts) data end @@ -160,6 +162,7 @@ def delete_preference_with_http_info(id, opts = {}) # @param [Hash] opts the optional parameters # @return [PreferenceResponse] def retrieve_preference(id, opts = {}) + data, _status_code, _headers = retrieve_preference_with_http_info(id, opts) data end @@ -223,6 +226,7 @@ def retrieve_preference_with_http_info(id, opts = {}) # @option opts [Integer] :page # @return [PreferenceListResponse] def retrieve_preferences(opts = {}) + data, _status_code, _headers = retrieve_preferences_with_http_info(opts) data end diff --git a/lib/patch_ruby/api/projects_api.rb b/lib/patch_ruby/api/projects_api.rb index 02bb7f6..43e8689 100644 --- a/lib/patch_ruby/api/projects_api.rb +++ b/lib/patch_ruby/api/projects_api.rb @@ -30,6 +30,7 @@ def initialize(api_client = ApiClient.default) # @param [Hash] opts the optional parameters # @return [ProjectResponse] def retrieve_project(id, opts = {}) + data, _status_code, _headers = retrieve_project_with_http_info(id, opts) data end @@ -96,6 +97,7 @@ def retrieve_project_with_http_info(id, opts = {}) # @option opts [Integer] :minimum_available_mass # @return [ProjectListResponse] def retrieve_projects(opts = {}) + data, _status_code, _headers = retrieve_projects_with_http_info(opts) data end diff --git a/lib/patch_ruby/api_client.rb b/lib/patch_ruby/api_client.rb index f27522c..3ddd410 100644 --- a/lib/patch_ruby/api_client.rb +++ b/lib/patch_ruby/api_client.rb @@ -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/1.11.0" + @user_agent = "patch-ruby/1.11.1" @default_headers = { 'Content-Type' => 'application/json', 'User-Agent' => @user_agent diff --git a/lib/patch_ruby/version.rb b/lib/patch_ruby/version.rb index c3b2552..6713fb9 100644 --- a/lib/patch_ruby/version.rb +++ b/lib/patch_ruby/version.rb @@ -11,5 +11,5 @@ =end module Patch - VERSION = '1.11.0' + VERSION = '1.11.1' end