freeclimb 4.2.0 → 4.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/Gemfile.lock +1 -1
  4. data/README.md +23 -5
  5. data/docs/DefaultApi.md +437 -1
  6. data/docs/IncomingNumberRequest.md +3 -1
  7. data/docs/SMSTenDLCBrand.md +78 -0
  8. data/docs/SMSTenDLCBrandsListResult.md +32 -0
  9. data/docs/SMSTenDLCBrandsListResultAllOf.md +18 -0
  10. data/docs/SMSTenDLCCampaign.md +78 -0
  11. data/docs/SMSTenDLCCampaignsListResult.md +32 -0
  12. data/docs/SMSTenDLCCampaignsListResultAllOf.md +18 -0
  13. data/docs/SMSTenDLCPartnerCampaign.md +74 -0
  14. data/docs/SMSTenDLCPartnerCampaignBrand.md +38 -0
  15. data/docs/SMSTenDLCPartnerCampaignsListResult.md +32 -0
  16. data/docs/SMSTenDLCPartnerCampaignsListResultAllOf.md +18 -0
  17. data/lib/freeclimb/api/default_api.rb +367 -0
  18. data/lib/freeclimb/models/account_result.rb +2 -0
  19. data/lib/freeclimb/models/account_result_all_of.rb +2 -0
  20. data/lib/freeclimb/models/call_result.rb +3 -0
  21. data/lib/freeclimb/models/call_result_all_of.rb +3 -0
  22. data/lib/freeclimb/models/conference_result.rb +2 -0
  23. data/lib/freeclimb/models/conference_result_all_of.rb +2 -0
  24. data/lib/freeclimb/models/create_conference.rb +1 -0
  25. data/lib/freeclimb/models/create_conference_all_of.rb +1 -0
  26. data/lib/freeclimb/models/create_conference_request.rb +1 -0
  27. data/lib/freeclimb/models/get_speech.rb +1 -0
  28. data/lib/freeclimb/models/get_speech_all_of.rb +1 -0
  29. data/lib/freeclimb/models/incoming_number_request.rb +15 -4
  30. data/lib/freeclimb/models/log_result.rb +1 -0
  31. data/lib/freeclimb/models/message_result.rb +1 -0
  32. data/lib/freeclimb/models/message_result_all_of.rb +1 -0
  33. data/lib/freeclimb/models/sms_ten_dlc_brand.rb +960 -0
  34. data/lib/freeclimb/models/sms_ten_dlc_brands_list_result.rb +306 -0
  35. data/lib/freeclimb/models/sms_ten_dlc_brands_list_result_all_of.rb +221 -0
  36. data/lib/freeclimb/models/sms_ten_dlc_campaign.rb +814 -0
  37. data/lib/freeclimb/models/sms_ten_dlc_campaigns_list_result.rb +306 -0
  38. data/lib/freeclimb/models/sms_ten_dlc_campaigns_list_result_all_of.rb +221 -0
  39. data/lib/freeclimb/models/sms_ten_dlc_partner_campaign.rb +807 -0
  40. data/lib/freeclimb/models/sms_ten_dlc_partner_campaign_brand.rb +445 -0
  41. data/lib/freeclimb/models/sms_ten_dlc_partner_campaigns_list_result.rb +306 -0
  42. data/lib/freeclimb/models/sms_ten_dlc_partner_campaigns_list_result_all_of.rb +221 -0
  43. data/lib/freeclimb/models/update_conference_request.rb +1 -0
  44. data/lib/freeclimb/version.rb +1 -1
  45. data/lib/freeclimb.rb +10 -0
  46. data/openapi.json +1200 -27
  47. data/spec/api/default_api_spec.rb +156 -2
  48. data/spec/models/sms_ten_dlc_brand_spec.rb +234 -0
  49. data/spec/models/sms_ten_dlc_brands_list_result_spec.rb +76 -0
  50. data/spec/models/sms_ten_dlc_campaign_spec.rb +218 -0
  51. data/spec/models/sms_ten_dlc_campaigns_list_result_spec.rb +76 -0
  52. data/spec/models/sms_ten_dlc_partner_campaign_brand_spec.rb +94 -0
  53. data/spec/models/sms_ten_dlc_partner_campaign_spec.rb +206 -0
  54. data/spec/models/sms_ten_dlc_partner_campaigns_list_result_spec.rb +76 -0
  55. data/spec/utils/signature_information_spec.rb +4 -3
  56. metadata +107 -73
@@ -0,0 +1,960 @@
1
+ =begin
2
+ #FreeClimb API
3
+
4
+ #FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: support@freeclimb.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.4.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Freeclimb
17
+ # A brand is a business identity behind the campaign.
18
+ class SMSTenDLCBrand
19
+ # ID of the account that created this Queue.
20
+ attr_accessor :account_id
21
+
22
+ # Entity type behind the brand. This is the form of business establishment.
23
+ attr_accessor :entity_type
24
+
25
+ # Unique identifier assigned to the csp by the registry.
26
+ attr_accessor :csp_id
27
+
28
+ # Unique identifier assigned to the brand by the registry.
29
+ attr_accessor :brand_id
30
+
31
+ # First or given name.
32
+ attr_accessor :first_name
33
+
34
+ # Last or Surname.
35
+ attr_accessor :last_name
36
+
37
+ # Display or marketing name of the brand.
38
+ attr_accessor :display_name
39
+
40
+ # (Required for Non-profit/private/public) Legal company name.
41
+ attr_accessor :company_name
42
+
43
+ # (Required for Non-profit) Government assigned corporate tax ID. EIN is 9-digits in U.S.
44
+ attr_accessor :ein
45
+
46
+ # ISO2 2 characters country code. Example: US - United States
47
+ attr_accessor :ein_issuing_country
48
+
49
+ # Valid phone number in e.164 international format.
50
+ attr_accessor :phone
51
+
52
+ # Street number and name.
53
+ attr_accessor :street
54
+
55
+ # City name
56
+ attr_accessor :city
57
+
58
+ # State. Must be 2 letters code for United States.
59
+ attr_accessor :state
60
+
61
+ # Postal codes. Use 5 digit zipcode for United States
62
+ attr_accessor :postal_code
63
+
64
+ # ISO2 2 characters country code. Example: US - United States
65
+ attr_accessor :country
66
+
67
+ # Valid email address of brand support contact.
68
+ attr_accessor :email
69
+
70
+ # (Required for public company) stock symbol.
71
+ attr_accessor :stock_symbol
72
+
73
+ # (Required for public company) stock exchange.
74
+ attr_accessor :stock_exchange
75
+
76
+ # IP address of the browser requesting to create brand identity.
77
+ attr_accessor :ip_address
78
+
79
+ # Brand website URL.
80
+ attr_accessor :website
81
+
82
+ # Brand relationship to the CSP
83
+ attr_accessor :brand_relationship
84
+
85
+ # Vertical or industry segment of the brand.
86
+ attr_accessor :vertical
87
+
88
+ # Alternate business identifier such as DUNS, LEI, or GIIN
89
+ attr_accessor :alt_business_id
90
+
91
+ # The type of the Alternative business identifier
92
+ attr_accessor :alt_business_id_type
93
+
94
+ # Universal EIN of Brand, Read Only.
95
+ attr_accessor :universal_ein
96
+
97
+ # Caller supplied brand reference ID. If supplied, the value must be unique across all submitted brands. Can be used to prevent duplicate brand registrations.
98
+ attr_accessor :reference_id
99
+
100
+ # Optional brand attributes. Please refer to GET /enum/optionalAttributeNames for dictionary of optional attribute names.
101
+ attr_accessor :optional_attributes
102
+
103
+ # Test brand.
104
+ attr_accessor :mock
105
+
106
+ # TCR assessment of the brand identification status.
107
+ attr_accessor :identity_status
108
+
109
+ # Unix timestamp when brand was created.
110
+ attr_accessor :create_date
111
+
112
+ class EnumAttributeValidator
113
+ attr_reader :datatype
114
+ attr_reader :allowable_values
115
+
116
+ def initialize(datatype, allowable_values)
117
+ @allowable_values = allowable_values.map do |value|
118
+ case datatype.to_s
119
+ when /Integer/i
120
+ value.to_i
121
+ when /Float/i
122
+ value.to_f
123
+ else
124
+ value
125
+ end
126
+ end
127
+ end
128
+
129
+ def valid?(value)
130
+ !value || allowable_values.include?(value)
131
+ end
132
+ end
133
+
134
+ # Attribute mapping from ruby-style variable name to JSON key.
135
+ def self.attribute_map
136
+ {
137
+ :'account_id' => :'accountId',
138
+ :'entity_type' => :'entityType',
139
+ :'csp_id' => :'cspId',
140
+ :'brand_id' => :'brandId',
141
+ :'first_name' => :'firstName',
142
+ :'last_name' => :'lastName',
143
+ :'display_name' => :'displayName',
144
+ :'company_name' => :'companyName',
145
+ :'ein' => :'ein',
146
+ :'ein_issuing_country' => :'einIssuingCountry',
147
+ :'phone' => :'phone',
148
+ :'street' => :'street',
149
+ :'city' => :'city',
150
+ :'state' => :'state',
151
+ :'postal_code' => :'postalCode',
152
+ :'country' => :'country',
153
+ :'email' => :'email',
154
+ :'stock_symbol' => :'stockSymbol',
155
+ :'stock_exchange' => :'stockExchange',
156
+ :'ip_address' => :'ipAddress',
157
+ :'website' => :'website',
158
+ :'brand_relationship' => :'brandRelationship',
159
+ :'vertical' => :'vertical',
160
+ :'alt_business_id' => :'altBusinessId',
161
+ :'alt_business_id_type' => :'altBusinessIdType',
162
+ :'universal_ein' => :'universalEin',
163
+ :'reference_id' => :'referenceId',
164
+ :'optional_attributes' => :'optionalAttributes',
165
+ :'mock' => :'mock',
166
+ :'identity_status' => :'identityStatus',
167
+ :'create_date' => :'createDate'
168
+ }
169
+ end
170
+
171
+ # Returns all the JSON keys this model knows about
172
+ def self.acceptable_attributes
173
+ attribute_map.values
174
+ end
175
+
176
+ # Attribute type mapping.
177
+ def self.openapi_types
178
+ {
179
+ :'account_id' => :'String',
180
+ :'entity_type' => :'String',
181
+ :'csp_id' => :'String',
182
+ :'brand_id' => :'String',
183
+ :'first_name' => :'String',
184
+ :'last_name' => :'String',
185
+ :'display_name' => :'String',
186
+ :'company_name' => :'String',
187
+ :'ein' => :'String',
188
+ :'ein_issuing_country' => :'String',
189
+ :'phone' => :'String',
190
+ :'street' => :'String',
191
+ :'city' => :'String',
192
+ :'state' => :'String',
193
+ :'postal_code' => :'String',
194
+ :'country' => :'String',
195
+ :'email' => :'String',
196
+ :'stock_symbol' => :'String',
197
+ :'stock_exchange' => :'String',
198
+ :'ip_address' => :'String',
199
+ :'website' => :'String',
200
+ :'brand_relationship' => :'String',
201
+ :'vertical' => :'String',
202
+ :'alt_business_id' => :'String',
203
+ :'alt_business_id_type' => :'String',
204
+ :'universal_ein' => :'String',
205
+ :'reference_id' => :'String',
206
+ :'optional_attributes' => :'Hash<String, Object>',
207
+ :'mock' => :'Boolean',
208
+ :'identity_status' => :'String',
209
+ :'create_date' => :'Time'
210
+ }
211
+ end
212
+
213
+ # List of attributes with nullable: true
214
+ def self.openapi_nullable
215
+ Set.new([
216
+ :'account_id',
217
+ ])
218
+ end
219
+
220
+ # Initializes the object
221
+ # @param [Hash] attributes Model attributes in the form of hash
222
+ def initialize(attributes = {})
223
+ if (!attributes.is_a?(Hash))
224
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::SMSTenDLCBrand` initialize method"
225
+ end
226
+
227
+ # check to see if the attribute exists and convert string to symbol for hash key
228
+ attributes = attributes.each_with_object({}) { |(k, v), h|
229
+ if (!self.class.attribute_map.key?(k.to_sym))
230
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::SMSTenDLCBrand`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
231
+ end
232
+ h[k.to_sym] = v
233
+ }
234
+
235
+ if attributes.key?(:'account_id')
236
+ self.account_id = attributes[:'account_id']
237
+ end
238
+
239
+ if attributes.key?(:'entity_type')
240
+ self.entity_type = attributes[:'entity_type']
241
+ end
242
+
243
+ if attributes.key?(:'csp_id')
244
+ self.csp_id = attributes[:'csp_id']
245
+ end
246
+
247
+ if attributes.key?(:'brand_id')
248
+ self.brand_id = attributes[:'brand_id']
249
+ end
250
+
251
+ if attributes.key?(:'first_name')
252
+ self.first_name = attributes[:'first_name']
253
+ end
254
+
255
+ if attributes.key?(:'last_name')
256
+ self.last_name = attributes[:'last_name']
257
+ end
258
+
259
+ if attributes.key?(:'display_name')
260
+ self.display_name = attributes[:'display_name']
261
+ end
262
+
263
+ if attributes.key?(:'company_name')
264
+ self.company_name = attributes[:'company_name']
265
+ end
266
+
267
+ if attributes.key?(:'ein')
268
+ self.ein = attributes[:'ein']
269
+ end
270
+
271
+ if attributes.key?(:'ein_issuing_country')
272
+ self.ein_issuing_country = attributes[:'ein_issuing_country']
273
+ end
274
+
275
+ if attributes.key?(:'phone')
276
+ self.phone = attributes[:'phone']
277
+ end
278
+
279
+ if attributes.key?(:'street')
280
+ self.street = attributes[:'street']
281
+ end
282
+
283
+ if attributes.key?(:'city')
284
+ self.city = attributes[:'city']
285
+ end
286
+
287
+ if attributes.key?(:'state')
288
+ self.state = attributes[:'state']
289
+ end
290
+
291
+ if attributes.key?(:'postal_code')
292
+ self.postal_code = attributes[:'postal_code']
293
+ end
294
+
295
+ if attributes.key?(:'country')
296
+ self.country = attributes[:'country']
297
+ end
298
+
299
+ if attributes.key?(:'email')
300
+ self.email = attributes[:'email']
301
+ end
302
+
303
+ if attributes.key?(:'stock_symbol')
304
+ self.stock_symbol = attributes[:'stock_symbol']
305
+ end
306
+
307
+ if attributes.key?(:'stock_exchange')
308
+ self.stock_exchange = attributes[:'stock_exchange']
309
+ end
310
+
311
+ if attributes.key?(:'ip_address')
312
+ self.ip_address = attributes[:'ip_address']
313
+ end
314
+
315
+ if attributes.key?(:'website')
316
+ self.website = attributes[:'website']
317
+ end
318
+
319
+ if attributes.key?(:'brand_relationship')
320
+ self.brand_relationship = attributes[:'brand_relationship']
321
+ end
322
+
323
+ if attributes.key?(:'vertical')
324
+ self.vertical = attributes[:'vertical']
325
+ end
326
+
327
+ if attributes.key?(:'alt_business_id')
328
+ self.alt_business_id = attributes[:'alt_business_id']
329
+ end
330
+
331
+ if attributes.key?(:'alt_business_id_type')
332
+ self.alt_business_id_type = attributes[:'alt_business_id_type']
333
+ end
334
+
335
+ if attributes.key?(:'universal_ein')
336
+ self.universal_ein = attributes[:'universal_ein']
337
+ end
338
+
339
+ if attributes.key?(:'reference_id')
340
+ self.reference_id = attributes[:'reference_id']
341
+ end
342
+
343
+ if attributes.key?(:'optional_attributes')
344
+ if (value = attributes[:'optional_attributes']).is_a?(Hash)
345
+ self.optional_attributes = value
346
+ end
347
+ end
348
+
349
+ if attributes.key?(:'mock')
350
+ self.mock = attributes[:'mock']
351
+ end
352
+
353
+ if attributes.key?(:'identity_status')
354
+ self.identity_status = attributes[:'identity_status']
355
+ end
356
+
357
+ if attributes.key?(:'create_date')
358
+ self.create_date = attributes[:'create_date']
359
+ end
360
+ end
361
+
362
+ # Show invalid properties with the reasons. Usually used together with valid?
363
+ # @return Array for valid properties with the reasons
364
+ def list_invalid_properties
365
+ invalid_properties = Array.new
366
+ if @entity_type.nil?
367
+ invalid_properties.push('invalid value for "entity_type", entity_type cannot be nil.')
368
+ end
369
+
370
+ if @entity_type.to_s.length > 20
371
+ invalid_properties.push('invalid value for "entity_type", the character length must be smaller than or equal to 20.')
372
+ end
373
+
374
+ if !@first_name.nil? && @first_name.to_s.length > 100
375
+ invalid_properties.push('invalid value for "first_name", the character length must be smaller than or equal to 100.')
376
+ end
377
+
378
+ if !@last_name.nil? && @last_name.to_s.length > 100
379
+ invalid_properties.push('invalid value for "last_name", the character length must be smaller than or equal to 100.')
380
+ end
381
+
382
+ if @display_name.nil?
383
+ invalid_properties.push('invalid value for "display_name", display_name cannot be nil.')
384
+ end
385
+
386
+ if @display_name.to_s.length > 255
387
+ invalid_properties.push('invalid value for "display_name", the character length must be smaller than or equal to 255.')
388
+ end
389
+
390
+ if !@company_name.nil? && @company_name.to_s.length > 255
391
+ invalid_properties.push('invalid value for "company_name", the character length must be smaller than or equal to 255.')
392
+ end
393
+
394
+ if !@ein.nil? && @ein.to_s.length > 21
395
+ invalid_properties.push('invalid value for "ein", the character length must be smaller than or equal to 21.')
396
+ end
397
+
398
+ if !@ein_issuing_country.nil? && @ein_issuing_country.to_s.length > 2
399
+ invalid_properties.push('invalid value for "ein_issuing_country", the character length must be smaller than or equal to 2.')
400
+ end
401
+
402
+ if @phone.nil?
403
+ invalid_properties.push('invalid value for "phone", phone cannot be nil.')
404
+ end
405
+
406
+ if @phone.to_s.length > 20
407
+ invalid_properties.push('invalid value for "phone", the character length must be smaller than or equal to 20.')
408
+ end
409
+
410
+ if !@street.nil? && @street.to_s.length > 100
411
+ invalid_properties.push('invalid value for "street", the character length must be smaller than or equal to 100.')
412
+ end
413
+
414
+ if !@city.nil? && @city.to_s.length > 100
415
+ invalid_properties.push('invalid value for "city", the character length must be smaller than or equal to 100.')
416
+ end
417
+
418
+ if !@state.nil? && @state.to_s.length > 20
419
+ invalid_properties.push('invalid value for "state", the character length must be smaller than or equal to 20.')
420
+ end
421
+
422
+ if !@postal_code.nil? && @postal_code.to_s.length > 10
423
+ invalid_properties.push('invalid value for "postal_code", the character length must be smaller than or equal to 10.')
424
+ end
425
+
426
+ if @country.nil?
427
+ invalid_properties.push('invalid value for "country", country cannot be nil.')
428
+ end
429
+
430
+ if @country.to_s.length > 2
431
+ invalid_properties.push('invalid value for "country", the character length must be smaller than or equal to 2.')
432
+ end
433
+
434
+ if @email.nil?
435
+ invalid_properties.push('invalid value for "email", email cannot be nil.')
436
+ end
437
+
438
+ if @email.to_s.length > 100
439
+ invalid_properties.push('invalid value for "email", the character length must be smaller than or equal to 100.')
440
+ end
441
+
442
+ if !@stock_symbol.nil? && @stock_symbol.to_s.length > 10
443
+ invalid_properties.push('invalid value for "stock_symbol", the character length must be smaller than or equal to 10.')
444
+ end
445
+
446
+ if !@ip_address.nil? && @ip_address.to_s.length > 50
447
+ invalid_properties.push('invalid value for "ip_address", the character length must be smaller than or equal to 50.')
448
+ end
449
+
450
+ if !@website.nil? && @website.to_s.length > 100
451
+ invalid_properties.push('invalid value for "website", the character length must be smaller than or equal to 100.')
452
+ end
453
+
454
+ if @brand_relationship.nil?
455
+ invalid_properties.push('invalid value for "brand_relationship", brand_relationship cannot be nil.')
456
+ end
457
+
458
+ if @vertical.nil?
459
+ invalid_properties.push('invalid value for "vertical", vertical cannot be nil.')
460
+ end
461
+
462
+ if @vertical.to_s.length > 50
463
+ invalid_properties.push('invalid value for "vertical", the character length must be smaller than or equal to 50.')
464
+ end
465
+
466
+ if !@alt_business_id.nil? && @alt_business_id.to_s.length > 50
467
+ invalid_properties.push('invalid value for "alt_business_id", the character length must be smaller than or equal to 50.')
468
+ end
469
+
470
+ if !@reference_id.nil? && @reference_id.to_s.length > 50
471
+ invalid_properties.push('invalid value for "reference_id", the character length must be smaller than or equal to 50.')
472
+ end
473
+
474
+ if @mock.nil?
475
+ invalid_properties.push('invalid value for "mock", mock cannot be nil.')
476
+ end
477
+
478
+ if @identity_status.nil?
479
+ invalid_properties.push('invalid value for "identity_status", identity_status cannot be nil.')
480
+ end
481
+
482
+ invalid_properties
483
+ end
484
+
485
+ # Check to see if the all the properties in the model are valid
486
+ # @return true if the model is valid
487
+ def valid?
488
+ return false if @entity_type.nil?
489
+ entity_type_validator = EnumAttributeValidator.new('String', ["PRIVATE_PROFIT", "PUBLIC_PROFIT", "NON_PROFIT", "GOVERNMENT", "SOLE_PROPRIETOR"])
490
+ return false unless entity_type_validator.valid?(@entity_type)
491
+ return false if @entity_type.to_s.length > 20
492
+ return false if !@first_name.nil? && @first_name.to_s.length > 100
493
+ return false if !@last_name.nil? && @last_name.to_s.length > 100
494
+ return false if @display_name.nil?
495
+ return false if @display_name.to_s.length > 255
496
+ return false if !@company_name.nil? && @company_name.to_s.length > 255
497
+ return false if !@ein.nil? && @ein.to_s.length > 21
498
+ return false if !@ein_issuing_country.nil? && @ein_issuing_country.to_s.length > 2
499
+ return false if @phone.nil?
500
+ return false if @phone.to_s.length > 20
501
+ return false if !@street.nil? && @street.to_s.length > 100
502
+ return false if !@city.nil? && @city.to_s.length > 100
503
+ return false if !@state.nil? && @state.to_s.length > 20
504
+ return false if !@postal_code.nil? && @postal_code.to_s.length > 10
505
+ return false if @country.nil?
506
+ return false if @country.to_s.length > 2
507
+ return false if @email.nil?
508
+ return false if @email.to_s.length > 100
509
+ return false if !@stock_symbol.nil? && @stock_symbol.to_s.length > 10
510
+ stock_exchange_validator = EnumAttributeValidator.new('String', ["NONE", "NASDAQ", "NYSE", "AMEX", "AMX", "ASX", "B3", "BME", "BSE", "FRA", "ICEX", "JPX", "JSE", "KRX", "LON", "NSE", "OMX", "SEHK", "SGX", "SSE", "STO", "SWX", "SZSE", "TSX", "TWSE", "VSE", "OTHER"])
511
+ return false unless stock_exchange_validator.valid?(@stock_exchange)
512
+ return false if !@ip_address.nil? && @ip_address.to_s.length > 50
513
+ return false if !@website.nil? && @website.to_s.length > 100
514
+ return false if @brand_relationship.nil?
515
+ brand_relationship_validator = EnumAttributeValidator.new('String', ["BASIC_ACCOUNT", "SMALL_ACCOUNT", "MEDIUM_ACCOUNT", "LARGE_ACCOUNT", "KEY_ACCOUNT"])
516
+ return false unless brand_relationship_validator.valid?(@brand_relationship)
517
+ return false if @vertical.nil?
518
+ return false if @vertical.to_s.length > 50
519
+ return false if !@alt_business_id.nil? && @alt_business_id.to_s.length > 50
520
+ alt_business_id_type_validator = EnumAttributeValidator.new('String', ["NONE", "DUNS", "GIIN", "LEI"])
521
+ return false unless alt_business_id_type_validator.valid?(@alt_business_id_type)
522
+ return false if !@reference_id.nil? && @reference_id.to_s.length > 50
523
+ return false if @mock.nil?
524
+ return false if @identity_status.nil?
525
+ identity_status_validator = EnumAttributeValidator.new('String', ["SELF_DECLARED", "UNVERIFIED", "VERIFIED", "VETTED_VERIFIED"])
526
+ return false unless identity_status_validator.valid?(@identity_status)
527
+ true
528
+ end
529
+
530
+ # Custom attribute writer method checking allowed values (enum).
531
+ # @param [Object] entity_type Object to be assigned
532
+ def entity_type=(entity_type)
533
+ validator = EnumAttributeValidator.new('String', ["PRIVATE_PROFIT", "PUBLIC_PROFIT", "NON_PROFIT", "GOVERNMENT", "SOLE_PROPRIETOR"])
534
+ unless validator.valid?(entity_type)
535
+ fail ArgumentError, "invalid value for \"entity_type\", must be one of #{validator.allowable_values}."
536
+ end
537
+ @entity_type = entity_type
538
+ end
539
+
540
+ # Custom attribute writer method with validation
541
+ # @param [Object] first_name Value to be assigned
542
+ def first_name=(first_name)
543
+ if !first_name.nil? && first_name.to_s.length > 100
544
+ fail ArgumentError, 'invalid value for "first_name", the character length must be smaller than or equal to 100.'
545
+ end
546
+
547
+ @first_name = first_name
548
+ end
549
+
550
+ # Custom attribute writer method with validation
551
+ # @param [Object] last_name Value to be assigned
552
+ def last_name=(last_name)
553
+ if !last_name.nil? && last_name.to_s.length > 100
554
+ fail ArgumentError, 'invalid value for "last_name", the character length must be smaller than or equal to 100.'
555
+ end
556
+
557
+ @last_name = last_name
558
+ end
559
+
560
+ # Custom attribute writer method with validation
561
+ # @param [Object] display_name Value to be assigned
562
+ def display_name=(display_name)
563
+ if display_name.nil?
564
+ fail ArgumentError, 'display_name cannot be nil'
565
+ end
566
+
567
+ if display_name.to_s.length > 255
568
+ fail ArgumentError, 'invalid value for "display_name", the character length must be smaller than or equal to 255.'
569
+ end
570
+
571
+ @display_name = display_name
572
+ end
573
+
574
+ # Custom attribute writer method with validation
575
+ # @param [Object] company_name Value to be assigned
576
+ def company_name=(company_name)
577
+ if !company_name.nil? && company_name.to_s.length > 255
578
+ fail ArgumentError, 'invalid value for "company_name", the character length must be smaller than or equal to 255.'
579
+ end
580
+
581
+ @company_name = company_name
582
+ end
583
+
584
+ # Custom attribute writer method with validation
585
+ # @param [Object] ein Value to be assigned
586
+ def ein=(ein)
587
+ if !ein.nil? && ein.to_s.length > 21
588
+ fail ArgumentError, 'invalid value for "ein", the character length must be smaller than or equal to 21.'
589
+ end
590
+
591
+ @ein = ein
592
+ end
593
+
594
+ # Custom attribute writer method with validation
595
+ # @param [Object] ein_issuing_country Value to be assigned
596
+ def ein_issuing_country=(ein_issuing_country)
597
+ if !ein_issuing_country.nil? && ein_issuing_country.to_s.length > 2
598
+ fail ArgumentError, 'invalid value for "ein_issuing_country", the character length must be smaller than or equal to 2.'
599
+ end
600
+
601
+ @ein_issuing_country = ein_issuing_country
602
+ end
603
+
604
+ # Custom attribute writer method with validation
605
+ # @param [Object] phone Value to be assigned
606
+ def phone=(phone)
607
+ if phone.nil?
608
+ fail ArgumentError, 'phone cannot be nil'
609
+ end
610
+
611
+ if phone.to_s.length > 20
612
+ fail ArgumentError, 'invalid value for "phone", the character length must be smaller than or equal to 20.'
613
+ end
614
+
615
+ @phone = phone
616
+ end
617
+
618
+ # Custom attribute writer method with validation
619
+ # @param [Object] street Value to be assigned
620
+ def street=(street)
621
+ if !street.nil? && street.to_s.length > 100
622
+ fail ArgumentError, 'invalid value for "street", the character length must be smaller than or equal to 100.'
623
+ end
624
+
625
+ @street = street
626
+ end
627
+
628
+ # Custom attribute writer method with validation
629
+ # @param [Object] city Value to be assigned
630
+ def city=(city)
631
+ if !city.nil? && city.to_s.length > 100
632
+ fail ArgumentError, 'invalid value for "city", the character length must be smaller than or equal to 100.'
633
+ end
634
+
635
+ @city = city
636
+ end
637
+
638
+ # Custom attribute writer method with validation
639
+ # @param [Object] state Value to be assigned
640
+ def state=(state)
641
+ if !state.nil? && state.to_s.length > 20
642
+ fail ArgumentError, 'invalid value for "state", the character length must be smaller than or equal to 20.'
643
+ end
644
+
645
+ @state = state
646
+ end
647
+
648
+ # Custom attribute writer method with validation
649
+ # @param [Object] postal_code Value to be assigned
650
+ def postal_code=(postal_code)
651
+ if !postal_code.nil? && postal_code.to_s.length > 10
652
+ fail ArgumentError, 'invalid value for "postal_code", the character length must be smaller than or equal to 10.'
653
+ end
654
+
655
+ @postal_code = postal_code
656
+ end
657
+
658
+ # Custom attribute writer method with validation
659
+ # @param [Object] country Value to be assigned
660
+ def country=(country)
661
+ if country.nil?
662
+ fail ArgumentError, 'country cannot be nil'
663
+ end
664
+
665
+ if country.to_s.length > 2
666
+ fail ArgumentError, 'invalid value for "country", the character length must be smaller than or equal to 2.'
667
+ end
668
+
669
+ @country = country
670
+ end
671
+
672
+ # Custom attribute writer method with validation
673
+ # @param [Object] email Value to be assigned
674
+ def email=(email)
675
+ if email.nil?
676
+ fail ArgumentError, 'email cannot be nil'
677
+ end
678
+
679
+ if email.to_s.length > 100
680
+ fail ArgumentError, 'invalid value for "email", the character length must be smaller than or equal to 100.'
681
+ end
682
+
683
+ @email = email
684
+ end
685
+
686
+ # Custom attribute writer method with validation
687
+ # @param [Object] stock_symbol Value to be assigned
688
+ def stock_symbol=(stock_symbol)
689
+ if !stock_symbol.nil? && stock_symbol.to_s.length > 10
690
+ fail ArgumentError, 'invalid value for "stock_symbol", the character length must be smaller than or equal to 10.'
691
+ end
692
+
693
+ @stock_symbol = stock_symbol
694
+ end
695
+
696
+ # Custom attribute writer method checking allowed values (enum).
697
+ # @param [Object] stock_exchange Object to be assigned
698
+ def stock_exchange=(stock_exchange)
699
+ validator = EnumAttributeValidator.new('String', ["NONE", "NASDAQ", "NYSE", "AMEX", "AMX", "ASX", "B3", "BME", "BSE", "FRA", "ICEX", "JPX", "JSE", "KRX", "LON", "NSE", "OMX", "SEHK", "SGX", "SSE", "STO", "SWX", "SZSE", "TSX", "TWSE", "VSE", "OTHER"])
700
+ unless validator.valid?(stock_exchange)
701
+ fail ArgumentError, "invalid value for \"stock_exchange\", must be one of #{validator.allowable_values}."
702
+ end
703
+ @stock_exchange = stock_exchange
704
+ end
705
+
706
+ # Custom attribute writer method with validation
707
+ # @param [Object] ip_address Value to be assigned
708
+ def ip_address=(ip_address)
709
+ if !ip_address.nil? && ip_address.to_s.length > 50
710
+ fail ArgumentError, 'invalid value for "ip_address", the character length must be smaller than or equal to 50.'
711
+ end
712
+
713
+ @ip_address = ip_address
714
+ end
715
+
716
+ # Custom attribute writer method with validation
717
+ # @param [Object] website Value to be assigned
718
+ def website=(website)
719
+ if !website.nil? && website.to_s.length > 100
720
+ fail ArgumentError, 'invalid value for "website", the character length must be smaller than or equal to 100.'
721
+ end
722
+
723
+ @website = website
724
+ end
725
+
726
+ # Custom attribute writer method checking allowed values (enum).
727
+ # @param [Object] brand_relationship Object to be assigned
728
+ def brand_relationship=(brand_relationship)
729
+ validator = EnumAttributeValidator.new('String', ["BASIC_ACCOUNT", "SMALL_ACCOUNT", "MEDIUM_ACCOUNT", "LARGE_ACCOUNT", "KEY_ACCOUNT"])
730
+ unless validator.valid?(brand_relationship)
731
+ fail ArgumentError, "invalid value for \"brand_relationship\", must be one of #{validator.allowable_values}."
732
+ end
733
+ @brand_relationship = brand_relationship
734
+ end
735
+
736
+ # Custom attribute writer method with validation
737
+ # @param [Object] vertical Value to be assigned
738
+ def vertical=(vertical)
739
+ if vertical.nil?
740
+ fail ArgumentError, 'vertical cannot be nil'
741
+ end
742
+
743
+ if vertical.to_s.length > 50
744
+ fail ArgumentError, 'invalid value for "vertical", the character length must be smaller than or equal to 50.'
745
+ end
746
+
747
+ @vertical = vertical
748
+ end
749
+
750
+ # Custom attribute writer method with validation
751
+ # @param [Object] alt_business_id Value to be assigned
752
+ def alt_business_id=(alt_business_id)
753
+ if !alt_business_id.nil? && alt_business_id.to_s.length > 50
754
+ fail ArgumentError, 'invalid value for "alt_business_id", the character length must be smaller than or equal to 50.'
755
+ end
756
+
757
+ @alt_business_id = alt_business_id
758
+ end
759
+
760
+ # Custom attribute writer method checking allowed values (enum).
761
+ # @param [Object] alt_business_id_type Object to be assigned
762
+ def alt_business_id_type=(alt_business_id_type)
763
+ validator = EnumAttributeValidator.new('String', ["NONE", "DUNS", "GIIN", "LEI"])
764
+ unless validator.valid?(alt_business_id_type)
765
+ fail ArgumentError, "invalid value for \"alt_business_id_type\", must be one of #{validator.allowable_values}."
766
+ end
767
+ @alt_business_id_type = alt_business_id_type
768
+ end
769
+
770
+ # Custom attribute writer method with validation
771
+ # @param [Object] reference_id Value to be assigned
772
+ def reference_id=(reference_id)
773
+ if !reference_id.nil? && reference_id.to_s.length > 50
774
+ fail ArgumentError, 'invalid value for "reference_id", the character length must be smaller than or equal to 50.'
775
+ end
776
+
777
+ @reference_id = reference_id
778
+ end
779
+
780
+ # Custom attribute writer method checking allowed values (enum).
781
+ # @param [Object] identity_status Object to be assigned
782
+ def identity_status=(identity_status)
783
+ validator = EnumAttributeValidator.new('String', ["SELF_DECLARED", "UNVERIFIED", "VERIFIED", "VETTED_VERIFIED"])
784
+ unless validator.valid?(identity_status)
785
+ fail ArgumentError, "invalid value for \"identity_status\", must be one of #{validator.allowable_values}."
786
+ end
787
+ @identity_status = identity_status
788
+ end
789
+
790
+ # Checks equality by comparing each attribute.
791
+ # @param [Object] Object to be compared
792
+ def ==(o)
793
+ return true if self.equal?(o)
794
+ self.class == o.class &&
795
+ account_id == o.account_id &&
796
+ entity_type == o.entity_type &&
797
+ csp_id == o.csp_id &&
798
+ brand_id == o.brand_id &&
799
+ first_name == o.first_name &&
800
+ last_name == o.last_name &&
801
+ display_name == o.display_name &&
802
+ company_name == o.company_name &&
803
+ ein == o.ein &&
804
+ ein_issuing_country == o.ein_issuing_country &&
805
+ phone == o.phone &&
806
+ street == o.street &&
807
+ city == o.city &&
808
+ state == o.state &&
809
+ postal_code == o.postal_code &&
810
+ country == o.country &&
811
+ email == o.email &&
812
+ stock_symbol == o.stock_symbol &&
813
+ stock_exchange == o.stock_exchange &&
814
+ ip_address == o.ip_address &&
815
+ website == o.website &&
816
+ brand_relationship == o.brand_relationship &&
817
+ vertical == o.vertical &&
818
+ alt_business_id == o.alt_business_id &&
819
+ alt_business_id_type == o.alt_business_id_type &&
820
+ universal_ein == o.universal_ein &&
821
+ reference_id == o.reference_id &&
822
+ optional_attributes == o.optional_attributes &&
823
+ mock == o.mock &&
824
+ identity_status == o.identity_status &&
825
+ create_date == o.create_date
826
+ end
827
+
828
+ # @see the `==` method
829
+ # @param [Object] Object to be compared
830
+ def eql?(o)
831
+ self == o
832
+ end
833
+
834
+ # Calculates hash code according to all attributes.
835
+ # @return [Integer] Hash code
836
+ def hash
837
+ [account_id, entity_type, csp_id, brand_id, first_name, last_name, display_name, company_name, ein, ein_issuing_country, phone, street, city, state, postal_code, country, email, stock_symbol, stock_exchange, ip_address, website, brand_relationship, vertical, alt_business_id, alt_business_id_type, universal_ein, reference_id, optional_attributes, mock, identity_status, create_date].hash
838
+ end
839
+
840
+ # Builds the object from hash
841
+ # @param [Hash] attributes Model attributes in the form of hash
842
+ # @return [Object] Returns the model itself
843
+ def self.build_from_hash(attributes)
844
+ new.build_from_hash(attributes)
845
+ end
846
+
847
+ # Builds the object from hash
848
+ # @param [Hash] attributes Model attributes in the form of hash
849
+ # @return [Object] Returns the model itself
850
+ def build_from_hash(attributes)
851
+ return nil unless attributes.is_a?(Hash)
852
+ self.class.openapi_types.each_pair do |key, type|
853
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
854
+ self.send("#{key}=", nil)
855
+ elsif type =~ /\AArray<(.*)>/i
856
+ # check to ensure the input is an array given that the attribute
857
+ # is documented as an array but the input is not
858
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
859
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
860
+ end
861
+ elsif !attributes[self.class.attribute_map[key]].nil?
862
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
863
+ end
864
+ end
865
+
866
+ self
867
+ end
868
+
869
+ # Deserializes the data based on type
870
+ # @param string type Data type
871
+ # @param string value Value to be deserialized
872
+ # @return [Object] Deserialized data
873
+ def _deserialize(type, value)
874
+ case type.to_sym
875
+ when :Time
876
+ Time.parse(value)
877
+ when :Date
878
+ Date.parse(value)
879
+ when :String
880
+ value.to_s
881
+ when :Integer
882
+ value.to_i
883
+ when :Float
884
+ value.to_f
885
+ when :Boolean
886
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
887
+ true
888
+ else
889
+ false
890
+ end
891
+ when :Object
892
+ # generic object (usually a Hash), return directly
893
+ value
894
+ when /\AArray<(?<inner_type>.+)>\z/
895
+ inner_type = Regexp.last_match[:inner_type]
896
+ value.map { |v| _deserialize(inner_type, v) }
897
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
898
+ k_type = Regexp.last_match[:k_type]
899
+ v_type = Regexp.last_match[:v_type]
900
+ {}.tap do |hash|
901
+ value.each do |k, v|
902
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
903
+ end
904
+ end
905
+ else # model
906
+ # models (e.g. Pet) or oneOf
907
+ klass = Freeclimb.const_get(type)
908
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
909
+ end
910
+ end
911
+
912
+ # Returns the string representation of the object
913
+ # @return [String] String presentation of the object
914
+ def to_s
915
+ to_hash.to_s
916
+ end
917
+
918
+ # to_body is an alias to to_hash (backward compatibility)
919
+ # @return [Hash] Returns the object in the form of hash
920
+ def to_body
921
+ to_hash
922
+ end
923
+
924
+ # Returns the object in the form of hash
925
+ # @return [Hash] Returns the object in the form of hash
926
+ def to_hash
927
+ hash = {}
928
+ self.class.attribute_map.each_pair do |attr, param|
929
+ value = self.send(attr)
930
+ if value.nil?
931
+ is_nullable = self.class.openapi_nullable.include?(attr)
932
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
933
+ end
934
+
935
+ hash[param] = _to_hash(value)
936
+ end
937
+ hash
938
+ end
939
+
940
+ # Outputs non-array value in the form of hash
941
+ # For object, use to_hash. Otherwise, just return the value
942
+ # @param [Object] value Any valid value
943
+ # @return [Hash] Returns the value in the form of hash
944
+ def _to_hash(value)
945
+ if value.is_a?(Array)
946
+ value.compact.map { |v| _to_hash(v) }
947
+ elsif value.is_a?(Hash)
948
+ {}.tap do |hash|
949
+ value.each { |k, v| hash[k] = _to_hash(v) }
950
+ end
951
+ elsif value.respond_to? :to_hash
952
+ value.to_hash
953
+ else
954
+ value
955
+ end
956
+ end
957
+
958
+ end
959
+
960
+ end