transferzero-sdk 1.15.1 → 1.18.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 +89 -0
- data/README.md +8 -5
- data/docs/PayoutMethod.md +1 -1
- data/docs/PayoutMethodDetails.md +4 -2
- data/docs/PayoutMethodDetailsGNFMobile.md +23 -0
- data/docs/PayoutMethodDetailsKESBank.md +3 -1
- data/docs/PayoutMethodDetailsKESMobile.md +3 -1
- data/docs/PayoutMethodDetailsUSDBank.md +1 -1
- data/docs/PayoutMethodDetailsUSDCash.md +23 -0
- data/docs/PayoutMethodDetailsXAFMobile.md +25 -0
- data/docs/PayoutMethodDetailsXOFBank.md +3 -1
- data/docs/PayoutMethodDetailsXOFMobile.md +3 -1
- data/docs/PayoutMethodDetailsZARBank.md +2 -0
- data/docs/{PayoutMethodCountryEnumUSDBank.md → PayoutMethodTransferReasonEnum.md} +2 -2
- data/docs/Recipient.md +2 -0
- data/docs/Sender.md +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 +14 -7
- data/lib/transferzero-sdk/models/payout_method_details_gnf_mobile.rb +250 -0
- data/lib/transferzero-sdk/models/payout_method_details_kes_bank.rb +11 -7
- data/lib/transferzero-sdk/models/payout_method_details_kes_mobile.rb +11 -7
- data/lib/transferzero-sdk/models/payout_method_details_mobile.rb +1 -1
- data/lib/transferzero-sdk/models/payout_method_details_usd_bank.rb +2 -2
- data/lib/transferzero-sdk/models/payout_method_details_usd_cash.rb +250 -0
- data/lib/transferzero-sdk/models/payout_method_details_xaf_mobile.rb +259 -0
- data/lib/transferzero-sdk/models/payout_method_details_xof_bank.rb +14 -5
- data/lib/transferzero-sdk/models/payout_method_details_xof_mobile.rb +14 -5
- data/lib/transferzero-sdk/models/payout_method_details_zar_bank.rb +11 -2
- data/lib/transferzero-sdk/models/payout_method_mobile_provider_enum.rb +3 -0
- data/lib/transferzero-sdk/models/payout_method_transfer_reason_enum.rb +137 -0
- data/lib/transferzero-sdk/models/recipient.rb +45 -1
- data/lib/transferzero-sdk/models/sender.rb +11 -1
- data/lib/transferzero-sdk/version.rb +1 -1
- data/lib/transferzero-sdk.rb +4 -1
- data/spec/models/payout_method_details_gnf_mobile_spec.rb +59 -0
- data/spec/models/payout_method_details_usd_cash_spec.rb +59 -0
- data/spec/models/payout_method_details_xaf_mobile_spec.rb +65 -0
- data/spec/models/{payout_method_country_enum_usd_bank_spec.rb → payout_method_transfer_reason_enum_spec.rb} +6 -6
- data/transferzero-sdk-1.16.1.gem +0 -0
- metadata +21 -7
- data/lib/transferzero-sdk/models/payout_method_country_enum_usd_bank.rb +0 -269
@@ -0,0 +1,259 @@
|
|
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\": \"674044436\", // local or international cameroon format \"mobile_provider\": \"orange\", // or mtn\" \"country\" // Optional; Values: \"CM\" } ```
|
17
|
+
class PayoutMethodDetailsXAFMobile
|
18
|
+
attr_accessor :first_name
|
19
|
+
|
20
|
+
attr_accessor :last_name
|
21
|
+
|
22
|
+
attr_accessor :phone_number
|
23
|
+
|
24
|
+
attr_accessor :mobile_provider
|
25
|
+
|
26
|
+
attr_accessor :country
|
27
|
+
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
29
|
+
def self.attribute_map
|
30
|
+
{
|
31
|
+
:'first_name' => :'first_name',
|
32
|
+
:'last_name' => :'last_name',
|
33
|
+
:'phone_number' => :'phone_number',
|
34
|
+
:'mobile_provider' => :'mobile_provider',
|
35
|
+
:'country' => :'country'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Attribute type mapping.
|
40
|
+
def self.openapi_types
|
41
|
+
{
|
42
|
+
:'first_name' => :'String',
|
43
|
+
:'last_name' => :'String',
|
44
|
+
:'phone_number' => :'String',
|
45
|
+
:'mobile_provider' => :'PayoutMethodMobileProviderEnum',
|
46
|
+
:'country' => :'PayoutMethodCountryEnum'
|
47
|
+
}
|
48
|
+
end
|
49
|
+
|
50
|
+
# Initializes the object
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
52
|
+
def initialize(attributes = {})
|
53
|
+
if (!attributes.is_a?(Hash))
|
54
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::PayoutMethodDetailsXAFMobile` initialize method"
|
55
|
+
end
|
56
|
+
|
57
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
58
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
59
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
60
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::PayoutMethodDetailsXAFMobile`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
61
|
+
end
|
62
|
+
h[k.to_sym] = v
|
63
|
+
}
|
64
|
+
|
65
|
+
if attributes.key?(:'first_name')
|
66
|
+
self.first_name = attributes[:'first_name']
|
67
|
+
end
|
68
|
+
|
69
|
+
if attributes.key?(:'last_name')
|
70
|
+
self.last_name = attributes[:'last_name']
|
71
|
+
end
|
72
|
+
|
73
|
+
if attributes.key?(:'phone_number')
|
74
|
+
self.phone_number = attributes[:'phone_number']
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes.key?(:'mobile_provider')
|
78
|
+
self.mobile_provider = attributes[:'mobile_provider']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes.key?(:'country')
|
82
|
+
self.country = attributes[:'country']
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
87
|
+
# @return Array for valid properties with the reasons
|
88
|
+
def list_invalid_properties
|
89
|
+
invalid_properties = Array.new
|
90
|
+
if @first_name.nil?
|
91
|
+
invalid_properties.push('invalid value for "first_name", first_name cannot be nil.')
|
92
|
+
end
|
93
|
+
|
94
|
+
if @last_name.nil?
|
95
|
+
invalid_properties.push('invalid value for "last_name", last_name cannot be nil.')
|
96
|
+
end
|
97
|
+
|
98
|
+
if @phone_number.nil?
|
99
|
+
invalid_properties.push('invalid value for "phone_number", phone_number cannot be nil.')
|
100
|
+
end
|
101
|
+
|
102
|
+
if @mobile_provider.nil?
|
103
|
+
invalid_properties.push('invalid value for "mobile_provider", mobile_provider cannot be nil.')
|
104
|
+
end
|
105
|
+
|
106
|
+
invalid_properties
|
107
|
+
end
|
108
|
+
|
109
|
+
# Check to see if the all the properties in the model are valid
|
110
|
+
# @return true if the model is valid
|
111
|
+
def valid?
|
112
|
+
return false if @first_name.nil?
|
113
|
+
return false if @last_name.nil?
|
114
|
+
return false if @phone_number.nil?
|
115
|
+
return false if @mobile_provider.nil?
|
116
|
+
true
|
117
|
+
end
|
118
|
+
|
119
|
+
# Checks equality by comparing each attribute.
|
120
|
+
# @param [Object] Object to be compared
|
121
|
+
def ==(o)
|
122
|
+
return true if self.equal?(o)
|
123
|
+
self.class == o.class &&
|
124
|
+
first_name == o.first_name &&
|
125
|
+
last_name == o.last_name &&
|
126
|
+
phone_number == o.phone_number &&
|
127
|
+
mobile_provider == o.mobile_provider &&
|
128
|
+
country == o.country
|
129
|
+
end
|
130
|
+
|
131
|
+
# @see the `==` method
|
132
|
+
# @param [Object] Object to be compared
|
133
|
+
def eql?(o)
|
134
|
+
self == o
|
135
|
+
end
|
136
|
+
|
137
|
+
# Calculates hash code according to all attributes.
|
138
|
+
# @return [Integer] Hash code
|
139
|
+
def hash
|
140
|
+
[first_name, last_name, phone_number, mobile_provider, country].hash
|
141
|
+
end
|
142
|
+
|
143
|
+
require 'active_support/core_ext/hash'
|
144
|
+
require 'active_support/hash_with_indifferent_access.rb'
|
145
|
+
# Builds the object from hash
|
146
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
147
|
+
# @return [Object] Returns the model itself
|
148
|
+
def build_from_hash(attributes)
|
149
|
+
return nil unless attributes.is_a?(Hash)
|
150
|
+
self.class.openapi_types.each_pair do |key, type|
|
151
|
+
if type =~ /\AArray<(.*)>/i
|
152
|
+
# check to ensure the input is an array given that the the attribute
|
153
|
+
# is documented as an array but the input is not
|
154
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
155
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
156
|
+
end
|
157
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
158
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
159
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
160
|
+
end
|
161
|
+
|
162
|
+
self
|
163
|
+
end
|
164
|
+
|
165
|
+
# Deserializes the data based on type
|
166
|
+
# @param string type Data type
|
167
|
+
# @param string value Value to be deserialized
|
168
|
+
# @return [Object] Deserialized data
|
169
|
+
def _deserialize(type, value)
|
170
|
+
case type.to_sym
|
171
|
+
when :DateTime
|
172
|
+
DateTime.parse(value)
|
173
|
+
when :Date
|
174
|
+
Date.parse(value)
|
175
|
+
when :String
|
176
|
+
value.to_s
|
177
|
+
when :Integer
|
178
|
+
value.to_i
|
179
|
+
when :Float
|
180
|
+
value.to_f
|
181
|
+
when :Boolean
|
182
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
183
|
+
true
|
184
|
+
else
|
185
|
+
false
|
186
|
+
end
|
187
|
+
when :Object
|
188
|
+
# generic object (usually a Hash), return directly
|
189
|
+
value
|
190
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
191
|
+
inner_type = Regexp.last_match[:inner_type]
|
192
|
+
value.map { |v| _deserialize(inner_type, v) }
|
193
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
194
|
+
k_type = Regexp.last_match[:k_type]
|
195
|
+
v_type = Regexp.last_match[:v_type]
|
196
|
+
{}.tap do |hash|
|
197
|
+
value.each do |k, v|
|
198
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
199
|
+
end
|
200
|
+
end
|
201
|
+
else # model
|
202
|
+
temp_model = TransferZero.const_get(type).new
|
203
|
+
temp_model.build_from_hash(value)
|
204
|
+
end
|
205
|
+
end
|
206
|
+
|
207
|
+
# Returns the string representation of the object
|
208
|
+
# @return [String] String presentation of the object
|
209
|
+
def to_s
|
210
|
+
to_hash.to_s
|
211
|
+
end
|
212
|
+
|
213
|
+
# to_body is an alias to to_hash (backward compatibility)
|
214
|
+
# @return [Hash] Returns the object in the form of hash
|
215
|
+
def to_body
|
216
|
+
to_hash
|
217
|
+
end
|
218
|
+
|
219
|
+
# Returns the object in the form of hash
|
220
|
+
# @return [Hash] Returns the object in the form of hash
|
221
|
+
def to_hash
|
222
|
+
hash = {}
|
223
|
+
self.class.attribute_map.each_pair do |attr, param|
|
224
|
+
value = self.send(attr)
|
225
|
+
next if value.nil?
|
226
|
+
hash[param] = _to_hash(value)
|
227
|
+
end
|
228
|
+
::ActiveSupport::HashWithIndifferentAccess.new(hash)
|
229
|
+
end
|
230
|
+
|
231
|
+
def [](key)
|
232
|
+
to_hash[key]
|
233
|
+
end
|
234
|
+
|
235
|
+
def dig(*args)
|
236
|
+
to_hash.dig(*args)
|
237
|
+
end
|
238
|
+
|
239
|
+
# Outputs non-array value in the form of hash
|
240
|
+
# For object, use to_hash. Otherwise, just return the value
|
241
|
+
# @param [Object] value Any valid value
|
242
|
+
# @return [Hash] Returns the value in the form of hash
|
243
|
+
def _to_hash(value)
|
244
|
+
if value.is_a?(Array)
|
245
|
+
value.compact.map { |v| _to_hash(v) }
|
246
|
+
elsif value.is_a?(Hash)
|
247
|
+
{}.tap do |hash|
|
248
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
249
|
+
end
|
250
|
+
elsif value.respond_to? :to_hash
|
251
|
+
value.to_hash
|
252
|
+
else
|
253
|
+
value
|
254
|
+
end
|
255
|
+
end
|
256
|
+
|
257
|
+
end
|
258
|
+
|
259
|
+
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\", \"iban\": \"BJ0610100100144390000769\", # BBAN format \"bank_name\": \"Bank Of Africa Bénin\", \"bank_country\": \"BJ\", # ISO country code for Benin \"bank_code\": \"BJ061\" } ``` See [XOF Bank](https://docs.transferzero.com/docs/payout-details/#xofbank) documentation for the bank_code
|
16
|
+
# ```JSON \"details\": { \"first_name\": \"First\", \"last_name\": \"Last\", \"iban\": \"BJ0610100100144390000769\", # BBAN format \"bank_name\": \"Bank Of Africa Bénin\", \"bank_country\": \"BJ\", # ISO country code for Benin \"bank_code\": \"BJ061\", \"transfer_reason\": \"personal_account\" } ``` See [XOF Bank](https://docs.transferzero.com/docs/payout-details/#xofbank) documentation for the bank_code and transfer_reason lists
|
17
17
|
class PayoutMethodDetailsXOFBank
|
18
18
|
attr_accessor :first_name
|
19
19
|
|
@@ -27,6 +27,8 @@ class PayoutMethodDetailsXOFBank
|
|
27
27
|
|
28
28
|
attr_accessor :bank_code
|
29
29
|
|
30
|
+
attr_accessor :transfer_reason
|
31
|
+
|
30
32
|
# Attribute mapping from ruby-style variable name to JSON key.
|
31
33
|
def self.attribute_map
|
32
34
|
{
|
@@ -35,7 +37,8 @@ class PayoutMethodDetailsXOFBank
|
|
35
37
|
:'iban' => :'iban',
|
36
38
|
:'bank_name' => :'bank_name',
|
37
39
|
:'bank_country' => :'bank_country',
|
38
|
-
:'bank_code' => :'bank_code'
|
40
|
+
:'bank_code' => :'bank_code',
|
41
|
+
:'transfer_reason' => :'transfer_reason'
|
39
42
|
}
|
40
43
|
end
|
41
44
|
|
@@ -47,7 +50,8 @@ class PayoutMethodDetailsXOFBank
|
|
47
50
|
:'iban' => :'String',
|
48
51
|
:'bank_name' => :'String',
|
49
52
|
:'bank_country' => :'String',
|
50
|
-
:'bank_code' => :'String'
|
53
|
+
:'bank_code' => :'String',
|
54
|
+
:'transfer_reason' => :'PayoutMethodTransferReasonEnum'
|
51
55
|
}
|
52
56
|
end
|
53
57
|
|
@@ -89,6 +93,10 @@ class PayoutMethodDetailsXOFBank
|
|
89
93
|
if attributes.key?(:'bank_code')
|
90
94
|
self.bank_code = attributes[:'bank_code']
|
91
95
|
end
|
96
|
+
|
97
|
+
if attributes.key?(:'transfer_reason')
|
98
|
+
self.transfer_reason = attributes[:'transfer_reason']
|
99
|
+
end
|
92
100
|
end
|
93
101
|
|
94
102
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -129,7 +137,8 @@ class PayoutMethodDetailsXOFBank
|
|
129
137
|
iban == o.iban &&
|
130
138
|
bank_name == o.bank_name &&
|
131
139
|
bank_country == o.bank_country &&
|
132
|
-
bank_code == o.bank_code
|
140
|
+
bank_code == o.bank_code &&
|
141
|
+
transfer_reason == o.transfer_reason
|
133
142
|
end
|
134
143
|
|
135
144
|
# @see the `==` method
|
@@ -141,7 +150,7 @@ class PayoutMethodDetailsXOFBank
|
|
141
150
|
# Calculates hash code according to all attributes.
|
142
151
|
# @return [Integer] Hash code
|
143
152
|
def hash
|
144
|
-
[first_name, last_name, iban, bank_name, bank_country, bank_code].hash
|
153
|
+
[first_name, last_name, iban, bank_name, bank_country, bank_code, transfer_reason].hash
|
145
154
|
end
|
146
155
|
|
147
156
|
require 'active_support/core_ext/hash'
|
@@ -13,7 +13,7 @@ OpenAPI Generator version: 4.0.0-beta3
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module TransferZero
|
16
|
-
# ```JSON \"details\": { \"first_name\": \"First\", \"last_name\": \"Last\", \"phone_number\": \"774044436\",
|
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; \"orange\" or \"mobicash\" for Burkina Faso and Mali \"country\" // Optional; Values: \"SN\" for Senegal; \"CI\" for Ivory Coast; \"ML\" for Mali; \"BF\" for Burkina Faso; Default value is \"SN\" \"transfer_reason\": \"personal_account\" // mandatory for Mali payouts, optional otherwise } ```
|
17
17
|
class PayoutMethodDetailsXOFMobile
|
18
18
|
attr_accessor :first_name
|
19
19
|
|
@@ -25,6 +25,8 @@ class PayoutMethodDetailsXOFMobile
|
|
25
25
|
|
26
26
|
attr_accessor :country
|
27
27
|
|
28
|
+
attr_accessor :transfer_reason
|
29
|
+
|
28
30
|
# Attribute mapping from ruby-style variable name to JSON key.
|
29
31
|
def self.attribute_map
|
30
32
|
{
|
@@ -32,7 +34,8 @@ class PayoutMethodDetailsXOFMobile
|
|
32
34
|
:'last_name' => :'last_name',
|
33
35
|
:'phone_number' => :'phone_number',
|
34
36
|
:'mobile_provider' => :'mobile_provider',
|
35
|
-
:'country' => :'country'
|
37
|
+
:'country' => :'country',
|
38
|
+
:'transfer_reason' => :'transfer_reason'
|
36
39
|
}
|
37
40
|
end
|
38
41
|
|
@@ -43,7 +46,8 @@ class PayoutMethodDetailsXOFMobile
|
|
43
46
|
:'last_name' => :'String',
|
44
47
|
:'phone_number' => :'String',
|
45
48
|
:'mobile_provider' => :'PayoutMethodMobileProviderEnum',
|
46
|
-
:'country' => :'PayoutMethodCountryEnum'
|
49
|
+
:'country' => :'PayoutMethodCountryEnum',
|
50
|
+
:'transfer_reason' => :'PayoutMethodTransferReasonEnum'
|
47
51
|
}
|
48
52
|
end
|
49
53
|
|
@@ -81,6 +85,10 @@ class PayoutMethodDetailsXOFMobile
|
|
81
85
|
if attributes.key?(:'country')
|
82
86
|
self.country = attributes[:'country']
|
83
87
|
end
|
88
|
+
|
89
|
+
if attributes.key?(:'transfer_reason')
|
90
|
+
self.transfer_reason = attributes[:'transfer_reason']
|
91
|
+
end
|
84
92
|
end
|
85
93
|
|
86
94
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -125,7 +133,8 @@ class PayoutMethodDetailsXOFMobile
|
|
125
133
|
last_name == o.last_name &&
|
126
134
|
phone_number == o.phone_number &&
|
127
135
|
mobile_provider == o.mobile_provider &&
|
128
|
-
country == o.country
|
136
|
+
country == o.country &&
|
137
|
+
transfer_reason == o.transfer_reason
|
129
138
|
end
|
130
139
|
|
131
140
|
# @see the `==` method
|
@@ -137,7 +146,7 @@ class PayoutMethodDetailsXOFMobile
|
|
137
146
|
# Calculates hash code according to all attributes.
|
138
147
|
# @return [Integer] Hash code
|
139
148
|
def hash
|
140
|
-
[first_name, last_name, phone_number, mobile_provider, country].hash
|
149
|
+
[first_name, last_name, phone_number, mobile_provider, country, transfer_reason].hash
|
141
150
|
end
|
142
151
|
|
143
152
|
require 'active_support/core_ext/hash'
|
@@ -13,7 +13,7 @@ OpenAPI Generator version: 4.0.0-beta3
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module TransferZero
|
16
|
-
# ```JSON \"details\": { \"first_name\": \"First\", // Mandatory for personal payouts; \"last_name\": \"Last\", // Mandatory for personal payouts; \"name\" \"First Ltd\", // Mandatory for business payouts; \"contact_first_name\" \"Business\", // Mandatory for business payouts; \"contact_last_name\" \"Contact\", // Mandatory for business payouts; \"street\": \"Main Street\", \"postal_code\": \"AB0001\", \"city\": \"Cape Town\", \"email\": \"recipient@email.com\", \"bank_name\" 'Bank Zero', // Optional \"bank_code\": \"334810\", \"bank_account\": \"12345678\", \"phone_number\": \"+27119785313\", \"
|
16
|
+
# ```JSON \"details\": { \"first_name\": \"First\", // Mandatory for personal payouts; \"last_name\": \"Last\", // Mandatory for personal payouts; \"name\" \"First Ltd\", // Mandatory for business payouts; \"contact_first_name\" \"Business\", // Mandatory for business payouts; \"contact_last_name\" \"Contact\", // Mandatory for business payouts; \"street\": \"Main Street\", \"postal_code\": \"AB0001\", \"city\": \"Cape Town\", \"email\": \"recipient@email.com\", \"bank_name\" 'Bank Zero', // Optional \"bank_code\": \"334810\", \"bank_account\": \"12345678\", \"phone_number\": \"+27119785313\", \"transfer_reason\": \"personal_account\", // New transfer reason field \"legal_entity_type\": \"sole_proprietorship\", // Optional; Default value is \"person\"; Mandatory for business payouts; \"nature_of_business\": \"mining\", // Optional for business payouts; \"registration_number\": \"17364BGC\" // Optional for business payouts; } ``` See [ZAR Bank](https://docs.transferzero.com/docs/payout-details/#zarbank) documentation for the bank_code and transfer_reason lists
|
17
17
|
class PayoutMethodDetailsZARBank
|
18
18
|
attr_accessor :first_name
|
19
19
|
|
@@ -35,6 +35,8 @@ class PayoutMethodDetailsZARBank
|
|
35
35
|
|
36
36
|
attr_accessor :transfer_reason_code
|
37
37
|
|
38
|
+
attr_accessor :transfer_reason
|
39
|
+
|
38
40
|
attr_accessor :name
|
39
41
|
|
40
42
|
attr_accessor :contact_first_name
|
@@ -60,6 +62,7 @@ class PayoutMethodDetailsZARBank
|
|
60
62
|
:'bank_account' => :'bank_account',
|
61
63
|
:'phone_number' => :'phone_number',
|
62
64
|
:'transfer_reason_code' => :'transfer_reason_code',
|
65
|
+
:'transfer_reason' => :'transfer_reason',
|
63
66
|
:'name' => :'name',
|
64
67
|
:'contact_first_name' => :'contact_first_name',
|
65
68
|
:'contact_last_name' => :'contact_last_name',
|
@@ -82,6 +85,7 @@ class PayoutMethodDetailsZARBank
|
|
82
85
|
:'bank_account' => :'String',
|
83
86
|
:'phone_number' => :'String',
|
84
87
|
:'transfer_reason_code' => :'String',
|
88
|
+
:'transfer_reason' => :'PayoutMethodTransferReasonEnum',
|
85
89
|
:'name' => :'String',
|
86
90
|
:'contact_first_name' => :'String',
|
87
91
|
:'contact_last_name' => :'String',
|
@@ -146,6 +150,10 @@ class PayoutMethodDetailsZARBank
|
|
146
150
|
self.transfer_reason_code = attributes[:'transfer_reason_code']
|
147
151
|
end
|
148
152
|
|
153
|
+
if attributes.key?(:'transfer_reason')
|
154
|
+
self.transfer_reason = attributes[:'transfer_reason']
|
155
|
+
end
|
156
|
+
|
149
157
|
if attributes.key?(:'name')
|
150
158
|
self.name = attributes[:'name']
|
151
159
|
end
|
@@ -239,6 +247,7 @@ class PayoutMethodDetailsZARBank
|
|
239
247
|
bank_account == o.bank_account &&
|
240
248
|
phone_number == o.phone_number &&
|
241
249
|
transfer_reason_code == o.transfer_reason_code &&
|
250
|
+
transfer_reason == o.transfer_reason &&
|
242
251
|
name == o.name &&
|
243
252
|
contact_first_name == o.contact_first_name &&
|
244
253
|
contact_last_name == o.contact_last_name &&
|
@@ -256,7 +265,7 @@ class PayoutMethodDetailsZARBank
|
|
256
265
|
# Calculates hash code according to all attributes.
|
257
266
|
# @return [Integer] Hash code
|
258
267
|
def hash
|
259
|
-
[first_name, last_name, street, postal_code, city, email, bank_code, bank_account, phone_number, transfer_reason_code, name, contact_first_name, contact_last_name, registration_number, nature_of_business, legal_entity_type].hash
|
268
|
+
[first_name, last_name, street, postal_code, city, email, bank_code, bank_account, phone_number, transfer_reason_code, transfer_reason, name, contact_first_name, contact_last_name, registration_number, nature_of_business, legal_entity_type].hash
|
260
269
|
end
|
261
270
|
|
262
271
|
require 'active_support/core_ext/hash'
|
@@ -22,6 +22,9 @@ class PayoutMethodMobileProviderEnum
|
|
22
22
|
AIRTEL = "airtel".freeze
|
23
23
|
VODAFONE = "vodafone".freeze
|
24
24
|
MPESA = "mpesa".freeze
|
25
|
+
AFRICELL = "africell".freeze
|
26
|
+
TELECOM = "telecom".freeze
|
27
|
+
MOBICASH = "mobicash".freeze
|
25
28
|
|
26
29
|
# Builds the enum from string
|
27
30
|
# @param [String] The enum value in the form of the string
|
@@ -0,0 +1,137 @@
|
|
1
|
+
=begin
|
2
|
+
#TransferZero API
|
3
|
+
|
4
|
+
#Reference documentation for the TransferZero API V1
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.0.0-beta3
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module TransferZero
|
16
|
+
class PayoutMethodTransferReasonEnum
|
17
|
+
|
18
|
+
PERSONAL_ACCOUNT = "personal_account".freeze
|
19
|
+
DONATIONS_AND_GIFTS = "donations_and_gifts".freeze
|
20
|
+
THIRD_PARTY_PERSON_ACCOUNT = "third_party_person_account".freeze
|
21
|
+
MORTGAGE_REPAYMENTS = "mortgage_repayments".freeze
|
22
|
+
BUSINESS_TRAVEL_PAYMENTS = "business_travel_payments".freeze
|
23
|
+
PERSONAL_TRAVEL_PAYMENTS = "personal_travel_payments".freeze
|
24
|
+
TUITION_FEES = "tuition_fees".freeze
|
25
|
+
FINANCIAL_COMMISSION_FEES = "financial_commission_fees".freeze
|
26
|
+
FINANCIAL_SERVICES_PROCEEDS = "financial_services_proceeds".freeze
|
27
|
+
INDIVIDUAL_PROPERTY_INVESTMENTS = "individual_property_investments".freeze
|
28
|
+
OTHER_INVESTMENTS = "other_investments".freeze
|
29
|
+
CORPORATE_PROPERTY_INVESTMENTS = "corporate_property_investments".freeze
|
30
|
+
IMMIGRANTS_CAPITAL_PAYMENTS = "immigrants_capital_payments".freeze
|
31
|
+
LEGAL_SERVICES = "legal_services".freeze
|
32
|
+
ACCOUNTING_SERVICES = "accounting_services".freeze
|
33
|
+
CONSULTING_SERVICES = "consulting_services".freeze
|
34
|
+
PUBLIC_RELATION_SERVICES = "public_relation_services".freeze
|
35
|
+
ADS_AND_MARKET_RESEARCH_SERVICES = "ads_and_market_research_services".freeze
|
36
|
+
MANAGERIAL_SERVICES = "managerial_services".freeze
|
37
|
+
MEDICAL_AND_DENTAL_SERVICES = "medical_and_dental_services".freeze
|
38
|
+
EDUCATIONAL_SERVICES = "educational_services".freeze
|
39
|
+
OPERATIONAL_LEASING = "operational_leasing".freeze
|
40
|
+
CULTURAL_AND_RECREATIONAL_SERVICES = "cultural_and_recreational_services".freeze
|
41
|
+
SALARY_RESIDENT_OUT_COUNTRY = "salary_resident_out_country".freeze
|
42
|
+
SALARY_NON_RESIDENT_IN_COUNTRY = "salary_non_resident_in_country".freeze
|
43
|
+
SALARY_CONTRACT_WORKER_IN_COUNTRY = "salary_contract_worker_in_country".freeze
|
44
|
+
SOCIAL_SECURITY_SCHEMES = "social_security_schemes".freeze
|
45
|
+
CHARITIES_AND_RELIGIOUS_BODIES = "charities_and_religious_bodies".freeze
|
46
|
+
DONATIONS_AND_AID_TO_GOVERNMENT = "donations_and_aid_to_government".freeze
|
47
|
+
DONATIONS_AND_AID_TO_PRIVATE = "donations_and_aid_to_private".freeze
|
48
|
+
PENSIONS = "pensions".freeze
|
49
|
+
ANNUITIES = "annuities".freeze
|
50
|
+
INHERITANCES = "inheritances".freeze
|
51
|
+
ALIMONY = "alimony".freeze
|
52
|
+
TAX_INCOME = "tax_income".freeze
|
53
|
+
TAX_VAT_REFUNDS = "tax_vat_refunds".freeze
|
54
|
+
TAX_OTHER = "tax_other".freeze
|
55
|
+
NON_LIFE_INSURANCE_PREMIUMS = "non_life_insurance_premiums".freeze
|
56
|
+
LIFE_INSURANCE_PREMIUMS = "life_insurance_premiums".freeze
|
57
|
+
DIVIDENDS = "dividends".freeze
|
58
|
+
BRANCH_PROFITS = "branch_profits".freeze
|
59
|
+
COMMISION_OR_BROKERAGE = "commision_or_brokerage".freeze
|
60
|
+
RENTAL = "rental".freeze
|
61
|
+
INDIVIDUAL_INVESTMENT_INCOME_FROM_ABROAD = "individual_investment_income_from_abroad".freeze
|
62
|
+
SHARES_SALE = "shares_sale".freeze
|
63
|
+
BONDS_SALE = "bonds_sale".freeze
|
64
|
+
MONEY_MARKET_INSTRUMENTS_SALE = "money_market_instruments_sale".freeze
|
65
|
+
FUNDS_REPATRIATION_OF_FOREIGN_BANK_ACCOUNT = "funds_repatriation_of_foreign_bank_account".freeze
|
66
|
+
MUTUAL_FUNDS_SALE_OR_COLLECTIVE_INVESTMENT = "mutual_funds_sale_or_collective_investment".freeze
|
67
|
+
OVERSEAS_PROPERTY_SALE = "overseas_property_sale".freeze
|
68
|
+
SALE_AND_REPATRIATION_OF_OTHER_INVESTMENT = "sale_and_repatriation_of_other_investment".freeze
|
69
|
+
REPATRIATION_SOUTH_AFRICAN_RESERVE_BANK_INSTRUCTION = "repatriation_south_african_reserve_bank_instruction".freeze
|
70
|
+
RESIDENT_LOAN_FROM_NON_RESIDENT_SHARE_HOLDER = "resident_loan_from_non_resident_share_holder".freeze
|
71
|
+
RESIDENT_LOAN_FROM_NON_RESIDENT_THIRD_PARTY = "resident_loan_from_non_resident_third_party".freeze
|
72
|
+
RESIDENT_LOAN_REPAYMENT_FROM_OVERSEAS_LIVING_SOUTH_AFRICAN = "resident_loan_repayment_from_overseas_living_south_african".freeze
|
73
|
+
STUDY_LOAN_REPAYMENT = "study_loan_repayment".freeze
|
74
|
+
SHAREHOLDERS_LOAN_REPAYMENT = "shareholders_loan_repayment".freeze
|
75
|
+
THIRD_PARTY_LOAN_REPAYMENT = "third_party_loan_repayment".freeze
|
76
|
+
TRADE_FINANCE_LOAN_REPAYMENT = "trade_finance_loan_repayment".freeze
|
77
|
+
RESEARCH_AND_DEVELOPMENT_PROCEEDS = "research_and_development_proceeds".freeze
|
78
|
+
RESEARCH_AND_DEVELOPMENT_FUNDING = "research_and_development_funding".freeze
|
79
|
+
MACHINARY_AND_EQUIPMENT_REPAIRS = "machinary_and_equipment_repairs".freeze
|
80
|
+
ARCHITECTURAL_ENGINEERING_TECHNICAL_SERVICES = "architectural_engineering_technical_services".freeze
|
81
|
+
AGRIGULTURAL_MINING_WASTE_DEPOLLUTION_SERVICES = "agrigultural_mining_waste_depollution_services".freeze
|
82
|
+
CONSTRUCTION_SERVICES = "construction_services".freeze
|
83
|
+
TELECOMMUNICATION_SERVICES = "telecommunication_services".freeze
|
84
|
+
DATA_NEWS_AGENCY_FEES = "data_news_agency_fees".freeze
|
85
|
+
ROAD_PASSENGER_SERVICES = "road_passenger_services".freeze
|
86
|
+
RAIL_PASSENGER_SERVICES = "rail_passenger_services".freeze
|
87
|
+
SEA_PASSENGER_SERVICES = "sea_passenger_services".freeze
|
88
|
+
AIR_PASSENGER_SERVICES = "air_passenger_services".freeze
|
89
|
+
ROAD_FREIGHT_SERVICES = "road_freight_services".freeze
|
90
|
+
RAIL_FREIGHT_SERVICES = "rail_freight_services".freeze
|
91
|
+
SEA_FREIGHT_SERVICES = "sea_freight_services".freeze
|
92
|
+
AIR_FREIGHT_SERVICES = "air_freight_services".freeze
|
93
|
+
ROAD_POSTAL_AND_COURIER_SERVICES = "road_postal_and_courier_services".freeze
|
94
|
+
RAIL_POSTAL_AND_COURIER_SERVICES = "rail_postal_and_courier_services".freeze
|
95
|
+
SEA_POSTAL_AND_COURIER_SERVICES = "sea_postal_and_courier_services".freeze
|
96
|
+
AIR_POSTAL_AND_COURIER_SERVICES = "air_postal_and_courier_services".freeze
|
97
|
+
LISTED_SHARES_INVESTMENT = "listed_shares_investment".freeze
|
98
|
+
NON_LISTED_SHARES_INVESTMENT = "non_listed_shares_investment".freeze
|
99
|
+
MONEY_MARKET_INSTRUMENTS_INVESTMENT = "money_market_instruments_investment".freeze
|
100
|
+
LISTED_BONDS_INVESTMENT = "listed_bonds_investment".freeze
|
101
|
+
NON_LISTED_BONDS_INVESTMENT = "non_listed_bonds_investment".freeze
|
102
|
+
REPRODUCE_DISTRIBUTE_RIGHTS_LICENSE = "reproduce_distribute_rights_license".freeze
|
103
|
+
PATENTS_AND_INVESTIONS_RIGHTS_LICENSE = "patents_and_investions_rights_license".freeze
|
104
|
+
PATTERNS_AND_DESIGNS_RIGHTS = "patterns_and_designs_rights".freeze
|
105
|
+
COPYRIGHTS_RIGHTS = "copyrights_rights".freeze
|
106
|
+
FRANCHISES_AND_TRADEMARKS_RIGHTS = "franchises_and_trademarks_rights".freeze
|
107
|
+
PATENTS_AND_INVENTIONS_DISPOSAL = "patents_and_inventions_disposal".freeze
|
108
|
+
PATTERNS_AND_DESIGNS_DISPOSAL = "patterns_and_designs_disposal".freeze
|
109
|
+
COPYRIGHTS_DISPOSAL = "copyrights_disposal".freeze
|
110
|
+
FRANCHISES_AND_TRADEMARKS_DISPOSAL = "franchises_and_trademarks_disposal".freeze
|
111
|
+
SALES_OF_MANUSCRIPTS_SOUND_RECORDINGS_FILMS = "sales_of_manuscripts_sound_recordings_films".freeze
|
112
|
+
FUNDS_RELATED_TO_RECORDING_PRODUCTIONS = "funds_related_to_recording_productions".freeze
|
113
|
+
SOFTWARE_OWNERSHIP_RIGHTS_SALE = "software_ownership_rights_sale".freeze
|
114
|
+
COMPUTER_SERVICES = "computer_services".freeze
|
115
|
+
CUSTOMISED_SOFTWARE_SALES = "customised_software_sales".freeze
|
116
|
+
NON_CUSTOMISED_SOFTWARE_ON_PHYSICAL_MEDIA_PERIODIC_LICENCE_SALE = "non_customised_software_on_physical_media_periodic_licence_sale".freeze
|
117
|
+
NON_CUSTOMISED_SOFTWARE_ON_PYISICAL_MEDIA_PERPETUAL_USE_SALE = "non_customised_software_on_pyisical_media_perpetual_use_sale".freeze
|
118
|
+
NON_CUSTOMISED_SOFTWARE_FOR_DOWNLOADING_ELECTRONICALLY_MADE_PERIODIC_LICENCE_SALE = "non_customised_software_for_downloading_electronically_made_periodic_licence_sale".freeze
|
119
|
+
NON_CUSTOMISED_SOFTWARE_FOR_DOWNLOADING_ELECTRONICALLY_MADE_SINGLE_PAYMENT_SALE = "non_customised_software_for_downloading_electronically_made_single_payment_sale".freeze
|
120
|
+
FIXED_ASSETS_DONATIONS_TO_SA_GOVERNMENT = "fixed_assets_donations_to_sa_government".freeze
|
121
|
+
FIXED_ASSETS_DONATIONS_TO_CORPORATE_ENTITIES = "fixed_assets_donations_to_corporate_entities".freeze
|
122
|
+
PROPERTY_DISINVESTMENT_BY_CORPORATE_ENTITY_RESIDENT = "property_disinvestment_by_corporate_entity_resident".freeze
|
123
|
+
OTHER_BUSINESS_SERVICES = "other_business_services".freeze
|
124
|
+
INSTITUTIONAL_INVESTOR_DISINVESTMENT = "institutional_investor_disinvestment".freeze
|
125
|
+
GOVERNMENT_SERVICES = "government_services".freeze
|
126
|
+
|
127
|
+
# Builds the enum from string
|
128
|
+
# @param [String] The enum value in the form of the string
|
129
|
+
# @return [String] The enum value
|
130
|
+
def build_from_hash(value)
|
131
|
+
constantValues = PayoutMethodTransferReasonEnum.constants.select { |c| PayoutMethodTransferReasonEnum::const_get(c) == value }
|
132
|
+
raise "Invalid ENUM value #{value} for class #PayoutMethodTransferReasonEnum" if constantValues.empty? && !value.empty?
|
133
|
+
value
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
137
|
+
end
|