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.
Files changed (163) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +17 -11
  3. data/docs/AccountMeta.md +1 -1
  4. data/docs/AccountValidationApi.md +4 -4
  5. data/docs/AccountValidationRequest.md +6 -4
  6. data/docs/Currency.md +1 -1
  7. data/docs/CurrencyExchange.md +1 -1
  8. data/docs/CurrencyInfoApi.md +20 -6
  9. data/docs/CurrencyOpposite.md +4 -2
  10. data/docs/Debit.md +2 -2
  11. data/docs/Document.md +4 -0
  12. data/docs/FieldSelectValidation.md +1 -1
  13. data/docs/FieldValidation.md +1 -1
  14. data/docs/PayinMethod.md +4 -4
  15. data/docs/PayinMethodDetails.md +7 -3
  16. data/docs/PayinMethodDetailsBTC.md +17 -0
  17. data/docs/PayinMethodDetailsMobile.md +1 -1
  18. data/docs/PayinMethodDetailsNGNBank.md +4 -2
  19. data/docs/PaymentMethod.md +2 -2
  20. data/docs/PaymentMethodOpposite.md +2 -2
  21. data/docs/PayoutMethod.md +1 -1
  22. data/docs/PayoutMethodDetails.md +12 -4
  23. data/docs/PayoutMethodDetailsBTC.md +23 -0
  24. data/docs/PayoutMethodDetailsGBPBank.md +29 -0
  25. data/docs/PayoutMethodDetailsIBAN.md +1 -1
  26. data/docs/PayoutMethodDetailsNGNBank.md +1 -1
  27. data/docs/PayoutMethodDetailsXOFBank.md +25 -0
  28. data/docs/PoliticallyExposedPerson.md +31 -0
  29. data/docs/Recipient.md +5 -3
  30. data/docs/RecipientsApi.md +3 -3
  31. data/docs/Sender.md +63 -27
  32. data/docs/Transaction.md +5 -5
  33. data/docs/TransactionTraits.md +2 -2
  34. data/docs/TransactionsApi.md +64 -0
  35. data/example/client.rb +14 -14
  36. data/git_push.sh +1 -1
  37. data/lib/transferzero-sdk.rb +5 -0
  38. data/lib/transferzero-sdk/api/account_validation_api.rb +4 -4
  39. data/lib/transferzero-sdk/api/currency_info_api.rb +6 -0
  40. data/lib/transferzero-sdk/api/recipients_api.rb +4 -4
  41. data/lib/transferzero-sdk/api/transactions_api.rb +59 -0
  42. data/lib/transferzero-sdk/api_client.rb +5 -5
  43. data/lib/transferzero-sdk/models/account.rb +70 -69
  44. data/lib/transferzero-sdk/models/account_list_response.rb +67 -66
  45. data/lib/transferzero-sdk/models/account_meta.rb +61 -60
  46. data/lib/transferzero-sdk/models/account_response.rb +66 -65
  47. data/lib/transferzero-sdk/models/account_validation_error.rb +61 -60
  48. data/lib/transferzero-sdk/models/account_validation_request.rb +164 -163
  49. data/lib/transferzero-sdk/models/account_validation_response.rb +66 -65
  50. data/lib/transferzero-sdk/models/account_validation_result.rb +61 -60
  51. data/lib/transferzero-sdk/models/api_log.rb +136 -135
  52. data/lib/transferzero-sdk/models/api_log_list_response.rb +70 -69
  53. data/lib/transferzero-sdk/models/api_log_response.rb +60 -59
  54. data/lib/transferzero-sdk/models/currency.rb +142 -141
  55. data/lib/transferzero-sdk/models/currency_exchange.rb +158 -157
  56. data/lib/transferzero-sdk/models/currency_exchange_list_response.rb +62 -61
  57. data/lib/transferzero-sdk/models/currency_list_response.rb +62 -61
  58. data/lib/transferzero-sdk/models/currency_opposite.rb +166 -155
  59. data/lib/transferzero-sdk/models/debit.rb +151 -155
  60. data/lib/transferzero-sdk/models/debit_list_request.rb +61 -60
  61. data/lib/transferzero-sdk/models/debit_list_response.rb +67 -66
  62. data/lib/transferzero-sdk/models/debit_request.rb +60 -59
  63. data/lib/transferzero-sdk/models/debit_request_wrapper.rb +80 -79
  64. data/lib/transferzero-sdk/models/debit_response.rb +60 -59
  65. data/lib/transferzero-sdk/models/document.rb +181 -160
  66. data/lib/transferzero-sdk/models/document_list_response.rb +67 -66
  67. data/lib/transferzero-sdk/models/document_request.rb +60 -59
  68. data/lib/transferzero-sdk/models/document_response.rb +60 -59
  69. data/lib/transferzero-sdk/models/document_webhook.rb +96 -95
  70. data/lib/transferzero-sdk/models/error_status.rb +66 -65
  71. data/lib/transferzero-sdk/models/field_description.rb +95 -94
  72. data/lib/transferzero-sdk/models/field_select_validation.rb +70 -69
  73. data/lib/transferzero-sdk/models/field_validation.rb +78 -77
  74. data/lib/transferzero-sdk/models/pagination.rb +97 -96
  75. data/lib/transferzero-sdk/models/pagination_meta.rb +60 -59
  76. data/lib/transferzero-sdk/models/payin_method.rb +97 -96
  77. data/lib/transferzero-sdk/models/payin_method_details.rb +122 -105
  78. data/lib/transferzero-sdk/models/payin_method_details_btc.rb +204 -0
  79. data/lib/transferzero-sdk/models/payin_method_details_mobile.rb +75 -74
  80. data/lib/transferzero-sdk/models/payin_method_details_ngn_bank.rb +71 -65
  81. data/lib/transferzero-sdk/models/payin_method_request.rb +60 -59
  82. data/lib/transferzero-sdk/models/payment_method.rb +109 -108
  83. data/lib/transferzero-sdk/models/payment_method_list_response.rb +61 -60
  84. data/lib/transferzero-sdk/models/payment_method_opposite.rb +124 -123
  85. data/lib/transferzero-sdk/models/payout_method.rb +107 -106
  86. data/lib/transferzero-sdk/models/payout_method_bank_account_type_enum.rb +14 -19
  87. data/lib/transferzero-sdk/models/payout_method_details.rb +338 -288
  88. data/lib/transferzero-sdk/models/payout_method_details_balance.rb +61 -60
  89. data/lib/transferzero-sdk/models/payout_method_details_btc.rb +250 -0
  90. data/lib/transferzero-sdk/models/payout_method_details_gbp_bank.rb +267 -0
  91. data/lib/transferzero-sdk/models/payout_method_details_ghs_bank.rb +97 -96
  92. data/lib/transferzero-sdk/models/payout_method_details_iban.rb +100 -104
  93. data/lib/transferzero-sdk/models/payout_method_details_mad_cash.rb +162 -161
  94. data/lib/transferzero-sdk/models/payout_method_details_mobile.rb +86 -85
  95. data/lib/transferzero-sdk/models/payout_method_details_ngn_bank.rb +104 -108
  96. data/lib/transferzero-sdk/models/payout_method_details_xof_bank.rb +264 -0
  97. data/lib/transferzero-sdk/models/payout_method_details_xof_mobile.rb +97 -96
  98. data/lib/transferzero-sdk/models/payout_method_gender_enum.rb +14 -19
  99. data/lib/transferzero-sdk/models/payout_method_identity_card_type_enum.rb +15 -20
  100. data/lib/transferzero-sdk/models/payout_method_list_response.rb +67 -66
  101. data/lib/transferzero-sdk/models/payout_method_mobile_provider_enum.rb +14 -19
  102. data/lib/transferzero-sdk/models/payout_method_request.rb +60 -59
  103. data/lib/transferzero-sdk/models/payout_method_response.rb +60 -59
  104. data/lib/transferzero-sdk/models/payout_method_webhook.rb +96 -95
  105. data/lib/transferzero-sdk/models/politically_exposed_person.rb +272 -0
  106. data/lib/transferzero-sdk/models/recipient.rb +230 -219
  107. data/lib/transferzero-sdk/models/recipient_list_response.rb +67 -66
  108. data/lib/transferzero-sdk/models/recipient_request.rb +60 -59
  109. data/lib/transferzero-sdk/models/recipient_response.rb +60 -59
  110. data/lib/transferzero-sdk/models/recipient_state.rb +22 -27
  111. data/lib/transferzero-sdk/models/recipient_webhook.rb +96 -95
  112. data/lib/transferzero-sdk/models/sender.rb +529 -322
  113. data/lib/transferzero-sdk/models/sender_list_response.rb +67 -66
  114. data/lib/transferzero-sdk/models/sender_request.rb +60 -59
  115. data/lib/transferzero-sdk/models/sender_response.rb +66 -65
  116. data/lib/transferzero-sdk/models/sender_response_existing.rb +60 -59
  117. data/lib/transferzero-sdk/models/sender_response_meta.rb +60 -59
  118. data/lib/transferzero-sdk/models/sender_state.rb +19 -23
  119. data/lib/transferzero-sdk/models/sender_webhook.rb +96 -95
  120. data/lib/transferzero-sdk/models/transaction.rb +192 -191
  121. data/lib/transferzero-sdk/models/transaction_list_response.rb +67 -66
  122. data/lib/transferzero-sdk/models/transaction_request.rb +60 -59
  123. data/lib/transferzero-sdk/models/transaction_response.rb +66 -65
  124. data/lib/transferzero-sdk/models/transaction_response_existing.rb +66 -65
  125. data/lib/transferzero-sdk/models/transaction_response_meta.rb +60 -59
  126. data/lib/transferzero-sdk/models/transaction_state.rb +23 -27
  127. data/lib/transferzero-sdk/models/transaction_traits.rb +71 -70
  128. data/lib/transferzero-sdk/models/transaction_webhook.rb +96 -95
  129. data/lib/transferzero-sdk/models/validation_error_description.rb +62 -61
  130. data/lib/transferzero-sdk/models/webhook.rb +92 -91
  131. data/lib/transferzero-sdk/models/webhook_definition.rb +107 -106
  132. data/lib/transferzero-sdk/models/webhook_definition_event_list_response.rb +61 -60
  133. data/lib/transferzero-sdk/models/webhook_definition_list_response.rb +67 -66
  134. data/lib/transferzero-sdk/models/webhook_definition_request.rb +60 -59
  135. data/lib/transferzero-sdk/models/webhook_definition_response.rb +60 -59
  136. data/lib/transferzero-sdk/models/webhook_log.rb +97 -96
  137. data/lib/transferzero-sdk/models/webhook_log_list_response.rb +70 -69
  138. data/lib/transferzero-sdk/models/webhook_log_metadata.rb +129 -128
  139. data/lib/transferzero-sdk/models/webhook_log_metadata_request.rb +80 -79
  140. data/lib/transferzero-sdk/models/webhook_log_metadata_response.rb +81 -80
  141. data/lib/transferzero-sdk/models/webhook_log_response.rb +60 -59
  142. data/lib/transferzero-sdk/version.rb +1 -1
  143. data/spec/api/account_validation_api_spec.rb +2 -2
  144. data/spec/api/currency_info_api_spec.rb +2 -0
  145. data/spec/api/documents_api_spec.rb +15 -0
  146. data/spec/api/recipients_api_spec.rb +1 -1
  147. data/spec/api/transactions_api_spec.rb +13 -0
  148. data/spec/models/account_validation_request_spec.rb +7 -1
  149. data/spec/models/currency_opposite_spec.rb +6 -0
  150. data/spec/models/document_spec.rb +12 -0
  151. data/spec/models/payin_method_details_btc_spec.rb +41 -0
  152. data/spec/models/payin_method_details_ngn_bank_spec.rb +6 -0
  153. data/spec/models/payin_method_details_spec.rb +6 -0
  154. data/spec/models/payout_method_details_btc_spec.rb +59 -0
  155. data/spec/models/payout_method_details_gbp_bank_spec.rb +77 -0
  156. data/spec/models/payout_method_details_spec.rb +7 -1
  157. data/spec/models/payout_method_details_xof_bank_spec.rb +65 -0
  158. data/spec/models/politically_exposed_person_spec.rb +83 -0
  159. data/spec/models/recipient_spec.rb +6 -0
  160. data/spec/models/sender_spec.rb +16 -0
  161. data/transferzero-sdk.gemspec +2 -2
  162. metadata +35 -24
  163. 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: null,
22
+ otc_permitted: false,
23
23
  details: ["email","first_name","last_name","address"],
24
- default: null,
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
  ```
@@ -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://github.com/transferzero/api-documentation/blob/master/additional-features.md#collections-from-senders) for more info on how to collect money into internal balance | [optional]
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]
@@ -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
+
@@ -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** | Shows whether the payment can be cancelled using the DELETE /v1/recipients/{id} endpoint or not. The payment can not be cancelled if the payout is pending. | [optional]
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: null,
39
+ editable: true,
40
+ retriable: true,
39
41
  input_usd_amount: 10,
40
- may_cancel: null,
42
+ may_cancel: true,
41
43
  state_reason: null,
42
44
  state: null,
43
45
  transaction_id: 97e79719-06e4-4794-aeeb-d2d9415d983a,
@@ -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 only recipients where the `may_cancel` attribute is true can be cancelled.
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://github.com/transferzero/api-documentation/blob/master/transaction-flow.md#state-1) for possible states. Example: `/v1/recipients?state[]=error&state[]=initial`
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&currency[]=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 &#x60;created_at&#x60; timeframe. Example: &#x60;/v1/recipients?created_at_from&#x3D;2018-06-06&amp;created_at_to&#x3D;2018-06-08&#x60; | [optional]
121
121
  **amount_from** | **String**| Minimum amount to filter recipients by amount range. Allows filtering results by the specified &#x60;amount&#x60; range. When using this filter, the &#x60;currency&#x60; should also be specified. Example: &#x60;/v1/recipients?currency&#x3D;NGN&amp;amount_from&#x3D;83.76672339&amp;amount_to&#x3D;83.76672339&#x60; | [optional]
122
122
  **amount_to** | **String**| Max amount to filter recipients by amount range. Allows filtering results by the specified &#x60;amount&#x60; range. When using this filter, the &#x60;currency&#x60; should also be specified. Example: &#x60;/v1/recipients?currency&#x3D;NGN&amp;amount_from&#x3D;83.76672339&amp;amount_to&#x3D;83.76672339&#x60; | [optional]
123
- **state** | [**Array&lt;String&gt;**](String.md)| Allows filtering results by &#x60;state&#x60; of recipient. See [API Documentation - Recipient state](https://github.com/transferzero/api-documentation/blob/master/transaction-flow.md#state-1) for possible states. Example: &#x60;/v1/recipients?state[]&#x3D;error&amp;state[]&#x3D;initial&#x60; | [optional]
123
+ **state** | [**Array&lt;String&gt;**](String.md)| Allows filtering results by &#x60;state&#x60; of recipient. See [API Documentation - Recipient state](https://docs.transferzero.com/docs/transaction-flow/#state) for possible states. Example: &#x60;/v1/recipients?state[]&#x3D;error&amp;state[]&#x3D;initial&#x60; | [optional]
124
124
  **currency** | [**Array&lt;String&gt;**](String.md)| Allows filtering results by &#x60;input_currency&#x60;. Additionally required when filtering by an amount range Example: &#x60;/v1/recipients?currency[]&#x3D;KES&amp;currency[]&#x3D;NGN&#x60; | [optional]
125
125
 
126
126
  ### Return type
@@ -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&#39;s street |
12
+ **postal_code** | **String** | Zip code of sender |
13
+ **city** | **String** | Sender&#39;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: - &#x60;DL&#x60;: Driving License - &#x60;PP&#x60;: International Passport - &#x60;ID&#x60;: National ID - &#x60;OT&#x60;: 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
- **onboarding_status** | **String** | The onboarding status of the sender | [optional]
18
- **address** | **String** | The address of the sender | [optional]
19
- **description** | **String** | Description of the sender | [optional]
20
- **name** | **String** | Name of sender (used only with a Business sender) | [optional]
21
- **city** | **String** | Sender&#39;s city |
22
- **street** | **String** | Sender&#39;s street |
23
- **address_description** | **String** | Description of address | [optional]
24
- **postal_code** | **String** | Zip code of sender |
25
- **birth_date** | **Date** | Date of birth of sender | [optional]
26
- **ip** | **String** | IP of sender |
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&#39;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&lt;Document&gt;**](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: &#x60;\&quot;documents\&quot;: [ ]&#x60; in the request if KYC has been waived. If the documents already exist, please send the Document ID eg. &#x60;&#x60;&#x60;JSON \&quot;documents\&quot;: [ { \&quot;id\&quot;: \&quot;b6648ba3-1c7b-4f59-8580-684899c84a07\&quot; } ] &#x60;&#x60;&#x60; |
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&#39;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&lt;String, Array&lt;ValidationErrorDescription&gt;&gt;** | The fields that have some problems and don&#39;t pass validation | [optional]
47
+ **onboarding_status** | **String** | The onboarding status of the sender | [optional]
48
+ **politically_exposed_people** | [**Array&lt;PoliticallyExposedPerson&gt;**](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: &#x60;&#x60;&#x60;json { \&quot;politically_exposed_person\&quot;: { \&quot;name\&quot;: \&quot;Ronald Reagan\&quot;, \&quot;position\&quot;: \&quot;President of the United States\&quot;, \&quot;started_date\&quot;: \&quot;1981-01-20T00:00:00.000Z\&quot;, \&quot;ended_date\&quot;: \&quot;1989-01-20T00:00:00.000Z\&quot;, \&quot;sender_id\&quot;: \&quot;344fb668-196d-43db-9d94-b34b7e6c7e0b\&quot; } } &#x60;&#x60;&#x60; | [optional]
49
+ **external_id** | **String** | Optional ID that is supplied by partner linking it to the partner&#39;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(type: person,
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
- onboarding_status: null,
50
- address: null,
51
- description: null,
52
- name: null,
53
- city: Kampala,
54
- street: Fake Street,
55
- address_description: null,
56
- postal_code: 798983,
57
- birth_date: null,
58
- ip: 127.0.0.1,
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: [{&quot;id&quot;:&quot;b6648ba3-1c7b-4f59-8580-684899c84a07&quot;}],
60
95
  metadata: {},
61
- state: null,
62
- id: bf9ff782-e182-45ac-abea-5bce83ad6670,
96
+ errors: {&quot;phone_number&quot;:[{&quot;error&quot;:&quot;invalid&quot;}],&quot;documents&quot;:[{&quot;error&quot;:&quot;blank&quot;}]},
97
+ onboarding_status: null,
98
+ politically_exposed_people: [{&quot;id&quot;:&quot;40&quot;,&quot;name&quot;:&quot;Ronald Reagan&quot;,&quot;position&quot;:&quot;President of the United States&quot;,&quot;started_date&quot;:&quot;1981-01-20T00:00:00.000Z&quot;,&quot;ended_date&quot;:&quot;1989-01-20T00:00:00.000Z&quot;,&quot;sender_id&quot;:&quot;f9dc79ca-0c39-4add-9f4d-5ad7e6f187fb&quot;}],
63
99
  external_id: 806ec63a-a5a7-43cc-9d75-1ee74fbcc026,
64
- errors: {&quot;phone_number&quot;:[{&quot;error&quot;:&quot;invalid&quot;}],&quot;documents&quot;:[{&quot;error&quot;:&quot;blank&quot;}]})
100
+ created_at: 2019-01-11T00:00:00.001+0000)
65
101
  ```
66
102
 
67
103
 
@@ -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&lt;PayinMethod&gt;**](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://github.com/transferzero/api-documentation/blob/master/additional-features.md#collections-from-senders) in the API documentation | [optional]
8
+ **payin_methods** | [**Array&lt;PayinMethod&gt;**](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 &#x60;sendRef&#x60; 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&lt;Recipient&gt;**](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&#39;s own Sender ID. Note: if present we will validate whether the sent ID is a duplicate in our system or not. | [optional]
20
+ **external_id** | **String** | Optional ID that is supplied by partner linking it to the partner&#39;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&lt;String, Array&lt;ValidationErrorDescription&gt;&gt;** | The fields that have some problems and don&#39;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: null,
36
+ input_amount: 1000,
37
37
  payin_reference: null,
38
- paid_amount: null,
39
- due_amount: null,
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,
@@ -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://github.com/transferzero/api-documentation/blob/master/additional-features.md#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://github.com/transferzero/api-documentation/blob/master/additional-features.md#name-validation-in-transactions) for more details | [optional]
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
 
@@ -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 &#x60;external_id&#x60;. Example: &#x60;/v1/senders?external_id&#x3D;26ec8517-2f0d-48c0-b74f-0bccb9ab3a87&#x60; | [optional]
243
+ **sender_id** | **String**| Allows filtering results by &#x60;sender_id&#x60;. Example: &#x60;/v1/transactions?sender_id&#x3D;b41d3cb7-6c54-4245-85fc-8e30690eb0f7&#x60; | [optional]
180
244
 
181
245
  ### Return type
182
246