transferzero-sdk 1.6.0 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +93 -0
- data/README.md +12 -4
- data/docs/Currency.md +0 -2
- data/docs/CurrencyExchange.md +0 -2
- data/docs/CurrencyOpposite.md +3 -3
- data/docs/Document.md +2 -0
- data/docs/PayoutMethod.md +1 -1
- data/docs/PayoutMethodCashProviderEnum.md +16 -0
- data/docs/PayoutMethodDetails.md +19 -5
- data/docs/PayoutMethodDetailsGBPBank.md +29 -0
- data/docs/PayoutMethodDetailsIBAN.md +1 -1
- data/docs/PayoutMethodDetailsMobile.md +3 -1
- data/docs/PayoutMethodDetailsXOFCash.md +27 -0
- data/docs/PayoutMethodDetailsZARBank.md +35 -0
- data/docs/ProofOfPayment.md +23 -0
- data/docs/ProofOfPaymentListResponse.md +17 -0
- data/docs/Recipient.md +3 -1
- data/docs/RecipientStateReasonDetails.md +23 -0
- data/docs/RecipientsApi.md +63 -1
- data/docs/Sender.md +20 -8
- data/lib/transferzero-sdk.rb +7 -0
- 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 +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 +180 -169
- 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 -121
- data/lib/transferzero-sdk/models/payin_method_details_btc.rb +62 -61
- 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_details.rb +402 -320
- data/lib/transferzero-sdk/models/payout_method_details_balance.rb +61 -60
- data/lib/transferzero-sdk/models/payout_method_details_btc.rb +97 -96
- 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 +263 -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 -122
- 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 +237 -227
- 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 +565 -480
- 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/payout_method_cash_provider_enum_spec.rb +35 -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
- metadata +32 -3
|
@@ -13,75 +13,75 @@ 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
|
-
|
|
16
|
+
class DebitResponse
|
|
17
|
+
attr_accessor :object
|
|
18
|
+
|
|
19
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
20
|
+
def self.attribute_map
|
|
21
|
+
{
|
|
22
|
+
:'object' => :'object'
|
|
23
|
+
}
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Attribute type mapping.
|
|
27
|
+
def self.openapi_types
|
|
28
|
+
{
|
|
29
|
+
:'object' => :'Debit'
|
|
30
|
+
}
|
|
31
|
+
end
|
|
25
32
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
33
|
+
# Initializes the object
|
|
34
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
35
|
+
def initialize(attributes = {})
|
|
36
|
+
if (!attributes.is_a?(Hash))
|
|
37
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::DebitResponse` initialize method"
|
|
31
38
|
end
|
|
32
39
|
|
|
33
|
-
#
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::DebitResponse` initialize method"
|
|
40
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
41
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
42
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
43
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::DebitResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
38
44
|
end
|
|
45
|
+
h[k.to_sym] = v
|
|
46
|
+
}
|
|
39
47
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
|
43
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::DebitResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
44
|
-
end
|
|
45
|
-
h[k.to_sym] = v
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
if attributes.key?(:'object')
|
|
49
|
-
self.object = attributes[:'object']
|
|
50
|
-
end
|
|
48
|
+
if attributes.key?(:'object')
|
|
49
|
+
self.object = attributes[:'object']
|
|
51
50
|
end
|
|
51
|
+
end
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
53
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
54
|
+
# @return Array for valid properties with the reasons
|
|
55
|
+
def list_invalid_properties
|
|
56
|
+
invalid_properties = Array.new
|
|
57
|
+
invalid_properties
|
|
58
|
+
end
|
|
59
59
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
# Check to see if the all the properties in the model are valid
|
|
61
|
+
# @return true if the model is valid
|
|
62
|
+
def valid?
|
|
63
|
+
true
|
|
64
|
+
end
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
66
|
+
# Checks equality by comparing each attribute.
|
|
67
|
+
# @param [Object] Object to be compared
|
|
68
|
+
def ==(o)
|
|
69
|
+
return true if self.equal?(o)
|
|
70
|
+
self.class == o.class &&
|
|
71
|
+
object == o.object
|
|
72
|
+
end
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
74
|
+
# @see the `==` method
|
|
75
|
+
# @param [Object] Object to be compared
|
|
76
|
+
def eql?(o)
|
|
77
|
+
self == o
|
|
78
|
+
end
|
|
79
79
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
80
|
+
# Calculates hash code according to all attributes.
|
|
81
|
+
# @return [Integer] Hash code
|
|
82
|
+
def hash
|
|
83
|
+
[object].hash
|
|
84
|
+
end
|
|
85
85
|
|
|
86
86
|
require 'active_support/core_ext/hash'
|
|
87
87
|
require 'active_support/hash_with_indifferent_access.rb'
|
|
@@ -197,5 +197,6 @@ def _to_hash(value)
|
|
|
197
197
|
end
|
|
198
198
|
end
|
|
199
199
|
|
|
200
|
-
|
|
200
|
+
end
|
|
201
|
+
|
|
201
202
|
end
|
|
@@ -13,219 +13,229 @@ OpenAPI Generator version: 4.0.0-beta3
|
|
|
13
13
|
require 'date'
|
|
14
14
|
|
|
15
15
|
module TransferZero
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
class Document
|
|
17
|
+
# Base64 encoded data uri of an image/pdf file or a fully qualified url
|
|
18
|
+
attr_accessor :upload
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
# URL of the document location
|
|
21
|
+
attr_accessor :url
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
# Name of the upload
|
|
24
|
+
attr_accessor :upload_file_name
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
# Metadata of document
|
|
27
|
+
attr_accessor :metadata
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
attr_accessor :upload_content_type
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
attr_accessor :category
|
|
31
|
+
attr_accessor :upload_file_size
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
# uncategorised
|
|
34
|
+
attr_accessor :category
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
# The side of the KYC ID. One of 'front' or 'back'
|
|
37
|
+
attr_accessor :side
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
# This is a brief description of the document type
|
|
40
|
+
attr_accessor :document_type
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
# Issuing country of ID in 2-character alpha ISO 3166-2 country format
|
|
43
|
+
attr_accessor :issuing_country
|
|
43
44
|
|
|
44
|
-
|
|
45
|
-
attr_accessor :errors
|
|
45
|
+
attr_accessor :id
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
attr_reader :allowable_values
|
|
47
|
+
# The fields that have some problems and don't pass validation
|
|
48
|
+
attr_accessor :errors
|
|
50
49
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
when /Integer/i
|
|
55
|
-
value.to_i
|
|
56
|
-
when /Float/i
|
|
57
|
-
value.to_f
|
|
58
|
-
else
|
|
59
|
-
value
|
|
60
|
-
end
|
|
61
|
-
end
|
|
62
|
-
end
|
|
50
|
+
class EnumAttributeValidator
|
|
51
|
+
attr_reader :datatype
|
|
52
|
+
attr_reader :allowable_values
|
|
63
53
|
|
|
64
|
-
|
|
65
|
-
|
|
54
|
+
def initialize(datatype, allowable_values)
|
|
55
|
+
@allowable_values = allowable_values.map do |value|
|
|
56
|
+
case datatype.to_s
|
|
57
|
+
when /Integer/i
|
|
58
|
+
value.to_i
|
|
59
|
+
when /Float/i
|
|
60
|
+
value.to_f
|
|
61
|
+
else
|
|
62
|
+
value
|
|
63
|
+
end
|
|
66
64
|
end
|
|
67
65
|
end
|
|
68
66
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
{
|
|
72
|
-
:'upload' => :'upload',
|
|
73
|
-
:'upload_file_name' => :'upload_file_name',
|
|
74
|
-
:'metadata' => :'metadata',
|
|
75
|
-
:'upload_content_type' => :'upload_content_type',
|
|
76
|
-
:'upload_file_size' => :'upload_file_size',
|
|
77
|
-
:'category' => :'category',
|
|
78
|
-
:'side' => :'side',
|
|
79
|
-
:'document_type' => :'document_type',
|
|
80
|
-
:'issuing_country' => :'issuing_country',
|
|
81
|
-
:'id' => :'id',
|
|
82
|
-
:'errors' => :'errors'
|
|
83
|
-
}
|
|
67
|
+
def valid?(value)
|
|
68
|
+
!value || allowable_values.include?(value)
|
|
84
69
|
end
|
|
70
|
+
end
|
|
85
71
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
# Initializes the object
|
|
104
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
105
|
-
def initialize(attributes = {})
|
|
106
|
-
if (!attributes.is_a?(Hash))
|
|
107
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::Document` initialize method"
|
|
108
|
-
end
|
|
109
|
-
|
|
110
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
|
111
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
112
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
|
113
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::Document`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
114
|
-
end
|
|
115
|
-
h[k.to_sym] = v
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
if attributes.key?(:'upload')
|
|
119
|
-
self.upload = attributes[:'upload']
|
|
120
|
-
end
|
|
72
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
73
|
+
def self.attribute_map
|
|
74
|
+
{
|
|
75
|
+
:'upload' => :'upload',
|
|
76
|
+
:'url' => :'url',
|
|
77
|
+
:'upload_file_name' => :'upload_file_name',
|
|
78
|
+
:'metadata' => :'metadata',
|
|
79
|
+
:'upload_content_type' => :'upload_content_type',
|
|
80
|
+
:'upload_file_size' => :'upload_file_size',
|
|
81
|
+
:'category' => :'category',
|
|
82
|
+
:'side' => :'side',
|
|
83
|
+
:'document_type' => :'document_type',
|
|
84
|
+
:'issuing_country' => :'issuing_country',
|
|
85
|
+
:'id' => :'id',
|
|
86
|
+
:'errors' => :'errors'
|
|
87
|
+
}
|
|
88
|
+
end
|
|
121
89
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
90
|
+
# Attribute type mapping.
|
|
91
|
+
def self.openapi_types
|
|
92
|
+
{
|
|
93
|
+
:'upload' => :'String',
|
|
94
|
+
:'url' => :'String',
|
|
95
|
+
:'upload_file_name' => :'String',
|
|
96
|
+
:'metadata' => :'Object',
|
|
97
|
+
:'upload_content_type' => :'String',
|
|
98
|
+
:'upload_file_size' => :'Integer',
|
|
99
|
+
:'category' => :'String',
|
|
100
|
+
:'side' => :'String',
|
|
101
|
+
:'document_type' => :'String',
|
|
102
|
+
:'issuing_country' => :'String',
|
|
103
|
+
:'id' => :'String',
|
|
104
|
+
:'errors' => :'Hash<String, Array<ValidationErrorDescription>>'
|
|
105
|
+
}
|
|
106
|
+
end
|
|
125
107
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
108
|
+
# Initializes the object
|
|
109
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
110
|
+
def initialize(attributes = {})
|
|
111
|
+
if (!attributes.is_a?(Hash))
|
|
112
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::Document` initialize method"
|
|
113
|
+
end
|
|
129
114
|
|
|
130
|
-
|
|
131
|
-
|
|
115
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
116
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
117
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
118
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::Document`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
132
119
|
end
|
|
120
|
+
h[k.to_sym] = v
|
|
121
|
+
}
|
|
133
122
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
123
|
+
if attributes.key?(:'upload')
|
|
124
|
+
self.upload = attributes[:'upload']
|
|
125
|
+
end
|
|
137
126
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
127
|
+
if attributes.key?(:'url')
|
|
128
|
+
self.url = attributes[:'url']
|
|
129
|
+
end
|
|
141
130
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
131
|
+
if attributes.key?(:'upload_file_name')
|
|
132
|
+
self.upload_file_name = attributes[:'upload_file_name']
|
|
133
|
+
end
|
|
145
134
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
135
|
+
if attributes.key?(:'metadata')
|
|
136
|
+
self.metadata = attributes[:'metadata']
|
|
137
|
+
end
|
|
149
138
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
139
|
+
if attributes.key?(:'upload_content_type')
|
|
140
|
+
self.upload_content_type = attributes[:'upload_content_type']
|
|
141
|
+
end
|
|
153
142
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
143
|
+
if attributes.key?(:'upload_file_size')
|
|
144
|
+
self.upload_file_size = attributes[:'upload_file_size']
|
|
145
|
+
end
|
|
157
146
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
self.errors = value
|
|
161
|
-
end
|
|
162
|
-
end
|
|
147
|
+
if attributes.key?(:'category')
|
|
148
|
+
self.category = attributes[:'category']
|
|
163
149
|
end
|
|
164
150
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
invalid_properties = Array.new
|
|
169
|
-
if @upload.nil?
|
|
170
|
-
invalid_properties.push('invalid value for "upload", upload cannot be nil.')
|
|
171
|
-
end
|
|
151
|
+
if attributes.key?(:'side')
|
|
152
|
+
self.side = attributes[:'side']
|
|
153
|
+
end
|
|
172
154
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
155
|
+
if attributes.key?(:'document_type')
|
|
156
|
+
self.document_type = attributes[:'document_type']
|
|
157
|
+
end
|
|
176
158
|
|
|
177
|
-
|
|
159
|
+
if attributes.key?(:'issuing_country')
|
|
160
|
+
self.issuing_country = attributes[:'issuing_country']
|
|
178
161
|
end
|
|
179
162
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
def valid?
|
|
183
|
-
return false if @upload.nil?
|
|
184
|
-
return false if @upload_file_name.nil?
|
|
185
|
-
side_validator = EnumAttributeValidator.new('String', ["front", "back"])
|
|
186
|
-
return false unless side_validator.valid?(@side)
|
|
187
|
-
true
|
|
163
|
+
if attributes.key?(:'id')
|
|
164
|
+
self.id = attributes[:'id']
|
|
188
165
|
end
|
|
189
166
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
validator = EnumAttributeValidator.new('String', ["front", "back"])
|
|
194
|
-
unless validator.valid?(side)
|
|
195
|
-
fail ArgumentError, "invalid value for \"side\", must be one of #{validator.allowable_values}."
|
|
167
|
+
if attributes.key?(:'errors')
|
|
168
|
+
if (value = attributes[:'errors']).is_a?(Hash)
|
|
169
|
+
self.errors = value
|
|
196
170
|
end
|
|
197
|
-
@side = side
|
|
198
171
|
end
|
|
172
|
+
end
|
|
199
173
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
upload_file_name == o.upload_file_name &&
|
|
207
|
-
metadata == o.metadata &&
|
|
208
|
-
upload_content_type == o.upload_content_type &&
|
|
209
|
-
upload_file_size == o.upload_file_size &&
|
|
210
|
-
category == o.category &&
|
|
211
|
-
side == o.side &&
|
|
212
|
-
document_type == o.document_type &&
|
|
213
|
-
issuing_country == o.issuing_country &&
|
|
214
|
-
id == o.id &&
|
|
215
|
-
errors == o.errors
|
|
174
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
175
|
+
# @return Array for valid properties with the reasons
|
|
176
|
+
def list_invalid_properties
|
|
177
|
+
invalid_properties = Array.new
|
|
178
|
+
if @upload.nil?
|
|
179
|
+
invalid_properties.push('invalid value for "upload", upload cannot be nil.')
|
|
216
180
|
end
|
|
217
181
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
def eql?(o)
|
|
221
|
-
self == o
|
|
182
|
+
if @upload_file_name.nil?
|
|
183
|
+
invalid_properties.push('invalid value for "upload_file_name", upload_file_name cannot be nil.')
|
|
222
184
|
end
|
|
223
185
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
186
|
+
invalid_properties
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# Check to see if the all the properties in the model are valid
|
|
190
|
+
# @return true if the model is valid
|
|
191
|
+
def valid?
|
|
192
|
+
return false if @upload.nil?
|
|
193
|
+
return false if @upload_file_name.nil?
|
|
194
|
+
side_validator = EnumAttributeValidator.new('String', ["front", "back"])
|
|
195
|
+
return false unless side_validator.valid?(@side)
|
|
196
|
+
true
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
200
|
+
# @param [Object] side Object to be assigned
|
|
201
|
+
def side=(side)
|
|
202
|
+
validator = EnumAttributeValidator.new('String', ["front", "back"])
|
|
203
|
+
unless validator.valid?(side) || side.empty?
|
|
204
|
+
fail ArgumentError, "invalid value for \"side\", must be one of #{validator.allowable_values}."
|
|
228
205
|
end
|
|
206
|
+
@side = side
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# Checks equality by comparing each attribute.
|
|
210
|
+
# @param [Object] Object to be compared
|
|
211
|
+
def ==(o)
|
|
212
|
+
return true if self.equal?(o)
|
|
213
|
+
self.class == o.class &&
|
|
214
|
+
upload == o.upload &&
|
|
215
|
+
url == o.url &&
|
|
216
|
+
upload_file_name == o.upload_file_name &&
|
|
217
|
+
metadata == o.metadata &&
|
|
218
|
+
upload_content_type == o.upload_content_type &&
|
|
219
|
+
upload_file_size == o.upload_file_size &&
|
|
220
|
+
category == o.category &&
|
|
221
|
+
side == o.side &&
|
|
222
|
+
document_type == o.document_type &&
|
|
223
|
+
issuing_country == o.issuing_country &&
|
|
224
|
+
id == o.id &&
|
|
225
|
+
errors == o.errors
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# @see the `==` method
|
|
229
|
+
# @param [Object] Object to be compared
|
|
230
|
+
def eql?(o)
|
|
231
|
+
self == o
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
# Calculates hash code according to all attributes.
|
|
235
|
+
# @return [Integer] Hash code
|
|
236
|
+
def hash
|
|
237
|
+
[upload, url, upload_file_name, metadata, upload_content_type, upload_file_size, category, side, document_type, issuing_country, id, errors].hash
|
|
238
|
+
end
|
|
229
239
|
|
|
230
240
|
require 'active_support/core_ext/hash'
|
|
231
241
|
require 'active_support/hash_with_indifferent_access.rb'
|
|
@@ -341,5 +351,6 @@ def _to_hash(value)
|
|
|
341
351
|
end
|
|
342
352
|
end
|
|
343
353
|
|
|
344
|
-
|
|
354
|
+
end
|
|
355
|
+
|
|
345
356
|
end
|