patch_ruby 1.15.1 → 1.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -0
- data/Gemfile.lock +4 -2
- data/README.md +11 -12
- data/lib/patch_ruby/api/estimates_api.rb +28 -10
- data/lib/patch_ruby/api/orders_api.rb +10 -7
- data/lib/patch_ruby/api/projects_api.rb +4 -4
- data/lib/patch_ruby/api/technology_types_api.rb +3 -3
- data/lib/patch_ruby/api_client.rb +6 -6
- data/lib/patch_ruby/api_error.rb +2 -2
- data/lib/patch_ruby/configuration.rb +6 -6
- data/lib/patch_ruby/models/allocation.rb +2 -2
- data/lib/patch_ruby/models/create_bitcoin_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_mass_estimate_request.rb +7 -7
- data/lib/patch_ruby/models/create_order_request.rb +7 -7
- data/lib/patch_ruby/models/create_shipping_estimate_request.rb +2 -2
- data/lib/patch_ruby/models/create_success_response.rb +3 -7
- data/lib/patch_ruby/models/create_vehicle_estimate_request.rb +2 -2
- data/lib/patch_ruby/models/error_response.rb +3 -7
- data/lib/patch_ruby/models/estimate.rb +5 -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/{preference_response.rb → highlight.rb} +40 -33
- data/lib/patch_ruby/models/meta_index_object.rb +2 -2
- data/lib/patch_ruby/models/order.rb +10 -15
- 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/project.rb +29 -9
- 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/version.rb +3 -3
- data/lib/patch_ruby.rb +3 -7
- data/patch_ruby.gemspec +2 -2
- data/spec/api_client_spec.rb +4 -4
- data/spec/configuration_spec.rb +2 -2
- data/spec/integration/orders_spec.rb +1 -3
- data/spec/integration/projects_spec.rb +2 -0
- data/spec/models/error_response_spec.rb +1 -1
- data/spec/spec_helper.rb +2 -2
- metadata +25 -48
- data/lib/patch_ruby/models/create_preference_request.rb +0 -233
- data/lib/patch_ruby/models/preference.rb +0 -264
- data/lib/patch_ruby/models/preference_list_response.rb +0 -273
- data/spec/api/preferences_api_spec.rb +0 -82
- data/spec/factories/create_preference_requests.rb +0 -5
- data/spec/factories/preference_list_responses.rb +0 -8
- data/spec/factories/preference_responses.rb +0 -7
- data/spec/factories/preferences.rb +0 -7
- data/spec/integration/preferences_spec.rb +0 -32
- data/spec/models/create_preference_request_spec.rb +0 -47
- data/spec/models/preference_list_response_spec.rb +0 -64
- data/spec/models/preference_response_spec.rb +0 -58
- data/spec/models/preference_spec.rb +0 -58
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b155fa6ec075f760c3a917898b8e970995c500ff5b3d31488216e018d98418c
|
4
|
+
data.tar.gz: 212fccee52313135c68c8568df430d6bce2e41de56610c84c5badb2b5c7d13e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0af1c92005e56b3a1249cef852bf0cd6005d4e734c9a237bed90c1704f8ef676a725fad3c7d95daee0e83bfbfbaaefedebf7bcc71c69ad3cd7d6d89ae5917f6
|
7
|
+
data.tar.gz: 46bf38a886fd7c4767b3cd5a87794e55b683c0ffeaecd688700b2d9b028460608bff5d355aef0d591807e12208497d9b8cecb13e38c27aba7c81d79e7637fe37
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,30 @@ 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.17.0] - 2022-01-11
|
9
|
+
|
10
|
+
### Changed
|
11
|
+
|
12
|
+
- Set the order allocatations array as optional.
|
13
|
+
|
14
|
+
## [1.16.1] - 2022-01-07
|
15
|
+
|
16
|
+
### Changed
|
17
|
+
|
18
|
+
- No feature changes. Updates the openapi-generator version.
|
19
|
+
|
20
|
+
## [1.16.0] - 2021-12-07
|
21
|
+
|
22
|
+
### Removed
|
23
|
+
|
24
|
+
- Removes the `preferences` endpoints (deprecated)
|
25
|
+
|
26
|
+
## [1.15.2] - 2021-11-08
|
27
|
+
|
28
|
+
### Added
|
29
|
+
|
30
|
+
- Adds highlights to project responses
|
31
|
+
|
8
32
|
## [1.15.1] - 2021-11-04
|
9
33
|
|
10
34
|
### Added
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
patch_ruby (1.
|
4
|
+
patch_ruby (1.17.0)
|
5
5
|
typhoeus (~> 1.0, >= 1.0.1)
|
6
6
|
|
7
7
|
GEM
|
@@ -22,7 +22,7 @@ GEM
|
|
22
22
|
ffi (>= 1.15.0)
|
23
23
|
factory_bot (6.2.0)
|
24
24
|
activesupport (>= 5.0.0)
|
25
|
-
ffi (1.15.
|
25
|
+
ffi (1.15.5)
|
26
26
|
i18n (1.8.10)
|
27
27
|
concurrent-ruby (~> 1.0)
|
28
28
|
jaro_winkler (1.5.4)
|
@@ -70,6 +70,8 @@ GEM
|
|
70
70
|
zeitwerk (2.4.2)
|
71
71
|
|
72
72
|
PLATFORMS
|
73
|
+
arm64-darwin-20
|
74
|
+
arm64-darwin-21
|
73
75
|
x86_64-darwin-20
|
74
76
|
|
75
77
|
DEPENDENCIES
|
data/README.md
CHANGED
@@ -53,9 +53,6 @@ end
|
|
53
53
|
|
54
54
|
In Patch, orders represent a purchase of carbon offsets or negative emissions by mass. Place orders directly if you know the amount of carbon dioxide you would like to sequester. If you do not know how much to purchase, use an estimate.
|
55
55
|
|
56
|
-
In Patch, orders represent a purchase of carbon offsets or negative emissions by mass.
|
57
|
-
Place orders directly if you know the amount of carbon dioxide you would like to sequester.
|
58
|
-
If you do not know how much to purchase, use an estimate.
|
59
56
|
You can also create an order with a maximum desired price, and we'll allocate enough mass to
|
60
57
|
fulfill the order for you.
|
61
58
|
|
@@ -218,7 +215,13 @@ page = 1 # Pass in which page of preferences you'd like
|
|
218
215
|
Patch::Preference.retrieve_preferences(page: page)
|
219
216
|
```
|
220
217
|
|
221
|
-
##
|
218
|
+
## Contributing
|
219
|
+
|
220
|
+
While we value open-source contributions to this SDK, the core of this library is generated programmatically. Complex additions made directly to the library would have to be moved over to our generation code, otherwise they would be overwritten upon the next generated release. Feel free to open a PR as a proof of concept, but know that we will not be able to merge it as-is. We suggest opening an issue first to discuss with us!
|
221
|
+
|
222
|
+
On the other hand, contributions to the README, as well as new test cases are always very welcome!
|
223
|
+
|
224
|
+
### Testing locally
|
222
225
|
|
223
226
|
To build the gem locally, run:
|
224
227
|
|
@@ -232,20 +235,16 @@ This will create a .gem file. To install the local gem:
|
|
232
235
|
gem install patch_ruby-1.x.x.gem
|
233
236
|
```
|
234
237
|
|
235
|
-
|
236
|
-
|
237
|
-
```bash
|
238
|
-
bundle install
|
239
|
-
```
|
238
|
+
### Running tests
|
240
239
|
|
241
|
-
Set up required environment
|
240
|
+
Set up the required environment variable.
|
242
241
|
|
243
242
|
```bash
|
244
243
|
export SANDBOX_API_KEY=<SANDBOX API KEY>
|
245
244
|
```
|
246
245
|
|
247
|
-
|
246
|
+
then run the tests:
|
248
247
|
|
249
248
|
```bash
|
250
|
-
|
249
|
+
make test
|
251
250
|
```
|
@@ -4,9 +4,9 @@
|
|
4
4
|
#The core API used to integrate with Patch's service
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
|
-
Contact:
|
7
|
+
Contact: engineering@usepatch.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -65,7 +65,10 @@ module Patch
|
|
65
65
|
# HTTP header 'Accept' (if needed)
|
66
66
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
67
67
|
# HTTP header 'Content-Type'
|
68
|
-
|
68
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
69
|
+
if !content_type.nil?
|
70
|
+
header_params['Content-Type'] = content_type
|
71
|
+
end
|
69
72
|
|
70
73
|
# form parameters
|
71
74
|
form_params = opts[:form_params] || {}
|
@@ -131,7 +134,10 @@ module Patch
|
|
131
134
|
# HTTP header 'Accept' (if needed)
|
132
135
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
133
136
|
# HTTP header 'Content-Type'
|
134
|
-
|
137
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
138
|
+
if !content_type.nil?
|
139
|
+
header_params['Content-Type'] = content_type
|
140
|
+
end
|
135
141
|
|
136
142
|
# form parameters
|
137
143
|
form_params = opts[:form_params] || {}
|
@@ -197,7 +203,10 @@ module Patch
|
|
197
203
|
# HTTP header 'Accept' (if needed)
|
198
204
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
199
205
|
# HTTP header 'Content-Type'
|
200
|
-
|
206
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
207
|
+
if !content_type.nil?
|
208
|
+
header_params['Content-Type'] = content_type
|
209
|
+
end
|
201
210
|
|
202
211
|
# form parameters
|
203
212
|
form_params = opts[:form_params] || {}
|
@@ -263,7 +272,10 @@ module Patch
|
|
263
272
|
# HTTP header 'Accept' (if needed)
|
264
273
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
265
274
|
# HTTP header 'Content-Type'
|
266
|
-
|
275
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
276
|
+
if !content_type.nil?
|
277
|
+
header_params['Content-Type'] = content_type
|
278
|
+
end
|
267
279
|
|
268
280
|
# form parameters
|
269
281
|
form_params = opts[:form_params] || {}
|
@@ -329,7 +341,10 @@ module Patch
|
|
329
341
|
# HTTP header 'Accept' (if needed)
|
330
342
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
331
343
|
# HTTP header 'Content-Type'
|
332
|
-
|
344
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
345
|
+
if !content_type.nil?
|
346
|
+
header_params['Content-Type'] = content_type
|
347
|
+
end
|
333
348
|
|
334
349
|
# form parameters
|
335
350
|
form_params = opts[:form_params] || {}
|
@@ -395,7 +410,10 @@ module Patch
|
|
395
410
|
# HTTP header 'Accept' (if needed)
|
396
411
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
397
412
|
# HTTP header 'Content-Type'
|
398
|
-
|
413
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
414
|
+
if !content_type.nil?
|
415
|
+
header_params['Content-Type'] = content_type
|
416
|
+
end
|
399
417
|
|
400
418
|
# form parameters
|
401
419
|
form_params = opts[:form_params] || {}
|
@@ -432,7 +450,7 @@ module Patch
|
|
432
450
|
# @param [Hash] opts the optional parameters
|
433
451
|
# @return [EstimateResponse]
|
434
452
|
def retrieve_estimate(id, opts = {})
|
435
|
-
|
453
|
+
|
436
454
|
data, _status_code, _headers = retrieve_estimate_with_http_info(id, opts)
|
437
455
|
data
|
438
456
|
end
|
@@ -496,7 +514,7 @@ module Patch
|
|
496
514
|
# @option opts [Integer] :page
|
497
515
|
# @return [EstimateListResponse]
|
498
516
|
def retrieve_estimates(opts = {})
|
499
|
-
|
517
|
+
|
500
518
|
data, _status_code, _headers = retrieve_estimates_with_http_info(opts)
|
501
519
|
data
|
502
520
|
end
|
@@ -4,9 +4,9 @@
|
|
4
4
|
#The core API used to integrate with Patch's service
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
|
-
Contact:
|
7
|
+
Contact: engineering@usepatch.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -33,7 +33,7 @@ module Patch
|
|
33
33
|
# @param [Hash] opts the optional parameters
|
34
34
|
# @return [OrderResponse]
|
35
35
|
def cancel_order(id, opts = {})
|
36
|
-
|
36
|
+
|
37
37
|
data, _status_code, _headers = cancel_order_with_http_info(id, opts)
|
38
38
|
data
|
39
39
|
end
|
@@ -126,7 +126,10 @@ module Patch
|
|
126
126
|
# HTTP header 'Accept' (if needed)
|
127
127
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
128
128
|
# HTTP header 'Content-Type'
|
129
|
-
|
129
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
130
|
+
if !content_type.nil?
|
131
|
+
header_params['Content-Type'] = content_type
|
132
|
+
end
|
130
133
|
|
131
134
|
# form parameters
|
132
135
|
form_params = opts[:form_params] || {}
|
@@ -163,7 +166,7 @@ module Patch
|
|
163
166
|
# @param [Hash] opts the optional parameters
|
164
167
|
# @return [OrderResponse]
|
165
168
|
def place_order(id, opts = {})
|
166
|
-
|
169
|
+
|
167
170
|
data, _status_code, _headers = place_order_with_http_info(id, opts)
|
168
171
|
data
|
169
172
|
end
|
@@ -227,7 +230,7 @@ module Patch
|
|
227
230
|
# @param [Hash] opts the optional parameters
|
228
231
|
# @return [OrderResponse]
|
229
232
|
def retrieve_order(id, opts = {})
|
230
|
-
|
233
|
+
|
231
234
|
data, _status_code, _headers = retrieve_order_with_http_info(id, opts)
|
232
235
|
data
|
233
236
|
end
|
@@ -294,7 +297,7 @@ module Patch
|
|
294
297
|
# @option opts [String] :metadata_example2
|
295
298
|
# @return [OrderListResponse]
|
296
299
|
def retrieve_orders(opts = {})
|
297
|
-
|
300
|
+
|
298
301
|
data, _status_code, _headers = retrieve_orders_with_http_info(opts)
|
299
302
|
data
|
300
303
|
end
|
@@ -4,9 +4,9 @@
|
|
4
4
|
#The core API used to integrate with Patch's service
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
|
-
Contact:
|
7
|
+
Contact: engineering@usepatch.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -30,7 +30,7 @@ module Patch
|
|
30
30
|
# @param [Hash] opts the optional parameters
|
31
31
|
# @return [ProjectResponse]
|
32
32
|
def retrieve_project(id, opts = {})
|
33
|
-
|
33
|
+
|
34
34
|
data, _status_code, _headers = retrieve_project_with_http_info(id, opts)
|
35
35
|
data
|
36
36
|
end
|
@@ -97,7 +97,7 @@ module Patch
|
|
97
97
|
# @option opts [Integer] :minimum_available_mass
|
98
98
|
# @return [ProjectListResponse]
|
99
99
|
def retrieve_projects(opts = {})
|
100
|
-
|
100
|
+
|
101
101
|
data, _status_code, _headers = retrieve_projects_with_http_info(opts)
|
102
102
|
data
|
103
103
|
end
|
@@ -4,9 +4,9 @@
|
|
4
4
|
#The core API used to integrate with Patch's service
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
|
-
Contact:
|
7
|
+
Contact: engineering@usepatch.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -28,7 +28,7 @@ module Patch
|
|
28
28
|
# @param [Hash] opts the optional parameters
|
29
29
|
# @return [TechnologyTypeListResponse]
|
30
30
|
def retrieve_technology_types(opts = {})
|
31
|
-
|
31
|
+
|
32
32
|
data, _status_code, _headers = retrieve_technology_types_with_http_info(opts)
|
33
33
|
data
|
34
34
|
end
|
@@ -4,9 +4,9 @@
|
|
4
4
|
#The core API used to integrate with Patch's service
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
|
-
Contact:
|
7
|
+
Contact: engineering@usepatch.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -31,7 +31,7 @@ module Patch
|
|
31
31
|
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
|
32
32
|
def initialize(config = Configuration.default)
|
33
33
|
@config = config
|
34
|
-
@user_agent = "patch-ruby/1.
|
34
|
+
@user_agent = "patch-ruby/1.17.0"
|
35
35
|
@default_headers = {
|
36
36
|
'Content-Type' => 'application/json',
|
37
37
|
'User-Agent' => @user_agent
|
@@ -296,7 +296,7 @@ module Patch
|
|
296
296
|
@config.base_url(opts[:operation]) + path
|
297
297
|
end
|
298
298
|
|
299
|
-
# Update
|
299
|
+
# Update header and query params based on authentication settings.
|
300
300
|
#
|
301
301
|
# @param [Hash] header_params Header parameters
|
302
302
|
# @param [Hash] query_params Query parameters
|
@@ -335,8 +335,8 @@ module Patch
|
|
335
335
|
# @param [Array] content_types array for Content-Type
|
336
336
|
# @return [String] the Content-Type header (e.g. application/json)
|
337
337
|
def select_header_content_type(content_types)
|
338
|
-
#
|
339
|
-
return
|
338
|
+
# return nil by default
|
339
|
+
return if content_types.nil? || content_types.empty?
|
340
340
|
# use JSON when present, otherwise use the first one
|
341
341
|
json_content_type = content_types.find { |s| json_mime?(s) }
|
342
342
|
json_content_type || content_types.first
|
data/lib/patch_ruby/api_error.rb
CHANGED
@@ -4,9 +4,9 @@
|
|
4
4
|
#The core API used to integrate with Patch's service
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
|
-
Contact:
|
7
|
+
Contact: engineering@usepatch.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -4,9 +4,9 @@
|
|
4
4
|
#The core API used to integrate with Patch's service
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
|
-
Contact:
|
7
|
+
Contact: engineering@usepatch.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -147,13 +147,13 @@ module Patch
|
|
147
147
|
@server_operation_variables = {}
|
148
148
|
@api_key = {}
|
149
149
|
@api_key_prefix = {}
|
150
|
-
@timeout = 0
|
151
150
|
@client_side_validation = true
|
152
151
|
@verify_ssl = true
|
153
152
|
@verify_ssl_host = true
|
154
153
|
@params_encoding = nil
|
155
154
|
@cert_file = nil
|
156
155
|
@key_file = nil
|
156
|
+
@timeout = 0
|
157
157
|
@debugging = false
|
158
158
|
@inject_format = false
|
159
159
|
@force_ending_format = false
|
@@ -229,12 +229,12 @@ module Patch
|
|
229
229
|
def server_settings
|
230
230
|
[
|
231
231
|
{
|
232
|
-
url: "
|
232
|
+
url: "{defaultUrl}",
|
233
233
|
description: "No description provided",
|
234
234
|
variables: {
|
235
|
-
|
235
|
+
defaultUrl: {
|
236
236
|
description: "No description provided",
|
237
|
-
default_value: "api.patch.io",
|
237
|
+
default_value: "https://api.patch.io",
|
238
238
|
}
|
239
239
|
}
|
240
240
|
}
|
@@ -4,9 +4,9 @@
|
|
4
4
|
#The core API used to integrate with Patch's service
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
|
-
Contact:
|
7
|
+
Contact: engineering@usepatch.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -4,9 +4,9 @@
|
|
4
4
|
#The core API used to integrate with Patch's service
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
|
-
Contact:
|
7
|
+
Contact: engineering@usepatch.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -4,9 +4,9 @@
|
|
4
4
|
#The core API used to integrate with Patch's service
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
|
-
Contact:
|
7
|
+
Contact: engineering@usepatch.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -4,9 +4,9 @@
|
|
4
4
|
#The core API used to integrate with Patch's service
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
|
-
Contact:
|
7
|
+
Contact: engineering@usepatch.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -4,9 +4,9 @@
|
|
4
4
|
#The core API used to integrate with Patch's service
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
|
-
Contact:
|
7
|
+
Contact: engineering@usepatch.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -101,8 +101,8 @@ module Patch
|
|
101
101
|
invalid_properties.push('invalid value for "mass_g", mass_g cannot be nil.')
|
102
102
|
end
|
103
103
|
|
104
|
-
if @mass_g >
|
105
|
-
invalid_properties.push('invalid value for "mass_g", must be smaller than or equal to
|
104
|
+
if @mass_g > 100000000000
|
105
|
+
invalid_properties.push('invalid value for "mass_g", must be smaller than or equal to 100000000000.')
|
106
106
|
end
|
107
107
|
|
108
108
|
if @mass_g < 0
|
@@ -116,7 +116,7 @@ module Patch
|
|
116
116
|
# @return true if the model is valid
|
117
117
|
def valid?
|
118
118
|
return false if @mass_g.nil?
|
119
|
-
return false if @mass_g >
|
119
|
+
return false if @mass_g > 100000000000
|
120
120
|
return false if @mass_g < 0
|
121
121
|
true
|
122
122
|
end
|
@@ -128,8 +128,8 @@ module Patch
|
|
128
128
|
fail ArgumentError, 'mass_g cannot be nil'
|
129
129
|
end
|
130
130
|
|
131
|
-
if mass_g >
|
132
|
-
fail ArgumentError, 'invalid value for "mass_g", must be smaller than or equal to
|
131
|
+
if mass_g > 100000000000
|
132
|
+
fail ArgumentError, 'invalid value for "mass_g", must be smaller than or equal to 100000000000.'
|
133
133
|
end
|
134
134
|
|
135
135
|
if mass_g < 0
|
@@ -4,9 +4,9 @@
|
|
4
4
|
#The core API used to integrate with Patch's service
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
|
-
Contact:
|
7
|
+
Contact: engineering@usepatch.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -102,8 +102,8 @@ module Patch
|
|
102
102
|
# @return Array for valid properties with the reasons
|
103
103
|
def list_invalid_properties
|
104
104
|
invalid_properties = Array.new
|
105
|
-
if !@mass_g.nil? && @mass_g >
|
106
|
-
invalid_properties.push('invalid value for "mass_g", must be smaller than or equal to
|
105
|
+
if !@mass_g.nil? && @mass_g > 100000000000
|
106
|
+
invalid_properties.push('invalid value for "mass_g", must be smaller than or equal to 100000000000.')
|
107
107
|
end
|
108
108
|
|
109
109
|
if !@mass_g.nil? && @mass_g < 0
|
@@ -120,7 +120,7 @@ module Patch
|
|
120
120
|
# Check to see if the all the properties in the model are valid
|
121
121
|
# @return true if the model is valid
|
122
122
|
def valid?
|
123
|
-
return false if !@mass_g.nil? && @mass_g >
|
123
|
+
return false if !@mass_g.nil? && @mass_g > 100000000000
|
124
124
|
return false if !@mass_g.nil? && @mass_g < 0
|
125
125
|
return false if !@total_price_cents_usd.nil? && @total_price_cents_usd < 1
|
126
126
|
true
|
@@ -129,8 +129,8 @@ module Patch
|
|
129
129
|
# Custom attribute writer method with validation
|
130
130
|
# @param [Object] mass_g Value to be assigned
|
131
131
|
def mass_g=(mass_g)
|
132
|
-
if !mass_g.nil? && mass_g >
|
133
|
-
fail ArgumentError, 'invalid value for "mass_g", must be smaller than or equal to
|
132
|
+
if !mass_g.nil? && mass_g > 100000000000
|
133
|
+
fail ArgumentError, 'invalid value for "mass_g", must be smaller than or equal to 100000000000.'
|
134
134
|
end
|
135
135
|
|
136
136
|
if !mass_g.nil? && mass_g < 0
|
@@ -4,9 +4,9 @@
|
|
4
4
|
#The core API used to integrate with Patch's service
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
|
-
Contact:
|
7
|
+
Contact: engineering@usepatch.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -4,9 +4,9 @@
|
|
4
4
|
#The core API used to integrate with Patch's service
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
|
-
Contact:
|
7
|
+
Contact: engineering@usepatch.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -43,6 +43,7 @@ module Patch
|
|
43
43
|
# List of attributes with nullable: true
|
44
44
|
def self.openapi_nullable
|
45
45
|
Set.new([
|
46
|
+
:'error'
|
46
47
|
])
|
47
48
|
end
|
48
49
|
|
@@ -90,10 +91,6 @@ module Patch
|
|
90
91
|
invalid_properties.push('invalid value for "success", success cannot be nil.')
|
91
92
|
end
|
92
93
|
|
93
|
-
if @error.nil?
|
94
|
-
invalid_properties.push('invalid value for "error", error cannot be nil.')
|
95
|
-
end
|
96
|
-
|
97
94
|
invalid_properties
|
98
95
|
end
|
99
96
|
|
@@ -101,7 +98,6 @@ module Patch
|
|
101
98
|
# @return true if the model is valid
|
102
99
|
def valid?
|
103
100
|
return false if @success.nil?
|
104
|
-
return false if @error.nil?
|
105
101
|
true
|
106
102
|
end
|
107
103
|
|
@@ -4,9 +4,9 @@
|
|
4
4
|
#The core API used to integrate with Patch's service
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
|
-
Contact:
|
7
|
+
Contact: engineering@usepatch.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -4,9 +4,9 @@
|
|
4
4
|
#The core API used to integrate with Patch's service
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
|
-
Contact:
|
7
|
+
Contact: engineering@usepatch.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -47,6 +47,7 @@ module Patch
|
|
47
47
|
# List of attributes with nullable: true
|
48
48
|
def self.openapi_nullable
|
49
49
|
Set.new([
|
50
|
+
:'error',
|
50
51
|
:'data'
|
51
52
|
])
|
52
53
|
end
|
@@ -99,10 +100,6 @@ module Patch
|
|
99
100
|
invalid_properties.push('invalid value for "success", success cannot be nil.')
|
100
101
|
end
|
101
102
|
|
102
|
-
if @error.nil?
|
103
|
-
invalid_properties.push('invalid value for "error", error cannot be nil.')
|
104
|
-
end
|
105
|
-
|
106
103
|
invalid_properties
|
107
104
|
end
|
108
105
|
|
@@ -110,7 +107,6 @@ module Patch
|
|
110
107
|
# @return true if the model is valid
|
111
108
|
def valid?
|
112
109
|
return false if @success.nil?
|
113
|
-
return false if @error.nil?
|
114
110
|
true
|
115
111
|
end
|
116
112
|
|