transferzero-sdk 1.0.0 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +17 -11
- data/docs/AccountMeta.md +1 -1
- data/docs/AccountValidationApi.md +4 -4
- data/docs/AccountValidationRequest.md +6 -4
- data/docs/Currency.md +1 -1
- data/docs/CurrencyExchange.md +1 -1
- data/docs/CurrencyInfoApi.md +20 -6
- data/docs/CurrencyOpposite.md +4 -2
- data/docs/Debit.md +2 -2
- data/docs/Document.md +4 -0
- data/docs/FieldSelectValidation.md +1 -1
- data/docs/FieldValidation.md +1 -1
- data/docs/PayinMethod.md +4 -4
- data/docs/PayinMethodDetails.md +7 -3
- data/docs/PayinMethodDetailsBTC.md +17 -0
- data/docs/PayinMethodDetailsMobile.md +1 -1
- data/docs/PayinMethodDetailsNGNBank.md +4 -2
- data/docs/PaymentMethod.md +2 -2
- data/docs/PaymentMethodOpposite.md +2 -2
- data/docs/PayoutMethod.md +1 -1
- data/docs/PayoutMethodDetails.md +12 -4
- data/docs/PayoutMethodDetailsBTC.md +23 -0
- data/docs/PayoutMethodDetailsGBPBank.md +29 -0
- data/docs/PayoutMethodDetailsIBAN.md +1 -1
- data/docs/PayoutMethodDetailsNGNBank.md +1 -1
- data/docs/PayoutMethodDetailsXOFBank.md +25 -0
- data/docs/PoliticallyExposedPerson.md +31 -0
- data/docs/Recipient.md +5 -3
- data/docs/RecipientsApi.md +3 -3
- data/docs/Sender.md +63 -27
- data/docs/Transaction.md +5 -5
- data/docs/TransactionTraits.md +2 -2
- data/docs/TransactionsApi.md +64 -0
- data/example/client.rb +14 -14
- data/git_push.sh +1 -1
- data/lib/transferzero-sdk.rb +5 -0
- data/lib/transferzero-sdk/api/account_validation_api.rb +4 -4
- data/lib/transferzero-sdk/api/currency_info_api.rb +6 -0
- data/lib/transferzero-sdk/api/recipients_api.rb +4 -4
- data/lib/transferzero-sdk/api/transactions_api.rb +59 -0
- data/lib/transferzero-sdk/api_client.rb +5 -5
- 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 +142 -141
- data/lib/transferzero-sdk/models/currency_exchange.rb +158 -157
- 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 -155
- data/lib/transferzero-sdk/models/debit.rb +151 -155
- 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 +181 -160
- 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 -105
- 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 -65
- 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 +338 -288
- 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 -108
- data/lib/transferzero-sdk/models/payout_method_details_xof_bank.rb +264 -0
- data/lib/transferzero-sdk/models/payout_method_details_xof_mobile.rb +97 -96
- 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 +272 -0
- data/lib/transferzero-sdk/models/recipient.rb +230 -219
- 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 +529 -322
- 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 -23
- 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 -27
- 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/api/account_validation_api_spec.rb +2 -2
- data/spec/api/currency_info_api_spec.rb +2 -0
- data/spec/api/documents_api_spec.rb +15 -0
- data/spec/api/recipients_api_spec.rb +1 -1
- data/spec/api/transactions_api_spec.rb +13 -0
- data/spec/models/account_validation_request_spec.rb +7 -1
- data/spec/models/currency_opposite_spec.rb +6 -0
- data/spec/models/document_spec.rb +12 -0
- data/spec/models/payin_method_details_btc_spec.rb +41 -0
- data/spec/models/payin_method_details_ngn_bank_spec.rb +6 -0
- data/spec/models/payin_method_details_spec.rb +6 -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_spec.rb +7 -1
- data/spec/models/payout_method_details_xof_bank_spec.rb +65 -0
- data/spec/models/politically_exposed_person_spec.rb +83 -0
- data/spec/models/recipient_spec.rb +6 -0
- data/spec/models/sender_spec.rb +16 -0
- data/transferzero-sdk.gemspec +2 -2
- metadata +35 -24
- data/spec/api_client_spec.rb +0 -189
@@ -13,24 +13,19 @@ OpenAPI Generator version: 4.0.0-beta3
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module TransferZero
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
# @param [String] The enum value in the form of the string
|
29
|
-
# @return [String] The enum value
|
30
|
-
def build_from_hash(value)
|
31
|
-
constantValues = PayoutMethodBankAccountTypeEnum.constants.select { |c| PayoutMethodBankAccountTypeEnum::const_get(c) == value }
|
32
|
-
raise "Invalid ENUM value #{value} for class #PayoutMethodBankAccountTypeEnum" if constantValues.empty?
|
33
|
-
value
|
34
|
-
end
|
16
|
+
class PayoutMethodBankAccountTypeEnum
|
17
|
+
|
18
|
+
N10 = "10".freeze
|
19
|
+
N20 = "20".freeze
|
20
|
+
|
21
|
+
# Builds the enum from string
|
22
|
+
# @param [String] The enum value in the form of the string
|
23
|
+
# @return [String] The enum value
|
24
|
+
def build_from_hash(value)
|
25
|
+
constantValues = PayoutMethodBankAccountTypeEnum.constants.select { |c| PayoutMethodBankAccountTypeEnum::const_get(c) == value }
|
26
|
+
raise "Invalid ENUM value #{value} for class #PayoutMethodBankAccountTypeEnum" if constantValues.empty? && !value.empty?
|
27
|
+
value
|
35
28
|
end
|
36
29
|
end
|
30
|
+
|
31
|
+
end
|
@@ -13,337 +13,386 @@ OpenAPI Generator version: 4.0.0-beta3
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module TransferZero
|
16
|
-
|
17
|
-
|
16
|
+
class PayoutMethodDetails
|
17
|
+
attr_accessor :first_name
|
18
18
|
|
19
|
-
|
20
|
-
|
21
|
-
attr_accessor :bank_code
|
22
|
-
|
23
|
-
attr_accessor :bank_account
|
24
|
-
|
25
|
-
attr_accessor :bank_account_type
|
26
|
-
|
27
|
-
attr_accessor :phone_number
|
28
|
-
|
29
|
-
attr_accessor :mobile_provider
|
30
|
-
|
31
|
-
attr_accessor :bank_name
|
32
|
-
|
33
|
-
attr_accessor :iban
|
34
|
-
|
35
|
-
attr_accessor :bic
|
36
|
-
|
37
|
-
attr_accessor :sender_identity_card_type
|
38
|
-
|
39
|
-
attr_accessor :sender_identity_card_id
|
40
|
-
|
41
|
-
attr_accessor :sender_city_of_birth
|
42
|
-
|
43
|
-
attr_accessor :sender_country_of_birth
|
44
|
-
|
45
|
-
attr_accessor :sender_gender
|
46
|
-
|
47
|
-
attr_accessor :reason
|
48
|
-
|
49
|
-
attr_accessor :identity_card_type
|
50
|
-
|
51
|
-
attr_accessor :identity_card_id
|
52
|
-
|
53
|
-
attr_accessor :reference
|
54
|
-
|
55
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
56
|
-
def self.attribute_map
|
57
|
-
{
|
58
|
-
:'first_name' => :'first_name',
|
59
|
-
:'last_name' => :'last_name',
|
60
|
-
:'bank_code' => :'bank_code',
|
61
|
-
:'bank_account' => :'bank_account',
|
62
|
-
:'bank_account_type' => :'bank_account_type',
|
63
|
-
:'phone_number' => :'phone_number',
|
64
|
-
:'mobile_provider' => :'mobile_provider',
|
65
|
-
:'bank_name' => :'bank_name',
|
66
|
-
:'iban' => :'iban',
|
67
|
-
:'bic' => :'bic',
|
68
|
-
:'sender_identity_card_type' => :'sender_identity_card_type',
|
69
|
-
:'sender_identity_card_id' => :'sender_identity_card_id',
|
70
|
-
:'sender_city_of_birth' => :'sender_city_of_birth',
|
71
|
-
:'sender_country_of_birth' => :'sender_country_of_birth',
|
72
|
-
:'sender_gender' => :'sender_gender',
|
73
|
-
:'reason' => :'reason',
|
74
|
-
:'identity_card_type' => :'identity_card_type',
|
75
|
-
:'identity_card_id' => :'identity_card_id',
|
76
|
-
:'reference' => :'reference'
|
77
|
-
}
|
78
|
-
end
|
79
|
-
|
80
|
-
# Attribute type mapping.
|
81
|
-
def self.openapi_types
|
82
|
-
{
|
83
|
-
:'first_name' => :'String',
|
84
|
-
:'last_name' => :'String',
|
85
|
-
:'bank_code' => :'String',
|
86
|
-
:'bank_account' => :'String',
|
87
|
-
:'bank_account_type' => :'PayoutMethodBankAccountTypeEnum',
|
88
|
-
:'phone_number' => :'String',
|
89
|
-
:'mobile_provider' => :'PayoutMethodMobileProviderEnum',
|
90
|
-
:'bank_name' => :'String',
|
91
|
-
:'iban' => :'String',
|
92
|
-
:'bic' => :'String',
|
93
|
-
:'sender_identity_card_type' => :'PayoutMethodIdentityCardTypeEnum',
|
94
|
-
:'sender_identity_card_id' => :'String',
|
95
|
-
:'sender_city_of_birth' => :'String',
|
96
|
-
:'sender_country_of_birth' => :'String',
|
97
|
-
:'sender_gender' => :'PayoutMethodGenderEnum',
|
98
|
-
:'reason' => :'String',
|
99
|
-
:'identity_card_type' => :'PayoutMethodIdentityCardTypeEnum',
|
100
|
-
:'identity_card_id' => :'String',
|
101
|
-
:'reference' => :'String'
|
102
|
-
}
|
103
|
-
end
|
104
|
-
|
105
|
-
# List of class defined in oneOf (OpenAPI v3)
|
106
|
-
def self.openapi_one_of
|
107
|
-
[
|
108
|
-
:'PayoutMethodDetailsBalance',
|
109
|
-
:'PayoutMethodDetailsGHSBank',
|
110
|
-
:'PayoutMethodDetailsIBAN',
|
111
|
-
:'PayoutMethodDetailsMADCash',
|
112
|
-
:'PayoutMethodDetailsMobile',
|
113
|
-
:'PayoutMethodDetailsNGNBank',
|
114
|
-
:'PayoutMethodDetailsXOFMobile'
|
115
|
-
]
|
116
|
-
end
|
117
|
-
|
118
|
-
# Initializes the object
|
119
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
120
|
-
def initialize(attributes = {})
|
121
|
-
if (!attributes.is_a?(Hash))
|
122
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::PayoutMethodDetails` initialize method"
|
123
|
-
end
|
19
|
+
attr_accessor :last_name
|
124
20
|
|
125
|
-
|
126
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
127
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
128
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::PayoutMethodDetails`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
129
|
-
end
|
130
|
-
h[k.to_sym] = v
|
131
|
-
}
|
21
|
+
attr_accessor :bank_code
|
132
22
|
|
133
|
-
|
134
|
-
self.first_name = attributes[:'first_name']
|
135
|
-
end
|
23
|
+
attr_accessor :bank_account
|
136
24
|
|
137
|
-
|
138
|
-
self.last_name = attributes[:'last_name']
|
139
|
-
end
|
25
|
+
attr_accessor :bank_account_type
|
140
26
|
|
141
|
-
|
142
|
-
self.bank_code = attributes[:'bank_code']
|
143
|
-
end
|
27
|
+
attr_accessor :phone_number
|
144
28
|
|
145
|
-
|
146
|
-
self.bank_account = attributes[:'bank_account']
|
147
|
-
end
|
29
|
+
attr_accessor :mobile_provider
|
148
30
|
|
149
|
-
|
150
|
-
self.bank_account_type = attributes[:'bank_account_type']
|
151
|
-
end
|
31
|
+
attr_accessor :iban
|
152
32
|
|
153
|
-
|
154
|
-
self.phone_number = attributes[:'phone_number']
|
155
|
-
end
|
33
|
+
attr_accessor :bank_name
|
156
34
|
|
157
|
-
|
158
|
-
self.mobile_provider = attributes[:'mobile_provider']
|
159
|
-
end
|
35
|
+
attr_accessor :bank_country
|
160
36
|
|
161
|
-
|
162
|
-
self.bank_name = attributes[:'bank_name']
|
163
|
-
end
|
37
|
+
attr_accessor :sort_code
|
164
38
|
|
165
|
-
|
166
|
-
self.iban = attributes[:'iban']
|
167
|
-
end
|
39
|
+
attr_accessor :bic
|
168
40
|
|
169
|
-
|
170
|
-
self.bic = attributes[:'bic']
|
171
|
-
end
|
41
|
+
attr_accessor :sender_identity_card_type
|
172
42
|
|
173
|
-
|
174
|
-
self.sender_identity_card_type = attributes[:'sender_identity_card_type']
|
175
|
-
end
|
43
|
+
attr_accessor :sender_identity_card_id
|
176
44
|
|
177
|
-
|
178
|
-
self.sender_identity_card_id = attributes[:'sender_identity_card_id']
|
179
|
-
end
|
45
|
+
attr_accessor :sender_city_of_birth
|
180
46
|
|
181
|
-
|
182
|
-
self.sender_city_of_birth = attributes[:'sender_city_of_birth']
|
183
|
-
end
|
47
|
+
attr_accessor :sender_country_of_birth
|
184
48
|
|
185
|
-
|
186
|
-
self.sender_country_of_birth = attributes[:'sender_country_of_birth']
|
187
|
-
end
|
49
|
+
attr_accessor :sender_gender
|
188
50
|
|
189
|
-
|
190
|
-
self.sender_gender = attributes[:'sender_gender']
|
191
|
-
end
|
51
|
+
attr_accessor :reason
|
192
52
|
|
193
|
-
|
194
|
-
self.reason = attributes[:'reason']
|
195
|
-
end
|
53
|
+
attr_accessor :identity_card_type
|
196
54
|
|
197
|
-
|
198
|
-
self.identity_card_type = attributes[:'identity_card_type']
|
199
|
-
end
|
55
|
+
attr_accessor :identity_card_id
|
200
56
|
|
201
|
-
|
202
|
-
self.identity_card_id = attributes[:'identity_card_id']
|
203
|
-
end
|
57
|
+
attr_accessor :reference
|
204
58
|
|
205
|
-
|
206
|
-
|
207
|
-
|
59
|
+
attr_accessor :name
|
60
|
+
|
61
|
+
attr_accessor :address
|
62
|
+
|
63
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
64
|
+
def self.attribute_map
|
65
|
+
{
|
66
|
+
:'first_name' => :'first_name',
|
67
|
+
:'last_name' => :'last_name',
|
68
|
+
:'bank_code' => :'bank_code',
|
69
|
+
:'bank_account' => :'bank_account',
|
70
|
+
:'bank_account_type' => :'bank_account_type',
|
71
|
+
:'phone_number' => :'phone_number',
|
72
|
+
:'mobile_provider' => :'mobile_provider',
|
73
|
+
:'iban' => :'iban',
|
74
|
+
:'bank_name' => :'bank_name',
|
75
|
+
:'bank_country' => :'bank_country',
|
76
|
+
:'sort_code' => :'sort_code',
|
77
|
+
:'bic' => :'bic',
|
78
|
+
:'sender_identity_card_type' => :'sender_identity_card_type',
|
79
|
+
:'sender_identity_card_id' => :'sender_identity_card_id',
|
80
|
+
:'sender_city_of_birth' => :'sender_city_of_birth',
|
81
|
+
:'sender_country_of_birth' => :'sender_country_of_birth',
|
82
|
+
:'sender_gender' => :'sender_gender',
|
83
|
+
:'reason' => :'reason',
|
84
|
+
:'identity_card_type' => :'identity_card_type',
|
85
|
+
:'identity_card_id' => :'identity_card_id',
|
86
|
+
:'reference' => :'reference',
|
87
|
+
:'name' => :'name',
|
88
|
+
:'address' => :'address'
|
89
|
+
}
|
90
|
+
end
|
91
|
+
|
92
|
+
# Attribute type mapping.
|
93
|
+
def self.openapi_types
|
94
|
+
{
|
95
|
+
:'first_name' => :'String',
|
96
|
+
:'last_name' => :'String',
|
97
|
+
:'bank_code' => :'String',
|
98
|
+
:'bank_account' => :'String',
|
99
|
+
:'bank_account_type' => :'PayoutMethodBankAccountTypeEnum',
|
100
|
+
:'phone_number' => :'String',
|
101
|
+
:'mobile_provider' => :'PayoutMethodMobileProviderEnum',
|
102
|
+
:'iban' => :'String',
|
103
|
+
:'bank_name' => :'String',
|
104
|
+
:'bank_country' => :'String',
|
105
|
+
:'sort_code' => :'String',
|
106
|
+
:'bic' => :'String',
|
107
|
+
:'sender_identity_card_type' => :'PayoutMethodIdentityCardTypeEnum',
|
108
|
+
:'sender_identity_card_id' => :'String',
|
109
|
+
:'sender_city_of_birth' => :'String',
|
110
|
+
:'sender_country_of_birth' => :'String',
|
111
|
+
:'sender_gender' => :'PayoutMethodGenderEnum',
|
112
|
+
:'reason' => :'String',
|
113
|
+
:'identity_card_type' => :'PayoutMethodIdentityCardTypeEnum',
|
114
|
+
:'identity_card_id' => :'String',
|
115
|
+
:'reference' => :'String',
|
116
|
+
:'name' => :'String',
|
117
|
+
:'address' => :'String'
|
118
|
+
}
|
119
|
+
end
|
120
|
+
|
121
|
+
# List of class defined in oneOf (OpenAPI v3)
|
122
|
+
def self.openapi_one_of
|
123
|
+
[
|
124
|
+
:'PayoutMethodDetailsBTC',
|
125
|
+
:'PayoutMethodDetailsBalance',
|
126
|
+
:'PayoutMethodDetailsGBPBank',
|
127
|
+
:'PayoutMethodDetailsGHSBank',
|
128
|
+
:'PayoutMethodDetailsIBAN',
|
129
|
+
:'PayoutMethodDetailsMADCash',
|
130
|
+
:'PayoutMethodDetailsMobile',
|
131
|
+
:'PayoutMethodDetailsNGNBank',
|
132
|
+
:'PayoutMethodDetailsXOFBank',
|
133
|
+
:'PayoutMethodDetailsXOFMobile'
|
134
|
+
]
|
135
|
+
end
|
136
|
+
|
137
|
+
# Initializes the object
|
138
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
139
|
+
def initialize(attributes = {})
|
140
|
+
if (!attributes.is_a?(Hash))
|
141
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::PayoutMethodDetails` initialize method"
|
208
142
|
end
|
209
143
|
|
210
|
-
#
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
if @first_name.nil?
|
215
|
-
invalid_properties.push('invalid value for "first_name", first_name cannot be nil.')
|
144
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
145
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
146
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
147
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::PayoutMethodDetails`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
216
148
|
end
|
149
|
+
h[k.to_sym] = v
|
150
|
+
}
|
217
151
|
|
218
|
-
|
219
|
-
|
220
|
-
|
152
|
+
if attributes.key?(:'first_name')
|
153
|
+
self.first_name = attributes[:'first_name']
|
154
|
+
end
|
221
155
|
|
222
|
-
|
223
|
-
|
224
|
-
|
156
|
+
if attributes.key?(:'last_name')
|
157
|
+
self.last_name = attributes[:'last_name']
|
158
|
+
end
|
225
159
|
|
226
|
-
|
227
|
-
|
228
|
-
|
160
|
+
if attributes.key?(:'bank_code')
|
161
|
+
self.bank_code = attributes[:'bank_code']
|
162
|
+
end
|
229
163
|
|
230
|
-
|
231
|
-
|
232
|
-
|
164
|
+
if attributes.key?(:'bank_account')
|
165
|
+
self.bank_account = attributes[:'bank_account']
|
166
|
+
end
|
233
167
|
|
234
|
-
|
235
|
-
|
236
|
-
|
168
|
+
if attributes.key?(:'bank_account_type')
|
169
|
+
self.bank_account_type = attributes[:'bank_account_type']
|
170
|
+
end
|
237
171
|
|
238
|
-
|
239
|
-
|
240
|
-
|
172
|
+
if attributes.key?(:'phone_number')
|
173
|
+
self.phone_number = attributes[:'phone_number']
|
174
|
+
end
|
241
175
|
|
242
|
-
|
243
|
-
|
244
|
-
|
176
|
+
if attributes.key?(:'mobile_provider')
|
177
|
+
self.mobile_provider = attributes[:'mobile_provider']
|
178
|
+
end
|
245
179
|
|
246
|
-
|
247
|
-
|
248
|
-
|
180
|
+
if attributes.key?(:'iban')
|
181
|
+
self.iban = attributes[:'iban']
|
182
|
+
end
|
249
183
|
|
250
|
-
|
251
|
-
|
252
|
-
|
184
|
+
if attributes.key?(:'bank_name')
|
185
|
+
self.bank_name = attributes[:'bank_name']
|
186
|
+
end
|
253
187
|
|
254
|
-
|
255
|
-
|
256
|
-
|
188
|
+
if attributes.key?(:'bank_country')
|
189
|
+
self.bank_country = attributes[:'bank_country']
|
190
|
+
end
|
257
191
|
|
258
|
-
|
259
|
-
|
260
|
-
|
192
|
+
if attributes.key?(:'sort_code')
|
193
|
+
self.sort_code = attributes[:'sort_code']
|
194
|
+
end
|
261
195
|
|
262
|
-
|
263
|
-
|
264
|
-
|
196
|
+
if attributes.key?(:'bic')
|
197
|
+
self.bic = attributes[:'bic']
|
198
|
+
end
|
265
199
|
|
266
|
-
|
267
|
-
|
268
|
-
|
200
|
+
if attributes.key?(:'sender_identity_card_type')
|
201
|
+
self.sender_identity_card_type = attributes[:'sender_identity_card_type']
|
202
|
+
end
|
269
203
|
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
# Check to see if the all the properties in the model are valid
|
274
|
-
# @return true if the model is valid
|
275
|
-
def valid?
|
276
|
-
return false if @first_name.nil?
|
277
|
-
return false if @last_name.nil?
|
278
|
-
return false if @bank_code.nil?
|
279
|
-
return false if @bank_account.nil?
|
280
|
-
return false if @bank_account_type.nil?
|
281
|
-
return false if @phone_number.nil?
|
282
|
-
return false if @mobile_provider.nil?
|
283
|
-
return false if @bank_name.nil?
|
284
|
-
return false if @iban.nil?
|
285
|
-
return false if @sender_identity_card_type.nil?
|
286
|
-
return false if @sender_identity_card_id.nil?
|
287
|
-
return false if @sender_city_of_birth.nil?
|
288
|
-
return false if @sender_country_of_birth.nil?
|
289
|
-
return false if @sender_gender.nil?
|
290
|
-
_one_of_found = false
|
291
|
-
openapi_one_of.each do |_class|
|
292
|
-
_one_of = TransferZero.const_get(_class).build_from_hash(self.to_hash)
|
293
|
-
if _one_of.valid?
|
294
|
-
if _one_of_found?
|
295
|
-
return false
|
296
|
-
else
|
297
|
-
_one_of_found = true
|
298
|
-
end
|
299
|
-
end
|
300
|
-
end
|
204
|
+
if attributes.key?(:'sender_identity_card_id')
|
205
|
+
self.sender_identity_card_id = attributes[:'sender_identity_card_id']
|
206
|
+
end
|
301
207
|
|
302
|
-
|
303
|
-
|
304
|
-
|
208
|
+
if attributes.key?(:'sender_city_of_birth')
|
209
|
+
self.sender_city_of_birth = attributes[:'sender_city_of_birth']
|
210
|
+
end
|
305
211
|
|
306
|
-
|
212
|
+
if attributes.key?(:'sender_country_of_birth')
|
213
|
+
self.sender_country_of_birth = attributes[:'sender_country_of_birth']
|
214
|
+
end
|
215
|
+
|
216
|
+
if attributes.key?(:'sender_gender')
|
217
|
+
self.sender_gender = attributes[:'sender_gender']
|
307
218
|
end
|
308
219
|
|
309
|
-
|
310
|
-
|
311
|
-
def ==(o)
|
312
|
-
return true if self.equal?(o)
|
313
|
-
self.class == o.class &&
|
314
|
-
first_name == o.first_name &&
|
315
|
-
last_name == o.last_name &&
|
316
|
-
bank_code == o.bank_code &&
|
317
|
-
bank_account == o.bank_account &&
|
318
|
-
bank_account_type == o.bank_account_type &&
|
319
|
-
phone_number == o.phone_number &&
|
320
|
-
mobile_provider == o.mobile_provider &&
|
321
|
-
bank_name == o.bank_name &&
|
322
|
-
iban == o.iban &&
|
323
|
-
bic == o.bic &&
|
324
|
-
sender_identity_card_type == o.sender_identity_card_type &&
|
325
|
-
sender_identity_card_id == o.sender_identity_card_id &&
|
326
|
-
sender_city_of_birth == o.sender_city_of_birth &&
|
327
|
-
sender_country_of_birth == o.sender_country_of_birth &&
|
328
|
-
sender_gender == o.sender_gender &&
|
329
|
-
reason == o.reason &&
|
330
|
-
identity_card_type == o.identity_card_type &&
|
331
|
-
identity_card_id == o.identity_card_id &&
|
332
|
-
reference == o.reference
|
333
|
-
end
|
334
|
-
|
335
|
-
# @see the `==` method
|
336
|
-
# @param [Object] Object to be compared
|
337
|
-
def eql?(o)
|
338
|
-
self == o
|
339
|
-
end
|
340
|
-
|
341
|
-
# Calculates hash code according to all attributes.
|
342
|
-
# @return [Integer] Hash code
|
343
|
-
def hash
|
344
|
-
[first_name, last_name, bank_code, bank_account, bank_account_type, phone_number, mobile_provider, bank_name, iban, 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].hash
|
220
|
+
if attributes.key?(:'reason')
|
221
|
+
self.reason = attributes[:'reason']
|
345
222
|
end
|
346
223
|
|
224
|
+
if attributes.key?(:'identity_card_type')
|
225
|
+
self.identity_card_type = attributes[:'identity_card_type']
|
226
|
+
end
|
227
|
+
|
228
|
+
if attributes.key?(:'identity_card_id')
|
229
|
+
self.identity_card_id = attributes[:'identity_card_id']
|
230
|
+
end
|
231
|
+
|
232
|
+
if attributes.key?(:'reference')
|
233
|
+
self.reference = attributes[:'reference']
|
234
|
+
end
|
235
|
+
|
236
|
+
if attributes.key?(:'name')
|
237
|
+
self.name = attributes[:'name']
|
238
|
+
end
|
239
|
+
|
240
|
+
if attributes.key?(:'address')
|
241
|
+
self.address = attributes[:'address']
|
242
|
+
end
|
243
|
+
end
|
244
|
+
|
245
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
246
|
+
# @return Array for valid properties with the reasons
|
247
|
+
def list_invalid_properties
|
248
|
+
invalid_properties = Array.new
|
249
|
+
if @first_name.nil?
|
250
|
+
invalid_properties.push('invalid value for "first_name", first_name cannot be nil.')
|
251
|
+
end
|
252
|
+
|
253
|
+
if @last_name.nil?
|
254
|
+
invalid_properties.push('invalid value for "last_name", last_name cannot be nil.')
|
255
|
+
end
|
256
|
+
|
257
|
+
if @bank_code.nil?
|
258
|
+
invalid_properties.push('invalid value for "bank_code", bank_code cannot be nil.')
|
259
|
+
end
|
260
|
+
|
261
|
+
if @bank_account.nil?
|
262
|
+
invalid_properties.push('invalid value for "bank_account", bank_account cannot be nil.')
|
263
|
+
end
|
264
|
+
|
265
|
+
if @phone_number.nil?
|
266
|
+
invalid_properties.push('invalid value for "phone_number", phone_number cannot be nil.')
|
267
|
+
end
|
268
|
+
|
269
|
+
if @mobile_provider.nil?
|
270
|
+
invalid_properties.push('invalid value for "mobile_provider", mobile_provider cannot be nil.')
|
271
|
+
end
|
272
|
+
|
273
|
+
if @iban.nil?
|
274
|
+
invalid_properties.push('invalid value for "iban", iban cannot be nil.')
|
275
|
+
end
|
276
|
+
|
277
|
+
if @bank_name.nil?
|
278
|
+
invalid_properties.push('invalid value for "bank_name", bank_name cannot be nil.')
|
279
|
+
end
|
280
|
+
|
281
|
+
if @bank_country.nil?
|
282
|
+
invalid_properties.push('invalid value for "bank_country", bank_country cannot be nil.')
|
283
|
+
end
|
284
|
+
|
285
|
+
if @sender_identity_card_type.nil?
|
286
|
+
invalid_properties.push('invalid value for "sender_identity_card_type", sender_identity_card_type cannot be nil.')
|
287
|
+
end
|
288
|
+
|
289
|
+
if @sender_identity_card_id.nil?
|
290
|
+
invalid_properties.push('invalid value for "sender_identity_card_id", sender_identity_card_id cannot be nil.')
|
291
|
+
end
|
292
|
+
|
293
|
+
if @sender_city_of_birth.nil?
|
294
|
+
invalid_properties.push('invalid value for "sender_city_of_birth", sender_city_of_birth cannot be nil.')
|
295
|
+
end
|
296
|
+
|
297
|
+
if @sender_country_of_birth.nil?
|
298
|
+
invalid_properties.push('invalid value for "sender_country_of_birth", sender_country_of_birth cannot be nil.')
|
299
|
+
end
|
300
|
+
|
301
|
+
if @sender_gender.nil?
|
302
|
+
invalid_properties.push('invalid value for "sender_gender", sender_gender cannot be nil.')
|
303
|
+
end
|
304
|
+
|
305
|
+
if @name.nil?
|
306
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
307
|
+
end
|
308
|
+
|
309
|
+
if @address.nil?
|
310
|
+
invalid_properties.push('invalid value for "address", address cannot be nil.')
|
311
|
+
end
|
312
|
+
|
313
|
+
invalid_properties
|
314
|
+
end
|
315
|
+
|
316
|
+
# Check to see if the all the properties in the model are valid
|
317
|
+
# @return true if the model is valid
|
318
|
+
def valid?
|
319
|
+
return false if @first_name.nil?
|
320
|
+
return false if @last_name.nil?
|
321
|
+
return false if @bank_code.nil?
|
322
|
+
return false if @bank_account.nil?
|
323
|
+
return false if @phone_number.nil?
|
324
|
+
return false if @mobile_provider.nil?
|
325
|
+
return false if @iban.nil?
|
326
|
+
return false if @bank_name.nil?
|
327
|
+
return false if @bank_country.nil?
|
328
|
+
return false if @sender_identity_card_type.nil?
|
329
|
+
return false if @sender_identity_card_id.nil?
|
330
|
+
return false if @sender_city_of_birth.nil?
|
331
|
+
return false if @sender_country_of_birth.nil?
|
332
|
+
return false if @sender_gender.nil?
|
333
|
+
return false if @name.nil?
|
334
|
+
return false if @address.nil?
|
335
|
+
_one_of_found = false
|
336
|
+
openapi_one_of.each do |_class|
|
337
|
+
_one_of = TransferZero.const_get(_class).build_from_hash(self.to_hash)
|
338
|
+
if _one_of.valid?
|
339
|
+
if _one_of_found?
|
340
|
+
return false
|
341
|
+
else
|
342
|
+
_one_of_found = true
|
343
|
+
end
|
344
|
+
end
|
345
|
+
end
|
346
|
+
|
347
|
+
if !_one_of_found?
|
348
|
+
return false
|
349
|
+
end
|
350
|
+
|
351
|
+
true
|
352
|
+
end
|
353
|
+
|
354
|
+
# Checks equality by comparing each attribute.
|
355
|
+
# @param [Object] Object to be compared
|
356
|
+
def ==(o)
|
357
|
+
return true if self.equal?(o)
|
358
|
+
self.class == o.class &&
|
359
|
+
first_name == o.first_name &&
|
360
|
+
last_name == o.last_name &&
|
361
|
+
bank_code == o.bank_code &&
|
362
|
+
bank_account == o.bank_account &&
|
363
|
+
bank_account_type == o.bank_account_type &&
|
364
|
+
phone_number == o.phone_number &&
|
365
|
+
mobile_provider == o.mobile_provider &&
|
366
|
+
iban == o.iban &&
|
367
|
+
bank_name == o.bank_name &&
|
368
|
+
bank_country == o.bank_country &&
|
369
|
+
sort_code == o.sort_code &&
|
370
|
+
bic == o.bic &&
|
371
|
+
sender_identity_card_type == o.sender_identity_card_type &&
|
372
|
+
sender_identity_card_id == o.sender_identity_card_id &&
|
373
|
+
sender_city_of_birth == o.sender_city_of_birth &&
|
374
|
+
sender_country_of_birth == o.sender_country_of_birth &&
|
375
|
+
sender_gender == o.sender_gender &&
|
376
|
+
reason == o.reason &&
|
377
|
+
identity_card_type == o.identity_card_type &&
|
378
|
+
identity_card_id == o.identity_card_id &&
|
379
|
+
reference == o.reference &&
|
380
|
+
name == o.name &&
|
381
|
+
address == o.address
|
382
|
+
end
|
383
|
+
|
384
|
+
# @see the `==` method
|
385
|
+
# @param [Object] Object to be compared
|
386
|
+
def eql?(o)
|
387
|
+
self == o
|
388
|
+
end
|
389
|
+
|
390
|
+
# Calculates hash code according to all attributes.
|
391
|
+
# @return [Integer] Hash code
|
392
|
+
def hash
|
393
|
+
[first_name, last_name, bank_code, bank_account, bank_account_type, phone_number, mobile_provider, iban, bank_name, bank_country, 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].hash
|
394
|
+
end
|
395
|
+
|
347
396
|
require 'active_support/core_ext/hash'
|
348
397
|
require 'active_support/hash_with_indifferent_access.rb'
|
349
398
|
# Builds the object from hash
|
@@ -458,5 +507,6 @@ def _to_hash(value)
|
|
458
507
|
end
|
459
508
|
end
|
460
509
|
|
461
|
-
|
510
|
+
end
|
511
|
+
|
462
512
|
end
|