transferzero-sdk 1.3.0 → 1.8.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.
Files changed (99) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +15 -18
  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/CurrencyOpposite.md +1 -1
  9. data/docs/Document.md +5 -1
  10. data/docs/DocumentsApi.md +74 -2
  11. data/docs/FieldSelectValidation.md +1 -1
  12. data/docs/FieldValidation.md +1 -1
  13. data/docs/PayinMethod.md +4 -4
  14. data/docs/PayinMethodDetails.md +5 -3
  15. data/docs/PayinMethodDetailsMobile.md +1 -1
  16. data/docs/PayinMethodDetailsNGNBank.md +4 -2
  17. data/docs/PaymentMethod.md +2 -2
  18. data/docs/PaymentMethodOpposite.md +2 -2
  19. data/docs/PayoutMethod.md +1 -1
  20. data/docs/PayoutMethodDetails.md +5 -3
  21. data/docs/PayoutMethodDetailsNGNBank.md +1 -1
  22. data/docs/PayoutMethodDetailsXOFBank.md +25 -0
  23. data/docs/PoliticallyExposedPerson.md +31 -0
  24. data/docs/Recipient.md +3 -3
  25. data/docs/RecipientsApi.md +2 -2
  26. data/docs/Sender.md +2 -0
  27. data/docs/Transaction.md +5 -5
  28. data/docs/TransactionTraits.md +2 -2
  29. data/docs/TransactionsApi.md +64 -0
  30. data/example/client.rb +14 -14
  31. data/git_push.sh +1 -1
  32. data/lib/transferzero-sdk.rb +2 -7
  33. data/lib/transferzero-sdk/api/account_validation_api.rb +4 -4
  34. data/lib/transferzero-sdk/api/documents_api.rb +63 -0
  35. data/lib/transferzero-sdk/api/recipients_api.rb +2 -2
  36. data/lib/transferzero-sdk/api/transactions_api.rb +59 -0
  37. data/lib/transferzero-sdk/api_client.rb +1 -1
  38. data/lib/transferzero-sdk/models/account_validation_request.rb +15 -15
  39. data/lib/transferzero-sdk/models/currency_exchange.rb +1 -2
  40. data/lib/transferzero-sdk/models/currency_opposite.rb +1 -2
  41. data/lib/transferzero-sdk/models/document.rb +20 -1
  42. data/lib/transferzero-sdk/models/document_webhook.rb +0 -1
  43. data/lib/transferzero-sdk/models/payin_method.rb +4 -4
  44. data/lib/transferzero-sdk/models/payin_method_details.rb +12 -7
  45. data/lib/transferzero-sdk/models/payin_method_details_ngn_bank.rb +11 -6
  46. data/lib/transferzero-sdk/models/payout_method.rb +1 -1
  47. data/lib/transferzero-sdk/models/payout_method_details.rb +25 -15
  48. data/lib/transferzero-sdk/models/payout_method_details_ngn_bank.rb +0 -5
  49. data/lib/transferzero-sdk/models/{currency_opposite_all_of.rb → payout_method_details_xof_bank.rb} +69 -18
  50. data/lib/transferzero-sdk/models/payout_method_webhook.rb +0 -1
  51. data/lib/transferzero-sdk/models/{payout_method_webhook_all_of.rb → politically_exposed_person.rb} +81 -10
  52. data/lib/transferzero-sdk/models/recipient_webhook.rb +0 -1
  53. data/lib/transferzero-sdk/models/sender.rb +14 -2
  54. data/lib/transferzero-sdk/models/sender_state.rb +1 -0
  55. data/lib/transferzero-sdk/models/sender_webhook.rb +0 -1
  56. data/lib/transferzero-sdk/models/transaction.rb +2 -2
  57. data/lib/transferzero-sdk/models/transaction_state.rb +1 -0
  58. data/lib/transferzero-sdk/models/transaction_traits.rb +3 -3
  59. data/lib/transferzero-sdk/models/transaction_webhook.rb +0 -1
  60. data/lib/transferzero-sdk/models/webhook.rb +1 -1
  61. data/lib/transferzero-sdk/version.rb +1 -1
  62. data/spec/api/account_validation_api_spec.rb +2 -2
  63. data/spec/api/currency_info_api_spec.rb +2 -0
  64. data/spec/api/documents_api_spec.rb +15 -0
  65. data/spec/api/recipients_api_spec.rb +1 -1
  66. data/spec/api/transactions_api_spec.rb +13 -0
  67. data/spec/models/account_validation_request_spec.rb +7 -1
  68. data/spec/models/currency_opposite_spec.rb +6 -0
  69. data/spec/models/document_spec.rb +12 -0
  70. data/spec/models/payin_method_details_ngn_bank_spec.rb +6 -0
  71. data/spec/models/payin_method_details_spec.rb +6 -0
  72. data/spec/models/payout_method_details_spec.rb +7 -1
  73. data/spec/models/payout_method_details_xof_bank_spec.rb +65 -0
  74. data/spec/models/politically_exposed_person_spec.rb +83 -0
  75. data/spec/models/recipient_spec.rb +6 -0
  76. data/spec/models/sender_spec.rb +16 -0
  77. data/transferzero-sdk.gemspec +2 -2
  78. metadata +17 -46
  79. data/Gemfile.lock +0 -93
  80. data/docs/CurrencyExchangeAllOf.md +0 -17
  81. data/docs/CurrencyOppositeAllOf.md +0 -19
  82. data/docs/DocumentWebhookAllOf.md +0 -17
  83. data/docs/PayoutMethodWebhookAllOf.md +0 -17
  84. data/docs/RecipientWebhookAllOf.md +0 -17
  85. data/docs/SenderWebhookAllOf.md +0 -17
  86. data/docs/TransactionWebhookAllOf.md +0 -17
  87. data/lib/transferzero-sdk/models/currency_exchange_all_of.rb +0 -204
  88. data/lib/transferzero-sdk/models/document_webhook_all_of.rb +0 -201
  89. data/lib/transferzero-sdk/models/recipient_webhook_all_of.rb +0 -201
  90. data/lib/transferzero-sdk/models/sender_webhook_all_of.rb +0 -201
  91. data/lib/transferzero-sdk/models/transaction_webhook_all_of.rb +0 -201
  92. data/spec/api_client_spec.rb +0 -189
  93. data/spec/models/currency_exchange_all_of_spec.rb +0 -41
  94. data/spec/models/currency_opposite_all_of_spec.rb +0 -41
  95. data/spec/models/document_webhook_all_of_spec.rb +0 -41
  96. data/spec/models/payout_method_webhook_all_of_spec.rb +0 -41
  97. data/spec/models/recipient_webhook_all_of_spec.rb +0 -41
  98. data/spec/models/sender_webhook_all_of_spec.rb +0 -41
  99. data/spec/models/transaction_webhook_all_of_spec.rb +0 -41
@@ -4,14 +4,16 @@
4
4
 
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
- **redirect_url** | **String** | This is where the user should be redirected back when the payment has been finished |
7
+ **payment_method** | **String** | The payment method which the user will use to make the payments. Options are `bank`, `card` or you can leave empty to support both. | [optional]
8
+ **redirect_url** | **String** | This is where the user should be redirected back when the payment has been finished | [optional]
8
9
 
9
10
  ## Code Sample
10
11
 
11
12
  ```ruby
12
13
  require 'TransferZero'
13
14
 
14
- instance = TransferZero::PayinMethodDetailsNGNBank.new(redirect_url: null)
15
+ instance = TransferZero::PayinMethodDetailsNGNBank.new(payment_method: null,
16
+ redirect_url: null)
15
17
  ```
16
18
 
17
19
 
@@ -18,9 +18,9 @@ require 'TransferZero'
18
18
 
19
19
  instance = TransferZero::PaymentMethod.new(type: NGN::Bank,
20
20
  provider: Interswitch,
21
- otc_permitted: false,
21
+ otc_permitted: null,
22
22
  details: ["email","first_name","last_name","address"],
23
- default: false,
23
+ default: null,
24
24
  fields: {"email":{"type":"input","validations":{"inclusion":{"in":{"NI":"National Id","PP":"Passport"},"allow_blank":true}}}})
25
25
  ```
26
26
 
@@ -19,9 +19,9 @@ require 'TransferZero'
19
19
 
20
20
  instance = TransferZero::PaymentMethodOpposite.new(type: NGN::Bank,
21
21
  provider: Interswitch,
22
- otc_permitted: false,
22
+ otc_permitted: null,
23
23
  details: ["email","first_name","last_name","address"],
24
- default: false,
24
+ default: null,
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. - `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://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,12 @@ 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** | |
16
17
  **bic** | **String** | | [optional]
17
18
  **sender_identity_card_type** | [**PayoutMethodIdentityCardTypeEnum**](PayoutMethodIdentityCardTypeEnum.md) | |
18
19
  **sender_identity_card_id** | **String** | |
@@ -36,8 +37,9 @@ instance = TransferZero::PayoutMethodDetails.new(first_name: null,
36
37
  bank_account_type: null,
37
38
  phone_number: null,
38
39
  mobile_provider: null,
39
- bank_name: null,
40
40
  iban: null,
41
+ bank_name: null,
42
+ bank_country: null,
41
43
  bic: null,
42
44
  sender_identity_card_type: null,
43
45
  sender_identity_card_id: null,
@@ -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
+
@@ -36,10 +36,10 @@ instance = TransferZero::Recipient.new(requested_amount: 750.0,
36
36
  payout_method: null,
37
37
  metadata: {},
38
38
  created_at: null,
39
- editable: true,
40
- retriable: true,
39
+ editable: null,
40
+ retriable: null,
41
41
  input_usd_amount: 10,
42
- may_cancel: true,
42
+ may_cancel: null,
43
43
  state_reason: null,
44
44
  state: null,
45
45
  transaction_id: 97e79719-06e4-4794-aeeb-d2d9415d983a,
@@ -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
@@ -27,6 +27,7 @@ Name | Type | Description | Notes
27
27
  **identification_number** | **String** | Identification number of document used | [optional]
28
28
  **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]
29
29
  **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; |
30
+ **politically_exposed_people** | [**Array&lt;PoliticallyExposedPerson&gt;**](PoliticallyExposedPerson.md) | A 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;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; } &#x60;&#x60;&#x60; | [optional]
30
31
  **metadata** | [**Object**](.md) | Metadata of sender. You can store any detail specific to your integration here (for example the local ID of the sender on your end). When requesting sender details you will receive the sent metadata back. Also when sending sender related webhooks you will receive the details stored here as well. | [optional]
31
32
  **state** | [**SenderState**](SenderState.md) | | [optional]
32
33
  **id** | **String** | | [optional]
@@ -61,6 +62,7 @@ instance = TransferZero::Sender.new(type: person,
61
62
  identification_number: AB123456,
62
63
  identification_type: ID,
63
64
  documents: [{&quot;id&quot;:&quot;b6648ba3-1c7b-4f59-8580-684899c84a07&quot;}],
65
+ 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;}],
64
66
  metadata: {},
65
67
  state: null,
66
68
  id: bf9ff782-e182-45ac-abea-5bce83ad6670,
@@ -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
 
@@ -15,7 +15,7 @@ credentials = {
15
15
  host: "https://api-sandbox.transferzero.com/v1"
16
16
  }
17
17
 
18
- # Please see our documentation at https://github.com/transferzero/api-documentation
18
+ # Please see our documentation at https://docs.transferzero.com
19
19
  # and the API specification at http://api.transferzero.com/documentation/
20
20
  # for more information.
21
21
 
@@ -39,7 +39,7 @@ class Client
39
39
  end
40
40
 
41
41
  def account_validation_example
42
- # See https://github.com/transferzero/api-documentation/blob/master/additional-features.md#bank-account-name-enquiry
42
+ # See https://docs.transferzero.com/docs/additional-features/#bank-account-name-enquiry
43
43
  # for more information on how this feature can be used
44
44
  begin
45
45
  request = TransferZero::AccountValidationRequest.new
@@ -63,7 +63,7 @@ class Client
63
63
  end
64
64
 
65
65
  def create_sender_example
66
- # For more details on senders please check https://github.com/transferzero/api-documentation/blob/master/transaction-flow.md#sender
66
+ # For more details on senders please check https://docs.transferzero.com/docs/transaction-flow/#sender
67
67
  begin
68
68
  api = TransferZero::SendersApi.new
69
69
  sender = TransferZero::Sender.new
@@ -98,7 +98,7 @@ class Client
98
98
  end
99
99
 
100
100
  def get_sender_by_external_id_example
101
- # Find more details on external IDs at https://github.com/transferzero/api-documentation/blob/master/transaction-flow.md#external-id
101
+ # Find more details on external IDs at https://docs.transferzero.com/docs/transaction-flow/#external-id
102
102
  begin
103
103
  opts = { external_id: 'SENDER-2b59def0' }
104
104
  sender = TransferZero::SendersApi.new
@@ -113,7 +113,7 @@ class Client
113
113
  end
114
114
 
115
115
  def update_sender_example
116
- # For more details on senders please check https://github.com/transferzero/api-documentation/blob/master/transaction-flow.md#sender
116
+ # For more details on senders please check https://docs.transferzero.com/docs/transaction-flow/#sender
117
117
  begin
118
118
  api = TransferZero::SendersApi.new
119
119
  sender = TransferZero::Sender.new
@@ -135,15 +135,15 @@ class Client
135
135
  begin
136
136
  api = TransferZero::TransactionsApi.new
137
137
  transaction = TransferZero::Transaction.new
138
- # Please check our documentation at https://github.com/transferzero/api-documentation/blob/master/transaction-flow.md
138
+ # Please check our documentation at https://docs.transferzero.com/docs/transaction-flow/
139
139
  # for details on how transactions work.
140
140
 
141
141
  sender = TransferZero::Sender.new
142
142
  # When adding a sender to transaction, please use either an id or external_id. Providing both will result in a validation error.
143
- # Please see our documentation at https://github.com/transferzero/api-documentation/blob/master/transaction-flow.md#sender
143
+ # Please see our documentation at https://docs.transferzero.com/docs/transaction-flow/#sender
144
144
  sender.id = 'ec33484c-4456-4625-a823-9704a3a54e68'
145
145
 
146
- # You can find the various payout options at https://github.com/transferzero/api-documentation/blob/master/transaction-flow.md#payout-details
146
+ # You can find the various payout options at https://docs.transferzero.com/docs/transaction-flow/#payout-details
147
147
  ngn_bank_details = TransferZero::PayoutMethodDetails.new
148
148
  ngn_bank_details.bank_account = '123456789'
149
149
  ngn_bank_details.bank_account_type = TransferZero::PayoutMethodBankAccountTypeEnum::N20
@@ -155,17 +155,17 @@ class Client
155
155
  payout_method.type = 'NGN::Bank'
156
156
  payout_method.details = ngn_bank_details
157
157
 
158
- # Please see https://github.com/transferzero/api-documentation/blob/master/transaction-flow.md#requested-amount-and-currency
158
+ # Please see https://docs.transferzero.com/docs/transaction-flow/#requested-amount-and-currency
159
159
  # on what the request amount and currencies do
160
160
  recipient = TransferZero::Recipient.new
161
161
  recipient.requested_amount = 10000
162
162
  recipient.requested_currency = 'NGN'
163
163
  recipient.payout_method = payout_method
164
164
 
165
- # Similarly you can check https://github.com/transferzero/api-documentation/blob/master/transaction-flow.md#requested-amount-and-currency
165
+ # Similarly you can check https://docs.transferzero.com/docs/transaction-flow/#requested-amount-and-currency
166
166
  # on details about the input currency parameter
167
167
 
168
- # Find more details on external IDs at https://github.com/transferzero/api-documentation/blob/master/transaction-flow.md#external-id
168
+ # Find more details on external IDs at https://docs.transferzero.com/docs/transaction-flow/#external-id
169
169
  transaction.external_id = 'TRANSACTION-1f834add' # Optional field for customer's ID
170
170
  transaction.input_currency = 'GBP'
171
171
  transaction.sender = sender
@@ -188,7 +188,7 @@ class Client
188
188
  end
189
189
 
190
190
  def get_transaction_by_external_id_example
191
- # Please see https://github.com/transferzero/api-documentation/blob/master/transaction-flow.md#external-id
191
+ # Please see https://docs.transferzero.com/docs/transaction-flow/#external-id
192
192
  # for more details on external IDs
193
193
  begin
194
194
  opts = { external_id: 'TRANSACTION-1f834add' }
@@ -208,7 +208,7 @@ class Client
208
208
  if transaction_id.nil?
209
209
  puts "Transaction with ID #{transaction_id} does not exist"
210
210
  else
211
- # Please see https://github.com/transferzero/api-documentation/blob/master/transaction-flow.md#funding-transactions
211
+ # Please see https://docs.transferzero.com/docs/transaction-flow/#funding-transactions
212
212
  # on details about funding transactions
213
213
  debit = TransferZero::Debit.new
214
214
  debit.currency = 'GBP'
@@ -235,7 +235,7 @@ class Client
235
235
  end
236
236
 
237
237
  def webhook_parse_example
238
- # Please see https://github.com/transferzero/api-documentation#webhooks
238
+ # Please see https://docs.transferzero.com#webhooks
239
239
  # for more details about how webhooks / callbacks work from our system
240
240
  headers = {
241
241
  "Authorization-Nonce": "<authorization-nonce>",
@@ -16,7 +16,7 @@ if [ "$git_user_id" = "" ]; then
16
16
  fi
17
17
 
18
18
  if [ "$git_repo_id" = "" ]; then
19
- git_repo_id="transferzero-ruby-sdk"
19
+ git_repo_id="transferzero-sdk-ruby"
20
20
  echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
21
21
  fi
22
22