transferzero-sdk 1.14.2 → 1.15.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 +93 -0
- data/README.md +6 -4
- data/docs/PayoutMethod.md +1 -1
- data/docs/PayoutMethodDetails.md +8 -4
- data/docs/PayoutMethodDetailsKESBank.md +37 -0
- data/docs/PayoutMethodDetailsKESMobile.md +31 -0
- data/lib/transferzero-sdk.rb +2 -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 +44 -4
- data/lib/transferzero-sdk/models/payout_method_details_kes_bank.rb +343 -0
- data/lib/transferzero-sdk/models/payout_method_details_kes_mobile.rb +306 -0
- data/lib/transferzero-sdk/models/payout_method_details_zar_bank.rb +1 -1
- 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_kes_bank_spec.rb +101 -0
- data/spec/models/payout_method_details_kes_mobile_spec.rb +83 -0
- data/transferzero-sdk-1.10.0.gem +0 -0
- data/transferzero-sdk-1.11.0.gem +0 -0
- data/transferzero-sdk-1.12.0.gem +0 -0
- data/transferzero-sdk-1.14.0.gem +0 -0
- data/transferzero-sdk-1.14.1.gem +0 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7bee0e13c9f1879f7a82519242c43d792c03e3c4556044ea6fa8196def9ce62
|
4
|
+
data.tar.gz: 31f990f2e97bbdbeda0c0de1c4359898ca37d77e8cad33530f1a619bd0b50d77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 670b7815b517758381aefc6e9e3f93e2ae810d02cd04e5cd3eaf55ec64e338a9fc9bb7ee6c223c7afa6de9eccac81499f44717885d224f6c70afd3037c6c8807
|
7
|
+
data.tar.gz: 56358b61853f9ed9d08c397ce0d83978f40bb38e8d839c53f3e360d0867ab64e14f8c51cda57041d1b685db0f5fb526a5b3f30902848ccf0acaab7f0a7410a6b
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,93 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
transferzero-sdk (1.9.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.0.3.4)
|
14
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
15
|
+
i18n (>= 0.7, < 2)
|
16
|
+
minitest (~> 5.1)
|
17
|
+
tzinfo (~> 1.1)
|
18
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
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.7)
|
30
|
+
crack (0.4.4)
|
31
|
+
diff-lcs (1.4.4)
|
32
|
+
ethon (0.12.0)
|
33
|
+
ffi (>= 1.3.0)
|
34
|
+
ffi (1.13.1)
|
35
|
+
hashdiff (1.0.1)
|
36
|
+
i18n (1.8.5)
|
37
|
+
concurrent-ruby (~> 1.0)
|
38
|
+
json (2.3.1)
|
39
|
+
method_source (1.0.0)
|
40
|
+
minitest (5.14.2)
|
41
|
+
pry (0.13.1)
|
42
|
+
coderay (~> 1.1)
|
43
|
+
method_source (~> 1.0)
|
44
|
+
pry-byebug (3.9.0)
|
45
|
+
byebug (~> 11.0)
|
46
|
+
pry (~> 0.13.0)
|
47
|
+
public_suffix (4.0.6)
|
48
|
+
rake (12.0.0)
|
49
|
+
rspec (3.10.0)
|
50
|
+
rspec-core (~> 3.10.0)
|
51
|
+
rspec-expectations (~> 3.10.0)
|
52
|
+
rspec-mocks (~> 3.10.0)
|
53
|
+
rspec-core (3.10.0)
|
54
|
+
rspec-support (~> 3.10.0)
|
55
|
+
rspec-expectations (3.10.0)
|
56
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
57
|
+
rspec-support (~> 3.10.0)
|
58
|
+
rspec-mocks (3.10.0)
|
59
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
60
|
+
rspec-support (~> 3.10.0)
|
61
|
+
rspec-support (3.10.0)
|
62
|
+
sys-uname (1.2.2)
|
63
|
+
ffi (~> 1.1)
|
64
|
+
thread_safe (0.3.6)
|
65
|
+
typhoeus (1.4.0)
|
66
|
+
ethon (>= 0.9.0)
|
67
|
+
tzinfo (1.2.8)
|
68
|
+
thread_safe (~> 0.1)
|
69
|
+
vcr (3.0.3)
|
70
|
+
webmock (1.24.6)
|
71
|
+
addressable (>= 2.3.6)
|
72
|
+
crack (>= 0.3.2)
|
73
|
+
hashdiff
|
74
|
+
zeitwerk (2.4.2)
|
75
|
+
|
76
|
+
PLATFORMS
|
77
|
+
ruby
|
78
|
+
|
79
|
+
DEPENDENCIES
|
80
|
+
ZenTest (~> 4.11, >= 4.11.2)
|
81
|
+
autotest (~> 4.4, >= 4.4.6)
|
82
|
+
autotest-fsevent (~> 0.2, >= 0.2.12)
|
83
|
+
autotest-growl (~> 0.2, >= 0.2.16)
|
84
|
+
autotest-rails-pure (~> 4.1, >= 4.1.2)
|
85
|
+
pry-byebug
|
86
|
+
rake (~> 12.0.0)
|
87
|
+
rspec (~> 3.6, >= 3.6.0)
|
88
|
+
transferzero-sdk!
|
89
|
+
vcr (~> 3.0, >= 3.0.1)
|
90
|
+
webmock (~> 1.24, >= 1.24.3)
|
91
|
+
|
92
|
+
BUNDLED WITH
|
93
|
+
2.1.4
|
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.15.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.15.0.gem
|
35
35
|
```
|
36
|
-
(for development, run `gem install --dev ./transferzero-sdk-1.
|
36
|
+
(for development, run `gem install --dev ./transferzero-sdk-1.15.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.15.0'
|
43
43
|
|
44
44
|
### Install from Git
|
45
45
|
|
@@ -207,6 +207,8 @@ Class | Method | HTTP request | Description
|
|
207
207
|
- [TransferZero::PayoutMethodDetailsGHSBank](docs/PayoutMethodDetailsGHSBank.md)
|
208
208
|
- [TransferZero::PayoutMethodDetailsGHSCash](docs/PayoutMethodDetailsGHSCash.md)
|
209
209
|
- [TransferZero::PayoutMethodDetailsIBAN](docs/PayoutMethodDetailsIBAN.md)
|
210
|
+
- [TransferZero::PayoutMethodDetailsKESBank](docs/PayoutMethodDetailsKESBank.md)
|
211
|
+
- [TransferZero::PayoutMethodDetailsKESMobile](docs/PayoutMethodDetailsKESMobile.md)
|
210
212
|
- [TransferZero::PayoutMethodDetailsMADCash](docs/PayoutMethodDetailsMADCash.md)
|
211
213
|
- [TransferZero::PayoutMethodDetailsMobile](docs/PayoutMethodDetailsMobile.md)
|
212
214
|
- [TransferZero::PayoutMethodDetailsNGNBank](docs/PayoutMethodDetailsNGNBank.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. - `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. - `USD::Bank` - for USD account payments. *** Currently Nigeria only and in Beta phase *** 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]
|
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. - `USD::Bank` - for USD account payments. *** Currently Nigeria only and in Beta phase *** - `KES::Bank` - for Kenyan bank account payments. - `KES::Mobile` - for Kenyan mobile money 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
@@ -24,8 +24,8 @@ Name | Type | Description | Notes
|
|
24
24
|
**sender_country_of_birth** | **String** | | [optional]
|
25
25
|
**sender_gender** | [**PayoutMethodGenderEnum**](PayoutMethodGenderEnum.md) | | [optional]
|
26
26
|
**reason** | **String** | | [optional]
|
27
|
-
**identity_card_type** | [**PayoutMethodIdentityCardTypeEnum**](PayoutMethodIdentityCardTypeEnum.md) | |
|
28
|
-
**identity_card_id** | **String** | |
|
27
|
+
**identity_card_type** | [**PayoutMethodIdentityCardTypeEnum**](PayoutMethodIdentityCardTypeEnum.md) | |
|
28
|
+
**identity_card_id** | **String** | |
|
29
29
|
**reference** | **String** | | [optional]
|
30
30
|
**name** | **String** | |
|
31
31
|
**address** | **String** | |
|
@@ -33,12 +33,14 @@ Name | Type | Description | Notes
|
|
33
33
|
**postal_code** | **String** | |
|
34
34
|
**city** | **String** | |
|
35
35
|
**email** | **String** | | [optional]
|
36
|
-
**transfer_reason_code** | **String** | |
|
36
|
+
**transfer_reason_code** | **String** | |
|
37
37
|
**contact_first_name** | **String** | | [optional]
|
38
38
|
**contact_last_name** | **String** | | [optional]
|
39
39
|
**registration_number** | **String** | | [optional]
|
40
40
|
**nature_of_business** | [**PayoutMethodNatureOfBusinessEnum**](PayoutMethodNatureOfBusinessEnum.md) | | [optional]
|
41
41
|
**legal_entity_type** | [**PayoutMethodLegalEntityTypeEnum**](PayoutMethodLegalEntityTypeEnum.md) | | [optional]
|
42
|
+
**branch_code** | **String** | | [optional]
|
43
|
+
**swift_code** | **String** | |
|
42
44
|
|
43
45
|
## Code Sample
|
44
46
|
|
@@ -79,7 +81,9 @@ instance = TransferZero::PayoutMethodDetails.new(first_name: null,
|
|
79
81
|
contact_last_name: null,
|
80
82
|
registration_number: null,
|
81
83
|
nature_of_business: null,
|
82
|
-
legal_entity_type: null
|
84
|
+
legal_entity_type: null,
|
85
|
+
branch_code: null,
|
86
|
+
swift_code: null)
|
83
87
|
```
|
84
88
|
|
85
89
|
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# TransferZero::PayoutMethodDetailsKESBank
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**first_name** | **String** | |
|
8
|
+
**last_name** | **String** | |
|
9
|
+
**bank_code** | **String** | |
|
10
|
+
**street** | **String** | |
|
11
|
+
**bank_account** | **String** | |
|
12
|
+
**bank_name** | **String** | |
|
13
|
+
**branch_code** | **String** | | [optional]
|
14
|
+
**swift_code** | **String** | |
|
15
|
+
**transfer_reason_code** | **String** | |
|
16
|
+
**identity_card_type** | [**PayoutMethodIdentityCardTypeEnum**](PayoutMethodIdentityCardTypeEnum.md) | |
|
17
|
+
**identity_card_id** | **String** | |
|
18
|
+
|
19
|
+
## Code Sample
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
require 'TransferZero'
|
23
|
+
|
24
|
+
instance = TransferZero::PayoutMethodDetailsKESBank.new(first_name: null,
|
25
|
+
last_name: null,
|
26
|
+
bank_code: null,
|
27
|
+
street: null,
|
28
|
+
bank_account: null,
|
29
|
+
bank_name: null,
|
30
|
+
branch_code: null,
|
31
|
+
swift_code: null,
|
32
|
+
transfer_reason_code: null,
|
33
|
+
identity_card_type: null,
|
34
|
+
identity_card_id: null)
|
35
|
+
```
|
36
|
+
|
37
|
+
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# TransferZero::PayoutMethodDetailsKESMobile
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**first_name** | **String** | |
|
8
|
+
**last_name** | **String** | |
|
9
|
+
**street** | **String** | |
|
10
|
+
**phone_number** | **String** | |
|
11
|
+
**mobile_provider** | [**PayoutMethodMobileProviderEnum**](PayoutMethodMobileProviderEnum.md) | |
|
12
|
+
**transfer_reason_code** | **String** | |
|
13
|
+
**identity_card_type** | [**PayoutMethodIdentityCardTypeEnum**](PayoutMethodIdentityCardTypeEnum.md) | |
|
14
|
+
**identity_card_id** | **String** | |
|
15
|
+
|
16
|
+
## Code Sample
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
require 'TransferZero'
|
20
|
+
|
21
|
+
instance = TransferZero::PayoutMethodDetailsKESMobile.new(first_name: null,
|
22
|
+
last_name: null,
|
23
|
+
street: null,
|
24
|
+
phone_number: null,
|
25
|
+
mobile_provider: null,
|
26
|
+
transfer_reason_code: null,
|
27
|
+
identity_card_type: null,
|
28
|
+
identity_card_id: null)
|
29
|
+
```
|
30
|
+
|
31
|
+
|
data/lib/transferzero-sdk.rb
CHANGED
@@ -71,6 +71,8 @@ require 'transferzero-sdk/models/payout_method_details_gbp_bank'
|
|
71
71
|
require 'transferzero-sdk/models/payout_method_details_ghs_bank'
|
72
72
|
require 'transferzero-sdk/models/payout_method_details_ghs_cash'
|
73
73
|
require 'transferzero-sdk/models/payout_method_details_iban'
|
74
|
+
require 'transferzero-sdk/models/payout_method_details_kes_bank'
|
75
|
+
require 'transferzero-sdk/models/payout_method_details_kes_mobile'
|
74
76
|
require 'transferzero-sdk/models/payout_method_details_mad_cash'
|
75
77
|
require 'transferzero-sdk/models/payout_method_details_mobile'
|
76
78
|
require 'transferzero-sdk/models/payout_method_details_ngn_bank'
|
@@ -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.15.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. - `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. - `USD::Bank` - for USD account payments. *** Currently Nigeria only and in Beta phase *** 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
|
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. - `USD::Bank` - for USD account payments. *** Currently Nigeria only and in Beta phase *** - `KES::Bank` - for Kenyan bank account payments. - `KES::Mobile` - for Kenyan mobile money 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
|
@@ -84,6 +84,10 @@ class PayoutMethodDetails
|
|
84
84
|
|
85
85
|
attr_accessor :legal_entity_type
|
86
86
|
|
87
|
+
attr_accessor :branch_code
|
88
|
+
|
89
|
+
attr_accessor :swift_code
|
90
|
+
|
87
91
|
# Attribute mapping from ruby-style variable name to JSON key.
|
88
92
|
def self.attribute_map
|
89
93
|
{
|
@@ -121,7 +125,9 @@ class PayoutMethodDetails
|
|
121
125
|
:'contact_last_name' => :'contact_last_name',
|
122
126
|
:'registration_number' => :'registration_number',
|
123
127
|
:'nature_of_business' => :'nature_of_business',
|
124
|
-
:'legal_entity_type' => :'legal_entity_type'
|
128
|
+
:'legal_entity_type' => :'legal_entity_type',
|
129
|
+
:'branch_code' => :'branch_code',
|
130
|
+
:'swift_code' => :'swift_code'
|
125
131
|
}
|
126
132
|
end
|
127
133
|
|
@@ -162,7 +168,9 @@ class PayoutMethodDetails
|
|
162
168
|
:'contact_last_name' => :'String',
|
163
169
|
:'registration_number' => :'String',
|
164
170
|
:'nature_of_business' => :'PayoutMethodNatureOfBusinessEnum',
|
165
|
-
:'legal_entity_type' => :'PayoutMethodLegalEntityTypeEnum'
|
171
|
+
:'legal_entity_type' => :'PayoutMethodLegalEntityTypeEnum',
|
172
|
+
:'branch_code' => :'String',
|
173
|
+
:'swift_code' => :'String'
|
166
174
|
}
|
167
175
|
end
|
168
176
|
|
@@ -175,6 +183,8 @@ class PayoutMethodDetails
|
|
175
183
|
:'PayoutMethodDetailsGHSBank',
|
176
184
|
:'PayoutMethodDetailsGHSCash',
|
177
185
|
:'PayoutMethodDetailsIBAN',
|
186
|
+
:'PayoutMethodDetailsKESBank',
|
187
|
+
:'PayoutMethodDetailsKESMobile',
|
178
188
|
:'PayoutMethodDetailsMADCash',
|
179
189
|
:'PayoutMethodDetailsMobile',
|
180
190
|
:'PayoutMethodDetailsNGNBank',
|
@@ -340,6 +350,14 @@ class PayoutMethodDetails
|
|
340
350
|
if attributes.key?(:'legal_entity_type')
|
341
351
|
self.legal_entity_type = attributes[:'legal_entity_type']
|
342
352
|
end
|
353
|
+
|
354
|
+
if attributes.key?(:'branch_code')
|
355
|
+
self.branch_code = attributes[:'branch_code']
|
356
|
+
end
|
357
|
+
|
358
|
+
if attributes.key?(:'swift_code')
|
359
|
+
self.swift_code = attributes[:'swift_code']
|
360
|
+
end
|
343
361
|
end
|
344
362
|
|
345
363
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -394,6 +412,14 @@ class PayoutMethodDetails
|
|
394
412
|
invalid_properties.push('invalid value for "sender_identity_card_id", sender_identity_card_id cannot be nil.')
|
395
413
|
end
|
396
414
|
|
415
|
+
if @identity_card_type.nil?
|
416
|
+
invalid_properties.push('invalid value for "identity_card_type", identity_card_type cannot be nil.')
|
417
|
+
end
|
418
|
+
|
419
|
+
if @identity_card_id.nil?
|
420
|
+
invalid_properties.push('invalid value for "identity_card_id", identity_card_id cannot be nil.')
|
421
|
+
end
|
422
|
+
|
397
423
|
if @name.nil?
|
398
424
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
399
425
|
end
|
@@ -414,6 +440,14 @@ class PayoutMethodDetails
|
|
414
440
|
invalid_properties.push('invalid value for "city", city cannot be nil.')
|
415
441
|
end
|
416
442
|
|
443
|
+
if @transfer_reason_code.nil?
|
444
|
+
invalid_properties.push('invalid value for "transfer_reason_code", transfer_reason_code cannot be nil.')
|
445
|
+
end
|
446
|
+
|
447
|
+
if @swift_code.nil?
|
448
|
+
invalid_properties.push('invalid value for "swift_code", swift_code cannot be nil.')
|
449
|
+
end
|
450
|
+
|
417
451
|
invalid_properties
|
418
452
|
end
|
419
453
|
|
@@ -432,11 +466,15 @@ class PayoutMethodDetails
|
|
432
466
|
return false if @bank_country.nil?
|
433
467
|
return false if @sender_identity_card_type.nil?
|
434
468
|
return false if @sender_identity_card_id.nil?
|
469
|
+
return false if @identity_card_type.nil?
|
470
|
+
return false if @identity_card_id.nil?
|
435
471
|
return false if @name.nil?
|
436
472
|
return false if @address.nil?
|
437
473
|
return false if @street.nil?
|
438
474
|
return false if @postal_code.nil?
|
439
475
|
return false if @city.nil?
|
476
|
+
return false if @transfer_reason_code.nil?
|
477
|
+
return false if @swift_code.nil?
|
440
478
|
_one_of_found = false
|
441
479
|
openapi_one_of.each do |_class|
|
442
480
|
_one_of = TransferZero.const_get(_class).build_from_hash(self.to_hash)
|
@@ -495,7 +533,9 @@ class PayoutMethodDetails
|
|
495
533
|
contact_last_name == o.contact_last_name &&
|
496
534
|
registration_number == o.registration_number &&
|
497
535
|
nature_of_business == o.nature_of_business &&
|
498
|
-
legal_entity_type == o.legal_entity_type
|
536
|
+
legal_entity_type == o.legal_entity_type &&
|
537
|
+
branch_code == o.branch_code &&
|
538
|
+
swift_code == o.swift_code
|
499
539
|
end
|
500
540
|
|
501
541
|
# @see the `==` method
|
@@ -507,7 +547,7 @@ class PayoutMethodDetails
|
|
507
547
|
# Calculates hash code according to all attributes.
|
508
548
|
# @return [Integer] Hash code
|
509
549
|
def hash
|
510
|
-
[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, contact_first_name, contact_last_name, registration_number, nature_of_business, legal_entity_type].hash
|
550
|
+
[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, contact_first_name, contact_last_name, registration_number, nature_of_business, legal_entity_type, branch_code, swift_code].hash
|
511
551
|
end
|
512
552
|
|
513
553
|
require 'active_support/core_ext/hash'
|
@@ -0,0 +1,343 @@
|
|
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\", \"street\": \"Main Street\", \"bank_code\": \"68\", \"bank_account\": \"12345678\", \"bank_name\": \"Equity Bank Ltd\", \"branch_code\": \"404\", \"swift_code\" \"ABCLKENA\", \"transfer_reason_code\": \"185\", \"identity_card_type\": \"ID\", \"identity_card_id\": \"AB12345678\" } ``` The valid bank_code values are: - Habib Bank Limited: 08 - Trans-National Bank Limited: 26 - Housing Finance Co. Kenya: 61 - UBA Kenya Bank Ltd: 76 - Kenya Commercial Bank: 01000 - Standard Chartered Bank: 02000 - Barclays Bank of Kenya: 03000 - Bank of India: 05000 - Bank of Boroda: 06000 - NCBA Bank: 07000 - Prime Bank: 10000 - Co-operative Bank of Kenya: 11000 - National Bank of Kenya: 12000 - M-Oriental Commercial Bank Limited: 14000 - Citibank: 16000 - Habib Bank A.G. Zurich: 17000 - Middle East Bank: 18000 - Bank of Africa Kenya: 19000 - Consolidated Bank of Kenya: 23000 - Credit Bank Ltd: 25000 - Chase Bank: 30000 - Stanbic Bank Kenya: 31000 - African Banking Corporation: 35000 - Giro Bank Limited: 42000 - ECO Bank Kenya: 43000 - Spire Bank Limited: 49000 - Paramount Universal Bank Limited: 50000 - Jamii Bora Bank: 51000 - Guaranty Trust Bank Kenya: 53000 - Victoria Bank Limited: 54000 - Guardian Bank: 55000 - Investments and Mortgages Bank Limited: 57000 - Development Bank of Kenya: 59000 - Fidelity Commercial Bank: 46000 - Diamond Trust Bank: 63000 - Sidian Bank: 66000 - Equity Bank Limited: 68000 - Family Bank: 70000 - Gulf African Bank: 72000 - First Community Bank: 74000 - KWFT Bank: 78000 See [KES Bank](https://docs.transferzero.com/docs/payout-details/#kesbank) documentation for the transfer_reason_code list
|
17
|
+
class PayoutMethodDetailsKESBank
|
18
|
+
attr_accessor :first_name
|
19
|
+
|
20
|
+
attr_accessor :last_name
|
21
|
+
|
22
|
+
attr_accessor :bank_code
|
23
|
+
|
24
|
+
attr_accessor :street
|
25
|
+
|
26
|
+
attr_accessor :bank_account
|
27
|
+
|
28
|
+
attr_accessor :bank_name
|
29
|
+
|
30
|
+
attr_accessor :branch_code
|
31
|
+
|
32
|
+
attr_accessor :swift_code
|
33
|
+
|
34
|
+
attr_accessor :transfer_reason_code
|
35
|
+
|
36
|
+
attr_accessor :identity_card_type
|
37
|
+
|
38
|
+
attr_accessor :identity_card_id
|
39
|
+
|
40
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
41
|
+
def self.attribute_map
|
42
|
+
{
|
43
|
+
:'first_name' => :'first_name',
|
44
|
+
:'last_name' => :'last_name',
|
45
|
+
:'bank_code' => :'bank_code',
|
46
|
+
:'street' => :'street',
|
47
|
+
:'bank_account' => :'bank_account',
|
48
|
+
:'bank_name' => :'bank_name',
|
49
|
+
:'branch_code' => :'branch_code',
|
50
|
+
:'swift_code' => :'swift_code',
|
51
|
+
:'transfer_reason_code' => :'transfer_reason_code',
|
52
|
+
:'identity_card_type' => :'identity_card_type',
|
53
|
+
:'identity_card_id' => :'identity_card_id'
|
54
|
+
}
|
55
|
+
end
|
56
|
+
|
57
|
+
# Attribute type mapping.
|
58
|
+
def self.openapi_types
|
59
|
+
{
|
60
|
+
:'first_name' => :'String',
|
61
|
+
:'last_name' => :'String',
|
62
|
+
:'bank_code' => :'String',
|
63
|
+
:'street' => :'String',
|
64
|
+
:'bank_account' => :'String',
|
65
|
+
:'bank_name' => :'String',
|
66
|
+
:'branch_code' => :'String',
|
67
|
+
:'swift_code' => :'String',
|
68
|
+
:'transfer_reason_code' => :'String',
|
69
|
+
:'identity_card_type' => :'PayoutMethodIdentityCardTypeEnum',
|
70
|
+
:'identity_card_id' => :'String'
|
71
|
+
}
|
72
|
+
end
|
73
|
+
|
74
|
+
# Initializes the object
|
75
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
76
|
+
def initialize(attributes = {})
|
77
|
+
if (!attributes.is_a?(Hash))
|
78
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::PayoutMethodDetailsKESBank` initialize method"
|
79
|
+
end
|
80
|
+
|
81
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
82
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
83
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
84
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::PayoutMethodDetailsKESBank`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
85
|
+
end
|
86
|
+
h[k.to_sym] = v
|
87
|
+
}
|
88
|
+
|
89
|
+
if attributes.key?(:'first_name')
|
90
|
+
self.first_name = attributes[:'first_name']
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes.key?(:'last_name')
|
94
|
+
self.last_name = attributes[:'last_name']
|
95
|
+
end
|
96
|
+
|
97
|
+
if attributes.key?(:'bank_code')
|
98
|
+
self.bank_code = attributes[:'bank_code']
|
99
|
+
end
|
100
|
+
|
101
|
+
if attributes.key?(:'street')
|
102
|
+
self.street = attributes[:'street']
|
103
|
+
end
|
104
|
+
|
105
|
+
if attributes.key?(:'bank_account')
|
106
|
+
self.bank_account = attributes[:'bank_account']
|
107
|
+
end
|
108
|
+
|
109
|
+
if attributes.key?(:'bank_name')
|
110
|
+
self.bank_name = attributes[:'bank_name']
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes.key?(:'branch_code')
|
114
|
+
self.branch_code = attributes[:'branch_code']
|
115
|
+
end
|
116
|
+
|
117
|
+
if attributes.key?(:'swift_code')
|
118
|
+
self.swift_code = attributes[:'swift_code']
|
119
|
+
end
|
120
|
+
|
121
|
+
if attributes.key?(:'transfer_reason_code')
|
122
|
+
self.transfer_reason_code = attributes[:'transfer_reason_code']
|
123
|
+
end
|
124
|
+
|
125
|
+
if attributes.key?(:'identity_card_type')
|
126
|
+
self.identity_card_type = attributes[:'identity_card_type']
|
127
|
+
end
|
128
|
+
|
129
|
+
if attributes.key?(:'identity_card_id')
|
130
|
+
self.identity_card_id = attributes[:'identity_card_id']
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
135
|
+
# @return Array for valid properties with the reasons
|
136
|
+
def list_invalid_properties
|
137
|
+
invalid_properties = Array.new
|
138
|
+
if @first_name.nil?
|
139
|
+
invalid_properties.push('invalid value for "first_name", first_name cannot be nil.')
|
140
|
+
end
|
141
|
+
|
142
|
+
if @last_name.nil?
|
143
|
+
invalid_properties.push('invalid value for "last_name", last_name cannot be nil.')
|
144
|
+
end
|
145
|
+
|
146
|
+
if @bank_code.nil?
|
147
|
+
invalid_properties.push('invalid value for "bank_code", bank_code cannot be nil.')
|
148
|
+
end
|
149
|
+
|
150
|
+
if @street.nil?
|
151
|
+
invalid_properties.push('invalid value for "street", street cannot be nil.')
|
152
|
+
end
|
153
|
+
|
154
|
+
if @bank_account.nil?
|
155
|
+
invalid_properties.push('invalid value for "bank_account", bank_account cannot be nil.')
|
156
|
+
end
|
157
|
+
|
158
|
+
if @bank_name.nil?
|
159
|
+
invalid_properties.push('invalid value for "bank_name", bank_name cannot be nil.')
|
160
|
+
end
|
161
|
+
|
162
|
+
if @swift_code.nil?
|
163
|
+
invalid_properties.push('invalid value for "swift_code", swift_code cannot be nil.')
|
164
|
+
end
|
165
|
+
|
166
|
+
if @transfer_reason_code.nil?
|
167
|
+
invalid_properties.push('invalid value for "transfer_reason_code", transfer_reason_code cannot be nil.')
|
168
|
+
end
|
169
|
+
|
170
|
+
if @identity_card_type.nil?
|
171
|
+
invalid_properties.push('invalid value for "identity_card_type", identity_card_type cannot be nil.')
|
172
|
+
end
|
173
|
+
|
174
|
+
if @identity_card_id.nil?
|
175
|
+
invalid_properties.push('invalid value for "identity_card_id", identity_card_id cannot be nil.')
|
176
|
+
end
|
177
|
+
|
178
|
+
invalid_properties
|
179
|
+
end
|
180
|
+
|
181
|
+
# Check to see if the all the properties in the model are valid
|
182
|
+
# @return true if the model is valid
|
183
|
+
def valid?
|
184
|
+
return false if @first_name.nil?
|
185
|
+
return false if @last_name.nil?
|
186
|
+
return false if @bank_code.nil?
|
187
|
+
return false if @street.nil?
|
188
|
+
return false if @bank_account.nil?
|
189
|
+
return false if @bank_name.nil?
|
190
|
+
return false if @swift_code.nil?
|
191
|
+
return false if @transfer_reason_code.nil?
|
192
|
+
return false if @identity_card_type.nil?
|
193
|
+
return false if @identity_card_id.nil?
|
194
|
+
true
|
195
|
+
end
|
196
|
+
|
197
|
+
# Checks equality by comparing each attribute.
|
198
|
+
# @param [Object] Object to be compared
|
199
|
+
def ==(o)
|
200
|
+
return true if self.equal?(o)
|
201
|
+
self.class == o.class &&
|
202
|
+
first_name == o.first_name &&
|
203
|
+
last_name == o.last_name &&
|
204
|
+
bank_code == o.bank_code &&
|
205
|
+
street == o.street &&
|
206
|
+
bank_account == o.bank_account &&
|
207
|
+
bank_name == o.bank_name &&
|
208
|
+
branch_code == o.branch_code &&
|
209
|
+
swift_code == o.swift_code &&
|
210
|
+
transfer_reason_code == o.transfer_reason_code &&
|
211
|
+
identity_card_type == o.identity_card_type &&
|
212
|
+
identity_card_id == o.identity_card_id
|
213
|
+
end
|
214
|
+
|
215
|
+
# @see the `==` method
|
216
|
+
# @param [Object] Object to be compared
|
217
|
+
def eql?(o)
|
218
|
+
self == o
|
219
|
+
end
|
220
|
+
|
221
|
+
# Calculates hash code according to all attributes.
|
222
|
+
# @return [Integer] Hash code
|
223
|
+
def hash
|
224
|
+
[first_name, last_name, bank_code, street, bank_account, bank_name, branch_code, swift_code, transfer_reason_code, identity_card_type, identity_card_id].hash
|
225
|
+
end
|
226
|
+
|
227
|
+
require 'active_support/core_ext/hash'
|
228
|
+
require 'active_support/hash_with_indifferent_access.rb'
|
229
|
+
# Builds the object from hash
|
230
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
231
|
+
# @return [Object] Returns the model itself
|
232
|
+
def build_from_hash(attributes)
|
233
|
+
return nil unless attributes.is_a?(Hash)
|
234
|
+
self.class.openapi_types.each_pair do |key, type|
|
235
|
+
if type =~ /\AArray<(.*)>/i
|
236
|
+
# check to ensure the input is an array given that the the attribute
|
237
|
+
# is documented as an array but the input is not
|
238
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
239
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
240
|
+
end
|
241
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
242
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
243
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
244
|
+
end
|
245
|
+
|
246
|
+
self
|
247
|
+
end
|
248
|
+
|
249
|
+
# Deserializes the data based on type
|
250
|
+
# @param string type Data type
|
251
|
+
# @param string value Value to be deserialized
|
252
|
+
# @return [Object] Deserialized data
|
253
|
+
def _deserialize(type, value)
|
254
|
+
case type.to_sym
|
255
|
+
when :DateTime
|
256
|
+
DateTime.parse(value)
|
257
|
+
when :Date
|
258
|
+
Date.parse(value)
|
259
|
+
when :String
|
260
|
+
value.to_s
|
261
|
+
when :Integer
|
262
|
+
value.to_i
|
263
|
+
when :Float
|
264
|
+
value.to_f
|
265
|
+
when :Boolean
|
266
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
267
|
+
true
|
268
|
+
else
|
269
|
+
false
|
270
|
+
end
|
271
|
+
when :Object
|
272
|
+
# generic object (usually a Hash), return directly
|
273
|
+
value
|
274
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
275
|
+
inner_type = Regexp.last_match[:inner_type]
|
276
|
+
value.map { |v| _deserialize(inner_type, v) }
|
277
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
278
|
+
k_type = Regexp.last_match[:k_type]
|
279
|
+
v_type = Regexp.last_match[:v_type]
|
280
|
+
{}.tap do |hash|
|
281
|
+
value.each do |k, v|
|
282
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
283
|
+
end
|
284
|
+
end
|
285
|
+
else # model
|
286
|
+
temp_model = TransferZero.const_get(type).new
|
287
|
+
temp_model.build_from_hash(value)
|
288
|
+
end
|
289
|
+
end
|
290
|
+
|
291
|
+
# Returns the string representation of the object
|
292
|
+
# @return [String] String presentation of the object
|
293
|
+
def to_s
|
294
|
+
to_hash.to_s
|
295
|
+
end
|
296
|
+
|
297
|
+
# to_body is an alias to to_hash (backward compatibility)
|
298
|
+
# @return [Hash] Returns the object in the form of hash
|
299
|
+
def to_body
|
300
|
+
to_hash
|
301
|
+
end
|
302
|
+
|
303
|
+
# Returns the object in the form of hash
|
304
|
+
# @return [Hash] Returns the object in the form of hash
|
305
|
+
def to_hash
|
306
|
+
hash = {}
|
307
|
+
self.class.attribute_map.each_pair do |attr, param|
|
308
|
+
value = self.send(attr)
|
309
|
+
next if value.nil?
|
310
|
+
hash[param] = _to_hash(value)
|
311
|
+
end
|
312
|
+
::ActiveSupport::HashWithIndifferentAccess.new(hash)
|
313
|
+
end
|
314
|
+
|
315
|
+
def [](key)
|
316
|
+
to_hash[key]
|
317
|
+
end
|
318
|
+
|
319
|
+
def dig(*args)
|
320
|
+
to_hash.dig(*args)
|
321
|
+
end
|
322
|
+
|
323
|
+
# Outputs non-array value in the form of hash
|
324
|
+
# For object, use to_hash. Otherwise, just return the value
|
325
|
+
# @param [Object] value Any valid value
|
326
|
+
# @return [Hash] Returns the value in the form of hash
|
327
|
+
def _to_hash(value)
|
328
|
+
if value.is_a?(Array)
|
329
|
+
value.compact.map { |v| _to_hash(v) }
|
330
|
+
elsif value.is_a?(Hash)
|
331
|
+
{}.tap do |hash|
|
332
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
333
|
+
end
|
334
|
+
elsif value.respond_to? :to_hash
|
335
|
+
value.to_hash
|
336
|
+
else
|
337
|
+
value
|
338
|
+
end
|
339
|
+
end
|
340
|
+
|
341
|
+
end
|
342
|
+
|
343
|
+
end
|