transferzero-sdk 1.10.0 → 1.11.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/README.md +4 -4
- data/docs/Document.md +4 -0
- data/docs/PayoutMethodDetails.md +4 -4
- data/docs/PayoutMethodDetailsXOFCash.md +0 -4
- data/docs/Recipient.md +2 -0
- data/docs/Sender.md +1 -1
- data/example/client.rb +55 -18
- data/lib/transferzero-sdk/api_client.rb +1 -1
- data/lib/transferzero-sdk/models/document.rb +21 -1
- data/lib/transferzero-sdk/models/payout_method_details.rb +19 -19
- data/lib/transferzero-sdk/models/payout_method_details_xof_cash.rb +2 -20
- data/lib/transferzero-sdk/models/recipient.rb +11 -1
- data/lib/transferzero-sdk/models/sender.rb +1 -1
- data/lib/transferzero-sdk/version.rb +1 -1
- data/transferzero-sdk-1.10.0.gem +0 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a812f687f43ed50327ba8c0bc8c3023f47b7e84fb995419da547d76556ae43d2
|
4
|
+
data.tar.gz: 8888e69236bf452f337478c1d77cbd09c4ec1b3729ff48236f04ab2c4ffb4cf2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da69f1ae7da9d4d65487616f6f44b2c4bb36f2695b77e92c8e2fb73e14299cb13d6692c45f12f0f9563d19292874bf27a01e69eabfafe471a02ec9b5baf1c461
|
7
|
+
data.tar.gz: 905e94eaaa92f092b6746f0486e8e552b8bef29af04a3cc6722ff9ac6c79764149a3412f7896e2699d0a223d5c57c9339f25f98ac9f82c07cd5af93978f49ee1
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ Reference documentation for the TransferZero API V1
|
|
7
7
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
8
8
|
|
9
9
|
- API version: 1.0
|
10
|
-
- Package version: 1.
|
10
|
+
- Package version: 1.11.0
|
11
11
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
12
12
|
|
13
13
|
For more information, please visit:
|
@@ -31,15 +31,15 @@ gem build transferzero-sdk.gemspec
|
|
31
31
|
Then either install the gem locally:
|
32
32
|
|
33
33
|
```shell
|
34
|
-
gem install ./transferzero-sdk-1.
|
34
|
+
gem install ./transferzero-sdk-1.11.0.gem
|
35
35
|
```
|
36
|
-
(for development, run `gem install --dev ./transferzero-sdk-1.
|
36
|
+
(for development, run `gem install --dev ./transferzero-sdk-1.11.0.gem` to install the development dependencies)
|
37
37
|
|
38
38
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
39
39
|
|
40
40
|
Finally add this to the Gemfile:
|
41
41
|
|
42
|
-
gem 'transferzero-sdk', '~> 1.
|
42
|
+
gem 'transferzero-sdk', '~> 1.11.0'
|
43
43
|
|
44
44
|
### Install from Git
|
45
45
|
|
data/docs/Document.md
CHANGED
@@ -15,6 +15,8 @@ Name | Type | Description | Notes
|
|
15
15
|
**document_type** | **String** | This is a brief description of the document type | [optional]
|
16
16
|
**issuing_country** | **String** | Issuing country of ID in 2-character alpha ISO 3166-2 country format | [optional]
|
17
17
|
**id** | **String** | | [optional]
|
18
|
+
**document_id** | **String** | Document ID issued by government | [optional]
|
19
|
+
**expiry_date** | **Date** | Document expiry date issued by government | [optional]
|
18
20
|
**errors** | **Hash<String, Array<ValidationErrorDescription>>** | The fields that have some problems and don't pass validation | [optional]
|
19
21
|
|
20
22
|
## Code Sample
|
@@ -33,6 +35,8 @@ instance = TransferZero::Document.new(upload: data:image/png;base64,iVBORw0KGg..
|
|
33
35
|
document_type: certificate_of_business_name_registration,
|
34
36
|
issuing_country: NG,
|
35
37
|
id: ebe9bc0b-f2f6-4ce8-802a-8b79912d041e,
|
38
|
+
document_id: XYZ12345,
|
39
|
+
expiry_date: null,
|
36
40
|
errors: {"phone_number":[{"error":"invalid"}],"documents":[{"error":"blank"}]})
|
37
41
|
```
|
38
42
|
|
data/docs/PayoutMethodDetails.md
CHANGED
@@ -14,8 +14,6 @@ Name | Type | Description | Notes
|
|
14
14
|
**iban** | **String** | |
|
15
15
|
**bank_name** | **String** | |
|
16
16
|
**bank_country** | **String** | |
|
17
|
-
**identity_card_id** | **String** | | [optional]
|
18
|
-
**identity_card_type** | [**PayoutMethodIdentityCardTypeEnum**](PayoutMethodIdentityCardTypeEnum.md) | | [optional]
|
19
17
|
**cash_provider** | [**PayoutMethodCashProviderEnum**](PayoutMethodCashProviderEnum.md) | | [optional]
|
20
18
|
**sort_code** | **String** | | [optional]
|
21
19
|
**bic** | **String** | | [optional]
|
@@ -25,6 +23,8 @@ Name | Type | Description | Notes
|
|
25
23
|
**sender_country_of_birth** | **String** | |
|
26
24
|
**sender_gender** | [**PayoutMethodGenderEnum**](PayoutMethodGenderEnum.md) | |
|
27
25
|
**reason** | **String** | | [optional]
|
26
|
+
**identity_card_type** | [**PayoutMethodIdentityCardTypeEnum**](PayoutMethodIdentityCardTypeEnum.md) | | [optional]
|
27
|
+
**identity_card_id** | **String** | | [optional]
|
28
28
|
**reference** | **String** | | [optional]
|
29
29
|
**name** | **String** | |
|
30
30
|
**address** | **String** | |
|
@@ -49,8 +49,6 @@ instance = TransferZero::PayoutMethodDetails.new(first_name: null,
|
|
49
49
|
iban: null,
|
50
50
|
bank_name: null,
|
51
51
|
bank_country: null,
|
52
|
-
identity_card_id: null,
|
53
|
-
identity_card_type: null,
|
54
52
|
cash_provider: null,
|
55
53
|
sort_code: null,
|
56
54
|
bic: null,
|
@@ -60,6 +58,8 @@ instance = TransferZero::PayoutMethodDetails.new(first_name: null,
|
|
60
58
|
sender_country_of_birth: null,
|
61
59
|
sender_gender: null,
|
62
60
|
reason: null,
|
61
|
+
identity_card_type: null,
|
62
|
+
identity_card_id: null,
|
63
63
|
reference: null,
|
64
64
|
name: null,
|
65
65
|
address: null,
|
@@ -6,8 +6,6 @@ Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
7
|
**first_name** | **String** | |
|
8
8
|
**last_name** | **String** | |
|
9
|
-
**identity_card_id** | **String** | | [optional]
|
10
|
-
**identity_card_type** | [**PayoutMethodIdentityCardTypeEnum**](PayoutMethodIdentityCardTypeEnum.md) | | [optional]
|
11
9
|
**phone_number** | **String** | |
|
12
10
|
**cash_provider** | [**PayoutMethodCashProviderEnum**](PayoutMethodCashProviderEnum.md) | | [optional]
|
13
11
|
|
@@ -18,8 +16,6 @@ require 'TransferZero'
|
|
18
16
|
|
19
17
|
instance = TransferZero::PayoutMethodDetailsXOFCash.new(first_name: null,
|
20
18
|
last_name: null,
|
21
|
-
identity_card_id: null,
|
22
|
-
identity_card_type: null,
|
23
19
|
phone_number: null,
|
24
20
|
cash_provider: null)
|
25
21
|
```
|
data/docs/Recipient.md
CHANGED
@@ -17,6 +17,7 @@ Name | Type | Description | Notes
|
|
17
17
|
**state_reason_details** | [**RecipientStateReasonDetails**](RecipientStateReasonDetails.md) | | [optional]
|
18
18
|
**state** | [**RecipientState**](RecipientState.md) | | [optional]
|
19
19
|
**transaction_id** | **String** | The ID of the transaction that is related to this recipient | [optional]
|
20
|
+
**transaction_external_id** | **String** | Optional ID that is supplied by partner linking it to the partner's own Transaction ID. | [optional]
|
20
21
|
**transaction_state** | [**TransactionState**](TransactionState.md) | | [optional]
|
21
22
|
**exchange_rate** | **Float** | The exchange rate used in this payment | [optional]
|
22
23
|
**fee_fractional** | **Float** | The fee for this payment in fractional units (for example cents for USD transactions) | [optional]
|
@@ -45,6 +46,7 @@ instance = TransferZero::Recipient.new(requested_amount: 750.0,
|
|
45
46
|
state_reason_details: null,
|
46
47
|
state: null,
|
47
48
|
transaction_id: 97e79719-06e4-4794-aeeb-d2d9415d983a,
|
49
|
+
transaction_external_id: 806ec63a-a5a7-43cc-9d75-1ee74fbcc026,
|
48
50
|
transaction_state: null,
|
49
51
|
exchange_rate: 1000,
|
50
52
|
fee_fractional: 100,
|
data/docs/Sender.md
CHANGED
@@ -17,7 +17,7 @@ Name | Type | Description | Notes
|
|
17
17
|
**ip** | **String** | IP of sender |
|
18
18
|
**address_description** | **String** | Description of address | [optional]
|
19
19
|
**identification_number** | **String** | Identification number of document used | [optional]
|
20
|
-
**identification_type** | **String** | Document to be identified. The identification type can be one of the following: - `DL`: Driving License - `PP`: International Passport - `ID`: National ID - `OT`: Other | [optional]
|
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 Please note for Wizall `XOF::Cash` transactions the valid options are: - `ID`: National ID - `PP`: Passport | [optional]
|
21
21
|
**lang** | **String** | Determines language of the served content. Defaults to English | [optional]
|
22
22
|
**name** | **String** | Name of sender (used only with a Business sender) | [optional]
|
23
23
|
**first_name** | **String** | First name of sender (used only with a Personal sender) | [optional]
|
data/example/client.rb
CHANGED
@@ -4,15 +4,17 @@ require 'securerandom'
|
|
4
4
|
require 'bundler/inline'
|
5
5
|
|
6
6
|
gemfile do
|
7
|
-
gem "transferzero-sdk", "=1.0.0"
|
7
|
+
# gem "transferzero-sdk", "=1.0.0"
|
8
|
+
gem 'transferzero-sdk', path: '/Users/lindelwencube/projects/spec/api-specification/public/generated/transferzero-sdk-ruby'
|
8
9
|
end
|
9
10
|
|
10
11
|
require 'transferzero-sdk'
|
11
12
|
|
12
13
|
credentials = {
|
13
|
-
key: "
|
14
|
-
secret: "
|
15
|
-
host: "
|
14
|
+
key: "o3r9WzW3wFDgMfrC1EV7UYJ4l6XqZi3wCCQpj+siwhegFtFNdA+DzUNjhiJAQmvmS4aarH68AH4ijV4ysmvS1w==",
|
15
|
+
secret: "cc4MFbfiodRhkOh4lIMCJvJSdD/Ot553qjMlO1Bw7V4sV2wTlGhrZnsWSwIqQ6Ibksqje/aHn6LMoGFxi5tb5w==",
|
16
|
+
host: "http://localhost:3002/v1",
|
17
|
+
scheme: 'http'
|
16
18
|
}
|
17
19
|
|
18
20
|
# Please see our documentation at https://docs.transferzero.com
|
@@ -25,6 +27,7 @@ class Client
|
|
25
27
|
config.api_key = credentials[:key]
|
26
28
|
config.api_secret = credentials[:secret]
|
27
29
|
config.host = credentials[:host]
|
30
|
+
config.scheme = credentials[:scheme]
|
28
31
|
end
|
29
32
|
end
|
30
33
|
|
@@ -141,32 +144,66 @@ class Client
|
|
141
144
|
sender = TransferZero::Sender.new
|
142
145
|
# When adding a sender to transaction, please use either an id or external_id. Providing both will result in a validation error.
|
143
146
|
# Please see our documentation at https://docs.transferzero.com/docs/transaction-flow/#sender
|
144
|
-
sender.id =
|
147
|
+
sender.id = "25e68ad9-1470-4816-aa40-fc5086fc80f1"
|
148
|
+
sender.identification_number = '894369978426'
|
149
|
+
sender.identification_type = 'ID'
|
150
|
+
# sender.city_of_birth = "London"
|
151
|
+
# sender.country_of_birth = "GB"
|
152
|
+
# sender.gender = "F"
|
153
|
+
|
154
|
+
|
155
|
+
|
145
156
|
|
146
157
|
# You can find the various payout options at https://docs.transferzero.com/docs/transaction-flow/#payout-details
|
147
|
-
ngn_bank_details = TransferZero::PayoutMethodDetails.new
|
148
|
-
ngn_bank_details.bank_account = '123456789'
|
149
|
-
ngn_bank_details.bank_account_type = TransferZero::PayoutMethodBankAccountTypeEnum::N20
|
150
|
-
ngn_bank_details.bank_code = '082'
|
151
|
-
ngn_bank_details.first_name = 'first'
|
152
|
-
ngn_bank_details.last_name = 'last'
|
158
|
+
# ngn_bank_details = TransferZero::PayoutMethodDetails.new
|
159
|
+
# ngn_bank_details.bank_account = '123456789'
|
160
|
+
# ngn_bank_details.bank_account_type = TransferZero::PayoutMethodBankAccountTypeEnum::N20
|
161
|
+
# ngn_bank_details.bank_code = '082'
|
162
|
+
# ngn_bank_details.first_name = 'first'
|
163
|
+
# ngn_bank_details.last_name = 'last'
|
164
|
+
|
165
|
+
#xof cash
|
166
|
+
xof_cash_details = TransferZero::PayoutMethodDetails.new
|
167
|
+
xof_cash_details.phone_number = '221774103945'
|
168
|
+
xof_cash_details.first_name = 'first'
|
169
|
+
xof_cash_details.last_name = 'last'
|
170
|
+
# xof_cash_details.identity_card_id = 'OLD'
|
171
|
+
# xof_cash_details.identity_card_type = TransferZero::PayoutMethodIdentityCardTypeEnum::NI
|
172
|
+
xof_cash_details.cash_provider = TransferZero::PayoutMethodCashProviderEnum::WIZALL
|
173
|
+
# xof_cash_details.country = TransferZero::PayoutMethodCashProviderEnum::WIZALL
|
153
174
|
|
154
175
|
payout_method = TransferZero::PayoutMethod.new
|
155
|
-
payout_method.type = '
|
156
|
-
payout_method.details =
|
176
|
+
payout_method.type = 'XOF::Cash'
|
177
|
+
payout_method.details = xof_cash_details
|
178
|
+
|
179
|
+
# #mad cash
|
180
|
+
# mad_cash_details = TransferZero::PayoutMethodDetails.new
|
181
|
+
# mad_cash_details.phone_number = '212537718685'
|
182
|
+
# mad_cash_details.first_name = 'first'
|
183
|
+
# mad_cash_details.last_name = 'last'
|
184
|
+
# mad_cash_details.reason = "Remittance payment"
|
185
|
+
# mad_cash_details.sender_identity_card_type = TransferZero::PayoutMethodIdentityCardTypeEnum::O
|
186
|
+
# mad_cash_details.sender_identity_card_id = "123456789"
|
187
|
+
# mad_cash_details.identity_card_type = TransferZero::PayoutMethodIdentityCardTypeEnum::PP
|
188
|
+
# mad_cash_details.identity_card_id = "123456789"
|
189
|
+
|
190
|
+
|
191
|
+
# payout_method = TransferZero::PayoutMethod.new
|
192
|
+
# payout_method.type = 'MAD::Cash'
|
193
|
+
# payout_method.details = mad_cash_details
|
157
194
|
|
158
195
|
# Please see https://docs.transferzero.com/docs/transaction-flow/#requested-amount-and-currency
|
159
196
|
# on what the request amount and currencies do
|
160
197
|
recipient = TransferZero::Recipient.new
|
161
|
-
recipient.requested_amount =
|
162
|
-
recipient.requested_currency = '
|
198
|
+
recipient.requested_amount = 10
|
199
|
+
recipient.requested_currency = 'XOF'
|
163
200
|
recipient.payout_method = payout_method
|
164
201
|
|
165
202
|
# Similarly you can check https://docs.transferzero.com/docs/transaction-flow/#requested-amount-and-currency
|
166
203
|
# on details about the input currency parameter
|
167
204
|
|
168
205
|
# Find more details on external IDs at https://docs.transferzero.com/docs/transaction-flow/#external-id
|
169
|
-
transaction.external_id = 'TRANSACTION-
|
206
|
+
# transaction.external_id = 'TRANSACTION-1f834ahfh' # Optional field for customer's ID
|
170
207
|
transaction.input_currency = 'GBP'
|
171
208
|
transaction.sender = sender
|
172
209
|
transaction.recipients = [recipient]
|
@@ -461,7 +498,7 @@ class Client
|
|
461
498
|
end
|
462
499
|
end
|
463
500
|
|
464
|
-
|
501
|
+
client = Client.new(credentials)
|
465
502
|
# client.list_currencies_example
|
466
503
|
# client.account_validation_example
|
467
504
|
# client.create_sender_example
|
@@ -469,5 +506,5 @@ end
|
|
469
506
|
# client.update_sender_example
|
470
507
|
# client.create_transaction_example
|
471
508
|
# client.get_transaction_by_external_id_example
|
472
|
-
|
509
|
+
client.create_and_fund_transaction_example
|
473
510
|
# client.webhook_parse_example
|
@@ -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.11.0"
|
39
39
|
@default_headers = {
|
40
40
|
'Content-Type' => 'application/json',
|
41
41
|
'User-Agent' => @user_agent
|
@@ -44,6 +44,12 @@ class Document
|
|
44
44
|
|
45
45
|
attr_accessor :id
|
46
46
|
|
47
|
+
# Document ID issued by government
|
48
|
+
attr_accessor :document_id
|
49
|
+
|
50
|
+
# Document expiry date issued by government
|
51
|
+
attr_accessor :expiry_date
|
52
|
+
|
47
53
|
# The fields that have some problems and don't pass validation
|
48
54
|
attr_accessor :errors
|
49
55
|
|
@@ -83,6 +89,8 @@ class Document
|
|
83
89
|
:'document_type' => :'document_type',
|
84
90
|
:'issuing_country' => :'issuing_country',
|
85
91
|
:'id' => :'id',
|
92
|
+
:'document_id' => :'document_id',
|
93
|
+
:'expiry_date' => :'expiry_date',
|
86
94
|
:'errors' => :'errors'
|
87
95
|
}
|
88
96
|
end
|
@@ -101,6 +109,8 @@ class Document
|
|
101
109
|
:'document_type' => :'String',
|
102
110
|
:'issuing_country' => :'String',
|
103
111
|
:'id' => :'String',
|
112
|
+
:'document_id' => :'String',
|
113
|
+
:'expiry_date' => :'Date',
|
104
114
|
:'errors' => :'Hash<String, Array<ValidationErrorDescription>>'
|
105
115
|
}
|
106
116
|
end
|
@@ -164,6 +174,14 @@ class Document
|
|
164
174
|
self.id = attributes[:'id']
|
165
175
|
end
|
166
176
|
|
177
|
+
if attributes.key?(:'document_id')
|
178
|
+
self.document_id = attributes[:'document_id']
|
179
|
+
end
|
180
|
+
|
181
|
+
if attributes.key?(:'expiry_date')
|
182
|
+
self.expiry_date = attributes[:'expiry_date']
|
183
|
+
end
|
184
|
+
|
167
185
|
if attributes.key?(:'errors')
|
168
186
|
if (value = attributes[:'errors']).is_a?(Hash)
|
169
187
|
self.errors = value
|
@@ -222,6 +240,8 @@ class Document
|
|
222
240
|
document_type == o.document_type &&
|
223
241
|
issuing_country == o.issuing_country &&
|
224
242
|
id == o.id &&
|
243
|
+
document_id == o.document_id &&
|
244
|
+
expiry_date == o.expiry_date &&
|
225
245
|
errors == o.errors
|
226
246
|
end
|
227
247
|
|
@@ -234,7 +254,7 @@ class Document
|
|
234
254
|
# Calculates hash code according to all attributes.
|
235
255
|
# @return [Integer] Hash code
|
236
256
|
def hash
|
237
|
-
[upload, url, upload_file_name, metadata, upload_content_type, upload_file_size, category, side, document_type, issuing_country, id, errors].hash
|
257
|
+
[upload, url, upload_file_name, metadata, upload_content_type, upload_file_size, category, side, document_type, issuing_country, id, document_id, expiry_date, errors].hash
|
238
258
|
end
|
239
259
|
|
240
260
|
require 'active_support/core_ext/hash'
|
@@ -34,10 +34,6 @@ class PayoutMethodDetails
|
|
34
34
|
|
35
35
|
attr_accessor :bank_country
|
36
36
|
|
37
|
-
attr_accessor :identity_card_id
|
38
|
-
|
39
|
-
attr_accessor :identity_card_type
|
40
|
-
|
41
37
|
attr_accessor :cash_provider
|
42
38
|
|
43
39
|
attr_accessor :sort_code
|
@@ -56,6 +52,10 @@ class PayoutMethodDetails
|
|
56
52
|
|
57
53
|
attr_accessor :reason
|
58
54
|
|
55
|
+
attr_accessor :identity_card_type
|
56
|
+
|
57
|
+
attr_accessor :identity_card_id
|
58
|
+
|
59
59
|
attr_accessor :reference
|
60
60
|
|
61
61
|
attr_accessor :name
|
@@ -85,8 +85,6 @@ class PayoutMethodDetails
|
|
85
85
|
:'iban' => :'iban',
|
86
86
|
:'bank_name' => :'bank_name',
|
87
87
|
:'bank_country' => :'bank_country',
|
88
|
-
:'identity_card_id' => :'identity_card_id',
|
89
|
-
:'identity_card_type' => :'identity_card_type',
|
90
88
|
:'cash_provider' => :'cash_provider',
|
91
89
|
:'sort_code' => :'sort_code',
|
92
90
|
:'bic' => :'bic',
|
@@ -96,6 +94,8 @@ class PayoutMethodDetails
|
|
96
94
|
:'sender_country_of_birth' => :'sender_country_of_birth',
|
97
95
|
:'sender_gender' => :'sender_gender',
|
98
96
|
:'reason' => :'reason',
|
97
|
+
:'identity_card_type' => :'identity_card_type',
|
98
|
+
:'identity_card_id' => :'identity_card_id',
|
99
99
|
:'reference' => :'reference',
|
100
100
|
:'name' => :'name',
|
101
101
|
:'address' => :'address',
|
@@ -120,8 +120,6 @@ class PayoutMethodDetails
|
|
120
120
|
:'iban' => :'String',
|
121
121
|
:'bank_name' => :'String',
|
122
122
|
:'bank_country' => :'String',
|
123
|
-
:'identity_card_id' => :'String',
|
124
|
-
:'identity_card_type' => :'PayoutMethodIdentityCardTypeEnum',
|
125
123
|
:'cash_provider' => :'PayoutMethodCashProviderEnum',
|
126
124
|
:'sort_code' => :'String',
|
127
125
|
:'bic' => :'String',
|
@@ -131,6 +129,8 @@ class PayoutMethodDetails
|
|
131
129
|
:'sender_country_of_birth' => :'String',
|
132
130
|
:'sender_gender' => :'PayoutMethodGenderEnum',
|
133
131
|
:'reason' => :'String',
|
132
|
+
:'identity_card_type' => :'PayoutMethodIdentityCardTypeEnum',
|
133
|
+
:'identity_card_id' => :'String',
|
134
134
|
:'reference' => :'String',
|
135
135
|
:'name' => :'String',
|
136
136
|
:'address' => :'String',
|
@@ -215,14 +215,6 @@ class PayoutMethodDetails
|
|
215
215
|
self.bank_country = attributes[:'bank_country']
|
216
216
|
end
|
217
217
|
|
218
|
-
if attributes.key?(:'identity_card_id')
|
219
|
-
self.identity_card_id = attributes[:'identity_card_id']
|
220
|
-
end
|
221
|
-
|
222
|
-
if attributes.key?(:'identity_card_type')
|
223
|
-
self.identity_card_type = attributes[:'identity_card_type']
|
224
|
-
end
|
225
|
-
|
226
218
|
if attributes.key?(:'cash_provider')
|
227
219
|
self.cash_provider = attributes[:'cash_provider']
|
228
220
|
end
|
@@ -259,6 +251,14 @@ class PayoutMethodDetails
|
|
259
251
|
self.reason = attributes[:'reason']
|
260
252
|
end
|
261
253
|
|
254
|
+
if attributes.key?(:'identity_card_type')
|
255
|
+
self.identity_card_type = attributes[:'identity_card_type']
|
256
|
+
end
|
257
|
+
|
258
|
+
if attributes.key?(:'identity_card_id')
|
259
|
+
self.identity_card_id = attributes[:'identity_card_id']
|
260
|
+
end
|
261
|
+
|
262
262
|
if attributes.key?(:'reference')
|
263
263
|
self.reference = attributes[:'reference']
|
264
264
|
end
|
@@ -431,8 +431,6 @@ class PayoutMethodDetails
|
|
431
431
|
iban == o.iban &&
|
432
432
|
bank_name == o.bank_name &&
|
433
433
|
bank_country == o.bank_country &&
|
434
|
-
identity_card_id == o.identity_card_id &&
|
435
|
-
identity_card_type == o.identity_card_type &&
|
436
434
|
cash_provider == o.cash_provider &&
|
437
435
|
sort_code == o.sort_code &&
|
438
436
|
bic == o.bic &&
|
@@ -442,6 +440,8 @@ class PayoutMethodDetails
|
|
442
440
|
sender_country_of_birth == o.sender_country_of_birth &&
|
443
441
|
sender_gender == o.sender_gender &&
|
444
442
|
reason == o.reason &&
|
443
|
+
identity_card_type == o.identity_card_type &&
|
444
|
+
identity_card_id == o.identity_card_id &&
|
445
445
|
reference == o.reference &&
|
446
446
|
name == o.name &&
|
447
447
|
address == o.address &&
|
@@ -461,7 +461,7 @@ class PayoutMethodDetails
|
|
461
461
|
# Calculates hash code according to all attributes.
|
462
462
|
# @return [Integer] Hash code
|
463
463
|
def hash
|
464
|
-
[first_name, last_name, bank_code, bank_account, bank_account_type, phone_number, mobile_provider, iban, bank_name, bank_country,
|
464
|
+
[first_name, last_name, bank_code, bank_account, bank_account_type, phone_number, mobile_provider, iban, bank_name, bank_country, cash_provider, sort_code, bic, sender_identity_card_type, sender_identity_card_id, sender_city_of_birth, sender_country_of_birth, sender_gender, reason, identity_card_type, identity_card_id, reference, name, address, street, postal_code, city, email, transfer_reason_code].hash
|
465
465
|
end
|
466
466
|
|
467
467
|
require 'active_support/core_ext/hash'
|
@@ -13,16 +13,12 @@ OpenAPI Generator version: 4.0.0-beta3
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module TransferZero
|
16
|
-
# ```JSON \"details\": { \"first_name\": \"First\", \"last_name\": \"Last\", \"phone_number\": \"774044436\", // local or international Senegalese format \"
|
16
|
+
# ```JSON \"details\": { \"first_name\": \"First\", \"last_name\": \"Last\", \"phone_number\": \"774044436\", // local or international Senegalese format \"cash_provider\": \"wizall\" // Optional; Values: \"wari\" or \"wizall; Default value is \"wari\" } ``` Please note when sending Wari cash pickup requests you should subscribe to the recipient.pending webhook, as that will broadcast the payment reference ID the customer need to use to obtain the funds. Example webhook response excerpt - ```JSON { (...) \"state\":\"pending\", \"metadata\": { \"payment_reference\":\"9M5GJRJUBCY\" }, (...) } ``` Please note all senders trying to create Wizall cash pickup requests must have `identity_type` and `\"identity_number` present. The fields above are generally considered optional for senders for other payment corridors. If you wish to use an existing sender who has some of these fields missing you can provide them alongside the `id` or `external_id` field in the sender details. For example - ```JSON { \"transaction\": { \"sender\": { \"external_id\": \"<id of sender>\", \"identity_type\": \"ID\", \"identity_number\": \"AB12345678\", (...) }, (...) } } ```
|
17
17
|
class PayoutMethodDetailsXOFCash
|
18
18
|
attr_accessor :first_name
|
19
19
|
|
20
20
|
attr_accessor :last_name
|
21
21
|
|
22
|
-
attr_accessor :identity_card_id
|
23
|
-
|
24
|
-
attr_accessor :identity_card_type
|
25
|
-
|
26
22
|
attr_accessor :phone_number
|
27
23
|
|
28
24
|
attr_accessor :cash_provider
|
@@ -32,8 +28,6 @@ class PayoutMethodDetailsXOFCash
|
|
32
28
|
{
|
33
29
|
:'first_name' => :'first_name',
|
34
30
|
:'last_name' => :'last_name',
|
35
|
-
:'identity_card_id' => :'identity_card_id',
|
36
|
-
:'identity_card_type' => :'identity_card_type',
|
37
31
|
:'phone_number' => :'phone_number',
|
38
32
|
:'cash_provider' => :'cash_provider'
|
39
33
|
}
|
@@ -44,8 +38,6 @@ class PayoutMethodDetailsXOFCash
|
|
44
38
|
{
|
45
39
|
:'first_name' => :'String',
|
46
40
|
:'last_name' => :'String',
|
47
|
-
:'identity_card_id' => :'String',
|
48
|
-
:'identity_card_type' => :'PayoutMethodIdentityCardTypeEnum',
|
49
41
|
:'phone_number' => :'String',
|
50
42
|
:'cash_provider' => :'PayoutMethodCashProviderEnum'
|
51
43
|
}
|
@@ -74,14 +66,6 @@ class PayoutMethodDetailsXOFCash
|
|
74
66
|
self.last_name = attributes[:'last_name']
|
75
67
|
end
|
76
68
|
|
77
|
-
if attributes.key?(:'identity_card_id')
|
78
|
-
self.identity_card_id = attributes[:'identity_card_id']
|
79
|
-
end
|
80
|
-
|
81
|
-
if attributes.key?(:'identity_card_type')
|
82
|
-
self.identity_card_type = attributes[:'identity_card_type']
|
83
|
-
end
|
84
|
-
|
85
69
|
if attributes.key?(:'phone_number')
|
86
70
|
self.phone_number = attributes[:'phone_number']
|
87
71
|
end
|
@@ -126,8 +110,6 @@ class PayoutMethodDetailsXOFCash
|
|
126
110
|
self.class == o.class &&
|
127
111
|
first_name == o.first_name &&
|
128
112
|
last_name == o.last_name &&
|
129
|
-
identity_card_id == o.identity_card_id &&
|
130
|
-
identity_card_type == o.identity_card_type &&
|
131
113
|
phone_number == o.phone_number &&
|
132
114
|
cash_provider == o.cash_provider
|
133
115
|
end
|
@@ -141,7 +123,7 @@ class PayoutMethodDetailsXOFCash
|
|
141
123
|
# Calculates hash code according to all attributes.
|
142
124
|
# @return [Integer] Hash code
|
143
125
|
def hash
|
144
|
-
[first_name, last_name,
|
126
|
+
[first_name, last_name, phone_number, cash_provider].hash
|
145
127
|
end
|
146
128
|
|
147
129
|
require 'active_support/core_ext/hash'
|
@@ -51,6 +51,9 @@ class Recipient
|
|
51
51
|
# The ID of the transaction that is related to this recipient
|
52
52
|
attr_accessor :transaction_id
|
53
53
|
|
54
|
+
# Optional ID that is supplied by partner linking it to the partner's own Transaction ID.
|
55
|
+
attr_accessor :transaction_external_id
|
56
|
+
|
54
57
|
attr_accessor :transaction_state
|
55
58
|
|
56
59
|
# The exchange rate used in this payment
|
@@ -92,6 +95,7 @@ class Recipient
|
|
92
95
|
:'state_reason_details' => :'state_reason_details',
|
93
96
|
:'state' => :'state',
|
94
97
|
:'transaction_id' => :'transaction_id',
|
98
|
+
:'transaction_external_id' => :'transaction_external_id',
|
95
99
|
:'transaction_state' => :'transaction_state',
|
96
100
|
:'exchange_rate' => :'exchange_rate',
|
97
101
|
:'fee_fractional' => :'fee_fractional',
|
@@ -120,6 +124,7 @@ class Recipient
|
|
120
124
|
:'state_reason_details' => :'RecipientStateReasonDetails',
|
121
125
|
:'state' => :'RecipientState',
|
122
126
|
:'transaction_id' => :'String',
|
127
|
+
:'transaction_external_id' => :'String',
|
123
128
|
:'transaction_state' => :'TransactionState',
|
124
129
|
:'exchange_rate' => :'Float',
|
125
130
|
:'fee_fractional' => :'Float',
|
@@ -199,6 +204,10 @@ class Recipient
|
|
199
204
|
self.transaction_id = attributes[:'transaction_id']
|
200
205
|
end
|
201
206
|
|
207
|
+
if attributes.key?(:'transaction_external_id')
|
208
|
+
self.transaction_external_id = attributes[:'transaction_external_id']
|
209
|
+
end
|
210
|
+
|
202
211
|
if attributes.key?(:'transaction_state')
|
203
212
|
self.transaction_state = attributes[:'transaction_state']
|
204
213
|
end
|
@@ -284,6 +293,7 @@ class Recipient
|
|
284
293
|
state_reason_details == o.state_reason_details &&
|
285
294
|
state == o.state &&
|
286
295
|
transaction_id == o.transaction_id &&
|
296
|
+
transaction_external_id == o.transaction_external_id &&
|
287
297
|
transaction_state == o.transaction_state &&
|
288
298
|
exchange_rate == o.exchange_rate &&
|
289
299
|
fee_fractional == o.fee_fractional &&
|
@@ -304,7 +314,7 @@ class Recipient
|
|
304
314
|
# Calculates hash code according to all attributes.
|
305
315
|
# @return [Integer] Hash code
|
306
316
|
def hash
|
307
|
-
[requested_amount, requested_currency, payout_method, metadata, created_at, editable, retriable, input_usd_amount, may_cancel, state_reason, state_reason_details, state, transaction_id, transaction_state, exchange_rate, fee_fractional, input_amount, input_currency, output_amount, output_currency, id, errors].hash
|
317
|
+
[requested_amount, requested_currency, payout_method, metadata, created_at, editable, retriable, input_usd_amount, may_cancel, state_reason, state_reason_details, state, transaction_id, transaction_external_id, transaction_state, exchange_rate, fee_fractional, input_amount, input_currency, output_amount, output_currency, id, errors].hash
|
308
318
|
end
|
309
319
|
|
310
320
|
require 'active_support/core_ext/hash'
|
@@ -52,7 +52,7 @@ class Sender
|
|
52
52
|
# Identification number of document used
|
53
53
|
attr_accessor :identification_number
|
54
54
|
|
55
|
-
# Document to be identified. The identification type can be one of the following: - `DL`: Driving License - `PP`: International Passport - `ID`: National ID - `OT`: Other
|
55
|
+
# Document to be identified. The identification type can be one of the following: - `DL`: Driving License - `PP`: International Passport - `ID`: National ID - `OT`: Other Please note for Wizall `XOF::Cash` transactions the valid options are: - `ID`: National ID - `PP`: Passport
|
56
56
|
attr_accessor :identification_type
|
57
57
|
|
58
58
|
# Determines language of the served content. Defaults to English
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: transferzero-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TransferZero
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -573,6 +573,7 @@ files:
|
|
573
573
|
- spec/models/webhook_log_spec.rb
|
574
574
|
- spec/models/webhook_spec.rb
|
575
575
|
- spec/spec_helper.rb
|
576
|
+
- transferzero-sdk-1.10.0.gem
|
576
577
|
- transferzero-sdk.gemspec
|
577
578
|
homepage: https://github.com/transferzero/transferzero-sdk-ruby
|
578
579
|
licenses:
|