transferzero-sdk 1.3.0 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +15 -18
- data/docs/AccountMeta.md +1 -1
- data/docs/AccountValidationApi.md +4 -4
- data/docs/AccountValidationRequest.md +6 -4
- data/docs/Currency.md +1 -1
- data/docs/CurrencyExchange.md +1 -1
- data/docs/CurrencyOpposite.md +1 -1
- data/docs/Document.md +5 -1
- data/docs/DocumentsApi.md +74 -2
- data/docs/FieldSelectValidation.md +1 -1
- data/docs/FieldValidation.md +1 -1
- data/docs/PayinMethod.md +4 -4
- data/docs/PayinMethodDetails.md +5 -3
- data/docs/PayinMethodDetailsMobile.md +1 -1
- data/docs/PayinMethodDetailsNGNBank.md +4 -2
- data/docs/PaymentMethod.md +2 -2
- data/docs/PaymentMethodOpposite.md +2 -2
- data/docs/PayoutMethod.md +1 -1
- data/docs/PayoutMethodDetails.md +5 -3
- data/docs/PayoutMethodDetailsNGNBank.md +1 -1
- data/docs/PayoutMethodDetailsXOFBank.md +25 -0
- data/docs/PoliticallyExposedPerson.md +31 -0
- data/docs/Recipient.md +3 -3
- data/docs/RecipientsApi.md +2 -2
- data/docs/Sender.md +2 -0
- data/docs/Transaction.md +5 -5
- data/docs/TransactionTraits.md +2 -2
- data/docs/TransactionsApi.md +64 -0
- data/example/client.rb +14 -14
- data/git_push.sh +1 -1
- data/lib/transferzero-sdk.rb +2 -7
- data/lib/transferzero-sdk/api/account_validation_api.rb +4 -4
- data/lib/transferzero-sdk/api/documents_api.rb +63 -0
- data/lib/transferzero-sdk/api/recipients_api.rb +2 -2
- data/lib/transferzero-sdk/api/transactions_api.rb +59 -0
- data/lib/transferzero-sdk/api_client.rb +1 -1
- data/lib/transferzero-sdk/models/account_validation_request.rb +15 -15
- data/lib/transferzero-sdk/models/currency_exchange.rb +1 -2
- data/lib/transferzero-sdk/models/currency_opposite.rb +1 -2
- data/lib/transferzero-sdk/models/document.rb +20 -1
- data/lib/transferzero-sdk/models/document_webhook.rb +0 -1
- data/lib/transferzero-sdk/models/payin_method.rb +4 -4
- data/lib/transferzero-sdk/models/payin_method_details.rb +12 -7
- data/lib/transferzero-sdk/models/payin_method_details_ngn_bank.rb +11 -6
- data/lib/transferzero-sdk/models/payout_method.rb +1 -1
- data/lib/transferzero-sdk/models/payout_method_details.rb +25 -15
- data/lib/transferzero-sdk/models/payout_method_details_ngn_bank.rb +0 -5
- data/lib/transferzero-sdk/models/{currency_opposite_all_of.rb → payout_method_details_xof_bank.rb} +69 -18
- data/lib/transferzero-sdk/models/payout_method_webhook.rb +0 -1
- data/lib/transferzero-sdk/models/{payout_method_webhook_all_of.rb → politically_exposed_person.rb} +81 -10
- data/lib/transferzero-sdk/models/recipient_webhook.rb +0 -1
- data/lib/transferzero-sdk/models/sender.rb +14 -2
- data/lib/transferzero-sdk/models/sender_state.rb +1 -0
- data/lib/transferzero-sdk/models/sender_webhook.rb +0 -1
- data/lib/transferzero-sdk/models/transaction.rb +2 -2
- data/lib/transferzero-sdk/models/transaction_state.rb +1 -0
- data/lib/transferzero-sdk/models/transaction_traits.rb +3 -3
- data/lib/transferzero-sdk/models/transaction_webhook.rb +0 -1
- data/lib/transferzero-sdk/models/webhook.rb +1 -1
- data/lib/transferzero-sdk/version.rb +1 -1
- data/spec/api/account_validation_api_spec.rb +2 -2
- data/spec/api/currency_info_api_spec.rb +2 -0
- data/spec/api/documents_api_spec.rb +15 -0
- data/spec/api/recipients_api_spec.rb +1 -1
- data/spec/api/transactions_api_spec.rb +13 -0
- data/spec/models/account_validation_request_spec.rb +7 -1
- data/spec/models/currency_opposite_spec.rb +6 -0
- data/spec/models/document_spec.rb +12 -0
- data/spec/models/payin_method_details_ngn_bank_spec.rb +6 -0
- data/spec/models/payin_method_details_spec.rb +6 -0
- data/spec/models/payout_method_details_spec.rb +7 -1
- data/spec/models/payout_method_details_xof_bank_spec.rb +65 -0
- data/spec/models/politically_exposed_person_spec.rb +83 -0
- data/spec/models/recipient_spec.rb +6 -0
- data/spec/models/sender_spec.rb +16 -0
- data/transferzero-sdk.gemspec +2 -2
- metadata +17 -46
- data/Gemfile.lock +0 -93
- data/docs/CurrencyExchangeAllOf.md +0 -17
- data/docs/CurrencyOppositeAllOf.md +0 -19
- data/docs/DocumentWebhookAllOf.md +0 -17
- data/docs/PayoutMethodWebhookAllOf.md +0 -17
- data/docs/RecipientWebhookAllOf.md +0 -17
- data/docs/SenderWebhookAllOf.md +0 -17
- data/docs/TransactionWebhookAllOf.md +0 -17
- data/lib/transferzero-sdk/models/currency_exchange_all_of.rb +0 -204
- data/lib/transferzero-sdk/models/document_webhook_all_of.rb +0 -201
- data/lib/transferzero-sdk/models/recipient_webhook_all_of.rb +0 -201
- data/lib/transferzero-sdk/models/sender_webhook_all_of.rb +0 -201
- data/lib/transferzero-sdk/models/transaction_webhook_all_of.rb +0 -201
- data/spec/api_client_spec.rb +0 -189
- data/spec/models/currency_exchange_all_of_spec.rb +0 -41
- data/spec/models/currency_opposite_all_of_spec.rb +0 -41
- data/spec/models/document_webhook_all_of_spec.rb +0 -41
- data/spec/models/payout_method_webhook_all_of_spec.rb +0 -41
- data/spec/models/recipient_webhook_all_of_spec.rb +0 -41
- data/spec/models/sender_webhook_all_of_spec.rb +0 -41
- data/spec/models/transaction_webhook_all_of_spec.rb +0 -41
data/lib/transferzero-sdk/models/{payout_method_webhook_all_of.rb → politically_exposed_person.rb}
RENAMED
@@ -13,20 +13,56 @@ OpenAPI Generator version: 4.0.0-beta3
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module TransferZero
|
16
|
-
|
17
|
-
|
16
|
+
# 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 { \"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\" } ```
|
17
|
+
class PoliticallyExposedPerson
|
18
|
+
attr_accessor :id
|
19
|
+
|
20
|
+
# Full name of the politically exposed person
|
21
|
+
attr_accessor :name
|
22
|
+
|
23
|
+
# The office held by the politically exposed person
|
24
|
+
attr_accessor :position
|
25
|
+
|
26
|
+
# The date on which the person started holding the office
|
27
|
+
attr_accessor :started_date
|
28
|
+
|
29
|
+
# The date on which the person ended holding the office
|
30
|
+
attr_accessor :ended_date
|
31
|
+
|
32
|
+
# The ID of the Sender to whom the person is attached to
|
33
|
+
attr_accessor :sender_id
|
34
|
+
|
35
|
+
# Date and time the person was created
|
36
|
+
attr_accessor :created_at
|
37
|
+
|
38
|
+
# Date and time the person was updated
|
39
|
+
attr_accessor :updated_at
|
18
40
|
|
19
41
|
# Attribute mapping from ruby-style variable name to JSON key.
|
20
42
|
def self.attribute_map
|
21
43
|
{
|
22
|
-
:'
|
44
|
+
:'id' => :'id',
|
45
|
+
:'name' => :'name',
|
46
|
+
:'position' => :'position',
|
47
|
+
:'started_date' => :'started_date',
|
48
|
+
:'ended_date' => :'ended_date',
|
49
|
+
:'sender_id' => :'sender_id',
|
50
|
+
:'created_at' => :'created_at',
|
51
|
+
:'updated_at' => :'updated_at'
|
23
52
|
}
|
24
53
|
end
|
25
54
|
|
26
55
|
# Attribute type mapping.
|
27
56
|
def self.openapi_types
|
28
57
|
{
|
29
|
-
:'
|
58
|
+
:'id' => :'Integer',
|
59
|
+
:'name' => :'String',
|
60
|
+
:'position' => :'String',
|
61
|
+
:'started_date' => :'DateTime',
|
62
|
+
:'ended_date' => :'DateTime',
|
63
|
+
:'sender_id' => :'String',
|
64
|
+
:'created_at' => :'DateTime',
|
65
|
+
:'updated_at' => :'DateTime'
|
30
66
|
}
|
31
67
|
end
|
32
68
|
|
@@ -34,19 +70,47 @@ module TransferZero
|
|
34
70
|
# @param [Hash] attributes Model attributes in the form of hash
|
35
71
|
def initialize(attributes = {})
|
36
72
|
if (!attributes.is_a?(Hash))
|
37
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::
|
73
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::PoliticallyExposedPerson` initialize method"
|
38
74
|
end
|
39
75
|
|
40
76
|
# check to see if the attribute exists and convert string to symbol for hash key
|
41
77
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
42
78
|
if (!self.class.attribute_map.key?(k.to_sym))
|
43
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::
|
79
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::PoliticallyExposedPerson`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
44
80
|
end
|
45
81
|
h[k.to_sym] = v
|
46
82
|
}
|
47
83
|
|
48
|
-
if attributes.key?(:'
|
49
|
-
self.
|
84
|
+
if attributes.key?(:'id')
|
85
|
+
self.id = attributes[:'id']
|
86
|
+
end
|
87
|
+
|
88
|
+
if attributes.key?(:'name')
|
89
|
+
self.name = attributes[:'name']
|
90
|
+
end
|
91
|
+
|
92
|
+
if attributes.key?(:'position')
|
93
|
+
self.position = attributes[:'position']
|
94
|
+
end
|
95
|
+
|
96
|
+
if attributes.key?(:'started_date')
|
97
|
+
self.started_date = attributes[:'started_date']
|
98
|
+
end
|
99
|
+
|
100
|
+
if attributes.key?(:'ended_date')
|
101
|
+
self.ended_date = attributes[:'ended_date']
|
102
|
+
end
|
103
|
+
|
104
|
+
if attributes.key?(:'sender_id')
|
105
|
+
self.sender_id = attributes[:'sender_id']
|
106
|
+
end
|
107
|
+
|
108
|
+
if attributes.key?(:'created_at')
|
109
|
+
self.created_at = attributes[:'created_at']
|
110
|
+
end
|
111
|
+
|
112
|
+
if attributes.key?(:'updated_at')
|
113
|
+
self.updated_at = attributes[:'updated_at']
|
50
114
|
end
|
51
115
|
end
|
52
116
|
|
@@ -68,7 +132,14 @@ module TransferZero
|
|
68
132
|
def ==(o)
|
69
133
|
return true if self.equal?(o)
|
70
134
|
self.class == o.class &&
|
71
|
-
|
135
|
+
id == o.id &&
|
136
|
+
name == o.name &&
|
137
|
+
position == o.position &&
|
138
|
+
started_date == o.started_date &&
|
139
|
+
ended_date == o.ended_date &&
|
140
|
+
sender_id == o.sender_id &&
|
141
|
+
created_at == o.created_at &&
|
142
|
+
updated_at == o.updated_at
|
72
143
|
end
|
73
144
|
|
74
145
|
# @see the `==` method
|
@@ -80,7 +151,7 @@ module TransferZero
|
|
80
151
|
# Calculates hash code according to all attributes.
|
81
152
|
# @return [Integer] Hash code
|
82
153
|
def hash
|
83
|
-
[
|
154
|
+
[id, name, position, started_date, ended_date, sender_id, created_at, updated_at].hash
|
84
155
|
end
|
85
156
|
|
86
157
|
require 'active_support/core_ext/hash'
|
@@ -13,7 +13,7 @@ OpenAPI Generator version: 4.0.0-beta3
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module TransferZero
|
16
|
-
# This contains the details of the sender. The first time a specific sender is used the full details should be provided. Once a sender is created and is used, the next time you MUST only send the ID of the sender. This is so we can match the same sender across multiple transactions for KYC and audit purposes. Personal Sender Example: ```json { \"country\": \"UG\", \"phone_country\": \"UG\", \"phone_number\": \"752403639\", \"email\": \"example@home.org\", \"first_name\": \"Johnny\", \"last_name\": \"English\", \"city\": \"Kampala\", \"street\": \"Unknown 17-3\", \"address_description\": \"Description of address\", \"postal_code\": \"798983\", \"birth_date\": \"1900-12-31\", \"documents\": [ ], \"ip\": \"127.0.0.1\", \"identification_number\": \"AB123456\", \"identification_type\": \"ID\", \"external_id\": \"806ec63a-a5a7-43cc-9d75-1ee74fbcc026\", \"metadata\": { } } ``` Business Sender Example: ```json { \"type\": \"business\", \"country\": \"UG\", \"phone_country\": \"UG\", \"phone_number\": \"752403639\", \"email\": \"example@home.org\", \"name\": \"MyCompany\", \"city\": \"Kampala\", \"street\": \"Unknown 17-3\", \"postal_code\": \"798983\", \"address_description\": \"Description of address\", \"documents\": [ ], \"ip\": \"127.0.0.1\", \"identification_number\": \"AB123456\", \"identification_type\": \"ID\", \"external_id\": \"806ec63a-a5a7-43cc-9d75-1ee74fbcc026\", \"metadata\": { } } ``` [Sender in the API documentation](https://
|
16
|
+
# This contains the details of the sender. The first time a specific sender is used the full details should be provided. Once a sender is created and is used, the next time you MUST only send the ID of the sender. This is so we can match the same sender across multiple transactions for KYC and audit purposes. Personal Sender Example: ```json { \"country\": \"UG\", \"phone_country\": \"UG\", \"phone_number\": \"752403639\", \"email\": \"example@home.org\", \"first_name\": \"Johnny\", \"last_name\": \"English\", \"city\": \"Kampala\", \"street\": \"Unknown 17-3\", \"address_description\": \"Description of address\", \"postal_code\": \"798983\", \"birth_date\": \"1900-12-31\", \"documents\": [ ], \"ip\": \"127.0.0.1\", \"identification_number\": \"AB123456\", \"identification_type\": \"ID\", \"external_id\": \"806ec63a-a5a7-43cc-9d75-1ee74fbcc026\", \"metadata\": { } } ``` Business Sender Example: ```json { \"type\": \"business\", \"country\": \"UG\", \"phone_country\": \"UG\", \"phone_number\": \"752403639\", \"email\": \"example@home.org\", \"name\": \"MyCompany\", \"city\": \"Kampala\", \"street\": \"Unknown 17-3\", \"postal_code\": \"798983\", \"address_description\": \"Description of address\", \"documents\": [ ], \"ip\": \"127.0.0.1\", \"identification_number\": \"AB123456\", \"identification_type\": \"ID\", \"external_id\": \"806ec63a-a5a7-43cc-9d75-1ee74fbcc026\", \"metadata\": { } } ``` [Sender in the API documentation](https://docs.transferzero.com/docs/transaction-flow/#sender)
|
17
17
|
class Sender
|
18
18
|
# Type of sender to create - either person or business (defaults to person)
|
19
19
|
attr_accessor :type
|
@@ -84,6 +84,9 @@ module TransferZero
|
|
84
84
|
# Needed for KYC checks. Required to approve the sender unless KYC is waived for your account. Please send us an empty list of documents: `\"documents\": [ ]` in the request if KYC has been waived. If the documents already exist, please send the Document ID eg. ```JSON \"documents\": [ { \"id\": \"b6648ba3-1c7b-4f59-8580-684899c84a07\" } ] ```
|
85
85
|
attr_accessor :documents
|
86
86
|
|
87
|
+
# 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: ```json { \"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\" } ```
|
88
|
+
attr_accessor :politically_exposed_people
|
89
|
+
|
87
90
|
# 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.
|
88
91
|
attr_accessor :metadata
|
89
92
|
|
@@ -145,6 +148,7 @@ module TransferZero
|
|
145
148
|
:'identification_number' => :'identification_number',
|
146
149
|
:'identification_type' => :'identification_type',
|
147
150
|
:'documents' => :'documents',
|
151
|
+
:'politically_exposed_people' => :'politically_exposed_people',
|
148
152
|
:'metadata' => :'metadata',
|
149
153
|
:'state' => :'state',
|
150
154
|
:'id' => :'id',
|
@@ -179,6 +183,7 @@ module TransferZero
|
|
179
183
|
:'identification_number' => :'String',
|
180
184
|
:'identification_type' => :'String',
|
181
185
|
:'documents' => :'Array<Document>',
|
186
|
+
:'politically_exposed_people' => :'Array<PoliticallyExposedPerson>',
|
182
187
|
:'metadata' => :'Object',
|
183
188
|
:'state' => :'SenderState',
|
184
189
|
:'id' => :'String',
|
@@ -296,6 +301,12 @@ module TransferZero
|
|
296
301
|
end
|
297
302
|
end
|
298
303
|
|
304
|
+
if attributes.key?(:'politically_exposed_people')
|
305
|
+
if (value = attributes[:'politically_exposed_people']).is_a?(Array)
|
306
|
+
self.politically_exposed_people = value
|
307
|
+
end
|
308
|
+
end
|
309
|
+
|
299
310
|
if attributes.key?(:'metadata')
|
300
311
|
self.metadata = attributes[:'metadata']
|
301
312
|
end
|
@@ -424,6 +435,7 @@ module TransferZero
|
|
424
435
|
identification_number == o.identification_number &&
|
425
436
|
identification_type == o.identification_type &&
|
426
437
|
documents == o.documents &&
|
438
|
+
politically_exposed_people == o.politically_exposed_people &&
|
427
439
|
metadata == o.metadata &&
|
428
440
|
state == o.state &&
|
429
441
|
id == o.id &&
|
@@ -440,7 +452,7 @@ module TransferZero
|
|
440
452
|
# Calculates hash code according to all attributes.
|
441
453
|
# @return [Integer] Hash code
|
442
454
|
def hash
|
443
|
-
[type, country, phone_country, phone_number, email, first_name, middle_name, last_name, occupation, nationality, onboarding_status, address, description, name, city, street, address_description, postal_code, birth_date, ip, identification_number, identification_type, documents, metadata, state, id, external_id, errors].hash
|
455
|
+
[type, country, phone_country, phone_number, email, first_name, middle_name, last_name, occupation, nationality, onboarding_status, address, description, name, city, street, address_description, postal_code, birth_date, ip, identification_number, identification_type, documents, politically_exposed_people, metadata, state, id, external_id, errors].hash
|
444
456
|
end
|
445
457
|
|
446
458
|
require 'active_support/core_ext/hash'
|
@@ -18,7 +18,7 @@ module TransferZero
|
|
18
18
|
# 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.
|
19
19
|
attr_accessor :input_currency
|
20
20
|
|
21
|
-
# 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://
|
21
|
+
# 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
|
22
22
|
attr_accessor :payin_methods
|
23
23
|
|
24
24
|
# Additional metadata to store on the transaction. If you widh to store your local transaction ID, you should add it here inside a `sendRef` field, and we will return this value back to you in the daily transaction reports.
|
@@ -51,7 +51,7 @@ module TransferZero
|
|
51
51
|
# The latest time when the transaction has to be funded, otherwise it will be cancelled
|
52
52
|
attr_accessor :expires_at
|
53
53
|
|
54
|
-
# Optional ID that is supplied by partner linking it to the partner's own
|
54
|
+
# Optional ID that is supplied by partner linking it to the partner's own Transaction ID. Note: if present we will validate whether the sent ID is a duplicate in our system or not.
|
55
55
|
attr_accessor :external_id
|
56
56
|
|
57
57
|
attr_accessor :id
|
@@ -13,12 +13,12 @@ OpenAPI Generator version: 4.0.0-beta3
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module TransferZero
|
16
|
-
# Additional features that are enabled on the transaction. For more details please see [Additional features](https://
|
16
|
+
# Additional features that are enabled on the transaction. For more details please see [Additional features](https://docs.transferzero.com/docs/additional-features/) in our API documentation
|
17
17
|
class TransactionTraits
|
18
|
-
# Enables or disables the auto refund functionality. Please see [Auto cancellation and refund of transactions](https://
|
18
|
+
# 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
|
19
19
|
attr_accessor :auto_refund
|
20
20
|
|
21
|
-
# Enabled or disables the name validation functionality. Please see [Name validation in transactions](https://
|
21
|
+
# 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
|
22
22
|
attr_accessor :account_validation
|
23
23
|
|
24
24
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -13,7 +13,7 @@ OpenAPI Generator version: 4.0.0-beta3
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module TransferZero
|
16
|
-
# Whenever objects in the TransferZero API change state, we can optionally send the changed details to a pre-registered webhook address. Webhooks can be created either using the [developer portal](https://developers.transferzero.com), or using the [TransferZero API](#operations-tag-Webhooks). Whenever possible we prefer using webhooks to listen on events (for example when a transaction has been paid out) instead of polling the status, and we expect implementations fully utilising webhooks. Webhooks will always generate a `POST` request to the specified endpoint, and will also include the same authentication headers as described in the [authentication documentation](https://
|
16
|
+
# Whenever objects in the TransferZero API change state, we can optionally send the changed details to a pre-registered webhook address. Webhooks can be created either using the [developer portal](https://developers.transferzero.com), or using the [TransferZero API](#operations-tag-Webhooks). Whenever possible we prefer using webhooks to listen on events (for example when a transaction has been paid out) instead of polling the status, and we expect implementations fully utilising webhooks. Webhooks will always generate a `POST` request to the specified endpoint, and will also include the same authentication headers as described in the [authentication documentation](https://docs.transferzero.com/docs/authentication), so their validity can be verified on the receiver end.
|
17
17
|
class Webhook
|
18
18
|
# The ID of the webhook that was used to send out this callback
|
19
19
|
attr_accessor :webhook
|
@@ -33,8 +33,8 @@ describe 'AccountValidationApi' do
|
|
33
33
|
end
|
34
34
|
|
35
35
|
# unit tests for post_account_validations
|
36
|
-
# Validates the existence of a bank account
|
37
|
-
# Validates the existence of a bank account and returns the associated customer name
|
36
|
+
# Validates the existence of a bank account or a mobile phone number
|
37
|
+
# Validates the existence of a bank account or mobile phone number and returns the associated customer name
|
38
38
|
# @param account_validation_request
|
39
39
|
# @param [Hash] opts the optional parameters
|
40
40
|
# @return [AccountValidationResponse]
|
@@ -47,6 +47,7 @@ describe 'CurrencyInfoApi' do
|
|
47
47
|
# Getting a list of possible input currencies
|
48
48
|
# Fetches a list of currencies available to use as the input currency in other API requests. Usually the 3-character alpha ISO 4217 currency code (eg. USD) is used as the identifier. Use this endpoint to determine the current exchange rate from a specific input currency to any output currency that's available.
|
49
49
|
# @param [Hash] opts the optional parameters
|
50
|
+
# @option opts [String] :sender_id Allows the scoping of the results by `sender_id` (optional). Example: `/v1/info/currencies/in?sender_id=26ec8517-2f0d-48c0-b74f-0bccb9ab3a87`
|
50
51
|
# @return [CurrencyExchangeListResponse]
|
51
52
|
describe 'info_currencies_in test' do
|
52
53
|
it 'should work' do
|
@@ -58,6 +59,7 @@ describe 'CurrencyInfoApi' do
|
|
58
59
|
# Getting a list of possible output currencies
|
59
60
|
# Fetches a list of currencies available to use as the output currency and their exchange rates against the available input currencies. Usually the 3-character alpha ISO 4217 currency code (eg. USD) is used as the identifier.
|
60
61
|
# @param [Hash] opts the optional parameters
|
62
|
+
# @option opts [String] :sender_id Allows the scoping of the results by `sender_id` (optional). Example: `/v1/info/currencies/out?sender_id=26ec8517-2f0d-48c0-b74f-0bccb9ab3a87`
|
61
63
|
# @return [CurrencyExchangeListResponse]
|
62
64
|
describe 'info_currencies_out test' do
|
63
65
|
it 'should work' do
|
@@ -32,11 +32,25 @@ describe 'DocumentsApi' do
|
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
|
+
# unit tests for delete_document
|
36
|
+
# Deleting a document
|
37
|
+
# Deletes a single document by the Document ID
|
38
|
+
# @param document_id ID of the document to delete. Example: `/v1/document/bf9ff782-e182-45ac-abea-5bce83ad6670`
|
39
|
+
# @param [Hash] opts the optional parameters
|
40
|
+
# @option opts [String] :sender_id Allows filtering results by `sender_id`. Example: `/v1/transactions?sender_id=b41d3cb7-6c54-4245-85fc-8e30690eb0f7`
|
41
|
+
# @return [DocumentResponse]
|
42
|
+
describe 'delete_document test' do
|
43
|
+
it 'should work' do
|
44
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
35
48
|
# unit tests for get_document
|
36
49
|
# Fetching a document
|
37
50
|
# Returns a single document by the Documents ID
|
38
51
|
# @param document_id ID of the document to get. Example: `/v1/documents/bf9ff782-e182-45ac-abea-5bce83ad6670`
|
39
52
|
# @param [Hash] opts the optional parameters
|
53
|
+
# @option opts [String] :sender_id Allows filtering results by `sender_id`. Example: `/v1/transactions?sender_id=b41d3cb7-6c54-4245-85fc-8e30690eb0f7`
|
40
54
|
# @return [DocumentResponse]
|
41
55
|
describe 'get_document test' do
|
42
56
|
it 'should work' do
|
@@ -50,6 +64,7 @@ describe 'DocumentsApi' do
|
|
50
64
|
# @param [Hash] opts the optional parameters
|
51
65
|
# @option opts [Integer] :page The page number to request (defaults to 1)
|
52
66
|
# @option opts [Integer] :per The number of results to load per page (defaults to 10)
|
67
|
+
# @option opts [String] :sender_id Allows filtering results by `sender_id`. Example: `/v1/transactions?sender_id=b41d3cb7-6c54-4245-85fc-8e30690eb0f7`
|
53
68
|
# @return [DocumentListResponse]
|
54
69
|
describe 'get_documents test' do
|
55
70
|
it 'should work' do
|
@@ -54,7 +54,7 @@ describe 'RecipientsApi' do
|
|
54
54
|
# @option opts [String] :created_at_to 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`
|
55
55
|
# @option opts [String] :amount_from 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`
|
56
56
|
# @option opts [String] :amount_to 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`
|
57
|
-
# @option opts [Array<String>] :state Allows filtering results by `state` of recipient. See [API Documentation - Recipient state](https://
|
57
|
+
# @option opts [Array<String>] :state 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`
|
58
58
|
# @option opts [Array<String>] :currency Allows filtering results by `input_currency`. Additionally required when filtering by an amount range Example: `/v1/recipients?currency[]=KES&currency[]=NGN`
|
59
59
|
# @return [RecipientListResponse]
|
60
60
|
describe 'get_recipients test' do
|
@@ -44,6 +44,18 @@ describe 'TransactionsApi' do
|
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
47
|
+
# unit tests for create_and_fund_transaction
|
48
|
+
# Creates a new transaction and funds it from account balance
|
49
|
+
# 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.
|
50
|
+
# @param transaction_request
|
51
|
+
# @param [Hash] opts the optional parameters
|
52
|
+
# @return [TransactionResponse]
|
53
|
+
describe 'create_and_fund_transaction test' do
|
54
|
+
it 'should work' do
|
55
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
47
59
|
# unit tests for get_transaction
|
48
60
|
# Fetch a single transaction
|
49
61
|
# Finds and returns a Transaction created by the requesting API key, using the provided Transaction ID.
|
@@ -63,6 +75,7 @@ describe 'TransactionsApi' do
|
|
63
75
|
# @option opts [Integer] :page The page number to request (defaults to 1)
|
64
76
|
# @option opts [Integer] :per The number of results to load per page (defaults to 10)
|
65
77
|
# @option opts [String] :external_id Allows filtering results by `external_id`. Example: `/v1/senders?external_id=26ec8517-2f0d-48c0-b74f-0bccb9ab3a87`
|
78
|
+
# @option opts [String] :sender_id Allows filtering results by `sender_id`. Example: `/v1/transactions?sender_id=b41d3cb7-6c54-4245-85fc-8e30690eb0f7`
|
66
79
|
# @return [TransactionListResponse]
|
67
80
|
describe 'get_transactions test' do
|
68
81
|
it 'should work' do
|
@@ -44,6 +44,12 @@ describe 'AccountValidationRequest' do
|
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
47
|
+
describe 'test attribute "phone_number"' do
|
48
|
+
it 'should work' do
|
49
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
47
53
|
describe 'test attribute "country"' do
|
48
54
|
it 'should work' do
|
49
55
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -67,7 +73,7 @@ describe 'AccountValidationRequest' do
|
|
67
73
|
describe 'test attribute "method"' do
|
68
74
|
it 'should work' do
|
69
75
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
70
|
-
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["bank"])
|
76
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["bank", "mobile"])
|
71
77
|
# validator.allowable_values.each do |value|
|
72
78
|
# expect { @instance.method = value }.not_to raise_error
|
73
79
|
# end
|
@@ -32,6 +32,12 @@ describe 'Document' do
|
|
32
32
|
expect(@instance).to be_instance_of(TransferZero::Document)
|
33
33
|
end
|
34
34
|
end
|
35
|
+
describe 'test attribute "sender_id"' do
|
36
|
+
it 'should work' do
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
35
41
|
describe 'test attribute "upload"' do
|
36
42
|
it 'should work' do
|
37
43
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -78,6 +84,12 @@ describe 'Document' do
|
|
78
84
|
end
|
79
85
|
end
|
80
86
|
|
87
|
+
describe 'test attribute "document_type"' do
|
88
|
+
it 'should work' do
|
89
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
81
93
|
describe 'test attribute "issuing_country"' do
|
82
94
|
it 'should work' do
|
83
95
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|