transferzero-sdk 1.6.0 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +93 -0
- data/README.md +12 -4
- data/docs/Currency.md +0 -2
- data/docs/CurrencyExchange.md +0 -2
- data/docs/CurrencyOpposite.md +3 -3
- data/docs/Document.md +2 -0
- data/docs/PayoutMethod.md +1 -1
- data/docs/PayoutMethodCashProviderEnum.md +16 -0
- data/docs/PayoutMethodDetails.md +19 -5
- data/docs/PayoutMethodDetailsGBPBank.md +29 -0
- data/docs/PayoutMethodDetailsIBAN.md +1 -1
- data/docs/PayoutMethodDetailsMobile.md +3 -1
- data/docs/PayoutMethodDetailsXOFCash.md +27 -0
- data/docs/PayoutMethodDetailsZARBank.md +35 -0
- data/docs/ProofOfPayment.md +23 -0
- data/docs/ProofOfPaymentListResponse.md +17 -0
- data/docs/Recipient.md +3 -1
- data/docs/RecipientStateReasonDetails.md +23 -0
- data/docs/RecipientsApi.md +63 -1
- data/docs/Sender.md +20 -8
- data/lib/transferzero-sdk.rb +7 -0
- data/lib/transferzero-sdk/api/recipients_api.rb +56 -2
- data/lib/transferzero-sdk/api_client.rb +5 -3
- data/lib/transferzero-sdk/models/account.rb +70 -69
- data/lib/transferzero-sdk/models/account_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/account_meta.rb +61 -60
- data/lib/transferzero-sdk/models/account_response.rb +66 -65
- data/lib/transferzero-sdk/models/account_validation_error.rb +61 -60
- data/lib/transferzero-sdk/models/account_validation_request.rb +164 -163
- data/lib/transferzero-sdk/models/account_validation_response.rb +66 -65
- data/lib/transferzero-sdk/models/account_validation_result.rb +61 -60
- data/lib/transferzero-sdk/models/api_log.rb +136 -135
- data/lib/transferzero-sdk/models/api_log_list_response.rb +70 -69
- data/lib/transferzero-sdk/models/api_log_response.rb +60 -59
- data/lib/transferzero-sdk/models/currency.rb +133 -142
- data/lib/transferzero-sdk/models/currency_exchange.rb +149 -158
- data/lib/transferzero-sdk/models/currency_exchange_list_response.rb +62 -61
- data/lib/transferzero-sdk/models/currency_list_response.rb +62 -61
- data/lib/transferzero-sdk/models/currency_opposite.rb +166 -165
- data/lib/transferzero-sdk/models/debit.rb +151 -150
- data/lib/transferzero-sdk/models/debit_list_request.rb +61 -60
- data/lib/transferzero-sdk/models/debit_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/debit_request.rb +60 -59
- data/lib/transferzero-sdk/models/debit_request_wrapper.rb +80 -79
- data/lib/transferzero-sdk/models/debit_response.rb +60 -59
- data/lib/transferzero-sdk/models/document.rb +180 -169
- data/lib/transferzero-sdk/models/document_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/document_request.rb +60 -59
- data/lib/transferzero-sdk/models/document_response.rb +60 -59
- data/lib/transferzero-sdk/models/document_webhook.rb +96 -95
- data/lib/transferzero-sdk/models/error_status.rb +66 -65
- data/lib/transferzero-sdk/models/field_description.rb +95 -94
- data/lib/transferzero-sdk/models/field_select_validation.rb +70 -69
- data/lib/transferzero-sdk/models/field_validation.rb +78 -77
- data/lib/transferzero-sdk/models/pagination.rb +97 -96
- data/lib/transferzero-sdk/models/pagination_meta.rb +60 -59
- data/lib/transferzero-sdk/models/payin_method.rb +97 -96
- data/lib/transferzero-sdk/models/payin_method_details.rb +122 -121
- data/lib/transferzero-sdk/models/payin_method_details_btc.rb +62 -61
- data/lib/transferzero-sdk/models/payin_method_details_mobile.rb +75 -74
- data/lib/transferzero-sdk/models/payin_method_details_ngn_bank.rb +71 -70
- data/lib/transferzero-sdk/models/payin_method_request.rb +60 -59
- data/lib/transferzero-sdk/models/payment_method.rb +109 -108
- data/lib/transferzero-sdk/models/payment_method_list_response.rb +61 -60
- data/lib/transferzero-sdk/models/payment_method_opposite.rb +124 -123
- data/lib/transferzero-sdk/models/payout_method.rb +107 -106
- data/lib/transferzero-sdk/models/payout_method_bank_account_type_enum.rb +14 -19
- data/lib/transferzero-sdk/models/payout_method_cash_provider_enum.rb +31 -0
- data/lib/transferzero-sdk/models/payout_method_details.rb +402 -320
- data/lib/transferzero-sdk/models/payout_method_details_balance.rb +61 -60
- data/lib/transferzero-sdk/models/payout_method_details_btc.rb +97 -96
- data/lib/transferzero-sdk/models/payout_method_details_gbp_bank.rb +267 -0
- data/lib/transferzero-sdk/models/payout_method_details_ghs_bank.rb +97 -96
- data/lib/transferzero-sdk/models/payout_method_details_iban.rb +100 -104
- data/lib/transferzero-sdk/models/payout_method_details_mad_cash.rb +162 -161
- data/lib/transferzero-sdk/models/payout_method_details_mobile.rb +93 -83
- data/lib/transferzero-sdk/models/payout_method_details_ngn_bank.rb +104 -103
- data/lib/transferzero-sdk/models/payout_method_details_xof_bank.rb +108 -107
- data/lib/transferzero-sdk/models/payout_method_details_xof_cash.rb +263 -0
- data/lib/transferzero-sdk/models/payout_method_details_xof_mobile.rb +97 -96
- data/lib/transferzero-sdk/models/payout_method_details_zar_bank.rb +324 -0
- data/lib/transferzero-sdk/models/payout_method_gender_enum.rb +14 -19
- data/lib/transferzero-sdk/models/payout_method_identity_card_type_enum.rb +15 -20
- data/lib/transferzero-sdk/models/payout_method_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/payout_method_mobile_provider_enum.rb +17 -19
- data/lib/transferzero-sdk/models/payout_method_request.rb +60 -59
- data/lib/transferzero-sdk/models/payout_method_response.rb +60 -59
- data/lib/transferzero-sdk/models/payout_method_webhook.rb +96 -95
- data/lib/transferzero-sdk/models/politically_exposed_person.rb +123 -122
- data/lib/transferzero-sdk/models/proof_of_payment.rb +233 -0
- data/lib/transferzero-sdk/models/proof_of_payment_list_response.rb +204 -0
- data/lib/transferzero-sdk/models/recipient.rb +237 -227
- data/lib/transferzero-sdk/models/recipient_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/recipient_request.rb +60 -59
- data/lib/transferzero-sdk/models/recipient_response.rb +60 -59
- data/lib/transferzero-sdk/models/recipient_state.rb +22 -27
- data/lib/transferzero-sdk/models/recipient_state_reason_details.rb +235 -0
- data/lib/transferzero-sdk/models/recipient_webhook.rb +96 -95
- data/lib/transferzero-sdk/models/sender.rb +565 -480
- data/lib/transferzero-sdk/models/sender_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/sender_request.rb +60 -59
- data/lib/transferzero-sdk/models/sender_response.rb +66 -65
- data/lib/transferzero-sdk/models/sender_response_existing.rb +60 -59
- data/lib/transferzero-sdk/models/sender_response_meta.rb +60 -59
- data/lib/transferzero-sdk/models/sender_state.rb +19 -24
- data/lib/transferzero-sdk/models/sender_webhook.rb +96 -95
- data/lib/transferzero-sdk/models/transaction.rb +192 -191
- data/lib/transferzero-sdk/models/transaction_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/transaction_request.rb +60 -59
- data/lib/transferzero-sdk/models/transaction_response.rb +66 -65
- data/lib/transferzero-sdk/models/transaction_response_existing.rb +66 -65
- data/lib/transferzero-sdk/models/transaction_response_meta.rb +60 -59
- data/lib/transferzero-sdk/models/transaction_state.rb +23 -28
- data/lib/transferzero-sdk/models/transaction_traits.rb +71 -70
- data/lib/transferzero-sdk/models/transaction_webhook.rb +96 -95
- data/lib/transferzero-sdk/models/validation_error_description.rb +62 -61
- data/lib/transferzero-sdk/models/webhook.rb +92 -91
- data/lib/transferzero-sdk/models/webhook_definition.rb +107 -106
- data/lib/transferzero-sdk/models/webhook_definition_event_list_response.rb +61 -60
- data/lib/transferzero-sdk/models/webhook_definition_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/webhook_definition_request.rb +60 -59
- data/lib/transferzero-sdk/models/webhook_definition_response.rb +60 -59
- data/lib/transferzero-sdk/models/webhook_log.rb +97 -96
- data/lib/transferzero-sdk/models/webhook_log_list_response.rb +70 -69
- data/lib/transferzero-sdk/models/webhook_log_metadata.rb +129 -128
- data/lib/transferzero-sdk/models/webhook_log_metadata_request.rb +80 -79
- data/lib/transferzero-sdk/models/webhook_log_metadata_response.rb +81 -80
- data/lib/transferzero-sdk/models/webhook_log_response.rb +60 -59
- data/lib/transferzero-sdk/version.rb +1 -1
- data/spec/models/payout_method_cash_provider_enum_spec.rb +35 -0
- data/spec/models/payout_method_details_gbp_bank_spec.rb +77 -0
- data/spec/models/payout_method_details_xof_cash_spec.rb +71 -0
- data/spec/models/payout_method_details_zar_bank_spec.rb +89 -0
- data/spec/models/proof_of_payment_list_response_spec.rb +41 -0
- data/spec/models/proof_of_payment_spec.rb +59 -0
- data/spec/models/recipient_state_reason_details_spec.rb +59 -0
- metadata +32 -3
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# TransferZero::ProofOfPayment
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**id** | **String** | UUID of the uploaded document | [optional]
|
|
8
|
+
**file_name** | **String** | Name of the uploaded file | [optional]
|
|
9
|
+
**thumbnail** | **String** | URL to thumbnail image of the uploaded file | [optional]
|
|
10
|
+
**url** | **String** | URL to uploaded file | [optional]
|
|
11
|
+
|
|
12
|
+
## Code Sample
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'TransferZero'
|
|
16
|
+
|
|
17
|
+
instance = TransferZero::ProofOfPayment.new(id: null,
|
|
18
|
+
file_name: my_file.jpg,
|
|
19
|
+
thumbnail: https://bitpesa-development.s3.eu-west-1.amazonaws.com/my_file_thumb.jpg,
|
|
20
|
+
url: https://bitpesa-development.s3.eu-west-1.amazonaws.com/my_file.jpg)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# TransferZero::ProofOfPaymentListResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**object** | [**Array<ProofOfPayment>**](ProofOfPayment.md) | | [optional]
|
|
8
|
+
|
|
9
|
+
## Code Sample
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'TransferZero'
|
|
13
|
+
|
|
14
|
+
instance = TransferZero::ProofOfPaymentListResponse.new(object: null)
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
|
data/docs/Recipient.md
CHANGED
|
@@ -12,8 +12,9 @@ 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
|
+
**state_reason_details** | [**RecipientStateReasonDetails**](RecipientStateReasonDetails.md) | | [optional]
|
|
17
18
|
**state** | [**RecipientState**](RecipientState.md) | | [optional]
|
|
18
19
|
**transaction_id** | **String** | The ID of the transaction that is related to this recipient | [optional]
|
|
19
20
|
**transaction_state** | [**TransactionState**](TransactionState.md) | | [optional]
|
|
@@ -41,6 +42,7 @@ instance = TransferZero::Recipient.new(requested_amount: 750.0,
|
|
|
41
42
|
input_usd_amount: 10,
|
|
42
43
|
may_cancel: true,
|
|
43
44
|
state_reason: null,
|
|
45
|
+
state_reason_details: null,
|
|
44
46
|
state: null,
|
|
45
47
|
transaction_id: 97e79719-06e4-4794-aeeb-d2d9415d983a,
|
|
46
48
|
transaction_state: null,
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# TransferZero::RecipientStateReasonDetails
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**code** | **String** | Status code of failed transaction | [optional]
|
|
8
|
+
**category** | **String** | Main category of error, it could be paid, unknown, pickupable, temporary_error, recipient_error, sender_error | [optional]
|
|
9
|
+
**messages** | **Array<String>** | Tiered messages | [optional]
|
|
10
|
+
**description** | **String** | Public, human readable, detailed error message | [optional]
|
|
11
|
+
|
|
12
|
+
## Code Sample
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'TransferZero'
|
|
16
|
+
|
|
17
|
+
instance = TransferZero::RecipientStateReasonDetails.new(code: 311,
|
|
18
|
+
category: temporary_error,
|
|
19
|
+
messages: ["Temporary error","Switch Error","Issuer/Switch inoperative"],
|
|
20
|
+
description: The central switch is not accepting transfers at the moment. We will retry the transaction. You can also edit or cancel this transaction.)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
|
data/docs/RecipientsApi.md
CHANGED
|
@@ -7,6 +7,7 @@ Method | HTTP request | Description
|
|
|
7
7
|
[**delete_recipient**](RecipientsApi.md#delete_recipient) | **DELETE** /recipients/{Recipient ID} | Cancelling a recipient
|
|
8
8
|
[**get_recipients**](RecipientsApi.md#get_recipients) | **GET** /recipients | Getting a list of recipients with filtering
|
|
9
9
|
[**patch_recipient**](RecipientsApi.md#patch_recipient) | **PATCH** /recipients/{Recipient ID} | Updating a recipient
|
|
10
|
+
[**proof_of_payments**](RecipientsApi.md#proof_of_payments) | **GET** /recipients/{Recipient ID}/proof_of_payments | Returns list of proof of payments
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
# **delete_recipient**
|
|
@@ -14,7 +15,7 @@ Method | HTTP request | Description
|
|
|
14
15
|
|
|
15
16
|
Cancelling a recipient
|
|
16
17
|
|
|
17
|
-
Cancels the payment to the recipient specified in the URL path. Please note
|
|
18
|
+
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
19
|
|
|
19
20
|
### Example
|
|
20
21
|
```ruby
|
|
@@ -210,3 +211,64 @@ end
|
|
|
210
211
|
|
|
211
212
|
|
|
212
213
|
|
|
214
|
+
# **proof_of_payments**
|
|
215
|
+
> ProofOfPaymentListResponse proof_of_payments(recipient_id)
|
|
216
|
+
|
|
217
|
+
Returns list of proof of payments
|
|
218
|
+
|
|
219
|
+
Returns a list of uploaded proof of payment files for a transaction recipient
|
|
220
|
+
|
|
221
|
+
### Example
|
|
222
|
+
```ruby
|
|
223
|
+
# load the gem
|
|
224
|
+
require 'transferzero-sdk'
|
|
225
|
+
|
|
226
|
+
api_instance = TransferZero::RecipientsApi.new
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
begin
|
|
230
|
+
#Returns list of proof of payments
|
|
231
|
+
result = api_instance.proof_of_payments(recipient_id)
|
|
232
|
+
p result
|
|
233
|
+
rescue TransferZero::ApiError => e
|
|
234
|
+
if e.validation_error
|
|
235
|
+
puts "WARN: Validation error occured when calling the endpoint"
|
|
236
|
+
result = e.response_object("ProofOfPaymentListResponse")
|
|
237
|
+
p result
|
|
238
|
+
else
|
|
239
|
+
puts "Exception when calling RecipientsApi->proof_of_payments: #{e}"
|
|
240
|
+
end
|
|
241
|
+
end
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
### Parameters
|
|
245
|
+
|
|
246
|
+
Name | Type | Description | Notes
|
|
247
|
+
------------- | ------------- | ------------- | -------------
|
|
248
|
+
**recipient_id** | [**String**](.md)| ID of the recipient for whom the proof of payments will be returned. Example: `/v1/recipients/9d4d7b73-a94c-4979-ab57-09074fd55d33/proof_of_payments` |
|
|
249
|
+
|
|
250
|
+
### Return type
|
|
251
|
+
|
|
252
|
+
[**ProofOfPaymentListResponse**](ProofOfPaymentListResponse.md)
|
|
253
|
+
|
|
254
|
+
### Authorization
|
|
255
|
+
|
|
256
|
+
You can set the API Key and Secret on the TransferZero object when setting it up:
|
|
257
|
+
|
|
258
|
+
```ruby
|
|
259
|
+
|
|
260
|
+
TransferZero.configure do |config|
|
|
261
|
+
config.api_key = '<key'
|
|
262
|
+
config.api_secret = '<secret>'
|
|
263
|
+
config.host = 'https://api-sandbox.transferzero.com/v1'
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
### HTTP request headers
|
|
269
|
+
|
|
270
|
+
- **Content-Type**: Not defined
|
|
271
|
+
- **Accept**: application/json
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
|
data/docs/Sender.md
CHANGED
|
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
|
|
|
7
7
|
**id** | **String** | | [optional]
|
|
8
8
|
**type** | **String** | Type of sender to create - either person or business (defaults to person) | [optional]
|
|
9
9
|
**state** | [**SenderState**](SenderState.md) | | [optional]
|
|
10
|
-
**country** | **String** | Country of sender in 2-character alpha ISO 3166-2 country format |
|
|
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
11
|
**street** | **String** | Sender's street |
|
|
12
12
|
**postal_code** | **String** | Zip code of sender |
|
|
13
13
|
**city** | **String** | Sender's city |
|
|
@@ -18,6 +18,7 @@ Name | Type | Description | Notes
|
|
|
18
18
|
**address_description** | **String** | Description of address | [optional]
|
|
19
19
|
**identification_number** | **String** | Identification number of document used | [optional]
|
|
20
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
|
+
**lang** | **String** | Determines language of the served content. Defaults to English | [optional]
|
|
21
22
|
**name** | **String** | Name of sender (used only with a Business sender) | [optional]
|
|
22
23
|
**first_name** | **String** | First name of sender (used only with a Personal sender) | [optional]
|
|
23
24
|
**middle_name** | **String** | Middle name of sender (used only with a Personal sender) | [optional]
|
|
@@ -25,12 +26,13 @@ Name | Type | Description | Notes
|
|
|
25
26
|
**birth_date** | **Date** | Date of birth of sender (used only with a Personal sender) | [optional]
|
|
26
27
|
**occupation** | **String** | Occupation of sender (used only with a Personal sender) | [optional]
|
|
27
28
|
**nationality** | **String** | The nationality of the sender (used only with a Personal sender) | [optional]
|
|
28
|
-
**legal_entity_type** | **String** | Legal entity type (used only with a Business sender) | [optional]
|
|
29
|
-
**registration_date** | **
|
|
29
|
+
**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]
|
|
30
|
+
**registration_date** | **Date** | The registration date (used only with a Business sender) | [optional]
|
|
30
31
|
**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
|
+
**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
33
|
**source_of_funds** | **String** | The source of funds | [optional]
|
|
33
|
-
**
|
|
34
|
+
**custom_source_of_funds** | **String** | Custom source of funds | [optional]
|
|
35
|
+
**core_business_activity** | **String** | The core activity (used only with a Business sender) | [optional]
|
|
34
36
|
**purpose_of_opening_account** | **String** | The purpose for opening their account (used only with a Business sender) | [optional]
|
|
35
37
|
**office_phone** | **String** | The official phone number (used only with a Business sender) | [optional]
|
|
36
38
|
**vat_registration_number** | **String** | The VAT registration number (used only with a Business sender) | [optional]
|
|
@@ -47,6 +49,10 @@ Name | Type | Description | Notes
|
|
|
47
49
|
**onboarding_status** | **String** | The onboarding status of the sender | [optional]
|
|
48
50
|
**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
51
|
**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]
|
|
52
|
+
**city_of_birth** | **String** | City of birth of sender | [optional]
|
|
53
|
+
**country_of_birth** | **String** | Country of birth of sender in 2-character alpha ISO 3166-2 country format | [optional]
|
|
54
|
+
**gender** | **String** | The gender of the sender: - `M`: Male - `F`: Female - `O`: Other | [optional]
|
|
55
|
+
**created_at** | **String** | Date and time of sender was created | [optional]
|
|
50
56
|
|
|
51
57
|
## Code Sample
|
|
52
58
|
|
|
@@ -67,6 +73,7 @@ instance = TransferZero::Sender.new(id: bf9ff782-e182-45ac-abea-5bce83ad6670,
|
|
|
67
73
|
address_description: null,
|
|
68
74
|
identification_number: AB123456,
|
|
69
75
|
identification_type: ID,
|
|
76
|
+
lang: en,
|
|
70
77
|
name: null,
|
|
71
78
|
first_name: Johnny,
|
|
72
79
|
middle_name: Johnny,
|
|
@@ -74,12 +81,13 @@ instance = TransferZero::Sender.new(id: bf9ff782-e182-45ac-abea-5bce83ad6670,
|
|
|
74
81
|
birth_date: null,
|
|
75
82
|
occupation: Accountant,
|
|
76
83
|
nationality: NG,
|
|
77
|
-
legal_entity_type:
|
|
84
|
+
legal_entity_type: privately_owned_company,
|
|
78
85
|
registration_date: null,
|
|
79
86
|
registration_number: null,
|
|
80
87
|
nature_of_business: null,
|
|
81
88
|
source_of_funds: null,
|
|
82
|
-
|
|
89
|
+
custom_source_of_funds: null,
|
|
90
|
+
core_business_activity: null,
|
|
83
91
|
purpose_of_opening_account: null,
|
|
84
92
|
office_phone: null,
|
|
85
93
|
vat_registration_number: null,
|
|
@@ -95,7 +103,11 @@ instance = TransferZero::Sender.new(id: bf9ff782-e182-45ac-abea-5bce83ad6670,
|
|
|
95
103
|
errors: {"phone_number":[{"error":"invalid"}],"documents":[{"error":"blank"}]},
|
|
96
104
|
onboarding_status: null,
|
|
97
105
|
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"}],
|
|
98
|
-
external_id: 806ec63a-a5a7-43cc-9d75-1ee74fbcc026
|
|
106
|
+
external_id: 806ec63a-a5a7-43cc-9d75-1ee74fbcc026,
|
|
107
|
+
city_of_birth: London,
|
|
108
|
+
country_of_birth: GB,
|
|
109
|
+
gender: M,
|
|
110
|
+
created_at: 2019-01-11T00:00:00.001+0000)
|
|
99
111
|
```
|
|
100
112
|
|
|
101
113
|
|
data/lib/transferzero-sdk.rb
CHANGED
|
@@ -61,16 +61,20 @@ require 'transferzero-sdk/models/payment_method_list_response'
|
|
|
61
61
|
require 'transferzero-sdk/models/payment_method_opposite'
|
|
62
62
|
require 'transferzero-sdk/models/payout_method'
|
|
63
63
|
require 'transferzero-sdk/models/payout_method_bank_account_type_enum'
|
|
64
|
+
require 'transferzero-sdk/models/payout_method_cash_provider_enum'
|
|
64
65
|
require 'transferzero-sdk/models/payout_method_details'
|
|
65
66
|
require 'transferzero-sdk/models/payout_method_details_btc'
|
|
66
67
|
require 'transferzero-sdk/models/payout_method_details_balance'
|
|
68
|
+
require 'transferzero-sdk/models/payout_method_details_gbp_bank'
|
|
67
69
|
require 'transferzero-sdk/models/payout_method_details_ghs_bank'
|
|
68
70
|
require 'transferzero-sdk/models/payout_method_details_iban'
|
|
69
71
|
require 'transferzero-sdk/models/payout_method_details_mad_cash'
|
|
70
72
|
require 'transferzero-sdk/models/payout_method_details_mobile'
|
|
71
73
|
require 'transferzero-sdk/models/payout_method_details_ngn_bank'
|
|
72
74
|
require 'transferzero-sdk/models/payout_method_details_xof_bank'
|
|
75
|
+
require 'transferzero-sdk/models/payout_method_details_xof_cash'
|
|
73
76
|
require 'transferzero-sdk/models/payout_method_details_xof_mobile'
|
|
77
|
+
require 'transferzero-sdk/models/payout_method_details_zar_bank'
|
|
74
78
|
require 'transferzero-sdk/models/payout_method_gender_enum'
|
|
75
79
|
require 'transferzero-sdk/models/payout_method_identity_card_type_enum'
|
|
76
80
|
require 'transferzero-sdk/models/payout_method_list_response'
|
|
@@ -79,11 +83,14 @@ require 'transferzero-sdk/models/payout_method_request'
|
|
|
79
83
|
require 'transferzero-sdk/models/payout_method_response'
|
|
80
84
|
require 'transferzero-sdk/models/payout_method_webhook'
|
|
81
85
|
require 'transferzero-sdk/models/politically_exposed_person'
|
|
86
|
+
require 'transferzero-sdk/models/proof_of_payment'
|
|
87
|
+
require 'transferzero-sdk/models/proof_of_payment_list_response'
|
|
82
88
|
require 'transferzero-sdk/models/recipient'
|
|
83
89
|
require 'transferzero-sdk/models/recipient_list_response'
|
|
84
90
|
require 'transferzero-sdk/models/recipient_request'
|
|
85
91
|
require 'transferzero-sdk/models/recipient_response'
|
|
86
92
|
require 'transferzero-sdk/models/recipient_state'
|
|
93
|
+
require 'transferzero-sdk/models/recipient_state_reason_details'
|
|
87
94
|
require 'transferzero-sdk/models/recipient_webhook'
|
|
88
95
|
require 'transferzero-sdk/models/sender'
|
|
89
96
|
require 'transferzero-sdk/models/sender_list_response'
|
|
@@ -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
|
|
@@ -217,5 +217,59 @@ module TransferZero
|
|
|
217
217
|
end
|
|
218
218
|
return data, status_code, headers
|
|
219
219
|
end
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
# Returns list of proof of payments
|
|
223
|
+
# Returns a list of uploaded proof of payment files for a transaction recipient
|
|
224
|
+
# @param recipient_id ID of the recipient for whom the proof of payments will be returned. Example: `/v1/recipients/9d4d7b73-a94c-4979-ab57-09074fd55d33/proof_of_payments`
|
|
225
|
+
# @param [Hash] opts the optional parameters
|
|
226
|
+
# @return [ProofOfPaymentListResponse]
|
|
227
|
+
def proof_of_payments(recipient_id, opts = {})
|
|
228
|
+
data, _status_code, _headers = proof_of_payments_with_http_info(recipient_id, opts)
|
|
229
|
+
data
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
# Returns list of proof of payments
|
|
233
|
+
# Returns a list of uploaded proof of payment files for a transaction recipient
|
|
234
|
+
# @param recipient_id ID of the recipient for whom the proof of payments will be returned. Example: `/v1/recipients/9d4d7b73-a94c-4979-ab57-09074fd55d33/proof_of_payments`
|
|
235
|
+
# @param [Hash] opts the optional parameters
|
|
236
|
+
# @return [Array<(ProofOfPaymentListResponse, Fixnum, Hash)>] ProofOfPaymentListResponse data, response status code and response headers
|
|
237
|
+
def proof_of_payments_with_http_info(recipient_id, opts = {})
|
|
238
|
+
if @api_client.config.debugging
|
|
239
|
+
@api_client.config.logger.debug 'Calling API: RecipientsApi.proof_of_payments ...'
|
|
240
|
+
end
|
|
241
|
+
# verify the required parameter 'recipient_id' is set
|
|
242
|
+
if @api_client.config.client_side_validation && recipient_id.nil?
|
|
243
|
+
fail ArgumentError, "Missing the required parameter 'recipient_id' when calling RecipientsApi.proof_of_payments"
|
|
244
|
+
end
|
|
245
|
+
# resource path
|
|
246
|
+
local_var_path = '/recipients/{Recipient ID}/proof_of_payments'.sub('{' + 'Recipient ID' + '}', recipient_id.to_s)
|
|
247
|
+
|
|
248
|
+
# query parameters
|
|
249
|
+
query_params = {}
|
|
250
|
+
|
|
251
|
+
# header parameters
|
|
252
|
+
header_params = {}
|
|
253
|
+
# HTTP header 'Accept' (if needed)
|
|
254
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
255
|
+
|
|
256
|
+
# form parameters
|
|
257
|
+
form_params = {}
|
|
258
|
+
|
|
259
|
+
# http body (model)
|
|
260
|
+
post_body = nil
|
|
261
|
+
auth_names = ['AuthorizationKey', 'AuthorizationNonce', 'AuthorizationSecret', 'AuthorizationSignature']
|
|
262
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
263
|
+
:header_params => header_params,
|
|
264
|
+
:query_params => query_params,
|
|
265
|
+
:form_params => form_params,
|
|
266
|
+
:body => post_body,
|
|
267
|
+
:auth_names => auth_names,
|
|
268
|
+
:return_type => 'ProofOfPaymentListResponse')
|
|
269
|
+
if @api_client.config.debugging
|
|
270
|
+
@api_client.config.logger.debug "API called: RecipientsApi#proof_of_payments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
271
|
+
end
|
|
272
|
+
return data, status_code, headers
|
|
273
|
+
end
|
|
220
274
|
end
|
|
221
275
|
end
|
|
@@ -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.10.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
|