patch_ruby 1.24.2 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/patch_ruby/api/estimates_api.rb +72 -2
- data/lib/patch_ruby/api/order_line_items_api.rb +269 -0
- data/lib/patch_ruby/api/orders_api.rb +99 -4
- data/lib/patch_ruby/api/projects_api.rb +12 -2
- data/lib/patch_ruby/api/technology_types_api.rb +7 -2
- data/lib/patch_ruby/api_client.rb +3 -3
- data/lib/patch_ruby/api_error.rb +2 -2
- data/lib/patch_ruby/configuration.rb +2 -2
- data/lib/patch_ruby/models/create_air_shipping_estimate_request.rb +2 -2
- data/lib/patch_ruby/models/create_bitcoin_estimate_request.rb +2 -2
- data/lib/patch_ruby/models/create_ecommerce_estimate_request.rb +2 -2
- data/lib/patch_ruby/models/create_ethereum_estimate_request.rb +2 -2
- data/lib/patch_ruby/models/create_flight_estimate_request.rb +2 -2
- data/lib/patch_ruby/models/create_hotel_estimate_request.rb +2 -2
- data/lib/patch_ruby/models/create_mass_estimate_request.rb +2 -2
- data/lib/patch_ruby/models/create_order_line_item_request.rb +375 -0
- data/lib/patch_ruby/models/create_order_request.rb +8 -67
- data/lib/patch_ruby/models/create_rail_shipping_estimate_request.rb +2 -2
- data/lib/patch_ruby/models/create_road_shipping_estimate_request.rb +2 -2
- data/lib/patch_ruby/models/create_sea_shipping_estimate_request.rb +2 -2
- data/lib/patch_ruby/models/create_shipping_estimate_request.rb +2 -2
- data/lib/patch_ruby/models/create_success_response.rb +2 -2
- data/lib/patch_ruby/models/create_vehicle_estimate_request.rb +2 -2
- data/lib/patch_ruby/models/delete_order_line_item_response.rb +257 -0
- data/lib/patch_ruby/models/delete_order_response.rb +257 -0
- data/lib/patch_ruby/models/error_response.rb +2 -2
- data/lib/patch_ruby/models/estimate.rb +2 -2
- data/lib/patch_ruby/models/estimate_list_response.rb +2 -2
- data/lib/patch_ruby/models/estimate_response.rb +2 -2
- data/lib/patch_ruby/models/highlight.rb +2 -2
- data/lib/patch_ruby/models/inventory.rb +2 -2
- data/lib/patch_ruby/models/meta_index_object.rb +2 -2
- data/lib/patch_ruby/models/order.rb +11 -115
- data/lib/patch_ruby/models/order_issued_to.rb +2 -2
- data/lib/patch_ruby/models/{order_inventory.rb → order_line_item.rb} +19 -9
- data/lib/patch_ruby/models/{order_inventory_project.rb → order_line_item_project.rb} +7 -7
- data/lib/patch_ruby/models/{allocation.rb → order_line_item_response.rb} +33 -40
- data/lib/patch_ruby/models/order_list_response.rb +2 -2
- data/lib/patch_ruby/models/order_response.rb +2 -2
- data/lib/patch_ruby/models/parent_technology_type.rb +2 -2
- data/lib/patch_ruby/models/photo.rb +2 -2
- data/lib/patch_ruby/models/place_order_request.rb +2 -2
- data/lib/patch_ruby/models/project.rb +13 -53
- data/lib/patch_ruby/models/project_list_response.rb +2 -2
- data/lib/patch_ruby/models/project_response.rb +2 -2
- data/lib/patch_ruby/models/sdg.rb +2 -2
- data/lib/patch_ruby/models/standard.rb +2 -2
- data/lib/patch_ruby/models/technology_type.rb +2 -2
- data/lib/patch_ruby/models/technology_type_list_response.rb +2 -2
- data/lib/patch_ruby/models/update_order_line_item_request.rb +366 -0
- data/lib/patch_ruby/version.rb +3 -3
- data/lib/patch_ruby.rb +10 -5
- data/patch_ruby.gemspec +2 -2
- data/spec/api/order_line_items_api_spec.rb +78 -0
- data/spec/api_client_spec.rb +2 -2
- data/spec/configuration_spec.rb +2 -2
- data/spec/factories/create_order_requests.rb +4 -2
- data/spec/factories/orders.rb +5 -4
- data/spec/factories/projects.rb +1 -4
- data/spec/integration/orders_spec.rb +85 -44
- data/spec/integration/projects_spec.rb +2 -4
- data/spec/models/create_order_request_spec.rb +10 -3
- data/spec/models/order_spec.rb +8 -23
- data/spec/models/project_spec.rb +1 -4
- data/spec/spec_helper.rb +2 -2
- metadata +34 -31
- data/spec/factories/allocations.rb +0 -7
- data/spec/models/allocation_spec.rb +0 -59
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ffab52fb27f71cbe7b98bf78cd0c73271c058bcf0d6f3c38b9df718f6816a802
|
4
|
+
data.tar.gz: 519f529a4d608fde6517907961fe4b38398594aaa2ebd8a6b54d4b39d8e2da99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da969c2cfe5217621910a4629945cf47cc29473394010fecdc53ad9bcf94c747ae677f12de8fd9e24c44bb1b2969e23167163dc4e8085dcb9572931794aa421c
|
7
|
+
data.tar.gz: 899e11a3911ed3102353c7d4753ac5cfe522f0dd9448a66e48f7e04f66f442c70f2bcaf8514b5faa86425c5db1cb8905350536290017656e2d9a5786dd2c1ba3
|
data/Gemfile.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
=begin
|
2
|
-
#Patch API
|
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:
|
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] || {}
|