transferzero-sdk 1.5.0 → 1.9.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 +9 -5
- data/docs/Currency.md +0 -2
- data/docs/CurrencyExchange.md +0 -2
- data/docs/CurrencyOpposite.md +3 -3
- data/docs/Document.md +3 -3
- data/docs/DocumentsApi.md +2 -74
- data/docs/PayinMethodDetails.md +3 -1
- data/docs/PayinMethodDetailsBTC.md +17 -0
- 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/PayoutMethodDetailsMobile.md +3 -1
- data/docs/PayoutMethodDetailsZARBank.md +35 -0
- data/docs/PoliticallyExposedPerson.md +31 -0
- data/docs/Recipient.md +1 -1
- data/docs/RecipientsApi.md +1 -1
- data/docs/Sender.md +72 -32
- data/docs/Transaction.md +3 -3
- data/lib/transferzero-sdk.rb +5 -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 +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_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 +272 -0
- 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 +587 -348
- 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
- data/spec/models/politically_exposed_person_spec.rb +83 -0
- metadata +32 -13
- data/transferzero-sdk-1.4.0.gem +0 -0
@@ -13,124 +13,124 @@ 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\": \"774044436\" # local or international Senegalese format \"mobile_provider\": \"orange\", # \"orange\" or \"tigo\" }
|
17
|
+
class PayoutMethodDetailsXOFMobile
|
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 :mobile_provider
|
25
25
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
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
|
45
|
-
|
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::PayoutMethodDetailsXOFMobile` initialize method"
|
51
|
-
end
|
52
|
-
|
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::PayoutMethodDetailsXOFMobile`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
57
|
-
end
|
58
|
-
h[k.to_sym] = v
|
59
|
-
}
|
60
|
-
|
61
|
-
if attributes.key?(:'first_name')
|
62
|
-
self.first_name = attributes[:'first_name']
|
63
|
-
end
|
64
|
-
|
65
|
-
if attributes.key?(:'last_name')
|
66
|
-
self.last_name = attributes[:'last_name']
|
67
|
-
end
|
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
|
68
35
|
|
69
|
-
|
70
|
-
|
71
|
-
|
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
|
72
45
|
|
73
|
-
|
74
|
-
|
75
|
-
|
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::PayoutMethodDetailsXOFMobile` initialize method"
|
76
51
|
end
|
77
52
|
|
78
|
-
#
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
if @first_name.nil?
|
83
|
-
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::PayoutMethodDetailsXOFMobile`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
84
57
|
end
|
58
|
+
h[k.to_sym] = v
|
59
|
+
}
|
85
60
|
|
86
|
-
|
87
|
-
|
88
|
-
|
61
|
+
if attributes.key?(:'first_name')
|
62
|
+
self.first_name = attributes[:'first_name']
|
63
|
+
end
|
89
64
|
|
90
|
-
|
91
|
-
|
92
|
-
|
65
|
+
if attributes.key?(:'last_name')
|
66
|
+
self.last_name = attributes[:'last_name']
|
67
|
+
end
|
93
68
|
|
94
|
-
|
95
|
-
|
96
|
-
|
69
|
+
if attributes.key?(:'phone_number')
|
70
|
+
self.phone_number = attributes[:'phone_number']
|
71
|
+
end
|
97
72
|
|
98
|
-
|
73
|
+
if attributes.key?(:'mobile_provider')
|
74
|
+
self.mobile_provider = attributes[:'mobile_provider']
|
99
75
|
end
|
76
|
+
end
|
100
77
|
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
return false if @mobile_provider.nil?
|
108
|
-
true
|
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.')
|
109
84
|
end
|
110
85
|
|
111
|
-
|
112
|
-
|
113
|
-
def ==(o)
|
114
|
-
return true if self.equal?(o)
|
115
|
-
self.class == o.class &&
|
116
|
-
first_name == o.first_name &&
|
117
|
-
last_name == o.last_name &&
|
118
|
-
phone_number == o.phone_number &&
|
119
|
-
mobile_provider == o.mobile_provider
|
86
|
+
if @last_name.nil?
|
87
|
+
invalid_properties.push('invalid value for "last_name", last_name cannot be nil.')
|
120
88
|
end
|
121
89
|
|
122
|
-
|
123
|
-
|
124
|
-
def eql?(o)
|
125
|
-
self == o
|
90
|
+
if @phone_number.nil?
|
91
|
+
invalid_properties.push('invalid value for "phone_number", phone_number cannot be nil.')
|
126
92
|
end
|
127
93
|
|
128
|
-
|
129
|
-
|
130
|
-
def hash
|
131
|
-
[first_name, last_name, phone_number, mobile_provider].hash
|
94
|
+
if @mobile_provider.nil?
|
95
|
+
invalid_properties.push('invalid value for "mobile_provider", mobile_provider cannot be nil.')
|
132
96
|
end
|
133
97
|
|
98
|
+
invalid_properties
|
99
|
+
end
|
100
|
+
|
101
|
+
# Check to see if the all the properties in the model are valid
|
102
|
+
# @return true if the model is valid
|
103
|
+
def valid?
|
104
|
+
return false if @first_name.nil?
|
105
|
+
return false if @last_name.nil?
|
106
|
+
return false if @phone_number.nil?
|
107
|
+
return false if @mobile_provider.nil?
|
108
|
+
true
|
109
|
+
end
|
110
|
+
|
111
|
+
# Checks equality by comparing each attribute.
|
112
|
+
# @param [Object] Object to be compared
|
113
|
+
def ==(o)
|
114
|
+
return true if self.equal?(o)
|
115
|
+
self.class == o.class &&
|
116
|
+
first_name == o.first_name &&
|
117
|
+
last_name == o.last_name &&
|
118
|
+
phone_number == o.phone_number &&
|
119
|
+
mobile_provider == o.mobile_provider
|
120
|
+
end
|
121
|
+
|
122
|
+
# @see the `==` method
|
123
|
+
# @param [Object] Object to be compared
|
124
|
+
def eql?(o)
|
125
|
+
self == o
|
126
|
+
end
|
127
|
+
|
128
|
+
# Calculates hash code according to all attributes.
|
129
|
+
# @return [Integer] Hash code
|
130
|
+
def hash
|
131
|
+
[first_name, last_name, phone_number, mobile_provider].hash
|
132
|
+
end
|
133
|
+
|
134
134
|
require 'active_support/core_ext/hash'
|
135
135
|
require 'active_support/hash_with_indifferent_access.rb'
|
136
136
|
# Builds the object from hash
|
@@ -245,5 +245,6 @@ def _to_hash(value)
|
|
245
245
|
end
|
246
246
|
end
|
247
247
|
|
248
|
-
|
248
|
+
end
|
249
|
+
|
249
250
|
end
|
@@ -0,0 +1,324 @@
|
|
1
|
+
=begin
|
2
|
+
#TransferZero API
|
3
|
+
|
4
|
+
#Reference documentation for the TransferZero API V1
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.0.0-beta3
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module TransferZero
|
16
|
+
# ```JSON \"details\": { \"first_name\": \"First\", \"last_name\": \"Last\", \"street\": \"Main Street\", \"postal_code\": \"AB0001\", \"city\": \"Cape Town\", \"email\": \"recipient@email.com\", \"bank_code\": \"334810\", \"bank_account\": \"12345678\", \"phone_number\": \"+27119785313\", \"transfer_reason_code\": \"185\" } ``` See [ZAR Bank](https://docs.transferzero.com/docs/payout-details/#zarbank) documentation for the bank_code and transfer_reason_code lists
|
17
|
+
class PayoutMethodDetailsZARBank
|
18
|
+
attr_accessor :first_name
|
19
|
+
|
20
|
+
attr_accessor :last_name
|
21
|
+
|
22
|
+
attr_accessor :street
|
23
|
+
|
24
|
+
attr_accessor :postal_code
|
25
|
+
|
26
|
+
attr_accessor :city
|
27
|
+
|
28
|
+
attr_accessor :email
|
29
|
+
|
30
|
+
attr_accessor :bank_code
|
31
|
+
|
32
|
+
attr_accessor :bank_account
|
33
|
+
|
34
|
+
attr_accessor :phone_number
|
35
|
+
|
36
|
+
attr_accessor :transfer_reason_code
|
37
|
+
|
38
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
39
|
+
def self.attribute_map
|
40
|
+
{
|
41
|
+
:'first_name' => :'first_name',
|
42
|
+
:'last_name' => :'last_name',
|
43
|
+
:'street' => :'street',
|
44
|
+
:'postal_code' => :'postal_code',
|
45
|
+
:'city' => :'city',
|
46
|
+
:'email' => :'email',
|
47
|
+
:'bank_code' => :'bank_code',
|
48
|
+
:'bank_account' => :'bank_account',
|
49
|
+
:'phone_number' => :'phone_number',
|
50
|
+
:'transfer_reason_code' => :'transfer_reason_code'
|
51
|
+
}
|
52
|
+
end
|
53
|
+
|
54
|
+
# Attribute type mapping.
|
55
|
+
def self.openapi_types
|
56
|
+
{
|
57
|
+
:'first_name' => :'String',
|
58
|
+
:'last_name' => :'String',
|
59
|
+
:'street' => :'String',
|
60
|
+
:'postal_code' => :'String',
|
61
|
+
:'city' => :'String',
|
62
|
+
:'email' => :'String',
|
63
|
+
:'bank_code' => :'String',
|
64
|
+
:'bank_account' => :'String',
|
65
|
+
:'phone_number' => :'String',
|
66
|
+
:'transfer_reason_code' => :'String'
|
67
|
+
}
|
68
|
+
end
|
69
|
+
|
70
|
+
# Initializes the object
|
71
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
72
|
+
def initialize(attributes = {})
|
73
|
+
if (!attributes.is_a?(Hash))
|
74
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::PayoutMethodDetailsZARBank` initialize method"
|
75
|
+
end
|
76
|
+
|
77
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
78
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
79
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
80
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::PayoutMethodDetailsZARBank`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
81
|
+
end
|
82
|
+
h[k.to_sym] = v
|
83
|
+
}
|
84
|
+
|
85
|
+
if attributes.key?(:'first_name')
|
86
|
+
self.first_name = attributes[:'first_name']
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes.key?(:'last_name')
|
90
|
+
self.last_name = attributes[:'last_name']
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes.key?(:'street')
|
94
|
+
self.street = attributes[:'street']
|
95
|
+
end
|
96
|
+
|
97
|
+
if attributes.key?(:'postal_code')
|
98
|
+
self.postal_code = attributes[:'postal_code']
|
99
|
+
end
|
100
|
+
|
101
|
+
if attributes.key?(:'city')
|
102
|
+
self.city = attributes[:'city']
|
103
|
+
end
|
104
|
+
|
105
|
+
if attributes.key?(:'email')
|
106
|
+
self.email = attributes[:'email']
|
107
|
+
end
|
108
|
+
|
109
|
+
if attributes.key?(:'bank_code')
|
110
|
+
self.bank_code = attributes[:'bank_code']
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes.key?(:'bank_account')
|
114
|
+
self.bank_account = attributes[:'bank_account']
|
115
|
+
end
|
116
|
+
|
117
|
+
if attributes.key?(:'phone_number')
|
118
|
+
self.phone_number = attributes[:'phone_number']
|
119
|
+
end
|
120
|
+
|
121
|
+
if attributes.key?(:'transfer_reason_code')
|
122
|
+
self.transfer_reason_code = attributes[:'transfer_reason_code']
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
127
|
+
# @return Array for valid properties with the reasons
|
128
|
+
def list_invalid_properties
|
129
|
+
invalid_properties = Array.new
|
130
|
+
if @first_name.nil?
|
131
|
+
invalid_properties.push('invalid value for "first_name", first_name cannot be nil.')
|
132
|
+
end
|
133
|
+
|
134
|
+
if @last_name.nil?
|
135
|
+
invalid_properties.push('invalid value for "last_name", last_name cannot be nil.')
|
136
|
+
end
|
137
|
+
|
138
|
+
if @street.nil?
|
139
|
+
invalid_properties.push('invalid value for "street", street cannot be nil.')
|
140
|
+
end
|
141
|
+
|
142
|
+
if @postal_code.nil?
|
143
|
+
invalid_properties.push('invalid value for "postal_code", postal_code cannot be nil.')
|
144
|
+
end
|
145
|
+
|
146
|
+
if @city.nil?
|
147
|
+
invalid_properties.push('invalid value for "city", city cannot be nil.')
|
148
|
+
end
|
149
|
+
|
150
|
+
if @bank_code.nil?
|
151
|
+
invalid_properties.push('invalid value for "bank_code", bank_code cannot be nil.')
|
152
|
+
end
|
153
|
+
|
154
|
+
if @bank_account.nil?
|
155
|
+
invalid_properties.push('invalid value for "bank_account", bank_account cannot be nil.')
|
156
|
+
end
|
157
|
+
|
158
|
+
if @phone_number.nil?
|
159
|
+
invalid_properties.push('invalid value for "phone_number", phone_number cannot be nil.')
|
160
|
+
end
|
161
|
+
|
162
|
+
invalid_properties
|
163
|
+
end
|
164
|
+
|
165
|
+
# Check to see if the all the properties in the model are valid
|
166
|
+
# @return true if the model is valid
|
167
|
+
def valid?
|
168
|
+
return false if @first_name.nil?
|
169
|
+
return false if @last_name.nil?
|
170
|
+
return false if @street.nil?
|
171
|
+
return false if @postal_code.nil?
|
172
|
+
return false if @city.nil?
|
173
|
+
return false if @bank_code.nil?
|
174
|
+
return false if @bank_account.nil?
|
175
|
+
return false if @phone_number.nil?
|
176
|
+
true
|
177
|
+
end
|
178
|
+
|
179
|
+
# Checks equality by comparing each attribute.
|
180
|
+
# @param [Object] Object to be compared
|
181
|
+
def ==(o)
|
182
|
+
return true if self.equal?(o)
|
183
|
+
self.class == o.class &&
|
184
|
+
first_name == o.first_name &&
|
185
|
+
last_name == o.last_name &&
|
186
|
+
street == o.street &&
|
187
|
+
postal_code == o.postal_code &&
|
188
|
+
city == o.city &&
|
189
|
+
email == o.email &&
|
190
|
+
bank_code == o.bank_code &&
|
191
|
+
bank_account == o.bank_account &&
|
192
|
+
phone_number == o.phone_number &&
|
193
|
+
transfer_reason_code == o.transfer_reason_code
|
194
|
+
end
|
195
|
+
|
196
|
+
# @see the `==` method
|
197
|
+
# @param [Object] Object to be compared
|
198
|
+
def eql?(o)
|
199
|
+
self == o
|
200
|
+
end
|
201
|
+
|
202
|
+
# Calculates hash code according to all attributes.
|
203
|
+
# @return [Integer] Hash code
|
204
|
+
def hash
|
205
|
+
[first_name, last_name, street, postal_code, city, email, bank_code, bank_account, phone_number, transfer_reason_code].hash
|
206
|
+
end
|
207
|
+
|
208
|
+
require 'active_support/core_ext/hash'
|
209
|
+
require 'active_support/hash_with_indifferent_access.rb'
|
210
|
+
# Builds the object from hash
|
211
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
212
|
+
# @return [Object] Returns the model itself
|
213
|
+
def build_from_hash(attributes)
|
214
|
+
return nil unless attributes.is_a?(Hash)
|
215
|
+
self.class.openapi_types.each_pair do |key, type|
|
216
|
+
if type =~ /\AArray<(.*)>/i
|
217
|
+
# check to ensure the input is an array given that the the attribute
|
218
|
+
# is documented as an array but the input is not
|
219
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
220
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
221
|
+
end
|
222
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
223
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
224
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
225
|
+
end
|
226
|
+
|
227
|
+
self
|
228
|
+
end
|
229
|
+
|
230
|
+
# Deserializes the data based on type
|
231
|
+
# @param string type Data type
|
232
|
+
# @param string value Value to be deserialized
|
233
|
+
# @return [Object] Deserialized data
|
234
|
+
def _deserialize(type, value)
|
235
|
+
case type.to_sym
|
236
|
+
when :DateTime
|
237
|
+
DateTime.parse(value)
|
238
|
+
when :Date
|
239
|
+
Date.parse(value)
|
240
|
+
when :String
|
241
|
+
value.to_s
|
242
|
+
when :Integer
|
243
|
+
value.to_i
|
244
|
+
when :Float
|
245
|
+
value.to_f
|
246
|
+
when :Boolean
|
247
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
248
|
+
true
|
249
|
+
else
|
250
|
+
false
|
251
|
+
end
|
252
|
+
when :Object
|
253
|
+
# generic object (usually a Hash), return directly
|
254
|
+
value
|
255
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
256
|
+
inner_type = Regexp.last_match[:inner_type]
|
257
|
+
value.map { |v| _deserialize(inner_type, v) }
|
258
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
259
|
+
k_type = Regexp.last_match[:k_type]
|
260
|
+
v_type = Regexp.last_match[:v_type]
|
261
|
+
{}.tap do |hash|
|
262
|
+
value.each do |k, v|
|
263
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
264
|
+
end
|
265
|
+
end
|
266
|
+
else # model
|
267
|
+
temp_model = TransferZero.const_get(type).new
|
268
|
+
temp_model.build_from_hash(value)
|
269
|
+
end
|
270
|
+
end
|
271
|
+
|
272
|
+
# Returns the string representation of the object
|
273
|
+
# @return [String] String presentation of the object
|
274
|
+
def to_s
|
275
|
+
to_hash.to_s
|
276
|
+
end
|
277
|
+
|
278
|
+
# to_body is an alias to to_hash (backward compatibility)
|
279
|
+
# @return [Hash] Returns the object in the form of hash
|
280
|
+
def to_body
|
281
|
+
to_hash
|
282
|
+
end
|
283
|
+
|
284
|
+
# Returns the object in the form of hash
|
285
|
+
# @return [Hash] Returns the object in the form of hash
|
286
|
+
def to_hash
|
287
|
+
hash = {}
|
288
|
+
self.class.attribute_map.each_pair do |attr, param|
|
289
|
+
value = self.send(attr)
|
290
|
+
next if value.nil?
|
291
|
+
hash[param] = _to_hash(value)
|
292
|
+
end
|
293
|
+
::ActiveSupport::HashWithIndifferentAccess.new(hash)
|
294
|
+
end
|
295
|
+
|
296
|
+
def [](key)
|
297
|
+
to_hash[key]
|
298
|
+
end
|
299
|
+
|
300
|
+
def dig(*args)
|
301
|
+
to_hash.dig(*args)
|
302
|
+
end
|
303
|
+
|
304
|
+
# Outputs non-array value in the form of hash
|
305
|
+
# For object, use to_hash. Otherwise, just return the value
|
306
|
+
# @param [Object] value Any valid value
|
307
|
+
# @return [Hash] Returns the value in the form of hash
|
308
|
+
def _to_hash(value)
|
309
|
+
if value.is_a?(Array)
|
310
|
+
value.compact.map { |v| _to_hash(v) }
|
311
|
+
elsif value.is_a?(Hash)
|
312
|
+
{}.tap do |hash|
|
313
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
314
|
+
end
|
315
|
+
elsif value.respond_to? :to_hash
|
316
|
+
value.to_hash
|
317
|
+
else
|
318
|
+
value
|
319
|
+
end
|
320
|
+
end
|
321
|
+
|
322
|
+
end
|
323
|
+
|
324
|
+
end
|