transferzero-sdk 1.8.0 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +93 -0
- data/README.md +15 -5
- data/docs/AccountMeta.md +1 -1
- data/docs/AccountValidationRequest.md +2 -0
- data/docs/Currency.md +1 -3
- data/docs/CurrencyExchange.md +1 -3
- data/docs/CurrencyOpposite.md +4 -4
- data/docs/Document.md +7 -3
- data/docs/DocumentsApi.md +2 -74
- data/docs/FieldSelectValidation.md +1 -1
- data/docs/FieldValidation.md +1 -1
- data/docs/PayinMethodDetails.md +3 -1
- data/docs/PayinMethodDetailsBTC.md +17 -0
- data/docs/PayinMethodDetailsMobile.md +1 -1
- data/docs/PaymentMethod.md +2 -2
- data/docs/PaymentMethodOpposite.md +2 -2
- data/docs/PayoutMethod.md +1 -1
- data/docs/PayoutMethodCashProviderEnum.md +16 -0
- data/docs/PayoutMethodCountryEnum.md +16 -0
- data/docs/PayoutMethodDetails.md +21 -1
- data/docs/PayoutMethodDetailsBTC.md +23 -0
- data/docs/PayoutMethodDetailsGBPBank.md +29 -0
- data/docs/PayoutMethodDetailsIBAN.md +1 -1
- data/docs/PayoutMethodDetailsMobile.md +3 -1
- data/docs/PayoutMethodDetailsXOFCash.md +25 -0
- data/docs/PayoutMethodDetailsZARBank.md +35 -0
- data/docs/ProofOfPayment.md +23 -0
- data/docs/ProofOfPaymentListResponse.md +17 -0
- data/docs/Recipient.md +8 -4
- data/docs/RecipientStateReasonDetails.md +23 -0
- data/docs/RecipientsApi.md +63 -1
- data/docs/Sender.md +74 -34
- data/lib/transferzero-sdk.rb +10 -0
- data/lib/transferzero-sdk/api/documents_api.rb +0 -63
- data/lib/transferzero-sdk/api/recipients_api.rb +56 -2
- data/lib/transferzero-sdk/api_client.rb +5 -3
- data/lib/transferzero-sdk/models/account.rb +70 -69
- data/lib/transferzero-sdk/models/account_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/account_meta.rb +61 -60
- data/lib/transferzero-sdk/models/account_response.rb +66 -65
- data/lib/transferzero-sdk/models/account_validation_error.rb +61 -60
- data/lib/transferzero-sdk/models/account_validation_request.rb +171 -161
- data/lib/transferzero-sdk/models/account_validation_response.rb +66 -65
- data/lib/transferzero-sdk/models/account_validation_result.rb +61 -60
- data/lib/transferzero-sdk/models/api_log.rb +136 -135
- data/lib/transferzero-sdk/models/api_log_list_response.rb +70 -69
- data/lib/transferzero-sdk/models/api_log_response.rb +60 -59
- data/lib/transferzero-sdk/models/currency.rb +133 -142
- data/lib/transferzero-sdk/models/currency_exchange.rb +149 -158
- data/lib/transferzero-sdk/models/currency_exchange_list_response.rb +62 -61
- data/lib/transferzero-sdk/models/currency_list_response.rb +62 -61
- data/lib/transferzero-sdk/models/currency_opposite.rb +166 -165
- data/lib/transferzero-sdk/models/debit.rb +151 -150
- data/lib/transferzero-sdk/models/debit_list_request.rb +61 -60
- data/lib/transferzero-sdk/models/debit_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/debit_request.rb +60 -59
- data/lib/transferzero-sdk/models/debit_request_wrapper.rb +80 -79
- data/lib/transferzero-sdk/models/debit_response.rb +60 -59
- data/lib/transferzero-sdk/models/document.rb +197 -175
- data/lib/transferzero-sdk/models/document_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/document_request.rb +60 -59
- data/lib/transferzero-sdk/models/document_response.rb +60 -59
- data/lib/transferzero-sdk/models/document_webhook.rb +96 -95
- data/lib/transferzero-sdk/models/error_status.rb +66 -65
- data/lib/transferzero-sdk/models/field_description.rb +95 -94
- data/lib/transferzero-sdk/models/field_select_validation.rb +70 -69
- data/lib/transferzero-sdk/models/field_validation.rb +78 -77
- data/lib/transferzero-sdk/models/pagination.rb +97 -96
- data/lib/transferzero-sdk/models/pagination_meta.rb +60 -59
- data/lib/transferzero-sdk/models/payin_method.rb +97 -96
- data/lib/transferzero-sdk/models/payin_method_details.rb +122 -110
- data/lib/transferzero-sdk/models/payin_method_details_btc.rb +204 -0
- data/lib/transferzero-sdk/models/payin_method_details_mobile.rb +75 -74
- data/lib/transferzero-sdk/models/payin_method_details_ngn_bank.rb +71 -70
- data/lib/transferzero-sdk/models/payin_method_request.rb +60 -59
- data/lib/transferzero-sdk/models/payment_method.rb +109 -108
- data/lib/transferzero-sdk/models/payment_method_list_response.rb +61 -60
- data/lib/transferzero-sdk/models/payment_method_opposite.rb +124 -123
- data/lib/transferzero-sdk/models/payout_method.rb +107 -106
- data/lib/transferzero-sdk/models/payout_method_bank_account_type_enum.rb +14 -19
- data/lib/transferzero-sdk/models/payout_method_cash_provider_enum.rb +31 -0
- data/lib/transferzero-sdk/models/payout_method_country_enum.rb +32 -0
- data/lib/transferzero-sdk/models/payout_method_details.rb +417 -297
- data/lib/transferzero-sdk/models/payout_method_details_balance.rb +61 -60
- data/lib/transferzero-sdk/models/payout_method_details_btc.rb +250 -0
- data/lib/transferzero-sdk/models/payout_method_details_gbp_bank.rb +267 -0
- data/lib/transferzero-sdk/models/payout_method_details_ghs_bank.rb +97 -96
- data/lib/transferzero-sdk/models/payout_method_details_iban.rb +100 -104
- data/lib/transferzero-sdk/models/payout_method_details_mad_cash.rb +162 -161
- data/lib/transferzero-sdk/models/payout_method_details_mobile.rb +93 -83
- data/lib/transferzero-sdk/models/payout_method_details_ngn_bank.rb +104 -103
- data/lib/transferzero-sdk/models/payout_method_details_xof_bank.rb +108 -107
- data/lib/transferzero-sdk/models/payout_method_details_xof_cash.rb +254 -0
- data/lib/transferzero-sdk/models/payout_method_details_xof_mobile.rb +97 -96
- data/lib/transferzero-sdk/models/payout_method_details_zar_bank.rb +324 -0
- data/lib/transferzero-sdk/models/payout_method_gender_enum.rb +14 -19
- data/lib/transferzero-sdk/models/payout_method_identity_card_type_enum.rb +15 -20
- data/lib/transferzero-sdk/models/payout_method_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/payout_method_mobile_provider_enum.rb +17 -19
- data/lib/transferzero-sdk/models/payout_method_request.rb +60 -59
- data/lib/transferzero-sdk/models/payout_method_response.rb +60 -59
- data/lib/transferzero-sdk/models/payout_method_webhook.rb +96 -95
- data/lib/transferzero-sdk/models/politically_exposed_person.rb +123 -123
- data/lib/transferzero-sdk/models/proof_of_payment.rb +233 -0
- data/lib/transferzero-sdk/models/proof_of_payment_list_response.rb +204 -0
- data/lib/transferzero-sdk/models/recipient.rb +246 -226
- data/lib/transferzero-sdk/models/recipient_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/recipient_request.rb +60 -59
- data/lib/transferzero-sdk/models/recipient_response.rb +60 -59
- data/lib/transferzero-sdk/models/recipient_state.rb +22 -27
- data/lib/transferzero-sdk/models/recipient_state_reason_details.rb +235 -0
- data/lib/transferzero-sdk/models/recipient_webhook.rb +96 -95
- data/lib/transferzero-sdk/models/sender.rb +595 -358
- data/lib/transferzero-sdk/models/sender_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/sender_request.rb +60 -59
- data/lib/transferzero-sdk/models/sender_response.rb +66 -65
- data/lib/transferzero-sdk/models/sender_response_existing.rb +60 -59
- data/lib/transferzero-sdk/models/sender_response_meta.rb +60 -59
- data/lib/transferzero-sdk/models/sender_state.rb +19 -24
- data/lib/transferzero-sdk/models/sender_webhook.rb +96 -95
- data/lib/transferzero-sdk/models/transaction.rb +192 -191
- data/lib/transferzero-sdk/models/transaction_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/transaction_request.rb +60 -59
- data/lib/transferzero-sdk/models/transaction_response.rb +66 -65
- data/lib/transferzero-sdk/models/transaction_response_existing.rb +66 -65
- data/lib/transferzero-sdk/models/transaction_response_meta.rb +60 -59
- data/lib/transferzero-sdk/models/transaction_state.rb +23 -28
- data/lib/transferzero-sdk/models/transaction_traits.rb +71 -70
- data/lib/transferzero-sdk/models/transaction_webhook.rb +96 -95
- data/lib/transferzero-sdk/models/validation_error_description.rb +62 -61
- data/lib/transferzero-sdk/models/webhook.rb +92 -91
- data/lib/transferzero-sdk/models/webhook_definition.rb +107 -106
- data/lib/transferzero-sdk/models/webhook_definition_event_list_response.rb +61 -60
- data/lib/transferzero-sdk/models/webhook_definition_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/webhook_definition_request.rb +60 -59
- data/lib/transferzero-sdk/models/webhook_definition_response.rb +60 -59
- data/lib/transferzero-sdk/models/webhook_log.rb +97 -96
- data/lib/transferzero-sdk/models/webhook_log_list_response.rb +70 -69
- data/lib/transferzero-sdk/models/webhook_log_metadata.rb +129 -128
- data/lib/transferzero-sdk/models/webhook_log_metadata_request.rb +80 -79
- data/lib/transferzero-sdk/models/webhook_log_metadata_response.rb +81 -80
- data/lib/transferzero-sdk/models/webhook_log_response.rb +60 -59
- data/lib/transferzero-sdk/version.rb +1 -1
- data/spec/models/payin_method_details_btc_spec.rb +41 -0
- data/spec/models/payout_method_cash_provider_enum_spec.rb +35 -0
- data/spec/models/payout_method_country_enum_spec.rb +35 -0
- data/spec/models/payout_method_details_btc_spec.rb +59 -0
- data/spec/models/payout_method_details_gbp_bank_spec.rb +77 -0
- data/spec/models/payout_method_details_xof_cash_spec.rb +71 -0
- data/spec/models/payout_method_details_zar_bank_spec.rb +89 -0
- data/spec/models/proof_of_payment_list_response_spec.rb +41 -0
- data/spec/models/proof_of_payment_spec.rb +59 -0
- data/spec/models/recipient_state_reason_details_spec.rb +59 -0
- data/transferzero-sdk-1.10.0.gem +0 -0
- data/transferzero-sdk-1.11.0.gem +0 -0
- metadata +46 -3
|
@@ -13,448 +13,684 @@ OpenAPI Generator version: 4.0.0-beta3
|
|
|
13
13
|
require 'date'
|
|
14
14
|
|
|
15
15
|
module TransferZero
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
attr_accessor :type
|
|
16
|
+
# This contains the details of the sender. The first time a specific sender is used the full details should be provided. Once a sender is created and is used, the next time you MUST only send the ID of the sender. This is so we can match the same sender across multiple transactions for KYC and audit purposes. Personal Sender Example: ```json { // 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\": \"info@transferzero.com\", // 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\": \"example@home.org\", // 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](https://docs.transferzero.com/docs/transaction-flow/#sender)
|
|
17
|
+
class Sender
|
|
18
|
+
attr_accessor :id
|
|
20
19
|
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
# Type of sender to create - either person or business (defaults to person)
|
|
21
|
+
attr_accessor :type
|
|
23
22
|
|
|
24
|
-
|
|
25
|
-
attr_accessor :phone_country
|
|
23
|
+
attr_accessor :state
|
|
26
24
|
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
# 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
|
+
attr_accessor :country
|
|
29
27
|
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
# Sender's street
|
|
29
|
+
attr_accessor :street
|
|
32
30
|
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
# Zip code of sender
|
|
32
|
+
attr_accessor :postal_code
|
|
35
33
|
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
# Sender's city
|
|
35
|
+
attr_accessor :city
|
|
38
36
|
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
# Phone country of sender in 2-character alpha ISO 3166-2 country format
|
|
38
|
+
attr_accessor :phone_country
|
|
41
39
|
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
# Phone number of sender (without country callcode)
|
|
41
|
+
attr_accessor :phone_number
|
|
44
42
|
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
# Email of sender
|
|
44
|
+
attr_accessor :email
|
|
47
45
|
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
# IP of sender
|
|
47
|
+
attr_accessor :ip
|
|
50
48
|
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
# Description of address
|
|
50
|
+
attr_accessor :address_description
|
|
53
51
|
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
# Identification number of document used
|
|
53
|
+
attr_accessor :identification_number
|
|
56
54
|
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
# Document to be identified. The identification type can be one of the following: - `DL`: Driving License - `PP`: International Passport - `ID`: National ID - `OT`: Other Please note for Wizall `XOF::Cash` transactions the valid options are: - `ID`: National ID - `PP`: Passport
|
|
56
|
+
attr_accessor :identification_type
|
|
59
57
|
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
# Determines language of the served content. Defaults to English
|
|
59
|
+
attr_accessor :lang
|
|
62
60
|
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
# Name of sender (used only with a Business sender)
|
|
62
|
+
attr_accessor :name
|
|
65
63
|
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
# First name of sender (used only with a Personal sender)
|
|
65
|
+
attr_accessor :first_name
|
|
68
66
|
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
# Middle name of sender (used only with a Personal sender)
|
|
68
|
+
attr_accessor :middle_name
|
|
71
69
|
|
|
72
|
-
|
|
73
|
-
|
|
70
|
+
# Last name of sender (used only with a Personal sender)
|
|
71
|
+
attr_accessor :last_name
|
|
74
72
|
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
# Date of birth of sender (used only with a Personal sender)
|
|
74
|
+
attr_accessor :birth_date
|
|
77
75
|
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
# Occupation of sender (used only with a Personal sender)
|
|
77
|
+
attr_accessor :occupation
|
|
80
78
|
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
# The nationality of the sender (used only with a Personal sender)
|
|
80
|
+
attr_accessor :nationality
|
|
83
81
|
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
# 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
|
+
attr_accessor :legal_entity_type
|
|
86
84
|
|
|
87
|
-
|
|
88
|
-
|
|
85
|
+
# The registration date (used only with a Business sender)
|
|
86
|
+
attr_accessor :registration_date
|
|
89
87
|
|
|
90
|
-
|
|
91
|
-
|
|
88
|
+
# The registration number (used only with a Business sender)
|
|
89
|
+
attr_accessor :registration_number
|
|
92
90
|
|
|
93
|
-
|
|
91
|
+
# 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
|
+
attr_accessor :nature_of_business
|
|
94
93
|
|
|
95
|
-
|
|
94
|
+
# The source of funds
|
|
95
|
+
attr_accessor :source_of_funds
|
|
96
96
|
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
# Custom source of funds
|
|
98
|
+
attr_accessor :custom_source_of_funds
|
|
99
99
|
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
# The core activity (used only with a Business sender)
|
|
101
|
+
attr_accessor :core_business_activity
|
|
102
102
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
attr_reader :allowable_values
|
|
103
|
+
# The purpose for opening their account (used only with a Business sender)
|
|
104
|
+
attr_accessor :purpose_of_opening_account
|
|
106
105
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
106
|
+
# The official phone number (used only with a Business sender)
|
|
107
|
+
attr_accessor :office_phone
|
|
108
|
+
|
|
109
|
+
# The VAT registration number (used only with a Business sender)
|
|
110
|
+
attr_accessor :vat_registration_number
|
|
111
|
+
|
|
112
|
+
# The Financial Regulator (used only with a Business sender)
|
|
113
|
+
attr_accessor :financial_regulator
|
|
114
|
+
|
|
115
|
+
# The Regulatory Licence Number (used only with a Business sender)
|
|
116
|
+
attr_accessor :regulatory_licence_number
|
|
117
|
+
|
|
118
|
+
# The contact's email address (used only with a Business sender)
|
|
119
|
+
attr_accessor :contact_person_email
|
|
120
|
+
|
|
121
|
+
# The Business trading country (used only with a Business sender)
|
|
122
|
+
attr_accessor :trading_country
|
|
123
|
+
|
|
124
|
+
# The Business trading address (used only with a Business sender)
|
|
125
|
+
attr_accessor :trading_address
|
|
126
|
+
|
|
127
|
+
# The estimated number of monthly transactions (used only with a Business sender)
|
|
128
|
+
attr_accessor :number_monthly_transactions
|
|
129
|
+
|
|
130
|
+
# The estimated amount for all transactions each month in USD (used only with a Business sender)
|
|
131
|
+
attr_accessor :amount_monthly_transactions
|
|
132
|
+
|
|
133
|
+
# 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
|
+
attr_accessor :documents
|
|
135
|
+
|
|
136
|
+
# 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
|
+
attr_accessor :metadata
|
|
138
|
+
|
|
139
|
+
# The fields that have some problems and don't pass validation
|
|
140
|
+
attr_accessor :errors
|
|
141
|
+
|
|
142
|
+
# The onboarding status of the sender
|
|
143
|
+
attr_accessor :onboarding_status
|
|
144
|
+
|
|
145
|
+
# 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
|
+
attr_accessor :politically_exposed_people
|
|
147
|
+
|
|
148
|
+
# 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
|
+
attr_accessor :external_id
|
|
150
|
+
|
|
151
|
+
# City of birth of sender
|
|
152
|
+
attr_accessor :city_of_birth
|
|
153
|
+
|
|
154
|
+
# Country of birth of sender in 2-character alpha ISO 3166-2 country format
|
|
155
|
+
attr_accessor :country_of_birth
|
|
156
|
+
|
|
157
|
+
# The gender of the sender: - `M`: Male - `F`: Female - `O`: Other
|
|
158
|
+
attr_accessor :gender
|
|
159
|
+
|
|
160
|
+
# Date and time of sender was created
|
|
161
|
+
attr_accessor :created_at
|
|
162
|
+
|
|
163
|
+
class EnumAttributeValidator
|
|
164
|
+
attr_reader :datatype
|
|
165
|
+
attr_reader :allowable_values
|
|
166
|
+
|
|
167
|
+
def initialize(datatype, allowable_values)
|
|
168
|
+
@allowable_values = allowable_values.map do |value|
|
|
169
|
+
case datatype.to_s
|
|
170
|
+
when /Integer/i
|
|
171
|
+
value.to_i
|
|
172
|
+
when /Float/i
|
|
173
|
+
value.to_f
|
|
174
|
+
else
|
|
175
|
+
value
|
|
117
176
|
end
|
|
118
177
|
end
|
|
178
|
+
end
|
|
119
179
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
end
|
|
180
|
+
def valid?(value)
|
|
181
|
+
!value || allowable_values.include?(value)
|
|
123
182
|
end
|
|
183
|
+
end
|
|
124
184
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
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
|
-
:'address_description' => :'String',
|
|
180
|
-
:'postal_code' => :'String',
|
|
181
|
-
:'birth_date' => :'Date',
|
|
182
|
-
:'ip' => :'String',
|
|
183
|
-
:'identification_number' => :'String',
|
|
184
|
-
:'identification_type' => :'String',
|
|
185
|
-
:'documents' => :'Array<Document>',
|
|
186
|
-
:'politically_exposed_people' => :'Array<PoliticallyExposedPerson>',
|
|
187
|
-
:'metadata' => :'Object',
|
|
188
|
-
:'state' => :'SenderState',
|
|
189
|
-
:'id' => :'String',
|
|
190
|
-
:'external_id' => :'String',
|
|
191
|
-
:'errors' => :'Hash<String, Array<ValidationErrorDescription>>'
|
|
192
|
-
}
|
|
193
|
-
end
|
|
194
|
-
|
|
195
|
-
# Initializes the object
|
|
196
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
197
|
-
def initialize(attributes = {})
|
|
198
|
-
if (!attributes.is_a?(Hash))
|
|
199
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::Sender` initialize method"
|
|
200
|
-
end
|
|
185
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
186
|
+
def self.attribute_map
|
|
187
|
+
{
|
|
188
|
+
:'id' => :'id',
|
|
189
|
+
:'type' => :'type',
|
|
190
|
+
:'state' => :'state',
|
|
191
|
+
:'country' => :'country',
|
|
192
|
+
:'street' => :'street',
|
|
193
|
+
:'postal_code' => :'postal_code',
|
|
194
|
+
:'city' => :'city',
|
|
195
|
+
:'phone_country' => :'phone_country',
|
|
196
|
+
:'phone_number' => :'phone_number',
|
|
197
|
+
:'email' => :'email',
|
|
198
|
+
:'ip' => :'ip',
|
|
199
|
+
:'address_description' => :'address_description',
|
|
200
|
+
:'identification_number' => :'identification_number',
|
|
201
|
+
:'identification_type' => :'identification_type',
|
|
202
|
+
:'lang' => :'lang',
|
|
203
|
+
:'name' => :'name',
|
|
204
|
+
:'first_name' => :'first_name',
|
|
205
|
+
:'middle_name' => :'middle_name',
|
|
206
|
+
:'last_name' => :'last_name',
|
|
207
|
+
:'birth_date' => :'birth_date',
|
|
208
|
+
:'occupation' => :'occupation',
|
|
209
|
+
:'nationality' => :'nationality',
|
|
210
|
+
:'legal_entity_type' => :'legal_entity_type',
|
|
211
|
+
:'registration_date' => :'registration_date',
|
|
212
|
+
:'registration_number' => :'registration_number',
|
|
213
|
+
:'nature_of_business' => :'nature_of_business',
|
|
214
|
+
:'source_of_funds' => :'source_of_funds',
|
|
215
|
+
:'custom_source_of_funds' => :'custom_source_of_funds',
|
|
216
|
+
:'core_business_activity' => :'core_business_activity',
|
|
217
|
+
:'purpose_of_opening_account' => :'purpose_of_opening_account',
|
|
218
|
+
:'office_phone' => :'office_phone',
|
|
219
|
+
:'vat_registration_number' => :'vat_registration_number',
|
|
220
|
+
:'financial_regulator' => :'financial_regulator',
|
|
221
|
+
:'regulatory_licence_number' => :'regulatory_licence_number',
|
|
222
|
+
:'contact_person_email' => :'contact_person_email',
|
|
223
|
+
:'trading_country' => :'trading_country',
|
|
224
|
+
:'trading_address' => :'trading_address',
|
|
225
|
+
:'number_monthly_transactions' => :'number_monthly_transactions',
|
|
226
|
+
:'amount_monthly_transactions' => :'amount_monthly_transactions',
|
|
227
|
+
:'documents' => :'documents',
|
|
228
|
+
:'metadata' => :'metadata',
|
|
229
|
+
:'errors' => :'errors',
|
|
230
|
+
:'onboarding_status' => :'onboarding_status',
|
|
231
|
+
:'politically_exposed_people' => :'politically_exposed_people',
|
|
232
|
+
:'external_id' => :'external_id',
|
|
233
|
+
:'city_of_birth' => :'city_of_birth',
|
|
234
|
+
:'country_of_birth' => :'country_of_birth',
|
|
235
|
+
:'gender' => :'gender',
|
|
236
|
+
:'created_at' => :'created_at'
|
|
237
|
+
}
|
|
238
|
+
end
|
|
201
239
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
240
|
+
# Attribute type mapping.
|
|
241
|
+
def self.openapi_types
|
|
242
|
+
{
|
|
243
|
+
:'id' => :'String',
|
|
244
|
+
:'type' => :'String',
|
|
245
|
+
:'state' => :'SenderState',
|
|
246
|
+
:'country' => :'String',
|
|
247
|
+
:'street' => :'String',
|
|
248
|
+
:'postal_code' => :'String',
|
|
249
|
+
:'city' => :'String',
|
|
250
|
+
:'phone_country' => :'String',
|
|
251
|
+
:'phone_number' => :'String',
|
|
252
|
+
:'email' => :'String',
|
|
253
|
+
:'ip' => :'String',
|
|
254
|
+
:'address_description' => :'String',
|
|
255
|
+
:'identification_number' => :'String',
|
|
256
|
+
:'identification_type' => :'String',
|
|
257
|
+
:'lang' => :'String',
|
|
258
|
+
:'name' => :'String',
|
|
259
|
+
:'first_name' => :'String',
|
|
260
|
+
:'middle_name' => :'String',
|
|
261
|
+
:'last_name' => :'String',
|
|
262
|
+
:'birth_date' => :'Date',
|
|
263
|
+
:'occupation' => :'String',
|
|
264
|
+
:'nationality' => :'String',
|
|
265
|
+
:'legal_entity_type' => :'String',
|
|
266
|
+
:'registration_date' => :'Date',
|
|
267
|
+
:'registration_number' => :'String',
|
|
268
|
+
:'nature_of_business' => :'String',
|
|
269
|
+
:'source_of_funds' => :'String',
|
|
270
|
+
:'custom_source_of_funds' => :'String',
|
|
271
|
+
:'core_business_activity' => :'String',
|
|
272
|
+
:'purpose_of_opening_account' => :'String',
|
|
273
|
+
:'office_phone' => :'String',
|
|
274
|
+
:'vat_registration_number' => :'String',
|
|
275
|
+
:'financial_regulator' => :'String',
|
|
276
|
+
:'regulatory_licence_number' => :'String',
|
|
277
|
+
:'contact_person_email' => :'String',
|
|
278
|
+
:'trading_country' => :'String',
|
|
279
|
+
:'trading_address' => :'String',
|
|
280
|
+
:'number_monthly_transactions' => :'String',
|
|
281
|
+
:'amount_monthly_transactions' => :'String',
|
|
282
|
+
:'documents' => :'Array<Document>',
|
|
283
|
+
:'metadata' => :'Object',
|
|
284
|
+
:'errors' => :'Hash<String, Array<ValidationErrorDescription>>',
|
|
285
|
+
:'onboarding_status' => :'String',
|
|
286
|
+
:'politically_exposed_people' => :'Array<PoliticallyExposedPerson>',
|
|
287
|
+
:'external_id' => :'String',
|
|
288
|
+
:'city_of_birth' => :'String',
|
|
289
|
+
:'country_of_birth' => :'String',
|
|
290
|
+
:'gender' => :'String',
|
|
291
|
+
:'created_at' => :'String'
|
|
292
|
+
}
|
|
293
|
+
end
|
|
209
294
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
295
|
+
# Initializes the object
|
|
296
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
297
|
+
def initialize(attributes = {})
|
|
298
|
+
if (!attributes.is_a?(Hash))
|
|
299
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::Sender` initialize method"
|
|
300
|
+
end
|
|
213
301
|
|
|
214
|
-
|
|
215
|
-
|
|
302
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
303
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
304
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
305
|
+
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
|
|
216
306
|
end
|
|
307
|
+
h[k.to_sym] = v
|
|
308
|
+
}
|
|
217
309
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
310
|
+
if attributes.key?(:'id')
|
|
311
|
+
self.id = attributes[:'id']
|
|
312
|
+
end
|
|
221
313
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
314
|
+
if attributes.key?(:'type')
|
|
315
|
+
self.type = attributes[:'type']
|
|
316
|
+
end
|
|
225
317
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
318
|
+
if attributes.key?(:'state')
|
|
319
|
+
self.state = attributes[:'state']
|
|
320
|
+
end
|
|
229
321
|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
322
|
+
if attributes.key?(:'country')
|
|
323
|
+
self.country = attributes[:'country']
|
|
324
|
+
end
|
|
233
325
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
326
|
+
if attributes.key?(:'street')
|
|
327
|
+
self.street = attributes[:'street']
|
|
328
|
+
end
|
|
237
329
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
330
|
+
if attributes.key?(:'postal_code')
|
|
331
|
+
self.postal_code = attributes[:'postal_code']
|
|
332
|
+
end
|
|
241
333
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
334
|
+
if attributes.key?(:'city')
|
|
335
|
+
self.city = attributes[:'city']
|
|
336
|
+
end
|
|
245
337
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
338
|
+
if attributes.key?(:'phone_country')
|
|
339
|
+
self.phone_country = attributes[:'phone_country']
|
|
340
|
+
end
|
|
249
341
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
342
|
+
if attributes.key?(:'phone_number')
|
|
343
|
+
self.phone_number = attributes[:'phone_number']
|
|
344
|
+
end
|
|
253
345
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
346
|
+
if attributes.key?(:'email')
|
|
347
|
+
self.email = attributes[:'email']
|
|
348
|
+
end
|
|
257
349
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
350
|
+
if attributes.key?(:'ip')
|
|
351
|
+
self.ip = attributes[:'ip']
|
|
352
|
+
end
|
|
261
353
|
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
354
|
+
if attributes.key?(:'address_description')
|
|
355
|
+
self.address_description = attributes[:'address_description']
|
|
356
|
+
end
|
|
265
357
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
358
|
+
if attributes.key?(:'identification_number')
|
|
359
|
+
self.identification_number = attributes[:'identification_number']
|
|
360
|
+
end
|
|
269
361
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
362
|
+
if attributes.key?(:'identification_type')
|
|
363
|
+
self.identification_type = attributes[:'identification_type']
|
|
364
|
+
end
|
|
273
365
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
366
|
+
if attributes.key?(:'lang')
|
|
367
|
+
self.lang = attributes[:'lang']
|
|
368
|
+
end
|
|
277
369
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
370
|
+
if attributes.key?(:'name')
|
|
371
|
+
self.name = attributes[:'name']
|
|
372
|
+
end
|
|
281
373
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
374
|
+
if attributes.key?(:'first_name')
|
|
375
|
+
self.first_name = attributes[:'first_name']
|
|
376
|
+
end
|
|
285
377
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
378
|
+
if attributes.key?(:'middle_name')
|
|
379
|
+
self.middle_name = attributes[:'middle_name']
|
|
380
|
+
end
|
|
289
381
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
382
|
+
if attributes.key?(:'last_name')
|
|
383
|
+
self.last_name = attributes[:'last_name']
|
|
384
|
+
end
|
|
293
385
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
386
|
+
if attributes.key?(:'birth_date')
|
|
387
|
+
self.birth_date = attributes[:'birth_date']
|
|
388
|
+
end
|
|
297
389
|
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
end
|
|
302
|
-
end
|
|
390
|
+
if attributes.key?(:'occupation')
|
|
391
|
+
self.occupation = attributes[:'occupation']
|
|
392
|
+
end
|
|
303
393
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
end
|
|
308
|
-
end
|
|
394
|
+
if attributes.key?(:'nationality')
|
|
395
|
+
self.nationality = attributes[:'nationality']
|
|
396
|
+
end
|
|
309
397
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
398
|
+
if attributes.key?(:'legal_entity_type')
|
|
399
|
+
self.legal_entity_type = attributes[:'legal_entity_type']
|
|
400
|
+
end
|
|
313
401
|
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
402
|
+
if attributes.key?(:'registration_date')
|
|
403
|
+
self.registration_date = attributes[:'registration_date']
|
|
404
|
+
end
|
|
317
405
|
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
406
|
+
if attributes.key?(:'registration_number')
|
|
407
|
+
self.registration_number = attributes[:'registration_number']
|
|
408
|
+
end
|
|
321
409
|
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
410
|
+
if attributes.key?(:'nature_of_business')
|
|
411
|
+
self.nature_of_business = attributes[:'nature_of_business']
|
|
412
|
+
end
|
|
325
413
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
self.errors = value
|
|
329
|
-
end
|
|
330
|
-
end
|
|
414
|
+
if attributes.key?(:'source_of_funds')
|
|
415
|
+
self.source_of_funds = attributes[:'source_of_funds']
|
|
331
416
|
end
|
|
332
417
|
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
invalid_properties = Array.new
|
|
337
|
-
if @country.nil?
|
|
338
|
-
invalid_properties.push('invalid value for "country", country cannot be nil.')
|
|
339
|
-
end
|
|
418
|
+
if attributes.key?(:'custom_source_of_funds')
|
|
419
|
+
self.custom_source_of_funds = attributes[:'custom_source_of_funds']
|
|
420
|
+
end
|
|
340
421
|
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
422
|
+
if attributes.key?(:'core_business_activity')
|
|
423
|
+
self.core_business_activity = attributes[:'core_business_activity']
|
|
424
|
+
end
|
|
344
425
|
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
426
|
+
if attributes.key?(:'purpose_of_opening_account')
|
|
427
|
+
self.purpose_of_opening_account = attributes[:'purpose_of_opening_account']
|
|
428
|
+
end
|
|
348
429
|
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
430
|
+
if attributes.key?(:'office_phone')
|
|
431
|
+
self.office_phone = attributes[:'office_phone']
|
|
432
|
+
end
|
|
352
433
|
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
434
|
+
if attributes.key?(:'vat_registration_number')
|
|
435
|
+
self.vat_registration_number = attributes[:'vat_registration_number']
|
|
436
|
+
end
|
|
356
437
|
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
438
|
+
if attributes.key?(:'financial_regulator')
|
|
439
|
+
self.financial_regulator = attributes[:'financial_regulator']
|
|
440
|
+
end
|
|
360
441
|
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
442
|
+
if attributes.key?(:'regulatory_licence_number')
|
|
443
|
+
self.regulatory_licence_number = attributes[:'regulatory_licence_number']
|
|
444
|
+
end
|
|
445
|
+
|
|
446
|
+
if attributes.key?(:'contact_person_email')
|
|
447
|
+
self.contact_person_email = attributes[:'contact_person_email']
|
|
448
|
+
end
|
|
449
|
+
|
|
450
|
+
if attributes.key?(:'trading_country')
|
|
451
|
+
self.trading_country = attributes[:'trading_country']
|
|
452
|
+
end
|
|
453
|
+
|
|
454
|
+
if attributes.key?(:'trading_address')
|
|
455
|
+
self.trading_address = attributes[:'trading_address']
|
|
456
|
+
end
|
|
364
457
|
|
|
365
|
-
|
|
366
|
-
|
|
458
|
+
if attributes.key?(:'number_monthly_transactions')
|
|
459
|
+
self.number_monthly_transactions = attributes[:'number_monthly_transactions']
|
|
460
|
+
end
|
|
461
|
+
|
|
462
|
+
if attributes.key?(:'amount_monthly_transactions')
|
|
463
|
+
self.amount_monthly_transactions = attributes[:'amount_monthly_transactions']
|
|
464
|
+
end
|
|
465
|
+
|
|
466
|
+
if attributes.key?(:'documents')
|
|
467
|
+
if (value = attributes[:'documents']).is_a?(Array)
|
|
468
|
+
self.documents = value
|
|
367
469
|
end
|
|
470
|
+
end
|
|
368
471
|
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
# Check to see if the all the properties in the model are valid
|
|
373
|
-
# @return true if the model is valid
|
|
374
|
-
def valid?
|
|
375
|
-
type_validator = EnumAttributeValidator.new('String', ["person", "business"])
|
|
376
|
-
return false unless type_validator.valid?(@type)
|
|
377
|
-
return false if @country.nil?
|
|
378
|
-
return false if @phone_country.nil?
|
|
379
|
-
return false if @email.nil?
|
|
380
|
-
return false if @city.nil?
|
|
381
|
-
return false if @street.nil?
|
|
382
|
-
return false if @postal_code.nil?
|
|
383
|
-
return false if @ip.nil?
|
|
384
|
-
identification_type_validator = EnumAttributeValidator.new('String', ["DL", "PP", "ID", "OT"])
|
|
385
|
-
return false unless identification_type_validator.valid?(@identification_type)
|
|
386
|
-
return false if @documents.nil?
|
|
387
|
-
true
|
|
472
|
+
if attributes.key?(:'metadata')
|
|
473
|
+
self.metadata = attributes[:'metadata']
|
|
388
474
|
end
|
|
389
475
|
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
validator = EnumAttributeValidator.new('String', ["person", "business"])
|
|
394
|
-
unless validator.valid?(type)
|
|
395
|
-
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
|
476
|
+
if attributes.key?(:'errors')
|
|
477
|
+
if (value = attributes[:'errors']).is_a?(Hash)
|
|
478
|
+
self.errors = value
|
|
396
479
|
end
|
|
397
|
-
@type = type
|
|
398
480
|
end
|
|
399
481
|
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
482
|
+
if attributes.key?(:'onboarding_status')
|
|
483
|
+
self.onboarding_status = attributes[:'onboarding_status']
|
|
484
|
+
end
|
|
485
|
+
|
|
486
|
+
if attributes.key?(:'politically_exposed_people')
|
|
487
|
+
if (value = attributes[:'politically_exposed_people']).is_a?(Array)
|
|
488
|
+
self.politically_exposed_people = value
|
|
406
489
|
end
|
|
407
|
-
@identification_type = identification_type
|
|
408
|
-
end
|
|
409
|
-
|
|
410
|
-
# Checks equality by comparing each attribute.
|
|
411
|
-
# @param [Object] Object to be compared
|
|
412
|
-
def ==(o)
|
|
413
|
-
return true if self.equal?(o)
|
|
414
|
-
self.class == o.class &&
|
|
415
|
-
type == o.type &&
|
|
416
|
-
country == o.country &&
|
|
417
|
-
phone_country == o.phone_country &&
|
|
418
|
-
phone_number == o.phone_number &&
|
|
419
|
-
email == o.email &&
|
|
420
|
-
first_name == o.first_name &&
|
|
421
|
-
middle_name == o.middle_name &&
|
|
422
|
-
last_name == o.last_name &&
|
|
423
|
-
occupation == o.occupation &&
|
|
424
|
-
nationality == o.nationality &&
|
|
425
|
-
onboarding_status == o.onboarding_status &&
|
|
426
|
-
address == o.address &&
|
|
427
|
-
description == o.description &&
|
|
428
|
-
name == o.name &&
|
|
429
|
-
city == o.city &&
|
|
430
|
-
street == o.street &&
|
|
431
|
-
address_description == o.address_description &&
|
|
432
|
-
postal_code == o.postal_code &&
|
|
433
|
-
birth_date == o.birth_date &&
|
|
434
|
-
ip == o.ip &&
|
|
435
|
-
identification_number == o.identification_number &&
|
|
436
|
-
identification_type == o.identification_type &&
|
|
437
|
-
documents == o.documents &&
|
|
438
|
-
politically_exposed_people == o.politically_exposed_people &&
|
|
439
|
-
metadata == o.metadata &&
|
|
440
|
-
state == o.state &&
|
|
441
|
-
id == o.id &&
|
|
442
|
-
external_id == o.external_id &&
|
|
443
|
-
errors == o.errors
|
|
444
|
-
end
|
|
445
|
-
|
|
446
|
-
# @see the `==` method
|
|
447
|
-
# @param [Object] Object to be compared
|
|
448
|
-
def eql?(o)
|
|
449
|
-
self == o
|
|
450
|
-
end
|
|
451
|
-
|
|
452
|
-
# Calculates hash code according to all attributes.
|
|
453
|
-
# @return [Integer] Hash code
|
|
454
|
-
def hash
|
|
455
|
-
[type, country, phone_country, phone_number, email, first_name, middle_name, last_name, occupation, nationality, onboarding_status, address, description, name, city, street, address_description, postal_code, birth_date, ip, identification_number, identification_type, documents, politically_exposed_people, metadata, state, id, external_id, errors].hash
|
|
456
490
|
end
|
|
457
491
|
|
|
492
|
+
if attributes.key?(:'external_id')
|
|
493
|
+
self.external_id = attributes[:'external_id']
|
|
494
|
+
end
|
|
495
|
+
|
|
496
|
+
if attributes.key?(:'city_of_birth')
|
|
497
|
+
self.city_of_birth = attributes[:'city_of_birth']
|
|
498
|
+
end
|
|
499
|
+
|
|
500
|
+
if attributes.key?(:'country_of_birth')
|
|
501
|
+
self.country_of_birth = attributes[:'country_of_birth']
|
|
502
|
+
end
|
|
503
|
+
|
|
504
|
+
if attributes.key?(:'gender')
|
|
505
|
+
self.gender = attributes[:'gender']
|
|
506
|
+
end
|
|
507
|
+
|
|
508
|
+
if attributes.key?(:'created_at')
|
|
509
|
+
self.created_at = attributes[:'created_at']
|
|
510
|
+
end
|
|
511
|
+
end
|
|
512
|
+
|
|
513
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
514
|
+
# @return Array for valid properties with the reasons
|
|
515
|
+
def list_invalid_properties
|
|
516
|
+
invalid_properties = Array.new
|
|
517
|
+
if @country.nil?
|
|
518
|
+
invalid_properties.push('invalid value for "country", country cannot be nil.')
|
|
519
|
+
end
|
|
520
|
+
|
|
521
|
+
if @street.nil?
|
|
522
|
+
invalid_properties.push('invalid value for "street", street cannot be nil.')
|
|
523
|
+
end
|
|
524
|
+
|
|
525
|
+
if @postal_code.nil?
|
|
526
|
+
invalid_properties.push('invalid value for "postal_code", postal_code cannot be nil.')
|
|
527
|
+
end
|
|
528
|
+
|
|
529
|
+
if @city.nil?
|
|
530
|
+
invalid_properties.push('invalid value for "city", city cannot be nil.')
|
|
531
|
+
end
|
|
532
|
+
|
|
533
|
+
if @phone_country.nil?
|
|
534
|
+
invalid_properties.push('invalid value for "phone_country", phone_country cannot be nil.')
|
|
535
|
+
end
|
|
536
|
+
|
|
537
|
+
if @email.nil?
|
|
538
|
+
invalid_properties.push('invalid value for "email", email cannot be nil.')
|
|
539
|
+
end
|
|
540
|
+
|
|
541
|
+
if @ip.nil?
|
|
542
|
+
invalid_properties.push('invalid value for "ip", ip cannot be nil.')
|
|
543
|
+
end
|
|
544
|
+
|
|
545
|
+
if @documents.nil?
|
|
546
|
+
invalid_properties.push('invalid value for "documents", documents cannot be nil.')
|
|
547
|
+
end
|
|
548
|
+
|
|
549
|
+
invalid_properties
|
|
550
|
+
end
|
|
551
|
+
|
|
552
|
+
# Check to see if the all the properties in the model are valid
|
|
553
|
+
# @return true if the model is valid
|
|
554
|
+
def valid?
|
|
555
|
+
type_validator = EnumAttributeValidator.new('String', ["person", "business"])
|
|
556
|
+
return false unless type_validator.valid?(@type)
|
|
557
|
+
return false if @country.nil?
|
|
558
|
+
return false if @street.nil?
|
|
559
|
+
return false if @postal_code.nil?
|
|
560
|
+
return false if @city.nil?
|
|
561
|
+
return false if @phone_country.nil?
|
|
562
|
+
return false if @email.nil?
|
|
563
|
+
return false if @ip.nil?
|
|
564
|
+
identification_type_validator = EnumAttributeValidator.new('String', ["DL", "PP", "ID", "OT"])
|
|
565
|
+
return false unless identification_type_validator.valid?(@identification_type)
|
|
566
|
+
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"])
|
|
567
|
+
return false unless legal_entity_type_validator.valid?(@legal_entity_type)
|
|
568
|
+
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"])
|
|
569
|
+
return false unless nature_of_business_validator.valid?(@nature_of_business)
|
|
570
|
+
return false if @documents.nil?
|
|
571
|
+
gender_validator = EnumAttributeValidator.new('String', ["M", "F", "O"])
|
|
572
|
+
return false unless gender_validator.valid?(@gender)
|
|
573
|
+
true
|
|
574
|
+
end
|
|
575
|
+
|
|
576
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
577
|
+
# @param [Object] type Object to be assigned
|
|
578
|
+
def type=(type)
|
|
579
|
+
validator = EnumAttributeValidator.new('String', ["person", "business"])
|
|
580
|
+
unless validator.valid?(type) || type.empty?
|
|
581
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
|
582
|
+
end
|
|
583
|
+
@type = type
|
|
584
|
+
end
|
|
585
|
+
|
|
586
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
587
|
+
# @param [Object] identification_type Object to be assigned
|
|
588
|
+
def identification_type=(identification_type)
|
|
589
|
+
validator = EnumAttributeValidator.new('String', ["DL", "PP", "ID", "OT"])
|
|
590
|
+
unless validator.valid?(identification_type) || identification_type.empty?
|
|
591
|
+
fail ArgumentError, "invalid value for \"identification_type\", must be one of #{validator.allowable_values}."
|
|
592
|
+
end
|
|
593
|
+
@identification_type = identification_type
|
|
594
|
+
end
|
|
595
|
+
|
|
596
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
597
|
+
# @param [Object] legal_entity_type Object to be assigned
|
|
598
|
+
def legal_entity_type=(legal_entity_type)
|
|
599
|
+
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"])
|
|
600
|
+
unless validator.valid?(legal_entity_type) || legal_entity_type.empty?
|
|
601
|
+
fail ArgumentError, "invalid value for \"legal_entity_type\", must be one of #{validator.allowable_values}."
|
|
602
|
+
end
|
|
603
|
+
@legal_entity_type = legal_entity_type
|
|
604
|
+
end
|
|
605
|
+
|
|
606
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
607
|
+
# @param [Object] nature_of_business Object to be assigned
|
|
608
|
+
def nature_of_business=(nature_of_business)
|
|
609
|
+
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"])
|
|
610
|
+
unless validator.valid?(nature_of_business) || nature_of_business.empty?
|
|
611
|
+
fail ArgumentError, "invalid value for \"nature_of_business\", must be one of #{validator.allowable_values}."
|
|
612
|
+
end
|
|
613
|
+
@nature_of_business = nature_of_business
|
|
614
|
+
end
|
|
615
|
+
|
|
616
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
617
|
+
# @param [Object] gender Object to be assigned
|
|
618
|
+
def gender=(gender)
|
|
619
|
+
validator = EnumAttributeValidator.new('String', ["M", "F", "O"])
|
|
620
|
+
unless validator.valid?(gender) || gender.empty?
|
|
621
|
+
fail ArgumentError, "invalid value for \"gender\", must be one of #{validator.allowable_values}."
|
|
622
|
+
end
|
|
623
|
+
@gender = gender
|
|
624
|
+
end
|
|
625
|
+
|
|
626
|
+
# Checks equality by comparing each attribute.
|
|
627
|
+
# @param [Object] Object to be compared
|
|
628
|
+
def ==(o)
|
|
629
|
+
return true if self.equal?(o)
|
|
630
|
+
self.class == o.class &&
|
|
631
|
+
id == o.id &&
|
|
632
|
+
type == o.type &&
|
|
633
|
+
state == o.state &&
|
|
634
|
+
country == o.country &&
|
|
635
|
+
street == o.street &&
|
|
636
|
+
postal_code == o.postal_code &&
|
|
637
|
+
city == o.city &&
|
|
638
|
+
phone_country == o.phone_country &&
|
|
639
|
+
phone_number == o.phone_number &&
|
|
640
|
+
email == o.email &&
|
|
641
|
+
ip == o.ip &&
|
|
642
|
+
address_description == o.address_description &&
|
|
643
|
+
identification_number == o.identification_number &&
|
|
644
|
+
identification_type == o.identification_type &&
|
|
645
|
+
lang == o.lang &&
|
|
646
|
+
name == o.name &&
|
|
647
|
+
first_name == o.first_name &&
|
|
648
|
+
middle_name == o.middle_name &&
|
|
649
|
+
last_name == o.last_name &&
|
|
650
|
+
birth_date == o.birth_date &&
|
|
651
|
+
occupation == o.occupation &&
|
|
652
|
+
nationality == o.nationality &&
|
|
653
|
+
legal_entity_type == o.legal_entity_type &&
|
|
654
|
+
registration_date == o.registration_date &&
|
|
655
|
+
registration_number == o.registration_number &&
|
|
656
|
+
nature_of_business == o.nature_of_business &&
|
|
657
|
+
source_of_funds == o.source_of_funds &&
|
|
658
|
+
custom_source_of_funds == o.custom_source_of_funds &&
|
|
659
|
+
core_business_activity == o.core_business_activity &&
|
|
660
|
+
purpose_of_opening_account == o.purpose_of_opening_account &&
|
|
661
|
+
office_phone == o.office_phone &&
|
|
662
|
+
vat_registration_number == o.vat_registration_number &&
|
|
663
|
+
financial_regulator == o.financial_regulator &&
|
|
664
|
+
regulatory_licence_number == o.regulatory_licence_number &&
|
|
665
|
+
contact_person_email == o.contact_person_email &&
|
|
666
|
+
trading_country == o.trading_country &&
|
|
667
|
+
trading_address == o.trading_address &&
|
|
668
|
+
number_monthly_transactions == o.number_monthly_transactions &&
|
|
669
|
+
amount_monthly_transactions == o.amount_monthly_transactions &&
|
|
670
|
+
documents == o.documents &&
|
|
671
|
+
metadata == o.metadata &&
|
|
672
|
+
errors == o.errors &&
|
|
673
|
+
onboarding_status == o.onboarding_status &&
|
|
674
|
+
politically_exposed_people == o.politically_exposed_people &&
|
|
675
|
+
external_id == o.external_id &&
|
|
676
|
+
city_of_birth == o.city_of_birth &&
|
|
677
|
+
country_of_birth == o.country_of_birth &&
|
|
678
|
+
gender == o.gender &&
|
|
679
|
+
created_at == o.created_at
|
|
680
|
+
end
|
|
681
|
+
|
|
682
|
+
# @see the `==` method
|
|
683
|
+
# @param [Object] Object to be compared
|
|
684
|
+
def eql?(o)
|
|
685
|
+
self == o
|
|
686
|
+
end
|
|
687
|
+
|
|
688
|
+
# Calculates hash code according to all attributes.
|
|
689
|
+
# @return [Integer] Hash code
|
|
690
|
+
def hash
|
|
691
|
+
[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, metadata, errors, onboarding_status, politically_exposed_people, external_id, city_of_birth, country_of_birth, gender, created_at].hash
|
|
692
|
+
end
|
|
693
|
+
|
|
458
694
|
require 'active_support/core_ext/hash'
|
|
459
695
|
require 'active_support/hash_with_indifferent_access.rb'
|
|
460
696
|
# Builds the object from hash
|
|
@@ -569,5 +805,6 @@ def _to_hash(value)
|
|
|
569
805
|
end
|
|
570
806
|
end
|
|
571
807
|
|
|
572
|
-
|
|
808
|
+
end
|
|
809
|
+
|
|
573
810
|
end
|