Class: TreezorClient::User

Inherits:
Object
  • Object
show all
Defined in:
lib/treezor_client/models/user.rb

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ User

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
# File 'lib/treezor_client/models/user.rb', line 263

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}

  if attributes.has_key?(:'userId')
    self.user_id = attributes[:'userId']
  end

  if attributes.has_key?(:'userTypeId')
    self.user_type_id = attributes[:'userTypeId']
  end

  if attributes.has_key?(:'userStatus')
    self.user_status = attributes[:'userStatus']
  end

  if attributes.has_key?(:'userTag')
    self.user_tag = attributes[:'userTag']
  end

  if attributes.has_key?(:'parentUserId')
    self.parent_user_id = attributes[:'parentUserId']
  end

  if attributes.has_key?(:'parentType')
    self.parent_type = attributes[:'parentType']
  end

  if attributes.has_key?(:'title')
    self.title = attributes[:'title']
  end

  if attributes.has_key?(:'firstname')
    self.firstname = attributes[:'firstname']
  end

  if attributes.has_key?(:'lastname')
    self.lastname = attributes[:'lastname']
  end

  if attributes.has_key?(:'middleNames')
    self.middle_names = attributes[:'middleNames']
  end

  if attributes.has_key?(:'birthday')
    self.birthday = attributes[:'birthday']
  end

  if attributes.has_key?(:'email')
    self.email = attributes[:'email']
  end

  if attributes.has_key?(:'address1')
    self.address1 = attributes[:'address1']
  end

  if attributes.has_key?(:'address2')
    self.address2 = attributes[:'address2']
  end

  if attributes.has_key?(:'postcode')
    self.postcode = attributes[:'postcode']
  end

  if attributes.has_key?(:'city')
    self.city = attributes[:'city']
  end

  if attributes.has_key?(:'state')
    self.state = attributes[:'state']
  end

  if attributes.has_key?(:'country')
    self.country = attributes[:'country']
  end

  if attributes.has_key?(:'countryName')
    self.country_name = attributes[:'countryName']
  end

  if attributes.has_key?(:'phone')
    self.phone = attributes[:'phone']
  end

  if attributes.has_key?(:'mobile')
    self.mobile = attributes[:'mobile']
  end

  if attributes.has_key?(:'nationality')
    self.nationality = attributes[:'nationality']
  end

  if attributes.has_key?(:'nationalityOther')
    self.nationality_other = attributes[:'nationalityOther']
  end

  if attributes.has_key?(:'placeOfBirth')
    self.place_of_birth = attributes[:'placeOfBirth']
  end

  if attributes.has_key?(:'placeCountry')
    self.place_country = attributes[:'placeCountry']
  end

  if attributes.has_key?(:'occupation')
    self.occupation = attributes[:'occupation']
  end

  if attributes.has_key?(:'incomeRange')
    self.income_range = attributes[:'incomeRange']
  end

  if attributes.has_key?(:'legalName')
    self.legal_name = attributes[:'legalName']
  end

  if attributes.has_key?(:'legalNameEmbossed')
    self.legal_name_embossed = attributes[:'legalNameEmbossed']
  end

  if attributes.has_key?(:'legalRegistrationNumber')
    self.legal_registration_number = attributes[:'legalRegistrationNumber']
  end

  if attributes.has_key?(:'legalTvaNumber')
    self.legal_tva_number = attributes[:'legalTvaNumber']
  end

  if attributes.has_key?(:'legalRegistrationDate')
    self.legal_registration_date = attributes[:'legalRegistrationDate']
  end

  if attributes.has_key?(:'legalForm')
    self.legal_form = attributes[:'legalForm']
  end

  if attributes.has_key?(:'legalShareCapital')
    self.legal_share_capital = attributes[:'legalShareCapital']
  end

  if attributes.has_key?(:'legalSector')
    self.legal_sector = attributes[:'legalSector']
  end

  if attributes.has_key?(:'legalAnnualTurnOver')
    self.legal_annual_turn_over = attributes[:'legalAnnualTurnOver']
  end

  if attributes.has_key?(:'legalNetIncomeRange')
    self.legal_net_income_range = attributes[:'legalNetIncomeRange']
  end

  if attributes.has_key?(:'legalNumberOfEmployeeRange')
    self.legal_number_of_employee_range = attributes[:'legalNumberOfEmployeeRange']
  end

  if attributes.has_key?(:'effectiveBeneficiary')
    self.effective_beneficiary = attributes[:'effectiveBeneficiary']
  end

  if attributes.has_key?(:'kycLevel')
    self.kyc_level = attributes[:'kycLevel']
  end

  if attributes.has_key?(:'kycReview')
    self.kyc_review = attributes[:'kycReview']
  end

  if attributes.has_key?(:'kycReviewComment')
    self.kyc_review_comment = attributes[:'kycReviewComment']
  end

  if attributes.has_key?(:'isFreezed')
    self.is_freezed = attributes[:'isFreezed']
  end

  if attributes.has_key?(:'language')
    self.language = attributes[:'language']
  end

  if attributes.has_key?(:'optInMailing')
    self.opt_in_mailing = attributes[:'optInMailing']
  end

  if attributes.has_key?(:'sepaCreditorIdentifier')
    self.sepa_creditor_identifier = attributes[:'sepaCreditorIdentifier']
  end

  if attributes.has_key?(:'createdDate')
    self.created_date = attributes[:'createdDate']
  end

  if attributes.has_key?(:'modifiedDate')
    self.modified_date = attributes[:'modifiedDate']
  end

  if attributes.has_key?(:'walletCount')
    self.wallet_count = attributes[:'walletCount']
  end

  if attributes.has_key?(:'payinCount')
    self.payin_count = attributes[:'payinCount']
  end

  if attributes.has_key?(:'totalRows')
    self.total_rows = attributes[:'totalRows']
  end

end

Instance Attribute Details

#address1Object

Returns the value of attribute address1



42
43
44
# File 'lib/treezor_client/models/user.rb', line 42

def address1
  @address1
end

#address2Object

Returns the value of attribute address2



44
45
46
# File 'lib/treezor_client/models/user.rb', line 44

def address2
  @address2
end

#birthdayObject

Returns the value of attribute birthday



38
39
40
# File 'lib/treezor_client/models/user.rb', line 38

def birthday
  @birthday
end

#cityObject

Returns the value of attribute city



48
49
50
# File 'lib/treezor_client/models/user.rb', line 48

def city
  @city
end

#countryObject

Returns the value of attribute country



52
53
54
# File 'lib/treezor_client/models/user.rb', line 52

def country
  @country
end

#country_nameObject

Returns the value of attribute country_name



54
55
56
# File 'lib/treezor_client/models/user.rb', line 54

def country_name
  @country_name
end

#created_dateObject

Date YYYY-MM-DD HH:MM:SS



114
115
116
# File 'lib/treezor_client/models/user.rb', line 114

def created_date
  @created_date
end

#effective_beneficiaryObject

Returns the value of attribute effective_beneficiary



95
96
97
# File 'lib/treezor_client/models/user.rb', line 95

def effective_beneficiary
  @effective_beneficiary
end

#emailObject

Returns the value of attribute email



40
41
42
# File 'lib/treezor_client/models/user.rb', line 40

def email
  @email
end

#firstnameObject

Returns the value of attribute firstname



32
33
34
# File 'lib/treezor_client/models/user.rb', line 32

def firstname
  @firstname
end

#income_rangeObject

Returns the value of attribute income_range



70
71
72
# File 'lib/treezor_client/models/user.rb', line 70

def income_range
  @income_range
end

#is_freezedObject

Returns the value of attribute is_freezed



105
106
107
# File 'lib/treezor_client/models/user.rb', line 105

def is_freezed
  @is_freezed
end

#kyc_levelObject

| Value | Description | |—-|—-| | 0 | NONE | | 1 | LIGHT | | 2 | REGULAR | | 4 | REFUSED |



98
99
100
# File 'lib/treezor_client/models/user.rb', line 98

def kyc_level
  @kyc_level
end

#kyc_reviewObject

| Value | Description | |—-|—-| | 0 | NONE | | 1 | PENDING | | 2 | VALIDATED | | 3 | REFUSED |



101
102
103
# File 'lib/treezor_client/models/user.rb', line 101

def kyc_review
  @kyc_review
end

#kyc_review_commentObject

Returns the value of attribute kyc_review_comment



103
104
105
# File 'lib/treezor_client/models/user.rb', line 103

def kyc_review_comment
  @kyc_review_comment
end

#languageObject

Returns the value of attribute language



107
108
109
# File 'lib/treezor_client/models/user.rb', line 107

def language
  @language
end

#lastnameObject

Returns the value of attribute lastname



34
35
36
# File 'lib/treezor_client/models/user.rb', line 34

def lastname
  @lastname
end

Returns the value of attribute legal_annual_turn_over



89
90
91
# File 'lib/treezor_client/models/user.rb', line 89

def legal_annual_turn_over
  @legal_annual_turn_over
end

Returns the value of attribute legal_form



83
84
85
# File 'lib/treezor_client/models/user.rb', line 83

def legal_form
  @legal_form
end

Returns the value of attribute legal_name



72
73
74
# File 'lib/treezor_client/models/user.rb', line 72

def legal_name
  @legal_name
end

Returns the value of attribute legal_name_embossed



74
75
76
# File 'lib/treezor_client/models/user.rb', line 74

def legal_name_embossed
  @legal_name_embossed
end

Returns the value of attribute legal_net_income_range



91
92
93
# File 'lib/treezor_client/models/user.rb', line 91

def legal_net_income_range
  @legal_net_income_range
end

Returns the value of attribute legal_number_of_employee_range



93
94
95
# File 'lib/treezor_client/models/user.rb', line 93

def legal_number_of_employee_range
  @legal_number_of_employee_range
end

Date YYYY-MM-DD



81
82
83
# File 'lib/treezor_client/models/user.rb', line 81

def legal_registration_date
  @legal_registration_date
end

Returns the value of attribute legal_registration_number



76
77
78
# File 'lib/treezor_client/models/user.rb', line 76

def legal_registration_number
  @legal_registration_number
end

Returns the value of attribute legal_sector



87
88
89
# File 'lib/treezor_client/models/user.rb', line 87

def legal_sector
  @legal_sector
end

Returns the value of attribute legal_share_capital



85
86
87
# File 'lib/treezor_client/models/user.rb', line 85

def legal_share_capital
  @legal_share_capital
end

Returns the value of attribute legal_tva_number



78
79
80
# File 'lib/treezor_client/models/user.rb', line 78

def legal_tva_number
  @legal_tva_number
end

#middle_namesObject

Returns the value of attribute middle_names



36
37
38
# File 'lib/treezor_client/models/user.rb', line 36

def middle_names
  @middle_names
end

#mobileObject

Returns the value of attribute mobile



58
59
60
# File 'lib/treezor_client/models/user.rb', line 58

def mobile
  @mobile
end

#modified_dateObject

Date YYYY-MM-DD HH:MM:SS



117
118
119
# File 'lib/treezor_client/models/user.rb', line 117

def modified_date
  @modified_date
end

#nationalityObject

Returns the value of attribute nationality



60
61
62
# File 'lib/treezor_client/models/user.rb', line 60

def nationality
  @nationality
end

#nationality_otherObject

Returns the value of attribute nationality_other



62
63
64
# File 'lib/treezor_client/models/user.rb', line 62

def nationality_other
  @nationality_other
end

#occupationObject

Returns the value of attribute occupation



68
69
70
# File 'lib/treezor_client/models/user.rb', line 68

def occupation
  @occupation
end

#opt_in_mailingObject

Returns the value of attribute opt_in_mailing



109
110
111
# File 'lib/treezor_client/models/user.rb', line 109

def opt_in_mailing
  @opt_in_mailing
end

#parent_typeObject

Returns the value of attribute parent_type



28
29
30
# File 'lib/treezor_client/models/user.rb', line 28

def parent_type
  @parent_type
end

#parent_user_idObject

Returns the value of attribute parent_user_id



26
27
28
# File 'lib/treezor_client/models/user.rb', line 26

def parent_user_id
  @parent_user_id
end

#payin_countObject

Returns the value of attribute payin_count



121
122
123
# File 'lib/treezor_client/models/user.rb', line 121

def payin_count
  @payin_count
end

#phoneObject

Returns the value of attribute phone



56
57
58
# File 'lib/treezor_client/models/user.rb', line 56

def phone
  @phone
end

#place_countryObject

Returns the value of attribute place_country



66
67
68
# File 'lib/treezor_client/models/user.rb', line 66

def place_country
  @place_country
end

#place_of_birthObject

Returns the value of attribute place_of_birth



64
65
66
# File 'lib/treezor_client/models/user.rb', line 64

def place_of_birth
  @place_of_birth
end

#postcodeObject

Returns the value of attribute postcode



46
47
48
# File 'lib/treezor_client/models/user.rb', line 46

def postcode
  @postcode
end

#sepa_creditor_identifierObject

Returns the value of attribute sepa_creditor_identifier



111
112
113
# File 'lib/treezor_client/models/user.rb', line 111

def sepa_creditor_identifier
  @sepa_creditor_identifier
end

#stateObject

Returns the value of attribute state



50
51
52
# File 'lib/treezor_client/models/user.rb', line 50

def state
  @state
end

#titleObject

Returns the value of attribute title



30
31
32
# File 'lib/treezor_client/models/user.rb', line 30

def title
  @title
end

#total_rowsObject

Returns the value of attribute total_rows



123
124
125
# File 'lib/treezor_client/models/user.rb', line 123

def total_rows
  @total_rows
end

#user_idObject

Returns the value of attribute user_id



18
19
20
# File 'lib/treezor_client/models/user.rb', line 18

def user_id
  @user_id
end

#user_statusObject

Returns the value of attribute user_status



22
23
24
# File 'lib/treezor_client/models/user.rb', line 22

def user_status
  @user_status
end

#user_tagObject

Returns the value of attribute user_tag



24
25
26
# File 'lib/treezor_client/models/user.rb', line 24

def user_tag
  @user_tag
end

#user_type_idObject

Returns the value of attribute user_type_id



20
21
22
# File 'lib/treezor_client/models/user.rb', line 20

def user_type_id
  @user_type_id
end

#wallet_countObject

Returns the value of attribute wallet_count



119
120
121
# File 'lib/treezor_client/models/user.rb', line 119

def wallet_count
  @wallet_count
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
# File 'lib/treezor_client/models/user.rb', line 148

def self.attribute_map
  {
    :'user_id' => :'userId',
    :'user_type_id' => :'userTypeId',
    :'user_status' => :'userStatus',
    :'user_tag' => :'userTag',
    :'parent_user_id' => :'parentUserId',
    :'parent_type' => :'parentType',
    :'title' => :'title',
    :'firstname' => :'firstname',
    :'lastname' => :'lastname',
    :'middle_names' => :'middleNames',
    :'birthday' => :'birthday',
    :'email' => :'email',
    :'address1' => :'address1',
    :'address2' => :'address2',
    :'postcode' => :'postcode',
    :'city' => :'city',
    :'state' => :'state',
    :'country' => :'country',
    :'country_name' => :'countryName',
    :'phone' => :'phone',
    :'mobile' => :'mobile',
    :'nationality' => :'nationality',
    :'nationality_other' => :'nationalityOther',
    :'place_of_birth' => :'placeOfBirth',
    :'place_country' => :'placeCountry',
    :'occupation' => :'occupation',
    :'income_range' => :'incomeRange',
    :'legal_name' => :'legalName',
    :'legal_name_embossed' => :'legalNameEmbossed',
    :'legal_registration_number' => :'legalRegistrationNumber',
    :'legal_tva_number' => :'legalTvaNumber',
    :'legal_registration_date' => :'legalRegistrationDate',
    :'legal_form' => :'legalForm',
    :'legal_share_capital' => :'legalShareCapital',
    :'legal_sector' => :'legalSector',
    :'legal_annual_turn_over' => :'legalAnnualTurnOver',
    :'legal_net_income_range' => :'legalNetIncomeRange',
    :'legal_number_of_employee_range' => :'legalNumberOfEmployeeRange',
    :'effective_beneficiary' => :'effectiveBeneficiary',
    :'kyc_level' => :'kycLevel',
    :'kyc_review' => :'kycReview',
    :'kyc_review_comment' => :'kycReviewComment',
    :'is_freezed' => :'isFreezed',
    :'language' => :'language',
    :'opt_in_mailing' => :'optInMailing',
    :'sepa_creditor_identifier' => :'sepaCreditorIdentifier',
    :'created_date' => :'createdDate',
    :'modified_date' => :'modifiedDate',
    :'wallet_count' => :'walletCount',
    :'payin_count' => :'payinCount',
    :'total_rows' => :'totalRows'
  }
end

.swagger_typesObject

Attribute type mapping.



205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
# File 'lib/treezor_client/models/user.rb', line 205

def self.swagger_types
  {
    :'user_id' => :'Integer',
    :'user_type_id' => :'Integer',
    :'user_status' => :'String',
    :'user_tag' => :'String',
    :'parent_user_id' => :'Integer',
    :'parent_type' => :'String',
    :'title' => :'String',
    :'firstname' => :'String',
    :'lastname' => :'String',
    :'middle_names' => :'String',
    :'birthday' => :'String',
    :'email' => :'String',
    :'address1' => :'String',
    :'address2' => :'String',
    :'postcode' => :'String',
    :'city' => :'String',
    :'state' => :'String',
    :'country' => :'String',
    :'country_name' => :'String',
    :'phone' => :'String',
    :'mobile' => :'String',
    :'nationality' => :'String',
    :'nationality_other' => :'String',
    :'place_of_birth' => :'String',
    :'place_country' => :'String',
    :'occupation' => :'String',
    :'income_range' => :'String',
    :'legal_name' => :'String',
    :'legal_name_embossed' => :'String',
    :'legal_registration_number' => :'String',
    :'legal_tva_number' => :'String',
    :'legal_registration_date' => :'String',
    :'legal_form' => :'String',
    :'legal_share_capital' => :'Integer',
    :'legal_sector' => :'String',
    :'legal_annual_turn_over' => :'String',
    :'legal_net_income_range' => :'String',
    :'legal_number_of_employee_range' => :'String',
    :'effective_beneficiary' => :'Integer',
    :'kyc_level' => :'Integer',
    :'kyc_review' => :'Integer',
    :'kyc_review_comment' => :'String',
    :'is_freezed' => :'Integer',
    :'language' => :'String',
    :'opt_in_mailing' => :'Integer',
    :'sepa_creditor_identifier' => :'String',
    :'created_date' => :'String',
    :'modified_date' => :'String',
    :'wallet_count' => :'Integer',
    :'payin_count' => :'Integer',
    :'total_rows' => :'Integer'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
# File 'lib/treezor_client/models/user.rb', line 514

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      user_id == o.user_id &&
      user_type_id == o.user_type_id &&
      user_status == o.user_status &&
      user_tag == o.user_tag &&
      parent_user_id == o.parent_user_id &&
      parent_type == o.parent_type &&
      title == o.title &&
      firstname == o.firstname &&
      lastname == o.lastname &&
      middle_names == o.middle_names &&
      birthday == o.birthday &&
      email == o.email &&
      address1 == o.address1 &&
      address2 == o.address2 &&
      postcode == o.postcode &&
      city == o.city &&
      state == o.state &&
      country == o.country &&
      country_name == o.country_name &&
      phone == o.phone &&
      mobile == o.mobile &&
      nationality == o.nationality &&
      nationality_other == o.nationality_other &&
      place_of_birth == o.place_of_birth &&
      place_country == o.place_country &&
      occupation == o.occupation &&
      income_range == o.income_range &&
      legal_name == o.legal_name &&
      legal_name_embossed == o.legal_name_embossed &&
      legal_registration_number == o.legal_registration_number &&
      legal_tva_number == o.legal_tva_number &&
      legal_registration_date == o.legal_registration_date &&
      legal_form == o.legal_form &&
      legal_share_capital == o.legal_share_capital &&
      legal_sector == o.legal_sector &&
      legal_annual_turn_over == o.legal_annual_turn_over &&
      legal_net_income_range == o.legal_net_income_range &&
      legal_number_of_employee_range == o.legal_number_of_employee_range &&
      effective_beneficiary == o.effective_beneficiary &&
      kyc_level == o.kyc_level &&
      kyc_review == o.kyc_review &&
      kyc_review_comment == o.kyc_review_comment &&
      is_freezed == o.is_freezed &&
      language == o.language &&
      opt_in_mailing == o.opt_in_mailing &&
      sepa_creditor_identifier == o.sepa_creditor_identifier &&
      created_date == o.created_date &&
      modified_date == o.modified_date &&
      wallet_count == o.wallet_count &&
      payin_count == o.payin_count &&
      total_rows == o.total_rows
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
# File 'lib/treezor_client/models/user.rb', line 606

def _deserialize(type, value)
  case type.to_sym
  when :DateTime
    DateTime.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :BOOLEAN
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    temp_model = TreezorClient.const_get(type).new
    temp_model.build_from_hash(value)
  end
end

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



672
673
674
675
676
677
678
679
680
681
682
683
684
# File 'lib/treezor_client/models/user.rb', line 672

def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map{ |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
# File 'lib/treezor_client/models/user.rb', line 585

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.swagger_types.each_pair do |key, type|
    if type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


572
573
574
# File 'lib/treezor_client/models/user.rb', line 572

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



578
579
580
# File 'lib/treezor_client/models/user.rb', line 578

def hash
  [user_id, user_type_id, user_status, user_tag, parent_user_id, parent_type, title, firstname, lastname, middle_names, birthday, email, address1, address2, postcode, city, state, country, country_name, phone, mobile, nationality, nationality_other, place_of_birth, place_country, occupation, income_range, legal_name, legal_name_embossed, legal_registration_number, legal_tva_number, legal_registration_date, legal_form, legal_share_capital, legal_sector, legal_annual_turn_over, legal_net_income_range, legal_number_of_employee_range, effective_beneficiary, kyc_level, kyc_review, kyc_review_comment, is_freezed, language, opt_in_mailing, sepa_creditor_identifier, created_date, modified_date, wallet_count, payin_count, total_rows].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



477
478
479
480
# File 'lib/treezor_client/models/user.rb', line 477

def list_invalid_properties
  invalid_properties = Array.new
  return invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



652
653
654
# File 'lib/treezor_client/models/user.rb', line 652

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



658
659
660
661
662
663
664
665
666
# File 'lib/treezor_client/models/user.rb', line 658

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    next if value.nil?
    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



646
647
648
# File 'lib/treezor_client/models/user.rb', line 646

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



484
485
486
487
488
489
490
# File 'lib/treezor_client/models/user.rb', line 484

def valid?
  user_status_validator = EnumAttributeValidator.new('String', ["PENDING", "CANCELED", "VALIDATED"])
  return false unless user_status_validator.valid?(@user_status)
  title_validator = EnumAttributeValidator.new('String', ["M", "MME", "MLLE"])
  return false unless title_validator.valid?(@title)
  return true
end