transferzero-sdk 1.16.1 → 1.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +15 -4
- data/docs/Document.md +2 -0
- data/docs/PayinMethod.md +12 -4
- data/docs/PayinMethodDetails.md +5 -5
- data/docs/PayinMethodDetailsMobile.md +3 -3
- data/docs/PayinMethodDetailsNGNBank.md +2 -2
- data/docs/PayinMethodResponse.md +17 -0
- data/docs/PayinMethodState.md +16 -0
- data/docs/PayinMethodUxFlow.md +16 -0
- data/docs/PayinMethodsApi.md +256 -0
- 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/PayoutMethodDetailsXAFMobile.md +25 -0
- data/docs/PayoutMethodDetailsXOFBank.md +3 -1
- data/docs/PayoutMethodDetailsXOFCash.md +1 -1
- data/docs/PayoutMethodDetailsXOFMobile.md +3 -1
- data/docs/PayoutMethodDetailsZARBank.md +2 -0
- data/docs/PayoutMethodTransferReasonEnum.md +16 -0
- data/docs/RecipientStateReasonDetails.md +3 -3
- data/docs/Sender.md +4 -0
- data/docs/StateReasonDetails.md +23 -0
- data/lib/transferzero-sdk/api/payin_methods_api.rb +244 -0
- data/lib/transferzero-sdk/api_client.rb +1 -1
- data/lib/transferzero-sdk/models/document.rb +11 -1
- data/lib/transferzero-sdk/models/payin_method.rb +47 -9
- data/lib/transferzero-sdk/models/payin_method_details.rb +9 -15
- data/lib/transferzero-sdk/models/payin_method_details_mobile.rb +8 -14
- data/lib/transferzero-sdk/models/payin_method_details_ngn_bank.rb +2 -2
- data/lib/transferzero-sdk/models/payin_method_response.rb +202 -0
- data/lib/transferzero-sdk/models/payin_method_state.rb +39 -0
- data/lib/transferzero-sdk/models/payin_method_ux_flow.rb +34 -0
- data/lib/transferzero-sdk/models/payout_method.rb +1 -1
- data/lib/transferzero-sdk/models/payout_method_details.rb +17 -6
- 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_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_cash.rb +6 -1
- 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 +1 -0
- data/lib/transferzero-sdk/models/payout_method_transfer_reason_enum.rb +137 -0
- data/lib/transferzero-sdk/models/recipient_state_reason_details.rb +21 -2
- data/lib/transferzero-sdk/models/sender.rb +21 -1
- data/lib/transferzero-sdk/models/state_reason_details.rb +235 -0
- data/lib/transferzero-sdk/version.rb +1 -1
- data/lib/transferzero-sdk.rb +8 -0
- data/spec/api/payin_methods_api_spec.rb +84 -0
- data/spec/models/payin_method_response_spec.rb +41 -0
- data/spec/models/payin_method_state_spec.rb +35 -0
- data/spec/models/payin_method_ux_flow_spec.rb +35 -0
- data/spec/models/payout_method_details_gnf_mobile_spec.rb +59 -0
- data/spec/models/payout_method_details_xaf_mobile_spec.rb +65 -0
- data/spec/models/payout_method_transfer_reason_enum_spec.rb +35 -0
- data/spec/models/state_reason_details_spec.rb +59 -0
- data/transferzero-sdk-1.17.0.gem +0 -0
- metadata +36 -4
- data/Gemfile.lock +0 -89
@@ -13,19 +13,18 @@ OpenAPI Generator version: 4.0.0-beta3
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module TransferZero
|
16
|
-
# ```JSON \"details\": { \"phone_number\": \"+2569999999\",
|
16
|
+
# ```JSON \"details\": { \"phone_number\": \"+2569999999\", } ```
|
17
17
|
class PayinMethodDetailsMobile
|
18
18
|
# The phone number where the funds should be collected from
|
19
19
|
attr_accessor :phone_number
|
20
20
|
|
21
|
-
|
22
|
-
attr_accessor :send_instructions
|
21
|
+
attr_accessor :mobile_provider
|
23
22
|
|
24
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
25
24
|
def self.attribute_map
|
26
25
|
{
|
27
26
|
:'phone_number' => :'phone_number',
|
28
|
-
:'
|
27
|
+
:'mobile_provider' => :'mobile_provider'
|
29
28
|
}
|
30
29
|
end
|
31
30
|
|
@@ -33,7 +32,7 @@ class PayinMethodDetailsMobile
|
|
33
32
|
def self.openapi_types
|
34
33
|
{
|
35
34
|
:'phone_number' => :'String',
|
36
|
-
:'
|
35
|
+
:'mobile_provider' => :'PayoutMethodMobileProviderEnum'
|
37
36
|
}
|
38
37
|
end
|
39
38
|
|
@@ -56,8 +55,8 @@ class PayinMethodDetailsMobile
|
|
56
55
|
self.phone_number = attributes[:'phone_number']
|
57
56
|
end
|
58
57
|
|
59
|
-
if attributes.key?(:'
|
60
|
-
self.
|
58
|
+
if attributes.key?(:'mobile_provider')
|
59
|
+
self.mobile_provider = attributes[:'mobile_provider']
|
61
60
|
end
|
62
61
|
end
|
63
62
|
|
@@ -65,17 +64,12 @@ class PayinMethodDetailsMobile
|
|
65
64
|
# @return Array for valid properties with the reasons
|
66
65
|
def list_invalid_properties
|
67
66
|
invalid_properties = Array.new
|
68
|
-
if @phone_number.nil?
|
69
|
-
invalid_properties.push('invalid value for "phone_number", phone_number cannot be nil.')
|
70
|
-
end
|
71
|
-
|
72
67
|
invalid_properties
|
73
68
|
end
|
74
69
|
|
75
70
|
# Check to see if the all the properties in the model are valid
|
76
71
|
# @return true if the model is valid
|
77
72
|
def valid?
|
78
|
-
return false if @phone_number.nil?
|
79
73
|
true
|
80
74
|
end
|
81
75
|
|
@@ -85,7 +79,7 @@ class PayinMethodDetailsMobile
|
|
85
79
|
return true if self.equal?(o)
|
86
80
|
self.class == o.class &&
|
87
81
|
phone_number == o.phone_number &&
|
88
|
-
|
82
|
+
mobile_provider == o.mobile_provider
|
89
83
|
end
|
90
84
|
|
91
85
|
# @see the `==` method
|
@@ -97,7 +91,7 @@ class PayinMethodDetailsMobile
|
|
97
91
|
# Calculates hash code according to all attributes.
|
98
92
|
# @return [Integer] Hash code
|
99
93
|
def hash
|
100
|
-
[phone_number,
|
94
|
+
[phone_number, mobile_provider].hash
|
101
95
|
end
|
102
96
|
|
103
97
|
require 'active_support/core_ext/hash'
|
@@ -15,10 +15,10 @@ require 'date'
|
|
15
15
|
module TransferZero
|
16
16
|
# ```JSON \"details\": { \"redirect_url\": \"http://redirect.back.to\" } ```
|
17
17
|
class PayinMethodDetailsNGNBank
|
18
|
-
# The payment method which the
|
18
|
+
# The payment method which the sender will use to make the payments. Options are `bank`, `card` or you can leave empty to support both.
|
19
19
|
attr_accessor :payment_method
|
20
20
|
|
21
|
-
# This is where the
|
21
|
+
# This is where the sender should be redirected back when the payment has been finished
|
22
22
|
attr_accessor :redirect_url
|
23
23
|
|
24
24
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -0,0 +1,202 @@
|
|
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 PayinMethodResponse
|
17
|
+
attr_accessor :object
|
18
|
+
|
19
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
20
|
+
def self.attribute_map
|
21
|
+
{
|
22
|
+
:'object' => :'object'
|
23
|
+
}
|
24
|
+
end
|
25
|
+
|
26
|
+
# Attribute type mapping.
|
27
|
+
def self.openapi_types
|
28
|
+
{
|
29
|
+
:'object' => :'PayinMethod'
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# Initializes the object
|
34
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
35
|
+
def initialize(attributes = {})
|
36
|
+
if (!attributes.is_a?(Hash))
|
37
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::PayinMethodResponse` initialize method"
|
38
|
+
end
|
39
|
+
|
40
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
41
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
42
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
43
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::PayinMethodResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
44
|
+
end
|
45
|
+
h[k.to_sym] = v
|
46
|
+
}
|
47
|
+
|
48
|
+
if attributes.key?(:'object')
|
49
|
+
self.object = attributes[:'object']
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
54
|
+
# @return Array for valid properties with the reasons
|
55
|
+
def list_invalid_properties
|
56
|
+
invalid_properties = Array.new
|
57
|
+
invalid_properties
|
58
|
+
end
|
59
|
+
|
60
|
+
# Check to see if the all the properties in the model are valid
|
61
|
+
# @return true if the model is valid
|
62
|
+
def valid?
|
63
|
+
true
|
64
|
+
end
|
65
|
+
|
66
|
+
# Checks equality by comparing each attribute.
|
67
|
+
# @param [Object] Object to be compared
|
68
|
+
def ==(o)
|
69
|
+
return true if self.equal?(o)
|
70
|
+
self.class == o.class &&
|
71
|
+
object == o.object
|
72
|
+
end
|
73
|
+
|
74
|
+
# @see the `==` method
|
75
|
+
# @param [Object] Object to be compared
|
76
|
+
def eql?(o)
|
77
|
+
self == o
|
78
|
+
end
|
79
|
+
|
80
|
+
# Calculates hash code according to all attributes.
|
81
|
+
# @return [Integer] Hash code
|
82
|
+
def hash
|
83
|
+
[object].hash
|
84
|
+
end
|
85
|
+
|
86
|
+
require 'active_support/core_ext/hash'
|
87
|
+
require 'active_support/hash_with_indifferent_access.rb'
|
88
|
+
# Builds the object from hash
|
89
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
90
|
+
# @return [Object] Returns the model itself
|
91
|
+
def build_from_hash(attributes)
|
92
|
+
return nil unless attributes.is_a?(Hash)
|
93
|
+
self.class.openapi_types.each_pair do |key, type|
|
94
|
+
if type =~ /\AArray<(.*)>/i
|
95
|
+
# check to ensure the input is an array given that the the attribute
|
96
|
+
# is documented as an array but the input is not
|
97
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
98
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
99
|
+
end
|
100
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
101
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
102
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
103
|
+
end
|
104
|
+
|
105
|
+
self
|
106
|
+
end
|
107
|
+
|
108
|
+
# Deserializes the data based on type
|
109
|
+
# @param string type Data type
|
110
|
+
# @param string value Value to be deserialized
|
111
|
+
# @return [Object] Deserialized data
|
112
|
+
def _deserialize(type, value)
|
113
|
+
case type.to_sym
|
114
|
+
when :DateTime
|
115
|
+
DateTime.parse(value)
|
116
|
+
when :Date
|
117
|
+
Date.parse(value)
|
118
|
+
when :String
|
119
|
+
value.to_s
|
120
|
+
when :Integer
|
121
|
+
value.to_i
|
122
|
+
when :Float
|
123
|
+
value.to_f
|
124
|
+
when :Boolean
|
125
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
126
|
+
true
|
127
|
+
else
|
128
|
+
false
|
129
|
+
end
|
130
|
+
when :Object
|
131
|
+
# generic object (usually a Hash), return directly
|
132
|
+
value
|
133
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
134
|
+
inner_type = Regexp.last_match[:inner_type]
|
135
|
+
value.map { |v| _deserialize(inner_type, v) }
|
136
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
137
|
+
k_type = Regexp.last_match[:k_type]
|
138
|
+
v_type = Regexp.last_match[:v_type]
|
139
|
+
{}.tap do |hash|
|
140
|
+
value.each do |k, v|
|
141
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
142
|
+
end
|
143
|
+
end
|
144
|
+
else # model
|
145
|
+
temp_model = TransferZero.const_get(type).new
|
146
|
+
temp_model.build_from_hash(value)
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
150
|
+
# Returns the string representation of the object
|
151
|
+
# @return [String] String presentation of the object
|
152
|
+
def to_s
|
153
|
+
to_hash.to_s
|
154
|
+
end
|
155
|
+
|
156
|
+
# to_body is an alias to to_hash (backward compatibility)
|
157
|
+
# @return [Hash] Returns the object in the form of hash
|
158
|
+
def to_body
|
159
|
+
to_hash
|
160
|
+
end
|
161
|
+
|
162
|
+
# Returns the object in the form of hash
|
163
|
+
# @return [Hash] Returns the object in the form of hash
|
164
|
+
def to_hash
|
165
|
+
hash = {}
|
166
|
+
self.class.attribute_map.each_pair do |attr, param|
|
167
|
+
value = self.send(attr)
|
168
|
+
next if value.nil?
|
169
|
+
hash[param] = _to_hash(value)
|
170
|
+
end
|
171
|
+
::ActiveSupport::HashWithIndifferentAccess.new(hash)
|
172
|
+
end
|
173
|
+
|
174
|
+
def [](key)
|
175
|
+
to_hash[key]
|
176
|
+
end
|
177
|
+
|
178
|
+
def dig(*args)
|
179
|
+
to_hash.dig(*args)
|
180
|
+
end
|
181
|
+
|
182
|
+
# Outputs non-array value in the form of hash
|
183
|
+
# For object, use to_hash. Otherwise, just return the value
|
184
|
+
# @param [Object] value Any valid value
|
185
|
+
# @return [Hash] Returns the value in the form of hash
|
186
|
+
def _to_hash(value)
|
187
|
+
if value.is_a?(Array)
|
188
|
+
value.compact.map { |v| _to_hash(v) }
|
189
|
+
elsif value.is_a?(Hash)
|
190
|
+
{}.tap do |hash|
|
191
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
192
|
+
end
|
193
|
+
elsif value.respond_to? :to_hash
|
194
|
+
value.to_hash
|
195
|
+
else
|
196
|
+
value
|
197
|
+
end
|
198
|
+
end
|
199
|
+
|
200
|
+
end
|
201
|
+
|
202
|
+
end
|
@@ -0,0 +1,39 @@
|
|
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 PayinMethodState
|
17
|
+
|
18
|
+
INCOMPLETE = "incomplete".freeze
|
19
|
+
INITIAL = "initial".freeze
|
20
|
+
PENDING = "pending".freeze
|
21
|
+
SUCCESS = "success".freeze
|
22
|
+
PROCESSING = "processing".freeze
|
23
|
+
ERROR = "error".freeze
|
24
|
+
MISPAID = "mispaid".freeze
|
25
|
+
CANCELED = "canceled".freeze
|
26
|
+
REFUNDED = "refunded".freeze
|
27
|
+
EXCEPTION = "exception".freeze
|
28
|
+
|
29
|
+
# Builds the enum from string
|
30
|
+
# @param [String] The enum value in the form of the string
|
31
|
+
# @return [String] The enum value
|
32
|
+
def build_from_hash(value)
|
33
|
+
constantValues = PayinMethodState.constants.select { |c| PayinMethodState::const_get(c) == value }
|
34
|
+
raise "Invalid ENUM value #{value} for class #PayinMethodState" if constantValues.empty? && !value.empty?
|
35
|
+
value
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
@@ -0,0 +1,34 @@
|
|
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 PayinMethodUxFlow
|
17
|
+
|
18
|
+
USSD_POPUP = "ussd_popup".freeze
|
19
|
+
BANK_TRANSFER = "bank_transfer".freeze
|
20
|
+
HTTP_REDIRECT = "http_redirect".freeze
|
21
|
+
BLOCKCHAIN = "blockchain".freeze
|
22
|
+
UNKNOWN = "unknown".freeze
|
23
|
+
|
24
|
+
# Builds the enum from string
|
25
|
+
# @param [String] The enum value in the form of the string
|
26
|
+
# @return [String] The enum value
|
27
|
+
def build_from_hash(value)
|
28
|
+
constantValues = PayinMethodUxFlow.constants.select { |c| PayinMethodUxFlow::const_get(c) == value }
|
29
|
+
raise "Invalid ENUM value #{value} for class #PayinMethodUxFlow" if constantValues.empty? && !value.empty?
|
30
|
+
value
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
@@ -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. 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. - `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
|
@@ -30,6 +30,8 @@ class PayoutMethodDetails
|
|
30
30
|
|
31
31
|
attr_accessor :country
|
32
32
|
|
33
|
+
attr_accessor :transfer_reason
|
34
|
+
|
33
35
|
attr_accessor :iban
|
34
36
|
|
35
37
|
attr_accessor :bank_name
|
@@ -99,6 +101,7 @@ class PayoutMethodDetails
|
|
99
101
|
:'phone_number' => :'phone_number',
|
100
102
|
:'mobile_provider' => :'mobile_provider',
|
101
103
|
:'country' => :'country',
|
104
|
+
:'transfer_reason' => :'transfer_reason',
|
102
105
|
:'iban' => :'iban',
|
103
106
|
:'bank_name' => :'bank_name',
|
104
107
|
:'bank_country' => :'bank_country',
|
@@ -142,6 +145,7 @@ class PayoutMethodDetails
|
|
142
145
|
:'phone_number' => :'String',
|
143
146
|
:'mobile_provider' => :'PayoutMethodMobileProviderEnum',
|
144
147
|
:'country' => :'PayoutMethodCountryEnum',
|
148
|
+
:'transfer_reason' => :'PayoutMethodTransferReasonEnum',
|
145
149
|
:'iban' => :'String',
|
146
150
|
:'bank_name' => :'String',
|
147
151
|
:'bank_country' => :'String',
|
@@ -182,6 +186,7 @@ class PayoutMethodDetails
|
|
182
186
|
:'PayoutMethodDetailsGBPBank',
|
183
187
|
:'PayoutMethodDetailsGHSBank',
|
184
188
|
:'PayoutMethodDetailsGHSCash',
|
189
|
+
:'PayoutMethodDetailsGNFMobile',
|
185
190
|
:'PayoutMethodDetailsIBAN',
|
186
191
|
:'PayoutMethodDetailsKESBank',
|
187
192
|
:'PayoutMethodDetailsKESMobile',
|
@@ -190,6 +195,7 @@ class PayoutMethodDetails
|
|
190
195
|
:'PayoutMethodDetailsNGNBank',
|
191
196
|
:'PayoutMethodDetailsUSDBank',
|
192
197
|
:'PayoutMethodDetailsUSDCash',
|
198
|
+
:'PayoutMethodDetailsXAFMobile',
|
193
199
|
:'PayoutMethodDetailsXOFBank',
|
194
200
|
:'PayoutMethodDetailsXOFCash',
|
195
201
|
:'PayoutMethodDetailsXOFMobile',
|
@@ -244,6 +250,10 @@ class PayoutMethodDetails
|
|
244
250
|
self.country = attributes[:'country']
|
245
251
|
end
|
246
252
|
|
253
|
+
if attributes.key?(:'transfer_reason')
|
254
|
+
self.transfer_reason = attributes[:'transfer_reason']
|
255
|
+
end
|
256
|
+
|
247
257
|
if attributes.key?(:'iban')
|
248
258
|
self.iban = attributes[:'iban']
|
249
259
|
end
|
@@ -401,6 +411,10 @@ class PayoutMethodDetails
|
|
401
411
|
invalid_properties.push('invalid value for "bank_name", bank_name cannot be nil.')
|
402
412
|
end
|
403
413
|
|
414
|
+
if @cash_provider.nil?
|
415
|
+
invalid_properties.push('invalid value for "cash_provider", cash_provider cannot be nil.')
|
416
|
+
end
|
417
|
+
|
404
418
|
if @sender_identity_card_type.nil?
|
405
419
|
invalid_properties.push('invalid value for "sender_identity_card_type", sender_identity_card_type cannot be nil.')
|
406
420
|
end
|
@@ -437,10 +451,6 @@ class PayoutMethodDetails
|
|
437
451
|
invalid_properties.push('invalid value for "city", city cannot be nil.')
|
438
452
|
end
|
439
453
|
|
440
|
-
if @transfer_reason_code.nil?
|
441
|
-
invalid_properties.push('invalid value for "transfer_reason_code", transfer_reason_code cannot be nil.')
|
442
|
-
end
|
443
|
-
|
444
454
|
if @swift_code.nil?
|
445
455
|
invalid_properties.push('invalid value for "swift_code", swift_code cannot be nil.')
|
446
456
|
end
|
@@ -460,6 +470,7 @@ class PayoutMethodDetails
|
|
460
470
|
return false if @country.nil?
|
461
471
|
return false if @iban.nil?
|
462
472
|
return false if @bank_name.nil?
|
473
|
+
return false if @cash_provider.nil?
|
463
474
|
return false if @sender_identity_card_type.nil?
|
464
475
|
return false if @sender_identity_card_id.nil?
|
465
476
|
return false if @identity_card_type.nil?
|
@@ -469,7 +480,6 @@ class PayoutMethodDetails
|
|
469
480
|
return false if @street.nil?
|
470
481
|
return false if @postal_code.nil?
|
471
482
|
return false if @city.nil?
|
472
|
-
return false if @transfer_reason_code.nil?
|
473
483
|
return false if @swift_code.nil?
|
474
484
|
_one_of_found = false
|
475
485
|
openapi_one_of.each do |_class|
|
@@ -503,6 +513,7 @@ class PayoutMethodDetails
|
|
503
513
|
phone_number == o.phone_number &&
|
504
514
|
mobile_provider == o.mobile_provider &&
|
505
515
|
country == o.country &&
|
516
|
+
transfer_reason == o.transfer_reason &&
|
506
517
|
iban == o.iban &&
|
507
518
|
bank_name == o.bank_name &&
|
508
519
|
bank_country == o.bank_country &&
|
@@ -543,7 +554,7 @@ class PayoutMethodDetails
|
|
543
554
|
# Calculates hash code according to all attributes.
|
544
555
|
# @return [Integer] Hash code
|
545
556
|
def hash
|
546
|
-
[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
|
557
|
+
[first_name, last_name, bank_code, bank_account, bank_account_type, phone_number, mobile_provider, country, transfer_reason, 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
|
547
558
|
end
|
548
559
|
|
549
560
|
require 'active_support/core_ext/hash'
|