patch_ruby 2.1.1 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 16edac907575e6b8068c9477a8f2ff71e8fe93ea57b6b234731d0af872b2547e
4
- data.tar.gz: c089107261a1a780d3328f5027dcf1606af6d37fb0c3a795f22939b686788eae
3
+ metadata.gz: 04f58db82f8abcbae1a77f0a0e9d942e7b4e9f489cc9510393d78d1a504ef643
4
+ data.tar.gz: 449a7f27b2828110e9692cbccdf4fc1a3b34acbb55228c7940ba931b92a9c896
5
5
  SHA512:
6
- metadata.gz: e0291704bb71d7d806e4de9e419a7ec0faaea023f4c6c687cf710d998736dd27f00e87b403ed2f448731d0bdf70bc47da3e125e195b34ecfde449a112db757aa
7
- data.tar.gz: bb882d46219d0be21b226663233efd5a0f2fbdd55e41c5b78f965d940fbe9b71e454883252ee927cb923afe8d9afcbbe0dba0c65888d7c09f33a6eb60fbde036
6
+ metadata.gz: 6c4b4cd548a77b1a0c6bba32698e95b2fac394d04304190c0699b4ab8bf295c9d46e71960e2bccd87da9354ea1a8748298db6a90f35297829e3508c541ce9556
7
+ data.tar.gz: 7c76591eddd59c6a33a6b60c92e739406b0c5845e421b881c7d53631e827e7b073961b713ae7bea6fb190437146de54e4971631aee6d2d1bb5423ca5a4f52379
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- patch_ruby (2.1.1)
4
+ patch_ruby (2.3.0)
5
5
  typhoeus (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
@@ -21,10 +21,10 @@ GEM
21
21
  ffi (>= 1.15.0)
22
22
  factory_bot (6.2.0)
23
23
  activesupport (>= 5.0.0)
24
- ffi (1.15.5)
24
+ ffi (1.17.1)
25
25
  i18n (1.12.0)
26
26
  concurrent-ruby (~> 1.0)
27
- jaro_winkler (1.5.4)
27
+ jaro_winkler (1.5.6)
28
28
  method_source (1.0.0)
29
29
  minitest (5.18.0)
30
30
  parallel (1.20.1)
@@ -61,7 +61,7 @@ GEM
61
61
  ruby-progressbar (~> 1.7)
62
62
  unicode-display_width (>= 1.4.0, < 1.6)
63
63
  ruby-progressbar (1.11.0)
64
- typhoeus (1.4.0)
64
+ typhoeus (1.4.1)
65
65
  ethon (>= 0.9.0)
66
66
  tzinfo (2.0.6)
67
67
  concurrent-ruby (~> 1.0)
@@ -71,6 +71,7 @@ PLATFORMS
71
71
  arm64-darwin-20
72
72
  arm64-darwin-21
73
73
  arm64-darwin-22
74
+ arm64-darwin-24
74
75
  x86_64-darwin-20
75
76
  x86_64-darwin-21
76
77
  x86_64-linux
@@ -18,15 +18,12 @@ module Patch
18
18
  :create_air_shipping_estimate,
19
19
  :create_bitcoin_estimate,
20
20
  :create_ecommerce_estimate,
21
- :create_ethereum_estimate,
22
21
  :create_flight_estimate,
23
22
  :create_hotel_estimate,
24
23
  :create_mass_estimate,
25
24
  :create_rail_shipping_estimate,
26
25
  :create_road_shipping_estimate,
27
26
  :create_sea_shipping_estimate,
28
- :create_shipping_estimate,
29
- :create_vehicle_estimate,
30
27
  :retrieve_estimate,
31
28
  :retrieve_estimates,
32
29
  ]
@@ -258,80 +255,6 @@ module Patch
258
255
  return data, status_code, headers
259
256
  end
260
257
 
261
- # Create an ethereum estimate
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.
263
- # @param create_ethereum_estimate_request [CreateEthereumEstimateRequest]
264
- # @param [Hash] opts the optional parameters
265
- # @option opts [Integer] :patch_version
266
- # @return [EstimateResponse]
267
- def create_ethereum_estimate(create_ethereum_estimate_request = {}, opts = {})
268
- _create_ethereum_estimate_request = Patch::CreateEthereumEstimateRequest.new(create_ethereum_estimate_request)
269
- data, _status_code, _headers = create_ethereum_estimate_with_http_info(_create_ethereum_estimate_request, opts)
270
- data
271
- end
272
-
273
- # Create an ethereum estimate
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.
275
- # @param create_ethereum_estimate_request [CreateEthereumEstimateRequest]
276
- # @param [Hash] opts the optional parameters
277
- # @option opts [Integer] :patch_version
278
- # @return [Array<(EstimateResponse, Integer, Hash)>] EstimateResponse data, response status code and response headers
279
- def create_ethereum_estimate_with_http_info(create_ethereum_estimate_request, opts = {})
280
- if @api_client.config.debugging
281
- @api_client.config.logger.debug 'Calling API: EstimatesApi.create_ethereum_estimate ...'
282
- end
283
- # verify the required parameter 'create_ethereum_estimate_request' is set
284
- if @api_client.config.client_side_validation && create_ethereum_estimate_request.nil?
285
- fail ArgumentError, "Missing the required parameter 'create_ethereum_estimate_request' when calling EstimatesApi.create_ethereum_estimate"
286
- end
287
- # resource path
288
- local_var_path = '/v1/estimates/crypto/eth'
289
-
290
- # query parameters
291
- query_params = opts[:query_params] || {}
292
-
293
- # header parameters
294
- header_params = opts[:header_params] || {}
295
-
296
- # HTTP header 'Accept' (if needed)
297
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
298
- # HTTP header 'Content-Type'
299
- content_type = @api_client.select_header_content_type(['application/json'])
300
- if !content_type.nil?
301
- header_params['Content-Type'] = content_type
302
- end
303
- header_params['Patch-Version'] = 2
304
- header_params[:'Patch-Version'] = opts[:'patch_version'] if !opts[:'patch_version'].nil?
305
-
306
- # form parameters
307
- form_params = opts[:form_params] || {}
308
-
309
- # http body (model)
310
- post_body = opts[:debug_body] || @api_client.object_to_http_body(create_ethereum_estimate_request)
311
-
312
- # return_type
313
- return_type = opts[:debug_return_type] || 'EstimateResponse'
314
-
315
- # auth_names
316
- auth_names = opts[:debug_auth_names] || ['bearer_auth']
317
-
318
- new_options = opts.merge(
319
- :operation => :"EstimatesApi.create_ethereum_estimate",
320
- :header_params => header_params,
321
- :query_params => query_params,
322
- :form_params => form_params,
323
- :body => post_body,
324
- :auth_names => auth_names,
325
- :return_type => return_type
326
- )
327
-
328
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
329
- if @api_client.config.debugging
330
- @api_client.config.logger.debug "API called: EstimatesApi#create_ethereum_estimate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
331
- end
332
- return data, status_code, headers
333
- end
334
-
335
258
  # Create a flight estimate given the distance traveled in meters
336
259
  # 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.
337
260
  # @param create_flight_estimate_request [CreateFlightEstimateRequest]
@@ -776,154 +699,6 @@ module Patch
776
699
  return data, status_code, headers
777
700
  end
778
701
 
779
- # Create a shipping estimate given the distance traveled in meters, package weight, and transportation method.
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.
781
- # @param create_shipping_estimate_request [CreateShippingEstimateRequest]
782
- # @param [Hash] opts the optional parameters
783
- # @option opts [Integer] :patch_version
784
- # @return [EstimateResponse]
785
- def create_shipping_estimate(create_shipping_estimate_request = {}, opts = {})
786
- _create_shipping_estimate_request = Patch::CreateShippingEstimateRequest.new(create_shipping_estimate_request)
787
- data, _status_code, _headers = create_shipping_estimate_with_http_info(_create_shipping_estimate_request, opts)
788
- data
789
- end
790
-
791
- # Create a shipping estimate given the distance traveled in meters, package weight, and transportation method.
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.
793
- # @param create_shipping_estimate_request [CreateShippingEstimateRequest]
794
- # @param [Hash] opts the optional parameters
795
- # @option opts [Integer] :patch_version
796
- # @return [Array<(EstimateResponse, Integer, Hash)>] EstimateResponse data, response status code and response headers
797
- def create_shipping_estimate_with_http_info(create_shipping_estimate_request, opts = {})
798
- if @api_client.config.debugging
799
- @api_client.config.logger.debug 'Calling API: EstimatesApi.create_shipping_estimate ...'
800
- end
801
- # verify the required parameter 'create_shipping_estimate_request' is set
802
- if @api_client.config.client_side_validation && create_shipping_estimate_request.nil?
803
- fail ArgumentError, "Missing the required parameter 'create_shipping_estimate_request' when calling EstimatesApi.create_shipping_estimate"
804
- end
805
- # resource path
806
- local_var_path = '/v1/estimates/shipping'
807
-
808
- # query parameters
809
- query_params = opts[:query_params] || {}
810
-
811
- # header parameters
812
- header_params = opts[:header_params] || {}
813
-
814
- # HTTP header 'Accept' (if needed)
815
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
816
- # HTTP header 'Content-Type'
817
- content_type = @api_client.select_header_content_type(['application/json'])
818
- if !content_type.nil?
819
- header_params['Content-Type'] = content_type
820
- end
821
- header_params['Patch-Version'] = 2
822
- header_params[:'Patch-Version'] = opts[:'patch_version'] if !opts[:'patch_version'].nil?
823
-
824
- # form parameters
825
- form_params = opts[:form_params] || {}
826
-
827
- # http body (model)
828
- post_body = opts[:debug_body] || @api_client.object_to_http_body(create_shipping_estimate_request)
829
-
830
- # return_type
831
- return_type = opts[:debug_return_type] || 'EstimateResponse'
832
-
833
- # auth_names
834
- auth_names = opts[:debug_auth_names] || ['bearer_auth']
835
-
836
- new_options = opts.merge(
837
- :operation => :"EstimatesApi.create_shipping_estimate",
838
- :header_params => header_params,
839
- :query_params => query_params,
840
- :form_params => form_params,
841
- :body => post_body,
842
- :auth_names => auth_names,
843
- :return_type => return_type
844
- )
845
-
846
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
847
- if @api_client.config.debugging
848
- @api_client.config.logger.debug "API called: EstimatesApi#create_shipping_estimate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
849
- end
850
- return data, status_code, headers
851
- end
852
-
853
- # Create a vehicle estimate given the distance traveled in meters and the type of vehicle
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.
855
- # @param create_vehicle_estimate_request [CreateVehicleEstimateRequest]
856
- # @param [Hash] opts the optional parameters
857
- # @option opts [Integer] :patch_version
858
- # @return [EstimateResponse]
859
- def create_vehicle_estimate(create_vehicle_estimate_request = {}, opts = {})
860
- _create_vehicle_estimate_request = Patch::CreateVehicleEstimateRequest.new(create_vehicle_estimate_request)
861
- data, _status_code, _headers = create_vehicle_estimate_with_http_info(_create_vehicle_estimate_request, opts)
862
- data
863
- end
864
-
865
- # Create a vehicle estimate given the distance traveled in meters and the type of vehicle
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.
867
- # @param create_vehicle_estimate_request [CreateVehicleEstimateRequest]
868
- # @param [Hash] opts the optional parameters
869
- # @option opts [Integer] :patch_version
870
- # @return [Array<(EstimateResponse, Integer, Hash)>] EstimateResponse data, response status code and response headers
871
- def create_vehicle_estimate_with_http_info(create_vehicle_estimate_request, opts = {})
872
- if @api_client.config.debugging
873
- @api_client.config.logger.debug 'Calling API: EstimatesApi.create_vehicle_estimate ...'
874
- end
875
- # verify the required parameter 'create_vehicle_estimate_request' is set
876
- if @api_client.config.client_side_validation && create_vehicle_estimate_request.nil?
877
- fail ArgumentError, "Missing the required parameter 'create_vehicle_estimate_request' when calling EstimatesApi.create_vehicle_estimate"
878
- end
879
- # resource path
880
- local_var_path = '/v1/estimates/vehicle'
881
-
882
- # query parameters
883
- query_params = opts[:query_params] || {}
884
-
885
- # header parameters
886
- header_params = opts[:header_params] || {}
887
-
888
- # HTTP header 'Accept' (if needed)
889
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
890
- # HTTP header 'Content-Type'
891
- content_type = @api_client.select_header_content_type(['application/json'])
892
- if !content_type.nil?
893
- header_params['Content-Type'] = content_type
894
- end
895
- header_params['Patch-Version'] = 2
896
- header_params[:'Patch-Version'] = opts[:'patch_version'] if !opts[:'patch_version'].nil?
897
-
898
- # form parameters
899
- form_params = opts[:form_params] || {}
900
-
901
- # http body (model)
902
- post_body = opts[:debug_body] || @api_client.object_to_http_body(create_vehicle_estimate_request)
903
-
904
- # return_type
905
- return_type = opts[:debug_return_type] || 'EstimateResponse'
906
-
907
- # auth_names
908
- auth_names = opts[:debug_auth_names] || ['bearer_auth']
909
-
910
- new_options = opts.merge(
911
- :operation => :"EstimatesApi.create_vehicle_estimate",
912
- :header_params => header_params,
913
- :query_params => query_params,
914
- :form_params => form_params,
915
- :body => post_body,
916
- :auth_names => auth_names,
917
- :return_type => return_type
918
- )
919
-
920
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
921
- if @api_client.config.debugging
922
- @api_client.config.logger.debug "API called: EstimatesApi#create_vehicle_estimate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
923
- end
924
- return data, status_code, headers
925
- end
926
-
927
702
  # Retrieves an estimate
928
703
  # Retrieves a given estimate and its associated order. You can only retrieve estimates associated with the organization you are querying for.
929
704
  # @param id [String]
@@ -1059,4 +834,4 @@ module Patch
1059
834
  return data, status_code, headers
1060
835
  end
1061
836
  end
1062
- end
837
+ end
@@ -266,4 +266,4 @@ module Patch
266
266
  return data, status_code, headers
267
267
  end
268
268
  end
269
- end
269
+ end
@@ -460,4 +460,4 @@ module Patch
460
460
  return data, status_code, headers
461
461
  end
462
462
  end
463
- end
463
+ end
@@ -174,4 +174,4 @@ module Patch
174
174
  return data, status_code, headers
175
175
  end
176
176
  end
177
- end
177
+ end
@@ -86,4 +86,4 @@ module Patch
86
86
  return data, status_code, headers
87
87
  end
88
88
  end
89
- end
89
+ end
@@ -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/2.1.1"
34
+ @user_agent = "patch-ruby/2.3.0"
35
35
  @default_headers = {
36
36
  'Content-Type' => 'application/json',
37
37
  'User-Agent' => @user_agent
@@ -242,7 +242,8 @@ module Patch
242
242
  end
243
243
 
244
244
  def operation_server_settings
245
- {}
245
+ {
246
+ }
246
247
  end
247
248
 
248
249
  # Returns URL based on server settings
@@ -163,24 +163,24 @@ module Patch
163
163
  # @return Array for valid properties with the reasons
164
164
  def list_invalid_properties
165
165
  invalid_properties = Array.new
166
- if !@vintage_year.nil? && @vintage_year > 2100
167
- invalid_properties.push('invalid value for "vintage_year", must be smaller than or equal to 2100.')
166
+ if !@vintage_year.nil? && @vintage_year > 2225
167
+ invalid_properties.push('invalid value for "vintage_year", must be smaller than or equal to 2225.')
168
168
  end
169
169
 
170
170
  if !@vintage_year.nil? && @vintage_year < 1900
171
171
  invalid_properties.push('invalid value for "vintage_year", must be greater than or equal to 1900.')
172
172
  end
173
173
 
174
- if !@vintage_start_year.nil? && @vintage_start_year > 2100
175
- invalid_properties.push('invalid value for "vintage_start_year", must be smaller than or equal to 2100.')
174
+ if !@vintage_start_year.nil? && @vintage_start_year > 2225
175
+ invalid_properties.push('invalid value for "vintage_start_year", must be smaller than or equal to 2225.')
176
176
  end
177
177
 
178
178
  if !@vintage_start_year.nil? && @vintage_start_year < 1900
179
179
  invalid_properties.push('invalid value for "vintage_start_year", must be greater than or equal to 1900.')
180
180
  end
181
181
 
182
- if !@vintage_end_year.nil? && @vintage_end_year > 2100
183
- invalid_properties.push('invalid value for "vintage_end_year", must be smaller than or equal to 2100.')
182
+ if !@vintage_end_year.nil? && @vintage_end_year > 2225
183
+ invalid_properties.push('invalid value for "vintage_end_year", must be smaller than or equal to 2225.')
184
184
  end
185
185
 
186
186
  if !@vintage_end_year.nil? && @vintage_end_year < 1900
@@ -205,16 +205,16 @@ module Patch
205
205
  # Check to see if the all the properties in the model are valid
206
206
  # @return true if the model is valid
207
207
  def valid?
208
- return false if !@vintage_year.nil? && @vintage_year > 2100
208
+ return false if !@vintage_year.nil? && @vintage_year > 2225
209
209
  return false if !@vintage_year.nil? && @vintage_year < 1900
210
- return false if !@vintage_start_year.nil? && @vintage_start_year > 2100
210
+ return false if !@vintage_start_year.nil? && @vintage_start_year > 2225
211
211
  return false if !@vintage_start_year.nil? && @vintage_start_year < 1900
212
- return false if !@vintage_end_year.nil? && @vintage_end_year > 2100
212
+ return false if !@vintage_end_year.nil? && @vintage_end_year > 2225
213
213
  return false if !@vintage_end_year.nil? && @vintage_end_year < 1900
214
214
  return false if !@price.nil? && @price < 2
215
215
  return false if !@amount.nil? && @amount > 100000000000000
216
216
  return false if !@amount.nil? && @amount < 0
217
- unit_validator = EnumAttributeValidator.new('String', ["g", "Wh"])
217
+ unit_validator = EnumAttributeValidator.new('String', ["g"])
218
218
  return false unless unit_validator.valid?(@unit)
219
219
  true
220
220
  end
@@ -222,8 +222,8 @@ module Patch
222
222
  # Custom attribute writer method with validation
223
223
  # @param [Object] vintage_year Value to be assigned
224
224
  def vintage_year=(vintage_year)
225
- if !vintage_year.nil? && vintage_year > 2100
226
- fail ArgumentError, 'invalid value for "vintage_year", must be smaller than or equal to 2100.'
225
+ if !vintage_year.nil? && vintage_year > 2225
226
+ fail ArgumentError, 'invalid value for "vintage_year", must be smaller than or equal to 2225.'
227
227
  end
228
228
 
229
229
  if !vintage_year.nil? && vintage_year < 1900
@@ -236,8 +236,8 @@ module Patch
236
236
  # Custom attribute writer method with validation
237
237
  # @param [Object] vintage_start_year Value to be assigned
238
238
  def vintage_start_year=(vintage_start_year)
239
- if !vintage_start_year.nil? && vintage_start_year > 2100
240
- fail ArgumentError, 'invalid value for "vintage_start_year", must be smaller than or equal to 2100.'
239
+ if !vintage_start_year.nil? && vintage_start_year > 2225
240
+ fail ArgumentError, 'invalid value for "vintage_start_year", must be smaller than or equal to 2225.'
241
241
  end
242
242
 
243
243
  if !vintage_start_year.nil? && vintage_start_year < 1900
@@ -250,8 +250,8 @@ module Patch
250
250
  # Custom attribute writer method with validation
251
251
  # @param [Object] vintage_end_year Value to be assigned
252
252
  def vintage_end_year=(vintage_end_year)
253
- if !vintage_end_year.nil? && vintage_end_year > 2100
254
- fail ArgumentError, 'invalid value for "vintage_end_year", must be smaller than or equal to 2100.'
253
+ if !vintage_end_year.nil? && vintage_end_year > 2225
254
+ fail ArgumentError, 'invalid value for "vintage_end_year", must be smaller than or equal to 2225.'
255
255
  end
256
256
 
257
257
  if !vintage_end_year.nil? && vintage_end_year < 1900
@@ -288,7 +288,7 @@ module Patch
288
288
  # Custom attribute writer method checking allowed values (enum).
289
289
  # @param [Object] unit Object to be assigned
290
290
  def unit=(unit)
291
- validator = EnumAttributeValidator.new('String', ["g", "Wh"])
291
+ validator = EnumAttributeValidator.new('String', ["g"])
292
292
  unless validator.valid?(unit)
293
293
  fail ArgumentError, "invalid value for \"unit\", must be one of #{validator.allowable_values}."
294
294
  end
@@ -190,24 +190,24 @@ module Patch
190
190
  # @return Array for valid properties with the reasons
191
191
  def list_invalid_properties
192
192
  invalid_properties = Array.new
193
- if !@vintage_year.nil? && @vintage_year > 2100
194
- invalid_properties.push('invalid value for "vintage_year", must be smaller than or equal to 2100.')
193
+ if !@vintage_year.nil? && @vintage_year > 2225
194
+ invalid_properties.push('invalid value for "vintage_year", must be smaller than or equal to 2225.')
195
195
  end
196
196
 
197
197
  if !@vintage_year.nil? && @vintage_year < 1900
198
198
  invalid_properties.push('invalid value for "vintage_year", must be greater than or equal to 1900.')
199
199
  end
200
200
 
201
- if !@vintage_start_year.nil? && @vintage_start_year > 2100
202
- invalid_properties.push('invalid value for "vintage_start_year", must be smaller than or equal to 2100.')
201
+ if !@vintage_start_year.nil? && @vintage_start_year > 2225
202
+ invalid_properties.push('invalid value for "vintage_start_year", must be smaller than or equal to 2225.')
203
203
  end
204
204
 
205
205
  if !@vintage_start_year.nil? && @vintage_start_year < 1900
206
206
  invalid_properties.push('invalid value for "vintage_start_year", must be greater than or equal to 1900.')
207
207
  end
208
208
 
209
- if !@vintage_end_year.nil? && @vintage_end_year > 2100
210
- invalid_properties.push('invalid value for "vintage_end_year", must be smaller than or equal to 2100.')
209
+ if !@vintage_end_year.nil? && @vintage_end_year > 2225
210
+ invalid_properties.push('invalid value for "vintage_end_year", must be smaller than or equal to 2225.')
211
211
  end
212
212
 
213
213
  if !@vintage_end_year.nil? && @vintage_end_year < 1900
@@ -234,16 +234,16 @@ module Patch
234
234
  def valid?
235
235
  state_validator = EnumAttributeValidator.new('String', ["draft", "reserved", "placed"])
236
236
  return false unless state_validator.valid?(@state)
237
- return false if !@vintage_year.nil? && @vintage_year > 2100
237
+ return false if !@vintage_year.nil? && @vintage_year > 2225
238
238
  return false if !@vintage_year.nil? && @vintage_year < 1900
239
- return false if !@vintage_start_year.nil? && @vintage_start_year > 2100
239
+ return false if !@vintage_start_year.nil? && @vintage_start_year > 2225
240
240
  return false if !@vintage_start_year.nil? && @vintage_start_year < 1900
241
- return false if !@vintage_end_year.nil? && @vintage_end_year > 2100
241
+ return false if !@vintage_end_year.nil? && @vintage_end_year > 2225
242
242
  return false if !@vintage_end_year.nil? && @vintage_end_year < 1900
243
243
  return false if !@total_price.nil? && @total_price < 2
244
244
  return false if !@amount.nil? && @amount > 100000000000000
245
245
  return false if !@amount.nil? && @amount < 0
246
- unit_validator = EnumAttributeValidator.new('String', ["g", "Wh"])
246
+ unit_validator = EnumAttributeValidator.new('String', ["g"])
247
247
  return false unless unit_validator.valid?(@unit)
248
248
  true
249
249
  end
@@ -261,8 +261,8 @@ module Patch
261
261
  # Custom attribute writer method with validation
262
262
  # @param [Object] vintage_year Value to be assigned
263
263
  def vintage_year=(vintage_year)
264
- if !vintage_year.nil? && vintage_year > 2100
265
- fail ArgumentError, 'invalid value for "vintage_year", must be smaller than or equal to 2100.'
264
+ if !vintage_year.nil? && vintage_year > 2225
265
+ fail ArgumentError, 'invalid value for "vintage_year", must be smaller than or equal to 2225.'
266
266
  end
267
267
 
268
268
  if !vintage_year.nil? && vintage_year < 1900
@@ -275,8 +275,8 @@ module Patch
275
275
  # Custom attribute writer method with validation
276
276
  # @param [Object] vintage_start_year Value to be assigned
277
277
  def vintage_start_year=(vintage_start_year)
278
- if !vintage_start_year.nil? && vintage_start_year > 2100
279
- fail ArgumentError, 'invalid value for "vintage_start_year", must be smaller than or equal to 2100.'
278
+ if !vintage_start_year.nil? && vintage_start_year > 2225
279
+ fail ArgumentError, 'invalid value for "vintage_start_year", must be smaller than or equal to 2225.'
280
280
  end
281
281
 
282
282
  if !vintage_start_year.nil? && vintage_start_year < 1900
@@ -289,8 +289,8 @@ module Patch
289
289
  # Custom attribute writer method with validation
290
290
  # @param [Object] vintage_end_year Value to be assigned
291
291
  def vintage_end_year=(vintage_end_year)
292
- if !vintage_end_year.nil? && vintage_end_year > 2100
293
- fail ArgumentError, 'invalid value for "vintage_end_year", must be smaller than or equal to 2100.'
292
+ if !vintage_end_year.nil? && vintage_end_year > 2225
293
+ fail ArgumentError, 'invalid value for "vintage_end_year", must be smaller than or equal to 2225.'
294
294
  end
295
295
 
296
296
  if !vintage_end_year.nil? && vintage_end_year < 1900
@@ -327,7 +327,7 @@ module Patch
327
327
  # Custom attribute writer method checking allowed values (enum).
328
328
  # @param [Object] unit Object to be assigned
329
329
  def unit=(unit)
330
- validator = EnumAttributeValidator.new('String', ["g", "Wh"])
330
+ validator = EnumAttributeValidator.new('String', ["g"])
331
331
  unless validator.valid?(unit)
332
332
  fail ArgumentError, "invalid value for \"unit\", must be one of #{validator.allowable_values}."
333
333
  end
@@ -21,7 +21,7 @@ module Patch
21
21
  # A boolean indicating if this estimate is a production or demo mode estimate.
22
22
  attr_accessor :production
23
23
 
24
- # The type of estimate. Available types are mass, flight, shipping, vehicle, and crypto.
24
+ # The type of estimate. Available types are mass, flight, shipping, and crypto.
25
25
  attr_accessor :type
26
26
 
27
27
  # The estimated mass in grams for this estimate.
@@ -65,7 +65,7 @@ module Patch
65
65
 
66
66
  attr_accessor :technology_type
67
67
 
68
- # An array of objects containing the highlight's slug, title, and a URL for the corresponding icon. A highlight's title is a short string that spotlights a characteristic about the project.
68
+ # DEPRECATED. An array of objects containing the highlight's slug, title, and a URL for the corresponding icon. A highlight's title is a short string that spotlights a characteristic about the project. Highlights are deprecated and not populated for recent projects.
69
69
  attr_accessor :highlights
70
70
 
71
71
  # An array of objects containing available inventory for a project. Available inventory is grouped by a project's vintage year and returns amount and pricing available for a given vintage year.
@@ -155,24 +155,24 @@ module Patch
155
155
  # @return Array for valid properties with the reasons
156
156
  def list_invalid_properties
157
157
  invalid_properties = Array.new
158
- if !@vintage_year.nil? && @vintage_year > 2100
159
- invalid_properties.push('invalid value for "vintage_year", must be smaller than or equal to 2100.')
158
+ if !@vintage_year.nil? && @vintage_year > 2225
159
+ invalid_properties.push('invalid value for "vintage_year", must be smaller than or equal to 2225.')
160
160
  end
161
161
 
162
162
  if !@vintage_year.nil? && @vintage_year < 1900
163
163
  invalid_properties.push('invalid value for "vintage_year", must be greater than or equal to 1900.')
164
164
  end
165
165
 
166
- if !@vintage_start_year.nil? && @vintage_start_year > 2100
167
- invalid_properties.push('invalid value for "vintage_start_year", must be smaller than or equal to 2100.')
166
+ if !@vintage_start_year.nil? && @vintage_start_year > 2225
167
+ invalid_properties.push('invalid value for "vintage_start_year", must be smaller than or equal to 2225.')
168
168
  end
169
169
 
170
170
  if !@vintage_start_year.nil? && @vintage_start_year < 1900
171
171
  invalid_properties.push('invalid value for "vintage_start_year", must be greater than or equal to 1900.')
172
172
  end
173
173
 
174
- if !@vintage_end_year.nil? && @vintage_end_year > 2100
175
- invalid_properties.push('invalid value for "vintage_end_year", must be smaller than or equal to 2100.')
174
+ if !@vintage_end_year.nil? && @vintage_end_year > 2225
175
+ invalid_properties.push('invalid value for "vintage_end_year", must be smaller than or equal to 2225.')
176
176
  end
177
177
 
178
178
  if !@vintage_end_year.nil? && @vintage_end_year < 1900
@@ -197,16 +197,16 @@ module Patch
197
197
  # Check to see if the all the properties in the model are valid
198
198
  # @return true if the model is valid
199
199
  def valid?
200
- return false if !@vintage_year.nil? && @vintage_year > 2100
200
+ return false if !@vintage_year.nil? && @vintage_year > 2225
201
201
  return false if !@vintage_year.nil? && @vintage_year < 1900
202
- return false if !@vintage_start_year.nil? && @vintage_start_year > 2100
202
+ return false if !@vintage_start_year.nil? && @vintage_start_year > 2225
203
203
  return false if !@vintage_start_year.nil? && @vintage_start_year < 1900
204
- return false if !@vintage_end_year.nil? && @vintage_end_year > 2100
204
+ return false if !@vintage_end_year.nil? && @vintage_end_year > 2225
205
205
  return false if !@vintage_end_year.nil? && @vintage_end_year < 1900
206
206
  return false if !@price.nil? && @price < 2
207
207
  return false if !@amount.nil? && @amount > 100000000000000
208
208
  return false if !@amount.nil? && @amount < 0
209
- unit_validator = EnumAttributeValidator.new('String', ["g", "Wh"])
209
+ unit_validator = EnumAttributeValidator.new('String', ["g"])
210
210
  return false unless unit_validator.valid?(@unit)
211
211
  true
212
212
  end
@@ -214,8 +214,8 @@ module Patch
214
214
  # Custom attribute writer method with validation
215
215
  # @param [Object] vintage_year Value to be assigned
216
216
  def vintage_year=(vintage_year)
217
- if !vintage_year.nil? && vintage_year > 2100
218
- fail ArgumentError, 'invalid value for "vintage_year", must be smaller than or equal to 2100.'
217
+ if !vintage_year.nil? && vintage_year > 2225
218
+ fail ArgumentError, 'invalid value for "vintage_year", must be smaller than or equal to 2225.'
219
219
  end
220
220
 
221
221
  if !vintage_year.nil? && vintage_year < 1900
@@ -228,8 +228,8 @@ module Patch
228
228
  # Custom attribute writer method with validation
229
229
  # @param [Object] vintage_start_year Value to be assigned
230
230
  def vintage_start_year=(vintage_start_year)
231
- if !vintage_start_year.nil? && vintage_start_year > 2100
232
- fail ArgumentError, 'invalid value for "vintage_start_year", must be smaller than or equal to 2100.'
231
+ if !vintage_start_year.nil? && vintage_start_year > 2225
232
+ fail ArgumentError, 'invalid value for "vintage_start_year", must be smaller than or equal to 2225.'
233
233
  end
234
234
 
235
235
  if !vintage_start_year.nil? && vintage_start_year < 1900
@@ -242,8 +242,8 @@ module Patch
242
242
  # Custom attribute writer method with validation
243
243
  # @param [Object] vintage_end_year Value to be assigned
244
244
  def vintage_end_year=(vintage_end_year)
245
- if !vintage_end_year.nil? && vintage_end_year > 2100
246
- fail ArgumentError, 'invalid value for "vintage_end_year", must be smaller than or equal to 2100.'
245
+ if !vintage_end_year.nil? && vintage_end_year > 2225
246
+ fail ArgumentError, 'invalid value for "vintage_end_year", must be smaller than or equal to 2225.'
247
247
  end
248
248
 
249
249
  if !vintage_end_year.nil? && vintage_end_year < 1900
@@ -280,7 +280,7 @@ module Patch
280
280
  # Custom attribute writer method checking allowed values (enum).
281
281
  # @param [Object] unit Object to be assigned
282
282
  def unit=(unit)
283
- validator = EnumAttributeValidator.new('String', ["g", "Wh"])
283
+ validator = EnumAttributeValidator.new('String', ["g"])
284
284
  unless validator.valid?(unit)
285
285
  fail ArgumentError, "invalid value for \"unit\", must be one of #{validator.allowable_values}."
286
286
  end