Class: TransferZero::Sender
- Inherits:
-
Object
- Object
- TransferZero::Sender
- 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_country": "US", "phone_number": "5555551234", "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_country": "US", "phone_number": "5555551234", "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
-
#address_description ⇒ Object
Description of address.
-
#amount_monthly_transactions ⇒ Object
The estimated amount for all transactions each month in USD (used only with a Business sender).
-
#birth_date ⇒ Object
Date of birth of sender (used only with a Personal sender).
-
#city ⇒ Object
Sender’s city.
-
#city_of_birth ⇒ Object
City of birth of sender.
-
#contact_person_email ⇒ Object
The contact’s email address (used only with a Business sender).
-
#core_business_activity ⇒ Object
The core activity (used only with a Business sender).
-
#country ⇒ Object
Country of sender in 2-character alpha ISO 3166-2 country format.
-
#country_of_birth ⇒ Object
Country of birth of sender in 2-character alpha ISO 3166-2 country format.
-
#created_at ⇒ Object
Date and time of sender was created.
-
#custom_source_of_funds ⇒ Object
Custom source of funds.
-
#documents ⇒ Object
Needed for KYC checks.
-
#email ⇒ Object
Email of sender.
-
#errors ⇒ Object
The fields that have some problems and don’t pass validation.
-
#external_id ⇒ Object
Optional ID that is supplied by partner linking it to the partner’s own Sender ID.
-
#financial_regulator ⇒ Object
The Financial Regulator (used only with a Business sender).
-
#first_name ⇒ Object
First name of sender (used only with a Personal sender).
-
#gender ⇒ Object
The gender of the sender: - ‘M`: Male - `F`: Female - `O`: Other.
-
#id ⇒ Object
Returns the value of attribute id.
-
#identification_number ⇒ Object
Identification number of document used.
-
#identification_type ⇒ Object
Document to be identified.
-
#ip ⇒ Object
IP of sender.
-
#lang ⇒ Object
Determines language of the served content.
-
#last_name ⇒ Object
Last name of sender (used only with a Personal sender).
-
#legal_entity_type ⇒ Object
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 Please note not all values are acceptable for some our corridors.
-
#metadata ⇒ Object
Metadata of sender.
-
#middle_name ⇒ Object
Middle name of sender (used only with a Personal sender).
-
#name ⇒ Object
Name of sender (used only with a Business sender).
-
#nationality ⇒ Object
The nationality of the sender (used only with a Personal sender).
-
#nature_of_business ⇒ Object
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.
-
#number_monthly_transactions ⇒ Object
The estimated number of monthly transactions (used only with a Business sender).
-
#occupation ⇒ Object
Occupation of sender (used only with a Personal sender).
-
#office_phone ⇒ Object
The official phone number (used only with a Business sender).
-
#onboarding_status ⇒ Object
The onboarding status of the sender.
-
#phone_country ⇒ Object
Phone country of sender in 2-character alpha ISO 3166-2 country format.
-
#phone_number ⇒ Object
Phone number of sender (without country callcode).
-
#politically_exposed_people ⇒ Object
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.
-
#postal_code ⇒ Object
Zip code of sender.
-
#purpose_of_opening_account ⇒ Object
The purpose for opening their account (used only with a Business sender).
-
#registration_date ⇒ Object
The registration date (used only with a Business sender).
-
#registration_number ⇒ Object
The registration number (used only with a Business sender).
-
#regulatory_licence_number ⇒ Object
The Regulatory Licence Number (used only with a Business sender).
-
#source_of_funds ⇒ Object
The source of funds.
-
#state ⇒ Object
Returns the value of attribute state.
-
#street ⇒ Object
Sender’s street.
-
#trading_address ⇒ Object
The Business trading address (used only with a Business sender).
-
#trading_country ⇒ Object
The Business trading country (used only with a Business sender).
-
#type ⇒ Object
Type of sender to create - either person or business (defaults to person).
-
#vat_registration_number ⇒ Object
The VAT registration number (used only with a Business sender).
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #[](key) ⇒ Object
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Returns the model itself.
- #dig(*args) ⇒ Object
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ Sender
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ Sender
Initializes the object
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 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 |
# File 'lib/transferzero-sdk/models/sender.rb', line 297 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.purpose_of_opening_account = 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?(:'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?(:'created_at') self.created_at = attributes[:'created_at'] end end |
Instance Attribute Details
#address_description ⇒ Object
Description of address
50 51 52 |
# File 'lib/transferzero-sdk/models/sender.rb', line 50 def address_description @address_description end |
#amount_monthly_transactions ⇒ Object
The estimated amount for all transactions each month in USD (used only with a Business sender)
131 132 133 |
# File 'lib/transferzero-sdk/models/sender.rb', line 131 def amount_monthly_transactions @amount_monthly_transactions end |
#birth_date ⇒ Object
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 |
#city ⇒ Object
Sender’s city
35 36 37 |
# File 'lib/transferzero-sdk/models/sender.rb', line 35 def city @city end |
#city_of_birth ⇒ Object
City of birth of sender
152 153 154 |
# File 'lib/transferzero-sdk/models/sender.rb', line 152 def city_of_birth @city_of_birth end |
#contact_person_email ⇒ Object
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_activity ⇒ Object
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 |
#country ⇒ Object
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_birth ⇒ Object
Country of birth of sender in 2-character alpha ISO 3166-2 country format
155 156 157 |
# File 'lib/transferzero-sdk/models/sender.rb', line 155 def country_of_birth @country_of_birth end |
#created_at ⇒ Object
Date and time of sender was created
161 162 163 |
# File 'lib/transferzero-sdk/models/sender.rb', line 161 def created_at @created_at end |
#custom_source_of_funds ⇒ Object
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 |
#documents ⇒ Object
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" } ] “`
134 135 136 |
# File 'lib/transferzero-sdk/models/sender.rb', line 134 def documents @documents end |
#email ⇒ Object
Email of sender
44 45 46 |
# File 'lib/transferzero-sdk/models/sender.rb', line 44 def email @email end |
#errors ⇒ Object
The fields that have some problems and don’t pass validation
140 141 142 |
# File 'lib/transferzero-sdk/models/sender.rb', line 140 def errors @errors end |
#external_id ⇒ Object
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.
149 150 151 |
# File 'lib/transferzero-sdk/models/sender.rb', line 149 def external_id @external_id end |
#financial_regulator ⇒ Object
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_name ⇒ Object
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 |
#gender ⇒ Object
The gender of the sender: - ‘M`: Male - `F`: Female - `O`: Other
158 159 160 |
# File 'lib/transferzero-sdk/models/sender.rb', line 158 def gender @gender end |
#id ⇒ Object
Returns the value of attribute id.
18 19 20 |
# File 'lib/transferzero-sdk/models/sender.rb', line 18 def id @id end |
#identification_number ⇒ Object
Identification number of document used
53 54 55 |
# File 'lib/transferzero-sdk/models/sender.rb', line 53 def identification_number @identification_number end |
#identification_type ⇒ Object
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 |
#ip ⇒ Object
IP of sender
47 48 49 |
# File 'lib/transferzero-sdk/models/sender.rb', line 47 def ip @ip end |
#lang ⇒ Object
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_name ⇒ Object
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 ⇒ Object
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 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.
83 84 85 |
# File 'lib/transferzero-sdk/models/sender.rb', line 83 def legal_entity_type @legal_entity_type end |
#metadata ⇒ Object
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.
137 138 139 |
# File 'lib/transferzero-sdk/models/sender.rb', line 137 def @metadata end |
#middle_name ⇒ Object
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 |
#name ⇒ Object
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 |
#nationality ⇒ Object
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_business ⇒ Object
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_transactions ⇒ Object
The estimated number of monthly transactions (used only with a Business sender)
128 129 130 |
# File 'lib/transferzero-sdk/models/sender.rb', line 128 def number_monthly_transactions @number_monthly_transactions end |
#occupation ⇒ Object
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_phone ⇒ Object
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_status ⇒ Object
The onboarding status of the sender
143 144 145 |
# File 'lib/transferzero-sdk/models/sender.rb', line 143 def onboarding_status @onboarding_status end |
#phone_country ⇒ Object
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_number ⇒ Object
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_people ⇒ Object
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" } } “`
146 147 148 |
# File 'lib/transferzero-sdk/models/sender.rb', line 146 def politically_exposed_people @politically_exposed_people end |
#postal_code ⇒ Object
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_account ⇒ Object
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 purpose_of_opening_account @purpose_of_opening_account end |
#registration_date ⇒ Object
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_number ⇒ Object
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_number ⇒ Object
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 |
#source_of_funds ⇒ Object
The source of funds
95 96 97 |
# File 'lib/transferzero-sdk/models/sender.rb', line 95 def source_of_funds @source_of_funds end |
#state ⇒ Object
Returns the value of attribute state.
23 24 25 |
# File 'lib/transferzero-sdk/models/sender.rb', line 23 def state @state end |
#street ⇒ Object
Sender’s street
29 30 31 |
# File 'lib/transferzero-sdk/models/sender.rb', line 29 def street @street end |
#trading_address ⇒ Object
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_country ⇒ Object
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 |
#type ⇒ Object
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_number ⇒ Object
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_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 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 |
# File 'lib/transferzero-sdk/models/sender.rb', line 186 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', :'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', :'created_at' => :'created_at' } end |
.openapi_types ⇒ Object
Attribute type mapping.
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 287 288 289 290 291 292 293 |
# File 'lib/transferzero-sdk/models/sender.rb', line 241 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', :'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', :'created_at' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
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 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 |
# File 'lib/transferzero-sdk/models/sender.rb', line 628 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 && purpose_of_opening_account == o.purpose_of_opening_account && 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 && 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 && created_at == o.created_at end |
#[](key) ⇒ Object
782 783 784 |
# File 'lib/transferzero-sdk/models/sender.rb', line 782 def [](key) to_hash[key] end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 |
# File 'lib/transferzero-sdk/models/sender.rb', line 720 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
794 795 796 797 798 799 800 801 802 803 804 805 806 |
# File 'lib/transferzero-sdk/models/sender.rb', line 794 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
699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 |
# File 'lib/transferzero-sdk/models/sender.rb', line 699 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
786 787 788 |
# File 'lib/transferzero-sdk/models/sender.rb', line 786 def dig(*args) to_hash.dig(*args) end |
#eql?(o) ⇒ Boolean
684 685 686 |
# File 'lib/transferzero-sdk/models/sender.rb', line 684 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
690 691 692 |
# File 'lib/transferzero-sdk/models/sender.rb', line 690 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, 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, , errors, onboarding_status, politically_exposed_people, external_id, city_of_birth, country_of_birth, gender, created_at].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
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 |
# File 'lib/transferzero-sdk/models/sender.rb', line 515 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 @phone_country.nil? invalid_properties.push('invalid value for "phone_country", phone_country 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_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
766 767 768 |
# File 'lib/transferzero-sdk/models/sender.rb', line 766 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
772 773 774 775 776 777 778 779 780 |
# File 'lib/transferzero-sdk/models/sender.rb', line 772 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_s ⇒ String
Returns the string representation of the object
760 761 762 |
# File 'lib/transferzero-sdk/models/sender.rb', line 760 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 |
# File 'lib/transferzero-sdk/models/sender.rb', line 554 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 @phone_country.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"]) 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 |