patch_ruby 1.7.0 → 1.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +19 -0
  3. data/Gemfile +1 -2
  4. data/Gemfile.lock +20 -25
  5. data/bin/rspec +29 -0
  6. data/lib/patch_ruby/api/estimates_api.rb +97 -24
  7. data/lib/patch_ruby/api/orders_api.rb +30 -16
  8. data/lib/patch_ruby/api/preferences_api.rb +17 -13
  9. data/lib/patch_ruby/api/projects_api.rb +9 -7
  10. data/lib/patch_ruby/api_client.rb +51 -49
  11. data/lib/patch_ruby/api_error.rb +1 -1
  12. data/lib/patch_ruby/configuration.rb +38 -9
  13. data/lib/patch_ruby/models/allocation.rb +21 -11
  14. data/lib/patch_ruby/models/create_bitcoin_estimate_request.rb +25 -19
  15. data/lib/patch_ruby/models/create_ethereum_estimate_request.rb +269 -0
  16. data/lib/patch_ruby/models/create_flight_estimate_request.rb +281 -0
  17. data/lib/patch_ruby/models/create_mass_estimate_request.rb +22 -13
  18. data/lib/patch_ruby/models/create_order_request.rb +21 -11
  19. data/lib/patch_ruby/models/create_preference_request.rb +21 -11
  20. data/lib/patch_ruby/models/create_shipping_estimate_request.rb +371 -0
  21. data/lib/patch_ruby/models/create_success_response.rb +247 -0
  22. data/lib/patch_ruby/models/create_vehicle_estimate_request.rb +326 -0
  23. data/lib/patch_ruby/models/error_response.rb +22 -13
  24. data/lib/patch_ruby/models/estimate.rb +23 -14
  25. data/lib/patch_ruby/models/estimate_list_response.rb +22 -13
  26. data/lib/patch_ruby/models/estimate_response.rb +22 -13
  27. data/lib/patch_ruby/models/meta_index_object.rb +23 -15
  28. data/lib/patch_ruby/models/order.rb +23 -15
  29. data/lib/patch_ruby/models/order_list_response.rb +22 -13
  30. data/lib/patch_ruby/models/order_response.rb +22 -13
  31. data/lib/patch_ruby/models/photo.rb +21 -11
  32. data/lib/patch_ruby/models/preference.rb +21 -11
  33. data/lib/patch_ruby/models/preference_list_response.rb +22 -13
  34. data/lib/patch_ruby/models/preference_response.rb +22 -13
  35. data/lib/patch_ruby/models/project.rb +24 -17
  36. data/lib/patch_ruby/models/project_list_response.rb +22 -13
  37. data/lib/patch_ruby/models/project_response.rb +22 -13
  38. data/lib/patch_ruby/models/sdg.rb +21 -11
  39. data/lib/patch_ruby/models/standard.rb +21 -11
  40. data/lib/patch_ruby/version.rb +2 -2
  41. data/lib/patch_ruby.rb +6 -1
  42. data/patch_ruby.gemspec +7 -3
  43. data/spec/api_client_spec.rb +34 -13
  44. data/spec/configuration_spec.rb +1 -1
  45. data/spec/integration/estimates_spec.rb +34 -7
  46. data/spec/integration/orders_spec.rb +11 -8
  47. data/spec/integration/preferences_spec.rb +1 -7
  48. data/spec/integration/projects_spec.rb +5 -17
  49. data/spec/models/create_mass_estimate_request_spec.rb +1 -1
  50. data/spec/models/error_response_spec.rb +1 -1
  51. data/spec/models/estimate_list_response_spec.rb +1 -1
  52. data/spec/models/estimate_response_spec.rb +1 -1
  53. data/spec/models/estimate_spec.rb +1 -1
  54. data/spec/models/meta_index_object_spec.rb +1 -1
  55. data/spec/models/order_list_response_spec.rb +1 -1
  56. data/spec/models/order_response_spec.rb +1 -1
  57. data/spec/models/order_spec.rb +1 -1
  58. data/spec/models/preference_list_response_spec.rb +1 -1
  59. data/spec/models/preference_response_spec.rb +1 -1
  60. data/spec/models/project_list_response_spec.rb +1 -1
  61. data/spec/models/project_response_spec.rb +1 -1
  62. data/spec/models/project_spec.rb +1 -1
  63. data/spec/spec_helper.rb +70 -54
  64. metadata +41 -41
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 38a97b1d48e2a6ae9a50749434d02046c07d2c29f719294f62a30f6de392ec32
4
- data.tar.gz: 5c2fdd1a90d0e41f9ada976ad4f7bdbfdbe5926cfc6892f183aee3d241ab8f3f
3
+ metadata.gz: 4a3355ae4c3a9439a8b1db277c94e30c60a3e114e4ab2c5076438ed497e60320
4
+ data.tar.gz: 6805d522a7f5121dc5fde2261572a3adb73284fb5ed0b1af43bb4cd9edec44bb
5
5
  SHA512:
6
- metadata.gz: 22a036eb09ecd66937e745b0403af743bb25c712fa9c485be9dfdf4f2762247e47a0c0df5a21d5701073983af4de64abffd24889415a3f2c5b53ca4b695150e1
7
- data.tar.gz: a183b61d3de80803aae094ab765f97c19d3fd01afec70335b839d3af7796577d320c4141b25ebc0d9c732d820ecd8c8d55c4f3d8b1e7f704cc07b3347fd843ec
6
+ metadata.gz: 612a24be0c31029fb2d8aba73d663da451e733e7a7e3b89fb4d884cf2bd5967e0b0e97a196bb015884755fc2325806d41239ad33665d7bf93d2c16da0c618af1
7
+ data.tar.gz: d1fff96da8f5385e83a03c21a1752597390493752dcce51680ac82b29457928cd5430dc729412ae7712c7cb442b0f3e6f844d7fa17ebded2f51ccb51838ee046
data/CHANGELOG.md CHANGED
@@ -5,6 +5,25 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.10.0] - 2021-08-27
9
+
10
+ ### Added
11
+
12
+ - Adds custom User-Agent header
13
+
14
+ ## [1.9.0] - 2021-08-17
15
+
16
+ ### Added
17
+
18
+ - Add support for querying Orders by `metadata`
19
+ - Added `transaction_value_eth_gwei` as an alternative way to compute transaction level emissions for ethereum
20
+
21
+ ## [1.8.0] - 2021-07-20
22
+
23
+ ### Added
24
+
25
+ - Add support for Ethereum estimates
26
+
8
27
  ## [1.7.0] - 2021-07-14
9
28
 
10
29
  ### Changed
data/Gemfile CHANGED
@@ -5,6 +5,5 @@ gemspec
5
5
  group :development, :test do
6
6
  gem 'rake', '~> 13.0.1'
7
7
  gem 'pry-byebug'
8
- gem 'rubocop'
9
- gem 'factory_bot'
8
+ gem 'rubocop', '~> 0.66.0'
10
9
  end
data/Gemfile.lock CHANGED
@@ -1,36 +1,35 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- patch_ruby (1.7.0)
5
- json (~> 2.1, >= 2.1.0)
4
+ patch_ruby (1.10.1)
6
5
  typhoeus (~> 1.0, >= 1.0.1)
7
6
 
8
7
  GEM
9
8
  remote: https://rubygems.org/
10
9
  specs:
11
- activesupport (6.1.1)
10
+ activesupport (6.1.4.1)
12
11
  concurrent-ruby (~> 1.0, >= 1.0.2)
13
12
  i18n (>= 1.6, < 2)
14
13
  minitest (>= 5.1)
15
14
  tzinfo (~> 2.0)
16
15
  zeitwerk (~> 2.3)
17
- ast (2.4.1)
16
+ ast (2.4.2)
18
17
  byebug (11.1.3)
19
18
  coderay (1.1.3)
20
- concurrent-ruby (1.1.7)
19
+ concurrent-ruby (1.1.9)
21
20
  diff-lcs (1.4.3)
22
21
  ethon (0.14.0)
23
22
  ffi (>= 1.15.0)
24
- factory_bot (6.1.0)
23
+ factory_bot (6.2.0)
25
24
  activesupport (>= 5.0.0)
26
25
  ffi (1.15.3)
27
- i18n (1.8.7)
26
+ i18n (1.8.10)
28
27
  concurrent-ruby (~> 1.0)
29
- json (2.5.1)
28
+ jaro_winkler (1.5.4)
30
29
  method_source (1.0.0)
31
- minitest (5.14.3)
32
- parallel (1.19.2)
33
- parser (2.7.1.4)
30
+ minitest (5.14.4)
31
+ parallel (1.20.1)
32
+ parser (3.0.2.0)
34
33
  ast (~> 2.4.1)
35
34
  pry (0.13.1)
36
35
  coderay (~> 1.1)
@@ -38,10 +37,9 @@ GEM
38
37
  pry-byebug (3.9.0)
39
38
  byebug (~> 11.0)
40
39
  pry (~> 0.13.0)
40
+ psych (4.0.1)
41
41
  rainbow (3.0.0)
42
42
  rake (13.0.1)
43
- regexp_parser (1.7.1)
44
- rexml (3.2.4)
45
43
  rspec (3.9.0)
46
44
  rspec-core (~> 3.9.0)
47
45
  rspec-expectations (~> 3.9.0)
@@ -55,35 +53,32 @@ GEM
55
53
  diff-lcs (>= 1.2.0, < 2.0)
56
54
  rspec-support (~> 3.9.0)
57
55
  rspec-support (3.9.3)
58
- rubocop (0.88.0)
56
+ rubocop (0.66.0)
57
+ jaro_winkler (~> 1.5.1)
59
58
  parallel (~> 1.10)
60
- parser (>= 2.7.1.1)
59
+ parser (>= 2.5, != 2.5.1.1)
60
+ psych (>= 3.1.0)
61
61
  rainbow (>= 2.2.2, < 4.0)
62
- regexp_parser (>= 1.7)
63
- rexml
64
- rubocop-ast (>= 0.1.0, < 1.0)
65
62
  ruby-progressbar (~> 1.7)
66
- unicode-display_width (>= 1.4.0, < 2.0)
67
- rubocop-ast (0.3.0)
68
- parser (>= 2.7.1.4)
69
- ruby-progressbar (1.10.1)
63
+ unicode-display_width (>= 1.4.0, < 1.6)
64
+ ruby-progressbar (1.11.0)
70
65
  typhoeus (1.4.0)
71
66
  ethon (>= 0.9.0)
72
67
  tzinfo (2.0.4)
73
68
  concurrent-ruby (~> 1.0)
74
- unicode-display_width (1.7.0)
69
+ unicode-display_width (1.5.0)
75
70
  zeitwerk (2.4.2)
76
71
 
77
72
  PLATFORMS
78
73
  ruby
79
74
 
80
75
  DEPENDENCIES
81
- factory_bot
76
+ factory_bot (~> 6.2)
82
77
  patch_ruby!
83
78
  pry-byebug
84
79
  rake (~> 13.0.1)
85
80
  rspec (~> 3.6, >= 3.6.0)
86
- rubocop
81
+ rubocop (~> 0.66.0)
87
82
 
88
83
  BUNDLED WITH
89
84
  2.2.14
data/bin/rspec ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'rspec' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "pathname"
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
+ Pathname.new(__FILE__).realpath)
14
+
15
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
16
+
17
+ if File.file?(bundle_binstub)
18
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
+ load(bundle_binstub)
20
+ else
21
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
+ end
24
+ end
25
+
26
+ require "rubygems"
27
+ require "bundler/setup"
28
+
29
+ load Gem.bin_path("rspec-core", "rspec")
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: v1
7
7
  Contact: developers@usepatch.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
9
+ OpenAPI Generator version: 5.2.1
10
10
 
11
11
  =end
12
12
 
@@ -16,6 +16,7 @@ module Patch
16
16
  class EstimatesApi
17
17
  OPERATIONS = [
18
18
  :create_bitcoin_estimate,
19
+ :create_ethereum_estimate,
19
20
  :create_flight_estimate,
20
21
  :create_mass_estimate,
21
22
  :create_shipping_estimate,
@@ -30,7 +31,7 @@ module Patch
30
31
  @api_client = api_client
31
32
  end
32
33
  # Create a bitcoin estimate given a timestamp and transaction value
33
- # Creates a bitcoin estimate for the amount of CO2 to be compensated. An order in the `draft` state may be created based on the parameters, linked to the estimate.
34
+ # Creates a bitcoin estimate for the amount of CO2 to be compensated. An order in the `draft` state may be created based on the parameters, linked to the estimate.
34
35
  # @param create_bitcoin_estimate_request [CreateBitcoinEstimateRequest]
35
36
  # @param [Hash] opts the optional parameters
36
37
  # @return [EstimateResponse]
@@ -40,7 +41,7 @@ module Patch
40
41
  end
41
42
 
42
43
  # Create a bitcoin estimate given a timestamp and transaction value
43
- # Creates a bitcoin estimate for the amount of CO2 to be compensated. An order in the &#x60;draft&#x60; state may be created based on the parameters, linked to the estimate.
44
+ # Creates a bitcoin estimate for the amount of CO2 to be compensated. An order in the &#x60;draft&#x60; state may be created based on the parameters, linked to the estimate.
44
45
  # @param create_bitcoin_estimate_request [CreateBitcoinEstimateRequest]
45
46
  # @param [Hash] opts the optional parameters
46
47
  # @return [Array<(EstimateResponse, Integer, Hash)>] EstimateResponse data, response status code and response headers
@@ -69,15 +70,16 @@ module Patch
69
70
  form_params = opts[:form_params] || {}
70
71
 
71
72
  # http body (model)
72
- post_body = opts[:body] || @api_client.object_to_http_body(create_bitcoin_estimate_request)
73
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_bitcoin_estimate_request)
73
74
 
74
75
  # return_type
75
- return_type = opts[:return_type] || 'EstimateResponse'
76
+ return_type = opts[:debug_return_type] || 'EstimateResponse'
76
77
 
77
78
  # auth_names
78
- auth_names = opts[:auth_names] || ['bearer_auth']
79
+ auth_names = opts[:debug_auth_names] || ['bearer_auth']
79
80
 
80
81
  new_options = opts.merge(
82
+ :operation => :"EstimatesApi.create_bitcoin_estimate",
81
83
  :header_params => header_params,
82
84
  :query_params => query_params,
83
85
  :form_params => form_params,
@@ -93,6 +95,71 @@ module Patch
93
95
  return data, status_code, headers
94
96
  end
95
97
 
98
+ # Create an ethereum estimate given a timestamp and gas used
99
+ # Creates an ethereum estimate for the amount of CO2 to be compensated. An order in the `draft` state may be created based on the parameters, linked to the estimate.
100
+ # @param create_ethereum_estimate_request [CreateEthereumEstimateRequest]
101
+ # @param [Hash] opts the optional parameters
102
+ # @return [EstimateResponse]
103
+ def create_ethereum_estimate(create_ethereum_estimate_request, opts = {})
104
+ data, _status_code, _headers = create_ethereum_estimate_with_http_info(create_ethereum_estimate_request, opts)
105
+ data
106
+ end
107
+
108
+ # Create an ethereum estimate given a timestamp and gas used
109
+ # Creates an ethereum estimate for the amount of CO2 to be compensated. An order in the &#x60;draft&#x60; state may be created based on the parameters, linked to the estimate.
110
+ # @param create_ethereum_estimate_request [CreateEthereumEstimateRequest]
111
+ # @param [Hash] opts the optional parameters
112
+ # @return [Array<(EstimateResponse, Integer, Hash)>] EstimateResponse data, response status code and response headers
113
+ def create_ethereum_estimate_with_http_info(create_ethereum_estimate_request, opts = {})
114
+ if @api_client.config.debugging
115
+ @api_client.config.logger.debug 'Calling API: EstimatesApi.create_ethereum_estimate ...'
116
+ end
117
+ # verify the required parameter 'create_ethereum_estimate_request' is set
118
+ if @api_client.config.client_side_validation && create_ethereum_estimate_request.nil?
119
+ fail ArgumentError, "Missing the required parameter 'create_ethereum_estimate_request' when calling EstimatesApi.create_ethereum_estimate"
120
+ end
121
+ # resource path
122
+ local_var_path = '/v1/estimates/crypto/eth'
123
+
124
+ # query parameters
125
+ query_params = opts[:query_params] || {}
126
+
127
+ # header parameters
128
+ header_params = opts[:header_params] || {}
129
+ # HTTP header 'Accept' (if needed)
130
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
131
+ # HTTP header 'Content-Type'
132
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
133
+
134
+ # form parameters
135
+ form_params = opts[:form_params] || {}
136
+
137
+ # http body (model)
138
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_ethereum_estimate_request)
139
+
140
+ # return_type
141
+ return_type = opts[:debug_return_type] || 'EstimateResponse'
142
+
143
+ # auth_names
144
+ auth_names = opts[:debug_auth_names] || ['bearer_auth']
145
+
146
+ new_options = opts.merge(
147
+ :operation => :"EstimatesApi.create_ethereum_estimate",
148
+ :header_params => header_params,
149
+ :query_params => query_params,
150
+ :form_params => form_params,
151
+ :body => post_body,
152
+ :auth_names => auth_names,
153
+ :return_type => return_type
154
+ )
155
+
156
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
157
+ if @api_client.config.debugging
158
+ @api_client.config.logger.debug "API called: EstimatesApi#create_ethereum_estimate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
159
+ end
160
+ return data, status_code, headers
161
+ end
162
+
96
163
  # Create a flight estimate given the distance traveled in meters
97
164
  # Creates a flight estimate for the amount of CO2 to be compensated. An order in the `draft` state may be created based on the parameters, linked to the estimate.
98
165
  # @param create_flight_estimate_request [CreateFlightEstimateRequest]
@@ -133,15 +200,16 @@ module Patch
133
200
  form_params = opts[:form_params] || {}
134
201
 
135
202
  # http body (model)
136
- post_body = opts[:body] || @api_client.object_to_http_body(create_flight_estimate_request)
203
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_flight_estimate_request)
137
204
 
138
205
  # return_type
139
- return_type = opts[:return_type] || 'EstimateResponse'
206
+ return_type = opts[:debug_return_type] || 'EstimateResponse'
140
207
 
141
208
  # auth_names
142
- auth_names = opts[:auth_names] || ['bearer_auth']
209
+ auth_names = opts[:debug_auth_names] || ['bearer_auth']
143
210
 
144
211
  new_options = opts.merge(
212
+ :operation => :"EstimatesApi.create_flight_estimate",
145
213
  :header_params => header_params,
146
214
  :query_params => query_params,
147
215
  :form_params => form_params,
@@ -197,15 +265,16 @@ module Patch
197
265
  form_params = opts[:form_params] || {}
198
266
 
199
267
  # http body (model)
200
- post_body = opts[:body] || @api_client.object_to_http_body(create_mass_estimate_request)
268
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_mass_estimate_request)
201
269
 
202
270
  # return_type
203
- return_type = opts[:return_type] || 'EstimateResponse'
271
+ return_type = opts[:debug_return_type] || 'EstimateResponse'
204
272
 
205
273
  # auth_names
206
- auth_names = opts[:auth_names] || ['bearer_auth']
274
+ auth_names = opts[:debug_auth_names] || ['bearer_auth']
207
275
 
208
276
  new_options = opts.merge(
277
+ :operation => :"EstimatesApi.create_mass_estimate",
209
278
  :header_params => header_params,
210
279
  :query_params => query_params,
211
280
  :form_params => form_params,
@@ -261,15 +330,16 @@ module Patch
261
330
  form_params = opts[:form_params] || {}
262
331
 
263
332
  # http body (model)
264
- post_body = opts[:body] || @api_client.object_to_http_body(create_shipping_estimate_request)
333
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_shipping_estimate_request)
265
334
 
266
335
  # return_type
267
- return_type = opts[:return_type] || 'EstimateResponse'
336
+ return_type = opts[:debug_return_type] || 'EstimateResponse'
268
337
 
269
338
  # auth_names
270
- auth_names = opts[:auth_names] || ['bearer_auth']
339
+ auth_names = opts[:debug_auth_names] || ['bearer_auth']
271
340
 
272
341
  new_options = opts.merge(
342
+ :operation => :"EstimatesApi.create_shipping_estimate",
273
343
  :header_params => header_params,
274
344
  :query_params => query_params,
275
345
  :form_params => form_params,
@@ -325,15 +395,16 @@ module Patch
325
395
  form_params = opts[:form_params] || {}
326
396
 
327
397
  # http body (model)
328
- post_body = opts[:body] || @api_client.object_to_http_body(create_vehicle_estimate_request)
398
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_vehicle_estimate_request)
329
399
 
330
400
  # return_type
331
- return_type = opts[:return_type] || 'EstimateResponse'
401
+ return_type = opts[:debug_return_type] || 'EstimateResponse'
332
402
 
333
403
  # auth_names
334
- auth_names = opts[:auth_names] || ['bearer_auth']
404
+ auth_names = opts[:debug_auth_names] || ['bearer_auth']
335
405
 
336
406
  new_options = opts.merge(
407
+ :operation => :"EstimatesApi.create_vehicle_estimate",
337
408
  :header_params => header_params,
338
409
  :query_params => query_params,
339
410
  :form_params => form_params,
@@ -387,15 +458,16 @@ module Patch
387
458
  form_params = opts[:form_params] || {}
388
459
 
389
460
  # http body (model)
390
- post_body = opts[:body]
461
+ post_body = opts[:debug_body]
391
462
 
392
463
  # return_type
393
- return_type = opts[:return_type] || 'EstimateResponse'
464
+ return_type = opts[:debug_return_type] || 'EstimateResponse'
394
465
 
395
466
  # auth_names
396
- auth_names = opts[:auth_names] || ['bearer_auth']
467
+ auth_names = opts[:debug_auth_names] || ['bearer_auth']
397
468
 
398
469
  new_options = opts.merge(
470
+ :operation => :"EstimatesApi.retrieve_estimate",
399
471
  :header_params => header_params,
400
472
  :query_params => query_params,
401
473
  :form_params => form_params,
@@ -446,15 +518,16 @@ module Patch
446
518
  form_params = opts[:form_params] || {}
447
519
 
448
520
  # http body (model)
449
- post_body = opts[:body]
521
+ post_body = opts[:debug_body]
450
522
 
451
523
  # return_type
452
- return_type = opts[:return_type] || 'EstimateListResponse'
524
+ return_type = opts[:debug_return_type] || 'EstimateListResponse'
453
525
 
454
526
  # auth_names
455
- auth_names = opts[:auth_names] || ['bearer_auth']
527
+ auth_names = opts[:debug_auth_names] || ['bearer_auth']
456
528
 
457
529
  new_options = opts.merge(
530
+ :operation => :"EstimatesApi.retrieve_estimates",
458
531
  :header_params => header_params,
459
532
  :query_params => query_params,
460
533
  :form_params => form_params,
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: v1
7
7
  Contact: developers@usepatch.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
9
+ OpenAPI Generator version: 5.2.1
10
10
 
11
11
  =end
12
12
 
@@ -65,15 +65,16 @@ module Patch
65
65
  form_params = opts[:form_params] || {}
66
66
 
67
67
  # http body (model)
68
- post_body = opts[:body]
68
+ post_body = opts[:debug_body]
69
69
 
70
70
  # return_type
71
- return_type = opts[:return_type] || 'OrderResponse'
71
+ return_type = opts[:debug_return_type] || 'OrderResponse'
72
72
 
73
73
  # auth_names
74
- auth_names = opts[:auth_names] || ['bearer_auth']
74
+ auth_names = opts[:debug_auth_names] || ['bearer_auth']
75
75
 
76
76
  new_options = opts.merge(
77
+ :operation => :"OrdersApi.cancel_order",
77
78
  :header_params => header_params,
78
79
  :query_params => query_params,
79
80
  :form_params => form_params,
@@ -129,15 +130,16 @@ module Patch
129
130
  form_params = opts[:form_params] || {}
130
131
 
131
132
  # http body (model)
132
- post_body = opts[:body] || @api_client.object_to_http_body(create_order_request)
133
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_order_request)
133
134
 
134
135
  # return_type
135
- return_type = opts[:return_type] || 'OrderResponse'
136
+ return_type = opts[:debug_return_type] || 'OrderResponse'
136
137
 
137
138
  # auth_names
138
- auth_names = opts[:auth_names] || ['bearer_auth']
139
+ auth_names = opts[:debug_auth_names] || ['bearer_auth']
139
140
 
140
141
  new_options = opts.merge(
142
+ :operation => :"OrdersApi.create_order",
141
143
  :header_params => header_params,
142
144
  :query_params => query_params,
143
145
  :form_params => form_params,
@@ -191,15 +193,16 @@ module Patch
191
193
  form_params = opts[:form_params] || {}
192
194
 
193
195
  # http body (model)
194
- post_body = opts[:body]
196
+ post_body = opts[:debug_body]
195
197
 
196
198
  # return_type
197
- return_type = opts[:return_type] || 'OrderResponse'
199
+ return_type = opts[:debug_return_type] || 'OrderResponse'
198
200
 
199
201
  # auth_names
200
- auth_names = opts[:auth_names] || ['bearer_auth']
202
+ auth_names = opts[:debug_auth_names] || ['bearer_auth']
201
203
 
202
204
  new_options = opts.merge(
205
+ :operation => :"OrdersApi.place_order",
203
206
  :header_params => header_params,
204
207
  :query_params => query_params,
205
208
  :form_params => form_params,
@@ -253,15 +256,16 @@ module Patch
253
256
  form_params = opts[:form_params] || {}
254
257
 
255
258
  # http body (model)
256
- post_body = opts[:body]
259
+ post_body = opts[:debug_body]
257
260
 
258
261
  # return_type
259
- return_type = opts[:return_type] || 'OrderResponse'
262
+ return_type = opts[:debug_return_type] || 'OrderResponse'
260
263
 
261
264
  # auth_names
262
- auth_names = opts[:auth_names] || ['bearer_auth']
265
+ auth_names = opts[:debug_auth_names] || ['bearer_auth']
263
266
 
264
267
  new_options = opts.merge(
268
+ :operation => :"OrdersApi.retrieve_order",
265
269
  :header_params => header_params,
266
270
  :query_params => query_params,
267
271
  :form_params => form_params,
@@ -281,6 +285,9 @@ module Patch
281
285
  # Retrieves a list of orders and its allocation offsets or negative emissions. You can only retrieve orders associated with the organization you are querying for.
282
286
  # @param [Hash] opts the optional parameters
283
287
  # @option opts [Integer] :page
288
+ # @option opts [String] :metadata
289
+ # @option opts [String] :metadata_example1
290
+ # @option opts [String] :metadata_example2
284
291
  # @return [OrderListResponse]
285
292
  def retrieve_orders(opts = {})
286
293
  data, _status_code, _headers = retrieve_orders_with_http_info(opts)
@@ -291,6 +298,9 @@ module Patch
291
298
  # Retrieves a list of orders and its allocation offsets or negative emissions. You can only retrieve orders associated with the organization you are querying for.
292
299
  # @param [Hash] opts the optional parameters
293
300
  # @option opts [Integer] :page
301
+ # @option opts [String] :metadata
302
+ # @option opts [String] :metadata_example1
303
+ # @option opts [String] :metadata_example2
294
304
  # @return [Array<(OrderListResponse, Integer, Hash)>] OrderListResponse data, response status code and response headers
295
305
  def retrieve_orders_with_http_info(opts = {})
296
306
  if @api_client.config.debugging
@@ -302,6 +312,9 @@ module Patch
302
312
  # query parameters
303
313
  query_params = opts[:query_params] || {}
304
314
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
315
+ query_params[:'metadata'] = opts[:'metadata'] if !opts[:'metadata'].nil?
316
+ query_params[:'metadata[example1]'] = opts[:'metadata_example1'] if !opts[:'metadata_example1'].nil?
317
+ query_params[:'metadata[example2]'] = opts[:'metadata_example2'] if !opts[:'metadata_example2'].nil?
305
318
 
306
319
  # header parameters
307
320
  header_params = opts[:header_params] || {}
@@ -312,15 +325,16 @@ module Patch
312
325
  form_params = opts[:form_params] || {}
313
326
 
314
327
  # http body (model)
315
- post_body = opts[:body]
328
+ post_body = opts[:debug_body]
316
329
 
317
330
  # return_type
318
- return_type = opts[:return_type] || 'OrderListResponse'
331
+ return_type = opts[:debug_return_type] || 'OrderListResponse'
319
332
 
320
333
  # auth_names
321
- auth_names = opts[:auth_names] || ['bearer_auth']
334
+ auth_names = opts[:debug_auth_names] || ['bearer_auth']
322
335
 
323
336
  new_options = opts.merge(
337
+ :operation => :"OrdersApi.retrieve_orders",
324
338
  :header_params => header_params,
325
339
  :query_params => query_params,
326
340
  :form_params => form_params,