transferzero-sdk 1.5.0 → 1.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -5
- data/docs/Currency.md +0 -2
- data/docs/CurrencyExchange.md +0 -2
- data/docs/CurrencyOpposite.md +3 -3
- data/docs/Document.md +3 -3
- data/docs/DocumentsApi.md +2 -74
- data/docs/PayinMethodDetails.md +3 -1
- data/docs/PayinMethodDetailsBTC.md +17 -0
- data/docs/PayoutMethod.md +1 -1
- data/docs/PayoutMethodDetails.md +17 -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/PayoutMethodDetailsZARBank.md +35 -0
- data/docs/PoliticallyExposedPerson.md +31 -0
- data/docs/Recipient.md +1 -1
- data/docs/RecipientsApi.md +1 -1
- data/docs/Sender.md +72 -32
- data/docs/Transaction.md +3 -3
- data/lib/transferzero-sdk.rb +5 -0
- data/lib/transferzero-sdk/api/documents_api.rb +0 -63
- data/lib/transferzero-sdk/api/recipients_api.rb +2 -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 +179 -177
- 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_details.rb +398 -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_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 +272 -0
- data/lib/transferzero-sdk/models/recipient.rb +230 -229
- 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_webhook.rb +96 -95
- data/lib/transferzero-sdk/models/sender.rb +587 -348
- 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_details_btc_spec.rb +59 -0
- data/spec/models/payout_method_details_gbp_bank_spec.rb +77 -0
- data/spec/models/payout_method_details_zar_bank_spec.rb +89 -0
- data/spec/models/politically_exposed_person_spec.rb +83 -0
- metadata +32 -13
- data/transferzero-sdk-1.4.0.gem +0 -0
@@ -0,0 +1,35 @@
|
|
1
|
+
# TransferZero::PayoutMethodDetailsZARBank
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**first_name** | **String** | |
|
8
|
+
**last_name** | **String** | |
|
9
|
+
**street** | **String** | |
|
10
|
+
**postal_code** | **String** | |
|
11
|
+
**city** | **String** | |
|
12
|
+
**email** | **String** | | [optional]
|
13
|
+
**bank_code** | **String** | |
|
14
|
+
**bank_account** | **String** | |
|
15
|
+
**phone_number** | **String** | |
|
16
|
+
**transfer_reason_code** | **String** | | [optional]
|
17
|
+
|
18
|
+
## Code Sample
|
19
|
+
|
20
|
+
```ruby
|
21
|
+
require 'TransferZero'
|
22
|
+
|
23
|
+
instance = TransferZero::PayoutMethodDetailsZARBank.new(first_name: null,
|
24
|
+
last_name: null,
|
25
|
+
street: null,
|
26
|
+
postal_code: null,
|
27
|
+
city: null,
|
28
|
+
email: null,
|
29
|
+
bank_code: null,
|
30
|
+
bank_account: null,
|
31
|
+
phone_number: null,
|
32
|
+
transfer_reason_code: null)
|
33
|
+
```
|
34
|
+
|
35
|
+
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# TransferZero::PoliticallyExposedPerson
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**id** | **Integer** | | [optional]
|
8
|
+
**name** | **String** | Full name of the politically exposed person | [optional]
|
9
|
+
**position** | **String** | The office held by the politically exposed person | [optional]
|
10
|
+
**started_date** | **DateTime** | The date on which the person started holding the office | [optional]
|
11
|
+
**ended_date** | **DateTime** | The date on which the person ended holding the office | [optional]
|
12
|
+
**sender_id** | **String** | The ID of the Sender to whom the person is attached to | [optional]
|
13
|
+
**created_at** | **DateTime** | Date and time the person was created | [optional]
|
14
|
+
**updated_at** | **DateTime** | Date and time the person was updated | [optional]
|
15
|
+
|
16
|
+
## Code Sample
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
require 'TransferZero'
|
20
|
+
|
21
|
+
instance = TransferZero::PoliticallyExposedPerson.new(id: 1,
|
22
|
+
name: Ronald Reagan,
|
23
|
+
position: President of the United States,
|
24
|
+
started_date: null,
|
25
|
+
ended_date: null,
|
26
|
+
sender_id: 83a4f5fd-9260-4aaa-9743-63f8a6d8309d,
|
27
|
+
created_at: null,
|
28
|
+
updated_at: null)
|
29
|
+
```
|
30
|
+
|
31
|
+
|
data/docs/Recipient.md
CHANGED
@@ -12,7 +12,7 @@ Name | Type | Description | Notes
|
|
12
12
|
**editable** | **Boolean** | Shows whether the recipient can be edited using the PATCH /v1/recipients/{id} endpoint or not | [optional]
|
13
13
|
**retriable** | **Boolean** | Shows whether the transaction made to the recipient can be retried or not | [optional]
|
14
14
|
**input_usd_amount** | **Float** | Shows how much this payment is worth in USD | [optional]
|
15
|
-
**may_cancel** | **Boolean** |
|
15
|
+
**may_cancel** | **Boolean** | If true it shows that the payment can be cancelled immediately using the DELETE /v1/recipients/{id} endpoint. If false you can still try to cancel it, however it will only gets cancelled once we have confirmation from our partner that the payment has failed. | [optional]
|
16
16
|
**state_reason** | **String** | In case the payment is unsuccessful it holds the error message associated with the last unsuccessful payout. | [optional]
|
17
17
|
**state** | [**RecipientState**](RecipientState.md) | | [optional]
|
18
18
|
**transaction_id** | **String** | The ID of the transaction that is related to this recipient | [optional]
|
data/docs/RecipientsApi.md
CHANGED
@@ -14,7 +14,7 @@ Method | HTTP request | Description
|
|
14
14
|
|
15
15
|
Cancelling a recipient
|
16
16
|
|
17
|
-
Cancels the payment to the recipient specified in the URL path. Please note
|
17
|
+
Cancels the payment to the recipient specified in the URL path. Please note recipients where the `may_cancel` attribute is true will be cancelled immediately. If the `may_cancel` attribute is false you can still try to cancel the recipient, however it will only gets cancelled if we will receive a confirmation from our partner that the payment has failed
|
18
18
|
|
19
19
|
### Example
|
20
20
|
```ruby
|
data/docs/Sender.md
CHANGED
@@ -4,68 +4,108 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
+
**id** | **String** | | [optional]
|
7
8
|
**type** | **String** | Type of sender to create - either person or business (defaults to person) | [optional]
|
8
|
-
**
|
9
|
+
**state** | [**SenderState**](SenderState.md) | | [optional]
|
10
|
+
**country** | **String** | 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. |
|
11
|
+
**street** | **String** | Sender's street |
|
12
|
+
**postal_code** | **String** | Zip code of sender |
|
13
|
+
**city** | **String** | Sender's city |
|
9
14
|
**phone_country** | **String** | Phone country of sender in 2-character alpha ISO 3166-2 country format |
|
10
15
|
**phone_number** | **String** | Phone number of sender (without country callcode) | [optional]
|
11
16
|
**email** | **String** | Email of sender |
|
17
|
+
**ip** | **String** | IP of sender |
|
18
|
+
**address_description** | **String** | Description of address | [optional]
|
19
|
+
**identification_number** | **String** | Identification number of document used | [optional]
|
20
|
+
**identification_type** | **String** | Document to be identified. The identification type can be one of the following: - `DL`: Driving License - `PP`: International Passport - `ID`: National ID - `OT`: Other | [optional]
|
21
|
+
**name** | **String** | Name of sender (used only with a Business sender) | [optional]
|
12
22
|
**first_name** | **String** | First name of sender (used only with a Personal sender) | [optional]
|
13
23
|
**middle_name** | **String** | Middle name of sender (used only with a Personal sender) | [optional]
|
14
24
|
**last_name** | **String** | Last name of sender (used only with a Personal sender) | [optional]
|
25
|
+
**birth_date** | **Date** | Date of birth of sender (used only with a Personal sender) | [optional]
|
15
26
|
**occupation** | **String** | Occupation of sender (used only with a Personal sender) | [optional]
|
16
27
|
**nationality** | **String** | The nationality of the sender (used only with a Personal sender) | [optional]
|
17
|
-
**
|
18
|
-
**
|
19
|
-
**
|
20
|
-
**
|
21
|
-
**
|
22
|
-
**
|
23
|
-
**
|
24
|
-
**
|
25
|
-
**
|
26
|
-
**
|
27
|
-
**
|
28
|
-
**
|
28
|
+
**legal_entity_type** | **String** | 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. | [optional]
|
29
|
+
**registration_date** | **Date** | The registration date (used only with a Business sender) | [optional]
|
30
|
+
**registration_number** | **String** | The registration number (used only with a Business sender) | [optional]
|
31
|
+
**nature_of_business** | **String** | 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 | [optional]
|
32
|
+
**source_of_funds** | **String** | The source of funds | [optional]
|
33
|
+
**custom_source_of_funds** | **String** | Custom source of funds | [optional]
|
34
|
+
**core_business_activity** | **String** | The core activity (used only with a Business sender) | [optional]
|
35
|
+
**purpose_of_opening_account** | **String** | The purpose for opening their account (used only with a Business sender) | [optional]
|
36
|
+
**office_phone** | **String** | The official phone number (used only with a Business sender) | [optional]
|
37
|
+
**vat_registration_number** | **String** | The VAT registration number (used only with a Business sender) | [optional]
|
38
|
+
**financial_regulator** | **String** | The Financial Regulator (used only with a Business sender) | [optional]
|
39
|
+
**regulatory_licence_number** | **String** | The Regulatory Licence Number (used only with a Business sender) | [optional]
|
40
|
+
**contact_person_email** | **String** | The contact's email address (used only with a Business sender) | [optional]
|
41
|
+
**trading_country** | **String** | The Business trading country (used only with a Business sender) | [optional]
|
42
|
+
**trading_address** | **String** | The Business trading address (used only with a Business sender) | [optional]
|
43
|
+
**number_monthly_transactions** | **String** | The estimated number of monthly transactions (used only with a Business sender) | [optional]
|
44
|
+
**amount_monthly_transactions** | **String** | The estimated amount for all transactions each month in USD (used only with a Business sender) | [optional]
|
29
45
|
**documents** | [**Array<Document>**](Document.md) | 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\" } ] ``` |
|
30
46
|
**metadata** | [**Object**](.md) | 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. | [optional]
|
31
|
-
**state** | [**SenderState**](SenderState.md) | | [optional]
|
32
|
-
**id** | **String** | | [optional]
|
33
|
-
**external_id** | **String** | 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. | [optional]
|
34
47
|
**errors** | **Hash<String, Array<ValidationErrorDescription>>** | The fields that have some problems and don't pass validation | [optional]
|
48
|
+
**onboarding_status** | **String** | The onboarding status of the sender | [optional]
|
49
|
+
**politically_exposed_people** | [**Array<PoliticallyExposedPerson>**](PoliticallyExposedPerson.md) | 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\" } } ``` | [optional]
|
50
|
+
**external_id** | **String** | 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. | [optional]
|
51
|
+
**city_of_birth** | **String** | City of birth of sender | [optional]
|
52
|
+
**country_of_birth** | **String** | Country of birth of sender in 2-character alpha ISO 3166-2 country format | [optional]
|
53
|
+
**gender** | **String** | The gender of the sender: - `M`: Male - `F`: Female - `O`: Other | [optional]
|
54
|
+
**created_at** | **String** | Date and time of sender was created | [optional]
|
35
55
|
|
36
56
|
## Code Sample
|
37
57
|
|
38
58
|
```ruby
|
39
59
|
require 'TransferZero'
|
40
60
|
|
41
|
-
instance = TransferZero::Sender.new(
|
61
|
+
instance = TransferZero::Sender.new(id: bf9ff782-e182-45ac-abea-5bce83ad6670,
|
62
|
+
type: person,
|
63
|
+
state: null,
|
42
64
|
country: NG,
|
65
|
+
street: Fake Street,
|
66
|
+
postal_code: 798983,
|
67
|
+
city: Kampala,
|
43
68
|
phone_country: NG,
|
44
69
|
phone_number: 752403639,
|
45
70
|
email: example@home.org,
|
71
|
+
ip: 127.0.0.1,
|
72
|
+
address_description: null,
|
73
|
+
identification_number: AB123456,
|
74
|
+
identification_type: ID,
|
75
|
+
name: null,
|
46
76
|
first_name: Johnny,
|
47
77
|
middle_name: Johnny,
|
48
78
|
last_name: English,
|
79
|
+
birth_date: null,
|
49
80
|
occupation: Accountant,
|
50
81
|
nationality: NG,
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
82
|
+
legal_entity_type: privately_owned_company,
|
83
|
+
registration_date: null,
|
84
|
+
registration_number: null,
|
85
|
+
nature_of_business: null,
|
86
|
+
source_of_funds: null,
|
87
|
+
custom_source_of_funds: null,
|
88
|
+
core_business_activity: null,
|
89
|
+
purpose_of_opening_account: null,
|
90
|
+
office_phone: null,
|
91
|
+
vat_registration_number: null,
|
92
|
+
financial_regulator: null,
|
93
|
+
regulatory_licence_number: null,
|
94
|
+
contact_person_email: null,
|
95
|
+
trading_country: null,
|
96
|
+
trading_address: null,
|
97
|
+
number_monthly_transactions: null,
|
98
|
+
amount_monthly_transactions: null,
|
63
99
|
documents: [{"id":"b6648ba3-1c7b-4f59-8580-684899c84a07"}],
|
64
100
|
metadata: {},
|
65
|
-
|
66
|
-
|
101
|
+
errors: {"phone_number":[{"error":"invalid"}],"documents":[{"error":"blank"}]},
|
102
|
+
onboarding_status: null,
|
103
|
+
politically_exposed_people: [{"id":"40","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":"f9dc79ca-0c39-4add-9f4d-5ad7e6f187fb"}],
|
67
104
|
external_id: 806ec63a-a5a7-43cc-9d75-1ee74fbcc026,
|
68
|
-
|
105
|
+
city_of_birth: London,
|
106
|
+
country_of_birth: GB,
|
107
|
+
gender: M,
|
108
|
+
created_at: 2019-01-11T00:00:00.001+0000)
|
69
109
|
```
|
70
110
|
|
71
111
|
|
data/docs/Transaction.md
CHANGED
@@ -33,10 +33,10 @@ instance = TransferZero::Transaction.new(input_currency: NGN,
|
|
33
33
|
recipients: null,
|
34
34
|
traits: null,
|
35
35
|
state: null,
|
36
|
-
input_amount:
|
36
|
+
input_amount: 1000,
|
37
37
|
payin_reference: null,
|
38
|
-
paid_amount:
|
39
|
-
due_amount:
|
38
|
+
paid_amount: 1000,
|
39
|
+
due_amount: 1000,
|
40
40
|
created_at: null,
|
41
41
|
expires_at: null,
|
42
42
|
external_id: 806ec63a-a5a7-43cc-9d75-1ee74fbcc026,
|
data/lib/transferzero-sdk.rb
CHANGED
@@ -52,6 +52,7 @@ require 'transferzero-sdk/models/pagination'
|
|
52
52
|
require 'transferzero-sdk/models/pagination_meta'
|
53
53
|
require 'transferzero-sdk/models/payin_method'
|
54
54
|
require 'transferzero-sdk/models/payin_method_details'
|
55
|
+
require 'transferzero-sdk/models/payin_method_details_btc'
|
55
56
|
require 'transferzero-sdk/models/payin_method_details_mobile'
|
56
57
|
require 'transferzero-sdk/models/payin_method_details_ngn_bank'
|
57
58
|
require 'transferzero-sdk/models/payin_method_request'
|
@@ -61,7 +62,9 @@ require 'transferzero-sdk/models/payment_method_opposite'
|
|
61
62
|
require 'transferzero-sdk/models/payout_method'
|
62
63
|
require 'transferzero-sdk/models/payout_method_bank_account_type_enum'
|
63
64
|
require 'transferzero-sdk/models/payout_method_details'
|
65
|
+
require 'transferzero-sdk/models/payout_method_details_btc'
|
64
66
|
require 'transferzero-sdk/models/payout_method_details_balance'
|
67
|
+
require 'transferzero-sdk/models/payout_method_details_gbp_bank'
|
65
68
|
require 'transferzero-sdk/models/payout_method_details_ghs_bank'
|
66
69
|
require 'transferzero-sdk/models/payout_method_details_iban'
|
67
70
|
require 'transferzero-sdk/models/payout_method_details_mad_cash'
|
@@ -69,6 +72,7 @@ require 'transferzero-sdk/models/payout_method_details_mobile'
|
|
69
72
|
require 'transferzero-sdk/models/payout_method_details_ngn_bank'
|
70
73
|
require 'transferzero-sdk/models/payout_method_details_xof_bank'
|
71
74
|
require 'transferzero-sdk/models/payout_method_details_xof_mobile'
|
75
|
+
require 'transferzero-sdk/models/payout_method_details_zar_bank'
|
72
76
|
require 'transferzero-sdk/models/payout_method_gender_enum'
|
73
77
|
require 'transferzero-sdk/models/payout_method_identity_card_type_enum'
|
74
78
|
require 'transferzero-sdk/models/payout_method_list_response'
|
@@ -76,6 +80,7 @@ require 'transferzero-sdk/models/payout_method_mobile_provider_enum'
|
|
76
80
|
require 'transferzero-sdk/models/payout_method_request'
|
77
81
|
require 'transferzero-sdk/models/payout_method_response'
|
78
82
|
require 'transferzero-sdk/models/payout_method_webhook'
|
83
|
+
require 'transferzero-sdk/models/politically_exposed_person'
|
79
84
|
require 'transferzero-sdk/models/recipient'
|
80
85
|
require 'transferzero-sdk/models/recipient_list_response'
|
81
86
|
require 'transferzero-sdk/models/recipient_request'
|
@@ -21,68 +21,10 @@ module TransferZero
|
|
21
21
|
end
|
22
22
|
|
23
23
|
|
24
|
-
# Deleting a document
|
25
|
-
# Deletes a single document by the Document ID
|
26
|
-
# @param document_id ID of the document to delete. Example: `/v1/document/bf9ff782-e182-45ac-abea-5bce83ad6670`
|
27
|
-
# @param [Hash] opts the optional parameters
|
28
|
-
# @option opts [String] :sender_id Allows filtering results by `sender_id`. Example: `/v1/transactions?sender_id=b41d3cb7-6c54-4245-85fc-8e30690eb0f7`
|
29
|
-
# @return [DocumentResponse]
|
30
|
-
def delete_document(document_id, opts = {})
|
31
|
-
data, _status_code, _headers = delete_document_with_http_info(document_id, opts)
|
32
|
-
data
|
33
|
-
end
|
34
|
-
|
35
|
-
# Deleting a document
|
36
|
-
# Deletes a single document by the Document ID
|
37
|
-
# @param document_id ID of the document to delete. Example: `/v1/document/bf9ff782-e182-45ac-abea-5bce83ad6670`
|
38
|
-
# @param [Hash] opts the optional parameters
|
39
|
-
# @option opts [String] :sender_id Allows filtering results by `sender_id`. Example: `/v1/transactions?sender_id=b41d3cb7-6c54-4245-85fc-8e30690eb0f7`
|
40
|
-
# @return [Array<(DocumentResponse, Fixnum, Hash)>] DocumentResponse data, response status code and response headers
|
41
|
-
def delete_document_with_http_info(document_id, opts = {})
|
42
|
-
if @api_client.config.debugging
|
43
|
-
@api_client.config.logger.debug 'Calling API: DocumentsApi.delete_document ...'
|
44
|
-
end
|
45
|
-
# verify the required parameter 'document_id' is set
|
46
|
-
if @api_client.config.client_side_validation && document_id.nil?
|
47
|
-
fail ArgumentError, "Missing the required parameter 'document_id' when calling DocumentsApi.delete_document"
|
48
|
-
end
|
49
|
-
# resource path
|
50
|
-
local_var_path = '/documents/{Document ID}'.sub('{' + 'Document ID' + '}', document_id.to_s)
|
51
|
-
|
52
|
-
# query parameters
|
53
|
-
query_params = {}
|
54
|
-
query_params[:'sender_id'] = opts[:'sender_id'] if !opts[:'sender_id'].nil?
|
55
|
-
|
56
|
-
# header parameters
|
57
|
-
header_params = {}
|
58
|
-
# HTTP header 'Accept' (if needed)
|
59
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
60
|
-
|
61
|
-
# form parameters
|
62
|
-
form_params = {}
|
63
|
-
|
64
|
-
# http body (model)
|
65
|
-
post_body = nil
|
66
|
-
auth_names = ['AuthorizationKey', 'AuthorizationNonce', 'AuthorizationSecret', 'AuthorizationSignature']
|
67
|
-
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
68
|
-
:header_params => header_params,
|
69
|
-
:query_params => query_params,
|
70
|
-
:form_params => form_params,
|
71
|
-
:body => post_body,
|
72
|
-
:auth_names => auth_names,
|
73
|
-
:return_type => 'DocumentResponse')
|
74
|
-
if @api_client.config.debugging
|
75
|
-
@api_client.config.logger.debug "API called: DocumentsApi#delete_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
76
|
-
end
|
77
|
-
return data, status_code, headers
|
78
|
-
end
|
79
|
-
|
80
|
-
|
81
24
|
# Fetching a document
|
82
25
|
# Returns a single document by the Documents ID
|
83
26
|
# @param document_id ID of the document to get. Example: `/v1/documents/bf9ff782-e182-45ac-abea-5bce83ad6670`
|
84
27
|
# @param [Hash] opts the optional parameters
|
85
|
-
# @option opts [String] :sender_id Allows filtering results by `sender_id`. Example: `/v1/transactions?sender_id=b41d3cb7-6c54-4245-85fc-8e30690eb0f7`
|
86
28
|
# @return [DocumentResponse]
|
87
29
|
def get_document(document_id, opts = {})
|
88
30
|
data, _status_code, _headers = get_document_with_http_info(document_id, opts)
|
@@ -93,7 +35,6 @@ module TransferZero
|
|
93
35
|
# Returns a single document by the Documents ID
|
94
36
|
# @param document_id ID of the document to get. Example: `/v1/documents/bf9ff782-e182-45ac-abea-5bce83ad6670`
|
95
37
|
# @param [Hash] opts the optional parameters
|
96
|
-
# @option opts [String] :sender_id Allows filtering results by `sender_id`. Example: `/v1/transactions?sender_id=b41d3cb7-6c54-4245-85fc-8e30690eb0f7`
|
97
38
|
# @return [Array<(DocumentResponse, Fixnum, Hash)>] DocumentResponse data, response status code and response headers
|
98
39
|
def get_document_with_http_info(document_id, opts = {})
|
99
40
|
if @api_client.config.debugging
|
@@ -108,7 +49,6 @@ module TransferZero
|
|
108
49
|
|
109
50
|
# query parameters
|
110
51
|
query_params = {}
|
111
|
-
query_params[:'sender_id'] = opts[:'sender_id'] if !opts[:'sender_id'].nil?
|
112
52
|
|
113
53
|
# header parameters
|
114
54
|
header_params = {}
|
@@ -150,7 +90,6 @@ module TransferZero
|
|
150
90
|
# @param [Hash] opts the optional parameters
|
151
91
|
# @option opts [Integer] :page The page number to request (defaults to 1)
|
152
92
|
# @option opts [Integer] :per The number of results to load per page (defaults to 10)
|
153
|
-
# @option opts [String] :sender_id Allows filtering results by `sender_id`. Example: `/v1/transactions?sender_id=b41d3cb7-6c54-4245-85fc-8e30690eb0f7`
|
154
93
|
# @return [DocumentListResponse]
|
155
94
|
def get_documents(opts = {})
|
156
95
|
data, _status_code, _headers = get_documents_with_http_info(opts)
|
@@ -162,7 +101,6 @@ module TransferZero
|
|
162
101
|
# @param [Hash] opts the optional parameters
|
163
102
|
# @option opts [Integer] :page The page number to request (defaults to 1)
|
164
103
|
# @option opts [Integer] :per The number of results to load per page (defaults to 10)
|
165
|
-
# @option opts [String] :sender_id Allows filtering results by `sender_id`. Example: `/v1/transactions?sender_id=b41d3cb7-6c54-4245-85fc-8e30690eb0f7`
|
166
104
|
# @return [Array<(DocumentListResponse, Fixnum, Hash)>] DocumentListResponse data, response status code and response headers
|
167
105
|
def get_documents_with_http_info(opts = {})
|
168
106
|
if @api_client.config.debugging
|
@@ -175,7 +113,6 @@ module TransferZero
|
|
175
113
|
query_params = {}
|
176
114
|
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
177
115
|
query_params[:'per'] = opts[:'per'] if !opts[:'per'].nil?
|
178
|
-
query_params[:'sender_id'] = opts[:'sender_id'] if !opts[:'sender_id'].nil?
|
179
116
|
|
180
117
|
# header parameters
|
181
118
|
header_params = {}
|
@@ -22,7 +22,7 @@ module TransferZero
|
|
22
22
|
|
23
23
|
|
24
24
|
# Cancelling a recipient
|
25
|
-
# Cancels the payment to the recipient specified in the URL path. Please note
|
25
|
+
# Cancels the payment to the recipient specified in the URL path. Please note recipients where the `may_cancel` attribute is true will be cancelled immediately. If the `may_cancel` attribute is false you can still try to cancel the recipient, however it will only gets cancelled if we will receive a confirmation from our partner that the payment has failed
|
26
26
|
# @param recipient_id ID of recipient to cancel. Example: `/v1/recipients/9d4d7b73-a94c-4979-ab57-09074fd55d33`
|
27
27
|
# @param [Hash] opts the optional parameters
|
28
28
|
# @return [RecipientResponse]
|
@@ -32,7 +32,7 @@ module TransferZero
|
|
32
32
|
end
|
33
33
|
|
34
34
|
# Cancelling a recipient
|
35
|
-
# Cancels the payment to the recipient specified in the URL path. Please note
|
35
|
+
# Cancels the payment to the recipient specified in the URL path. Please note recipients where the `may_cancel` attribute is true will be cancelled immediately. If the `may_cancel` attribute is false you can still try to cancel the recipient, however it will only gets cancelled if we will receive a confirmation from our partner that the payment has failed
|
36
36
|
# @param recipient_id ID of recipient to cancel. Example: `/v1/recipients/9d4d7b73-a94c-4979-ab57-09074fd55d33`
|
37
37
|
# @param [Hash] opts the optional parameters
|
38
38
|
# @return [Array<(RecipientResponse, Fixnum, Hash)>] RecipientResponse data, response status code and response headers
|
@@ -35,7 +35,7 @@ module TransferZero
|
|
35
35
|
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
|
36
36
|
def initialize(config = Configuration.default)
|
37
37
|
@config = config
|
38
|
-
@user_agent = "TransferZero-SDK/Ruby/1.
|
38
|
+
@user_agent = "TransferZero-SDK/Ruby/1.9.0"
|
39
39
|
@default_headers = {
|
40
40
|
'Content-Type' => 'application/json',
|
41
41
|
'User-Agent' => @user_agent
|
@@ -106,12 +106,14 @@ module TransferZero
|
|
106
106
|
url_with_params = add_query(url, query_params)
|
107
107
|
form_params = opts[:form_params] || {}
|
108
108
|
|
109
|
+
request_body = opts[:body].to_s.gsub(/[[:space:]]+/, ' ').strip
|
110
|
+
|
109
111
|
request_nonce = SecureRandom.uuid
|
110
112
|
request_signature = sign_request([
|
111
113
|
request_nonce,
|
112
114
|
http_method.to_s.upcase,
|
113
115
|
url_with_params,
|
114
|
-
DIGEST.hexdigest(
|
116
|
+
DIGEST.hexdigest(request_body)
|
115
117
|
])
|
116
118
|
|
117
119
|
header_params['Authorization-Nonce'] = request_nonce
|
@@ -138,7 +140,7 @@ module TransferZero
|
|
138
140
|
req_opts[:cainfo] = @config.ssl_ca_cert if @config.ssl_ca_cert
|
139
141
|
|
140
142
|
if [:post, :patch, :put, :delete].include?(http_method)
|
141
|
-
req_body = build_request_body(header_params, form_params,
|
143
|
+
req_body = build_request_body(header_params, form_params, request_body)
|
142
144
|
req_opts.update :body => req_body
|
143
145
|
if @config.debugging
|
144
146
|
@config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n"
|
@@ -13,86 +13,86 @@ OpenAPI Generator version: 4.0.0-beta3
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module TransferZero
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
# Attribute type mapping.
|
32
|
-
def self.openapi_types
|
33
|
-
{
|
34
|
-
:'amount' => :'Float',
|
35
|
-
:'currency' => :'String'
|
36
|
-
}
|
37
|
-
end
|
16
|
+
class Account
|
17
|
+
# The account balance for the given currency
|
18
|
+
attr_accessor :amount
|
19
|
+
|
20
|
+
# The currency of this balance
|
21
|
+
attr_accessor :currency
|
22
|
+
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
24
|
+
def self.attribute_map
|
25
|
+
{
|
26
|
+
:'amount' => :'amount',
|
27
|
+
:'currency' => :'currency'
|
28
|
+
}
|
29
|
+
end
|
38
30
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
31
|
+
# Attribute type mapping.
|
32
|
+
def self.openapi_types
|
33
|
+
{
|
34
|
+
:'amount' => :'Float',
|
35
|
+
:'currency' => :'String'
|
36
|
+
}
|
37
|
+
end
|
45
38
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
}
|
39
|
+
# Initializes the object
|
40
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
41
|
+
def initialize(attributes = {})
|
42
|
+
if (!attributes.is_a?(Hash))
|
43
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::Account` initialize method"
|
44
|
+
end
|
53
45
|
|
54
|
-
|
55
|
-
|
46
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
47
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
48
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
49
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::Account`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
56
50
|
end
|
51
|
+
h[k.to_sym] = v
|
52
|
+
}
|
57
53
|
|
58
|
-
|
59
|
-
|
60
|
-
end
|
54
|
+
if attributes.key?(:'amount')
|
55
|
+
self.amount = attributes[:'amount']
|
61
56
|
end
|
62
57
|
|
63
|
-
|
64
|
-
|
65
|
-
def list_invalid_properties
|
66
|
-
invalid_properties = Array.new
|
67
|
-
invalid_properties
|
58
|
+
if attributes.key?(:'currency')
|
59
|
+
self.currency = attributes[:'currency']
|
68
60
|
end
|
61
|
+
end
|
69
62
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
63
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
64
|
+
# @return Array for valid properties with the reasons
|
65
|
+
def list_invalid_properties
|
66
|
+
invalid_properties = Array.new
|
67
|
+
invalid_properties
|
68
|
+
end
|
75
69
|
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
amount == o.amount &&
|
82
|
-
currency == o.currency
|
83
|
-
end
|
70
|
+
# Check to see if the all the properties in the model are valid
|
71
|
+
# @return true if the model is valid
|
72
|
+
def valid?
|
73
|
+
true
|
74
|
+
end
|
84
75
|
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
76
|
+
# Checks equality by comparing each attribute.
|
77
|
+
# @param [Object] Object to be compared
|
78
|
+
def ==(o)
|
79
|
+
return true if self.equal?(o)
|
80
|
+
self.class == o.class &&
|
81
|
+
amount == o.amount &&
|
82
|
+
currency == o.currency
|
83
|
+
end
|
90
84
|
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
85
|
+
# @see the `==` method
|
86
|
+
# @param [Object] Object to be compared
|
87
|
+
def eql?(o)
|
88
|
+
self == o
|
89
|
+
end
|
90
|
+
|
91
|
+
# Calculates hash code according to all attributes.
|
92
|
+
# @return [Integer] Hash code
|
93
|
+
def hash
|
94
|
+
[amount, currency].hash
|
95
|
+
end
|
96
96
|
|
97
97
|
require 'active_support/core_ext/hash'
|
98
98
|
require 'active_support/hash_with_indifferent_access.rb'
|
@@ -208,5 +208,6 @@ def _to_hash(value)
|
|
208
208
|
end
|
209
209
|
end
|
210
210
|
|
211
|
-
|
211
|
+
end
|
212
|
+
|
212
213
|
end
|