transferzero-sdk 1.8.0 → 1.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -5
- data/docs/AccountMeta.md +1 -1
- data/docs/Currency.md +1 -3
- data/docs/CurrencyExchange.md +1 -3
- data/docs/CurrencyOpposite.md +4 -4
- data/docs/Document.md +3 -3
- data/docs/DocumentsApi.md +2 -74
- data/docs/FieldSelectValidation.md +1 -1
- data/docs/FieldValidation.md +1 -1
- data/docs/PayinMethodDetails.md +3 -1
- data/docs/PayinMethodDetailsBTC.md +17 -0
- data/docs/PayinMethodDetailsMobile.md +1 -1
- data/docs/PaymentMethod.md +2 -2
- data/docs/PaymentMethodOpposite.md +2 -2
- data/docs/PayoutMethod.md +1 -1
- data/docs/PayoutMethodDetails.md +17 -1
- data/docs/PayoutMethodDetailsBTC.md +23 -0
- data/docs/PayoutMethodDetailsGBPBank.md +29 -0
- data/docs/PayoutMethodDetailsIBAN.md +1 -1
- data/docs/PayoutMethodDetailsZARBank.md +35 -0
- data/docs/Recipient.md +4 -4
- data/docs/RecipientsApi.md +1 -1
- data/docs/Sender.md +71 -33
- data/lib/transferzero-sdk.rb +4 -0
- data/lib/transferzero-sdk/api/documents_api.rb +0 -63
- data/lib/transferzero-sdk/api/recipients_api.rb +2 -2
- data/lib/transferzero-sdk/api_client.rb +5 -3
- data/lib/transferzero-sdk/models/account.rb +70 -69
- data/lib/transferzero-sdk/models/account_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/account_meta.rb +61 -60
- data/lib/transferzero-sdk/models/account_response.rb +66 -65
- data/lib/transferzero-sdk/models/account_validation_error.rb +61 -60
- data/lib/transferzero-sdk/models/account_validation_request.rb +164 -163
- data/lib/transferzero-sdk/models/account_validation_response.rb +66 -65
- data/lib/transferzero-sdk/models/account_validation_result.rb +61 -60
- data/lib/transferzero-sdk/models/api_log.rb +136 -135
- data/lib/transferzero-sdk/models/api_log_list_response.rb +70 -69
- data/lib/transferzero-sdk/models/api_log_response.rb +60 -59
- data/lib/transferzero-sdk/models/currency.rb +133 -142
- data/lib/transferzero-sdk/models/currency_exchange.rb +149 -158
- data/lib/transferzero-sdk/models/currency_exchange_list_response.rb +62 -61
- data/lib/transferzero-sdk/models/currency_list_response.rb +62 -61
- data/lib/transferzero-sdk/models/currency_opposite.rb +166 -165
- data/lib/transferzero-sdk/models/debit.rb +151 -150
- data/lib/transferzero-sdk/models/debit_list_request.rb +61 -60
- data/lib/transferzero-sdk/models/debit_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/debit_request.rb +60 -59
- data/lib/transferzero-sdk/models/debit_request_wrapper.rb +80 -79
- data/lib/transferzero-sdk/models/debit_response.rb +60 -59
- data/lib/transferzero-sdk/models/document.rb +179 -177
- data/lib/transferzero-sdk/models/document_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/document_request.rb +60 -59
- data/lib/transferzero-sdk/models/document_response.rb +60 -59
- data/lib/transferzero-sdk/models/document_webhook.rb +96 -95
- data/lib/transferzero-sdk/models/error_status.rb +66 -65
- data/lib/transferzero-sdk/models/field_description.rb +95 -94
- data/lib/transferzero-sdk/models/field_select_validation.rb +70 -69
- data/lib/transferzero-sdk/models/field_validation.rb +78 -77
- data/lib/transferzero-sdk/models/pagination.rb +97 -96
- data/lib/transferzero-sdk/models/pagination_meta.rb +60 -59
- data/lib/transferzero-sdk/models/payin_method.rb +97 -96
- data/lib/transferzero-sdk/models/payin_method_details.rb +122 -110
- data/lib/transferzero-sdk/models/payin_method_details_btc.rb +204 -0
- data/lib/transferzero-sdk/models/payin_method_details_mobile.rb +75 -74
- data/lib/transferzero-sdk/models/payin_method_details_ngn_bank.rb +71 -70
- data/lib/transferzero-sdk/models/payin_method_request.rb +60 -59
- data/lib/transferzero-sdk/models/payment_method.rb +109 -108
- data/lib/transferzero-sdk/models/payment_method_list_response.rb +61 -60
- data/lib/transferzero-sdk/models/payment_method_opposite.rb +124 -123
- data/lib/transferzero-sdk/models/payout_method.rb +107 -106
- data/lib/transferzero-sdk/models/payout_method_bank_account_type_enum.rb +14 -19
- data/lib/transferzero-sdk/models/payout_method_details.rb +398 -297
- data/lib/transferzero-sdk/models/payout_method_details_balance.rb +61 -60
- data/lib/transferzero-sdk/models/payout_method_details_btc.rb +250 -0
- data/lib/transferzero-sdk/models/payout_method_details_gbp_bank.rb +267 -0
- data/lib/transferzero-sdk/models/payout_method_details_ghs_bank.rb +97 -96
- data/lib/transferzero-sdk/models/payout_method_details_iban.rb +100 -104
- data/lib/transferzero-sdk/models/payout_method_details_mad_cash.rb +162 -161
- data/lib/transferzero-sdk/models/payout_method_details_mobile.rb +86 -85
- data/lib/transferzero-sdk/models/payout_method_details_ngn_bank.rb +104 -103
- data/lib/transferzero-sdk/models/payout_method_details_xof_bank.rb +108 -107
- data/lib/transferzero-sdk/models/payout_method_details_xof_mobile.rb +97 -96
- data/lib/transferzero-sdk/models/payout_method_details_zar_bank.rb +324 -0
- data/lib/transferzero-sdk/models/payout_method_gender_enum.rb +14 -19
- data/lib/transferzero-sdk/models/payout_method_identity_card_type_enum.rb +15 -20
- data/lib/transferzero-sdk/models/payout_method_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/payout_method_mobile_provider_enum.rb +14 -19
- data/lib/transferzero-sdk/models/payout_method_request.rb +60 -59
- data/lib/transferzero-sdk/models/payout_method_response.rb +60 -59
- data/lib/transferzero-sdk/models/payout_method_webhook.rb +96 -95
- data/lib/transferzero-sdk/models/politically_exposed_person.rb +123 -123
- data/lib/transferzero-sdk/models/recipient.rb +230 -229
- data/lib/transferzero-sdk/models/recipient_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/recipient_request.rb +60 -59
- data/lib/transferzero-sdk/models/recipient_response.rb +60 -59
- data/lib/transferzero-sdk/models/recipient_state.rb +22 -27
- data/lib/transferzero-sdk/models/recipient_webhook.rb +96 -95
- data/lib/transferzero-sdk/models/sender.rb +573 -358
- data/lib/transferzero-sdk/models/sender_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/sender_request.rb +60 -59
- data/lib/transferzero-sdk/models/sender_response.rb +66 -65
- data/lib/transferzero-sdk/models/sender_response_existing.rb +60 -59
- data/lib/transferzero-sdk/models/sender_response_meta.rb +60 -59
- data/lib/transferzero-sdk/models/sender_state.rb +19 -24
- data/lib/transferzero-sdk/models/sender_webhook.rb +96 -95
- data/lib/transferzero-sdk/models/transaction.rb +192 -191
- data/lib/transferzero-sdk/models/transaction_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/transaction_request.rb +60 -59
- data/lib/transferzero-sdk/models/transaction_response.rb +66 -65
- data/lib/transferzero-sdk/models/transaction_response_existing.rb +66 -65
- data/lib/transferzero-sdk/models/transaction_response_meta.rb +60 -59
- data/lib/transferzero-sdk/models/transaction_state.rb +23 -28
- data/lib/transferzero-sdk/models/transaction_traits.rb +71 -70
- data/lib/transferzero-sdk/models/transaction_webhook.rb +96 -95
- data/lib/transferzero-sdk/models/validation_error_description.rb +62 -61
- data/lib/transferzero-sdk/models/webhook.rb +92 -91
- data/lib/transferzero-sdk/models/webhook_definition.rb +107 -106
- data/lib/transferzero-sdk/models/webhook_definition_event_list_response.rb +61 -60
- data/lib/transferzero-sdk/models/webhook_definition_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/webhook_definition_request.rb +60 -59
- data/lib/transferzero-sdk/models/webhook_definition_response.rb +60 -59
- data/lib/transferzero-sdk/models/webhook_log.rb +97 -96
- data/lib/transferzero-sdk/models/webhook_log_list_response.rb +70 -69
- data/lib/transferzero-sdk/models/webhook_log_metadata.rb +129 -128
- data/lib/transferzero-sdk/models/webhook_log_metadata_request.rb +80 -79
- data/lib/transferzero-sdk/models/webhook_log_metadata_response.rb +81 -80
- data/lib/transferzero-sdk/models/webhook_log_response.rb +60 -59
- data/lib/transferzero-sdk/version.rb +1 -1
- data/spec/models/payin_method_details_btc_spec.rb +41 -0
- data/spec/models/payout_method_details_btc_spec.rb +59 -0
- data/spec/models/payout_method_details_gbp_bank_spec.rb +77 -0
- data/spec/models/payout_method_details_zar_bank_spec.rb +89 -0
- metadata +28 -12
@@ -13,207 +13,207 @@ OpenAPI Generator version: 4.0.0-beta3
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module TransferZero
|
16
|
-
|
17
|
-
|
18
|
-
|
16
|
+
# ```JSON \"details\": { \"first_name\": \"First\", \"last_name\": \"Last\", \"phone_number\": \"212537718685\" # Mandatory; International format preferred \"sender_identity_card_type\" => \"O\", # Mandatory; Values: \"O\": Other, \"PP\": Passport, \"NI\": National ID \"sender_identity_card_id\" => 'AB12345678', # Mandatory \"sender_city_of_birth\" => \"London\", # Mandatory \"sender_country_of_birth\" => \"GB\", # Mandatory; ISO 2-letter format \"sender_gender\" => \"M\", # Mandatory; Values: \"M\": Male, \"F\": Female \"reason\" => \"Remittance payment\", # Optional; Default value is 'Remittance payment' \"identity_card_type\" => \"NI\", # Optional; Values: \"PP\": Passport, \"NI\": National ID \"identity_card_id\" => 'AB12345678' # Optional } ``` Please note when sending MAD::Cash payments you should subscribe to the recipient.pending webhook, as that will broadcast the payment reference ID the customer need to use to obtain the funds. Example webhook response excerpt - ```JSON { (...) \"state\":\"pending\", \"metadata\": { \"payment_reference\":\"9M5GJRJUBCY\" }, (...) } ``` The reference can also be provided optionally for MAD::Cash, but if you want to use this functionality please contact us for more details.
|
17
|
+
class PayoutMethodDetailsMADCash
|
18
|
+
attr_accessor :first_name
|
19
19
|
|
20
|
-
|
20
|
+
attr_accessor :last_name
|
21
21
|
|
22
|
-
|
22
|
+
attr_accessor :phone_number
|
23
23
|
|
24
|
-
|
24
|
+
attr_accessor :sender_identity_card_type
|
25
25
|
|
26
|
-
|
26
|
+
attr_accessor :sender_identity_card_id
|
27
27
|
|
28
|
-
|
28
|
+
attr_accessor :sender_city_of_birth
|
29
29
|
|
30
|
-
|
30
|
+
attr_accessor :sender_country_of_birth
|
31
31
|
|
32
|
-
|
32
|
+
attr_accessor :sender_gender
|
33
33
|
|
34
|
-
|
34
|
+
attr_accessor :reason
|
35
35
|
|
36
|
-
|
36
|
+
attr_accessor :identity_card_type
|
37
37
|
|
38
|
-
|
38
|
+
attr_accessor :identity_card_id
|
39
39
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
# Attribute type mapping.
|
58
|
-
def self.openapi_types
|
59
|
-
{
|
60
|
-
:'first_name' => :'String',
|
61
|
-
:'last_name' => :'String',
|
62
|
-
:'phone_number' => :'String',
|
63
|
-
:'sender_identity_card_type' => :'PayoutMethodIdentityCardTypeEnum',
|
64
|
-
:'sender_identity_card_id' => :'String',
|
65
|
-
:'sender_city_of_birth' => :'String',
|
66
|
-
:'sender_country_of_birth' => :'String',
|
67
|
-
:'sender_gender' => :'PayoutMethodGenderEnum',
|
68
|
-
:'reason' => :'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::PayoutMethodDetailsMADCash` 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::PayoutMethodDetailsMADCash`. 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
|
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
|
+
:'phone_number' => :'phone_number',
|
46
|
+
:'sender_identity_card_type' => :'sender_identity_card_type',
|
47
|
+
:'sender_identity_card_id' => :'sender_identity_card_id',
|
48
|
+
:'sender_city_of_birth' => :'sender_city_of_birth',
|
49
|
+
:'sender_country_of_birth' => :'sender_country_of_birth',
|
50
|
+
:'sender_gender' => :'sender_gender',
|
51
|
+
:'reason' => :'reason',
|
52
|
+
:'identity_card_type' => :'identity_card_type',
|
53
|
+
:'identity_card_id' => :'identity_card_id'
|
54
|
+
}
|
55
|
+
end
|
96
56
|
|
97
|
-
|
98
|
-
|
99
|
-
|
57
|
+
# Attribute type mapping.
|
58
|
+
def self.openapi_types
|
59
|
+
{
|
60
|
+
:'first_name' => :'String',
|
61
|
+
:'last_name' => :'String',
|
62
|
+
:'phone_number' => :'String',
|
63
|
+
:'sender_identity_card_type' => :'PayoutMethodIdentityCardTypeEnum',
|
64
|
+
:'sender_identity_card_id' => :'String',
|
65
|
+
:'sender_city_of_birth' => :'String',
|
66
|
+
:'sender_country_of_birth' => :'String',
|
67
|
+
:'sender_gender' => :'PayoutMethodGenderEnum',
|
68
|
+
:'reason' => :'String',
|
69
|
+
:'identity_card_type' => :'PayoutMethodIdentityCardTypeEnum',
|
70
|
+
:'identity_card_id' => :'String'
|
71
|
+
}
|
72
|
+
end
|
100
73
|
|
101
|
-
|
102
|
-
|
103
|
-
|
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::PayoutMethodDetailsMADCash` initialize method"
|
79
|
+
end
|
104
80
|
|
105
|
-
|
106
|
-
|
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::PayoutMethodDetailsMADCash`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
107
85
|
end
|
86
|
+
h[k.to_sym] = v
|
87
|
+
}
|
108
88
|
|
109
|
-
|
110
|
-
|
111
|
-
|
89
|
+
if attributes.key?(:'first_name')
|
90
|
+
self.first_name = attributes[:'first_name']
|
91
|
+
end
|
112
92
|
|
113
|
-
|
114
|
-
|
115
|
-
|
93
|
+
if attributes.key?(:'last_name')
|
94
|
+
self.last_name = attributes[:'last_name']
|
95
|
+
end
|
116
96
|
|
117
|
-
|
118
|
-
|
119
|
-
|
97
|
+
if attributes.key?(:'phone_number')
|
98
|
+
self.phone_number = attributes[:'phone_number']
|
99
|
+
end
|
120
100
|
|
121
|
-
|
122
|
-
|
123
|
-
|
101
|
+
if attributes.key?(:'sender_identity_card_type')
|
102
|
+
self.sender_identity_card_type = attributes[:'sender_identity_card_type']
|
103
|
+
end
|
124
104
|
|
125
|
-
|
126
|
-
|
127
|
-
|
105
|
+
if attributes.key?(:'sender_identity_card_id')
|
106
|
+
self.sender_identity_card_id = attributes[:'sender_identity_card_id']
|
107
|
+
end
|
128
108
|
|
129
|
-
|
130
|
-
|
131
|
-
end
|
109
|
+
if attributes.key?(:'sender_city_of_birth')
|
110
|
+
self.sender_city_of_birth = attributes[:'sender_city_of_birth']
|
132
111
|
end
|
133
112
|
|
134
|
-
|
135
|
-
|
136
|
-
|
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
|
113
|
+
if attributes.key?(:'sender_country_of_birth')
|
114
|
+
self.sender_country_of_birth = attributes[:'sender_country_of_birth']
|
115
|
+
end
|
141
116
|
|
142
|
-
|
143
|
-
|
144
|
-
|
117
|
+
if attributes.key?(:'sender_gender')
|
118
|
+
self.sender_gender = attributes[:'sender_gender']
|
119
|
+
end
|
145
120
|
|
146
|
-
|
147
|
-
|
148
|
-
|
121
|
+
if attributes.key?(:'reason')
|
122
|
+
self.reason = attributes[:'reason']
|
123
|
+
end
|
149
124
|
|
150
|
-
|
151
|
-
|
152
|
-
|
125
|
+
if attributes.key?(:'identity_card_type')
|
126
|
+
self.identity_card_type = attributes[:'identity_card_type']
|
127
|
+
end
|
153
128
|
|
154
|
-
|
155
|
-
|
156
|
-
|
129
|
+
if attributes.key?(:'identity_card_id')
|
130
|
+
self.identity_card_id = attributes[:'identity_card_id']
|
131
|
+
end
|
132
|
+
end
|
157
133
|
|
158
|
-
|
159
|
-
|
160
|
-
|
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
|
161
141
|
|
162
|
-
|
163
|
-
|
164
|
-
|
142
|
+
if @last_name.nil?
|
143
|
+
invalid_properties.push('invalid value for "last_name", last_name cannot be nil.')
|
144
|
+
end
|
165
145
|
|
166
|
-
|
167
|
-
|
168
|
-
|
146
|
+
if @phone_number.nil?
|
147
|
+
invalid_properties.push('invalid value for "phone_number", phone_number cannot be nil.')
|
148
|
+
end
|
169
149
|
|
170
|
-
|
150
|
+
if @sender_identity_card_type.nil?
|
151
|
+
invalid_properties.push('invalid value for "sender_identity_card_type", sender_identity_card_type cannot be nil.')
|
171
152
|
end
|
172
153
|
|
173
|
-
|
174
|
-
|
175
|
-
def valid?
|
176
|
-
return false if @first_name.nil?
|
177
|
-
return false if @last_name.nil?
|
178
|
-
return false if @phone_number.nil?
|
179
|
-
return false if @sender_identity_card_type.nil?
|
180
|
-
return false if @sender_identity_card_id.nil?
|
181
|
-
return false if @sender_city_of_birth.nil?
|
182
|
-
return false if @sender_country_of_birth.nil?
|
183
|
-
return false if @sender_gender.nil?
|
184
|
-
true
|
154
|
+
if @sender_identity_card_id.nil?
|
155
|
+
invalid_properties.push('invalid value for "sender_identity_card_id", sender_identity_card_id cannot be nil.')
|
185
156
|
end
|
186
157
|
|
187
|
-
|
188
|
-
|
189
|
-
def ==(o)
|
190
|
-
return true if self.equal?(o)
|
191
|
-
self.class == o.class &&
|
192
|
-
first_name == o.first_name &&
|
193
|
-
last_name == o.last_name &&
|
194
|
-
phone_number == o.phone_number &&
|
195
|
-
sender_identity_card_type == o.sender_identity_card_type &&
|
196
|
-
sender_identity_card_id == o.sender_identity_card_id &&
|
197
|
-
sender_city_of_birth == o.sender_city_of_birth &&
|
198
|
-
sender_country_of_birth == o.sender_country_of_birth &&
|
199
|
-
sender_gender == o.sender_gender &&
|
200
|
-
reason == o.reason &&
|
201
|
-
identity_card_type == o.identity_card_type &&
|
202
|
-
identity_card_id == o.identity_card_id
|
158
|
+
if @sender_city_of_birth.nil?
|
159
|
+
invalid_properties.push('invalid value for "sender_city_of_birth", sender_city_of_birth cannot be nil.')
|
203
160
|
end
|
204
161
|
|
205
|
-
|
206
|
-
|
207
|
-
def eql?(o)
|
208
|
-
self == o
|
162
|
+
if @sender_country_of_birth.nil?
|
163
|
+
invalid_properties.push('invalid value for "sender_country_of_birth", sender_country_of_birth cannot be nil.')
|
209
164
|
end
|
210
165
|
|
211
|
-
|
212
|
-
|
213
|
-
def hash
|
214
|
-
[first_name, last_name, phone_number, 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].hash
|
166
|
+
if @sender_gender.nil?
|
167
|
+
invalid_properties.push('invalid value for "sender_gender", sender_gender cannot be nil.')
|
215
168
|
end
|
216
169
|
|
170
|
+
invalid_properties
|
171
|
+
end
|
172
|
+
|
173
|
+
# Check to see if the all the properties in the model are valid
|
174
|
+
# @return true if the model is valid
|
175
|
+
def valid?
|
176
|
+
return false if @first_name.nil?
|
177
|
+
return false if @last_name.nil?
|
178
|
+
return false if @phone_number.nil?
|
179
|
+
return false if @sender_identity_card_type.nil?
|
180
|
+
return false if @sender_identity_card_id.nil?
|
181
|
+
return false if @sender_city_of_birth.nil?
|
182
|
+
return false if @sender_country_of_birth.nil?
|
183
|
+
return false if @sender_gender.nil?
|
184
|
+
true
|
185
|
+
end
|
186
|
+
|
187
|
+
# Checks equality by comparing each attribute.
|
188
|
+
# @param [Object] Object to be compared
|
189
|
+
def ==(o)
|
190
|
+
return true if self.equal?(o)
|
191
|
+
self.class == o.class &&
|
192
|
+
first_name == o.first_name &&
|
193
|
+
last_name == o.last_name &&
|
194
|
+
phone_number == o.phone_number &&
|
195
|
+
sender_identity_card_type == o.sender_identity_card_type &&
|
196
|
+
sender_identity_card_id == o.sender_identity_card_id &&
|
197
|
+
sender_city_of_birth == o.sender_city_of_birth &&
|
198
|
+
sender_country_of_birth == o.sender_country_of_birth &&
|
199
|
+
sender_gender == o.sender_gender &&
|
200
|
+
reason == o.reason &&
|
201
|
+
identity_card_type == o.identity_card_type &&
|
202
|
+
identity_card_id == o.identity_card_id
|
203
|
+
end
|
204
|
+
|
205
|
+
# @see the `==` method
|
206
|
+
# @param [Object] Object to be compared
|
207
|
+
def eql?(o)
|
208
|
+
self == o
|
209
|
+
end
|
210
|
+
|
211
|
+
# Calculates hash code according to all attributes.
|
212
|
+
# @return [Integer] Hash code
|
213
|
+
def hash
|
214
|
+
[first_name, last_name, phone_number, 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].hash
|
215
|
+
end
|
216
|
+
|
217
217
|
require 'active_support/core_ext/hash'
|
218
218
|
require 'active_support/hash_with_indifferent_access.rb'
|
219
219
|
# Builds the object from hash
|
@@ -328,5 +328,6 @@ def _to_hash(value)
|
|
328
328
|
end
|
329
329
|
end
|
330
330
|
|
331
|
-
|
331
|
+
end
|
332
|
+
|
332
333
|
end
|
@@ -13,110 +13,110 @@ OpenAPI Generator version: 4.0.0-beta3
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module TransferZero
|
16
|
-
|
17
|
-
|
18
|
-
|
16
|
+
# ```JSON \"details\": { \"first_name\": \"First\", \"last_name\": \"Last\", \"phone_number\": \"7087661234\" # local or international format } ``` Please note when sending XOF::Cash payments you should subscribe to the recipient.pending webhook, as that will broadcast the payment reference ID the customer need to use to obtain the funds. Example webhook response excerpt - ```JSON { (...) \"state\":\"pending\", \"metadata\": { \"payment_reference\":\"9M5GJRJUBCY\" }, (...) } ```
|
17
|
+
class PayoutMethodDetailsMobile
|
18
|
+
attr_accessor :first_name
|
19
19
|
|
20
|
-
|
20
|
+
attr_accessor :last_name
|
21
21
|
|
22
|
-
|
22
|
+
attr_accessor :phone_number
|
23
23
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
# Attribute type mapping.
|
34
|
-
def self.openapi_types
|
35
|
-
{
|
36
|
-
:'first_name' => :'String',
|
37
|
-
:'last_name' => :'String',
|
38
|
-
:'phone_number' => :'String'
|
39
|
-
}
|
40
|
-
end
|
41
|
-
|
42
|
-
# Initializes the object
|
43
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
44
|
-
def initialize(attributes = {})
|
45
|
-
if (!attributes.is_a?(Hash))
|
46
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::PayoutMethodDetailsMobile` initialize method"
|
47
|
-
end
|
48
|
-
|
49
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
50
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
51
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
52
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::PayoutMethodDetailsMobile`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
53
|
-
end
|
54
|
-
h[k.to_sym] = v
|
55
|
-
}
|
56
|
-
|
57
|
-
if attributes.key?(:'first_name')
|
58
|
-
self.first_name = attributes[:'first_name']
|
59
|
-
end
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
25
|
+
def self.attribute_map
|
26
|
+
{
|
27
|
+
:'first_name' => :'first_name',
|
28
|
+
:'last_name' => :'last_name',
|
29
|
+
:'phone_number' => :'phone_number'
|
30
|
+
}
|
31
|
+
end
|
60
32
|
|
61
|
-
|
62
|
-
|
63
|
-
|
33
|
+
# Attribute type mapping.
|
34
|
+
def self.openapi_types
|
35
|
+
{
|
36
|
+
:'first_name' => :'String',
|
37
|
+
:'last_name' => :'String',
|
38
|
+
:'phone_number' => :'String'
|
39
|
+
}
|
40
|
+
end
|
64
41
|
|
65
|
-
|
66
|
-
|
67
|
-
|
42
|
+
# Initializes the object
|
43
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
44
|
+
def initialize(attributes = {})
|
45
|
+
if (!attributes.is_a?(Hash))
|
46
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::PayoutMethodDetailsMobile` initialize method"
|
68
47
|
end
|
69
48
|
|
70
|
-
#
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
if @first_name.nil?
|
75
|
-
invalid_properties.push('invalid value for "first_name", first_name cannot be nil.')
|
49
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
50
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
51
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
52
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::PayoutMethodDetailsMobile`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
76
53
|
end
|
54
|
+
h[k.to_sym] = v
|
55
|
+
}
|
77
56
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
if @phone_number.nil?
|
83
|
-
invalid_properties.push('invalid value for "phone_number", phone_number cannot be nil.')
|
84
|
-
end
|
57
|
+
if attributes.key?(:'first_name')
|
58
|
+
self.first_name = attributes[:'first_name']
|
59
|
+
end
|
85
60
|
|
86
|
-
|
61
|
+
if attributes.key?(:'last_name')
|
62
|
+
self.last_name = attributes[:'last_name']
|
87
63
|
end
|
88
64
|
|
89
|
-
|
90
|
-
|
91
|
-
def valid?
|
92
|
-
return false if @first_name.nil?
|
93
|
-
return false if @last_name.nil?
|
94
|
-
return false if @phone_number.nil?
|
95
|
-
true
|
65
|
+
if attributes.key?(:'phone_number')
|
66
|
+
self.phone_number = attributes[:'phone_number']
|
96
67
|
end
|
68
|
+
end
|
97
69
|
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
last_name == o.last_name &&
|
105
|
-
phone_number == o.phone_number
|
70
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
71
|
+
# @return Array for valid properties with the reasons
|
72
|
+
def list_invalid_properties
|
73
|
+
invalid_properties = Array.new
|
74
|
+
if @first_name.nil?
|
75
|
+
invalid_properties.push('invalid value for "first_name", first_name cannot be nil.')
|
106
76
|
end
|
107
77
|
|
108
|
-
|
109
|
-
|
110
|
-
def eql?(o)
|
111
|
-
self == o
|
78
|
+
if @last_name.nil?
|
79
|
+
invalid_properties.push('invalid value for "last_name", last_name cannot be nil.')
|
112
80
|
end
|
113
81
|
|
114
|
-
|
115
|
-
|
116
|
-
def hash
|
117
|
-
[first_name, last_name, phone_number].hash
|
82
|
+
if @phone_number.nil?
|
83
|
+
invalid_properties.push('invalid value for "phone_number", phone_number cannot be nil.')
|
118
84
|
end
|
119
85
|
|
86
|
+
invalid_properties
|
87
|
+
end
|
88
|
+
|
89
|
+
# Check to see if the all the properties in the model are valid
|
90
|
+
# @return true if the model is valid
|
91
|
+
def valid?
|
92
|
+
return false if @first_name.nil?
|
93
|
+
return false if @last_name.nil?
|
94
|
+
return false if @phone_number.nil?
|
95
|
+
true
|
96
|
+
end
|
97
|
+
|
98
|
+
# Checks equality by comparing each attribute.
|
99
|
+
# @param [Object] Object to be compared
|
100
|
+
def ==(o)
|
101
|
+
return true if self.equal?(o)
|
102
|
+
self.class == o.class &&
|
103
|
+
first_name == o.first_name &&
|
104
|
+
last_name == o.last_name &&
|
105
|
+
phone_number == o.phone_number
|
106
|
+
end
|
107
|
+
|
108
|
+
# @see the `==` method
|
109
|
+
# @param [Object] Object to be compared
|
110
|
+
def eql?(o)
|
111
|
+
self == o
|
112
|
+
end
|
113
|
+
|
114
|
+
# Calculates hash code according to all attributes.
|
115
|
+
# @return [Integer] Hash code
|
116
|
+
def hash
|
117
|
+
[first_name, last_name, phone_number].hash
|
118
|
+
end
|
119
|
+
|
120
120
|
require 'active_support/core_ext/hash'
|
121
121
|
require 'active_support/hash_with_indifferent_access.rb'
|
122
122
|
# Builds the object from hash
|
@@ -231,5 +231,6 @@ def _to_hash(value)
|
|
231
231
|
end
|
232
232
|
end
|
233
233
|
|
234
|
-
|
234
|
+
end
|
235
|
+
|
235
236
|
end
|