transferzero-sdk 1.11.0 → 1.12.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a812f687f43ed50327ba8c0bc8c3023f47b7e84fb995419da547d76556ae43d2
4
- data.tar.gz: 8888e69236bf452f337478c1d77cbd09c4ec1b3729ff48236f04ab2c4ffb4cf2
3
+ metadata.gz: 8243fc779fa0e32c85ae76a72f7ae931b1ada6c2e0521175390f751c4d490d57
4
+ data.tar.gz: 744f9b8ff5334986682842f1342e7f097c5c98704e6ff39980cc11a0c04e11b2
5
5
  SHA512:
6
- metadata.gz: da69f1ae7da9d4d65487616f6f44b2c4bb36f2695b77e92c8e2fb73e14299cb13d6692c45f12f0f9563d19292874bf27a01e69eabfafe471a02ec9b5baf1c461
7
- data.tar.gz: 905e94eaaa92f092b6746f0486e8e552b8bef29af04a3cc6722ff9ac6c79764149a3412f7896e2699d0a223d5c57c9339f25f98ac9f82c07cd5af93978f49ee1
6
+ metadata.gz: c2f49836c10fb0f61a6d3959632b8297ec62e28fec15be4e9c729425e8a4cab13b3a3c36654b5ba77c2b1872c745fc0bee4d4b31bb18a4998644cc81c1af1ee9
7
+ data.tar.gz: 15aeffc40d082ba65714136ec4f6c8da7b1856d1eb5c08d7fa1e58db230c67615402cff03126fefd7b5d948e758825d05c183a9cb3518601250b5cc7844f721f
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.11.0
10
+ - Package version: 1.12.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.11.0.gem
34
+ gem install ./transferzero-sdk-1.12.0.gem
35
35
  ```
36
- (for development, run `gem install --dev ./transferzero-sdk-1.11.0.gem` to install the development dependencies)
36
+ (for development, run `gem install --dev ./transferzero-sdk-1.12.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.11.0'
42
+ gem 'transferzero-sdk', '~> 1.12.0'
43
43
 
44
44
  ### Install from Git
45
45
 
@@ -198,6 +198,7 @@ Class | Method | HTTP request | Description
198
198
  - [TransferZero::PayoutMethod](docs/PayoutMethod.md)
199
199
  - [TransferZero::PayoutMethodBankAccountTypeEnum](docs/PayoutMethodBankAccountTypeEnum.md)
200
200
  - [TransferZero::PayoutMethodCashProviderEnum](docs/PayoutMethodCashProviderEnum.md)
201
+ - [TransferZero::PayoutMethodCountryEnum](docs/PayoutMethodCountryEnum.md)
201
202
  - [TransferZero::PayoutMethodDetails](docs/PayoutMethodDetails.md)
202
203
  - [TransferZero::PayoutMethodDetailsBTC](docs/PayoutMethodDetailsBTC.md)
203
204
  - [TransferZero::PayoutMethodDetailsBalance](docs/PayoutMethodDetailsBalance.md)
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
7
7
  **bank_account** | **String** | Account Number to query | [optional]
8
8
  **bank_code** | **String** | Bank Code to query - same codes are used as for creating the transactions | [optional]
9
9
  **phone_number** | **String** | Phone number to query | [optional]
10
+ **mobile_provider** | [**PayoutMethodMobileProviderEnum**](PayoutMethodMobileProviderEnum.md) | | [optional]
10
11
  **country** | **String** | Country of account in 2-character alpha ISO 3166-2 country format |
11
12
  **currency** | **String** | The currency the bank account is in |
12
13
  **method** | **String** | The method of the payment. Currently bank and mobile are supported |
@@ -19,6 +20,7 @@ require 'TransferZero'
19
20
  instance = TransferZero::AccountValidationRequest.new(bank_account: null,
20
21
  bank_code: null,
21
22
  phone_number: +233000000000,
23
+ mobile_provider: null,
22
24
  country: null,
23
25
  currency: null,
24
26
  method: null)
@@ -0,0 +1,16 @@
1
+ # TransferZero::PayoutMethodCountryEnum
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+
8
+ ## Code Sample
9
+
10
+ ```ruby
11
+ require 'TransferZero'
12
+
13
+ instance = TransferZero::PayoutMethodCountryEnum.new()
14
+ ```
15
+
16
+
@@ -15,6 +15,7 @@ Name | Type | Description | Notes
15
15
  **bank_name** | **String** | |
16
16
  **bank_country** | **String** | |
17
17
  **cash_provider** | [**PayoutMethodCashProviderEnum**](PayoutMethodCashProviderEnum.md) | | [optional]
18
+ **country** | [**PayoutMethodCountryEnum**](PayoutMethodCountryEnum.md) | | [optional]
18
19
  **sort_code** | **String** | | [optional]
19
20
  **bic** | **String** | | [optional]
20
21
  **sender_identity_card_type** | [**PayoutMethodIdentityCardTypeEnum**](PayoutMethodIdentityCardTypeEnum.md) | |
@@ -50,6 +51,7 @@ instance = TransferZero::PayoutMethodDetails.new(first_name: null,
50
51
  bank_name: null,
51
52
  bank_country: null,
52
53
  cash_provider: null,
54
+ country: null,
53
55
  sort_code: null,
54
56
  bic: null,
55
57
  sender_identity_card_type: null,
@@ -8,6 +8,7 @@ Name | Type | Description | Notes
8
8
  **last_name** | **String** | |
9
9
  **phone_number** | **String** | |
10
10
  **cash_provider** | [**PayoutMethodCashProviderEnum**](PayoutMethodCashProviderEnum.md) | | [optional]
11
+ **country** | [**PayoutMethodCountryEnum**](PayoutMethodCountryEnum.md) | | [optional]
11
12
 
12
13
  ## Code Sample
13
14
 
@@ -17,7 +18,8 @@ require 'TransferZero'
17
18
  instance = TransferZero::PayoutMethodDetailsXOFCash.new(first_name: null,
18
19
  last_name: null,
19
20
  phone_number: null,
20
- cash_provider: null)
21
+ cash_provider: null,
22
+ country: null)
21
23
  ```
22
24
 
23
25
 
data/example/client.rb CHANGED
@@ -4,17 +4,15 @@ require 'securerandom'
4
4
  require 'bundler/inline'
5
5
 
6
6
  gemfile do
7
- # gem "transferzero-sdk", "=1.0.0"
8
- gem 'transferzero-sdk', path: '/Users/lindelwencube/projects/spec/api-specification/public/generated/transferzero-sdk-ruby'
7
+ gem "transferzero-sdk", "=1.0.0"
9
8
  end
10
9
 
11
10
  require 'transferzero-sdk'
12
11
 
13
12
  credentials = {
14
- key: "o3r9WzW3wFDgMfrC1EV7UYJ4l6XqZi3wCCQpj+siwhegFtFNdA+DzUNjhiJAQmvmS4aarH68AH4ijV4ysmvS1w==",
15
- secret: "cc4MFbfiodRhkOh4lIMCJvJSdD/Ot553qjMlO1Bw7V4sV2wTlGhrZnsWSwIqQ6Ibksqje/aHn6LMoGFxi5tb5w==",
16
- host: "http://localhost:3002/v1",
17
- scheme: 'http'
13
+ key: "<key>",
14
+ secret: "<secret>",
15
+ host: "https://api-sandbox.transferzero.com/v1"
18
16
  }
19
17
 
20
18
  # Please see our documentation at https://docs.transferzero.com
@@ -27,7 +25,6 @@ class Client
27
25
  config.api_key = credentials[:key]
28
26
  config.api_secret = credentials[:secret]
29
27
  config.host = credentials[:host]
30
- config.scheme = credentials[:scheme]
31
28
  end
32
29
  end
33
30
 
@@ -144,66 +141,32 @@ class Client
144
141
  sender = TransferZero::Sender.new
145
142
  # When adding a sender to transaction, please use either an id or external_id. Providing both will result in a validation error.
146
143
  # Please see our documentation at https://docs.transferzero.com/docs/transaction-flow/#sender
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
-
144
+ sender.id = 'ec33484c-4456-4625-a823-9704a3a54e68'
156
145
 
157
146
  # You can find the various payout options at https://docs.transferzero.com/docs/transaction-flow/#payout-details
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
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'
174
153
 
175
154
  payout_method = TransferZero::PayoutMethod.new
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
155
+ payout_method.type = 'NGN::Bank'
156
+ payout_method.details = ngn_bank_details
194
157
 
195
158
  # Please see https://docs.transferzero.com/docs/transaction-flow/#requested-amount-and-currency
196
159
  # on what the request amount and currencies do
197
160
  recipient = TransferZero::Recipient.new
198
- recipient.requested_amount = 10
199
- recipient.requested_currency = 'XOF'
161
+ recipient.requested_amount = 10000
162
+ recipient.requested_currency = 'NGN'
200
163
  recipient.payout_method = payout_method
201
164
 
202
165
  # Similarly you can check https://docs.transferzero.com/docs/transaction-flow/#requested-amount-and-currency
203
166
  # on details about the input currency parameter
204
167
 
205
168
  # Find more details on external IDs at https://docs.transferzero.com/docs/transaction-flow/#external-id
206
- # transaction.external_id = 'TRANSACTION-1f834ahfh' # Optional field for customer's ID
169
+ transaction.external_id = 'TRANSACTION-1f834add' # Optional field for customer's ID
207
170
  transaction.input_currency = 'GBP'
208
171
  transaction.sender = sender
209
172
  transaction.recipients = [recipient]
@@ -498,7 +461,7 @@ class Client
498
461
  end
499
462
  end
500
463
 
501
- client = Client.new(credentials)
464
+ # client = Client.new(credentials)
502
465
  # client.list_currencies_example
503
466
  # client.account_validation_example
504
467
  # client.create_sender_example
@@ -506,5 +469,5 @@ client = Client.new(credentials)
506
469
  # client.update_sender_example
507
470
  # client.create_transaction_example
508
471
  # client.get_transaction_by_external_id_example
509
- client.create_and_fund_transaction_example
472
+ # client.create_and_fund_transaction_example
510
473
  # client.webhook_parse_example
@@ -62,6 +62,7 @@ require 'transferzero-sdk/models/payment_method_opposite'
62
62
  require 'transferzero-sdk/models/payout_method'
63
63
  require 'transferzero-sdk/models/payout_method_bank_account_type_enum'
64
64
  require 'transferzero-sdk/models/payout_method_cash_provider_enum'
65
+ require 'transferzero-sdk/models/payout_method_country_enum'
65
66
  require 'transferzero-sdk/models/payout_method_details'
66
67
  require 'transferzero-sdk/models/payout_method_details_btc'
67
68
  require 'transferzero-sdk/models/payout_method_details_balance'
@@ -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.11.0"
38
+ @user_agent = "TransferZero-SDK/Ruby/1.12.0"
39
39
  @default_headers = {
40
40
  'Content-Type' => 'application/json',
41
41
  'User-Agent' => @user_agent
@@ -23,6 +23,8 @@ class AccountValidationRequest
23
23
  # Phone number to query
24
24
  attr_accessor :phone_number
25
25
 
26
+ attr_accessor :mobile_provider
27
+
26
28
  # Country of account in 2-character alpha ISO 3166-2 country format
27
29
  attr_accessor :country
28
30
 
@@ -60,6 +62,7 @@ class AccountValidationRequest
60
62
  :'bank_account' => :'bank_account',
61
63
  :'bank_code' => :'bank_code',
62
64
  :'phone_number' => :'phone_number',
65
+ :'mobile_provider' => :'mobile_provider',
63
66
  :'country' => :'country',
64
67
  :'currency' => :'currency',
65
68
  :'method' => :'method'
@@ -72,6 +75,7 @@ class AccountValidationRequest
72
75
  :'bank_account' => :'String',
73
76
  :'bank_code' => :'String',
74
77
  :'phone_number' => :'String',
78
+ :'mobile_provider' => :'PayoutMethodMobileProviderEnum',
75
79
  :'country' => :'String',
76
80
  :'currency' => :'String',
77
81
  :'method' => :'String'
@@ -105,6 +109,10 @@ class AccountValidationRequest
105
109
  self.phone_number = attributes[:'phone_number']
106
110
  end
107
111
 
112
+ if attributes.key?(:'mobile_provider')
113
+ self.mobile_provider = attributes[:'mobile_provider']
114
+ end
115
+
108
116
  if attributes.key?(:'country')
109
117
  self.country = attributes[:'country']
110
118
  end
@@ -190,6 +198,7 @@ class AccountValidationRequest
190
198
  bank_account == o.bank_account &&
191
199
  bank_code == o.bank_code &&
192
200
  phone_number == o.phone_number &&
201
+ mobile_provider == o.mobile_provider &&
193
202
  country == o.country &&
194
203
  currency == o.currency &&
195
204
  method == o.method
@@ -204,7 +213,7 @@ class AccountValidationRequest
204
213
  # Calculates hash code according to all attributes.
205
214
  # @return [Integer] Hash code
206
215
  def hash
207
- [bank_account, bank_code, phone_number, country, currency, method].hash
216
+ [bank_account, bank_code, phone_number, mobile_provider, country, currency, method].hash
208
217
  end
209
218
 
210
219
  require 'active_support/core_ext/hash'
@@ -0,0 +1,32 @@
1
+ =begin
2
+ #TransferZero API
3
+
4
+ #Reference documentation for the TransferZero API V1
5
+
6
+ OpenAPI spec version: 1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.0.0-beta3
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module TransferZero
16
+ class PayoutMethodCountryEnum
17
+
18
+ CI = "CI".freeze
19
+ ML = "ML".freeze
20
+ SN = "SN".freeze
21
+
22
+ # Builds the enum from string
23
+ # @param [String] The enum value in the form of the string
24
+ # @return [String] The enum value
25
+ def build_from_hash(value)
26
+ constantValues = PayoutMethodCountryEnum.constants.select { |c| PayoutMethodCountryEnum::const_get(c) == value }
27
+ raise "Invalid ENUM value #{value} for class #PayoutMethodCountryEnum" if constantValues.empty? && !value.empty?
28
+ value
29
+ end
30
+ end
31
+
32
+ end
@@ -36,6 +36,8 @@ class PayoutMethodDetails
36
36
 
37
37
  attr_accessor :cash_provider
38
38
 
39
+ attr_accessor :country
40
+
39
41
  attr_accessor :sort_code
40
42
 
41
43
  attr_accessor :bic
@@ -86,6 +88,7 @@ class PayoutMethodDetails
86
88
  :'bank_name' => :'bank_name',
87
89
  :'bank_country' => :'bank_country',
88
90
  :'cash_provider' => :'cash_provider',
91
+ :'country' => :'country',
89
92
  :'sort_code' => :'sort_code',
90
93
  :'bic' => :'bic',
91
94
  :'sender_identity_card_type' => :'sender_identity_card_type',
@@ -121,6 +124,7 @@ class PayoutMethodDetails
121
124
  :'bank_name' => :'String',
122
125
  :'bank_country' => :'String',
123
126
  :'cash_provider' => :'PayoutMethodCashProviderEnum',
127
+ :'country' => :'PayoutMethodCountryEnum',
124
128
  :'sort_code' => :'String',
125
129
  :'bic' => :'String',
126
130
  :'sender_identity_card_type' => :'PayoutMethodIdentityCardTypeEnum',
@@ -219,6 +223,10 @@ class PayoutMethodDetails
219
223
  self.cash_provider = attributes[:'cash_provider']
220
224
  end
221
225
 
226
+ if attributes.key?(:'country')
227
+ self.country = attributes[:'country']
228
+ end
229
+
222
230
  if attributes.key?(:'sort_code')
223
231
  self.sort_code = attributes[:'sort_code']
224
232
  end
@@ -432,6 +440,7 @@ class PayoutMethodDetails
432
440
  bank_name == o.bank_name &&
433
441
  bank_country == o.bank_country &&
434
442
  cash_provider == o.cash_provider &&
443
+ country == o.country &&
435
444
  sort_code == o.sort_code &&
436
445
  bic == o.bic &&
437
446
  sender_identity_card_type == o.sender_identity_card_type &&
@@ -461,7 +470,7 @@ class PayoutMethodDetails
461
470
  # Calculates hash code according to all attributes.
462
471
  # @return [Integer] Hash code
463
472
  def hash
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
473
+ [first_name, last_name, bank_code, bank_account, bank_account_type, phone_number, mobile_provider, iban, bank_name, bank_country, cash_provider, country, 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
474
  end
466
475
 
467
476
  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
- # ```JSON \"details\": { \"first_name\": \"First\", \"last_name\": \"Last\", \"phone_number\": \"212537718685\" # Mandatory; International format preferred \"sender_identity_card_type\" => \"O\", # Mandatory; Values: \"O\": Other, \"PP\": Passport, \"NI\": National ID \"sender_identity_card_id\" => 'AB12345678', # Mandatory \"sender_city_of_birth\" => \"London\", # Mandatory \"sender_country_of_birth\" => \"GB\", # Mandatory; ISO 2-letter format \"sender_gender\" => \"M\", # Mandatory; Values: \"M\": Male, \"F\": Female \"reason\" => \"Remittance payment\", # Optional; Default value is 'Remittance payment' \"identity_card_type\" => \"NI\", # Optional; Values: \"PP\": Passport, \"NI\": National ID \"identity_card_id\" => 'AB12345678' # Optional } ``` Please note when sending MAD::Cash payments 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\" }, (...) } ``` The reference can also be provided optionally for MAD::Cash, but if you want to use this functionality please contact us for more details.
16
+ # ```JSON \"details\": { \"first_name\": \"First\", \"last_name\": \"Last\", \"phone_number\": \"212537718685\" # Mandatory; International format preferred \"sender_identity_card_type\" => \"O\", # Mandatory; Values: \"O\": Other, \"PP\": Passport, \"ID\": National ID \"sender_identity_card_id\" => 'AB12345678', # Mandatory \"sender_city_of_birth\" => \"London\", # Mandatory \"sender_country_of_birth\" => \"GB\", # Mandatory; ISO 2-letter format \"sender_gender\" => \"M\", # Mandatory; Values: \"M\": Male, \"F\": Female \"reason\" => \"Remittance payment\", # Optional; Default value is 'Remittance payment' \"identity_card_type\" => \"ID\", # Optional; Values: \"PP\": Passport, \"ID\": National ID \"identity_card_id\" => 'AB12345678' # Optional } ``` Please note when sending MAD::Cash payments 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\" }, (...) } ``` The reference can also be provided optionally for MAD::Cash, but if you want to use this functionality please contact us for more details.
17
17
  class PayoutMethodDetailsMADCash
18
18
  attr_accessor :first_name
19
19
 
@@ -13,7 +13,7 @@ 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 \"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\", (...) }, (...) } } ```
16
+ # ```JSON \"details\": { \"first_name\": \"First\", \"last_name\": \"Last\", \"phone_number\": \"221774044436\", // local or international format \"cash_provider\": \"wizall\" // Optional; Values: \"wari\" or \"wizall\"; Default value is \"wari\"; \"country\": \"SN\" // Optional; Values: \"CI\", \"ML\" or \"SN\"; Default value is \"SN\"; } ``` 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
 
@@ -23,13 +23,16 @@ class PayoutMethodDetailsXOFCash
23
23
 
24
24
  attr_accessor :cash_provider
25
25
 
26
+ attr_accessor :country
27
+
26
28
  # Attribute mapping from ruby-style variable name to JSON key.
27
29
  def self.attribute_map
28
30
  {
29
31
  :'first_name' => :'first_name',
30
32
  :'last_name' => :'last_name',
31
33
  :'phone_number' => :'phone_number',
32
- :'cash_provider' => :'cash_provider'
34
+ :'cash_provider' => :'cash_provider',
35
+ :'country' => :'country'
33
36
  }
34
37
  end
35
38
 
@@ -39,7 +42,8 @@ class PayoutMethodDetailsXOFCash
39
42
  :'first_name' => :'String',
40
43
  :'last_name' => :'String',
41
44
  :'phone_number' => :'String',
42
- :'cash_provider' => :'PayoutMethodCashProviderEnum'
45
+ :'cash_provider' => :'PayoutMethodCashProviderEnum',
46
+ :'country' => :'PayoutMethodCountryEnum'
43
47
  }
44
48
  end
45
49
 
@@ -73,6 +77,10 @@ class PayoutMethodDetailsXOFCash
73
77
  if attributes.key?(:'cash_provider')
74
78
  self.cash_provider = attributes[:'cash_provider']
75
79
  end
80
+
81
+ if attributes.key?(:'country')
82
+ self.country = attributes[:'country']
83
+ end
76
84
  end
77
85
 
78
86
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -111,7 +119,8 @@ class PayoutMethodDetailsXOFCash
111
119
  first_name == o.first_name &&
112
120
  last_name == o.last_name &&
113
121
  phone_number == o.phone_number &&
114
- cash_provider == o.cash_provider
122
+ cash_provider == o.cash_provider &&
123
+ country == o.country
115
124
  end
116
125
 
117
126
  # @see the `==` method
@@ -123,7 +132,7 @@ class PayoutMethodDetailsXOFCash
123
132
  # Calculates hash code according to all attributes.
124
133
  # @return [Integer] Hash code
125
134
  def hash
126
- [first_name, last_name, phone_number, cash_provider].hash
135
+ [first_name, last_name, phone_number, cash_provider, country].hash
127
136
  end
128
137
 
129
138
  require 'active_support/core_ext/hash'
@@ -17,7 +17,7 @@ class PayoutMethodIdentityCardTypeEnum
17
17
 
18
18
  O = "O".freeze
19
19
  PP = "PP".freeze
20
- NI = "NI".freeze
20
+ ID = "ID".freeze
21
21
 
22
22
  # Builds the enum from string
23
23
  # @param [String] The enum value in the form of the string
@@ -11,5 +11,5 @@ OpenAPI Generator version: 4.0.0-beta3
11
11
  =end
12
12
 
13
13
  module TransferZero
14
- VERSION = '1.11.0'
14
+ VERSION = '1.12.0'
15
15
  end
@@ -0,0 +1,35 @@
1
+ =begin
2
+ #TransferZero API
3
+
4
+ #Reference documentation for the TransferZero API V1
5
+
6
+ OpenAPI spec version: 1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.0.0-beta3
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for TransferZero::PayoutMethodCountryEnum
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe 'PayoutMethodCountryEnum' do
21
+ before do
22
+ # run before each test
23
+ @instance = TransferZero::PayoutMethodCountryEnum.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of PayoutMethodCountryEnum' do
31
+ it 'should create an instance of PayoutMethodCountryEnum' do
32
+ expect(@instance).to be_instance_of(TransferZero::PayoutMethodCountryEnum)
33
+ end
34
+ end
35
+ end
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.11.0
4
+ version: 1.12.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-02-10 00:00:00.000000000 Z
11
+ date: 2021-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -263,6 +263,7 @@ files:
263
263
  - docs/PayoutMethod.md
264
264
  - docs/PayoutMethodBankAccountTypeEnum.md
265
265
  - docs/PayoutMethodCashProviderEnum.md
266
+ - docs/PayoutMethodCountryEnum.md
266
267
  - docs/PayoutMethodDetails.md
267
268
  - docs/PayoutMethodDetailsBTC.md
268
269
  - docs/PayoutMethodDetailsBalance.md
@@ -392,6 +393,7 @@ files:
392
393
  - lib/transferzero-sdk/models/payout_method.rb
393
394
  - lib/transferzero-sdk/models/payout_method_bank_account_type_enum.rb
394
395
  - lib/transferzero-sdk/models/payout_method_cash_provider_enum.rb
396
+ - lib/transferzero-sdk/models/payout_method_country_enum.rb
395
397
  - lib/transferzero-sdk/models/payout_method_details.rb
396
398
  - lib/transferzero-sdk/models/payout_method_details_balance.rb
397
399
  - lib/transferzero-sdk/models/payout_method_details_btc.rb
@@ -511,6 +513,7 @@ files:
511
513
  - spec/models/payment_method_spec.rb
512
514
  - spec/models/payout_method_bank_account_type_enum_spec.rb
513
515
  - spec/models/payout_method_cash_provider_enum_spec.rb
516
+ - spec/models/payout_method_country_enum_spec.rb
514
517
  - spec/models/payout_method_details_balance_spec.rb
515
518
  - spec/models/payout_method_details_btc_spec.rb
516
519
  - spec/models/payout_method_details_gbp_bank_spec.rb
@@ -574,6 +577,7 @@ files:
574
577
  - spec/models/webhook_spec.rb
575
578
  - spec/spec_helper.rb
576
579
  - transferzero-sdk-1.10.0.gem
580
+ - transferzero-sdk-1.11.0.gem
577
581
  - transferzero-sdk.gemspec
578
582
  homepage: https://github.com/transferzero/transferzero-sdk-ruby
579
583
  licenses:
@@ -715,6 +719,7 @@ test_files:
715
719
  - spec/models/payout_method_cash_provider_enum_spec.rb
716
720
  - spec/models/field_description_spec.rb
717
721
  - spec/models/currency_exchange_spec.rb
722
+ - spec/models/payout_method_country_enum_spec.rb
718
723
  - spec/models/politically_exposed_person_spec.rb
719
724
  - spec/models/payin_method_details_spec.rb
720
725
  - spec/models/account_validation_error_spec.rb