late-sdk 0.0.531 → 0.0.533
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 +4 -4
- data/README.md +16 -0
- data/docs/AdsApi.md +287 -0
- data/docs/CheckPhoneNumberPortability200ResponseResultsInner.md +5 -1
- data/docs/CreatePhoneNumberPortInRequest.md +4 -2
- data/docs/CreatePhoneNumberPortInRequestEndUser.md +8 -4
- data/docs/CreatePhoneNumberPortInRequestRequirementsInner.md +20 -0
- data/docs/CreateRfPrediction201Response.md +22 -0
- data/docs/CreateRfPredictionRequest.md +34 -0
- data/docs/CreateStandaloneAdRequest.md +4 -0
- data/docs/GetPhoneNumberPortInOrderRequirements200Response.md +20 -0
- data/docs/GetPhoneNumberPortInOrderRequirements200ResponseRequirementsInner.md +32 -0
- data/docs/GetPhoneNumberPortInRequirements200Response.md +24 -0
- data/docs/GetPhoneNumberPortInRequirements200ResponseFieldsInner.md +28 -0
- data/docs/PhoneNumbersApi.md +149 -5
- data/docs/ReserveRfPrediction201Response.md +20 -0
- data/docs/ReserveRfPredictionRequest.md +20 -0
- data/docs/RfPrediction.md +42 -0
- data/lib/zernio-sdk/api/ads_api.rb +294 -0
- data/lib/zernio-sdk/api/phone_numbers_api.rb +148 -10
- data/lib/zernio-sdk/models/check_phone_number_portability200_response_results_inner.rb +24 -2
- data/lib/zernio-sdk/models/create_phone_number_port_in_request.rb +36 -5
- data/lib/zernio-sdk/models/create_phone_number_port_in_request_end_user.rb +65 -23
- data/lib/zernio-sdk/models/create_phone_number_port_in_request_requirements_inner.rb +201 -0
- data/lib/zernio-sdk/models/create_rf_prediction201_response.rb +165 -0
- data/lib/zernio-sdk/models/create_rf_prediction_request.rb +323 -0
- data/lib/zernio-sdk/models/create_standalone_ad_request.rb +33 -1
- data/lib/zernio-sdk/models/get_phone_number_port_in_order_requirements200_response.rb +158 -0
- data/lib/zernio-sdk/models/get_phone_number_port_in_order_requirements200_response_requirements_inner.rb +247 -0
- data/lib/zernio-sdk/models/get_phone_number_port_in_requirements200_response.rb +177 -0
- data/lib/zernio-sdk/models/get_phone_number_port_in_requirements200_response_fields_inner.rb +231 -0
- data/lib/zernio-sdk/models/reserve_rf_prediction201_response.rb +156 -0
- data/lib/zernio-sdk/models/reserve_rf_prediction_request.rb +190 -0
- data/lib/zernio-sdk/models/rf_prediction.rb +273 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +10 -0
- data/openapi.yaml +283 -16
- data/spec/api/ads_api_spec.rb +52 -0
- data/spec/api/phone_numbers_api_spec.rb +28 -3
- data/spec/models/check_phone_number_portability200_response_results_inner_spec.rb +12 -0
- data/spec/models/create_phone_number_port_in_request_end_user_spec.rb +13 -1
- data/spec/models/create_phone_number_port_in_request_requirements_inner_spec.rb +42 -0
- data/spec/models/create_phone_number_port_in_request_spec.rb +6 -0
- data/spec/models/create_rf_prediction201_response_spec.rb +48 -0
- data/spec/models/create_rf_prediction_request_spec.rb +84 -0
- data/spec/models/create_standalone_ad_request_spec.rb +16 -0
- data/spec/models/get_phone_number_port_in_order_requirements200_response_requirements_inner_spec.rb +82 -0
- data/spec/models/get_phone_number_port_in_order_requirements200_response_spec.rb +42 -0
- data/spec/models/get_phone_number_port_in_requirements200_response_fields_inner_spec.rb +70 -0
- data/spec/models/get_phone_number_port_in_requirements200_response_spec.rb +54 -0
- data/spec/models/reserve_rf_prediction201_response_spec.rb +42 -0
- data/spec/models/reserve_rf_prediction_request_spec.rb +42 -0
- data/spec/models/rf_prediction_spec.rb +108 -0
- data/zernio-sdk-0.0.533.gem +0 -0
- metadata +42 -2
- data/zernio-sdk-0.0.531.gem +0 -0
|
@@ -26,7 +26,7 @@ module Zernio
|
|
|
26
26
|
# Document id from POST /v1/phone-numbers/port-in/documents (kind=invoice).
|
|
27
27
|
attr_accessor :invoice_document_id
|
|
28
28
|
|
|
29
|
-
# Requested port date; the carrier confirms the actual FOC later.
|
|
29
|
+
# Requested port date; the carrier confirms the actual FOC later. US/CA default is one week out (shifted off weekends); international orders are scheduled into the carrier's next allowed porting window at or after this date.
|
|
30
30
|
attr_accessor :foc_datetime_requested
|
|
31
31
|
|
|
32
32
|
attr_accessor :customer_reference
|
|
@@ -34,6 +34,9 @@ module Zernio
|
|
|
34
34
|
# Whether the losing account ports all its numbers (full) or keeps some (partial).
|
|
35
35
|
attr_accessor :port_type
|
|
36
36
|
|
|
37
|
+
# Country-specific requirement values for international ports (from GET /v1/phone-numbers/port-in/requirements). Not needed for US/CA. The LOA and invoice requirements are satisfied automatically by loaDocumentId/invoiceDocumentId, and address-type requirements by the endUser service address.
|
|
38
|
+
attr_accessor :requirements
|
|
39
|
+
|
|
37
40
|
class EnumAttributeValidator
|
|
38
41
|
attr_reader :datatype
|
|
39
42
|
attr_reader :allowable_values
|
|
@@ -65,7 +68,8 @@ module Zernio
|
|
|
65
68
|
:'invoice_document_id' => :'invoiceDocumentId',
|
|
66
69
|
:'foc_datetime_requested' => :'focDatetimeRequested',
|
|
67
70
|
:'customer_reference' => :'customerReference',
|
|
68
|
-
:'port_type' => :'portType'
|
|
71
|
+
:'port_type' => :'portType',
|
|
72
|
+
:'requirements' => :'requirements'
|
|
69
73
|
}
|
|
70
74
|
end
|
|
71
75
|
|
|
@@ -88,7 +92,8 @@ module Zernio
|
|
|
88
92
|
:'invoice_document_id' => :'String',
|
|
89
93
|
:'foc_datetime_requested' => :'Time',
|
|
90
94
|
:'customer_reference' => :'String',
|
|
91
|
-
:'port_type' => :'String'
|
|
95
|
+
:'port_type' => :'String',
|
|
96
|
+
:'requirements' => :'Array<CreatePhoneNumberPortInRequestRequirementsInner>'
|
|
92
97
|
}
|
|
93
98
|
end
|
|
94
99
|
|
|
@@ -153,6 +158,12 @@ module Zernio
|
|
|
153
158
|
else
|
|
154
159
|
self.port_type = 'full'
|
|
155
160
|
end
|
|
161
|
+
|
|
162
|
+
if attributes.key?(:'requirements')
|
|
163
|
+
if (value = attributes[:'requirements']).is_a?(Array)
|
|
164
|
+
self.requirements = value
|
|
165
|
+
end
|
|
166
|
+
end
|
|
156
167
|
end
|
|
157
168
|
|
|
158
169
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -188,6 +199,10 @@ module Zernio
|
|
|
188
199
|
invalid_properties.push('invalid value for "customer_reference", the character length must be smaller than or equal to 100.')
|
|
189
200
|
end
|
|
190
201
|
|
|
202
|
+
if !@requirements.nil? && @requirements.length > 30
|
|
203
|
+
invalid_properties.push('invalid value for "requirements", number of items must be less than or equal to 30.')
|
|
204
|
+
end
|
|
205
|
+
|
|
191
206
|
invalid_properties
|
|
192
207
|
end
|
|
193
208
|
|
|
@@ -204,6 +219,7 @@ module Zernio
|
|
|
204
219
|
return false if !@customer_reference.nil? && @customer_reference.to_s.length > 100
|
|
205
220
|
port_type_validator = EnumAttributeValidator.new('String', ["full", "partial"])
|
|
206
221
|
return false unless port_type_validator.valid?(@port_type)
|
|
222
|
+
return false if !@requirements.nil? && @requirements.length > 30
|
|
207
223
|
true
|
|
208
224
|
end
|
|
209
225
|
|
|
@@ -279,6 +295,20 @@ module Zernio
|
|
|
279
295
|
@port_type = port_type
|
|
280
296
|
end
|
|
281
297
|
|
|
298
|
+
# Custom attribute writer method with validation
|
|
299
|
+
# @param [Object] requirements Value to be assigned
|
|
300
|
+
def requirements=(requirements)
|
|
301
|
+
if requirements.nil?
|
|
302
|
+
fail ArgumentError, 'requirements cannot be nil'
|
|
303
|
+
end
|
|
304
|
+
|
|
305
|
+
if requirements.length > 30
|
|
306
|
+
fail ArgumentError, 'invalid value for "requirements", number of items must be less than or equal to 30.'
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
@requirements = requirements
|
|
310
|
+
end
|
|
311
|
+
|
|
282
312
|
# Checks equality by comparing each attribute.
|
|
283
313
|
# @param [Object] Object to be compared
|
|
284
314
|
def ==(o)
|
|
@@ -290,7 +320,8 @@ module Zernio
|
|
|
290
320
|
invoice_document_id == o.invoice_document_id &&
|
|
291
321
|
foc_datetime_requested == o.foc_datetime_requested &&
|
|
292
322
|
customer_reference == o.customer_reference &&
|
|
293
|
-
port_type == o.port_type
|
|
323
|
+
port_type == o.port_type &&
|
|
324
|
+
requirements == o.requirements
|
|
294
325
|
end
|
|
295
326
|
|
|
296
327
|
# @see the `==` method
|
|
@@ -302,7 +333,7 @@ module Zernio
|
|
|
302
333
|
# Calculates hash code according to all attributes.
|
|
303
334
|
# @return [Integer] Hash code
|
|
304
335
|
def hash
|
|
305
|
-
[phone_numbers, end_user, loa_document_id, invoice_document_id, foc_datetime_requested, customer_reference, port_type].hash
|
|
336
|
+
[phone_numbers, end_user, loa_document_id, invoice_document_id, foc_datetime_requested, customer_reference, port_type, requirements].hash
|
|
306
337
|
end
|
|
307
338
|
|
|
308
339
|
# Builds the object from hash
|
|
@@ -28,21 +28,28 @@ module Zernio
|
|
|
28
28
|
# Account number with the losing carrier — required (carriers reject ports without it; on prepaid mobile plans it is often the phone number itself).
|
|
29
29
|
attr_accessor :account_number
|
|
30
30
|
|
|
31
|
-
# Transfer PIN. Required for mobile numbers (wireless carriers reject PIN-less ports). Forwarded to the carrier, never stored.
|
|
31
|
+
# Transfer PIN. Required for US/CA mobile numbers (wireless carriers reject PIN-less ports). Forwarded to the carrier, never stored. International porting codes (e.g. the UK PAC) go through `requirements` instead.
|
|
32
32
|
attr_accessor :pin_passcode
|
|
33
33
|
|
|
34
|
+
# Company tax id on the carrier account (EU ports, e.g. Spanish CIF).
|
|
35
|
+
attr_accessor :tax_identifier
|
|
36
|
+
|
|
37
|
+
# Business registration id on the carrier account (EU ports).
|
|
38
|
+
attr_accessor :business_identifier
|
|
39
|
+
|
|
34
40
|
attr_accessor :street_address
|
|
35
41
|
|
|
36
42
|
attr_accessor :extended_address
|
|
37
43
|
|
|
38
44
|
attr_accessor :locality
|
|
39
45
|
|
|
40
|
-
# 2-letter
|
|
46
|
+
# Region. Required for US/CA as the 2-letter state/province code (full names are accepted and normalized); optional elsewhere.
|
|
41
47
|
attr_accessor :administrative_area
|
|
42
48
|
|
|
43
|
-
# US ZIP
|
|
49
|
+
# Postal code. Validated as a US ZIP / Canadian postal code for US/CA; free-form elsewhere.
|
|
44
50
|
attr_accessor :postal_code
|
|
45
51
|
|
|
52
|
+
# Service-address country (a supported port-in country).
|
|
46
53
|
attr_accessor :country_code
|
|
47
54
|
|
|
48
55
|
class EnumAttributeValidator
|
|
@@ -75,6 +82,8 @@ module Zernio
|
|
|
75
82
|
:'billing_phone_number' => :'billingPhoneNumber',
|
|
76
83
|
:'account_number' => :'accountNumber',
|
|
77
84
|
:'pin_passcode' => :'pinPasscode',
|
|
85
|
+
:'tax_identifier' => :'taxIdentifier',
|
|
86
|
+
:'business_identifier' => :'businessIdentifier',
|
|
78
87
|
:'street_address' => :'streetAddress',
|
|
79
88
|
:'extended_address' => :'extendedAddress',
|
|
80
89
|
:'locality' => :'locality',
|
|
@@ -102,6 +111,8 @@ module Zernio
|
|
|
102
111
|
:'billing_phone_number' => :'String',
|
|
103
112
|
:'account_number' => :'String',
|
|
104
113
|
:'pin_passcode' => :'String',
|
|
114
|
+
:'tax_identifier' => :'String',
|
|
115
|
+
:'business_identifier' => :'String',
|
|
105
116
|
:'street_address' => :'String',
|
|
106
117
|
:'extended_address' => :'String',
|
|
107
118
|
:'locality' => :'String',
|
|
@@ -159,6 +170,14 @@ module Zernio
|
|
|
159
170
|
self.pin_passcode = attributes[:'pin_passcode']
|
|
160
171
|
end
|
|
161
172
|
|
|
173
|
+
if attributes.key?(:'tax_identifier')
|
|
174
|
+
self.tax_identifier = attributes[:'tax_identifier']
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
if attributes.key?(:'business_identifier')
|
|
178
|
+
self.business_identifier = attributes[:'business_identifier']
|
|
179
|
+
end
|
|
180
|
+
|
|
162
181
|
if attributes.key?(:'street_address')
|
|
163
182
|
self.street_address = attributes[:'street_address']
|
|
164
183
|
else
|
|
@@ -177,8 +196,6 @@ module Zernio
|
|
|
177
196
|
|
|
178
197
|
if attributes.key?(:'administrative_area')
|
|
179
198
|
self.administrative_area = attributes[:'administrative_area']
|
|
180
|
-
else
|
|
181
|
-
self.administrative_area = nil
|
|
182
199
|
end
|
|
183
200
|
|
|
184
201
|
if attributes.key?(:'postal_code')
|
|
@@ -211,6 +228,14 @@ module Zernio
|
|
|
211
228
|
invalid_properties.push('invalid value for "account_number", account_number cannot be nil.')
|
|
212
229
|
end
|
|
213
230
|
|
|
231
|
+
if !@tax_identifier.nil? && @tax_identifier.to_s.length > 50
|
|
232
|
+
invalid_properties.push('invalid value for "tax_identifier", the character length must be smaller than or equal to 50.')
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
if !@business_identifier.nil? && @business_identifier.to_s.length > 50
|
|
236
|
+
invalid_properties.push('invalid value for "business_identifier", the character length must be smaller than or equal to 50.')
|
|
237
|
+
end
|
|
238
|
+
|
|
214
239
|
if @street_address.nil?
|
|
215
240
|
invalid_properties.push('invalid value for "street_address", street_address cannot be nil.')
|
|
216
241
|
end
|
|
@@ -219,10 +244,6 @@ module Zernio
|
|
|
219
244
|
invalid_properties.push('invalid value for "locality", locality cannot be nil.')
|
|
220
245
|
end
|
|
221
246
|
|
|
222
|
-
if @administrative_area.nil?
|
|
223
|
-
invalid_properties.push('invalid value for "administrative_area", administrative_area cannot be nil.')
|
|
224
|
-
end
|
|
225
|
-
|
|
226
247
|
if @postal_code.nil?
|
|
227
248
|
invalid_properties.push('invalid value for "postal_code", postal_code cannot be nil.')
|
|
228
249
|
end
|
|
@@ -249,12 +270,13 @@ module Zernio
|
|
|
249
270
|
return false if @entity_name.nil?
|
|
250
271
|
return false if @auth_person_name.nil?
|
|
251
272
|
return false if @account_number.nil?
|
|
273
|
+
return false if !@tax_identifier.nil? && @tax_identifier.to_s.length > 50
|
|
274
|
+
return false if !@business_identifier.nil? && @business_identifier.to_s.length > 50
|
|
252
275
|
return false if @street_address.nil?
|
|
253
276
|
return false if @locality.nil?
|
|
254
|
-
return false if @administrative_area.nil?
|
|
255
277
|
return false if @postal_code.nil?
|
|
256
278
|
return false if @country_code.nil?
|
|
257
|
-
country_code_validator = EnumAttributeValidator.new('String', ["US", "CA"])
|
|
279
|
+
country_code_validator = EnumAttributeValidator.new('String', ["US", "CA", "GB", "ES", "DE", "FR", "NL", "AU"])
|
|
258
280
|
return false unless country_code_validator.valid?(@country_code)
|
|
259
281
|
return false if @country_code.to_s.length > 2
|
|
260
282
|
return false if @country_code.to_s.length < 2
|
|
@@ -291,6 +313,34 @@ module Zernio
|
|
|
291
313
|
@account_number = account_number
|
|
292
314
|
end
|
|
293
315
|
|
|
316
|
+
# Custom attribute writer method with validation
|
|
317
|
+
# @param [Object] tax_identifier Value to be assigned
|
|
318
|
+
def tax_identifier=(tax_identifier)
|
|
319
|
+
if tax_identifier.nil?
|
|
320
|
+
fail ArgumentError, 'tax_identifier cannot be nil'
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
if tax_identifier.to_s.length > 50
|
|
324
|
+
fail ArgumentError, 'invalid value for "tax_identifier", the character length must be smaller than or equal to 50.'
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
@tax_identifier = tax_identifier
|
|
328
|
+
end
|
|
329
|
+
|
|
330
|
+
# Custom attribute writer method with validation
|
|
331
|
+
# @param [Object] business_identifier Value to be assigned
|
|
332
|
+
def business_identifier=(business_identifier)
|
|
333
|
+
if business_identifier.nil?
|
|
334
|
+
fail ArgumentError, 'business_identifier cannot be nil'
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
if business_identifier.to_s.length > 50
|
|
338
|
+
fail ArgumentError, 'invalid value for "business_identifier", the character length must be smaller than or equal to 50.'
|
|
339
|
+
end
|
|
340
|
+
|
|
341
|
+
@business_identifier = business_identifier
|
|
342
|
+
end
|
|
343
|
+
|
|
294
344
|
# Custom attribute writer method with validation
|
|
295
345
|
# @param [Object] street_address Value to be assigned
|
|
296
346
|
def street_address=(street_address)
|
|
@@ -311,16 +361,6 @@ module Zernio
|
|
|
311
361
|
@locality = locality
|
|
312
362
|
end
|
|
313
363
|
|
|
314
|
-
# Custom attribute writer method with validation
|
|
315
|
-
# @param [Object] administrative_area Value to be assigned
|
|
316
|
-
def administrative_area=(administrative_area)
|
|
317
|
-
if administrative_area.nil?
|
|
318
|
-
fail ArgumentError, 'administrative_area cannot be nil'
|
|
319
|
-
end
|
|
320
|
-
|
|
321
|
-
@administrative_area = administrative_area
|
|
322
|
-
end
|
|
323
|
-
|
|
324
364
|
# Custom attribute writer method with validation
|
|
325
365
|
# @param [Object] postal_code Value to be assigned
|
|
326
366
|
def postal_code=(postal_code)
|
|
@@ -334,7 +374,7 @@ module Zernio
|
|
|
334
374
|
# Custom attribute writer method checking allowed values (enum).
|
|
335
375
|
# @param [Object] country_code Object to be assigned
|
|
336
376
|
def country_code=(country_code)
|
|
337
|
-
validator = EnumAttributeValidator.new('String', ["US", "CA"])
|
|
377
|
+
validator = EnumAttributeValidator.new('String', ["US", "CA", "GB", "ES", "DE", "FR", "NL", "AU"])
|
|
338
378
|
unless validator.valid?(country_code)
|
|
339
379
|
fail ArgumentError, "invalid value for \"country_code\", must be one of #{validator.allowable_values}."
|
|
340
380
|
end
|
|
@@ -351,6 +391,8 @@ module Zernio
|
|
|
351
391
|
billing_phone_number == o.billing_phone_number &&
|
|
352
392
|
account_number == o.account_number &&
|
|
353
393
|
pin_passcode == o.pin_passcode &&
|
|
394
|
+
tax_identifier == o.tax_identifier &&
|
|
395
|
+
business_identifier == o.business_identifier &&
|
|
354
396
|
street_address == o.street_address &&
|
|
355
397
|
extended_address == o.extended_address &&
|
|
356
398
|
locality == o.locality &&
|
|
@@ -368,7 +410,7 @@ module Zernio
|
|
|
368
410
|
# Calculates hash code according to all attributes.
|
|
369
411
|
# @return [Integer] Hash code
|
|
370
412
|
def hash
|
|
371
|
-
[entity_name, auth_person_name, billing_phone_number, account_number, pin_passcode, street_address, extended_address, locality, administrative_area, postal_code, country_code].hash
|
|
413
|
+
[entity_name, auth_person_name, billing_phone_number, account_number, pin_passcode, tax_identifier, business_identifier, street_address, extended_address, locality, administrative_area, postal_code, country_code].hash
|
|
372
414
|
end
|
|
373
415
|
|
|
374
416
|
# Builds the object from hash
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.4
|
|
7
|
+
Contact: support@zernio.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Zernio
|
|
17
|
+
class CreatePhoneNumberPortInRequestRequirementsInner < ApiModelBase
|
|
18
|
+
# The requirement's id, from the requirements endpoint.
|
|
19
|
+
attr_accessor :requirement_type_id
|
|
20
|
+
|
|
21
|
+
# Text value, ISO datetime, or a documentId from POST /v1/phone-numbers/port-in/documents, per the requirement's kind.
|
|
22
|
+
attr_accessor :field_value
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'requirement_type_id' => :'requirementTypeId',
|
|
28
|
+
:'field_value' => :'fieldValue'
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns attribute mapping this model knows about
|
|
33
|
+
def self.acceptable_attribute_map
|
|
34
|
+
attribute_map
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Returns all the JSON keys this model knows about
|
|
38
|
+
def self.acceptable_attributes
|
|
39
|
+
acceptable_attribute_map.values
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Attribute type mapping.
|
|
43
|
+
def self.openapi_types
|
|
44
|
+
{
|
|
45
|
+
:'requirement_type_id' => :'String',
|
|
46
|
+
:'field_value' => :'String'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# List of attributes with nullable: true
|
|
51
|
+
def self.openapi_nullable
|
|
52
|
+
Set.new([
|
|
53
|
+
])
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Initializes the object
|
|
57
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
58
|
+
def initialize(attributes = {})
|
|
59
|
+
if (!attributes.is_a?(Hash))
|
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::CreatePhoneNumberPortInRequestRequirementsInner` initialize method"
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
64
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
66
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::CreatePhoneNumberPortInRequestRequirementsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
68
|
+
end
|
|
69
|
+
h[k.to_sym] = v
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if attributes.key?(:'requirement_type_id')
|
|
73
|
+
self.requirement_type_id = attributes[:'requirement_type_id']
|
|
74
|
+
else
|
|
75
|
+
self.requirement_type_id = nil
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'field_value')
|
|
79
|
+
self.field_value = attributes[:'field_value']
|
|
80
|
+
else
|
|
81
|
+
self.field_value = nil
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
86
|
+
# @return Array for valid properties with the reasons
|
|
87
|
+
def list_invalid_properties
|
|
88
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
89
|
+
invalid_properties = Array.new
|
|
90
|
+
if @requirement_type_id.nil?
|
|
91
|
+
invalid_properties.push('invalid value for "requirement_type_id", requirement_type_id cannot be nil.')
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if @field_value.nil?
|
|
95
|
+
invalid_properties.push('invalid value for "field_value", field_value cannot be nil.')
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
if @field_value.to_s.length > 1000
|
|
99
|
+
invalid_properties.push('invalid value for "field_value", the character length must be smaller than or equal to 1000.')
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
invalid_properties
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Check to see if the all the properties in the model are valid
|
|
106
|
+
# @return true if the model is valid
|
|
107
|
+
def valid?
|
|
108
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
109
|
+
return false if @requirement_type_id.nil?
|
|
110
|
+
return false if @field_value.nil?
|
|
111
|
+
return false if @field_value.to_s.length > 1000
|
|
112
|
+
true
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Custom attribute writer method with validation
|
|
116
|
+
# @param [Object] requirement_type_id Value to be assigned
|
|
117
|
+
def requirement_type_id=(requirement_type_id)
|
|
118
|
+
if requirement_type_id.nil?
|
|
119
|
+
fail ArgumentError, 'requirement_type_id cannot be nil'
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
@requirement_type_id = requirement_type_id
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Custom attribute writer method with validation
|
|
126
|
+
# @param [Object] field_value Value to be assigned
|
|
127
|
+
def field_value=(field_value)
|
|
128
|
+
if field_value.nil?
|
|
129
|
+
fail ArgumentError, 'field_value cannot be nil'
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
if field_value.to_s.length > 1000
|
|
133
|
+
fail ArgumentError, 'invalid value for "field_value", the character length must be smaller than or equal to 1000.'
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
@field_value = field_value
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Checks equality by comparing each attribute.
|
|
140
|
+
# @param [Object] Object to be compared
|
|
141
|
+
def ==(o)
|
|
142
|
+
return true if self.equal?(o)
|
|
143
|
+
self.class == o.class &&
|
|
144
|
+
requirement_type_id == o.requirement_type_id &&
|
|
145
|
+
field_value == o.field_value
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# @see the `==` method
|
|
149
|
+
# @param [Object] Object to be compared
|
|
150
|
+
def eql?(o)
|
|
151
|
+
self == o
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Calculates hash code according to all attributes.
|
|
155
|
+
# @return [Integer] Hash code
|
|
156
|
+
def hash
|
|
157
|
+
[requirement_type_id, field_value].hash
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Builds the object from hash
|
|
161
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
162
|
+
# @return [Object] Returns the model itself
|
|
163
|
+
def self.build_from_hash(attributes)
|
|
164
|
+
return nil unless attributes.is_a?(Hash)
|
|
165
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
166
|
+
transformed_hash = {}
|
|
167
|
+
openapi_types.each_pair do |key, type|
|
|
168
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
169
|
+
transformed_hash["#{key}"] = nil
|
|
170
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
171
|
+
# check to ensure the input is an array given that the attribute
|
|
172
|
+
# is documented as an array but the input is not
|
|
173
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
174
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
175
|
+
end
|
|
176
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
177
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
new(transformed_hash)
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Returns the object in the form of hash
|
|
184
|
+
# @return [Hash] Returns the object in the form of hash
|
|
185
|
+
def to_hash
|
|
186
|
+
hash = {}
|
|
187
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
188
|
+
value = self.send(attr)
|
|
189
|
+
if value.nil?
|
|
190
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
191
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
hash[param] = _to_hash(value)
|
|
195
|
+
end
|
|
196
|
+
hash
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
end
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.4
|
|
7
|
+
Contact: support@zernio.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Zernio
|
|
17
|
+
class CreateRfPrediction201Response < ApiModelBase
|
|
18
|
+
attr_accessor :ad_account_id
|
|
19
|
+
|
|
20
|
+
attr_accessor :currency
|
|
21
|
+
|
|
22
|
+
attr_accessor :prediction
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'ad_account_id' => :'adAccountId',
|
|
28
|
+
:'currency' => :'currency',
|
|
29
|
+
:'prediction' => :'prediction'
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns attribute mapping this model knows about
|
|
34
|
+
def self.acceptable_attribute_map
|
|
35
|
+
attribute_map
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Returns all the JSON keys this model knows about
|
|
39
|
+
def self.acceptable_attributes
|
|
40
|
+
acceptable_attribute_map.values
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Attribute type mapping.
|
|
44
|
+
def self.openapi_types
|
|
45
|
+
{
|
|
46
|
+
:'ad_account_id' => :'String',
|
|
47
|
+
:'currency' => :'String',
|
|
48
|
+
:'prediction' => :'RfPrediction'
|
|
49
|
+
}
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# List of attributes with nullable: true
|
|
53
|
+
def self.openapi_nullable
|
|
54
|
+
Set.new([
|
|
55
|
+
])
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Initializes the object
|
|
59
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
60
|
+
def initialize(attributes = {})
|
|
61
|
+
if (!attributes.is_a?(Hash))
|
|
62
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::CreateRfPrediction201Response` initialize method"
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
66
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
67
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
68
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
69
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::CreateRfPrediction201Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
70
|
+
end
|
|
71
|
+
h[k.to_sym] = v
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if attributes.key?(:'ad_account_id')
|
|
75
|
+
self.ad_account_id = attributes[:'ad_account_id']
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'currency')
|
|
79
|
+
self.currency = attributes[:'currency']
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'prediction')
|
|
83
|
+
self.prediction = attributes[:'prediction']
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
88
|
+
# @return Array for valid properties with the reasons
|
|
89
|
+
def list_invalid_properties
|
|
90
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
91
|
+
invalid_properties = Array.new
|
|
92
|
+
invalid_properties
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Check to see if the all the properties in the model are valid
|
|
96
|
+
# @return true if the model is valid
|
|
97
|
+
def valid?
|
|
98
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
99
|
+
true
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Checks equality by comparing each attribute.
|
|
103
|
+
# @param [Object] Object to be compared
|
|
104
|
+
def ==(o)
|
|
105
|
+
return true if self.equal?(o)
|
|
106
|
+
self.class == o.class &&
|
|
107
|
+
ad_account_id == o.ad_account_id &&
|
|
108
|
+
currency == o.currency &&
|
|
109
|
+
prediction == o.prediction
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# @see the `==` method
|
|
113
|
+
# @param [Object] Object to be compared
|
|
114
|
+
def eql?(o)
|
|
115
|
+
self == o
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Calculates hash code according to all attributes.
|
|
119
|
+
# @return [Integer] Hash code
|
|
120
|
+
def hash
|
|
121
|
+
[ad_account_id, currency, prediction].hash
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Builds the object from hash
|
|
125
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
126
|
+
# @return [Object] Returns the model itself
|
|
127
|
+
def self.build_from_hash(attributes)
|
|
128
|
+
return nil unless attributes.is_a?(Hash)
|
|
129
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
130
|
+
transformed_hash = {}
|
|
131
|
+
openapi_types.each_pair do |key, type|
|
|
132
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
133
|
+
transformed_hash["#{key}"] = nil
|
|
134
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
135
|
+
# check to ensure the input is an array given that the attribute
|
|
136
|
+
# is documented as an array but the input is not
|
|
137
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
138
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
139
|
+
end
|
|
140
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
141
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
new(transformed_hash)
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Returns the object in the form of hash
|
|
148
|
+
# @return [Hash] Returns the object in the form of hash
|
|
149
|
+
def to_hash
|
|
150
|
+
hash = {}
|
|
151
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
152
|
+
value = self.send(attr)
|
|
153
|
+
if value.nil?
|
|
154
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
155
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
hash[param] = _to_hash(value)
|
|
159
|
+
end
|
|
160
|
+
hash
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
end
|