transferzero-sdk 1.5.0 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -13,14 +13,27 @@ OpenAPI Generator version: 4.0.0-beta3
13
13
  require 'date'
14
14
 
15
15
  module TransferZero
16
- # This contains the details of the sender. The first time a specific sender is used the full details should be provided. Once a sender is created and is used, the next time you MUST only send the ID of the sender. This is so we can match the same sender across multiple transactions for KYC and audit purposes. Personal Sender Example: ```json { \"country\": \"UG\", \"phone_country\": \"UG\", \"phone_number\": \"752403639\", \"email\": \"example@home.org\", \"first_name\": \"Johnny\", \"last_name\": \"English\", \"city\": \"Kampala\", \"street\": \"Unknown 17-3\", \"address_description\": \"Description of address\", \"postal_code\": \"798983\", \"birth_date\": \"1900-12-31\", \"documents\": [ ], \"ip\": \"127.0.0.1\", \"identification_number\": \"AB123456\", \"identification_type\": \"ID\", \"external_id\": \"806ec63a-a5a7-43cc-9d75-1ee74fbcc026\", \"metadata\": { } } ``` Business Sender Example: ```json { \"type\": \"business\", \"country\": \"UG\", \"phone_country\": \"UG\", \"phone_number\": \"752403639\", \"email\": \"example@home.org\", \"name\": \"MyCompany\", \"city\": \"Kampala\", \"street\": \"Unknown 17-3\", \"postal_code\": \"798983\", \"address_description\": \"Description of address\", \"documents\": [ ], \"ip\": \"127.0.0.1\", \"identification_number\": \"AB123456\", \"identification_type\": \"ID\", \"external_id\": \"806ec63a-a5a7-43cc-9d75-1ee74fbcc026\", \"metadata\": { } } ``` [Sender in the API documentation](https://docs.transferzero.com/docs/transaction-flow/#sender)
16
+ # This contains the details of the sender. The first time a specific sender is used the full details should be provided. Once a sender is created and is used, the next time you MUST only send the ID of the sender. This is so we can match the same sender across multiple transactions for KYC and audit purposes. Personal Sender Example: ```json { \"country\": \"UG\", \"phone_country\": \"UG\", \"phone_number\": \"752403639\", \"email\": \"example@home.org\", \"first_name\": \"Johnny\", \"last_name\": \"English\", \"city\": \"Kampala\", \"street\": \"Unknown 17-3\", \"address_description\": \"Description of address\", \"postal_code\": \"798983\", \"birth_date\": \"1900-12-31\", \"documents\": [ ], \"politically_exposed_people\": [ ], \"ip\": \"127.0.0.1\", \"identification_number\": \"AB123456\", \"identification_type\": \"ID\", \"external_id\": \"806ec63a-a5a7-43cc-9d75-1ee74fbcc026\", \"metadata\": { } } ``` Business Sender Example: ```json { \"type\": \"business\", \"country\": \"UG\", \"phone_country\": \"UG\", \"phone_number\": \"752403639\", \"email\": \"example@home.org\", \"name\": \"MyCompany\", \"city\": \"Kampala\", \"street\": \"Unknown 17-3\", \"postal_code\": \"798983\", \"address_description\": \"Description of address\", \"documents\": [ ], \"politically_exposed_people\": [ ], \"ip\": \"127.0.0.1\", \"identification_number\": \"AB123456\", \"identification_type\": \"ID\", \"external_id\": \"806ec63a-a5a7-43cc-9d75-1ee74fbcc026\", \"metadata\": { } } ``` [Sender in the API documentation](https://docs.transferzero.com/docs/transaction-flow/#sender)
17
17
  class Sender
18
+ attr_accessor :id
19
+
18
20
  # Type of sender to create - either person or business (defaults to person)
19
21
  attr_accessor :type
20
22
 
23
+ attr_accessor :state
24
+
21
25
  # Country of sender in 2-character alpha ISO 3166-2 country format
22
26
  attr_accessor :country
23
27
 
28
+ # Sender's street
29
+ attr_accessor :street
30
+
31
+ # Zip code of sender
32
+ attr_accessor :postal_code
33
+
34
+ # Sender's city
35
+ attr_accessor :city
36
+
24
37
  # Phone country of sender in 2-character alpha ISO 3166-2 country format
25
38
  attr_accessor :phone_country
26
39
 
@@ -30,6 +43,21 @@ module TransferZero
30
43
  # Email of sender
31
44
  attr_accessor :email
32
45
 
46
+ # IP of sender
47
+ attr_accessor :ip
48
+
49
+ # Description of address
50
+ attr_accessor :address_description
51
+
52
+ # Identification number of document used
53
+ attr_accessor :identification_number
54
+
55
+ # Document to be identified. The identification type can be one of the following: - `DL`: Driving License - `PP`: International Passport - `ID`: National ID - `OT`: Other
56
+ attr_accessor :identification_type
57
+
58
+ # Name of sender (used only with a Business sender)
59
+ attr_accessor :name
60
+
33
61
  # First name of sender (used only with a Personal sender)
34
62
  attr_accessor :first_name
35
63
 
@@ -39,47 +67,62 @@ module TransferZero
39
67
  # Last name of sender (used only with a Personal sender)
40
68
  attr_accessor :last_name
41
69
 
70
+ # Date of birth of sender (used only with a Personal sender)
71
+ attr_accessor :birth_date
72
+
42
73
  # Occupation of sender (used only with a Personal sender)
43
74
  attr_accessor :occupation
44
75
 
45
76
  # The nationality of the sender (used only with a Personal sender)
46
77
  attr_accessor :nationality
47
78
 
48
- # The onboarding status of the sender
49
- attr_accessor :onboarding_status
79
+ # Legal entity type (used only with a Business sender)
80
+ attr_accessor :legal_entity_type
50
81
 
51
- # The address of the sender
52
- attr_accessor :address
82
+ # The registration date (used only with a Business sender)
83
+ attr_accessor :registration_date
53
84
 
54
- # Description of the sender
55
- attr_accessor :description
85
+ # The registration number (used only with a Business sender)
86
+ attr_accessor :registration_number
56
87
 
57
- # Name of sender (used only with a Business sender)
58
- attr_accessor :name
88
+ # Nature of business options (used only with a Business sender)
89
+ attr_accessor :nature_of_business
59
90
 
60
- # Sender's city
61
- attr_accessor :city
91
+ # The source of funds
92
+ attr_accessor :source_of_funds
62
93
 
63
- # Sender's street
64
- attr_accessor :street
94
+ # The core activities (used only with a Business sender)
95
+ attr_accessor :core_business_activities
65
96
 
66
- # Description of address
67
- attr_accessor :address_description
97
+ # The purpose for opening their account (used only with a Business sender)
98
+ attr_accessor :purpose_of_opening_account
68
99
 
69
- # Zip code of sender
70
- attr_accessor :postal_code
100
+ # The official phone number (used only with a Business sender)
101
+ attr_accessor :office_phone
71
102
 
72
- # Date of birth of sender
73
- attr_accessor :birth_date
103
+ # The VAT registration number (used only with a Business sender)
104
+ attr_accessor :vat_registration_number
74
105
 
75
- # IP of sender
76
- attr_accessor :ip
106
+ # The Financial Regulator (used only with a Business sender)
107
+ attr_accessor :financial_regulator
77
108
 
78
- # Identification number of document used
79
- attr_accessor :identification_number
109
+ # The Regulatory Licence Number (used only with a Business sender)
110
+ attr_accessor :regulatory_licence_number
80
111
 
81
- # Document to be identified. The identification type can be one of the following: - `DL`: Driving License - `PP`: International Passport - `ID`: National ID - `OT`: Other
82
- attr_accessor :identification_type
112
+ # The contact's email address (used only with a Business sender)
113
+ attr_accessor :contact_person_email
114
+
115
+ # The Business trading country (used only with a Business sender)
116
+ attr_accessor :trading_country
117
+
118
+ # The Business trading address (used only with a Business sender)
119
+ attr_accessor :trading_address
120
+
121
+ # The estimated number of monthly transactions (used only with a Business sender)
122
+ attr_accessor :number_monthly_transactions
123
+
124
+ # The estimated amount for all transactions each month in USD (used only with a Business sender)
125
+ attr_accessor :amount_monthly_transactions
83
126
 
84
127
  # Needed for KYC checks. Required to approve the sender unless KYC is waived for your account. Please send us an empty list of documents: `\"documents\": [ ]` in the request if KYC has been waived. If the documents already exist, please send the Document ID eg. ```JSON \"documents\": [ { \"id\": \"b6648ba3-1c7b-4f59-8580-684899c84a07\" } ] ```
85
128
  attr_accessor :documents
@@ -87,16 +130,18 @@ module TransferZero
87
130
  # Metadata of sender. You can store any detail specific to your integration here (for example the local ID of the sender on your end). When requesting sender details you will receive the sent metadata back. Also when sending sender related webhooks you will receive the details stored here as well.
88
131
  attr_accessor :metadata
89
132
 
90
- attr_accessor :state
133
+ # The fields that have some problems and don't pass validation
134
+ attr_accessor :errors
91
135
 
92
- attr_accessor :id
136
+ # The onboarding status of the sender
137
+ attr_accessor :onboarding_status
138
+
139
+ # An optional list of politically exposed people, individuals who are or have been entrusted with prominent public functions by a country, for example heads of state or heads of government, senior politicians, senior government, judicial or military officials, senior executives of state owned corporations, important political party officials. There is a limit of three (3) politically exposed people per Sender. Politically exposed person example: ```json { \"politically_exposed_person\": { \"name\": \"Ronald Reagan\", \"position\": \"President of the United States\", \"started_date\": \"1981-01-20T00:00:00.000Z\", \"ended_date\": \"1989-01-20T00:00:00.000Z\", \"sender_id\": \"344fb668-196d-43db-9d94-b34b7e6c7e0b\" } } ```
140
+ attr_accessor :politically_exposed_people
93
141
 
94
142
  # Optional ID that is supplied by partner linking it to the partner's own Sender ID. Note: if present we will validate whether the sent ID is a duplicate in our system or not.
95
143
  attr_accessor :external_id
96
144
 
97
- # The fields that have some problems and don't pass validation
98
- attr_accessor :errors
99
-
100
145
  class EnumAttributeValidator
101
146
  attr_reader :datatype
102
147
  attr_reader :allowable_values
@@ -122,68 +167,98 @@ module TransferZero
122
167
  # Attribute mapping from ruby-style variable name to JSON key.
123
168
  def self.attribute_map
124
169
  {
170
+ :'id' => :'id',
125
171
  :'type' => :'type',
172
+ :'state' => :'state',
126
173
  :'country' => :'country',
174
+ :'street' => :'street',
175
+ :'postal_code' => :'postal_code',
176
+ :'city' => :'city',
127
177
  :'phone_country' => :'phone_country',
128
178
  :'phone_number' => :'phone_number',
129
179
  :'email' => :'email',
180
+ :'ip' => :'ip',
181
+ :'address_description' => :'address_description',
182
+ :'identification_number' => :'identification_number',
183
+ :'identification_type' => :'identification_type',
184
+ :'name' => :'name',
130
185
  :'first_name' => :'first_name',
131
186
  :'middle_name' => :'middle_name',
132
187
  :'last_name' => :'last_name',
188
+ :'birth_date' => :'birth_date',
133
189
  :'occupation' => :'occupation',
134
190
  :'nationality' => :'nationality',
135
- :'onboarding_status' => :'onboarding_status',
136
- :'address' => :'address',
137
- :'description' => :'description',
138
- :'name' => :'name',
139
- :'city' => :'city',
140
- :'street' => :'street',
141
- :'address_description' => :'address_description',
142
- :'postal_code' => :'postal_code',
143
- :'birth_date' => :'birth_date',
144
- :'ip' => :'ip',
145
- :'identification_number' => :'identification_number',
146
- :'identification_type' => :'identification_type',
191
+ :'legal_entity_type' => :'legal_entity_type',
192
+ :'registration_date' => :'registration_date',
193
+ :'registration_number' => :'registration_number',
194
+ :'nature_of_business' => :'nature_of_business',
195
+ :'source_of_funds' => :'source_of_funds',
196
+ :'core_business_activities' => :'core_business_activities',
197
+ :'purpose_of_opening_account' => :'purpose_of_opening_account',
198
+ :'office_phone' => :'office_phone',
199
+ :'vat_registration_number' => :'vat_registration_number',
200
+ :'financial_regulator' => :'financial_regulator',
201
+ :'regulatory_licence_number' => :'regulatory_licence_number',
202
+ :'contact_person_email' => :'contact_person_email',
203
+ :'trading_country' => :'trading_country',
204
+ :'trading_address' => :'trading_address',
205
+ :'number_monthly_transactions' => :'number_monthly_transactions',
206
+ :'amount_monthly_transactions' => :'amount_monthly_transactions',
147
207
  :'documents' => :'documents',
148
208
  :'metadata' => :'metadata',
149
- :'state' => :'state',
150
- :'id' => :'id',
151
- :'external_id' => :'external_id',
152
- :'errors' => :'errors'
209
+ :'errors' => :'errors',
210
+ :'onboarding_status' => :'onboarding_status',
211
+ :'politically_exposed_people' => :'politically_exposed_people',
212
+ :'external_id' => :'external_id'
153
213
  }
154
214
  end
155
215
 
156
216
  # Attribute type mapping.
157
217
  def self.openapi_types
158
218
  {
219
+ :'id' => :'String',
159
220
  :'type' => :'String',
221
+ :'state' => :'SenderState',
160
222
  :'country' => :'String',
223
+ :'street' => :'String',
224
+ :'postal_code' => :'String',
225
+ :'city' => :'String',
161
226
  :'phone_country' => :'String',
162
227
  :'phone_number' => :'String',
163
228
  :'email' => :'String',
229
+ :'ip' => :'String',
230
+ :'address_description' => :'String',
231
+ :'identification_number' => :'String',
232
+ :'identification_type' => :'String',
233
+ :'name' => :'String',
164
234
  :'first_name' => :'String',
165
235
  :'middle_name' => :'String',
166
236
  :'last_name' => :'String',
237
+ :'birth_date' => :'Date',
167
238
  :'occupation' => :'String',
168
239
  :'nationality' => :'String',
169
- :'onboarding_status' => :'String',
170
- :'address' => :'String',
171
- :'description' => :'String',
172
- :'name' => :'String',
173
- :'city' => :'String',
174
- :'street' => :'String',
175
- :'address_description' => :'String',
176
- :'postal_code' => :'String',
177
- :'birth_date' => :'Date',
178
- :'ip' => :'String',
179
- :'identification_number' => :'String',
180
- :'identification_type' => :'String',
240
+ :'legal_entity_type' => :'String',
241
+ :'registration_date' => :'String',
242
+ :'registration_number' => :'String',
243
+ :'nature_of_business' => :'String',
244
+ :'source_of_funds' => :'String',
245
+ :'core_business_activities' => :'String',
246
+ :'purpose_of_opening_account' => :'String',
247
+ :'office_phone' => :'String',
248
+ :'vat_registration_number' => :'String',
249
+ :'financial_regulator' => :'String',
250
+ :'regulatory_licence_number' => :'String',
251
+ :'contact_person_email' => :'String',
252
+ :'trading_country' => :'String',
253
+ :'trading_address' => :'String',
254
+ :'number_monthly_transactions' => :'String',
255
+ :'amount_monthly_transactions' => :'String',
181
256
  :'documents' => :'Array<Document>',
182
257
  :'metadata' => :'Object',
183
- :'state' => :'SenderState',
184
- :'id' => :'String',
185
- :'external_id' => :'String',
186
- :'errors' => :'Hash<String, Array<ValidationErrorDescription>>'
258
+ :'errors' => :'Hash<String, Array<ValidationErrorDescription>>',
259
+ :'onboarding_status' => :'String',
260
+ :'politically_exposed_people' => :'Array<PoliticallyExposedPerson>',
261
+ :'external_id' => :'String'
187
262
  }
188
263
  end
189
264
 
@@ -202,14 +277,34 @@ module TransferZero
202
277
  h[k.to_sym] = v
203
278
  }
204
279
 
280
+ if attributes.key?(:'id')
281
+ self.id = attributes[:'id']
282
+ end
283
+
205
284
  if attributes.key?(:'type')
206
285
  self.type = attributes[:'type']
207
286
  end
208
287
 
288
+ if attributes.key?(:'state')
289
+ self.state = attributes[:'state']
290
+ end
291
+
209
292
  if attributes.key?(:'country')
210
293
  self.country = attributes[:'country']
211
294
  end
212
295
 
296
+ if attributes.key?(:'street')
297
+ self.street = attributes[:'street']
298
+ end
299
+
300
+ if attributes.key?(:'postal_code')
301
+ self.postal_code = attributes[:'postal_code']
302
+ end
303
+
304
+ if attributes.key?(:'city')
305
+ self.city = attributes[:'city']
306
+ end
307
+
213
308
  if attributes.key?(:'phone_country')
214
309
  self.phone_country = attributes[:'phone_country']
215
310
  end
@@ -222,6 +317,26 @@ module TransferZero
222
317
  self.email = attributes[:'email']
223
318
  end
224
319
 
320
+ if attributes.key?(:'ip')
321
+ self.ip = attributes[:'ip']
322
+ end
323
+
324
+ if attributes.key?(:'address_description')
325
+ self.address_description = attributes[:'address_description']
326
+ end
327
+
328
+ if attributes.key?(:'identification_number')
329
+ self.identification_number = attributes[:'identification_number']
330
+ end
331
+
332
+ if attributes.key?(:'identification_type')
333
+ self.identification_type = attributes[:'identification_type']
334
+ end
335
+
336
+ if attributes.key?(:'name')
337
+ self.name = attributes[:'name']
338
+ end
339
+
225
340
  if attributes.key?(:'first_name')
226
341
  self.first_name = attributes[:'first_name']
227
342
  end
@@ -234,6 +349,10 @@ module TransferZero
234
349
  self.last_name = attributes[:'last_name']
235
350
  end
236
351
 
352
+ if attributes.key?(:'birth_date')
353
+ self.birth_date = attributes[:'birth_date']
354
+ end
355
+
237
356
  if attributes.key?(:'occupation')
238
357
  self.occupation = attributes[:'occupation']
239
358
  end
@@ -242,52 +361,68 @@ module TransferZero
242
361
  self.nationality = attributes[:'nationality']
243
362
  end
244
363
 
245
- if attributes.key?(:'onboarding_status')
246
- self.onboarding_status = attributes[:'onboarding_status']
364
+ if attributes.key?(:'legal_entity_type')
365
+ self.legal_entity_type = attributes[:'legal_entity_type']
247
366
  end
248
367
 
249
- if attributes.key?(:'address')
250
- self.address = attributes[:'address']
368
+ if attributes.key?(:'registration_date')
369
+ self.registration_date = attributes[:'registration_date']
251
370
  end
252
371
 
253
- if attributes.key?(:'description')
254
- self.description = attributes[:'description']
372
+ if attributes.key?(:'registration_number')
373
+ self.registration_number = attributes[:'registration_number']
255
374
  end
256
375
 
257
- if attributes.key?(:'name')
258
- self.name = attributes[:'name']
376
+ if attributes.key?(:'nature_of_business')
377
+ self.nature_of_business = attributes[:'nature_of_business']
259
378
  end
260
379
 
261
- if attributes.key?(:'city')
262
- self.city = attributes[:'city']
380
+ if attributes.key?(:'source_of_funds')
381
+ self.source_of_funds = attributes[:'source_of_funds']
263
382
  end
264
383
 
265
- if attributes.key?(:'street')
266
- self.street = attributes[:'street']
384
+ if attributes.key?(:'core_business_activities')
385
+ self.core_business_activities = attributes[:'core_business_activities']
267
386
  end
268
387
 
269
- if attributes.key?(:'address_description')
270
- self.address_description = attributes[:'address_description']
388
+ if attributes.key?(:'purpose_of_opening_account')
389
+ self.purpose_of_opening_account = attributes[:'purpose_of_opening_account']
271
390
  end
272
391
 
273
- if attributes.key?(:'postal_code')
274
- self.postal_code = attributes[:'postal_code']
392
+ if attributes.key?(:'office_phone')
393
+ self.office_phone = attributes[:'office_phone']
275
394
  end
276
395
 
277
- if attributes.key?(:'birth_date')
278
- self.birth_date = attributes[:'birth_date']
396
+ if attributes.key?(:'vat_registration_number')
397
+ self.vat_registration_number = attributes[:'vat_registration_number']
279
398
  end
280
399
 
281
- if attributes.key?(:'ip')
282
- self.ip = attributes[:'ip']
400
+ if attributes.key?(:'financial_regulator')
401
+ self.financial_regulator = attributes[:'financial_regulator']
283
402
  end
284
403
 
285
- if attributes.key?(:'identification_number')
286
- self.identification_number = attributes[:'identification_number']
404
+ if attributes.key?(:'regulatory_licence_number')
405
+ self.regulatory_licence_number = attributes[:'regulatory_licence_number']
287
406
  end
288
407
 
289
- if attributes.key?(:'identification_type')
290
- self.identification_type = attributes[:'identification_type']
408
+ if attributes.key?(:'contact_person_email')
409
+ self.contact_person_email = attributes[:'contact_person_email']
410
+ end
411
+
412
+ if attributes.key?(:'trading_country')
413
+ self.trading_country = attributes[:'trading_country']
414
+ end
415
+
416
+ if attributes.key?(:'trading_address')
417
+ self.trading_address = attributes[:'trading_address']
418
+ end
419
+
420
+ if attributes.key?(:'number_monthly_transactions')
421
+ self.number_monthly_transactions = attributes[:'number_monthly_transactions']
422
+ end
423
+
424
+ if attributes.key?(:'amount_monthly_transactions')
425
+ self.amount_monthly_transactions = attributes[:'amount_monthly_transactions']
291
426
  end
292
427
 
293
428
  if attributes.key?(:'documents')
@@ -300,22 +435,24 @@ module TransferZero
300
435
  self.metadata = attributes[:'metadata']
301
436
  end
302
437
 
303
- if attributes.key?(:'state')
304
- self.state = attributes[:'state']
438
+ if attributes.key?(:'errors')
439
+ if (value = attributes[:'errors']).is_a?(Hash)
440
+ self.errors = value
441
+ end
305
442
  end
306
443
 
307
- if attributes.key?(:'id')
308
- self.id = attributes[:'id']
444
+ if attributes.key?(:'onboarding_status')
445
+ self.onboarding_status = attributes[:'onboarding_status']
309
446
  end
310
447
 
311
- if attributes.key?(:'external_id')
312
- self.external_id = attributes[:'external_id']
448
+ if attributes.key?(:'politically_exposed_people')
449
+ if (value = attributes[:'politically_exposed_people']).is_a?(Array)
450
+ self.politically_exposed_people = value
451
+ end
313
452
  end
314
453
 
315
- if attributes.key?(:'errors')
316
- if (value = attributes[:'errors']).is_a?(Hash)
317
- self.errors = value
318
- end
454
+ if attributes.key?(:'external_id')
455
+ self.external_id = attributes[:'external_id']
319
456
  end
320
457
  end
321
458
 
@@ -327,24 +464,24 @@ module TransferZero
327
464
  invalid_properties.push('invalid value for "country", country cannot be nil.')
328
465
  end
329
466
 
330
- if @phone_country.nil?
331
- invalid_properties.push('invalid value for "phone_country", phone_country cannot be nil.')
467
+ if @street.nil?
468
+ invalid_properties.push('invalid value for "street", street cannot be nil.')
332
469
  end
333
470
 
334
- if @email.nil?
335
- invalid_properties.push('invalid value for "email", email cannot be nil.')
471
+ if @postal_code.nil?
472
+ invalid_properties.push('invalid value for "postal_code", postal_code cannot be nil.')
336
473
  end
337
474
 
338
475
  if @city.nil?
339
476
  invalid_properties.push('invalid value for "city", city cannot be nil.')
340
477
  end
341
478
 
342
- if @street.nil?
343
- invalid_properties.push('invalid value for "street", street cannot be nil.')
479
+ if @phone_country.nil?
480
+ invalid_properties.push('invalid value for "phone_country", phone_country cannot be nil.')
344
481
  end
345
482
 
346
- if @postal_code.nil?
347
- invalid_properties.push('invalid value for "postal_code", postal_code cannot be nil.')
483
+ if @email.nil?
484
+ invalid_properties.push('invalid value for "email", email cannot be nil.')
348
485
  end
349
486
 
350
487
  if @ip.nil?
@@ -364,14 +501,16 @@ module TransferZero
364
501
  type_validator = EnumAttributeValidator.new('String', ["person", "business"])
365
502
  return false unless type_validator.valid?(@type)
366
503
  return false if @country.nil?
367
- return false if @phone_country.nil?
368
- return false if @email.nil?
369
- return false if @city.nil?
370
504
  return false if @street.nil?
371
505
  return false if @postal_code.nil?
506
+ return false if @city.nil?
507
+ return false if @phone_country.nil?
508
+ return false if @email.nil?
372
509
  return false if @ip.nil?
373
510
  identification_type_validator = EnumAttributeValidator.new('String', ["DL", "PP", "ID", "OT"])
374
511
  return false unless identification_type_validator.valid?(@identification_type)
512
+ legal_entity_type_validator = EnumAttributeValidator.new('String', ["sole_proprietorship", "partnership", "privately_owned_company", "publicly_owned_company", "government_owned_entity", "trust", "ngo", "club_and_society", "go", "other", "financial_institution"])
513
+ return false unless legal_entity_type_validator.valid?(@legal_entity_type)
375
514
  return false if @documents.nil?
376
515
  true
377
516
  end
@@ -396,39 +535,64 @@ module TransferZero
396
535
  @identification_type = identification_type
397
536
  end
398
537
 
538
+ # Custom attribute writer method checking allowed values (enum).
539
+ # @param [Object] legal_entity_type Object to be assigned
540
+ def legal_entity_type=(legal_entity_type)
541
+ validator = EnumAttributeValidator.new('String', ["sole_proprietorship", "partnership", "privately_owned_company", "publicly_owned_company", "government_owned_entity", "trust", "ngo", "club_and_society", "go", "other", "financial_institution"])
542
+ unless validator.valid?(legal_entity_type)
543
+ fail ArgumentError, "invalid value for \"legal_entity_type\", must be one of #{validator.allowable_values}."
544
+ end
545
+ @legal_entity_type = legal_entity_type
546
+ end
547
+
399
548
  # Checks equality by comparing each attribute.
400
549
  # @param [Object] Object to be compared
401
550
  def ==(o)
402
551
  return true if self.equal?(o)
403
552
  self.class == o.class &&
553
+ id == o.id &&
404
554
  type == o.type &&
555
+ state == o.state &&
405
556
  country == o.country &&
557
+ street == o.street &&
558
+ postal_code == o.postal_code &&
559
+ city == o.city &&
406
560
  phone_country == o.phone_country &&
407
561
  phone_number == o.phone_number &&
408
562
  email == o.email &&
563
+ ip == o.ip &&
564
+ address_description == o.address_description &&
565
+ identification_number == o.identification_number &&
566
+ identification_type == o.identification_type &&
567
+ name == o.name &&
409
568
  first_name == o.first_name &&
410
569
  middle_name == o.middle_name &&
411
570
  last_name == o.last_name &&
571
+ birth_date == o.birth_date &&
412
572
  occupation == o.occupation &&
413
573
  nationality == o.nationality &&
414
- onboarding_status == o.onboarding_status &&
415
- address == o.address &&
416
- description == o.description &&
417
- name == o.name &&
418
- city == o.city &&
419
- street == o.street &&
420
- address_description == o.address_description &&
421
- postal_code == o.postal_code &&
422
- birth_date == o.birth_date &&
423
- ip == o.ip &&
424
- identification_number == o.identification_number &&
425
- identification_type == o.identification_type &&
574
+ legal_entity_type == o.legal_entity_type &&
575
+ registration_date == o.registration_date &&
576
+ registration_number == o.registration_number &&
577
+ nature_of_business == o.nature_of_business &&
578
+ source_of_funds == o.source_of_funds &&
579
+ core_business_activities == o.core_business_activities &&
580
+ purpose_of_opening_account == o.purpose_of_opening_account &&
581
+ office_phone == o.office_phone &&
582
+ vat_registration_number == o.vat_registration_number &&
583
+ financial_regulator == o.financial_regulator &&
584
+ regulatory_licence_number == o.regulatory_licence_number &&
585
+ contact_person_email == o.contact_person_email &&
586
+ trading_country == o.trading_country &&
587
+ trading_address == o.trading_address &&
588
+ number_monthly_transactions == o.number_monthly_transactions &&
589
+ amount_monthly_transactions == o.amount_monthly_transactions &&
426
590
  documents == o.documents &&
427
591
  metadata == o.metadata &&
428
- state == o.state &&
429
- id == o.id &&
430
- external_id == o.external_id &&
431
- errors == o.errors
592
+ errors == o.errors &&
593
+ onboarding_status == o.onboarding_status &&
594
+ politically_exposed_people == o.politically_exposed_people &&
595
+ external_id == o.external_id
432
596
  end
433
597
 
434
598
  # @see the `==` method
@@ -440,7 +604,7 @@ module TransferZero
440
604
  # Calculates hash code according to all attributes.
441
605
  # @return [Integer] Hash code
442
606
  def hash
443
- [type, country, phone_country, phone_number, email, first_name, middle_name, last_name, occupation, nationality, onboarding_status, address, description, name, city, street, address_description, postal_code, birth_date, ip, identification_number, identification_type, documents, metadata, state, id, external_id, errors].hash
607
+ [id, type, state, country, street, postal_code, city, phone_country, phone_number, email, ip, address_description, identification_number, identification_type, name, first_name, middle_name, last_name, birth_date, occupation, nationality, legal_entity_type, registration_date, registration_number, nature_of_business, source_of_funds, core_business_activities, purpose_of_opening_account, office_phone, vat_registration_number, financial_regulator, regulatory_licence_number, contact_person_email, trading_country, trading_address, number_monthly_transactions, amount_monthly_transactions, documents, metadata, errors, onboarding_status, politically_exposed_people, external_id].hash
444
608
  end
445
609
 
446
610
  require 'active_support/core_ext/hash'