transferzero-sdk 1.8.0 → 1.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +93 -0
- data/README.md +15 -5
- data/docs/AccountMeta.md +1 -1
- data/docs/AccountValidationRequest.md +2 -0
- data/docs/Currency.md +1 -3
- data/docs/CurrencyExchange.md +1 -3
- data/docs/CurrencyOpposite.md +4 -4
- data/docs/Document.md +7 -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/PayoutMethodCashProviderEnum.md +16 -0
- data/docs/PayoutMethodCountryEnum.md +16 -0
- data/docs/PayoutMethodDetails.md +21 -1
- data/docs/PayoutMethodDetailsBTC.md +23 -0
- data/docs/PayoutMethodDetailsGBPBank.md +29 -0
- data/docs/PayoutMethodDetailsIBAN.md +1 -1
- data/docs/PayoutMethodDetailsMobile.md +3 -1
- data/docs/PayoutMethodDetailsXOFCash.md +25 -0
- data/docs/PayoutMethodDetailsZARBank.md +35 -0
- data/docs/ProofOfPayment.md +23 -0
- data/docs/ProofOfPaymentListResponse.md +17 -0
- data/docs/Recipient.md +8 -4
- data/docs/RecipientStateReasonDetails.md +23 -0
- data/docs/RecipientsApi.md +63 -1
- data/docs/Sender.md +74 -34
- data/lib/transferzero-sdk.rb +10 -0
- data/lib/transferzero-sdk/api/documents_api.rb +0 -63
- data/lib/transferzero-sdk/api/recipients_api.rb +56 -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 +171 -161
- 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 +197 -175
- 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_cash_provider_enum.rb +31 -0
- data/lib/transferzero-sdk/models/payout_method_country_enum.rb +32 -0
- data/lib/transferzero-sdk/models/payout_method_details.rb +417 -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 +93 -83
- 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_cash.rb +254 -0
- 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 +17 -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/proof_of_payment.rb +233 -0
- data/lib/transferzero-sdk/models/proof_of_payment_list_response.rb +204 -0
- data/lib/transferzero-sdk/models/recipient.rb +246 -226
- 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_state_reason_details.rb +235 -0
- data/lib/transferzero-sdk/models/recipient_webhook.rb +96 -95
- data/lib/transferzero-sdk/models/sender.rb +595 -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_cash_provider_enum_spec.rb +35 -0
- data/spec/models/payout_method_country_enum_spec.rb +35 -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_xof_cash_spec.rb +71 -0
- data/spec/models/payout_method_details_zar_bank_spec.rb +89 -0
- data/spec/models/proof_of_payment_list_response_spec.rb +41 -0
- data/spec/models/proof_of_payment_spec.rb +59 -0
- data/spec/models/recipient_state_reason_details_spec.rb +59 -0
- data/transferzero-sdk-1.10.0.gem +0 -0
- data/transferzero-sdk-1.11.0.gem +0 -0
- metadata +46 -3
@@ -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, \"ID\": 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\" => \"ID\", # Optional; Values: \"PP\": Passport, \"ID\": 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,119 @@ 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
|
-
def self.attribute_map
|
26
|
-
{
|
27
|
-
:'first_name' => :'first_name',
|
28
|
-
:'last_name' => :'last_name',
|
29
|
-
:'phone_number' => :'phone_number'
|
30
|
-
}
|
31
|
-
end
|
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
|
-
}
|
24
|
+
attr_accessor :mobile_provider
|
56
25
|
|
57
|
-
|
58
|
-
|
59
|
-
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
27
|
+
def self.attribute_map
|
28
|
+
{
|
29
|
+
:'first_name' => :'first_name',
|
30
|
+
:'last_name' => :'last_name',
|
31
|
+
:'phone_number' => :'phone_number',
|
32
|
+
:'mobile_provider' => :'mobile_provider'
|
33
|
+
}
|
34
|
+
end
|
60
35
|
|
61
|
-
|
62
|
-
|
63
|
-
|
36
|
+
# Attribute type mapping.
|
37
|
+
def self.openapi_types
|
38
|
+
{
|
39
|
+
:'first_name' => :'String',
|
40
|
+
:'last_name' => :'String',
|
41
|
+
:'phone_number' => :'String',
|
42
|
+
:'mobile_provider' => :'PayoutMethodMobileProviderEnum'
|
43
|
+
}
|
44
|
+
end
|
64
45
|
|
65
|
-
|
66
|
-
|
67
|
-
|
46
|
+
# Initializes the object
|
47
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
48
|
+
def initialize(attributes = {})
|
49
|
+
if (!attributes.is_a?(Hash))
|
50
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::PayoutMethodDetailsMobile` initialize method"
|
68
51
|
end
|
69
52
|
|
70
|
-
#
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
if @first_name.nil?
|
75
|
-
invalid_properties.push('invalid value for "first_name", first_name cannot be nil.')
|
53
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
54
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
55
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
56
|
+
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
57
|
end
|
58
|
+
h[k.to_sym] = v
|
59
|
+
}
|
77
60
|
|
78
|
-
|
79
|
-
|
80
|
-
|
61
|
+
if attributes.key?(:'first_name')
|
62
|
+
self.first_name = attributes[:'first_name']
|
63
|
+
end
|
81
64
|
|
82
|
-
|
83
|
-
|
84
|
-
|
65
|
+
if attributes.key?(:'last_name')
|
66
|
+
self.last_name = attributes[:'last_name']
|
67
|
+
end
|
85
68
|
|
86
|
-
|
69
|
+
if attributes.key?(:'phone_number')
|
70
|
+
self.phone_number = attributes[:'phone_number']
|
87
71
|
end
|
88
72
|
|
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
|
73
|
+
if attributes.key?(:'mobile_provider')
|
74
|
+
self.mobile_provider = attributes[:'mobile_provider']
|
96
75
|
end
|
76
|
+
end
|
97
77
|
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
last_name == o.last_name &&
|
105
|
-
phone_number == o.phone_number
|
78
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
79
|
+
# @return Array for valid properties with the reasons
|
80
|
+
def list_invalid_properties
|
81
|
+
invalid_properties = Array.new
|
82
|
+
if @first_name.nil?
|
83
|
+
invalid_properties.push('invalid value for "first_name", first_name cannot be nil.')
|
106
84
|
end
|
107
85
|
|
108
|
-
|
109
|
-
|
110
|
-
def eql?(o)
|
111
|
-
self == o
|
86
|
+
if @last_name.nil?
|
87
|
+
invalid_properties.push('invalid value for "last_name", last_name cannot be nil.')
|
112
88
|
end
|
113
89
|
|
114
|
-
|
115
|
-
|
116
|
-
def hash
|
117
|
-
[first_name, last_name, phone_number].hash
|
90
|
+
if @phone_number.nil?
|
91
|
+
invalid_properties.push('invalid value for "phone_number", phone_number cannot be nil.')
|
118
92
|
end
|
119
93
|
|
94
|
+
invalid_properties
|
95
|
+
end
|
96
|
+
|
97
|
+
# Check to see if the all the properties in the model are valid
|
98
|
+
# @return true if the model is valid
|
99
|
+
def valid?
|
100
|
+
return false if @first_name.nil?
|
101
|
+
return false if @last_name.nil?
|
102
|
+
return false if @phone_number.nil?
|
103
|
+
true
|
104
|
+
end
|
105
|
+
|
106
|
+
# Checks equality by comparing each attribute.
|
107
|
+
# @param [Object] Object to be compared
|
108
|
+
def ==(o)
|
109
|
+
return true if self.equal?(o)
|
110
|
+
self.class == o.class &&
|
111
|
+
first_name == o.first_name &&
|
112
|
+
last_name == o.last_name &&
|
113
|
+
phone_number == o.phone_number &&
|
114
|
+
mobile_provider == o.mobile_provider
|
115
|
+
end
|
116
|
+
|
117
|
+
# @see the `==` method
|
118
|
+
# @param [Object] Object to be compared
|
119
|
+
def eql?(o)
|
120
|
+
self == o
|
121
|
+
end
|
122
|
+
|
123
|
+
# Calculates hash code according to all attributes.
|
124
|
+
# @return [Integer] Hash code
|
125
|
+
def hash
|
126
|
+
[first_name, last_name, phone_number, mobile_provider].hash
|
127
|
+
end
|
128
|
+
|
120
129
|
require 'active_support/core_ext/hash'
|
121
130
|
require 'active_support/hash_with_indifferent_access.rb'
|
122
131
|
# Builds the object from hash
|
@@ -231,5 +240,6 @@ def _to_hash(value)
|
|
231
240
|
end
|
232
241
|
end
|
233
242
|
|
234
|
-
|
243
|
+
end
|
244
|
+
|
235
245
|
end
|