Class: TransferZero::Sender

Inherits:
Object
  • Object
show all
Defined in:
lib/transferzero-sdk/models/sender.rb

Overview

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 { // name "first_name": "Jane", "last_name": "Doe", // address "country": "US", "city": "New York", "street": "20 W 34th St", "postal_code": "10001", "address_description": "", // DOB "birth_date": "1974-12-24", // Contact Details; You can usually use your company’s contact details here "phone_number": "+15555551234", "email": "[email protected]", // ID of the sender in your system "external_id": "Sender:US:234523", // these fields are mandatory, but you can usually leave them with the following default values: "documents": [ ], "ip": "127.0.0.1", "metadata": {} } “‘ Business Sender Example: “`json { "type": "business", "name": "Company name", // Country of Incorporation "country": "US", // Trading address of the company "trading_country": "US", "city": "New York", "street": "20 W 34th St", "postal_code": "10001", "address_description": "", // Company Details "legal_entity_type": "privately_owned_company", "registration_date": "2012-01-25", "registration_number": "VAT1234567", "nature_of_business": "retail_trade", // Contact Details "phone_number": "+15555551234", "email": "[email protected]", // ID of the sender in your system "external_id": "Sender:Business:US:234523", // these fields are mandatory, but you can usually leave them with the following default values: "documents": [ ], "ip": "127.0.0.1", "metadata": {} } “` [Sender in the API documentation](docs.transferzero.com/docs/transaction-flow/#sender)

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Sender

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
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
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
# File 'lib/transferzero-sdk/models/sender.rb', line 357

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::Sender` initialize method"
  end

  # check to see if the attribute exists and convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if (!self.class.attribute_map.key?(k.to_sym))
      fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::Sender`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }

  if attributes.key?(:'id')
    self.id = attributes[:'id']
  end

  if attributes.key?(:'type')
    self.type = attributes[:'type']
  end

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

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

  if attributes.key?(:'street')
    self.street = attributes[:'street']
  end

  if attributes.key?(:'postal_code')
    self.postal_code = attributes[:'postal_code']
  end

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

  if attributes.key?(:'phone_country')
    self.phone_country = attributes[:'phone_country']
  end

  if attributes.key?(:'phone_number')
    self.phone_number = attributes[:'phone_number']
  end

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

  if attributes.key?(:'ip')
    self.ip = attributes[:'ip']
  end

  if attributes.key?(:'address_description')
    self.address_description = attributes[:'address_description']
  end

  if attributes.key?(:'identification_number')
    self.identification_number = attributes[:'identification_number']
  end

  if attributes.key?(:'identification_type')
    self.identification_type = attributes[:'identification_type']
  end

  if attributes.key?(:'lang')
    self.lang = attributes[:'lang']
  end

  if attributes.key?(:'name')
    self.name = attributes[:'name']
  end

  if attributes.key?(:'first_name')
    self.first_name = attributes[:'first_name']
  end

  if attributes.key?(:'middle_name')
    self.middle_name = attributes[:'middle_name']
  end

  if attributes.key?(:'last_name')
    self.last_name = attributes[:'last_name']
  end

  if attributes.key?(:'birth_date')
    self.birth_date = attributes[:'birth_date']
  end

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

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

  if attributes.key?(:'legal_entity_type')
    self.legal_entity_type = attributes[:'legal_entity_type']
  end

  if attributes.key?(:'registration_date')
    self.registration_date = attributes[:'registration_date']
  end

  if attributes.key?(:'registration_number')
    self.registration_number = attributes[:'registration_number']
  end

  if attributes.key?(:'nature_of_business')
    self.nature_of_business = attributes[:'nature_of_business']
  end

  if attributes.key?(:'source_of_funds')
    self.source_of_funds = attributes[:'source_of_funds']
  end

  if attributes.key?(:'custom_source_of_funds')
    self.custom_source_of_funds = attributes[:'custom_source_of_funds']
  end

  if attributes.key?(:'core_business_activity')
    self.core_business_activity = attributes[:'core_business_activity']
  end

  if attributes.key?(:'purpose_of_opening_account')
    self. = attributes[:'purpose_of_opening_account']
  end

  if attributes.key?(:'office_phone')
    self.office_phone = attributes[:'office_phone']
  end

  if attributes.key?(:'vat_registration_number')
    self.vat_registration_number = attributes[:'vat_registration_number']
  end

  if attributes.key?(:'financial_regulator')
    self.financial_regulator = attributes[:'financial_regulator']
  end

  if attributes.key?(:'regulatory_licence_number')
    self.regulatory_licence_number = attributes[:'regulatory_licence_number']
  end

  if attributes.key?(:'contact_person_email')
    self.contact_person_email = attributes[:'contact_person_email']
  end

  if attributes.key?(:'trading_country')
    self.trading_country = attributes[:'trading_country']
  end

  if attributes.key?(:'trading_address')
    self.trading_address = attributes[:'trading_address']
  end

  if attributes.key?(:'trading_name')
    self.trading_name = attributes[:'trading_name']
  end

  if attributes.key?(:'number_monthly_transactions')
    self.number_monthly_transactions = attributes[:'number_monthly_transactions']
  end

  if attributes.key?(:'amount_monthly_transactions')
    self.amount_monthly_transactions = attributes[:'amount_monthly_transactions']
  end

  if attributes.key?(:'documents')
    if (value = attributes[:'documents']).is_a?(Array)
      self.documents = value
    end
  end

  if attributes.key?(:'metadata')
    self. = attributes[:'metadata']
  end

  if attributes.key?(:'errors')
    if (value = attributes[:'errors']).is_a?(Hash)
      self.errors = value
    end
  end

  if attributes.key?(:'onboarding_status')
    self.onboarding_status = attributes[:'onboarding_status']
  end

  if attributes.key?(:'politically_exposed_people')
    if (value = attributes[:'politically_exposed_people']).is_a?(Array)
      self.politically_exposed_people = value
    end
  end

  if attributes.key?(:'external_id')
    self.external_id = attributes[:'external_id']
  end

  if attributes.key?(:'city_of_birth')
    self.city_of_birth = attributes[:'city_of_birth']
  end

  if attributes.key?(:'country_of_birth')
    self.country_of_birth = attributes[:'country_of_birth']
  end

  if attributes.key?(:'gender')
    self.gender = attributes[:'gender']
  end

  if attributes.key?(:'sales_lead_id')
    self.sales_lead_id = attributes[:'sales_lead_id']
  end

  if attributes.key?(:'created_at')
    self.created_at = attributes[:'created_at']
  end

  if attributes.key?(:'company_office_number')
    self.company_office_number = attributes[:'company_office_number']
  end

  if attributes.key?(:'company_office_number_country')
    self.company_office_number_country = attributes[:'company_office_number_country']
  end

  if attributes.key?(:'aml_officer_email')
    self.aml_officer_email = attributes[:'aml_officer_email']
  end

  if attributes.key?(:'aml_officer_phone')
    self.aml_officer_phone = attributes[:'aml_officer_phone']
  end

  if attributes.key?(:'aml_officer_phone_country')
    self.aml_officer_phone_country = attributes[:'aml_officer_phone_country']
  end

  if attributes.key?(:'company_website_url')
    self.company_website_url = attributes[:'company_website_url']
  end

  if attributes.key?(:'number_of_employees_in_company')
    self.number_of_employees_in_company = attributes[:'number_of_employees_in_company']
  end

  if attributes.key?(:'list_of_countries_of_operation')
    if (value = attributes[:'list_of_countries_of_operation']).is_a?(Array)
      self.list_of_countries_of_operation = value
    end
  end

  if attributes.key?(:'estimated_annual_revenue_turnover')
    self.estimated_annual_revenue_turnover = attributes[:'estimated_annual_revenue_turnover']
  end

  if attributes.key?(:'declaration')
    self.declaration = attributes[:'declaration']
  end
end

Instance Attribute Details

#address_descriptionObject

Description of address



50
51
52
# File 'lib/transferzero-sdk/models/sender.rb', line 50

def address_description
  @address_description
end

#aml_officer_emailObject

Email address of AML Officer (used only with a Business sender)



176
177
178
# File 'lib/transferzero-sdk/models/sender.rb', line 176

def aml_officer_email
  @aml_officer_email
end

#aml_officer_phoneObject

Phone number of AML Officer (without country callcode, used only with a Business sender)



179
180
181
# File 'lib/transferzero-sdk/models/sender.rb', line 179

def aml_officer_phone
  @aml_officer_phone
end

#aml_officer_phone_countryObject

Phone number country of AML Officer in 2-character alpha ISO 3166-2 country format (used only with a Business sender)



182
183
184
# File 'lib/transferzero-sdk/models/sender.rb', line 182

def aml_officer_phone_country
  @aml_officer_phone_country
end

#amount_monthly_transactionsObject

The estimated amount for all transactions each month in USD (used only with a Business sender)



134
135
136
# File 'lib/transferzero-sdk/models/sender.rb', line 134

def amount_monthly_transactions
  @amount_monthly_transactions
end

#birth_dateObject

Date of birth of sender (used only with a Personal sender)



74
75
76
# File 'lib/transferzero-sdk/models/sender.rb', line 74

def birth_date
  @birth_date
end

#cityObject

Sender’s city



35
36
37
# File 'lib/transferzero-sdk/models/sender.rb', line 35

def city
  @city
end

#city_of_birthObject

City of birth of sender



155
156
157
# File 'lib/transferzero-sdk/models/sender.rb', line 155

def city_of_birth
  @city_of_birth
end

#company_office_numberObject

Phone number of company office (without country callcode, used only with a Business sender)



170
171
172
# File 'lib/transferzero-sdk/models/sender.rb', line 170

def company_office_number
  @company_office_number
end

#company_office_number_countryObject

Phone number country of company office in 2-character alpha ISO 3166-2 country format (used only with a Business sender)



173
174
175
# File 'lib/transferzero-sdk/models/sender.rb', line 173

def company_office_number_country
  @company_office_number_country
end

#company_website_urlObject

Company website URL (used only with a Business sender)



185
186
187
# File 'lib/transferzero-sdk/models/sender.rb', line 185

def company_website_url
  @company_website_url
end

#contact_person_emailObject

The contact’s email address (used only with a Business sender)



119
120
121
# File 'lib/transferzero-sdk/models/sender.rb', line 119

def contact_person_email
  @contact_person_email
end

#core_business_activityObject

The core activity (used only with a Business sender)



101
102
103
# File 'lib/transferzero-sdk/models/sender.rb', line 101

def core_business_activity
  @core_business_activity
end

#countryObject

Country of sender in 2-character alpha ISO 3166-2 country format. This is the residential country for personal senders and the country of incorporation for business senders.



26
27
28
# File 'lib/transferzero-sdk/models/sender.rb', line 26

def country
  @country
end

#country_of_birthObject

Country of birth of sender in 2-character alpha ISO 3166-2 country format



158
159
160
# File 'lib/transferzero-sdk/models/sender.rb', line 158

def country_of_birth
  @country_of_birth
end

#created_atObject

Date and time of sender was created



167
168
169
# File 'lib/transferzero-sdk/models/sender.rb', line 167

def created_at
  @created_at
end

#custom_source_of_fundsObject

Custom source of funds



98
99
100
# File 'lib/transferzero-sdk/models/sender.rb', line 98

def custom_source_of_funds
  @custom_source_of_funds
end

#declarationObject

Declaration that the signatory is authorised (used only with a Business sender)



197
198
199
# File 'lib/transferzero-sdk/models/sender.rb', line 197

def declaration
  @declaration
end

#documentsObject

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" } ] “`



137
138
139
# File 'lib/transferzero-sdk/models/sender.rb', line 137

def documents
  @documents
end

#emailObject

Email of sender



44
45
46
# File 'lib/transferzero-sdk/models/sender.rb', line 44

def email
  @email
end

#errorsObject

The fields that have some problems and don’t pass validation



143
144
145
# File 'lib/transferzero-sdk/models/sender.rb', line 143

def errors
  @errors
end

#estimated_annual_revenue_turnoverObject

Estimated annual turnover (in USD or equivalent, used only with a Business sender)



194
195
196
# File 'lib/transferzero-sdk/models/sender.rb', line 194

def estimated_annual_revenue_turnover
  @estimated_annual_revenue_turnover
end

#external_idObject

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.



152
153
154
# File 'lib/transferzero-sdk/models/sender.rb', line 152

def external_id
  @external_id
end

#financial_regulatorObject

The Financial Regulator (used only with a Business sender)



113
114
115
# File 'lib/transferzero-sdk/models/sender.rb', line 113

def financial_regulator
  @financial_regulator
end

#first_nameObject

First name of sender (used only with a Personal sender)



65
66
67
# File 'lib/transferzero-sdk/models/sender.rb', line 65

def first_name
  @first_name
end

#genderObject

The gender of the sender: - ‘M`: Male - `F`: Female - `O`: Other



161
162
163
# File 'lib/transferzero-sdk/models/sender.rb', line 161

def gender
  @gender
end

#idObject

Returns the value of attribute id.



18
19
20
# File 'lib/transferzero-sdk/models/sender.rb', line 18

def id
  @id
end

#identification_numberObject

Identification number of document used



53
54
55
# File 'lib/transferzero-sdk/models/sender.rb', line 53

def identification_number
  @identification_number
end

#identification_typeObject

Document to be identified. The identification type can be one of the following: - ‘DL`: Driving License - `PP`: International Passport - `ID`: National ID - `OT`: Other Please note for Wizall `XOF::Cash` transactions the valid options are: - `ID`: National ID - `PP`: Passport



56
57
58
# File 'lib/transferzero-sdk/models/sender.rb', line 56

def identification_type
  @identification_type
end

#ipObject

IP of sender



47
48
49
# File 'lib/transferzero-sdk/models/sender.rb', line 47

def ip
  @ip
end

#langObject

Determines language of the served content. Defaults to English



59
60
61
# File 'lib/transferzero-sdk/models/sender.rb', line 59

def lang
  @lang
end

#last_nameObject

Last name of sender (used only with a Personal sender)



71
72
73
# File 'lib/transferzero-sdk/models/sender.rb', line 71

def last_name
  @last_name
end

Legal entity type (used only with a Business sender) Available values: - sole_proprietorship: Sole Proprietorship - partnership: Partnership - privately_owned_company: Privately Owned Company (Limited Company) - publicly_owned_company: Publicly Listed Company (PLC) - government_owned_entity: Government Owned Entity Trusts - trust: Foundations & Similar Entities - ngo: Non-Government Organisations / Charities inc Religious bodies and place of worship - club_and_society: Clubs and Societies - go: GO (Majority Owned Subsidiary of State-Owned Company) - financial_institution: Financial Institution - mto: Money Transfer Operator (MTO) / Other Licensed Financial Institution Please note not all values are acceptable for some our corridors. Please reach out to our sales teams for more information. Note that if you select ‘financial_institution` then the fields `vat_registration_number`, `financial_regulator` and `regulatory_licence_number` will be mandatory as well. Note that if you select `mto` then following fields will be mandatory as well: `vat_registration_number`, `financial_regulator`, `regulatory_licence_number`, `company_office_number`, `company_office_number_country`, `aml_officer_email`, `aml_officer_phone`, `aml_officer_phone_country`, `company_website_url`, `number_of_employees_in_company`, `list_of_countries_of_operation`, `estimated_annual_revenue_turnover`, `declaration`.



83
84
85
# File 'lib/transferzero-sdk/models/sender.rb', line 83

def legal_entity_type
  @legal_entity_type
end

#list_of_countries_of_operationObject

List of countries of operation (used only with a Business sender)



191
192
193
# File 'lib/transferzero-sdk/models/sender.rb', line 191

def list_of_countries_of_operation
  @list_of_countries_of_operation
end

#metadataObject

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.



140
141
142
# File 'lib/transferzero-sdk/models/sender.rb', line 140

def 
  
end

#middle_nameObject

Middle name of sender (used only with a Personal sender)



68
69
70
# File 'lib/transferzero-sdk/models/sender.rb', line 68

def middle_name
  @middle_name
end

#nameObject

Name of sender (used only with a Business sender)



62
63
64
# File 'lib/transferzero-sdk/models/sender.rb', line 62

def name
  @name
end

#nationalityObject

The nationality of the sender (used only with a Personal sender)



80
81
82
# File 'lib/transferzero-sdk/models/sender.rb', line 80

def nationality
  @nationality
end

#nature_of_businessObject

Nature of business options (used only with a Business sender) Available values: - personal: Personal - agriculture_and_hunting: Agriculture and Hunting - forestry: Forestry - fishing: Fishing - agricultural_by_products: Agricultural By-Products - coal_mining: Coal Mining - oil_mining: Oil Mining - iron_ore_mining: Iron Ore Mining - other_metal_and_diamond_mining: Other Metal and Diamond Mining - other_mineral_mining: Other Mineral Mining - manufacturing_of_food_drink_tobacco: Manufacture of Food/Drink/Tobacco - manufacturing_of_textiles_leather_fur_furniture: Manufacture of Textiles/Leather/Fur/Furniture - manufacture_of_wooden_products_furniture: Manufacture of Wooden Products/Furniture - manufacture_of_paper_pulp_allied_products: Manufacture of Paper/Pulp/Allied Products - manufacture_of_chemicals_medical_petroleum_rubber_plastic_products: Manufacture Of Chemicals Medical Petroleum Rubber Plastic Products - manufacture_of_pottery_china_glass_stone: Manufacture Of Pottery China Glass Stone - manufacture_of_iron_steel_non_ferrous_metals_basic_industries: Manufacture Of Iron Steel Non-Ferrous Metals Basic Industries - manufacture_of_metal_products_electrical_and_scientific_engineering: Manufacture Of Metal Products Electrical And Scientific Engineering - manufacture_of_jewelry_musical_instruments_toys: Manufacture Of Jewelry Musical Instruments Toys - electricity_gas_and_water: Electricity, Gas And Water - construction: Construction - wholesale_trade: Wholesale Trade - retail_trade: Retail Trade - catering_incl_hotels: Catering Incl. Hotels - transport_storage: Transport Storage - communications: Communications - finance_and_holding_companies: Finance And Holding Companies - insurance: Insurance - business_services: Business Services - real_estate_development_investment: Real Estate Development Investment - central_state_governments: Central State Governments - community_services_defence_police_prisons_etc: Community Services Defence Police Prisons Etc - social_services_education_health_care: Social Services Education Health Care - personal_services_leisure_services: Personal Services - Leisure Services - personal_services_domestic_laundry_repairs: Personal Services - Domestic Laundry Repairs - personal_services_embassies_international_organisations: Personal Services - Embassies



92
93
94
# File 'lib/transferzero-sdk/models/sender.rb', line 92

def nature_of_business
  @nature_of_business
end

#number_monthly_transactionsObject

The estimated number of monthly transactions (used only with a Business sender)



131
132
133
# File 'lib/transferzero-sdk/models/sender.rb', line 131

def number_monthly_transactions
  @number_monthly_transactions
end

#number_of_employees_in_companyObject

Number of employees in company (used only with a Business sender)



188
189
190
# File 'lib/transferzero-sdk/models/sender.rb', line 188

def number_of_employees_in_company
  @number_of_employees_in_company
end

#occupationObject

Occupation of sender (used only with a Personal sender)



77
78
79
# File 'lib/transferzero-sdk/models/sender.rb', line 77

def occupation
  @occupation
end

#office_phoneObject

The official phone number (used only with a Business sender)



107
108
109
# File 'lib/transferzero-sdk/models/sender.rb', line 107

def office_phone
  @office_phone
end

#onboarding_statusObject

The onboarding status of the sender



146
147
148
# File 'lib/transferzero-sdk/models/sender.rb', line 146

def onboarding_status
  @onboarding_status
end

#phone_countryObject

Phone country of sender in 2-character alpha ISO 3166-2 country format



38
39
40
# File 'lib/transferzero-sdk/models/sender.rb', line 38

def phone_country
  @phone_country
end

#phone_numberObject

Phone number of sender (without country callcode)



41
42
43
# File 'lib/transferzero-sdk/models/sender.rb', line 41

def phone_number
  @phone_number
end

#politically_exposed_peopleObject

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" } } “`



149
150
151
# File 'lib/transferzero-sdk/models/sender.rb', line 149

def politically_exposed_people
  @politically_exposed_people
end

#postal_codeObject

Zip code of sender



32
33
34
# File 'lib/transferzero-sdk/models/sender.rb', line 32

def postal_code
  @postal_code
end

#purpose_of_opening_accountObject

The purpose for opening their account (used only with a Business sender)



104
105
106
# File 'lib/transferzero-sdk/models/sender.rb', line 104

def 
  
end

#registration_dateObject

The registration date (used only with a Business sender)



86
87
88
# File 'lib/transferzero-sdk/models/sender.rb', line 86

def registration_date
  @registration_date
end

#registration_numberObject

The registration number (used only with a Business sender)



89
90
91
# File 'lib/transferzero-sdk/models/sender.rb', line 89

def registration_number
  @registration_number
end

#regulatory_licence_numberObject

The Regulatory Licence Number (used only with a Business sender)



116
117
118
# File 'lib/transferzero-sdk/models/sender.rb', line 116

def regulatory_licence_number
  @regulatory_licence_number
end

#sales_lead_idObject

Sales Lead ID for tracking (optional)



164
165
166
# File 'lib/transferzero-sdk/models/sender.rb', line 164

def sales_lead_id
  @sales_lead_id
end

#source_of_fundsObject

The source of funds



95
96
97
# File 'lib/transferzero-sdk/models/sender.rb', line 95

def source_of_funds
  @source_of_funds
end

#stateObject

Returns the value of attribute state.



23
24
25
# File 'lib/transferzero-sdk/models/sender.rb', line 23

def state
  @state
end

#streetObject

Sender’s street



29
30
31
# File 'lib/transferzero-sdk/models/sender.rb', line 29

def street
  @street
end

#trading_addressObject

The Business trading address (used only with a Business sender)



125
126
127
# File 'lib/transferzero-sdk/models/sender.rb', line 125

def trading_address
  @trading_address
end

#trading_countryObject

The Business trading country (used only with a Business sender)



122
123
124
# File 'lib/transferzero-sdk/models/sender.rb', line 122

def trading_country
  @trading_country
end

#trading_nameObject

The Business trading name (used only with a Business sender)



128
129
130
# File 'lib/transferzero-sdk/models/sender.rb', line 128

def trading_name
  @trading_name
end

#typeObject

Type of sender to create - either person or business (defaults to person)



21
22
23
# File 'lib/transferzero-sdk/models/sender.rb', line 21

def type
  @type
end

#vat_registration_numberObject

The VAT registration number (used only with a Business sender)



110
111
112
# File 'lib/transferzero-sdk/models/sender.rb', line 110

def vat_registration_number
  @vat_registration_number
end

Class Method Details

.attribute_mapObject

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



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
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
# File 'lib/transferzero-sdk/models/sender.rb', line 222

def self.attribute_map
  {
    :'id' => :'id',
    :'type' => :'type',
    :'state' => :'state',
    :'country' => :'country',
    :'street' => :'street',
    :'postal_code' => :'postal_code',
    :'city' => :'city',
    :'phone_country' => :'phone_country',
    :'phone_number' => :'phone_number',
    :'email' => :'email',
    :'ip' => :'ip',
    :'address_description' => :'address_description',
    :'identification_number' => :'identification_number',
    :'identification_type' => :'identification_type',
    :'lang' => :'lang',
    :'name' => :'name',
    :'first_name' => :'first_name',
    :'middle_name' => :'middle_name',
    :'last_name' => :'last_name',
    :'birth_date' => :'birth_date',
    :'occupation' => :'occupation',
    :'nationality' => :'nationality',
    :'legal_entity_type' => :'legal_entity_type',
    :'registration_date' => :'registration_date',
    :'registration_number' => :'registration_number',
    :'nature_of_business' => :'nature_of_business',
    :'source_of_funds' => :'source_of_funds',
    :'custom_source_of_funds' => :'custom_source_of_funds',
    :'core_business_activity' => :'core_business_activity',
    :'purpose_of_opening_account' => :'purpose_of_opening_account',
    :'office_phone' => :'office_phone',
    :'vat_registration_number' => :'vat_registration_number',
    :'financial_regulator' => :'financial_regulator',
    :'regulatory_licence_number' => :'regulatory_licence_number',
    :'contact_person_email' => :'contact_person_email',
    :'trading_country' => :'trading_country',
    :'trading_address' => :'trading_address',
    :'trading_name' => :'trading_name',
    :'number_monthly_transactions' => :'number_monthly_transactions',
    :'amount_monthly_transactions' => :'amount_monthly_transactions',
    :'documents' => :'documents',
    :'metadata' => :'metadata',
    :'errors' => :'errors',
    :'onboarding_status' => :'onboarding_status',
    :'politically_exposed_people' => :'politically_exposed_people',
    :'external_id' => :'external_id',
    :'city_of_birth' => :'city_of_birth',
    :'country_of_birth' => :'country_of_birth',
    :'gender' => :'gender',
    :'sales_lead_id' => :'sales_lead_id',
    :'created_at' => :'created_at',
    :'company_office_number' => :'company_office_number',
    :'company_office_number_country' => :'company_office_number_country',
    :'aml_officer_email' => :'aml_officer_email',
    :'aml_officer_phone' => :'aml_officer_phone',
    :'aml_officer_phone_country' => :'aml_officer_phone_country',
    :'company_website_url' => :'company_website_url',
    :'number_of_employees_in_company' => :'number_of_employees_in_company',
    :'list_of_countries_of_operation' => :'list_of_countries_of_operation',
    :'estimated_annual_revenue_turnover' => :'estimated_annual_revenue_turnover',
    :'declaration' => :'declaration'
  }
end

.openapi_typesObject

Attribute type mapping.



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
# File 'lib/transferzero-sdk/models/sender.rb', line 289

def self.openapi_types
  {
    :'id' => :'String',
    :'type' => :'String',
    :'state' => :'SenderState',
    :'country' => :'String',
    :'street' => :'String',
    :'postal_code' => :'String',
    :'city' => :'String',
    :'phone_country' => :'String',
    :'phone_number' => :'String',
    :'email' => :'String',
    :'ip' => :'String',
    :'address_description' => :'String',
    :'identification_number' => :'String',
    :'identification_type' => :'String',
    :'lang' => :'String',
    :'name' => :'String',
    :'first_name' => :'String',
    :'middle_name' => :'String',
    :'last_name' => :'String',
    :'birth_date' => :'Date',
    :'occupation' => :'String',
    :'nationality' => :'String',
    :'legal_entity_type' => :'String',
    :'registration_date' => :'Date',
    :'registration_number' => :'String',
    :'nature_of_business' => :'String',
    :'source_of_funds' => :'String',
    :'custom_source_of_funds' => :'String',
    :'core_business_activity' => :'String',
    :'purpose_of_opening_account' => :'String',
    :'office_phone' => :'String',
    :'vat_registration_number' => :'String',
    :'financial_regulator' => :'String',
    :'regulatory_licence_number' => :'String',
    :'contact_person_email' => :'String',
    :'trading_country' => :'String',
    :'trading_address' => :'String',
    :'trading_name' => :'String',
    :'number_monthly_transactions' => :'String',
    :'amount_monthly_transactions' => :'String',
    :'documents' => :'Array<Document>',
    :'metadata' => :'Object',
    :'errors' => :'Hash<String, Array<ValidationErrorDescription>>',
    :'onboarding_status' => :'String',
    :'politically_exposed_people' => :'Array<PoliticallyExposedPerson>',
    :'external_id' => :'String',
    :'city_of_birth' => :'String',
    :'country_of_birth' => :'String',
    :'gender' => :'String',
    :'sales_lead_id' => :'String',
    :'created_at' => :'String',
    :'company_office_number' => :'String',
    :'company_office_number_country' => :'String',
    :'aml_officer_email' => :'String',
    :'aml_officer_phone' => :'String',
    :'aml_officer_phone_country' => :'String',
    :'company_website_url' => :'String',
    :'number_of_employees_in_company' => :'String',
    :'list_of_countries_of_operation' => :'Array<String>',
    :'estimated_annual_revenue_turnover' => :'String',
    :'declaration' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
# File 'lib/transferzero-sdk/models/sender.rb', line 733

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      id == o.id &&
      type == o.type &&
      state == o.state &&
      country == o.country &&
      street == o.street &&
      postal_code == o.postal_code &&
      city == o.city &&
      phone_country == o.phone_country &&
      phone_number == o.phone_number &&
      email == o.email &&
      ip == o.ip &&
      address_description == o.address_description &&
      identification_number == o.identification_number &&
      identification_type == o.identification_type &&
      lang == o.lang &&
      name == o.name &&
      first_name == o.first_name &&
      middle_name == o.middle_name &&
      last_name == o.last_name &&
      birth_date == o.birth_date &&
      occupation == o.occupation &&
      nationality == o.nationality &&
      legal_entity_type == o.legal_entity_type &&
      registration_date == o.registration_date &&
      registration_number == o.registration_number &&
      nature_of_business == o.nature_of_business &&
      source_of_funds == o.source_of_funds &&
      custom_source_of_funds == o.custom_source_of_funds &&
      core_business_activity == o.core_business_activity &&
       == o. &&
      office_phone == o.office_phone &&
      vat_registration_number == o.vat_registration_number &&
      financial_regulator == o.financial_regulator &&
      regulatory_licence_number == o.regulatory_licence_number &&
      contact_person_email == o.contact_person_email &&
      trading_country == o.trading_country &&
      trading_address == o.trading_address &&
      trading_name == o.trading_name &&
      number_monthly_transactions == o.number_monthly_transactions &&
      amount_monthly_transactions == o.amount_monthly_transactions &&
      documents == o.documents &&
       == o. &&
      errors == o.errors &&
      onboarding_status == o.onboarding_status &&
      politically_exposed_people == o.politically_exposed_people &&
      external_id == o.external_id &&
      city_of_birth == o.city_of_birth &&
      country_of_birth == o.country_of_birth &&
      gender == o.gender &&
      sales_lead_id == o.sales_lead_id &&
      created_at == o.created_at &&
      company_office_number == o.company_office_number &&
      company_office_number_country == o.company_office_number_country &&
      aml_officer_email == o.aml_officer_email &&
      aml_officer_phone == o.aml_officer_phone &&
      aml_officer_phone_country == o.aml_officer_phone_country &&
      company_website_url == o.company_website_url &&
      number_of_employees_in_company == o.number_of_employees_in_company &&
      list_of_countries_of_operation == o.list_of_countries_of_operation &&
      estimated_annual_revenue_turnover == o.estimated_annual_revenue_turnover &&
      declaration == o.declaration
end

#[](key) ⇒ Object



899
900
901
# File 'lib/transferzero-sdk/models/sender.rb', line 899

def [](key)
  to_hash[key]
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



837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
# File 'lib/transferzero-sdk/models/sender.rb', line 837

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 = TransferZero.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



911
912
913
914
915
916
917
918
919
920
921
922
923
# File 'lib/transferzero-sdk/models/sender.rb', line 911

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

Returns the model itself

Returns:

  • (Object)

    Returns the model itself



816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
# File 'lib/transferzero-sdk/models/sender.rb', line 816

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.openapi_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

#dig(*args) ⇒ Object



903
904
905
# File 'lib/transferzero-sdk/models/sender.rb', line 903

def dig(*args)
  to_hash.dig(*args)
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


801
802
803
# File 'lib/transferzero-sdk/models/sender.rb', line 801

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



807
808
809
# File 'lib/transferzero-sdk/models/sender.rb', line 807

def hash
  [id, type, state, country, street, postal_code, city, phone_country, phone_number, email, ip, address_description, identification_number, identification_type, lang, name, first_name, middle_name, last_name, birth_date, occupation, nationality, legal_entity_type, registration_date, registration_number, nature_of_business, source_of_funds, custom_source_of_funds, core_business_activity, , office_phone, vat_registration_number, financial_regulator, regulatory_licence_number, contact_person_email, trading_country, trading_address, trading_name, number_monthly_transactions, amount_monthly_transactions, documents, , errors, onboarding_status, politically_exposed_people, external_id, city_of_birth, country_of_birth, gender, sales_lead_id, created_at, company_office_number, company_office_number_country, aml_officer_email, aml_officer_phone, aml_officer_phone_country, company_website_url, number_of_employees_in_company, list_of_countries_of_operation, estimated_annual_revenue_turnover, declaration].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
# File 'lib/transferzero-sdk/models/sender.rb', line 625

def list_invalid_properties
  invalid_properties = Array.new
  if @country.nil?
    invalid_properties.push('invalid value for "country", country cannot be nil.')
  end

  if @street.nil?
    invalid_properties.push('invalid value for "street", street cannot be nil.')
  end

  if @postal_code.nil?
    invalid_properties.push('invalid value for "postal_code", postal_code cannot be nil.')
  end

  if @city.nil?
    invalid_properties.push('invalid value for "city", city cannot be nil.')
  end

  if @email.nil?
    invalid_properties.push('invalid value for "email", email cannot be nil.')
  end

  if @ip.nil?
    invalid_properties.push('invalid value for "ip", ip cannot be nil.')
  end

  if @documents.nil?
    invalid_properties.push('invalid value for "documents", documents cannot be nil.')
  end

  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



883
884
885
# File 'lib/transferzero-sdk/models/sender.rb', line 883

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



889
890
891
892
893
894
895
896
897
# File 'lib/transferzero-sdk/models/sender.rb', line 889

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
  ::ActiveSupport::HashWithIndifferentAccess.new(hash)
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



877
878
879
# File 'lib/transferzero-sdk/models/sender.rb', line 877

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



660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
# File 'lib/transferzero-sdk/models/sender.rb', line 660

def valid?
  type_validator = EnumAttributeValidator.new('String', ["person", "business"])
  return false unless type_validator.valid?(@type)
  return false if @country.nil?
  return false if @street.nil?
  return false if @postal_code.nil?
  return false if @city.nil?
  return false if @email.nil?
  return false if @ip.nil?
  identification_type_validator = EnumAttributeValidator.new('String', ["DL", "PP", "ID", "OT"])
  return false unless identification_type_validator.valid?(@identification_type)
  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", "mto"])
  return false unless legal_entity_type_validator.valid?(@legal_entity_type)
  nature_of_business_validator = EnumAttributeValidator.new('String', ["personal", "agriculture_and_hunting", "forestry", "fishing", "agricultural_by_products", "coal_mining", "oil_mining", "iron_ore_mining", "other_metal_and_diamond_mining", "other_mineral_mining", "manufacturing_of_food_drink_tobacco", "manufacturing_of_textiles_leather_fur_furniture", "manufacture_of_wooden_products_furniture", "manufacture_of_paper_pulp_allied_products", "manufacture_of_chemicals_medical_petroleum_rubber_plastic_products", "manufacture_of_pottery_china_glass_stone", "manufacture_of_iron_steel_non_ferrous_metals_basic_industries", "manufacture_of_metal_products_electrical_and_scientific_engineering", "manufacture_of_jewelry_musical_instruments_toys", "electricity_gas_and_water", "construction", "wholesale_trade", "retail_trade", "catering_incl_hotels", "transport_storage", "communications", "finance_and_holding_companies", "insurance", "business_services", "real_estate_development_investment", "central_state_governments", "community_services_defence_police_prisons_etc", "social_services_education_health_care", "personal_services_leisure_services", "personal_services_domestic_laundry_repairs", "personal_services_embassies_international_organisations"])
  return false unless nature_of_business_validator.valid?(@nature_of_business)
  return false if @documents.nil?
  gender_validator = EnumAttributeValidator.new('String', ["M", "F", "O"])
  return false unless gender_validator.valid?(@gender)
  true
end