transferzero-sdk 1.0.0 → 1.7.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 +17 -11
- data/docs/AccountMeta.md +1 -1
- data/docs/AccountValidationApi.md +4 -4
- data/docs/AccountValidationRequest.md +6 -4
- data/docs/Currency.md +1 -1
- data/docs/CurrencyExchange.md +1 -1
- data/docs/CurrencyInfoApi.md +20 -6
- data/docs/CurrencyOpposite.md +4 -2
- data/docs/Debit.md +2 -2
- data/docs/Document.md +4 -0
- data/docs/FieldSelectValidation.md +1 -1
- data/docs/FieldValidation.md +1 -1
- data/docs/PayinMethod.md +4 -4
- data/docs/PayinMethodDetails.md +7 -3
- data/docs/PayinMethodDetailsBTC.md +17 -0
- data/docs/PayinMethodDetailsMobile.md +1 -1
- data/docs/PayinMethodDetailsNGNBank.md +4 -2
- data/docs/PaymentMethod.md +2 -2
- data/docs/PaymentMethodOpposite.md +2 -2
- data/docs/PayoutMethod.md +1 -1
- data/docs/PayoutMethodDetails.md +12 -4
- data/docs/PayoutMethodDetailsBTC.md +23 -0
- data/docs/PayoutMethodDetailsGBPBank.md +29 -0
- data/docs/PayoutMethodDetailsIBAN.md +1 -1
- data/docs/PayoutMethodDetailsNGNBank.md +1 -1
- data/docs/PayoutMethodDetailsXOFBank.md +25 -0
- data/docs/PoliticallyExposedPerson.md +31 -0
- data/docs/Recipient.md +5 -3
- data/docs/RecipientsApi.md +3 -3
- data/docs/Sender.md +63 -27
- data/docs/Transaction.md +5 -5
- data/docs/TransactionTraits.md +2 -2
- data/docs/TransactionsApi.md +64 -0
- data/example/client.rb +14 -14
- data/git_push.sh +1 -1
- data/lib/transferzero-sdk.rb +5 -0
- data/lib/transferzero-sdk/api/account_validation_api.rb +4 -4
- data/lib/transferzero-sdk/api/currency_info_api.rb +6 -0
- data/lib/transferzero-sdk/api/recipients_api.rb +4 -4
- data/lib/transferzero-sdk/api/transactions_api.rb +59 -0
- data/lib/transferzero-sdk/api_client.rb +5 -5
- 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 +142 -141
- data/lib/transferzero-sdk/models/currency_exchange.rb +158 -157
- 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 -155
- data/lib/transferzero-sdk/models/debit.rb +151 -155
- 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 +181 -160
- 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 -105
- 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 -65
- 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 +338 -288
- 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 +86 -85
- data/lib/transferzero-sdk/models/payout_method_details_ngn_bank.rb +104 -108
- data/lib/transferzero-sdk/models/payout_method_details_xof_bank.rb +264 -0
- data/lib/transferzero-sdk/models/payout_method_details_xof_mobile.rb +97 -96
- 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 +14 -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 -219
- 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 +529 -322
- 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 -23
- 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 -27
- 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/api/account_validation_api_spec.rb +2 -2
- data/spec/api/currency_info_api_spec.rb +2 -0
- data/spec/api/documents_api_spec.rb +15 -0
- data/spec/api/recipients_api_spec.rb +1 -1
- data/spec/api/transactions_api_spec.rb +13 -0
- data/spec/models/account_validation_request_spec.rb +7 -1
- data/spec/models/currency_opposite_spec.rb +6 -0
- data/spec/models/document_spec.rb +12 -0
- data/spec/models/payin_method_details_btc_spec.rb +41 -0
- data/spec/models/payin_method_details_ngn_bank_spec.rb +6 -0
- data/spec/models/payin_method_details_spec.rb +6 -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_spec.rb +7 -1
- data/spec/models/payout_method_details_xof_bank_spec.rb +65 -0
- data/spec/models/politically_exposed_person_spec.rb +83 -0
- data/spec/models/recipient_spec.rb +6 -0
- data/spec/models/sender_spec.rb +16 -0
- data/transferzero-sdk.gemspec +2 -2
- metadata +35 -24
- data/spec/api_client_spec.rb +0 -189
@@ -19,9 +19,9 @@ require 'TransferZero'
|
|
19
19
|
|
20
20
|
instance = TransferZero::PaymentMethodOpposite.new(type: NGN::Bank,
|
21
21
|
provider: Interswitch,
|
22
|
-
otc_permitted:
|
22
|
+
otc_permitted: false,
|
23
23
|
details: ["email","first_name","last_name","address"],
|
24
|
-
default:
|
24
|
+
default: false,
|
25
25
|
fields: {"email":{"type":"input","validations":{"inclusion":{"in":{"NI":"National Id","PP":"Passport"},"allow_blank":true}}}},
|
26
26
|
opposites: null)
|
27
27
|
```
|
data/docs/PayoutMethod.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
-
**type** | **String** | Contains the currency to send the money to, and the type of the money movement Commonly used payout types are: - `NGN::Bank` - for Nigerian bank account payments. - `NGN::Mobile` - for Nigerian mobile money payments. - `GHS::Bank` - for Ghanaian bank account payments. - `GHS::Mobile` - for Ghanaian mobile money payments. - `UGX::Mobile` - for Ugandan mobile money payments. - `TZS::Mobile` - for Tanzanian mobile money payments. - `XOF::Mobile` - for Senegalese mobile money payments. - `MAD::Cash` - for Moroccan cash remittance payments. - `EUR::Bank` - for IBAN bank transfers in EUR. - `GBP::Bank` - for IBAN bank transfers in GBP. You can also send funds to the internal balance using `CCY::Balance`, where `CCY` is the appropriate currency. See [Collection from senders](https://
|
7
|
+
**type** | **String** | Contains the currency to send the money to, and the type of the money movement Commonly used payout types are: - `NGN::Bank` - for Nigerian bank account payments. - `NGN::Mobile` - for Nigerian mobile money payments. - `GHS::Bank` - for Ghanaian bank account payments. - `GHS::Mobile` - for Ghanaian mobile money payments. - `UGX::Mobile` - for Ugandan mobile money payments. - `TZS::Mobile` - for Tanzanian mobile money payments. - `XOF::Mobile` - for Senegalese mobile money payments. - `XOF::Bank` - for Senegalese bank account payments. *** Currently in Beta phase *** - `XOF::Cash` - for Senegalese cash remittance payments. - `MAD::Cash` - for Moroccan cash remittance payments. - `EUR::Bank` - for IBAN bank transfers in EUR. - `GBP::Bank` - for IBAN bank transfers in GBP. You can also send funds to the internal balance using `CCY::Balance`, where `CCY` is the appropriate currency. See [Collection from senders](https://docs.transferzero.com/docs/additional-features/#collections-from-senders) for more info on how to collect money into internal balance | [optional]
|
8
8
|
**details** | [**PayoutMethodDetails**](PayoutMethodDetails.md) | | [optional]
|
9
9
|
**metadata** | [**Object**](.md) | Metadata of payout method. You can store any kind of information in this field. | [optional]
|
10
10
|
**id** | **String** | | [optional]
|
data/docs/PayoutMethodDetails.md
CHANGED
@@ -8,11 +8,13 @@ Name | Type | Description | Notes
|
|
8
8
|
**last_name** | **String** | |
|
9
9
|
**bank_code** | **String** | |
|
10
10
|
**bank_account** | **String** | |
|
11
|
-
**bank_account_type** | [**PayoutMethodBankAccountTypeEnum**](PayoutMethodBankAccountTypeEnum.md) | |
|
11
|
+
**bank_account_type** | [**PayoutMethodBankAccountTypeEnum**](PayoutMethodBankAccountTypeEnum.md) | | [optional]
|
12
12
|
**phone_number** | **String** | |
|
13
13
|
**mobile_provider** | [**PayoutMethodMobileProviderEnum**](PayoutMethodMobileProviderEnum.md) | |
|
14
|
-
**bank_name** | **String** | |
|
15
14
|
**iban** | **String** | |
|
15
|
+
**bank_name** | **String** | |
|
16
|
+
**bank_country** | **String** | |
|
17
|
+
**sort_code** | **String** | | [optional]
|
16
18
|
**bic** | **String** | | [optional]
|
17
19
|
**sender_identity_card_type** | [**PayoutMethodIdentityCardTypeEnum**](PayoutMethodIdentityCardTypeEnum.md) | |
|
18
20
|
**sender_identity_card_id** | **String** | |
|
@@ -23,6 +25,8 @@ Name | Type | Description | Notes
|
|
23
25
|
**identity_card_type** | [**PayoutMethodIdentityCardTypeEnum**](PayoutMethodIdentityCardTypeEnum.md) | | [optional]
|
24
26
|
**identity_card_id** | **String** | | [optional]
|
25
27
|
**reference** | **String** | | [optional]
|
28
|
+
**name** | **String** | |
|
29
|
+
**address** | **String** | |
|
26
30
|
|
27
31
|
## Code Sample
|
28
32
|
|
@@ -36,8 +40,10 @@ instance = TransferZero::PayoutMethodDetails.new(first_name: null,
|
|
36
40
|
bank_account_type: null,
|
37
41
|
phone_number: null,
|
38
42
|
mobile_provider: null,
|
39
|
-
bank_name: null,
|
40
43
|
iban: null,
|
44
|
+
bank_name: null,
|
45
|
+
bank_country: null,
|
46
|
+
sort_code: null,
|
41
47
|
bic: null,
|
42
48
|
sender_identity_card_type: null,
|
43
49
|
sender_identity_card_id: null,
|
@@ -47,7 +53,9 @@ instance = TransferZero::PayoutMethodDetails.new(first_name: null,
|
|
47
53
|
reason: null,
|
48
54
|
identity_card_type: null,
|
49
55
|
identity_card_id: null,
|
50
|
-
reference: null
|
56
|
+
reference: null,
|
57
|
+
name: null,
|
58
|
+
address: null)
|
51
59
|
```
|
52
60
|
|
53
61
|
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# TransferZero::PayoutMethodDetailsBTC
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**first_name** | **String** | |
|
8
|
+
**last_name** | **String** | |
|
9
|
+
**name** | **String** | |
|
10
|
+
**address** | **String** | |
|
11
|
+
|
12
|
+
## Code Sample
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'TransferZero'
|
16
|
+
|
17
|
+
instance = TransferZero::PayoutMethodDetailsBTC.new(first_name: null,
|
18
|
+
last_name: null,
|
19
|
+
name: null,
|
20
|
+
address: null)
|
21
|
+
```
|
22
|
+
|
23
|
+
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# TransferZero::PayoutMethodDetailsGBPBank
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**first_name** | **String** | |
|
8
|
+
**last_name** | **String** | |
|
9
|
+
**bank_name** | **String** | | [optional]
|
10
|
+
**bank_account** | **String** | | [optional]
|
11
|
+
**sort_code** | **String** | | [optional]
|
12
|
+
**iban** | **String** | | [optional]
|
13
|
+
**bic** | **String** | | [optional]
|
14
|
+
|
15
|
+
## Code Sample
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
require 'TransferZero'
|
19
|
+
|
20
|
+
instance = TransferZero::PayoutMethodDetailsGBPBank.new(first_name: null,
|
21
|
+
last_name: null,
|
22
|
+
bank_name: null,
|
23
|
+
bank_account: null,
|
24
|
+
sort_code: null,
|
25
|
+
iban: null,
|
26
|
+
bic: null)
|
27
|
+
```
|
28
|
+
|
29
|
+
|
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
7
|
**first_name** | **String** | |
|
8
8
|
**last_name** | **String** | |
|
9
|
-
**bank_name** | **String** | |
|
9
|
+
**bank_name** | **String** | | [optional]
|
10
10
|
**iban** | **String** | |
|
11
11
|
**bic** | **String** | | [optional]
|
12
12
|
|
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
|
|
8
8
|
**last_name** | **String** | |
|
9
9
|
**bank_code** | **String** | |
|
10
10
|
**bank_account** | **String** | |
|
11
|
-
**bank_account_type** | [**PayoutMethodBankAccountTypeEnum**](PayoutMethodBankAccountTypeEnum.md) | |
|
11
|
+
**bank_account_type** | [**PayoutMethodBankAccountTypeEnum**](PayoutMethodBankAccountTypeEnum.md) | | [optional]
|
12
12
|
|
13
13
|
## Code Sample
|
14
14
|
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# TransferZero::PayoutMethodDetailsXOFBank
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**first_name** | **String** | |
|
8
|
+
**last_name** | **String** | |
|
9
|
+
**iban** | **String** | |
|
10
|
+
**bank_name** | **String** | |
|
11
|
+
**bank_country** | **String** | |
|
12
|
+
|
13
|
+
## Code Sample
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'TransferZero'
|
17
|
+
|
18
|
+
instance = TransferZero::PayoutMethodDetailsXOFBank.new(first_name: null,
|
19
|
+
last_name: null,
|
20
|
+
iban: null,
|
21
|
+
bank_name: null,
|
22
|
+
bank_country: null)
|
23
|
+
```
|
24
|
+
|
25
|
+
|
@@ -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
@@ -10,8 +10,9 @@ Name | Type | Description | Notes
|
|
10
10
|
**metadata** | [**Object**](.md) | Additional metadata that can be added to a recipient. These values will be returned on request | [optional]
|
11
11
|
**created_at** | **DateTime** | Date and time that the recipient was created. | [optional]
|
12
12
|
**editable** | **Boolean** | Shows whether the recipient can be edited using the PATCH /v1/recipients/{id} endpoint or not | [optional]
|
13
|
+
**retriable** | **Boolean** | Shows whether the transaction made to the recipient can be retried or not | [optional]
|
13
14
|
**input_usd_amount** | **Float** | Shows how much this payment is worth in USD | [optional]
|
14
|
-
**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]
|
15
16
|
**state_reason** | **String** | In case the payment is unsuccessful it holds the error message associated with the last unsuccessful payout. | [optional]
|
16
17
|
**state** | [**RecipientState**](RecipientState.md) | | [optional]
|
17
18
|
**transaction_id** | **String** | The ID of the transaction that is related to this recipient | [optional]
|
@@ -35,9 +36,10 @@ instance = TransferZero::Recipient.new(requested_amount: 750.0,
|
|
35
36
|
payout_method: null,
|
36
37
|
metadata: {},
|
37
38
|
created_at: null,
|
38
|
-
editable:
|
39
|
+
editable: true,
|
40
|
+
retriable: true,
|
39
41
|
input_usd_amount: 10,
|
40
|
-
may_cancel:
|
42
|
+
may_cancel: true,
|
41
43
|
state_reason: null,
|
42
44
|
state: null,
|
43
45
|
transaction_id: 97e79719-06e4-4794-aeeb-d2d9415d983a,
|
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
|
@@ -91,7 +91,7 @@ opts = {
|
|
91
91
|
created_at_to: 'created_at_to_example' # String | End date to filter recipients by created_at range Allows filtering results by the specified `created_at` timeframe. Example: `/v1/recipients?created_at_from=2018-06-06&created_at_to=2018-06-08`
|
92
92
|
amount_from: 'amount_from_example' # String | Minimum amount to filter recipients by amount range. Allows filtering results by the specified `amount` range. When using this filter, the `currency` should also be specified. Example: `/v1/recipients?currency=NGN&amount_from=83.76672339&amount_to=83.76672339`
|
93
93
|
amount_to: 'amount_to_example' # String | Max amount to filter recipients by amount range. Allows filtering results by the specified `amount` range. When using this filter, the `currency` should also be specified. Example: `/v1/recipients?currency=NGN&amount_from=83.76672339&amount_to=83.76672339`
|
94
|
-
state: ['state_example'] # Array<String> | Allows filtering results by `state` of recipient. See [API Documentation - Recipient state](https://
|
94
|
+
state: ['state_example'] # Array<String> | Allows filtering results by `state` of recipient. See [API Documentation - Recipient state](https://docs.transferzero.com/docs/transaction-flow/#state) for possible states. Example: `/v1/recipients?state[]=error&state[]=initial`
|
95
95
|
currency: ['currency_example'] # Array<String> | Allows filtering results by `input_currency`. Additionally required when filtering by an amount range Example: `/v1/recipients?currency[]=KES¤cy[]=NGN`
|
96
96
|
}
|
97
97
|
|
@@ -120,7 +120,7 @@ Name | Type | Description | Notes
|
|
120
120
|
**created_at_to** | **String**| End date to filter recipients by created_at range Allows filtering results by the specified `created_at` timeframe. Example: `/v1/recipients?created_at_from=2018-06-06&created_at_to=2018-06-08` | [optional]
|
121
121
|
**amount_from** | **String**| Minimum amount to filter recipients by amount range. Allows filtering results by the specified `amount` range. When using this filter, the `currency` should also be specified. Example: `/v1/recipients?currency=NGN&amount_from=83.76672339&amount_to=83.76672339` | [optional]
|
122
122
|
**amount_to** | **String**| Max amount to filter recipients by amount range. Allows filtering results by the specified `amount` range. When using this filter, the `currency` should also be specified. Example: `/v1/recipients?currency=NGN&amount_from=83.76672339&amount_to=83.76672339` | [optional]
|
123
|
-
**state** | [**Array<String>**](String.md)| Allows filtering results by `state` of recipient. See [API Documentation - Recipient state](https://
|
123
|
+
**state** | [**Array<String>**](String.md)| Allows filtering results by `state` of recipient. See [API Documentation - Recipient state](https://docs.transferzero.com/docs/transaction-flow/#state) for possible states. Example: `/v1/recipients?state[]=error&state[]=initial` | [optional]
|
124
124
|
**currency** | [**Array<String>**](String.md)| Allows filtering results by `input_currency`. Additionally required when filtering by an amount range Example: `/v1/recipients?currency[]=KES&currency[]=NGN` | [optional]
|
125
125
|
|
126
126
|
### Return type
|
data/docs/Sender.md
CHANGED
@@ -4,64 +4,100 @@
|
|
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]
|
9
|
+
**state** | [**SenderState**](SenderState.md) | | [optional]
|
8
10
|
**country** | **String** | Country of sender in 2-character alpha ISO 3166-2 country format |
|
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
|
-
**
|
28
|
+
**legal_entity_type** | **String** | Legal entity type (used only with a Business sender) | [optional]
|
29
|
+
**registration_date** | **String** | 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) | [optional]
|
32
|
+
**source_of_funds** | **String** | The source of funds | [optional]
|
33
|
+
**core_business_activities** | **String** | The core activities (used only with a Business sender) | [optional]
|
34
|
+
**purpose_of_opening_account** | **String** | The purpose for opening their account (used only with a Business sender) | [optional]
|
35
|
+
**office_phone** | **String** | The official phone number (used only with a Business sender) | [optional]
|
36
|
+
**vat_registration_number** | **String** | The VAT registration number (used only with a Business sender) | [optional]
|
37
|
+
**financial_regulator** | **String** | The Financial Regulator (used only with a Business sender) | [optional]
|
38
|
+
**regulatory_licence_number** | **String** | The Regulatory Licence Number (used only with a Business sender) | [optional]
|
39
|
+
**contact_person_email** | **String** | The contact's email address (used only with a Business sender) | [optional]
|
40
|
+
**trading_country** | **String** | The Business trading country (used only with a Business sender) | [optional]
|
41
|
+
**trading_address** | **String** | The Business trading address (used only with a Business sender) | [optional]
|
42
|
+
**number_monthly_transactions** | **String** | The estimated number of monthly transactions (used only with a Business sender) | [optional]
|
43
|
+
**amount_monthly_transactions** | **String** | The estimated amount for all transactions each month in USD (used only with a Business sender) | [optional]
|
27
44
|
**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\" } ] ``` |
|
28
45
|
**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]
|
29
|
-
**state** | [**SenderState**](SenderState.md) | | [optional]
|
30
|
-
**id** | **String** | | [optional]
|
31
|
-
**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]
|
32
46
|
**errors** | **Hash<String, Array<ValidationErrorDescription>>** | The fields that have some problems and don't pass validation | [optional]
|
47
|
+
**onboarding_status** | **String** | The onboarding status of the sender | [optional]
|
48
|
+
**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]
|
49
|
+
**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]
|
50
|
+
**created_at** | **String** | Date and time of sender was created | [optional]
|
33
51
|
|
34
52
|
## Code Sample
|
35
53
|
|
36
54
|
```ruby
|
37
55
|
require 'TransferZero'
|
38
56
|
|
39
|
-
instance = TransferZero::Sender.new(
|
57
|
+
instance = TransferZero::Sender.new(id: bf9ff782-e182-45ac-abea-5bce83ad6670,
|
58
|
+
type: person,
|
59
|
+
state: null,
|
40
60
|
country: NG,
|
61
|
+
street: Fake Street,
|
62
|
+
postal_code: 798983,
|
63
|
+
city: Kampala,
|
41
64
|
phone_country: NG,
|
42
65
|
phone_number: 752403639,
|
43
66
|
email: example@home.org,
|
67
|
+
ip: 127.0.0.1,
|
68
|
+
address_description: null,
|
69
|
+
identification_number: AB123456,
|
70
|
+
identification_type: ID,
|
71
|
+
name: null,
|
44
72
|
first_name: Johnny,
|
45
73
|
middle_name: Johnny,
|
46
74
|
last_name: English,
|
75
|
+
birth_date: null,
|
47
76
|
occupation: Accountant,
|
48
77
|
nationality: NG,
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
78
|
+
legal_entity_type: sole_proprietorship,
|
79
|
+
registration_date: null,
|
80
|
+
registration_number: null,
|
81
|
+
nature_of_business: null,
|
82
|
+
source_of_funds: null,
|
83
|
+
core_business_activities: null,
|
84
|
+
purpose_of_opening_account: null,
|
85
|
+
office_phone: null,
|
86
|
+
vat_registration_number: null,
|
87
|
+
financial_regulator: null,
|
88
|
+
regulatory_licence_number: null,
|
89
|
+
contact_person_email: null,
|
90
|
+
trading_country: null,
|
91
|
+
trading_address: null,
|
92
|
+
number_monthly_transactions: null,
|
93
|
+
amount_monthly_transactions: null,
|
59
94
|
documents: [{"id":"b6648ba3-1c7b-4f59-8580-684899c84a07"}],
|
60
95
|
metadata: {},
|
61
|
-
|
62
|
-
|
96
|
+
errors: {"phone_number":[{"error":"invalid"}],"documents":[{"error":"blank"}]},
|
97
|
+
onboarding_status: null,
|
98
|
+
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"}],
|
63
99
|
external_id: 806ec63a-a5a7-43cc-9d75-1ee74fbcc026,
|
64
|
-
|
100
|
+
created_at: 2019-01-11T00:00:00.001+0000)
|
65
101
|
```
|
66
102
|
|
67
103
|
|
data/docs/Transaction.md
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
7
|
**input_currency** | **String** | The input currency describes what currency the transaction will be paid in (3-character alpha ISO 4217 currency format). For example if you wish to create an EUR to NGN transaction then input currency should be set to EUR. |
|
8
|
-
**payin_methods** | [**Array<PayinMethod>**](PayinMethod.md) | Allows setting alternative collections, where funding the transaction is done through alternative means and not via account balance. For more information please see [Collections from senders](https://
|
8
|
+
**payin_methods** | [**Array<PayinMethod>**](PayinMethod.md) | Allows setting alternative collections, where funding the transaction is done through alternative means and not via account balance. For more information please see [Collections from senders](https://docs.transferzero.com/docs/additional-features/#collections-from-senders) in the API documentation | [optional]
|
9
9
|
**metadata** | [**Object**](.md) | Additional metadata to store on the transaction. If you widh to store your local transaction ID, you should add it here inside a `sendRef` field, and we will return this value back to you in the daily transaction reports. | [optional]
|
10
10
|
**sender** | [**Sender**](Sender.md) | |
|
11
11
|
**recipients** | [**Array<Recipient>**](Recipient.md) | The details of where the payment should go. although transactions can support paying out multiple recipients, usually one is provided. |
|
@@ -17,7 +17,7 @@ Name | Type | Description | Notes
|
|
17
17
|
**due_amount** | **Float** | The amount needed to be paid in for the transaction to get funded | [optional]
|
18
18
|
**created_at** | **DateTime** | The time the transaction was created | [optional]
|
19
19
|
**expires_at** | **DateTime** | The latest time when the transaction has to be funded, otherwise it will be cancelled | [optional]
|
20
|
-
**external_id** | **String** | Optional ID that is supplied by partner linking it to the partner's own
|
20
|
+
**external_id** | **String** | Optional ID that is supplied by partner linking it to the partner's own Transaction ID. Note: if present we will validate whether the sent ID is a duplicate in our system or not. | [optional]
|
21
21
|
**id** | **String** | | [optional]
|
22
22
|
**errors** | **Hash<String, Array<ValidationErrorDescription>>** | The fields that have some problems and don't pass validation | [optional]
|
23
23
|
|
@@ -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/docs/TransactionTraits.md
CHANGED
@@ -4,8 +4,8 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
-
**auto_refund** | **Boolean** | Enables or disables the auto refund functionality. Please see [Auto cancellation and refund of transactions](https://
|
8
|
-
**account_validation** | **Boolean** | Enabled or disables the name validation functionality. Please see [Name validation in transactions](https://
|
7
|
+
**auto_refund** | **Boolean** | Enables or disables the auto refund functionality. Please see [Auto cancellation and refund of transactions](https://docs.transferzero.com/docs/additional-features/#auto-cancellation-and-refund-of-transactions) for more details | [optional]
|
8
|
+
**account_validation** | **Boolean** | Enabled or disables the name validation functionality. Please see [Name validation in transactions](https://docs.transferzero.com/docs/additional-features/#name-validation-in-transactions) for more details | [optional]
|
9
9
|
|
10
10
|
## Code Sample
|
11
11
|
|
data/docs/TransactionsApi.md
CHANGED
@@ -5,6 +5,7 @@ All URIs are relative to *https://api-sandbox.transferzero.com/v1*
|
|
5
5
|
Method | HTTP request | Description
|
6
6
|
------------- | ------------- | -------------
|
7
7
|
[**calculate_transactions**](TransactionsApi.md#calculate_transactions) | **POST** /transactions/calculate | Calculates transaction amounts for a transaction payload
|
8
|
+
[**create_and_fund_transaction**](TransactionsApi.md#create_and_fund_transaction) | **POST** /transactions/create_and_fund | Creates a new transaction and funds it from account balance
|
8
9
|
[**get_transaction**](TransactionsApi.md#get_transaction) | **GET** /transactions/{Transaction ID} | Fetch a single transaction
|
9
10
|
[**get_transactions**](TransactionsApi.md#get_transactions) | **GET** /transactions | Get a list of transactions
|
10
11
|
[**payin_transaction**](TransactionsApi.md#payin_transaction) | **POST** /transactions/{Transaction ID}/payin | Creates a fake payin for transaction
|
@@ -74,6 +75,67 @@ end
|
|
74
75
|
|
75
76
|
|
76
77
|
|
78
|
+
# **create_and_fund_transaction**
|
79
|
+
> TransactionResponse create_and_fund_transaction(transaction_request)
|
80
|
+
|
81
|
+
Creates a new transaction and funds it from account balance
|
82
|
+
|
83
|
+
This endpoint creates a transaction and funds it from an account balance. You must ensure that you have established an account with us in the pay-in currency of the transactions you wish to create, and that this account is sufficently funded, before calling this endpoint. Note that the <pre>external_id</pre> field is required for requests to this endpoint.
|
84
|
+
|
85
|
+
### Example
|
86
|
+
```ruby
|
87
|
+
# load the gem
|
88
|
+
require 'transferzero-sdk'
|
89
|
+
|
90
|
+
api_instance = TransferZero::TransactionsApi.new
|
91
|
+
|
92
|
+
|
93
|
+
begin
|
94
|
+
#Creates a new transaction and funds it from account balance
|
95
|
+
result = api_instance.create_and_fund_transaction(transaction_request)
|
96
|
+
p result
|
97
|
+
rescue TransferZero::ApiError => e
|
98
|
+
if e.validation_error
|
99
|
+
puts "WARN: Validation error occured when calling the endpoint"
|
100
|
+
result = e.response_object("TransactionResponse")
|
101
|
+
p result
|
102
|
+
else
|
103
|
+
puts "Exception when calling TransactionsApi->create_and_fund_transaction: #{e}"
|
104
|
+
end
|
105
|
+
end
|
106
|
+
```
|
107
|
+
|
108
|
+
### Parameters
|
109
|
+
|
110
|
+
Name | Type | Description | Notes
|
111
|
+
------------- | ------------- | ------------- | -------------
|
112
|
+
**transaction_request** | [**TransactionRequest**](TransactionRequest.md)| |
|
113
|
+
|
114
|
+
### Return type
|
115
|
+
|
116
|
+
[**TransactionResponse**](TransactionResponse.md)
|
117
|
+
|
118
|
+
### Authorization
|
119
|
+
|
120
|
+
You can set the API Key and Secret on the TransferZero object when setting it up:
|
121
|
+
|
122
|
+
```ruby
|
123
|
+
|
124
|
+
TransferZero.configure do |config|
|
125
|
+
config.api_key = '<key'
|
126
|
+
config.api_secret = '<secret>'
|
127
|
+
config.host = 'https://api-sandbox.transferzero.com/v1'
|
128
|
+
end
|
129
|
+
|
130
|
+
```
|
131
|
+
|
132
|
+
### HTTP request headers
|
133
|
+
|
134
|
+
- **Content-Type**: application/json
|
135
|
+
- **Accept**: application/json
|
136
|
+
|
137
|
+
|
138
|
+
|
77
139
|
# **get_transaction**
|
78
140
|
> TransactionResponse get_transaction(transaction_id)
|
79
141
|
|
@@ -153,6 +215,7 @@ opts = {
|
|
153
215
|
page: 1 # Integer | The page number to request (defaults to 1)
|
154
216
|
per: 10 # Integer | The number of results to load per page (defaults to 10)
|
155
217
|
external_id: 'external_id_example' # String | Allows filtering results by `external_id`. Example: `/v1/senders?external_id=26ec8517-2f0d-48c0-b74f-0bccb9ab3a87`
|
218
|
+
sender_id: 'sender_id_example' # String | Allows filtering results by `sender_id`. Example: `/v1/transactions?sender_id=b41d3cb7-6c54-4245-85fc-8e30690eb0f7`
|
156
219
|
}
|
157
220
|
|
158
221
|
begin
|
@@ -177,6 +240,7 @@ Name | Type | Description | Notes
|
|
177
240
|
**page** | **Integer**| The page number to request (defaults to 1) | [optional]
|
178
241
|
**per** | **Integer**| The number of results to load per page (defaults to 10) | [optional]
|
179
242
|
**external_id** | **String**| Allows filtering results by `external_id`. Example: `/v1/senders?external_id=26ec8517-2f0d-48c0-b74f-0bccb9ab3a87` | [optional]
|
243
|
+
**sender_id** | **String**| Allows filtering results by `sender_id`. Example: `/v1/transactions?sender_id=b41d3cb7-6c54-4245-85fc-8e30690eb0f7` | [optional]
|
180
244
|
|
181
245
|
### Return type
|
182
246
|
|