transferzero-sdk 1.6.0 → 1.10.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 +12 -4
- data/docs/Currency.md +0 -2
- data/docs/CurrencyExchange.md +0 -2
- data/docs/CurrencyOpposite.md +3 -3
- data/docs/Document.md +2 -0
- data/docs/PayoutMethod.md +1 -1
- data/docs/PayoutMethodCashProviderEnum.md +16 -0
- data/docs/PayoutMethodDetails.md +19 -5
- data/docs/PayoutMethodDetailsGBPBank.md +29 -0
- data/docs/PayoutMethodDetailsIBAN.md +1 -1
- data/docs/PayoutMethodDetailsMobile.md +3 -1
- data/docs/PayoutMethodDetailsXOFCash.md +27 -0
- data/docs/PayoutMethodDetailsZARBank.md +35 -0
- data/docs/ProofOfPayment.md +23 -0
- data/docs/ProofOfPaymentListResponse.md +17 -0
- data/docs/Recipient.md +3 -1
- data/docs/RecipientStateReasonDetails.md +23 -0
- data/docs/RecipientsApi.md +63 -1
- data/docs/Sender.md +20 -8
- data/lib/transferzero-sdk.rb +7 -0
- 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 +164 -163
- 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 +180 -169
- 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 -121
- data/lib/transferzero-sdk/models/payin_method_details_btc.rb +62 -61
- 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_details.rb +402 -320
- data/lib/transferzero-sdk/models/payout_method_details_balance.rb +61 -60
- data/lib/transferzero-sdk/models/payout_method_details_btc.rb +97 -96
- 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 +263 -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 -122
- 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 +237 -227
- 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 +565 -480
- 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/payout_method_cash_provider_enum_spec.rb +35 -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
- metadata +32 -3
|
@@ -13,599 +13,683 @@ OpenAPI Generator version: 4.0.0-beta3
|
|
|
13
13
|
require 'date'
|
|
14
14
|
|
|
15
15
|
module TransferZero
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
# Type of sender to create - either person or business (defaults to person)
|
|
21
|
+
attr_accessor :type
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
attr_accessor :state
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
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
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
# Sender's street
|
|
29
|
+
attr_accessor :street
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
# Zip code of sender
|
|
32
|
+
attr_accessor :postal_code
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
# Sender's city
|
|
35
|
+
attr_accessor :city
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
# Phone country of sender in 2-character alpha ISO 3166-2 country format
|
|
38
|
+
attr_accessor :phone_country
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
# Phone number of sender (without country callcode)
|
|
41
|
+
attr_accessor :phone_number
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
# Email of sender
|
|
44
|
+
attr_accessor :email
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
# IP of sender
|
|
47
|
+
attr_accessor :ip
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
# Description of address
|
|
50
|
+
attr_accessor :address_description
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
# Identification number of document used
|
|
53
|
+
attr_accessor :identification_number
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
# Document to be identified. The identification type can be one of the following: - `DL`: Driving License - `PP`: International Passport - `ID`: National ID - `OT`: Other
|
|
56
|
+
attr_accessor :identification_type
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
# Determines language of the served content. Defaults to English
|
|
59
|
+
attr_accessor :lang
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
# Name of sender (used only with a Business sender)
|
|
62
|
+
attr_accessor :name
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
# First name of sender (used only with a Personal sender)
|
|
65
|
+
attr_accessor :first_name
|
|
66
66
|
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
# Middle name of sender (used only with a Personal sender)
|
|
68
|
+
attr_accessor :middle_name
|
|
69
69
|
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
# Last name of sender (used only with a Personal sender)
|
|
71
|
+
attr_accessor :last_name
|
|
72
72
|
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
# Date of birth of sender (used only with a Personal sender)
|
|
74
|
+
attr_accessor :birth_date
|
|
75
75
|
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
# Occupation of sender (used only with a Personal sender)
|
|
77
|
+
attr_accessor :occupation
|
|
78
78
|
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
# The nationality of the sender (used only with a Personal sender)
|
|
80
|
+
attr_accessor :nationality
|
|
81
81
|
|
|
82
|
-
|
|
83
|
-
|
|
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
|
|
84
84
|
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
# The registration date (used only with a Business sender)
|
|
86
|
+
attr_accessor :registration_date
|
|
87
87
|
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
# The registration number (used only with a Business sender)
|
|
89
|
+
attr_accessor :registration_number
|
|
90
90
|
|
|
91
|
-
|
|
92
|
-
|
|
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
|
|
93
93
|
|
|
94
|
-
|
|
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
|
-
|
|
103
|
+
# The purpose for opening their account (used only with a Business sender)
|
|
104
|
+
attr_accessor :purpose_of_opening_account
|
|
105
105
|
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
# The official phone number (used only with a Business sender)
|
|
107
|
+
attr_accessor :office_phone
|
|
108
108
|
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
# The VAT registration number (used only with a Business sender)
|
|
110
|
+
attr_accessor :vat_registration_number
|
|
111
111
|
|
|
112
|
-
|
|
113
|
-
|
|
112
|
+
# The Financial Regulator (used only with a Business sender)
|
|
113
|
+
attr_accessor :financial_regulator
|
|
114
114
|
|
|
115
|
-
|
|
116
|
-
|
|
115
|
+
# The Regulatory Licence Number (used only with a Business sender)
|
|
116
|
+
attr_accessor :regulatory_licence_number
|
|
117
117
|
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
# The contact's email address (used only with a Business sender)
|
|
119
|
+
attr_accessor :contact_person_email
|
|
120
120
|
|
|
121
|
-
|
|
122
|
-
|
|
121
|
+
# The Business trading country (used only with a Business sender)
|
|
122
|
+
attr_accessor :trading_country
|
|
123
123
|
|
|
124
|
-
|
|
125
|
-
|
|
124
|
+
# The Business trading address (used only with a Business sender)
|
|
125
|
+
attr_accessor :trading_address
|
|
126
126
|
|
|
127
|
-
|
|
128
|
-
|
|
127
|
+
# The estimated number of monthly transactions (used only with a Business sender)
|
|
128
|
+
attr_accessor :number_monthly_transactions
|
|
129
129
|
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
# The estimated amount for all transactions each month in USD (used only with a Business sender)
|
|
131
|
+
attr_accessor :amount_monthly_transactions
|
|
132
132
|
|
|
133
|
-
|
|
134
|
-
|
|
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
135
|
|
|
136
|
-
|
|
137
|
-
|
|
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
138
|
|
|
139
|
-
|
|
140
|
-
|
|
139
|
+
# The fields that have some problems and don't pass validation
|
|
140
|
+
attr_accessor :errors
|
|
141
141
|
|
|
142
|
-
|
|
143
|
-
|
|
142
|
+
# The onboarding status of the sender
|
|
143
|
+
attr_accessor :onboarding_status
|
|
144
144
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
attr_reader :allowable_values
|
|
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
|
|
148
147
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
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
|
|
159
176
|
end
|
|
160
177
|
end
|
|
178
|
+
end
|
|
161
179
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
end
|
|
180
|
+
def valid?(value)
|
|
181
|
+
!value || allowable_values.include?(value)
|
|
165
182
|
end
|
|
183
|
+
end
|
|
166
184
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
:'state' => :'SenderState',
|
|
222
|
-
:'country' => :'String',
|
|
223
|
-
:'street' => :'String',
|
|
224
|
-
:'postal_code' => :'String',
|
|
225
|
-
:'city' => :'String',
|
|
226
|
-
:'phone_country' => :'String',
|
|
227
|
-
:'phone_number' => :'String',
|
|
228
|
-
:'email' => :'String',
|
|
229
|
-
:'ip' => :'String',
|
|
230
|
-
:'address_description' => :'String',
|
|
231
|
-
:'identification_number' => :'String',
|
|
232
|
-
:'identification_type' => :'String',
|
|
233
|
-
:'name' => :'String',
|
|
234
|
-
:'first_name' => :'String',
|
|
235
|
-
:'middle_name' => :'String',
|
|
236
|
-
:'last_name' => :'String',
|
|
237
|
-
:'birth_date' => :'Date',
|
|
238
|
-
:'occupation' => :'String',
|
|
239
|
-
:'nationality' => :'String',
|
|
240
|
-
:'legal_entity_type' => :'String',
|
|
241
|
-
:'registration_date' => :'String',
|
|
242
|
-
:'registration_number' => :'String',
|
|
243
|
-
:'nature_of_business' => :'String',
|
|
244
|
-
:'source_of_funds' => :'String',
|
|
245
|
-
:'core_business_activities' => :'String',
|
|
246
|
-
:'purpose_of_opening_account' => :'String',
|
|
247
|
-
:'office_phone' => :'String',
|
|
248
|
-
:'vat_registration_number' => :'String',
|
|
249
|
-
:'financial_regulator' => :'String',
|
|
250
|
-
:'regulatory_licence_number' => :'String',
|
|
251
|
-
:'contact_person_email' => :'String',
|
|
252
|
-
:'trading_country' => :'String',
|
|
253
|
-
:'trading_address' => :'String',
|
|
254
|
-
:'number_monthly_transactions' => :'String',
|
|
255
|
-
:'amount_monthly_transactions' => :'String',
|
|
256
|
-
:'documents' => :'Array<Document>',
|
|
257
|
-
:'metadata' => :'Object',
|
|
258
|
-
:'errors' => :'Hash<String, Array<ValidationErrorDescription>>',
|
|
259
|
-
:'onboarding_status' => :'String',
|
|
260
|
-
:'politically_exposed_people' => :'Array<PoliticallyExposedPerson>',
|
|
261
|
-
:'external_id' => :'String'
|
|
262
|
-
}
|
|
263
|
-
end
|
|
264
|
-
|
|
265
|
-
# Initializes the object
|
|
266
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
267
|
-
def initialize(attributes = {})
|
|
268
|
-
if (!attributes.is_a?(Hash))
|
|
269
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::Sender` initialize method"
|
|
270
|
-
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
|
|
271
239
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
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
|
|
279
294
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
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
|
|
283
301
|
|
|
284
|
-
|
|
285
|
-
|
|
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
|
|
286
306
|
end
|
|
307
|
+
h[k.to_sym] = v
|
|
308
|
+
}
|
|
287
309
|
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
310
|
+
if attributes.key?(:'id')
|
|
311
|
+
self.id = attributes[:'id']
|
|
312
|
+
end
|
|
291
313
|
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
314
|
+
if attributes.key?(:'type')
|
|
315
|
+
self.type = attributes[:'type']
|
|
316
|
+
end
|
|
295
317
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
318
|
+
if attributes.key?(:'state')
|
|
319
|
+
self.state = attributes[:'state']
|
|
320
|
+
end
|
|
299
321
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
322
|
+
if attributes.key?(:'country')
|
|
323
|
+
self.country = attributes[:'country']
|
|
324
|
+
end
|
|
303
325
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
326
|
+
if attributes.key?(:'street')
|
|
327
|
+
self.street = attributes[:'street']
|
|
328
|
+
end
|
|
307
329
|
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
330
|
+
if attributes.key?(:'postal_code')
|
|
331
|
+
self.postal_code = attributes[:'postal_code']
|
|
332
|
+
end
|
|
311
333
|
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
334
|
+
if attributes.key?(:'city')
|
|
335
|
+
self.city = attributes[:'city']
|
|
336
|
+
end
|
|
315
337
|
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
338
|
+
if attributes.key?(:'phone_country')
|
|
339
|
+
self.phone_country = attributes[:'phone_country']
|
|
340
|
+
end
|
|
319
341
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
342
|
+
if attributes.key?(:'phone_number')
|
|
343
|
+
self.phone_number = attributes[:'phone_number']
|
|
344
|
+
end
|
|
323
345
|
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
346
|
+
if attributes.key?(:'email')
|
|
347
|
+
self.email = attributes[:'email']
|
|
348
|
+
end
|
|
327
349
|
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
350
|
+
if attributes.key?(:'ip')
|
|
351
|
+
self.ip = attributes[:'ip']
|
|
352
|
+
end
|
|
331
353
|
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
354
|
+
if attributes.key?(:'address_description')
|
|
355
|
+
self.address_description = attributes[:'address_description']
|
|
356
|
+
end
|
|
335
357
|
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
358
|
+
if attributes.key?(:'identification_number')
|
|
359
|
+
self.identification_number = attributes[:'identification_number']
|
|
360
|
+
end
|
|
339
361
|
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
362
|
+
if attributes.key?(:'identification_type')
|
|
363
|
+
self.identification_type = attributes[:'identification_type']
|
|
364
|
+
end
|
|
343
365
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
366
|
+
if attributes.key?(:'lang')
|
|
367
|
+
self.lang = attributes[:'lang']
|
|
368
|
+
end
|
|
347
369
|
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
370
|
+
if attributes.key?(:'name')
|
|
371
|
+
self.name = attributes[:'name']
|
|
372
|
+
end
|
|
351
373
|
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
374
|
+
if attributes.key?(:'first_name')
|
|
375
|
+
self.first_name = attributes[:'first_name']
|
|
376
|
+
end
|
|
355
377
|
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
378
|
+
if attributes.key?(:'middle_name')
|
|
379
|
+
self.middle_name = attributes[:'middle_name']
|
|
380
|
+
end
|
|
359
381
|
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
382
|
+
if attributes.key?(:'last_name')
|
|
383
|
+
self.last_name = attributes[:'last_name']
|
|
384
|
+
end
|
|
363
385
|
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
386
|
+
if attributes.key?(:'birth_date')
|
|
387
|
+
self.birth_date = attributes[:'birth_date']
|
|
388
|
+
end
|
|
367
389
|
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
390
|
+
if attributes.key?(:'occupation')
|
|
391
|
+
self.occupation = attributes[:'occupation']
|
|
392
|
+
end
|
|
371
393
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
394
|
+
if attributes.key?(:'nationality')
|
|
395
|
+
self.nationality = attributes[:'nationality']
|
|
396
|
+
end
|
|
375
397
|
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
398
|
+
if attributes.key?(:'legal_entity_type')
|
|
399
|
+
self.legal_entity_type = attributes[:'legal_entity_type']
|
|
400
|
+
end
|
|
379
401
|
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
402
|
+
if attributes.key?(:'registration_date')
|
|
403
|
+
self.registration_date = attributes[:'registration_date']
|
|
404
|
+
end
|
|
383
405
|
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
406
|
+
if attributes.key?(:'registration_number')
|
|
407
|
+
self.registration_number = attributes[:'registration_number']
|
|
408
|
+
end
|
|
387
409
|
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
410
|
+
if attributes.key?(:'nature_of_business')
|
|
411
|
+
self.nature_of_business = attributes[:'nature_of_business']
|
|
412
|
+
end
|
|
391
413
|
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
414
|
+
if attributes.key?(:'source_of_funds')
|
|
415
|
+
self.source_of_funds = attributes[:'source_of_funds']
|
|
416
|
+
end
|
|
395
417
|
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
418
|
+
if attributes.key?(:'custom_source_of_funds')
|
|
419
|
+
self.custom_source_of_funds = attributes[:'custom_source_of_funds']
|
|
420
|
+
end
|
|
399
421
|
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
422
|
+
if attributes.key?(:'core_business_activity')
|
|
423
|
+
self.core_business_activity = attributes[:'core_business_activity']
|
|
424
|
+
end
|
|
403
425
|
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
426
|
+
if attributes.key?(:'purpose_of_opening_account')
|
|
427
|
+
self.purpose_of_opening_account = attributes[:'purpose_of_opening_account']
|
|
428
|
+
end
|
|
407
429
|
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
430
|
+
if attributes.key?(:'office_phone')
|
|
431
|
+
self.office_phone = attributes[:'office_phone']
|
|
432
|
+
end
|
|
411
433
|
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
434
|
+
if attributes.key?(:'vat_registration_number')
|
|
435
|
+
self.vat_registration_number = attributes[:'vat_registration_number']
|
|
436
|
+
end
|
|
415
437
|
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
438
|
+
if attributes.key?(:'financial_regulator')
|
|
439
|
+
self.financial_regulator = attributes[:'financial_regulator']
|
|
440
|
+
end
|
|
419
441
|
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
442
|
+
if attributes.key?(:'regulatory_licence_number')
|
|
443
|
+
self.regulatory_licence_number = attributes[:'regulatory_licence_number']
|
|
444
|
+
end
|
|
423
445
|
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
446
|
+
if attributes.key?(:'contact_person_email')
|
|
447
|
+
self.contact_person_email = attributes[:'contact_person_email']
|
|
448
|
+
end
|
|
427
449
|
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
end
|
|
432
|
-
end
|
|
450
|
+
if attributes.key?(:'trading_country')
|
|
451
|
+
self.trading_country = attributes[:'trading_country']
|
|
452
|
+
end
|
|
433
453
|
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
454
|
+
if attributes.key?(:'trading_address')
|
|
455
|
+
self.trading_address = attributes[:'trading_address']
|
|
456
|
+
end
|
|
437
457
|
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
end
|
|
442
|
-
end
|
|
458
|
+
if attributes.key?(:'number_monthly_transactions')
|
|
459
|
+
self.number_monthly_transactions = attributes[:'number_monthly_transactions']
|
|
460
|
+
end
|
|
443
461
|
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
462
|
+
if attributes.key?(:'amount_monthly_transactions')
|
|
463
|
+
self.amount_monthly_transactions = attributes[:'amount_monthly_transactions']
|
|
464
|
+
end
|
|
447
465
|
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
end
|
|
466
|
+
if attributes.key?(:'documents')
|
|
467
|
+
if (value = attributes[:'documents']).is_a?(Array)
|
|
468
|
+
self.documents = value
|
|
452
469
|
end
|
|
470
|
+
end
|
|
453
471
|
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
end
|
|
472
|
+
if attributes.key?(:'metadata')
|
|
473
|
+
self.metadata = attributes[:'metadata']
|
|
457
474
|
end
|
|
458
475
|
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
invalid_properties = Array.new
|
|
463
|
-
if @country.nil?
|
|
464
|
-
invalid_properties.push('invalid value for "country", country cannot be nil.')
|
|
476
|
+
if attributes.key?(:'errors')
|
|
477
|
+
if (value = attributes[:'errors']).is_a?(Hash)
|
|
478
|
+
self.errors = value
|
|
465
479
|
end
|
|
480
|
+
end
|
|
466
481
|
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
482
|
+
if attributes.key?(:'onboarding_status')
|
|
483
|
+
self.onboarding_status = attributes[:'onboarding_status']
|
|
484
|
+
end
|
|
470
485
|
|
|
471
|
-
|
|
472
|
-
|
|
486
|
+
if attributes.key?(:'politically_exposed_people')
|
|
487
|
+
if (value = attributes[:'politically_exposed_people']).is_a?(Array)
|
|
488
|
+
self.politically_exposed_people = value
|
|
473
489
|
end
|
|
490
|
+
end
|
|
474
491
|
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
492
|
+
if attributes.key?(:'external_id')
|
|
493
|
+
self.external_id = attributes[:'external_id']
|
|
494
|
+
end
|
|
478
495
|
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
496
|
+
if attributes.key?(:'city_of_birth')
|
|
497
|
+
self.city_of_birth = attributes[:'city_of_birth']
|
|
498
|
+
end
|
|
482
499
|
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
500
|
+
if attributes.key?(:'country_of_birth')
|
|
501
|
+
self.country_of_birth = attributes[:'country_of_birth']
|
|
502
|
+
end
|
|
486
503
|
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
504
|
+
if attributes.key?(:'gender')
|
|
505
|
+
self.gender = attributes[:'gender']
|
|
506
|
+
end
|
|
490
507
|
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
508
|
+
if attributes.key?(:'created_at')
|
|
509
|
+
self.created_at = attributes[:'created_at']
|
|
510
|
+
end
|
|
511
|
+
end
|
|
494
512
|
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
type_validator = EnumAttributeValidator.new('String', ["person", "business"])
|
|
502
|
-
return false unless type_validator.valid?(@type)
|
|
503
|
-
return false if @country.nil?
|
|
504
|
-
return false if @street.nil?
|
|
505
|
-
return false if @postal_code.nil?
|
|
506
|
-
return false if @city.nil?
|
|
507
|
-
return false if @phone_country.nil?
|
|
508
|
-
return false if @email.nil?
|
|
509
|
-
return false if @ip.nil?
|
|
510
|
-
identification_type_validator = EnumAttributeValidator.new('String', ["DL", "PP", "ID", "OT"])
|
|
511
|
-
return false unless identification_type_validator.valid?(@identification_type)
|
|
512
|
-
legal_entity_type_validator = EnumAttributeValidator.new('String', ["sole_proprietorship", "partnership", "privately_owned_company", "publicly_owned_company", "government_owned_entity", "trust", "ngo", "club_and_society", "go", "other", "financial_institution"])
|
|
513
|
-
return false unless legal_entity_type_validator.valid?(@legal_entity_type)
|
|
514
|
-
return false if @documents.nil?
|
|
515
|
-
true
|
|
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.')
|
|
516
519
|
end
|
|
517
520
|
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
def type=(type)
|
|
521
|
-
validator = EnumAttributeValidator.new('String', ["person", "business"])
|
|
522
|
-
unless validator.valid?(type)
|
|
523
|
-
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
|
524
|
-
end
|
|
525
|
-
@type = type
|
|
521
|
+
if @street.nil?
|
|
522
|
+
invalid_properties.push('invalid value for "street", street cannot be nil.')
|
|
526
523
|
end
|
|
527
524
|
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
def identification_type=(identification_type)
|
|
531
|
-
validator = EnumAttributeValidator.new('String', ["DL", "PP", "ID", "OT"])
|
|
532
|
-
unless validator.valid?(identification_type)
|
|
533
|
-
fail ArgumentError, "invalid value for \"identification_type\", must be one of #{validator.allowable_values}."
|
|
534
|
-
end
|
|
535
|
-
@identification_type = identification_type
|
|
525
|
+
if @postal_code.nil?
|
|
526
|
+
invalid_properties.push('invalid value for "postal_code", postal_code cannot be nil.')
|
|
536
527
|
end
|
|
537
528
|
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
self == o
|
|
602
|
-
end
|
|
603
|
-
|
|
604
|
-
# Calculates hash code according to all attributes.
|
|
605
|
-
# @return [Integer] Hash code
|
|
606
|
-
def hash
|
|
607
|
-
[id, type, state, country, street, postal_code, city, phone_country, phone_number, email, ip, address_description, identification_number, identification_type, name, first_name, middle_name, last_name, birth_date, occupation, nationality, legal_entity_type, registration_date, registration_number, nature_of_business, source_of_funds, core_business_activities, purpose_of_opening_account, office_phone, vat_registration_number, financial_regulator, regulatory_licence_number, contact_person_email, trading_country, trading_address, number_monthly_transactions, amount_monthly_transactions, documents, metadata, errors, onboarding_status, politically_exposed_people, external_id].hash
|
|
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}."
|
|
608
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
|
|
609
693
|
|
|
610
694
|
require 'active_support/core_ext/hash'
|
|
611
695
|
require 'active_support/hash_with_indifferent_access.rb'
|
|
@@ -721,5 +805,6 @@ def _to_hash(value)
|
|
|
721
805
|
end
|
|
722
806
|
end
|
|
723
807
|
|
|
724
|
-
|
|
808
|
+
end
|
|
809
|
+
|
|
725
810
|
end
|