patch_ruby 1.15.2 → 1.17.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +18 -0
  3. data/Gemfile.lock +3 -2
  4. data/README.md +0 -27
  5. data/lib/patch_ruby/api/estimates_api.rb +28 -10
  6. data/lib/patch_ruby/api/orders_api.rb +10 -7
  7. data/lib/patch_ruby/api/projects_api.rb +4 -4
  8. data/lib/patch_ruby/api/technology_types_api.rb +3 -3
  9. data/lib/patch_ruby/api_client.rb +6 -6
  10. data/lib/patch_ruby/api_error.rb +2 -2
  11. data/lib/patch_ruby/configuration.rb +6 -6
  12. data/lib/patch_ruby/models/allocation.rb +2 -2
  13. data/lib/patch_ruby/models/create_bitcoin_estimate_request.rb +2 -2
  14. data/lib/patch_ruby/models/create_ethereum_estimate_request.rb +2 -2
  15. data/lib/patch_ruby/models/create_flight_estimate_request.rb +2 -2
  16. data/lib/patch_ruby/models/create_mass_estimate_request.rb +7 -7
  17. data/lib/patch_ruby/models/create_order_request.rb +7 -7
  18. data/lib/patch_ruby/models/create_shipping_estimate_request.rb +2 -2
  19. data/lib/patch_ruby/models/create_success_response.rb +3 -7
  20. data/lib/patch_ruby/models/create_vehicle_estimate_request.rb +2 -2
  21. data/lib/patch_ruby/models/error_response.rb +3 -7
  22. data/lib/patch_ruby/models/estimate.rb +5 -2
  23. data/lib/patch_ruby/models/estimate_list_response.rb +2 -2
  24. data/lib/patch_ruby/models/estimate_response.rb +2 -2
  25. data/lib/patch_ruby/models/highlight.rb +2 -2
  26. data/lib/patch_ruby/models/meta_index_object.rb +2 -2
  27. data/lib/patch_ruby/models/order.rb +10 -15
  28. data/lib/patch_ruby/models/order_list_response.rb +2 -2
  29. data/lib/patch_ruby/models/order_response.rb +2 -2
  30. data/lib/patch_ruby/models/parent_technology_type.rb +2 -2
  31. data/lib/patch_ruby/models/photo.rb +2 -2
  32. data/lib/patch_ruby/models/project.rb +9 -6
  33. data/lib/patch_ruby/models/project_list_response.rb +2 -2
  34. data/lib/patch_ruby/models/project_response.rb +2 -2
  35. data/lib/patch_ruby/models/sdg.rb +2 -2
  36. data/lib/patch_ruby/models/standard.rb +2 -2
  37. data/lib/patch_ruby/models/technology_type.rb +2 -2
  38. data/lib/patch_ruby/models/technology_type_list_response.rb +2 -2
  39. data/lib/patch_ruby/version.rb +3 -3
  40. data/lib/patch_ruby.rb +2 -7
  41. data/patch_ruby.gemspec +2 -2
  42. data/spec/api_client_spec.rb +4 -4
  43. data/spec/configuration_spec.rb +2 -2
  44. data/spec/integration/orders_spec.rb +1 -3
  45. data/spec/models/error_response_spec.rb +1 -1
  46. data/spec/spec_helper.rb +2 -2
  47. metadata +25 -50
  48. data/lib/patch_ruby/api/preferences_api.rb +0 -284
  49. data/lib/patch_ruby/models/create_preference_request.rb +0 -233
  50. data/lib/patch_ruby/models/preference.rb +0 -264
  51. data/lib/patch_ruby/models/preference_list_response.rb +0 -273
  52. data/lib/patch_ruby/models/preference_response.rb +0 -257
  53. data/spec/api/preferences_api_spec.rb +0 -82
  54. data/spec/factories/create_preference_requests.rb +0 -5
  55. data/spec/factories/preference_list_responses.rb +0 -8
  56. data/spec/factories/preference_responses.rb +0 -7
  57. data/spec/factories/preferences.rb +0 -7
  58. data/spec/integration/preferences_spec.rb +0 -32
  59. data/spec/models/create_preference_request_spec.rb +0 -47
  60. data/spec/models/preference_list_response_spec.rb +0 -64
  61. data/spec/models/preference_response_spec.rb +0 -58
  62. data/spec/models/preference_spec.rb +0 -58
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3c1030fc4a287d8dc68aefe8ba6e240506b31a22f8066202cf1ada2104159f4f
4
- data.tar.gz: 931c2ff23b6323b3410dbebb6c9f65c1e9e77af9bfb498061b264a6b346c35c3
3
+ metadata.gz: 01aa479a3dfd04193fba725fe8f26d0cb4754ed829dcd55824fe34c9b2b3e608
4
+ data.tar.gz: bf650d916330ce6be13d0794c802b916ba67d9b1867e1a02e4730537c219bb45
5
5
  SHA512:
6
- metadata.gz: 4399537cffce6cf8beafe1050ecf655b23ca1e8229b19c025d411f96346a23cc425f98289ae02addb496ff624b1d8f2e6fc8bf87ccf604c2081653d2be5041e2
7
- data.tar.gz: b8798208043ec070f062cf91c6ec0fb7a4c0a4d0ad6b039b8ca61cd1b6d35d2e732cb6aeea100cc278369661b50aefed046506befa63bf86d7daef498da63ccb
6
+ metadata.gz: 147ff1b520b0629f9e0c293a386a695fc33a77fbbd22149006046e9de8d204cf1891e8631d897d64b83004b79fef9931ba7461a850b5831a4522feec211285fb
7
+ data.tar.gz: e2a1cf40776a588973f778fd73ebe1699e4b0ee767dce56d704aa788a8cc6ae54d50ecd484c303862ef4cd73556c731fa66e204429fd1d500547c845eef13995
data/CHANGELOG.md CHANGED
@@ -5,6 +5,24 @@ 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
+
8
26
  ## [1.15.2] - 2021-11-08
9
27
 
10
28
  ### Added
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- patch_ruby (1.15.2)
4
+ patch_ruby (1.17.1)
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.4)
25
+ ffi (1.15.5)
26
26
  i18n (1.8.10)
27
27
  concurrent-ruby (~> 1.0)
28
28
  jaro_winkler (1.5.4)
@@ -71,6 +71,7 @@ GEM
71
71
 
72
72
  PLATFORMS
73
73
  arm64-darwin-20
74
+ arm64-darwin-21
74
75
  x86_64-darwin-20
75
76
 
76
77
  DEPENDENCIES
data/README.md CHANGED
@@ -188,33 +188,6 @@ Patch::Project.retrieve_projects(type: type)
188
188
  minimum_available_mass = 100
189
189
  Patch::Project.retrieve_projects(minimum_available_mass: minimum_available_mass)
190
190
  ```
191
-
192
- ### Preferences
193
-
194
- Preferences are how you route your orders in Patch. If you don't have a preference, Patch will allocate your order to the least expensive option. If you do have a preference, all of your orders will be sent to that project. You can set your preferences via API, or through the [Patch Dashboard](https://dashboard.patch.io/projects).
195
-
196
- [API Reference](https://docs.patch.io/#/?id=preferences)
197
-
198
- #### Examples
199
-
200
- ```ruby
201
- # Create a preference
202
- project_id = 'pro_test_1234' # Pass in the project_id for your preference
203
- Patch::Preference.create_preference(project_id: project_id)
204
-
205
- # Retrieve a preference
206
- preference_id = 'pre_test_1234' # Pass in the preferences's id
207
- Patch::Preference.retrieve_preference(preference_id)
208
-
209
- # Delete a preference
210
- preference_id = 'pre_test_1234' # Pass in the preferences's id
211
- Patch::Preference.delete_preference(preference_id)
212
-
213
- # Retrieve a list of preferences
214
- page = 1 # Pass in which page of preferences you'd like
215
- Patch::Preference.retrieve_preferences(page: page)
216
- ```
217
-
218
191
  ## Contributing
219
192
 
220
193
  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!
@@ -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: developers@usepatch.com
7
+ Contact: engineering@usepatch.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.2.1
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
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
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
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
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
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
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
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
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
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
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
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
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: developers@usepatch.com
7
+ Contact: engineering@usepatch.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.2.1
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
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
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: developers@usepatch.com
7
+ Contact: engineering@usepatch.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.2.1
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: developers@usepatch.com
7
+ Contact: engineering@usepatch.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.2.1
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: developers@usepatch.com
7
+ Contact: engineering@usepatch.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.2.1
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.15.2"
34
+ @user_agent = "patch-ruby/1.17.1"
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 hearder and query params based on authentication settings.
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
- # use application/json by default
339
- return 'application/json' if content_types.nil? || content_types.empty?
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
@@ -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: developers@usepatch.com
7
+ Contact: engineering@usepatch.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.2.1
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: developers@usepatch.com
7
+ Contact: engineering@usepatch.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.2.1
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: "https://{defaultHost}",
232
+ url: "{defaultUrl}",
233
233
  description: "No description provided",
234
234
  variables: {
235
- defaultHost: {
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: developers@usepatch.com
7
+ Contact: engineering@usepatch.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.2.1
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: developers@usepatch.com
7
+ Contact: engineering@usepatch.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.2.1
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: developers@usepatch.com
7
+ Contact: engineering@usepatch.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.2.1
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: developers@usepatch.com
7
+ Contact: engineering@usepatch.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.2.1
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: developers@usepatch.com
7
+ Contact: engineering@usepatch.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.2.1
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 > 2000000000
105
- invalid_properties.push('invalid value for "mass_g", must be smaller than or equal to 2000000000.')
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 > 2000000000
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 > 2000000000
132
- fail ArgumentError, 'invalid value for "mass_g", must be smaller than or equal to 2000000000.'
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: developers@usepatch.com
7
+ Contact: engineering@usepatch.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.2.1
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 > 2000000000
106
- invalid_properties.push('invalid value for "mass_g", must be smaller than or equal to 2000000000.')
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 > 2000000000
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 > 2000000000
133
- fail ArgumentError, 'invalid value for "mass_g", must be smaller than or equal to 2000000000.'
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: developers@usepatch.com
7
+ Contact: engineering@usepatch.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.2.1
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: developers@usepatch.com
7
+ Contact: engineering@usepatch.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.2.1
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: developers@usepatch.com
7
+ Contact: engineering@usepatch.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.2.1
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: developers@usepatch.com
7
+ Contact: engineering@usepatch.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.2.1
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
 
@@ -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: developers@usepatch.com
7
+ Contact: engineering@usepatch.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.2.1
9
+ OpenAPI Generator version: 5.3.1
10
10
 
11
11
  =end
12
12
 
@@ -108,6 +108,9 @@ module Patch
108
108
  end
109
109
 
110
110
  if attributes.key?(:'order')
111
+ if (value = attributes[:'order']).is_a?(Hash)
112
+ self.order = value
113
+ end
111
114
  self.order = attributes[:'order']
112
115
  end
113
116
  end