transferzero-sdk 1.21.0 → 1.22.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -4
- data/docs/PayoutMethod.md +1 -1
- data/docs/PayoutMethodDetailsXAFBank.md +33 -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 +1 -0
- data/lib/transferzero-sdk/models/payout_method_details_xaf_bank.rb +290 -0
- data/lib/transferzero-sdk/version.rb +1 -1
- data/lib/transferzero-sdk.rb +1 -0
- data/spec/models/payout_method_details_xaf_bank_spec.rb +89 -0
- data/transferzero-sdk-1.21.0.gem +0 -0
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6ec24346563dd2a0a0080678a49e90a5b92a52d55fc22382fbae9b6d6eeb450
|
4
|
+
data.tar.gz: d93e10ea062d689b9250ea4032cf7fa81922822d6251de65ed61481972bda723
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 581f78102bbd05ae44a48690f9f930361aea8837f9465cd88a9c614586bd20f4ee99fb44e907b30016a558be90e72fa0d1de4984fb346293874c4df0286082f4
|
7
|
+
data.tar.gz: 20b2840dc7c9320515fe8d72d303af8e96e7774d2898d58a16dc95bb46c518f5366b8c1dc7498ec317243058507ac0fd71218e2541bd05d3de6f95287da0deb7
|
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.22.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.22.0.gem
|
35
35
|
```
|
36
|
-
(for development, run `gem install --dev ./transferzero-sdk-1.
|
36
|
+
(for development, run `gem install --dev ./transferzero-sdk-1.22.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.22.0'
|
43
43
|
|
44
44
|
### Install from Git
|
45
45
|
|
@@ -221,6 +221,7 @@ Class | Method | HTTP request | Description
|
|
221
221
|
- [TransferZero::PayoutMethodDetailsNGNBank](docs/PayoutMethodDetailsNGNBank.md)
|
222
222
|
- [TransferZero::PayoutMethodDetailsUSDBank](docs/PayoutMethodDetailsUSDBank.md)
|
223
223
|
- [TransferZero::PayoutMethodDetailsUSDCash](docs/PayoutMethodDetailsUSDCash.md)
|
224
|
+
- [TransferZero::PayoutMethodDetailsXAFBank](docs/PayoutMethodDetailsXAFBank.md)
|
224
225
|
- [TransferZero::PayoutMethodDetailsXAFMobile](docs/PayoutMethodDetailsXAFMobile.md)
|
225
226
|
- [TransferZero::PayoutMethodDetailsXOFBank](docs/PayoutMethodDetailsXOFBank.md)
|
226
227
|
- [TransferZero::PayoutMethodDetailsXOFCash](docs/PayoutMethodDetailsXOFCash.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 *** - `USD::Cash` - for USD cash remittance payments. *** Currently Nigeria only and in Beta phase *** - `KES::Bank` - for Kenyan bank account payments. - `KES::Mobile` - for Kenyan mobile money payments. - `XAF::Mobile` - for mobile money payments to Cameroon. - `GNF::Mobile` - for mobile money payments to Guinea. 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 *** - `USD::Cash` - for USD cash remittance payments. *** Currently Nigeria only and in Beta phase *** - `KES::Bank` - for Kenyan bank account payments. - `KES::Mobile` - for Kenyan mobile money payments. - `XAF::Mobile` - for mobile money payments to Cameroon. - `XAF::Bank` - for Cameroon bank account payments.. - `GNF::Mobile` - for mobile money payments to Guinea. 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]
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# TransferZero::PayoutMethodDetailsXAFBank
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**first_name** | **String** | |
|
8
|
+
**last_name** | **String** | |
|
9
|
+
**iban** | **String** | |
|
10
|
+
**bank_account** | **String** | | [optional]
|
11
|
+
**bank_name** | **String** | | [optional]
|
12
|
+
**bank_country** | **String** | | [optional]
|
13
|
+
**bank_code** | **String** | | [optional]
|
14
|
+
**sort_code** | **String** | | [optional]
|
15
|
+
**transfer_reason** | [**PayoutMethodTransferReasonEnum**](PayoutMethodTransferReasonEnum.md) | | [optional]
|
16
|
+
|
17
|
+
## Code Sample
|
18
|
+
|
19
|
+
```ruby
|
20
|
+
require 'TransferZero'
|
21
|
+
|
22
|
+
instance = TransferZero::PayoutMethodDetailsXAFBank.new(first_name: null,
|
23
|
+
last_name: null,
|
24
|
+
iban: null,
|
25
|
+
bank_account: null,
|
26
|
+
bank_name: null,
|
27
|
+
bank_country: null,
|
28
|
+
bank_code: null,
|
29
|
+
sort_code: null,
|
30
|
+
transfer_reason: null)
|
31
|
+
```
|
32
|
+
|
33
|
+
|
@@ -36,7 +36,7 @@ module TransferZero
|
|
36
36
|
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
|
37
37
|
def initialize(config = Configuration.default)
|
38
38
|
@config = config
|
39
|
-
@user_agent = "TransferZero-SDK/Ruby/1.
|
39
|
+
@user_agent = "TransferZero-SDK/Ruby/1.22.0"
|
40
40
|
@default_headers = {
|
41
41
|
'Content-Type' => 'application/json',
|
42
42
|
'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 *** - `USD::Cash` - for USD cash remittance payments. *** Currently Nigeria only and in Beta phase *** - `KES::Bank` - for Kenyan bank account payments. - `KES::Mobile` - for Kenyan mobile money payments. - `XAF::Mobile` - for mobile money payments to Cameroon. - `GNF::Mobile` - for mobile money payments to Guinea. 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 *** - `USD::Cash` - for USD cash remittance payments. *** Currently Nigeria only and in Beta phase *** - `KES::Bank` - for Kenyan bank account payments. - `KES::Mobile` - for Kenyan mobile money payments. - `XAF::Mobile` - for mobile money payments to Cameroon. - `XAF::Bank` - for Cameroon bank account payments.. - `GNF::Mobile` - for mobile money payments to Guinea. 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
|
@@ -195,6 +195,7 @@ class PayoutMethodDetails
|
|
195
195
|
:'PayoutMethodDetailsNGNBank',
|
196
196
|
:'PayoutMethodDetailsUSDBank',
|
197
197
|
:'PayoutMethodDetailsUSDCash',
|
198
|
+
:'PayoutMethodDetailsXAFBank',
|
198
199
|
:'PayoutMethodDetailsXAFMobile',
|
199
200
|
:'PayoutMethodDetailsXOFBank',
|
200
201
|
:'PayoutMethodDetailsXOFCash',
|
@@ -0,0 +1,290 @@
|
|
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\", \"iban\": \"CM2110033052090901100045910\", # IBAN format \"bank_account\": \"09011000459\", \"bank_name\": \"United Bank for Africa - Cameroon\", \"bank_country\": \"CM\", # ISO country code for Cameroon \"bank_code\": \"10033\", \"sort_code\": \"10\", \"transfer_reason\": \"personal_account\" } ``` See [XAF Bank](https://docs.transferzero.com/docs/payout-details/#xafbank) documentation for the bank_code and transfer_reason lists
|
17
|
+
class PayoutMethodDetailsXAFBank
|
18
|
+
attr_accessor :first_name
|
19
|
+
|
20
|
+
attr_accessor :last_name
|
21
|
+
|
22
|
+
attr_accessor :iban
|
23
|
+
|
24
|
+
attr_accessor :bank_account
|
25
|
+
|
26
|
+
attr_accessor :bank_name
|
27
|
+
|
28
|
+
attr_accessor :bank_country
|
29
|
+
|
30
|
+
attr_accessor :bank_code
|
31
|
+
|
32
|
+
attr_accessor :sort_code
|
33
|
+
|
34
|
+
attr_accessor :transfer_reason
|
35
|
+
|
36
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
37
|
+
def self.attribute_map
|
38
|
+
{
|
39
|
+
:'first_name' => :'first_name',
|
40
|
+
:'last_name' => :'last_name',
|
41
|
+
:'iban' => :'iban',
|
42
|
+
:'bank_account' => :'bank_account',
|
43
|
+
:'bank_name' => :'bank_name',
|
44
|
+
:'bank_country' => :'bank_country',
|
45
|
+
:'bank_code' => :'bank_code',
|
46
|
+
:'sort_code' => :'sort_code',
|
47
|
+
:'transfer_reason' => :'transfer_reason'
|
48
|
+
}
|
49
|
+
end
|
50
|
+
|
51
|
+
# Attribute type mapping.
|
52
|
+
def self.openapi_types
|
53
|
+
{
|
54
|
+
:'first_name' => :'String',
|
55
|
+
:'last_name' => :'String',
|
56
|
+
:'iban' => :'String',
|
57
|
+
:'bank_account' => :'String',
|
58
|
+
:'bank_name' => :'String',
|
59
|
+
:'bank_country' => :'String',
|
60
|
+
:'bank_code' => :'String',
|
61
|
+
:'sort_code' => :'String',
|
62
|
+
:'transfer_reason' => :'PayoutMethodTransferReasonEnum'
|
63
|
+
}
|
64
|
+
end
|
65
|
+
|
66
|
+
# Initializes the object
|
67
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
68
|
+
def initialize(attributes = {})
|
69
|
+
if (!attributes.is_a?(Hash))
|
70
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::PayoutMethodDetailsXAFBank` initialize method"
|
71
|
+
end
|
72
|
+
|
73
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
74
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
75
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
76
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::PayoutMethodDetailsXAFBank`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
77
|
+
end
|
78
|
+
h[k.to_sym] = v
|
79
|
+
}
|
80
|
+
|
81
|
+
if attributes.key?(:'first_name')
|
82
|
+
self.first_name = attributes[:'first_name']
|
83
|
+
end
|
84
|
+
|
85
|
+
if attributes.key?(:'last_name')
|
86
|
+
self.last_name = attributes[:'last_name']
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes.key?(:'iban')
|
90
|
+
self.iban = attributes[:'iban']
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes.key?(:'bank_account')
|
94
|
+
self.bank_account = attributes[:'bank_account']
|
95
|
+
end
|
96
|
+
|
97
|
+
if attributes.key?(:'bank_name')
|
98
|
+
self.bank_name = attributes[:'bank_name']
|
99
|
+
end
|
100
|
+
|
101
|
+
if attributes.key?(:'bank_country')
|
102
|
+
self.bank_country = attributes[:'bank_country']
|
103
|
+
end
|
104
|
+
|
105
|
+
if attributes.key?(:'bank_code')
|
106
|
+
self.bank_code = attributes[:'bank_code']
|
107
|
+
end
|
108
|
+
|
109
|
+
if attributes.key?(:'sort_code')
|
110
|
+
self.sort_code = attributes[:'sort_code']
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes.key?(:'transfer_reason')
|
114
|
+
self.transfer_reason = attributes[:'transfer_reason']
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
119
|
+
# @return Array for valid properties with the reasons
|
120
|
+
def list_invalid_properties
|
121
|
+
invalid_properties = Array.new
|
122
|
+
if @first_name.nil?
|
123
|
+
invalid_properties.push('invalid value for "first_name", first_name cannot be nil.')
|
124
|
+
end
|
125
|
+
|
126
|
+
if @last_name.nil?
|
127
|
+
invalid_properties.push('invalid value for "last_name", last_name cannot be nil.')
|
128
|
+
end
|
129
|
+
|
130
|
+
if @iban.nil?
|
131
|
+
invalid_properties.push('invalid value for "iban", iban cannot be nil.')
|
132
|
+
end
|
133
|
+
|
134
|
+
invalid_properties
|
135
|
+
end
|
136
|
+
|
137
|
+
# Check to see if the all the properties in the model are valid
|
138
|
+
# @return true if the model is valid
|
139
|
+
def valid?
|
140
|
+
return false if @first_name.nil?
|
141
|
+
return false if @last_name.nil?
|
142
|
+
return false if @iban.nil?
|
143
|
+
true
|
144
|
+
end
|
145
|
+
|
146
|
+
# Checks equality by comparing each attribute.
|
147
|
+
# @param [Object] Object to be compared
|
148
|
+
def ==(o)
|
149
|
+
return true if self.equal?(o)
|
150
|
+
self.class == o.class &&
|
151
|
+
first_name == o.first_name &&
|
152
|
+
last_name == o.last_name &&
|
153
|
+
iban == o.iban &&
|
154
|
+
bank_account == o.bank_account &&
|
155
|
+
bank_name == o.bank_name &&
|
156
|
+
bank_country == o.bank_country &&
|
157
|
+
bank_code == o.bank_code &&
|
158
|
+
sort_code == o.sort_code &&
|
159
|
+
transfer_reason == o.transfer_reason
|
160
|
+
end
|
161
|
+
|
162
|
+
# @see the `==` method
|
163
|
+
# @param [Object] Object to be compared
|
164
|
+
def eql?(o)
|
165
|
+
self == o
|
166
|
+
end
|
167
|
+
|
168
|
+
# Calculates hash code according to all attributes.
|
169
|
+
# @return [Integer] Hash code
|
170
|
+
def hash
|
171
|
+
[first_name, last_name, iban, bank_account, bank_name, bank_country, bank_code, sort_code, transfer_reason].hash
|
172
|
+
end
|
173
|
+
|
174
|
+
require 'active_support/core_ext/hash'
|
175
|
+
require 'active_support/hash_with_indifferent_access.rb'
|
176
|
+
# Builds the object from hash
|
177
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
178
|
+
# @return [Object] Returns the model itself
|
179
|
+
def build_from_hash(attributes)
|
180
|
+
return nil unless attributes.is_a?(Hash)
|
181
|
+
self.class.openapi_types.each_pair do |key, type|
|
182
|
+
if type =~ /\AArray<(.*)>/i
|
183
|
+
# check to ensure the input is an array given that the the attribute
|
184
|
+
# is documented as an array but the input is not
|
185
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
186
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
187
|
+
end
|
188
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
189
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
190
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
191
|
+
end
|
192
|
+
|
193
|
+
self
|
194
|
+
end
|
195
|
+
|
196
|
+
# Deserializes the data based on type
|
197
|
+
# @param string type Data type
|
198
|
+
# @param string value Value to be deserialized
|
199
|
+
# @return [Object] Deserialized data
|
200
|
+
def _deserialize(type, value)
|
201
|
+
case type.to_sym
|
202
|
+
when :DateTime
|
203
|
+
DateTime.parse(value)
|
204
|
+
when :Date
|
205
|
+
Date.parse(value)
|
206
|
+
when :String
|
207
|
+
value.to_s
|
208
|
+
when :Integer
|
209
|
+
value.to_i
|
210
|
+
when :Float
|
211
|
+
value.to_f
|
212
|
+
when :Boolean
|
213
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
214
|
+
true
|
215
|
+
else
|
216
|
+
false
|
217
|
+
end
|
218
|
+
when :Object
|
219
|
+
# generic object (usually a Hash), return directly
|
220
|
+
value
|
221
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
222
|
+
inner_type = Regexp.last_match[:inner_type]
|
223
|
+
value.map { |v| _deserialize(inner_type, v) }
|
224
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
225
|
+
k_type = Regexp.last_match[:k_type]
|
226
|
+
v_type = Regexp.last_match[:v_type]
|
227
|
+
{}.tap do |hash|
|
228
|
+
value.each do |k, v|
|
229
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
230
|
+
end
|
231
|
+
end
|
232
|
+
else # model
|
233
|
+
temp_model = TransferZero.const_get(type).new
|
234
|
+
temp_model.build_from_hash(value)
|
235
|
+
end
|
236
|
+
end
|
237
|
+
|
238
|
+
# Returns the string representation of the object
|
239
|
+
# @return [String] String presentation of the object
|
240
|
+
def to_s
|
241
|
+
to_hash.to_s
|
242
|
+
end
|
243
|
+
|
244
|
+
# to_body is an alias to to_hash (backward compatibility)
|
245
|
+
# @return [Hash] Returns the object in the form of hash
|
246
|
+
def to_body
|
247
|
+
to_hash
|
248
|
+
end
|
249
|
+
|
250
|
+
# Returns the object in the form of hash
|
251
|
+
# @return [Hash] Returns the object in the form of hash
|
252
|
+
def to_hash
|
253
|
+
hash = {}
|
254
|
+
self.class.attribute_map.each_pair do |attr, param|
|
255
|
+
value = self.send(attr)
|
256
|
+
next if value.nil?
|
257
|
+
hash[param] = _to_hash(value)
|
258
|
+
end
|
259
|
+
::ActiveSupport::HashWithIndifferentAccess.new(hash)
|
260
|
+
end
|
261
|
+
|
262
|
+
def [](key)
|
263
|
+
to_hash[key]
|
264
|
+
end
|
265
|
+
|
266
|
+
def dig(*args)
|
267
|
+
to_hash.dig(*args)
|
268
|
+
end
|
269
|
+
|
270
|
+
# Outputs non-array value in the form of hash
|
271
|
+
# For object, use to_hash. Otherwise, just return the value
|
272
|
+
# @param [Object] value Any valid value
|
273
|
+
# @return [Hash] Returns the value in the form of hash
|
274
|
+
def _to_hash(value)
|
275
|
+
if value.is_a?(Array)
|
276
|
+
value.compact.map { |v| _to_hash(v) }
|
277
|
+
elsif value.is_a?(Hash)
|
278
|
+
{}.tap do |hash|
|
279
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
280
|
+
end
|
281
|
+
elsif value.respond_to? :to_hash
|
282
|
+
value.to_hash
|
283
|
+
else
|
284
|
+
value
|
285
|
+
end
|
286
|
+
end
|
287
|
+
|
288
|
+
end
|
289
|
+
|
290
|
+
end
|
data/lib/transferzero-sdk.rb
CHANGED
@@ -81,6 +81,7 @@ require 'transferzero-sdk/models/payout_method_details_mobile'
|
|
81
81
|
require 'transferzero-sdk/models/payout_method_details_ngn_bank'
|
82
82
|
require 'transferzero-sdk/models/payout_method_details_usd_bank'
|
83
83
|
require 'transferzero-sdk/models/payout_method_details_usd_cash'
|
84
|
+
require 'transferzero-sdk/models/payout_method_details_xaf_bank'
|
84
85
|
require 'transferzero-sdk/models/payout_method_details_xaf_mobile'
|
85
86
|
require 'transferzero-sdk/models/payout_method_details_xof_bank'
|
86
87
|
require 'transferzero-sdk/models/payout_method_details_xof_cash'
|
@@ -0,0 +1,89 @@
|
|
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::PayoutMethodDetailsXAFBank
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'PayoutMethodDetailsXAFBank' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = TransferZero::PayoutMethodDetailsXAFBank.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of PayoutMethodDetailsXAFBank' do
|
31
|
+
it 'should create an instance of PayoutMethodDetailsXAFBank' do
|
32
|
+
expect(@instance).to be_instance_of(TransferZero::PayoutMethodDetailsXAFBank)
|
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 "iban"' 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
|
+
describe 'test attribute "bank_account"' do
|
54
|
+
it 'should work' do
|
55
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
describe 'test attribute "bank_name"' do
|
60
|
+
it 'should work' do
|
61
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
describe 'test attribute "bank_country"' do
|
66
|
+
it 'should work' do
|
67
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
describe 'test attribute "bank_code"' do
|
72
|
+
it 'should work' do
|
73
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
describe 'test attribute "sort_code"' do
|
78
|
+
it 'should work' do
|
79
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
describe 'test attribute "transfer_reason"' do
|
84
|
+
it 'should work' do
|
85
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
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.
|
4
|
+
version: 1.22.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TransferZero
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -169,6 +169,7 @@ files:
|
|
169
169
|
- docs/PayoutMethodDetailsNGNBank.md
|
170
170
|
- docs/PayoutMethodDetailsUSDBank.md
|
171
171
|
- docs/PayoutMethodDetailsUSDCash.md
|
172
|
+
- docs/PayoutMethodDetailsXAFBank.md
|
172
173
|
- docs/PayoutMethodDetailsXAFMobile.md
|
173
174
|
- docs/PayoutMethodDetailsXOFBank.md
|
174
175
|
- docs/PayoutMethodDetailsXOFCash.md
|
@@ -314,6 +315,7 @@ files:
|
|
314
315
|
- lib/transferzero-sdk/models/payout_method_details_ngn_bank.rb
|
315
316
|
- lib/transferzero-sdk/models/payout_method_details_usd_bank.rb
|
316
317
|
- lib/transferzero-sdk/models/payout_method_details_usd_cash.rb
|
318
|
+
- lib/transferzero-sdk/models/payout_method_details_xaf_bank.rb
|
317
319
|
- lib/transferzero-sdk/models/payout_method_details_xaf_mobile.rb
|
318
320
|
- lib/transferzero-sdk/models/payout_method_details_xof_bank.rb
|
319
321
|
- lib/transferzero-sdk/models/payout_method_details_xof_cash.rb
|
@@ -449,6 +451,7 @@ files:
|
|
449
451
|
- spec/models/payout_method_details_spec.rb
|
450
452
|
- spec/models/payout_method_details_usd_bank_spec.rb
|
451
453
|
- spec/models/payout_method_details_usd_cash_spec.rb
|
454
|
+
- spec/models/payout_method_details_xaf_bank_spec.rb
|
452
455
|
- spec/models/payout_method_details_xaf_mobile_spec.rb
|
453
456
|
- spec/models/payout_method_details_xof_bank_spec.rb
|
454
457
|
- spec/models/payout_method_details_xof_cash_spec.rb
|
@@ -513,6 +516,7 @@ files:
|
|
513
516
|
- transferzero-sdk-1.19.4.gem
|
514
517
|
- transferzero-sdk-1.19.5.gem
|
515
518
|
- transferzero-sdk-1.20.1.gem
|
519
|
+
- transferzero-sdk-1.21.0.gem
|
516
520
|
- transferzero-sdk.gemspec
|
517
521
|
homepage: https://github.com/transferzero/transferzero-sdk-ruby
|
518
522
|
licenses:
|
@@ -562,6 +566,7 @@ test_files:
|
|
562
566
|
- spec/models/payin_method_details_ngn_bank_spec.rb
|
563
567
|
- spec/models/payment_method_opposite_spec.rb
|
564
568
|
- spec/models/sender_webhook_spec.rb
|
569
|
+
- spec/models/payout_method_details_xaf_bank_spec.rb
|
565
570
|
- spec/models/webhook_definition_spec.rb
|
566
571
|
- spec/models/webhook_log_metadata_response_spec.rb
|
567
572
|
- spec/models/currency_list_response_spec.rb
|