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,116 +13,116 @@ 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
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
# Attribute type mapping.
|
44
|
-
def self.openapi_types
|
45
|
-
{
|
46
|
-
:'type' => :'String',
|
47
|
-
:'in_details' => :'PayinMethodDetails',
|
48
|
-
:'out_details' => :'Object',
|
49
|
-
:'instructions' => :'Object',
|
50
|
-
:'provider' => :'String'
|
51
|
-
}
|
52
|
-
end
|
53
|
-
|
54
|
-
# Initializes the object
|
55
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
56
|
-
def initialize(attributes = {})
|
57
|
-
if (!attributes.is_a?(Hash))
|
58
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::PayinMethod` initialize method"
|
59
|
-
end
|
60
|
-
|
61
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
62
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
63
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
64
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::PayinMethod`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
65
|
-
end
|
66
|
-
h[k.to_sym] = v
|
67
|
-
}
|
68
|
-
|
69
|
-
if attributes.key?(:'type')
|
70
|
-
self.type = attributes[:'type']
|
71
|
-
end
|
16
|
+
# This describes the specific details on how the funds should be collected from the sender.
|
17
|
+
class PayinMethod
|
18
|
+
# Describes how the payment should be requested from the user. Possible values: - `NGN::Bank`: NGN bank and card collection requests - `NGN::Mobile`: NGN mobile collections - `GHS::Mobile`: GHS mobile collections - `TZS::Mobile`: TZS mobile collections - `UGX::Mobile`: UGX mobile collections - `EUR::Bank`: EUR IBAN collections - `GBP::Bank`: GBP IBAN collections
|
19
|
+
attr_accessor :type
|
20
|
+
|
21
|
+
attr_accessor :in_details
|
22
|
+
|
23
|
+
# This will contain the description on where to pay the funds. Please see the [Collections Details](https://docs.transferzero.com/docs/collection-details) in the API documentation on what to expect here.
|
24
|
+
attr_accessor :out_details
|
25
|
+
|
26
|
+
# This will contain the instructions on how to pay the funds. Please see the [Collections Details](https://docs.transferzero.com/docs/collection-details) in the API documentation on what to expect here.
|
27
|
+
attr_accessor :instructions
|
28
|
+
|
29
|
+
# Describes which provider to use for collection. Please see the [Collections Details](https://docs.transferzero.com/docs/collection-details) in the API documentation on the valid values
|
30
|
+
attr_accessor :provider
|
31
|
+
|
32
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
33
|
+
def self.attribute_map
|
34
|
+
{
|
35
|
+
:'type' => :'type',
|
36
|
+
:'in_details' => :'in_details',
|
37
|
+
:'out_details' => :'out_details',
|
38
|
+
:'instructions' => :'instructions',
|
39
|
+
:'provider' => :'provider'
|
40
|
+
}
|
41
|
+
end
|
72
42
|
|
73
|
-
|
74
|
-
|
75
|
-
|
43
|
+
# Attribute type mapping.
|
44
|
+
def self.openapi_types
|
45
|
+
{
|
46
|
+
:'type' => :'String',
|
47
|
+
:'in_details' => :'PayinMethodDetails',
|
48
|
+
:'out_details' => :'Object',
|
49
|
+
:'instructions' => :'Object',
|
50
|
+
:'provider' => :'String'
|
51
|
+
}
|
52
|
+
end
|
76
53
|
|
77
|
-
|
78
|
-
|
79
|
-
|
54
|
+
# Initializes the object
|
55
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
56
|
+
def initialize(attributes = {})
|
57
|
+
if (!attributes.is_a?(Hash))
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::PayinMethod` initialize method"
|
59
|
+
end
|
80
60
|
|
81
|
-
|
82
|
-
|
61
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
62
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
63
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
64
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::PayinMethod`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
83
65
|
end
|
66
|
+
h[k.to_sym] = v
|
67
|
+
}
|
84
68
|
|
85
|
-
|
86
|
-
|
87
|
-
end
|
69
|
+
if attributes.key?(:'type')
|
70
|
+
self.type = attributes[:'type']
|
88
71
|
end
|
89
72
|
|
90
|
-
|
91
|
-
|
92
|
-
def list_invalid_properties
|
93
|
-
invalid_properties = Array.new
|
94
|
-
invalid_properties
|
73
|
+
if attributes.key?(:'in_details')
|
74
|
+
self.in_details = attributes[:'in_details']
|
95
75
|
end
|
96
76
|
|
97
|
-
|
98
|
-
|
99
|
-
def valid?
|
100
|
-
true
|
77
|
+
if attributes.key?(:'out_details')
|
78
|
+
self.out_details = attributes[:'out_details']
|
101
79
|
end
|
102
80
|
|
103
|
-
|
104
|
-
|
105
|
-
def ==(o)
|
106
|
-
return true if self.equal?(o)
|
107
|
-
self.class == o.class &&
|
108
|
-
type == o.type &&
|
109
|
-
in_details == o.in_details &&
|
110
|
-
out_details == o.out_details &&
|
111
|
-
instructions == o.instructions &&
|
112
|
-
provider == o.provider
|
81
|
+
if attributes.key?(:'instructions')
|
82
|
+
self.instructions = attributes[:'instructions']
|
113
83
|
end
|
114
84
|
|
115
|
-
|
116
|
-
|
117
|
-
def eql?(o)
|
118
|
-
self == o
|
85
|
+
if attributes.key?(:'provider')
|
86
|
+
self.provider = attributes[:'provider']
|
119
87
|
end
|
88
|
+
end
|
120
89
|
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
90
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
91
|
+
# @return Array for valid properties with the reasons
|
92
|
+
def list_invalid_properties
|
93
|
+
invalid_properties = Array.new
|
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
|
+
true
|
101
|
+
end
|
102
|
+
|
103
|
+
# Checks equality by comparing each attribute.
|
104
|
+
# @param [Object] Object to be compared
|
105
|
+
def ==(o)
|
106
|
+
return true if self.equal?(o)
|
107
|
+
self.class == o.class &&
|
108
|
+
type == o.type &&
|
109
|
+
in_details == o.in_details &&
|
110
|
+
out_details == o.out_details &&
|
111
|
+
instructions == o.instructions &&
|
112
|
+
provider == o.provider
|
113
|
+
end
|
114
|
+
|
115
|
+
# @see the `==` method
|
116
|
+
# @param [Object] Object to be compared
|
117
|
+
def eql?(o)
|
118
|
+
self == o
|
119
|
+
end
|
120
|
+
|
121
|
+
# Calculates hash code according to all attributes.
|
122
|
+
# @return [Integer] Hash code
|
123
|
+
def hash
|
124
|
+
[type, in_details, out_details, instructions, provider].hash
|
125
|
+
end
|
126
126
|
|
127
127
|
require 'active_support/core_ext/hash'
|
128
128
|
require 'active_support/hash_with_indifferent_access.rb'
|
@@ -238,5 +238,6 @@ def _to_hash(value)
|
|
238
238
|
end
|
239
239
|
end
|
240
240
|
|
241
|
-
|
241
|
+
end
|
242
|
+
|
242
243
|
end
|
@@ -13,136 +13,147 @@ 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
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
16
|
+
# Fields needed by the payment processor. Depends on the chose payin type. See the appropriate model details for more info: - `NGN::Bank`: see [`PayinMethodDetailsNGNBank`](#model-PayinMethodDetailsNGNBank) - `GHS::Mobile`: see [`PayinMethodDetailsMobile`](#model-PayinMethodDetailsMobile) - `UGX::Mobile`: see [`PayinMethodDetailsMobile`](#model-PayinMethodDetailsMobile) - `TZS::Mobile`: see [`PayinMethodDetailsMobile`](#model-PayinMethodDetailsMobile) Note that some payin processors don't require additional input, these include `paga` through `NGN::Mobile`, `lhv` through `EUR::Bank` and `GBP::Bank`. Some providers like `providus` also have all of their fields set as optional, so you might not want to set any values. To use these providers please set this value to `{}` (an empty hash)
|
17
|
+
class PayinMethodDetails
|
18
|
+
# The payment method which the user will use to make the payments. Options are `bank`, `card` or you can leave empty to support both.
|
19
|
+
attr_accessor :payment_method
|
20
|
+
|
21
|
+
# This is where the user should be redirected back when the payment has been finished
|
22
|
+
attr_accessor :redirect_url
|
23
|
+
|
24
|
+
# The phone number where the funds should be collected from
|
25
|
+
attr_accessor :phone_number
|
26
|
+
|
27
|
+
# States whether to send out the instructions to the phone number on how to pay the funds or not. This shuold always be set to true, otherwise the sender might not receive a prompt for payment.
|
28
|
+
attr_accessor :send_instructions
|
29
|
+
|
30
|
+
# Please make sure the refund_address is a valid BTC address belonging to the sender, as that is going to be used in case the transaction has to be refunded.
|
31
|
+
attr_accessor :refund_address
|
32
|
+
|
33
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
34
|
+
def self.attribute_map
|
35
|
+
{
|
36
|
+
:'payment_method' => :'payment_method',
|
37
|
+
:'redirect_url' => :'redirect_url',
|
38
|
+
:'phone_number' => :'phone_number',
|
39
|
+
:'send_instructions' => :'send_instructions',
|
40
|
+
:'refund_address' => :'refund_address'
|
41
|
+
}
|
42
|
+
end
|
39
43
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
44
|
+
# Attribute type mapping.
|
45
|
+
def self.openapi_types
|
46
|
+
{
|
47
|
+
:'payment_method' => :'String',
|
48
|
+
:'redirect_url' => :'String',
|
49
|
+
:'phone_number' => :'String',
|
50
|
+
:'send_instructions' => :'Boolean',
|
51
|
+
:'refund_address' => :'String'
|
52
|
+
}
|
53
|
+
end
|
49
54
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
55
|
+
# List of class defined in oneOf (OpenAPI v3)
|
56
|
+
def self.openapi_one_of
|
57
|
+
[
|
58
|
+
:'PayinMethodDetailsBTC',
|
59
|
+
:'PayinMethodDetailsMobile',
|
60
|
+
:'PayinMethodDetailsNGNBank'
|
61
|
+
]
|
62
|
+
end
|
63
|
+
|
64
|
+
# Initializes the object
|
65
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
66
|
+
def initialize(attributes = {})
|
67
|
+
if (!attributes.is_a?(Hash))
|
68
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::PayinMethodDetails` initialize method"
|
56
69
|
end
|
57
70
|
|
58
|
-
#
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::PayinMethodDetails` initialize method"
|
71
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
72
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
73
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
74
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::PayinMethodDetails`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
63
75
|
end
|
76
|
+
h[k.to_sym] = v
|
77
|
+
}
|
64
78
|
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::PayinMethodDetails`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
69
|
-
end
|
70
|
-
h[k.to_sym] = v
|
71
|
-
}
|
72
|
-
|
73
|
-
if attributes.key?(:'payment_method')
|
74
|
-
self.payment_method = attributes[:'payment_method']
|
75
|
-
end
|
79
|
+
if attributes.key?(:'payment_method')
|
80
|
+
self.payment_method = attributes[:'payment_method']
|
81
|
+
end
|
76
82
|
|
77
|
-
|
78
|
-
|
79
|
-
|
83
|
+
if attributes.key?(:'redirect_url')
|
84
|
+
self.redirect_url = attributes[:'redirect_url']
|
85
|
+
end
|
80
86
|
|
81
|
-
|
82
|
-
|
83
|
-
|
87
|
+
if attributes.key?(:'phone_number')
|
88
|
+
self.phone_number = attributes[:'phone_number']
|
89
|
+
end
|
84
90
|
|
85
|
-
|
86
|
-
|
87
|
-
end
|
91
|
+
if attributes.key?(:'send_instructions')
|
92
|
+
self.send_instructions = attributes[:'send_instructions']
|
88
93
|
end
|
89
94
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
if @phone_number.nil?
|
95
|
-
invalid_properties.push('invalid value for "phone_number", phone_number cannot be nil.')
|
96
|
-
end
|
95
|
+
if attributes.key?(:'refund_address')
|
96
|
+
self.refund_address = attributes[:'refund_address']
|
97
|
+
end
|
98
|
+
end
|
97
99
|
|
98
|
-
|
100
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
101
|
+
# @return Array for valid properties with the reasons
|
102
|
+
def list_invalid_properties
|
103
|
+
invalid_properties = Array.new
|
104
|
+
if @phone_number.nil?
|
105
|
+
invalid_properties.push('invalid value for "phone_number", phone_number cannot be nil.')
|
99
106
|
end
|
100
107
|
|
101
|
-
|
102
|
-
|
103
|
-
def valid?
|
104
|
-
return false if @phone_number.nil?
|
105
|
-
_one_of_found = false
|
106
|
-
openapi_one_of.each do |_class|
|
107
|
-
_one_of = TransferZero.const_get(_class).build_from_hash(self.to_hash)
|
108
|
-
if _one_of.valid?
|
109
|
-
if _one_of_found?
|
110
|
-
return false
|
111
|
-
else
|
112
|
-
_one_of_found = true
|
113
|
-
end
|
114
|
-
end
|
115
|
-
end
|
108
|
+
invalid_properties
|
109
|
+
end
|
116
110
|
|
117
|
-
|
118
|
-
|
111
|
+
# Check to see if the all the properties in the model are valid
|
112
|
+
# @return true if the model is valid
|
113
|
+
def valid?
|
114
|
+
return false if @phone_number.nil?
|
115
|
+
_one_of_found = false
|
116
|
+
openapi_one_of.each do |_class|
|
117
|
+
_one_of = TransferZero.const_get(_class).build_from_hash(self.to_hash)
|
118
|
+
if _one_of.valid?
|
119
|
+
if _one_of_found?
|
120
|
+
return false
|
121
|
+
else
|
122
|
+
_one_of_found = true
|
123
|
+
end
|
119
124
|
end
|
120
|
-
|
121
|
-
true
|
122
125
|
end
|
123
126
|
|
124
|
-
|
125
|
-
|
126
|
-
def ==(o)
|
127
|
-
return true if self.equal?(o)
|
128
|
-
self.class == o.class &&
|
129
|
-
payment_method == o.payment_method &&
|
130
|
-
redirect_url == o.redirect_url &&
|
131
|
-
phone_number == o.phone_number &&
|
132
|
-
send_instructions == o.send_instructions
|
127
|
+
if !_one_of_found?
|
128
|
+
return false
|
133
129
|
end
|
134
130
|
|
135
|
-
|
136
|
-
|
137
|
-
def eql?(o)
|
138
|
-
self == o
|
139
|
-
end
|
131
|
+
true
|
132
|
+
end
|
140
133
|
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
134
|
+
# Checks equality by comparing each attribute.
|
135
|
+
# @param [Object] Object to be compared
|
136
|
+
def ==(o)
|
137
|
+
return true if self.equal?(o)
|
138
|
+
self.class == o.class &&
|
139
|
+
payment_method == o.payment_method &&
|
140
|
+
redirect_url == o.redirect_url &&
|
141
|
+
phone_number == o.phone_number &&
|
142
|
+
send_instructions == o.send_instructions &&
|
143
|
+
refund_address == o.refund_address
|
144
|
+
end
|
145
|
+
|
146
|
+
# @see the `==` method
|
147
|
+
# @param [Object] Object to be compared
|
148
|
+
def eql?(o)
|
149
|
+
self == o
|
150
|
+
end
|
151
|
+
|
152
|
+
# Calculates hash code according to all attributes.
|
153
|
+
# @return [Integer] Hash code
|
154
|
+
def hash
|
155
|
+
[payment_method, redirect_url, phone_number, send_instructions, refund_address].hash
|
156
|
+
end
|
146
157
|
|
147
158
|
require 'active_support/core_ext/hash'
|
148
159
|
require 'active_support/hash_with_indifferent_access.rb'
|
@@ -258,5 +269,6 @@ def _to_hash(value)
|
|
258
269
|
end
|
259
270
|
end
|
260
271
|
|
261
|
-
|
272
|
+
end
|
273
|
+
|
262
274
|
end
|