transferzero-sdk 1.12.2 → 1.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +94 -0
- data/README.md +5 -4
- data/docs/PayoutMethod.md +1 -1
- data/docs/PayoutMethodDetails.md +2 -2
- data/docs/PayoutMethodDetailsGHSCash.md +21 -0
- data/docs/PayoutMethodDetailsXOFMobile.md +3 -1
- data/lib/transferzero-sdk.rb +1 -0
- data/lib/transferzero-sdk/api_client.rb +1 -1
- data/lib/transferzero-sdk/models/payout_method.rb +1 -1
- data/lib/transferzero-sdk/models/payout_method_details.rb +11 -10
- data/lib/transferzero-sdk/models/payout_method_details_ghs_cash.rb +236 -0
- data/lib/transferzero-sdk/models/payout_method_details_xof_cash.rb +1 -1
- data/lib/transferzero-sdk/models/payout_method_details_xof_mobile.rb +14 -5
- data/lib/transferzero-sdk/models/payout_method_mobile_provider_enum.rb +1 -0
- data/lib/transferzero-sdk/version.rb +1 -1
- data/spec/models/payout_method_details_ghs_cash_spec.rb +53 -0
- metadata +8 -4
- data/transferzero-sdk-1.9.0.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz: '
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '098d647f781cc5eb0d7a5c3ff7be86ed615ab3aea94a154cf2897b3fefebd7c6'
|
4
|
+
data.tar.gz: 56fdced0faebdbdd9e9ef70765e944272d52db9beb60fc780b1181c8bdf0e4c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81fab8828444155af24970fb9cf6a57666c241814685689f145a6d77c31d2eb61cc45f15287465f889ef60cdd5a69213057e0dd0d62d2ac0fb6508136dfc1a86
|
7
|
+
data.tar.gz: 14674bc6e5620af322b800f8263b7a1804f73f03004ba9775f331010a94df9aac58d92577b77dccf9e779adf02445e3a5abc02ef88634b2ba8d41df5a83a3aef
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,94 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
transferzero-sdk (1.13.0)
|
5
|
+
activesupport (>= 4)
|
6
|
+
json (>= 1.4)
|
7
|
+
typhoeus (~> 1.0, >= 1.0.1)
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
ZenTest (4.12.0)
|
13
|
+
activesupport (6.1.3)
|
14
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
15
|
+
i18n (>= 1.6, < 2)
|
16
|
+
minitest (>= 5.1)
|
17
|
+
tzinfo (~> 2.0)
|
18
|
+
zeitwerk (~> 2.3)
|
19
|
+
addressable (2.7.0)
|
20
|
+
public_suffix (>= 2.0.2, < 5.0)
|
21
|
+
autotest (4.4.6)
|
22
|
+
ZenTest (>= 4.4.1)
|
23
|
+
autotest-fsevent (0.2.17)
|
24
|
+
sys-uname
|
25
|
+
autotest-growl (0.2.16)
|
26
|
+
autotest-rails-pure (4.1.2)
|
27
|
+
byebug (11.1.3)
|
28
|
+
coderay (1.1.3)
|
29
|
+
concurrent-ruby (1.1.8)
|
30
|
+
crack (0.4.5)
|
31
|
+
rexml
|
32
|
+
diff-lcs (1.4.4)
|
33
|
+
ethon (0.12.0)
|
34
|
+
ffi (>= 1.3.0)
|
35
|
+
ffi (1.14.2)
|
36
|
+
hashdiff (1.0.1)
|
37
|
+
i18n (1.8.9)
|
38
|
+
concurrent-ruby (~> 1.0)
|
39
|
+
json (2.5.1)
|
40
|
+
method_source (1.0.0)
|
41
|
+
minitest (5.14.4)
|
42
|
+
pry (0.13.1)
|
43
|
+
coderay (~> 1.1)
|
44
|
+
method_source (~> 1.0)
|
45
|
+
pry-byebug (3.9.0)
|
46
|
+
byebug (~> 11.0)
|
47
|
+
pry (~> 0.13.0)
|
48
|
+
public_suffix (4.0.6)
|
49
|
+
rake (12.0.0)
|
50
|
+
rexml (3.2.4)
|
51
|
+
rspec (3.10.0)
|
52
|
+
rspec-core (~> 3.10.0)
|
53
|
+
rspec-expectations (~> 3.10.0)
|
54
|
+
rspec-mocks (~> 3.10.0)
|
55
|
+
rspec-core (3.10.1)
|
56
|
+
rspec-support (~> 3.10.0)
|
57
|
+
rspec-expectations (3.10.1)
|
58
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
59
|
+
rspec-support (~> 3.10.0)
|
60
|
+
rspec-mocks (3.10.2)
|
61
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
62
|
+
rspec-support (~> 3.10.0)
|
63
|
+
rspec-support (3.10.2)
|
64
|
+
sys-uname (1.2.2)
|
65
|
+
ffi (~> 1.1)
|
66
|
+
typhoeus (1.4.0)
|
67
|
+
ethon (>= 0.9.0)
|
68
|
+
tzinfo (2.0.4)
|
69
|
+
concurrent-ruby (~> 1.0)
|
70
|
+
vcr (3.0.3)
|
71
|
+
webmock (1.24.6)
|
72
|
+
addressable (>= 2.3.6)
|
73
|
+
crack (>= 0.3.2)
|
74
|
+
hashdiff
|
75
|
+
zeitwerk (2.4.2)
|
76
|
+
|
77
|
+
PLATFORMS
|
78
|
+
x86_64-darwin-18
|
79
|
+
|
80
|
+
DEPENDENCIES
|
81
|
+
ZenTest (~> 4.11, >= 4.11.2)
|
82
|
+
autotest (~> 4.4, >= 4.4.6)
|
83
|
+
autotest-fsevent (~> 0.2, >= 0.2.12)
|
84
|
+
autotest-growl (~> 0.2, >= 0.2.16)
|
85
|
+
autotest-rails-pure (~> 4.1, >= 4.1.2)
|
86
|
+
pry-byebug
|
87
|
+
rake (~> 12.0.0)
|
88
|
+
rspec (~> 3.6, >= 3.6.0)
|
89
|
+
transferzero-sdk!
|
90
|
+
vcr (~> 3.0, >= 3.0.1)
|
91
|
+
webmock (~> 1.24, >= 1.24.3)
|
92
|
+
|
93
|
+
BUNDLED WITH
|
94
|
+
2.2.13
|
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.13.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.13.0.gem
|
35
35
|
```
|
36
|
-
(for development, run `gem install --dev ./transferzero-sdk-1.
|
36
|
+
(for development, run `gem install --dev ./transferzero-sdk-1.13.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.13.0'
|
43
43
|
|
44
44
|
### Install from Git
|
45
45
|
|
@@ -204,6 +204,7 @@ Class | Method | HTTP request | Description
|
|
204
204
|
- [TransferZero::PayoutMethodDetailsBalance](docs/PayoutMethodDetailsBalance.md)
|
205
205
|
- [TransferZero::PayoutMethodDetailsGBPBank](docs/PayoutMethodDetailsGBPBank.md)
|
206
206
|
- [TransferZero::PayoutMethodDetailsGHSBank](docs/PayoutMethodDetailsGHSBank.md)
|
207
|
+
- [TransferZero::PayoutMethodDetailsGHSCash](docs/PayoutMethodDetailsGHSCash.md)
|
207
208
|
- [TransferZero::PayoutMethodDetailsIBAN](docs/PayoutMethodDetailsIBAN.md)
|
208
209
|
- [TransferZero::PayoutMethodDetailsMADCash](docs/PayoutMethodDetailsMADCash.md)
|
209
210
|
- [TransferZero::PayoutMethodDetailsMobile](docs/PayoutMethodDetailsMobile.md)
|
data/docs/PayoutMethod.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
-
**type** | **String** | Contains the currency to send the money to, and the type of the money movement Commonly used payout types are: - `NGN::Bank` - for Nigerian bank account payments. - `NGN::Mobile` - for Nigerian mobile money payments. - `GHS::Bank` - for Ghanaian bank account payments. - `GHS::Mobile` - for Ghanaian mobile money payments. - `UGX::Mobile` - for Ugandan mobile money payments. - `TZS::Mobile` - for Tanzanian mobile money payments. - `XOF::Mobile` - for
|
7
|
+
**type** | **String** | Contains the currency to send the money to, and the type of the money movement Commonly used payout types are: - `NGN::Bank` - for Nigerian bank account payments. - `NGN::Mobile` - for Nigerian mobile money payments. - `GHS::Bank` - for Ghanaian bank account payments. - `GHS::Mobile` - for Ghanaian mobile money payments. - `GHS::Cash` - for Ghanaian cash remittance payments. - `UGX::Mobile` - for Ugandan mobile money payments. - `TZS::Mobile` - for Tanzanian mobile money payments. - `XOF::Mobile` - for mobile money payments to West-Africa. - `XOF::Bank` - for Senegalese bank account payments. - `XOF::Cash` - for Senegalese cash remittance payments. - `MAD::Cash` - for Moroccan cash remittance payments. - `EUR::Bank` - for IBAN bank transfers in EUR. - `GBP::Bank` - for IBAN bank and FP accounts transfers in GBP. - `ZAR::Bank` - for South Africa bank account payments. You can also send funds to the internal balance using `CCY::Balance`, where `CCY` is the appropriate currency. See [Collection from senders](https://docs.transferzero.com/docs/additional-features/#collections-from-senders) for more info on how to collect money into internal balance | [optional]
|
8
8
|
**details** | [**PayoutMethodDetails**](PayoutMethodDetails.md) | | [optional]
|
9
9
|
**metadata** | [**Object**](.md) | Metadata of payout method. You can store any kind of information in this field. | [optional]
|
10
10
|
**id** | **String** | | [optional]
|
data/docs/PayoutMethodDetails.md
CHANGED
@@ -11,11 +11,11 @@ Name | Type | Description | Notes
|
|
11
11
|
**bank_account_type** | [**PayoutMethodBankAccountTypeEnum**](PayoutMethodBankAccountTypeEnum.md) | | [optional]
|
12
12
|
**phone_number** | **String** | |
|
13
13
|
**mobile_provider** | [**PayoutMethodMobileProviderEnum**](PayoutMethodMobileProviderEnum.md) | |
|
14
|
+
**country** | [**PayoutMethodCountryEnum**](PayoutMethodCountryEnum.md) | | [optional]
|
14
15
|
**iban** | **String** | |
|
15
16
|
**bank_name** | **String** | |
|
16
17
|
**bank_country** | **String** | |
|
17
18
|
**cash_provider** | [**PayoutMethodCashProviderEnum**](PayoutMethodCashProviderEnum.md) | | [optional]
|
18
|
-
**country** | [**PayoutMethodCountryEnum**](PayoutMethodCountryEnum.md) | | [optional]
|
19
19
|
**sort_code** | **String** | | [optional]
|
20
20
|
**bic** | **String** | | [optional]
|
21
21
|
**sender_identity_card_type** | [**PayoutMethodIdentityCardTypeEnum**](PayoutMethodIdentityCardTypeEnum.md) | |
|
@@ -47,11 +47,11 @@ instance = TransferZero::PayoutMethodDetails.new(first_name: null,
|
|
47
47
|
bank_account_type: null,
|
48
48
|
phone_number: null,
|
49
49
|
mobile_provider: null,
|
50
|
+
country: null,
|
50
51
|
iban: null,
|
51
52
|
bank_name: null,
|
52
53
|
bank_country: null,
|
53
54
|
cash_provider: null,
|
54
|
-
country: null,
|
55
55
|
sort_code: null,
|
56
56
|
bic: null,
|
57
57
|
sender_identity_card_type: null,
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# TransferZero::PayoutMethodDetailsGHSCash
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**first_name** | **String** | |
|
8
|
+
**last_name** | **String** | |
|
9
|
+
**phone_number** | **String** | |
|
10
|
+
|
11
|
+
## Code Sample
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'TransferZero'
|
15
|
+
|
16
|
+
instance = TransferZero::PayoutMethodDetailsGHSCash.new(first_name: null,
|
17
|
+
last_name: null,
|
18
|
+
phone_number: null)
|
19
|
+
```
|
20
|
+
|
21
|
+
|
@@ -8,6 +8,7 @@ Name | Type | Description | Notes
|
|
8
8
|
**last_name** | **String** | |
|
9
9
|
**phone_number** | **String** | |
|
10
10
|
**mobile_provider** | [**PayoutMethodMobileProviderEnum**](PayoutMethodMobileProviderEnum.md) | |
|
11
|
+
**country** | [**PayoutMethodCountryEnum**](PayoutMethodCountryEnum.md) | | [optional]
|
11
12
|
|
12
13
|
## Code Sample
|
13
14
|
|
@@ -17,7 +18,8 @@ require 'TransferZero'
|
|
17
18
|
instance = TransferZero::PayoutMethodDetailsXOFMobile.new(first_name: null,
|
18
19
|
last_name: null,
|
19
20
|
phone_number: null,
|
20
|
-
mobile_provider: null
|
21
|
+
mobile_provider: null,
|
22
|
+
country: null)
|
21
23
|
```
|
22
24
|
|
23
25
|
|
data/lib/transferzero-sdk.rb
CHANGED
@@ -68,6 +68,7 @@ require 'transferzero-sdk/models/payout_method_details_btc'
|
|
68
68
|
require 'transferzero-sdk/models/payout_method_details_balance'
|
69
69
|
require 'transferzero-sdk/models/payout_method_details_gbp_bank'
|
70
70
|
require 'transferzero-sdk/models/payout_method_details_ghs_bank'
|
71
|
+
require 'transferzero-sdk/models/payout_method_details_ghs_cash'
|
71
72
|
require 'transferzero-sdk/models/payout_method_details_iban'
|
72
73
|
require 'transferzero-sdk/models/payout_method_details_mad_cash'
|
73
74
|
require 'transferzero-sdk/models/payout_method_details_mobile'
|
@@ -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.13.0"
|
39
39
|
@default_headers = {
|
40
40
|
'Content-Type' => 'application/json',
|
41
41
|
'User-Agent' => @user_agent
|
@@ -15,7 +15,7 @@ require 'date'
|
|
15
15
|
module TransferZero
|
16
16
|
# This describes the specific details on how the payment has to be routed to the recipient.
|
17
17
|
class PayoutMethod
|
18
|
-
# Contains the currency to send the money to, and the type of the money movement Commonly used payout types are: - `NGN::Bank` - for Nigerian bank account payments. - `NGN::Mobile` - for Nigerian mobile money payments. - `GHS::Bank` - for Ghanaian bank account payments. - `GHS::Mobile` - for Ghanaian mobile money payments. - `UGX::Mobile` - for Ugandan mobile money payments. - `TZS::Mobile` - for Tanzanian mobile money payments. - `XOF::Mobile` - for
|
18
|
+
# Contains the currency to send the money to, and the type of the money movement Commonly used payout types are: - `NGN::Bank` - for Nigerian bank account payments. - `NGN::Mobile` - for Nigerian mobile money payments. - `GHS::Bank` - for Ghanaian bank account payments. - `GHS::Mobile` - for Ghanaian mobile money payments. - `GHS::Cash` - for Ghanaian cash remittance payments. - `UGX::Mobile` - for Ugandan mobile money payments. - `TZS::Mobile` - for Tanzanian mobile money payments. - `XOF::Mobile` - for mobile money payments to West-Africa. - `XOF::Bank` - for Senegalese bank account payments. - `XOF::Cash` - for Senegalese cash remittance payments. - `MAD::Cash` - for Moroccan cash remittance payments. - `EUR::Bank` - for IBAN bank transfers in EUR. - `GBP::Bank` - for IBAN bank and FP accounts transfers in GBP. - `ZAR::Bank` - for South Africa bank account payments. You can also send funds to the internal balance using `CCY::Balance`, where `CCY` is the appropriate currency. See [Collection from senders](https://docs.transferzero.com/docs/additional-features/#collections-from-senders) for more info on how to collect money into internal balance
|
19
19
|
attr_accessor :type
|
20
20
|
|
21
21
|
attr_accessor :details
|
@@ -28,6 +28,8 @@ class PayoutMethodDetails
|
|
28
28
|
|
29
29
|
attr_accessor :mobile_provider
|
30
30
|
|
31
|
+
attr_accessor :country
|
32
|
+
|
31
33
|
attr_accessor :iban
|
32
34
|
|
33
35
|
attr_accessor :bank_name
|
@@ -36,8 +38,6 @@ class PayoutMethodDetails
|
|
36
38
|
|
37
39
|
attr_accessor :cash_provider
|
38
40
|
|
39
|
-
attr_accessor :country
|
40
|
-
|
41
41
|
attr_accessor :sort_code
|
42
42
|
|
43
43
|
attr_accessor :bic
|
@@ -84,11 +84,11 @@ class PayoutMethodDetails
|
|
84
84
|
:'bank_account_type' => :'bank_account_type',
|
85
85
|
:'phone_number' => :'phone_number',
|
86
86
|
:'mobile_provider' => :'mobile_provider',
|
87
|
+
:'country' => :'country',
|
87
88
|
:'iban' => :'iban',
|
88
89
|
:'bank_name' => :'bank_name',
|
89
90
|
:'bank_country' => :'bank_country',
|
90
91
|
:'cash_provider' => :'cash_provider',
|
91
|
-
:'country' => :'country',
|
92
92
|
:'sort_code' => :'sort_code',
|
93
93
|
:'bic' => :'bic',
|
94
94
|
:'sender_identity_card_type' => :'sender_identity_card_type',
|
@@ -120,11 +120,11 @@ class PayoutMethodDetails
|
|
120
120
|
:'bank_account_type' => :'PayoutMethodBankAccountTypeEnum',
|
121
121
|
:'phone_number' => :'String',
|
122
122
|
:'mobile_provider' => :'PayoutMethodMobileProviderEnum',
|
123
|
+
:'country' => :'PayoutMethodCountryEnum',
|
123
124
|
:'iban' => :'String',
|
124
125
|
:'bank_name' => :'String',
|
125
126
|
:'bank_country' => :'String',
|
126
127
|
:'cash_provider' => :'PayoutMethodCashProviderEnum',
|
127
|
-
:'country' => :'PayoutMethodCountryEnum',
|
128
128
|
:'sort_code' => :'String',
|
129
129
|
:'bic' => :'String',
|
130
130
|
:'sender_identity_card_type' => :'PayoutMethodIdentityCardTypeEnum',
|
@@ -153,6 +153,7 @@ class PayoutMethodDetails
|
|
153
153
|
:'PayoutMethodDetailsBalance',
|
154
154
|
:'PayoutMethodDetailsGBPBank',
|
155
155
|
:'PayoutMethodDetailsGHSBank',
|
156
|
+
:'PayoutMethodDetailsGHSCash',
|
156
157
|
:'PayoutMethodDetailsIBAN',
|
157
158
|
:'PayoutMethodDetailsMADCash',
|
158
159
|
:'PayoutMethodDetailsMobile',
|
@@ -207,6 +208,10 @@ class PayoutMethodDetails
|
|
207
208
|
self.mobile_provider = attributes[:'mobile_provider']
|
208
209
|
end
|
209
210
|
|
211
|
+
if attributes.key?(:'country')
|
212
|
+
self.country = attributes[:'country']
|
213
|
+
end
|
214
|
+
|
210
215
|
if attributes.key?(:'iban')
|
211
216
|
self.iban = attributes[:'iban']
|
212
217
|
end
|
@@ -223,10 +228,6 @@ class PayoutMethodDetails
|
|
223
228
|
self.cash_provider = attributes[:'cash_provider']
|
224
229
|
end
|
225
230
|
|
226
|
-
if attributes.key?(:'country')
|
227
|
-
self.country = attributes[:'country']
|
228
|
-
end
|
229
|
-
|
230
231
|
if attributes.key?(:'sort_code')
|
231
232
|
self.sort_code = attributes[:'sort_code']
|
232
233
|
end
|
@@ -436,11 +437,11 @@ class PayoutMethodDetails
|
|
436
437
|
bank_account_type == o.bank_account_type &&
|
437
438
|
phone_number == o.phone_number &&
|
438
439
|
mobile_provider == o.mobile_provider &&
|
440
|
+
country == o.country &&
|
439
441
|
iban == o.iban &&
|
440
442
|
bank_name == o.bank_name &&
|
441
443
|
bank_country == o.bank_country &&
|
442
444
|
cash_provider == o.cash_provider &&
|
443
|
-
country == o.country &&
|
444
445
|
sort_code == o.sort_code &&
|
445
446
|
bic == o.bic &&
|
446
447
|
sender_identity_card_type == o.sender_identity_card_type &&
|
@@ -470,7 +471,7 @@ class PayoutMethodDetails
|
|
470
471
|
# Calculates hash code according to all attributes.
|
471
472
|
# @return [Integer] Hash code
|
472
473
|
def hash
|
473
|
-
[first_name, last_name, bank_code, bank_account, bank_account_type, phone_number, mobile_provider, iban, bank_name, bank_country, cash_provider,
|
474
|
+
[first_name, last_name, bank_code, bank_account, bank_account_type, phone_number, mobile_provider, country, 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
|
474
475
|
end
|
475
476
|
|
476
477
|
require 'active_support/core_ext/hash'
|
@@ -0,0 +1,236 @@
|
|
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
|
+
# ```JSON \"details\": { \"first_name\": \"First\", \"last_name\": \"Last\", \"phone_number\": \"0322023144\" } ```
|
17
|
+
class PayoutMethodDetailsGHSCash
|
18
|
+
attr_accessor :first_name
|
19
|
+
|
20
|
+
attr_accessor :last_name
|
21
|
+
|
22
|
+
attr_accessor :phone_number
|
23
|
+
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
25
|
+
def self.attribute_map
|
26
|
+
{
|
27
|
+
:'first_name' => :'first_name',
|
28
|
+
:'last_name' => :'last_name',
|
29
|
+
:'phone_number' => :'phone_number'
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# Attribute type mapping.
|
34
|
+
def self.openapi_types
|
35
|
+
{
|
36
|
+
:'first_name' => :'String',
|
37
|
+
:'last_name' => :'String',
|
38
|
+
:'phone_number' => :'String'
|
39
|
+
}
|
40
|
+
end
|
41
|
+
|
42
|
+
# Initializes the object
|
43
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
44
|
+
def initialize(attributes = {})
|
45
|
+
if (!attributes.is_a?(Hash))
|
46
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::PayoutMethodDetailsGHSCash` initialize method"
|
47
|
+
end
|
48
|
+
|
49
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
50
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
51
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
52
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::PayoutMethodDetailsGHSCash`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
53
|
+
end
|
54
|
+
h[k.to_sym] = v
|
55
|
+
}
|
56
|
+
|
57
|
+
if attributes.key?(:'first_name')
|
58
|
+
self.first_name = attributes[:'first_name']
|
59
|
+
end
|
60
|
+
|
61
|
+
if attributes.key?(:'last_name')
|
62
|
+
self.last_name = attributes[:'last_name']
|
63
|
+
end
|
64
|
+
|
65
|
+
if attributes.key?(:'phone_number')
|
66
|
+
self.phone_number = attributes[:'phone_number']
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
71
|
+
# @return Array for valid properties with the reasons
|
72
|
+
def list_invalid_properties
|
73
|
+
invalid_properties = Array.new
|
74
|
+
if @first_name.nil?
|
75
|
+
invalid_properties.push('invalid value for "first_name", first_name cannot be nil.')
|
76
|
+
end
|
77
|
+
|
78
|
+
if @last_name.nil?
|
79
|
+
invalid_properties.push('invalid value for "last_name", last_name cannot be nil.')
|
80
|
+
end
|
81
|
+
|
82
|
+
if @phone_number.nil?
|
83
|
+
invalid_properties.push('invalid value for "phone_number", phone_number cannot be nil.')
|
84
|
+
end
|
85
|
+
|
86
|
+
invalid_properties
|
87
|
+
end
|
88
|
+
|
89
|
+
# Check to see if the all the properties in the model are valid
|
90
|
+
# @return true if the model is valid
|
91
|
+
def valid?
|
92
|
+
return false if @first_name.nil?
|
93
|
+
return false if @last_name.nil?
|
94
|
+
return false if @phone_number.nil?
|
95
|
+
true
|
96
|
+
end
|
97
|
+
|
98
|
+
# Checks equality by comparing each attribute.
|
99
|
+
# @param [Object] Object to be compared
|
100
|
+
def ==(o)
|
101
|
+
return true if self.equal?(o)
|
102
|
+
self.class == o.class &&
|
103
|
+
first_name == o.first_name &&
|
104
|
+
last_name == o.last_name &&
|
105
|
+
phone_number == o.phone_number
|
106
|
+
end
|
107
|
+
|
108
|
+
# @see the `==` method
|
109
|
+
# @param [Object] Object to be compared
|
110
|
+
def eql?(o)
|
111
|
+
self == o
|
112
|
+
end
|
113
|
+
|
114
|
+
# Calculates hash code according to all attributes.
|
115
|
+
# @return [Integer] Hash code
|
116
|
+
def hash
|
117
|
+
[first_name, last_name, phone_number].hash
|
118
|
+
end
|
119
|
+
|
120
|
+
require 'active_support/core_ext/hash'
|
121
|
+
require 'active_support/hash_with_indifferent_access.rb'
|
122
|
+
# Builds the object from hash
|
123
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
124
|
+
# @return [Object] Returns the model itself
|
125
|
+
def build_from_hash(attributes)
|
126
|
+
return nil unless attributes.is_a?(Hash)
|
127
|
+
self.class.openapi_types.each_pair do |key, type|
|
128
|
+
if type =~ /\AArray<(.*)>/i
|
129
|
+
# check to ensure the input is an array given that the the attribute
|
130
|
+
# is documented as an array but the input is not
|
131
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
132
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
133
|
+
end
|
134
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
135
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
136
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
137
|
+
end
|
138
|
+
|
139
|
+
self
|
140
|
+
end
|
141
|
+
|
142
|
+
# Deserializes the data based on type
|
143
|
+
# @param string type Data type
|
144
|
+
# @param string value Value to be deserialized
|
145
|
+
# @return [Object] Deserialized data
|
146
|
+
def _deserialize(type, value)
|
147
|
+
case type.to_sym
|
148
|
+
when :DateTime
|
149
|
+
DateTime.parse(value)
|
150
|
+
when :Date
|
151
|
+
Date.parse(value)
|
152
|
+
when :String
|
153
|
+
value.to_s
|
154
|
+
when :Integer
|
155
|
+
value.to_i
|
156
|
+
when :Float
|
157
|
+
value.to_f
|
158
|
+
when :Boolean
|
159
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
160
|
+
true
|
161
|
+
else
|
162
|
+
false
|
163
|
+
end
|
164
|
+
when :Object
|
165
|
+
# generic object (usually a Hash), return directly
|
166
|
+
value
|
167
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
168
|
+
inner_type = Regexp.last_match[:inner_type]
|
169
|
+
value.map { |v| _deserialize(inner_type, v) }
|
170
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
171
|
+
k_type = Regexp.last_match[:k_type]
|
172
|
+
v_type = Regexp.last_match[:v_type]
|
173
|
+
{}.tap do |hash|
|
174
|
+
value.each do |k, v|
|
175
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
176
|
+
end
|
177
|
+
end
|
178
|
+
else # model
|
179
|
+
temp_model = TransferZero.const_get(type).new
|
180
|
+
temp_model.build_from_hash(value)
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
184
|
+
# Returns the string representation of the object
|
185
|
+
# @return [String] String presentation of the object
|
186
|
+
def to_s
|
187
|
+
to_hash.to_s
|
188
|
+
end
|
189
|
+
|
190
|
+
# to_body is an alias to to_hash (backward compatibility)
|
191
|
+
# @return [Hash] Returns the object in the form of hash
|
192
|
+
def to_body
|
193
|
+
to_hash
|
194
|
+
end
|
195
|
+
|
196
|
+
# Returns the object in the form of hash
|
197
|
+
# @return [Hash] Returns the object in the form of hash
|
198
|
+
def to_hash
|
199
|
+
hash = {}
|
200
|
+
self.class.attribute_map.each_pair do |attr, param|
|
201
|
+
value = self.send(attr)
|
202
|
+
next if value.nil?
|
203
|
+
hash[param] = _to_hash(value)
|
204
|
+
end
|
205
|
+
::ActiveSupport::HashWithIndifferentAccess.new(hash)
|
206
|
+
end
|
207
|
+
|
208
|
+
def [](key)
|
209
|
+
to_hash[key]
|
210
|
+
end
|
211
|
+
|
212
|
+
def dig(*args)
|
213
|
+
to_hash.dig(*args)
|
214
|
+
end
|
215
|
+
|
216
|
+
# Outputs non-array value in the form of hash
|
217
|
+
# For object, use to_hash. Otherwise, just return the value
|
218
|
+
# @param [Object] value Any valid value
|
219
|
+
# @return [Hash] Returns the value in the form of hash
|
220
|
+
def _to_hash(value)
|
221
|
+
if value.is_a?(Array)
|
222
|
+
value.compact.map { |v| _to_hash(v) }
|
223
|
+
elsif value.is_a?(Hash)
|
224
|
+
{}.tap do |hash|
|
225
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
226
|
+
end
|
227
|
+
elsif value.respond_to? :to_hash
|
228
|
+
value.to_hash
|
229
|
+
else
|
230
|
+
value
|
231
|
+
end
|
232
|
+
end
|
233
|
+
|
234
|
+
end
|
235
|
+
|
236
|
+
end
|
@@ -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\": \"221774044436\", // local or international format \"cash_provider\": \"wizall\" // Optional; Values: \"
|
16
|
+
# ```JSON \"details\": { \"first_name\": \"First\", \"last_name\": \"Last\", \"phone_number\": \"221774044436\", // local or international format \"cash_provider\": \"wizall\" // Optional; Values: \"wizall\"; Default value is \"wizall\"; \"country\": \"SN\" // Optional; Values: \"CI\", \"ML\" or \"SN\"; Default value is \"SN\"; } ``` 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
|
|
@@ -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 \"mobile_provider\": \"orange\", # \"orange\" or \"tigo\" } ```
|
16
|
+
# ```JSON \"details\": { \"first_name\": \"First\", \"last_name\": \"Last\", \"phone_number\": \"774044436\", # local or international Senegalese or Ivory Coast format \"mobile_provider\": \"orange\", # \"orange\" or \"tigo\" for Senegal; \"orange\", \"mtn\" or \"moov\" for Ivory Coast \"country\" # Optional; Values: \"SN\" for Senegal or \"CI\" for Ivory Coast; Default value is \"SN\" } ```
|
17
17
|
class PayoutMethodDetailsXOFMobile
|
18
18
|
attr_accessor :first_name
|
19
19
|
|
@@ -23,13 +23,16 @@ class PayoutMethodDetailsXOFMobile
|
|
23
23
|
|
24
24
|
attr_accessor :mobile_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
|
-
:'mobile_provider' => :'mobile_provider'
|
34
|
+
:'mobile_provider' => :'mobile_provider',
|
35
|
+
:'country' => :'country'
|
33
36
|
}
|
34
37
|
end
|
35
38
|
|
@@ -39,7 +42,8 @@ class PayoutMethodDetailsXOFMobile
|
|
39
42
|
:'first_name' => :'String',
|
40
43
|
:'last_name' => :'String',
|
41
44
|
:'phone_number' => :'String',
|
42
|
-
:'mobile_provider' => :'PayoutMethodMobileProviderEnum'
|
45
|
+
:'mobile_provider' => :'PayoutMethodMobileProviderEnum',
|
46
|
+
:'country' => :'PayoutMethodCountryEnum'
|
43
47
|
}
|
44
48
|
end
|
45
49
|
|
@@ -73,6 +77,10 @@ class PayoutMethodDetailsXOFMobile
|
|
73
77
|
if attributes.key?(:'mobile_provider')
|
74
78
|
self.mobile_provider = attributes[:'mobile_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?
|
@@ -116,7 +124,8 @@ class PayoutMethodDetailsXOFMobile
|
|
116
124
|
first_name == o.first_name &&
|
117
125
|
last_name == o.last_name &&
|
118
126
|
phone_number == o.phone_number &&
|
119
|
-
mobile_provider == o.mobile_provider
|
127
|
+
mobile_provider == o.mobile_provider &&
|
128
|
+
country == o.country
|
120
129
|
end
|
121
130
|
|
122
131
|
# @see the `==` method
|
@@ -128,7 +137,7 @@ class PayoutMethodDetailsXOFMobile
|
|
128
137
|
# Calculates hash code according to all attributes.
|
129
138
|
# @return [Integer] Hash code
|
130
139
|
def hash
|
131
|
-
[first_name, last_name, phone_number, mobile_provider].hash
|
140
|
+
[first_name, last_name, phone_number, mobile_provider, country].hash
|
132
141
|
end
|
133
142
|
|
134
143
|
require 'active_support/core_ext/hash'
|
@@ -0,0 +1,53 @@
|
|
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::PayoutMethodDetailsGHSCash
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'PayoutMethodDetailsGHSCash' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = TransferZero::PayoutMethodDetailsGHSCash.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of PayoutMethodDetailsGHSCash' do
|
31
|
+
it 'should create an instance of PayoutMethodDetailsGHSCash' do
|
32
|
+
expect(@instance).to be_instance_of(TransferZero::PayoutMethodDetailsGHSCash)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
describe 'test attribute "first_name"' 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
|
+
|
41
|
+
describe 'test attribute "last_name"' do
|
42
|
+
it 'should work' do
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
|
+
end
|
45
|
+
end
|
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
|
+
|
53
|
+
end
|
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.13.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-03-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -206,6 +206,7 @@ extensions: []
|
|
206
206
|
extra_rdoc_files: []
|
207
207
|
files:
|
208
208
|
- Gemfile
|
209
|
+
- Gemfile.lock
|
209
210
|
- LICENSE
|
210
211
|
- README.md
|
211
212
|
- Rakefile
|
@@ -268,6 +269,7 @@ files:
|
|
268
269
|
- docs/PayoutMethodDetailsBalance.md
|
269
270
|
- docs/PayoutMethodDetailsGBPBank.md
|
270
271
|
- docs/PayoutMethodDetailsGHSBank.md
|
272
|
+
- docs/PayoutMethodDetailsGHSCash.md
|
271
273
|
- docs/PayoutMethodDetailsIBAN.md
|
272
274
|
- docs/PayoutMethodDetailsMADCash.md
|
273
275
|
- docs/PayoutMethodDetailsMobile.md
|
@@ -398,6 +400,7 @@ files:
|
|
398
400
|
- lib/transferzero-sdk/models/payout_method_details_btc.rb
|
399
401
|
- lib/transferzero-sdk/models/payout_method_details_gbp_bank.rb
|
400
402
|
- lib/transferzero-sdk/models/payout_method_details_ghs_bank.rb
|
403
|
+
- lib/transferzero-sdk/models/payout_method_details_ghs_cash.rb
|
401
404
|
- lib/transferzero-sdk/models/payout_method_details_iban.rb
|
402
405
|
- lib/transferzero-sdk/models/payout_method_details_mad_cash.rb
|
403
406
|
- lib/transferzero-sdk/models/payout_method_details_mobile.rb
|
@@ -517,6 +520,7 @@ files:
|
|
517
520
|
- spec/models/payout_method_details_btc_spec.rb
|
518
521
|
- spec/models/payout_method_details_gbp_bank_spec.rb
|
519
522
|
- spec/models/payout_method_details_ghs_bank_spec.rb
|
523
|
+
- spec/models/payout_method_details_ghs_cash_spec.rb
|
520
524
|
- spec/models/payout_method_details_iban_spec.rb
|
521
525
|
- spec/models/payout_method_details_mad_cash_spec.rb
|
522
526
|
- spec/models/payout_method_details_mobile_spec.rb
|
@@ -575,7 +579,6 @@ files:
|
|
575
579
|
- spec/models/webhook_log_spec.rb
|
576
580
|
- spec/models/webhook_spec.rb
|
577
581
|
- spec/spec_helper.rb
|
578
|
-
- transferzero-sdk-1.9.0.gem
|
579
582
|
- transferzero-sdk.gemspec
|
580
583
|
homepage: https://github.com/transferzero/transferzero-sdk-ruby
|
581
584
|
licenses:
|
@@ -596,7 +599,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
596
599
|
- !ruby/object:Gem::Version
|
597
600
|
version: '0'
|
598
601
|
requirements: []
|
599
|
-
rubygems_version: 3.
|
602
|
+
rubygems_version: 3.2.3
|
600
603
|
signing_key:
|
601
604
|
specification_version: 4
|
602
605
|
summary: TransferZero API Ruby Gem
|
@@ -714,6 +717,7 @@ test_files:
|
|
714
717
|
- spec/models/transaction_request_spec.rb
|
715
718
|
- spec/models/payout_method_details_xof_mobile_spec.rb
|
716
719
|
- spec/models/sender_list_response_spec.rb
|
720
|
+
- spec/models/payout_method_details_ghs_cash_spec.rb
|
717
721
|
- spec/models/payout_method_cash_provider_enum_spec.rb
|
718
722
|
- spec/models/field_description_spec.rb
|
719
723
|
- spec/models/currency_exchange_spec.rb
|
data/transferzero-sdk-1.9.0.gem
DELETED
Binary file
|