patch_ruby 1.24.2 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +19 -0
  3. data/Gemfile.lock +9 -10
  4. data/lib/patch_ruby/api/estimates_api.rb +72 -2
  5. data/lib/patch_ruby/api/order_line_items_api.rb +269 -0
  6. data/lib/patch_ruby/api/orders_api.rb +99 -4
  7. data/lib/patch_ruby/api/projects_api.rb +12 -2
  8. data/lib/patch_ruby/api/technology_types_api.rb +7 -2
  9. data/lib/patch_ruby/api_client.rb +3 -3
  10. data/lib/patch_ruby/api_error.rb +2 -2
  11. data/lib/patch_ruby/configuration.rb +3 -4
  12. data/lib/patch_ruby/models/create_air_shipping_estimate_request.rb +2 -2
  13. data/lib/patch_ruby/models/create_bitcoin_estimate_request.rb +2 -2
  14. data/lib/patch_ruby/models/create_ecommerce_estimate_request.rb +2 -2
  15. data/lib/patch_ruby/models/create_ethereum_estimate_request.rb +2 -2
  16. data/lib/patch_ruby/models/create_flight_estimate_request.rb +2 -2
  17. data/lib/patch_ruby/models/create_hotel_estimate_request.rb +2 -2
  18. data/lib/patch_ruby/models/create_mass_estimate_request.rb +7 -7
  19. data/lib/patch_ruby/models/create_order_line_item_request.rb +443 -0
  20. data/lib/patch_ruby/models/create_order_request.rb +79 -70
  21. data/lib/patch_ruby/models/create_rail_shipping_estimate_request.rb +2 -2
  22. data/lib/patch_ruby/models/create_road_shipping_estimate_request.rb +13 -3
  23. data/lib/patch_ruby/models/create_sea_shipping_estimate_request.rb +2 -2
  24. data/lib/patch_ruby/models/create_shipping_estimate_request.rb +2 -2
  25. data/lib/patch_ruby/models/create_success_response.rb +2 -2
  26. data/lib/patch_ruby/models/create_vehicle_estimate_request.rb +2 -2
  27. data/lib/patch_ruby/models/delete_order_line_item_response.rb +257 -0
  28. data/lib/patch_ruby/models/delete_order_response.rb +257 -0
  29. data/lib/patch_ruby/models/disclaimer.rb +282 -0
  30. data/lib/patch_ruby/models/error_response.rb +2 -2
  31. data/lib/patch_ruby/models/estimate.rb +2 -2
  32. data/lib/patch_ruby/models/estimate_list_response.rb +2 -2
  33. data/lib/patch_ruby/models/estimate_response.rb +2 -2
  34. data/lib/patch_ruby/models/highlight.rb +2 -2
  35. data/lib/patch_ruby/models/inventory.rb +33 -3
  36. data/lib/patch_ruby/models/meta_index_object.rb +2 -2
  37. data/lib/patch_ruby/models/order.rb +17 -121
  38. data/lib/patch_ruby/models/order_issued_to.rb +2 -2
  39. data/lib/patch_ruby/models/{order_inventory.rb → order_line_item.rb} +49 -9
  40. data/lib/patch_ruby/models/{order_inventory_project.rb → order_line_item_project.rb} +7 -7
  41. data/lib/patch_ruby/models/{allocation.rb → order_line_item_response.rb} +33 -40
  42. data/lib/patch_ruby/models/order_list_response.rb +2 -2
  43. data/lib/patch_ruby/models/order_response.rb +2 -2
  44. data/lib/patch_ruby/models/parent_technology_type.rb +2 -2
  45. data/lib/patch_ruby/models/photo.rb +2 -2
  46. data/lib/patch_ruby/models/place_order_request.rb +2 -2
  47. data/lib/patch_ruby/models/project.rb +72 -56
  48. data/lib/patch_ruby/models/project_list_response.rb +2 -2
  49. data/lib/patch_ruby/models/project_response.rb +2 -2
  50. data/lib/patch_ruby/models/sdg.rb +2 -2
  51. data/lib/patch_ruby/models/standard.rb +2 -2
  52. data/lib/patch_ruby/models/technology_type.rb +2 -2
  53. data/lib/patch_ruby/models/technology_type_list_response.rb +2 -2
  54. data/lib/patch_ruby/models/update_order_line_item_request.rb +434 -0
  55. data/lib/patch_ruby/version.rb +3 -3
  56. data/lib/patch_ruby.rb +11 -5
  57. data/patch_ruby.gemspec +2 -2
  58. data/spec/api/order_line_items_api_spec.rb +78 -0
  59. data/spec/api_client_spec.rb +2 -2
  60. data/spec/configuration_spec.rb +2 -2
  61. data/spec/factories/create_order_requests.rb +4 -2
  62. data/spec/factories/orders.rb +5 -4
  63. data/spec/factories/projects.rb +1 -4
  64. data/spec/integration/estimates_spec.rb +1 -1
  65. data/spec/integration/orders_spec.rb +121 -44
  66. data/spec/integration/projects_spec.rb +19 -7
  67. data/spec/models/create_order_request_spec.rb +10 -3
  68. data/spec/models/order_spec.rb +8 -23
  69. data/spec/models/project_spec.rb +1 -4
  70. data/spec/spec_helper.rb +2 -2
  71. metadata +35 -31
  72. data/spec/factories/allocations.rb +0 -7
  73. data/spec/models/allocation_spec.rb +0 -59
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b23fba84f1274a67e893894072fecdbce7dca1d06032e8e633a6a41aad29c1ef
4
- data.tar.gz: 19b0e1d44b7e07b1b8a01c2eb7167e79a4bdaabc2ed6fce1a4494e1ea509a981
3
+ metadata.gz: 16edac907575e6b8068c9477a8f2ff71e8fe93ea57b6b234731d0af872b2547e
4
+ data.tar.gz: c089107261a1a780d3328f5027dcf1606af6d37fb0c3a795f22939b686788eae
5
5
  SHA512:
6
- metadata.gz: 2acf29fa87be15b021490c6bea19c8342f870636dff4ef5afd95b6be64e7885f6ee19e8aea490f50c40e4f09e2dea0706f272f207e4219ecc891ea4ca7c42c49
7
- data.tar.gz: '079afc3add925e55cc64f9752e6f0ebf871ee6b8e7cd94c39b0c4e07eafc5a507c72b3b6bfaa4166eb3fcbc1a389317b26ea9538cfe676c0a1be9d96ae8871f3'
6
+ metadata.gz: e0291704bb71d7d806e4de9e419a7ec0faaea023f4c6c687cf710d998736dd27f00e87b403ed2f448731d0bdf70bc47da3e125e195b34ecfde449a112db757aa
7
+ data.tar.gz: bb882d46219d0be21b226663233efd5a0f2fbdd55e41c5b78f965d940fbe9b71e454883252ee927cb923afe8d9afcbbe0dba0c65888d7c09f33a6eb60fbde036
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
+ ## [2.1.1] - 2023-04-18
9
+
10
+ ### Added
11
+
12
+ - Adds `issuance_type` to `project` responses
13
+ - Adds `disclaimers` to `project` responses
14
+
15
+ ## [2.1.0] - 2023-04-04
16
+
17
+ ### Added
18
+
19
+ - Adds optional `vintage_start_year` and `vintage_end_year` fields to `order` creation
20
+ - Adds optional `vintage_start_year` and `vintage_end_year` fields to `order_line_item` create and update
21
+ - Adds optional `vintage_start_year` and `vintage_end_year` fields to `inventory` creation
22
+ - Adds `vintage_start_year` and `vintage_end_year` fields to `order` response
23
+ - Adds `vintage_start_year` and `vintage_end_year` fields to `order_line_item` response
24
+ - Adds optional `carrier_scac` field to `Patch::Estimate.create_road_shipping_estimate` method
25
+ - Deprecates `Patch::Estimate.create_shipping_estimate` in favor of `Patch::Estimate.create_ecommerce_estimate`
26
+
8
27
  ## [1.24.2] - 2022-08-10
9
28
 
10
29
  ### Added
data/Gemfile.lock CHANGED
@@ -1,33 +1,32 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- patch_ruby (1.24.2)
4
+ patch_ruby (2.1.1)
5
5
  typhoeus (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activesupport (6.1.4.1)
10
+ activesupport (7.0.4.3)
11
11
  concurrent-ruby (~> 1.0, >= 1.0.2)
12
12
  i18n (>= 1.6, < 2)
13
13
  minitest (>= 5.1)
14
14
  tzinfo (~> 2.0)
15
- zeitwerk (~> 2.3)
16
15
  ast (2.4.2)
17
16
  byebug (11.1.3)
18
17
  coderay (1.1.3)
19
- concurrent-ruby (1.1.9)
18
+ concurrent-ruby (1.2.2)
20
19
  diff-lcs (1.4.4)
21
- ethon (0.15.0)
20
+ ethon (0.16.0)
22
21
  ffi (>= 1.15.0)
23
22
  factory_bot (6.2.0)
24
23
  activesupport (>= 5.0.0)
25
24
  ffi (1.15.5)
26
- i18n (1.8.10)
25
+ i18n (1.12.0)
27
26
  concurrent-ruby (~> 1.0)
28
27
  jaro_winkler (1.5.4)
29
28
  method_source (1.0.0)
30
- minitest (5.14.4)
29
+ minitest (5.18.0)
31
30
  parallel (1.20.1)
32
31
  parser (3.0.2.0)
33
32
  ast (~> 2.4.1)
@@ -64,14 +63,14 @@ GEM
64
63
  ruby-progressbar (1.11.0)
65
64
  typhoeus (1.4.0)
66
65
  ethon (>= 0.9.0)
67
- tzinfo (2.0.4)
66
+ tzinfo (2.0.6)
68
67
  concurrent-ruby (~> 1.0)
69
68
  unicode-display_width (1.5.0)
70
- zeitwerk (2.4.2)
71
69
 
72
70
  PLATFORMS
73
71
  arm64-darwin-20
74
72
  arm64-darwin-21
73
+ arm64-darwin-22
75
74
  x86_64-darwin-20
76
75
  x86_64-darwin-21
77
76
  x86_64-linux
@@ -86,4 +85,4 @@ DEPENDENCIES
86
85
  rubocop (~> 0.66.0)
87
86
 
88
87
  BUNDLED WITH
89
- 2.2.22
88
+ 2.3.9
@@ -1,9 +1,9 @@
1
1
  =begin
2
- #Patch API V1
2
+ #Patch API V2
3
3
 
4
4
  #The core API used to integrate with Patch's service
5
5
 
6
- The version of the OpenAPI document: v1
6
+ The version of the OpenAPI document: 2
7
7
  Contact: engineering@usepatch.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 5.3.1
@@ -40,6 +40,7 @@ module Patch
40
40
  # Creates a GLEC air shipping 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.
41
41
  # @param create_air_shipping_estimate_request [CreateAirShippingEstimateRequest]
42
42
  # @param [Hash] opts the optional parameters
43
+ # @option opts [Integer] :patch_version
43
44
  # @return [EstimateResponse]
44
45
  def create_air_shipping_estimate(create_air_shipping_estimate_request = {}, opts = {})
45
46
  _create_air_shipping_estimate_request = Patch::CreateAirShippingEstimateRequest.new(create_air_shipping_estimate_request)
@@ -51,6 +52,7 @@ module Patch
51
52
  # Creates a GLEC air shipping 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.
52
53
  # @param create_air_shipping_estimate_request [CreateAirShippingEstimateRequest]
53
54
  # @param [Hash] opts the optional parameters
55
+ # @option opts [Integer] :patch_version
54
56
  # @return [Array<(EstimateResponse, Integer, Hash)>] EstimateResponse data, response status code and response headers
55
57
  def create_air_shipping_estimate_with_http_info(create_air_shipping_estimate_request, opts = {})
56
58
  if @api_client.config.debugging
@@ -68,6 +70,7 @@ module Patch
68
70
 
69
71
  # header parameters
70
72
  header_params = opts[:header_params] || {}
73
+
71
74
  # HTTP header 'Accept' (if needed)
72
75
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
73
76
  # HTTP header 'Content-Type'
@@ -75,6 +78,8 @@ module Patch
75
78
  if !content_type.nil?
76
79
  header_params['Content-Type'] = content_type
77
80
  end
81
+ header_params['Patch-Version'] = 2
82
+ header_params[:'Patch-Version'] = opts[:'patch_version'] if !opts[:'patch_version'].nil?
78
83
 
79
84
  # form parameters
80
85
  form_params = opts[:form_params] || {}
@@ -109,6 +114,7 @@ module Patch
109
114
  # 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.
110
115
  # @param create_bitcoin_estimate_request [CreateBitcoinEstimateRequest]
111
116
  # @param [Hash] opts the optional parameters
117
+ # @option opts [Integer] :patch_version
112
118
  # @return [EstimateResponse]
113
119
  def create_bitcoin_estimate(create_bitcoin_estimate_request = {}, opts = {})
114
120
  _create_bitcoin_estimate_request = Patch::CreateBitcoinEstimateRequest.new(create_bitcoin_estimate_request)
@@ -120,6 +126,7 @@ module Patch
120
126
  # 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.
121
127
  # @param create_bitcoin_estimate_request [CreateBitcoinEstimateRequest]
122
128
  # @param [Hash] opts the optional parameters
129
+ # @option opts [Integer] :patch_version
123
130
  # @return [Array<(EstimateResponse, Integer, Hash)>] EstimateResponse data, response status code and response headers
124
131
  def create_bitcoin_estimate_with_http_info(create_bitcoin_estimate_request, opts = {})
125
132
  if @api_client.config.debugging
@@ -137,6 +144,7 @@ module Patch
137
144
 
138
145
  # header parameters
139
146
  header_params = opts[:header_params] || {}
147
+
140
148
  # HTTP header 'Accept' (if needed)
141
149
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
142
150
  # HTTP header 'Content-Type'
@@ -144,6 +152,8 @@ module Patch
144
152
  if !content_type.nil?
145
153
  header_params['Content-Type'] = content_type
146
154
  end
155
+ header_params['Patch-Version'] = 2
156
+ header_params[:'Patch-Version'] = opts[:'patch_version'] if !opts[:'patch_version'].nil?
147
157
 
148
158
  # form parameters
149
159
  form_params = opts[:form_params] || {}
@@ -178,6 +188,7 @@ module Patch
178
188
  # Creates a e-commerce estimate for the amount of CO2 to be compensated. An order in the `draft` state may be created based on the parameters.
179
189
  # @param create_ecommerce_estimate_request [CreateEcommerceEstimateRequest]
180
190
  # @param [Hash] opts the optional parameters
191
+ # @option opts [Integer] :patch_version
181
192
  # @return [EstimateResponse]
182
193
  def create_ecommerce_estimate(create_ecommerce_estimate_request = {}, opts = {})
183
194
  _create_ecommerce_estimate_request = Patch::CreateEcommerceEstimateRequest.new(create_ecommerce_estimate_request)
@@ -189,6 +200,7 @@ module Patch
189
200
  # Creates a e-commerce estimate for the amount of CO2 to be compensated. An order in the `draft` state may be created based on the parameters.
190
201
  # @param create_ecommerce_estimate_request [CreateEcommerceEstimateRequest]
191
202
  # @param [Hash] opts the optional parameters
203
+ # @option opts [Integer] :patch_version
192
204
  # @return [Array<(EstimateResponse, Integer, Hash)>] EstimateResponse data, response status code and response headers
193
205
  def create_ecommerce_estimate_with_http_info(create_ecommerce_estimate_request, opts = {})
194
206
  if @api_client.config.debugging
@@ -206,6 +218,7 @@ module Patch
206
218
 
207
219
  # header parameters
208
220
  header_params = opts[:header_params] || {}
221
+
209
222
  # HTTP header 'Accept' (if needed)
210
223
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
211
224
  # HTTP header 'Content-Type'
@@ -213,6 +226,8 @@ module Patch
213
226
  if !content_type.nil?
214
227
  header_params['Content-Type'] = content_type
215
228
  end
229
+ header_params['Patch-Version'] = 2
230
+ header_params[:'Patch-Version'] = opts[:'patch_version'] if !opts[:'patch_version'].nil?
216
231
 
217
232
  # form parameters
218
233
  form_params = opts[:form_params] || {}
@@ -247,6 +262,7 @@ module Patch
247
262
  # 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.
248
263
  # @param create_ethereum_estimate_request [CreateEthereumEstimateRequest]
249
264
  # @param [Hash] opts the optional parameters
265
+ # @option opts [Integer] :patch_version
250
266
  # @return [EstimateResponse]
251
267
  def create_ethereum_estimate(create_ethereum_estimate_request = {}, opts = {})
252
268
  _create_ethereum_estimate_request = Patch::CreateEthereumEstimateRequest.new(create_ethereum_estimate_request)
@@ -258,6 +274,7 @@ module Patch
258
274
  # 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.
259
275
  # @param create_ethereum_estimate_request [CreateEthereumEstimateRequest]
260
276
  # @param [Hash] opts the optional parameters
277
+ # @option opts [Integer] :patch_version
261
278
  # @return [Array<(EstimateResponse, Integer, Hash)>] EstimateResponse data, response status code and response headers
262
279
  def create_ethereum_estimate_with_http_info(create_ethereum_estimate_request, opts = {})
263
280
  if @api_client.config.debugging
@@ -275,6 +292,7 @@ module Patch
275
292
 
276
293
  # header parameters
277
294
  header_params = opts[:header_params] || {}
295
+
278
296
  # HTTP header 'Accept' (if needed)
279
297
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
280
298
  # HTTP header 'Content-Type'
@@ -282,6 +300,8 @@ module Patch
282
300
  if !content_type.nil?
283
301
  header_params['Content-Type'] = content_type
284
302
  end
303
+ header_params['Patch-Version'] = 2
304
+ header_params[:'Patch-Version'] = opts[:'patch_version'] if !opts[:'patch_version'].nil?
285
305
 
286
306
  # form parameters
287
307
  form_params = opts[:form_params] || {}
@@ -316,6 +336,7 @@ module Patch
316
336
  # 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.
317
337
  # @param create_flight_estimate_request [CreateFlightEstimateRequest]
318
338
  # @param [Hash] opts the optional parameters
339
+ # @option opts [Integer] :patch_version
319
340
  # @return [EstimateResponse]
320
341
  def create_flight_estimate(create_flight_estimate_request = {}, opts = {})
321
342
  _create_flight_estimate_request = Patch::CreateFlightEstimateRequest.new(create_flight_estimate_request)
@@ -327,6 +348,7 @@ module Patch
327
348
  # 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.
328
349
  # @param create_flight_estimate_request [CreateFlightEstimateRequest]
329
350
  # @param [Hash] opts the optional parameters
351
+ # @option opts [Integer] :patch_version
330
352
  # @return [Array<(EstimateResponse, Integer, Hash)>] EstimateResponse data, response status code and response headers
331
353
  def create_flight_estimate_with_http_info(create_flight_estimate_request, opts = {})
332
354
  if @api_client.config.debugging
@@ -344,6 +366,7 @@ module Patch
344
366
 
345
367
  # header parameters
346
368
  header_params = opts[:header_params] || {}
369
+
347
370
  # HTTP header 'Accept' (if needed)
348
371
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
349
372
  # HTTP header 'Content-Type'
@@ -351,6 +374,8 @@ module Patch
351
374
  if !content_type.nil?
352
375
  header_params['Content-Type'] = content_type
353
376
  end
377
+ header_params['Patch-Version'] = 2
378
+ header_params[:'Patch-Version'] = opts[:'patch_version'] if !opts[:'patch_version'].nil?
354
379
 
355
380
  # form parameters
356
381
  form_params = opts[:form_params] || {}
@@ -385,6 +410,7 @@ module Patch
385
410
  # 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.
386
411
  # @param create_hotel_estimate_request [CreateHotelEstimateRequest]
387
412
  # @param [Hash] opts the optional parameters
413
+ # @option opts [Integer] :patch_version
388
414
  # @return [EstimateResponse]
389
415
  def create_hotel_estimate(create_hotel_estimate_request = {}, opts = {})
390
416
  _create_hotel_estimate_request = Patch::CreateHotelEstimateRequest.new(create_hotel_estimate_request)
@@ -396,6 +422,7 @@ module Patch
396
422
  # 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.
397
423
  # @param create_hotel_estimate_request [CreateHotelEstimateRequest]
398
424
  # @param [Hash] opts the optional parameters
425
+ # @option opts [Integer] :patch_version
399
426
  # @return [Array<(EstimateResponse, Integer, Hash)>] EstimateResponse data, response status code and response headers
400
427
  def create_hotel_estimate_with_http_info(create_hotel_estimate_request, opts = {})
401
428
  if @api_client.config.debugging
@@ -413,6 +440,7 @@ module Patch
413
440
 
414
441
  # header parameters
415
442
  header_params = opts[:header_params] || {}
443
+
416
444
  # HTTP header 'Accept' (if needed)
417
445
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
418
446
  # HTTP header 'Content-Type'
@@ -420,6 +448,8 @@ module Patch
420
448
  if !content_type.nil?
421
449
  header_params['Content-Type'] = content_type
422
450
  end
451
+ header_params['Patch-Version'] = 2
452
+ header_params[:'Patch-Version'] = opts[:'patch_version'] if !opts[:'patch_version'].nil?
423
453
 
424
454
  # form parameters
425
455
  form_params = opts[:form_params] || {}
@@ -454,6 +484,7 @@ module Patch
454
484
  # 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.
455
485
  # @param create_mass_estimate_request [CreateMassEstimateRequest]
456
486
  # @param [Hash] opts the optional parameters
487
+ # @option opts [Integer] :patch_version
457
488
  # @return [EstimateResponse]
458
489
  def create_mass_estimate(create_mass_estimate_request = {}, opts = {})
459
490
  _create_mass_estimate_request = Patch::CreateMassEstimateRequest.new(create_mass_estimate_request)
@@ -465,6 +496,7 @@ module Patch
465
496
  # 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.
466
497
  # @param create_mass_estimate_request [CreateMassEstimateRequest]
467
498
  # @param [Hash] opts the optional parameters
499
+ # @option opts [Integer] :patch_version
468
500
  # @return [Array<(EstimateResponse, Integer, Hash)>] EstimateResponse data, response status code and response headers
469
501
  def create_mass_estimate_with_http_info(create_mass_estimate_request, opts = {})
470
502
  if @api_client.config.debugging
@@ -482,6 +514,7 @@ module Patch
482
514
 
483
515
  # header parameters
484
516
  header_params = opts[:header_params] || {}
517
+
485
518
  # HTTP header 'Accept' (if needed)
486
519
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
487
520
  # HTTP header 'Content-Type'
@@ -489,6 +522,8 @@ module Patch
489
522
  if !content_type.nil?
490
523
  header_params['Content-Type'] = content_type
491
524
  end
525
+ header_params['Patch-Version'] = 2
526
+ header_params[:'Patch-Version'] = opts[:'patch_version'] if !opts[:'patch_version'].nil?
492
527
 
493
528
  # form parameters
494
529
  form_params = opts[:form_params] || {}
@@ -523,6 +558,7 @@ module Patch
523
558
  # Creates a GLEC rail shipping 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.
524
559
  # @param create_rail_shipping_estimate_request [CreateRailShippingEstimateRequest]
525
560
  # @param [Hash] opts the optional parameters
561
+ # @option opts [Integer] :patch_version
526
562
  # @return [EstimateResponse]
527
563
  def create_rail_shipping_estimate(create_rail_shipping_estimate_request = {}, opts = {})
528
564
  _create_rail_shipping_estimate_request = Patch::CreateRailShippingEstimateRequest.new(create_rail_shipping_estimate_request)
@@ -534,6 +570,7 @@ module Patch
534
570
  # Creates a GLEC rail shipping 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.
535
571
  # @param create_rail_shipping_estimate_request [CreateRailShippingEstimateRequest]
536
572
  # @param [Hash] opts the optional parameters
573
+ # @option opts [Integer] :patch_version
537
574
  # @return [Array<(EstimateResponse, Integer, Hash)>] EstimateResponse data, response status code and response headers
538
575
  def create_rail_shipping_estimate_with_http_info(create_rail_shipping_estimate_request, opts = {})
539
576
  if @api_client.config.debugging
@@ -551,6 +588,7 @@ module Patch
551
588
 
552
589
  # header parameters
553
590
  header_params = opts[:header_params] || {}
591
+
554
592
  # HTTP header 'Accept' (if needed)
555
593
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
556
594
  # HTTP header 'Content-Type'
@@ -558,6 +596,8 @@ module Patch
558
596
  if !content_type.nil?
559
597
  header_params['Content-Type'] = content_type
560
598
  end
599
+ header_params['Patch-Version'] = 2
600
+ header_params[:'Patch-Version'] = opts[:'patch_version'] if !opts[:'patch_version'].nil?
561
601
 
562
602
  # form parameters
563
603
  form_params = opts[:form_params] || {}
@@ -592,6 +632,7 @@ module Patch
592
632
  # Creates a GLEC road shipping 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.
593
633
  # @param create_road_shipping_estimate_request [CreateRoadShippingEstimateRequest]
594
634
  # @param [Hash] opts the optional parameters
635
+ # @option opts [Integer] :patch_version
595
636
  # @return [EstimateResponse]
596
637
  def create_road_shipping_estimate(create_road_shipping_estimate_request = {}, opts = {})
597
638
  _create_road_shipping_estimate_request = Patch::CreateRoadShippingEstimateRequest.new(create_road_shipping_estimate_request)
@@ -603,6 +644,7 @@ module Patch
603
644
  # Creates a GLEC road shipping 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.
604
645
  # @param create_road_shipping_estimate_request [CreateRoadShippingEstimateRequest]
605
646
  # @param [Hash] opts the optional parameters
647
+ # @option opts [Integer] :patch_version
606
648
  # @return [Array<(EstimateResponse, Integer, Hash)>] EstimateResponse data, response status code and response headers
607
649
  def create_road_shipping_estimate_with_http_info(create_road_shipping_estimate_request, opts = {})
608
650
  if @api_client.config.debugging
@@ -620,6 +662,7 @@ module Patch
620
662
 
621
663
  # header parameters
622
664
  header_params = opts[:header_params] || {}
665
+
623
666
  # HTTP header 'Accept' (if needed)
624
667
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
625
668
  # HTTP header 'Content-Type'
@@ -627,6 +670,8 @@ module Patch
627
670
  if !content_type.nil?
628
671
  header_params['Content-Type'] = content_type
629
672
  end
673
+ header_params['Patch-Version'] = 2
674
+ header_params[:'Patch-Version'] = opts[:'patch_version'] if !opts[:'patch_version'].nil?
630
675
 
631
676
  # form parameters
632
677
  form_params = opts[:form_params] || {}
@@ -661,6 +706,7 @@ module Patch
661
706
  # Creates a GLEC sea shipping 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.
662
707
  # @param create_sea_shipping_estimate_request [CreateSeaShippingEstimateRequest]
663
708
  # @param [Hash] opts the optional parameters
709
+ # @option opts [Integer] :patch_version
664
710
  # @return [EstimateResponse]
665
711
  def create_sea_shipping_estimate(create_sea_shipping_estimate_request = {}, opts = {})
666
712
  _create_sea_shipping_estimate_request = Patch::CreateSeaShippingEstimateRequest.new(create_sea_shipping_estimate_request)
@@ -672,6 +718,7 @@ module Patch
672
718
  # Creates a GLEC sea shipping 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.
673
719
  # @param create_sea_shipping_estimate_request [CreateSeaShippingEstimateRequest]
674
720
  # @param [Hash] opts the optional parameters
721
+ # @option opts [Integer] :patch_version
675
722
  # @return [Array<(EstimateResponse, Integer, Hash)>] EstimateResponse data, response status code and response headers
676
723
  def create_sea_shipping_estimate_with_http_info(create_sea_shipping_estimate_request, opts = {})
677
724
  if @api_client.config.debugging
@@ -689,6 +736,7 @@ module Patch
689
736
 
690
737
  # header parameters
691
738
  header_params = opts[:header_params] || {}
739
+
692
740
  # HTTP header 'Accept' (if needed)
693
741
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
694
742
  # HTTP header 'Content-Type'
@@ -696,6 +744,8 @@ module Patch
696
744
  if !content_type.nil?
697
745
  header_params['Content-Type'] = content_type
698
746
  end
747
+ header_params['Patch-Version'] = 2
748
+ header_params[:'Patch-Version'] = opts[:'patch_version'] if !opts[:'patch_version'].nil?
699
749
 
700
750
  # form parameters
701
751
  form_params = opts[:form_params] || {}
@@ -730,6 +780,7 @@ module Patch
730
780
  # Creates a shipping estimate for the amount of CO2 to be compensated. An order in the `draft` state may be created based on the parameters.
731
781
  # @param create_shipping_estimate_request [CreateShippingEstimateRequest]
732
782
  # @param [Hash] opts the optional parameters
783
+ # @option opts [Integer] :patch_version
733
784
  # @return [EstimateResponse]
734
785
  def create_shipping_estimate(create_shipping_estimate_request = {}, opts = {})
735
786
  _create_shipping_estimate_request = Patch::CreateShippingEstimateRequest.new(create_shipping_estimate_request)
@@ -741,6 +792,7 @@ module Patch
741
792
  # Creates a shipping estimate for the amount of CO2 to be compensated. An order in the `draft` state may be created based on the parameters.
742
793
  # @param create_shipping_estimate_request [CreateShippingEstimateRequest]
743
794
  # @param [Hash] opts the optional parameters
795
+ # @option opts [Integer] :patch_version
744
796
  # @return [Array<(EstimateResponse, Integer, Hash)>] EstimateResponse data, response status code and response headers
745
797
  def create_shipping_estimate_with_http_info(create_shipping_estimate_request, opts = {})
746
798
  if @api_client.config.debugging
@@ -758,6 +810,7 @@ module Patch
758
810
 
759
811
  # header parameters
760
812
  header_params = opts[:header_params] || {}
813
+
761
814
  # HTTP header 'Accept' (if needed)
762
815
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
763
816
  # HTTP header 'Content-Type'
@@ -765,6 +818,8 @@ module Patch
765
818
  if !content_type.nil?
766
819
  header_params['Content-Type'] = content_type
767
820
  end
821
+ header_params['Patch-Version'] = 2
822
+ header_params[:'Patch-Version'] = opts[:'patch_version'] if !opts[:'patch_version'].nil?
768
823
 
769
824
  # form parameters
770
825
  form_params = opts[:form_params] || {}
@@ -799,6 +854,7 @@ module Patch
799
854
  # Creates an estimate and calculates the amount of CO2 to be compensated depending on the distance and the vehicle. An order in the `draft` state may be created based on the parameters, linked to the estimate.
800
855
  # @param create_vehicle_estimate_request [CreateVehicleEstimateRequest]
801
856
  # @param [Hash] opts the optional parameters
857
+ # @option opts [Integer] :patch_version
802
858
  # @return [EstimateResponse]
803
859
  def create_vehicle_estimate(create_vehicle_estimate_request = {}, opts = {})
804
860
  _create_vehicle_estimate_request = Patch::CreateVehicleEstimateRequest.new(create_vehicle_estimate_request)
@@ -810,6 +866,7 @@ module Patch
810
866
  # Creates an estimate and calculates the amount of CO2 to be compensated depending on the distance and the vehicle. An order in the `draft` state may be created based on the parameters, linked to the estimate.
811
867
  # @param create_vehicle_estimate_request [CreateVehicleEstimateRequest]
812
868
  # @param [Hash] opts the optional parameters
869
+ # @option opts [Integer] :patch_version
813
870
  # @return [Array<(EstimateResponse, Integer, Hash)>] EstimateResponse data, response status code and response headers
814
871
  def create_vehicle_estimate_with_http_info(create_vehicle_estimate_request, opts = {})
815
872
  if @api_client.config.debugging
@@ -827,6 +884,7 @@ module Patch
827
884
 
828
885
  # header parameters
829
886
  header_params = opts[:header_params] || {}
887
+
830
888
  # HTTP header 'Accept' (if needed)
831
889
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
832
890
  # HTTP header 'Content-Type'
@@ -834,6 +892,8 @@ module Patch
834
892
  if !content_type.nil?
835
893
  header_params['Content-Type'] = content_type
836
894
  end
895
+ header_params['Patch-Version'] = 2
896
+ header_params[:'Patch-Version'] = opts[:'patch_version'] if !opts[:'patch_version'].nil?
837
897
 
838
898
  # form parameters
839
899
  form_params = opts[:form_params] || {}
@@ -868,6 +928,7 @@ module Patch
868
928
  # Retrieves a given estimate and its associated order. You can only retrieve estimates associated with the organization you are querying for.
869
929
  # @param id [String]
870
930
  # @param [Hash] opts the optional parameters
931
+ # @option opts [Integer] :patch_version
871
932
  # @return [EstimateResponse]
872
933
  def retrieve_estimate(id, opts = {})
873
934
 
@@ -879,6 +940,7 @@ module Patch
879
940
  # Retrieves a given estimate and its associated order. You can only retrieve estimates associated with the organization you are querying for.
880
941
  # @param id [String]
881
942
  # @param [Hash] opts the optional parameters
943
+ # @option opts [Integer] :patch_version
882
944
  # @return [Array<(EstimateResponse, Integer, Hash)>] EstimateResponse data, response status code and response headers
883
945
  def retrieve_estimate_with_http_info(id, opts = {})
884
946
  if @api_client.config.debugging
@@ -896,8 +958,11 @@ module Patch
896
958
 
897
959
  # header parameters
898
960
  header_params = opts[:header_params] || {}
961
+
899
962
  # HTTP header 'Accept' (if needed)
900
963
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
964
+ header_params['Patch-Version'] = 2
965
+ header_params[:'Patch-Version'] = opts[:'patch_version'] if !opts[:'patch_version'].nil?
901
966
 
902
967
  # form parameters
903
968
  form_params = opts[:form_params] || {}
@@ -932,6 +997,7 @@ module Patch
932
997
  # Retrieves a list of estimates and their associated orders. You can only retrieve estimates associated with the organization you are querying for.
933
998
  # @param [Hash] opts the optional parameters
934
999
  # @option opts [Integer] :page
1000
+ # @option opts [Integer] :patch_version
935
1001
  # @return [EstimateListResponse]
936
1002
  def retrieve_estimates(opts = {})
937
1003
 
@@ -943,6 +1009,7 @@ module Patch
943
1009
  # Retrieves a list of estimates and their associated orders. You can only retrieve estimates associated with the organization you are querying for.
944
1010
  # @param [Hash] opts the optional parameters
945
1011
  # @option opts [Integer] :page
1012
+ # @option opts [Integer] :patch_version
946
1013
  # @return [Array<(EstimateListResponse, Integer, Hash)>] EstimateListResponse data, response status code and response headers
947
1014
  def retrieve_estimates_with_http_info(opts = {})
948
1015
  if @api_client.config.debugging
@@ -957,8 +1024,11 @@ module Patch
957
1024
 
958
1025
  # header parameters
959
1026
  header_params = opts[:header_params] || {}
1027
+
960
1028
  # HTTP header 'Accept' (if needed)
961
1029
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1030
+ header_params['Patch-Version'] = 2
1031
+ header_params[:'Patch-Version'] = opts[:'patch_version'] if !opts[:'patch_version'].nil?
962
1032
 
963
1033
  # form parameters
964
1034
  form_params = opts[:form_params] || {}