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.
Files changed (138) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +93 -0
  3. data/README.md +12 -4
  4. data/docs/Currency.md +0 -2
  5. data/docs/CurrencyExchange.md +0 -2
  6. data/docs/CurrencyOpposite.md +3 -3
  7. data/docs/Document.md +2 -0
  8. data/docs/PayoutMethod.md +1 -1
  9. data/docs/PayoutMethodCashProviderEnum.md +16 -0
  10. data/docs/PayoutMethodDetails.md +19 -5
  11. data/docs/PayoutMethodDetailsGBPBank.md +29 -0
  12. data/docs/PayoutMethodDetailsIBAN.md +1 -1
  13. data/docs/PayoutMethodDetailsMobile.md +3 -1
  14. data/docs/PayoutMethodDetailsXOFCash.md +27 -0
  15. data/docs/PayoutMethodDetailsZARBank.md +35 -0
  16. data/docs/ProofOfPayment.md +23 -0
  17. data/docs/ProofOfPaymentListResponse.md +17 -0
  18. data/docs/Recipient.md +3 -1
  19. data/docs/RecipientStateReasonDetails.md +23 -0
  20. data/docs/RecipientsApi.md +63 -1
  21. data/docs/Sender.md +20 -8
  22. data/lib/transferzero-sdk.rb +7 -0
  23. data/lib/transferzero-sdk/api/recipients_api.rb +56 -2
  24. data/lib/transferzero-sdk/api_client.rb +5 -3
  25. data/lib/transferzero-sdk/models/account.rb +70 -69
  26. data/lib/transferzero-sdk/models/account_list_response.rb +67 -66
  27. data/lib/transferzero-sdk/models/account_meta.rb +61 -60
  28. data/lib/transferzero-sdk/models/account_response.rb +66 -65
  29. data/lib/transferzero-sdk/models/account_validation_error.rb +61 -60
  30. data/lib/transferzero-sdk/models/account_validation_request.rb +164 -163
  31. data/lib/transferzero-sdk/models/account_validation_response.rb +66 -65
  32. data/lib/transferzero-sdk/models/account_validation_result.rb +61 -60
  33. data/lib/transferzero-sdk/models/api_log.rb +136 -135
  34. data/lib/transferzero-sdk/models/api_log_list_response.rb +70 -69
  35. data/lib/transferzero-sdk/models/api_log_response.rb +60 -59
  36. data/lib/transferzero-sdk/models/currency.rb +133 -142
  37. data/lib/transferzero-sdk/models/currency_exchange.rb +149 -158
  38. data/lib/transferzero-sdk/models/currency_exchange_list_response.rb +62 -61
  39. data/lib/transferzero-sdk/models/currency_list_response.rb +62 -61
  40. data/lib/transferzero-sdk/models/currency_opposite.rb +166 -165
  41. data/lib/transferzero-sdk/models/debit.rb +151 -150
  42. data/lib/transferzero-sdk/models/debit_list_request.rb +61 -60
  43. data/lib/transferzero-sdk/models/debit_list_response.rb +67 -66
  44. data/lib/transferzero-sdk/models/debit_request.rb +60 -59
  45. data/lib/transferzero-sdk/models/debit_request_wrapper.rb +80 -79
  46. data/lib/transferzero-sdk/models/debit_response.rb +60 -59
  47. data/lib/transferzero-sdk/models/document.rb +180 -169
  48. data/lib/transferzero-sdk/models/document_list_response.rb +67 -66
  49. data/lib/transferzero-sdk/models/document_request.rb +60 -59
  50. data/lib/transferzero-sdk/models/document_response.rb +60 -59
  51. data/lib/transferzero-sdk/models/document_webhook.rb +96 -95
  52. data/lib/transferzero-sdk/models/error_status.rb +66 -65
  53. data/lib/transferzero-sdk/models/field_description.rb +95 -94
  54. data/lib/transferzero-sdk/models/field_select_validation.rb +70 -69
  55. data/lib/transferzero-sdk/models/field_validation.rb +78 -77
  56. data/lib/transferzero-sdk/models/pagination.rb +97 -96
  57. data/lib/transferzero-sdk/models/pagination_meta.rb +60 -59
  58. data/lib/transferzero-sdk/models/payin_method.rb +97 -96
  59. data/lib/transferzero-sdk/models/payin_method_details.rb +122 -121
  60. data/lib/transferzero-sdk/models/payin_method_details_btc.rb +62 -61
  61. data/lib/transferzero-sdk/models/payin_method_details_mobile.rb +75 -74
  62. data/lib/transferzero-sdk/models/payin_method_details_ngn_bank.rb +71 -70
  63. data/lib/transferzero-sdk/models/payin_method_request.rb +60 -59
  64. data/lib/transferzero-sdk/models/payment_method.rb +109 -108
  65. data/lib/transferzero-sdk/models/payment_method_list_response.rb +61 -60
  66. data/lib/transferzero-sdk/models/payment_method_opposite.rb +124 -123
  67. data/lib/transferzero-sdk/models/payout_method.rb +107 -106
  68. data/lib/transferzero-sdk/models/payout_method_bank_account_type_enum.rb +14 -19
  69. data/lib/transferzero-sdk/models/payout_method_cash_provider_enum.rb +31 -0
  70. data/lib/transferzero-sdk/models/payout_method_details.rb +402 -320
  71. data/lib/transferzero-sdk/models/payout_method_details_balance.rb +61 -60
  72. data/lib/transferzero-sdk/models/payout_method_details_btc.rb +97 -96
  73. data/lib/transferzero-sdk/models/payout_method_details_gbp_bank.rb +267 -0
  74. data/lib/transferzero-sdk/models/payout_method_details_ghs_bank.rb +97 -96
  75. data/lib/transferzero-sdk/models/payout_method_details_iban.rb +100 -104
  76. data/lib/transferzero-sdk/models/payout_method_details_mad_cash.rb +162 -161
  77. data/lib/transferzero-sdk/models/payout_method_details_mobile.rb +93 -83
  78. data/lib/transferzero-sdk/models/payout_method_details_ngn_bank.rb +104 -103
  79. data/lib/transferzero-sdk/models/payout_method_details_xof_bank.rb +108 -107
  80. data/lib/transferzero-sdk/models/payout_method_details_xof_cash.rb +263 -0
  81. data/lib/transferzero-sdk/models/payout_method_details_xof_mobile.rb +97 -96
  82. data/lib/transferzero-sdk/models/payout_method_details_zar_bank.rb +324 -0
  83. data/lib/transferzero-sdk/models/payout_method_gender_enum.rb +14 -19
  84. data/lib/transferzero-sdk/models/payout_method_identity_card_type_enum.rb +15 -20
  85. data/lib/transferzero-sdk/models/payout_method_list_response.rb +67 -66
  86. data/lib/transferzero-sdk/models/payout_method_mobile_provider_enum.rb +17 -19
  87. data/lib/transferzero-sdk/models/payout_method_request.rb +60 -59
  88. data/lib/transferzero-sdk/models/payout_method_response.rb +60 -59
  89. data/lib/transferzero-sdk/models/payout_method_webhook.rb +96 -95
  90. data/lib/transferzero-sdk/models/politically_exposed_person.rb +123 -122
  91. data/lib/transferzero-sdk/models/proof_of_payment.rb +233 -0
  92. data/lib/transferzero-sdk/models/proof_of_payment_list_response.rb +204 -0
  93. data/lib/transferzero-sdk/models/recipient.rb +237 -227
  94. data/lib/transferzero-sdk/models/recipient_list_response.rb +67 -66
  95. data/lib/transferzero-sdk/models/recipient_request.rb +60 -59
  96. data/lib/transferzero-sdk/models/recipient_response.rb +60 -59
  97. data/lib/transferzero-sdk/models/recipient_state.rb +22 -27
  98. data/lib/transferzero-sdk/models/recipient_state_reason_details.rb +235 -0
  99. data/lib/transferzero-sdk/models/recipient_webhook.rb +96 -95
  100. data/lib/transferzero-sdk/models/sender.rb +565 -480
  101. data/lib/transferzero-sdk/models/sender_list_response.rb +67 -66
  102. data/lib/transferzero-sdk/models/sender_request.rb +60 -59
  103. data/lib/transferzero-sdk/models/sender_response.rb +66 -65
  104. data/lib/transferzero-sdk/models/sender_response_existing.rb +60 -59
  105. data/lib/transferzero-sdk/models/sender_response_meta.rb +60 -59
  106. data/lib/transferzero-sdk/models/sender_state.rb +19 -24
  107. data/lib/transferzero-sdk/models/sender_webhook.rb +96 -95
  108. data/lib/transferzero-sdk/models/transaction.rb +192 -191
  109. data/lib/transferzero-sdk/models/transaction_list_response.rb +67 -66
  110. data/lib/transferzero-sdk/models/transaction_request.rb +60 -59
  111. data/lib/transferzero-sdk/models/transaction_response.rb +66 -65
  112. data/lib/transferzero-sdk/models/transaction_response_existing.rb +66 -65
  113. data/lib/transferzero-sdk/models/transaction_response_meta.rb +60 -59
  114. data/lib/transferzero-sdk/models/transaction_state.rb +23 -28
  115. data/lib/transferzero-sdk/models/transaction_traits.rb +71 -70
  116. data/lib/transferzero-sdk/models/transaction_webhook.rb +96 -95
  117. data/lib/transferzero-sdk/models/validation_error_description.rb +62 -61
  118. data/lib/transferzero-sdk/models/webhook.rb +92 -91
  119. data/lib/transferzero-sdk/models/webhook_definition.rb +107 -106
  120. data/lib/transferzero-sdk/models/webhook_definition_event_list_response.rb +61 -60
  121. data/lib/transferzero-sdk/models/webhook_definition_list_response.rb +67 -66
  122. data/lib/transferzero-sdk/models/webhook_definition_request.rb +60 -59
  123. data/lib/transferzero-sdk/models/webhook_definition_response.rb +60 -59
  124. data/lib/transferzero-sdk/models/webhook_log.rb +97 -96
  125. data/lib/transferzero-sdk/models/webhook_log_list_response.rb +70 -69
  126. data/lib/transferzero-sdk/models/webhook_log_metadata.rb +129 -128
  127. data/lib/transferzero-sdk/models/webhook_log_metadata_request.rb +80 -79
  128. data/lib/transferzero-sdk/models/webhook_log_metadata_response.rb +81 -80
  129. data/lib/transferzero-sdk/models/webhook_log_response.rb +60 -59
  130. data/lib/transferzero-sdk/version.rb +1 -1
  131. data/spec/models/payout_method_cash_provider_enum_spec.rb +35 -0
  132. data/spec/models/payout_method_details_gbp_bank_spec.rb +77 -0
  133. data/spec/models/payout_method_details_xof_cash_spec.rb +71 -0
  134. data/spec/models/payout_method_details_zar_bank_spec.rb +89 -0
  135. data/spec/models/proof_of_payment_list_response_spec.rb +41 -0
  136. data/spec/models/proof_of_payment_spec.rb +59 -0
  137. data/spec/models/recipient_state_reason_details_spec.rb +59 -0
  138. 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
- 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
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
- # Attribute type mapping.
27
- def self.openapi_types
28
- {
29
- :'object' => :'Debit'
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
- # 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"
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
- # 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
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
- # 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
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
- # 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
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
- # 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
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
- # @see the `==` method
75
- # @param [Object] Object to be compared
76
- def eql?(o)
77
- self == o
78
- end
74
+ # @see the `==` method
75
+ # @param [Object] Object to be compared
76
+ def eql?(o)
77
+ self == o
78
+ end
79
79
 
80
- # Calculates hash code according to all attributes.
81
- # @return [Integer] Hash code
82
- def hash
83
- [object].hash
84
- end
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
- end
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
- class Document
17
- # Base64 encoded data uri of an image/pdf file or a fully qualified url
18
- attr_accessor :upload
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
- # Name of the upload
21
- attr_accessor :upload_file_name
20
+ # URL of the document location
21
+ attr_accessor :url
22
22
 
23
- # Metadata of document
24
- attr_accessor :metadata
23
+ # Name of the upload
24
+ attr_accessor :upload_file_name
25
25
 
26
- attr_accessor :upload_content_type
26
+ # Metadata of document
27
+ attr_accessor :metadata
27
28
 
28
- attr_accessor :upload_file_size
29
+ attr_accessor :upload_content_type
29
30
 
30
- # uncategorised
31
- attr_accessor :category
31
+ attr_accessor :upload_file_size
32
32
 
33
- # The side of the KYC ID. One of 'front' or 'back'
34
- attr_accessor :side
33
+ # uncategorised
34
+ attr_accessor :category
35
35
 
36
- # This is a brief description of the document type
37
- attr_accessor :document_type
36
+ # The side of the KYC ID. One of 'front' or 'back'
37
+ attr_accessor :side
38
38
 
39
- # Issuing country of ID in 2-character alpha ISO 3166-2 country format
40
- attr_accessor :issuing_country
39
+ # This is a brief description of the document type
40
+ attr_accessor :document_type
41
41
 
42
- attr_accessor :id
42
+ # Issuing country of ID in 2-character alpha ISO 3166-2 country format
43
+ attr_accessor :issuing_country
43
44
 
44
- # The fields that have some problems and don't pass validation
45
- attr_accessor :errors
45
+ attr_accessor :id
46
46
 
47
- class EnumAttributeValidator
48
- attr_reader :datatype
49
- attr_reader :allowable_values
47
+ # The fields that have some problems and don't pass validation
48
+ attr_accessor :errors
50
49
 
51
- def initialize(datatype, allowable_values)
52
- @allowable_values = allowable_values.map do |value|
53
- case datatype.to_s
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
- def valid?(value)
65
- !value || allowable_values.include?(value)
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
- # Attribute mapping from ruby-style variable name to JSON key.
70
- def self.attribute_map
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
- # Attribute type mapping.
87
- def self.openapi_types
88
- {
89
- :'upload' => :'String',
90
- :'upload_file_name' => :'String',
91
- :'metadata' => :'Object',
92
- :'upload_content_type' => :'String',
93
- :'upload_file_size' => :'Integer',
94
- :'category' => :'String',
95
- :'side' => :'String',
96
- :'document_type' => :'String',
97
- :'issuing_country' => :'String',
98
- :'id' => :'String',
99
- :'errors' => :'Hash<String, Array<ValidationErrorDescription>>'
100
- }
101
- end
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
- if attributes.key?(:'upload_file_name')
123
- self.upload_file_name = attributes[:'upload_file_name']
124
- end
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
- if attributes.key?(:'metadata')
127
- self.metadata = attributes[:'metadata']
128
- end
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
- if attributes.key?(:'upload_content_type')
131
- self.upload_content_type = attributes[:'upload_content_type']
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
- if attributes.key?(:'upload_file_size')
135
- self.upload_file_size = attributes[:'upload_file_size']
136
- end
123
+ if attributes.key?(:'upload')
124
+ self.upload = attributes[:'upload']
125
+ end
137
126
 
138
- if attributes.key?(:'category')
139
- self.category = attributes[:'category']
140
- end
127
+ if attributes.key?(:'url')
128
+ self.url = attributes[:'url']
129
+ end
141
130
 
142
- if attributes.key?(:'side')
143
- self.side = attributes[:'side']
144
- end
131
+ if attributes.key?(:'upload_file_name')
132
+ self.upload_file_name = attributes[:'upload_file_name']
133
+ end
145
134
 
146
- if attributes.key?(:'document_type')
147
- self.document_type = attributes[:'document_type']
148
- end
135
+ if attributes.key?(:'metadata')
136
+ self.metadata = attributes[:'metadata']
137
+ end
149
138
 
150
- if attributes.key?(:'issuing_country')
151
- self.issuing_country = attributes[:'issuing_country']
152
- end
139
+ if attributes.key?(:'upload_content_type')
140
+ self.upload_content_type = attributes[:'upload_content_type']
141
+ end
153
142
 
154
- if attributes.key?(:'id')
155
- self.id = attributes[:'id']
156
- end
143
+ if attributes.key?(:'upload_file_size')
144
+ self.upload_file_size = attributes[:'upload_file_size']
145
+ end
157
146
 
158
- if attributes.key?(:'errors')
159
- if (value = attributes[:'errors']).is_a?(Hash)
160
- self.errors = value
161
- end
162
- end
147
+ if attributes.key?(:'category')
148
+ self.category = attributes[:'category']
163
149
  end
164
150
 
165
- # Show invalid properties with the reasons. Usually used together with valid?
166
- # @return Array for valid properties with the reasons
167
- def list_invalid_properties
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
- if @upload_file_name.nil?
174
- invalid_properties.push('invalid value for "upload_file_name", upload_file_name cannot be nil.')
175
- end
155
+ if attributes.key?(:'document_type')
156
+ self.document_type = attributes[:'document_type']
157
+ end
176
158
 
177
- invalid_properties
159
+ if attributes.key?(:'issuing_country')
160
+ self.issuing_country = attributes[:'issuing_country']
178
161
  end
179
162
 
180
- # Check to see if the all the properties in the model are valid
181
- # @return true if the model is valid
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
- # Custom attribute writer method checking allowed values (enum).
191
- # @param [Object] side Object to be assigned
192
- def side=(side)
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
- # Checks equality by comparing each attribute.
201
- # @param [Object] Object to be compared
202
- def ==(o)
203
- return true if self.equal?(o)
204
- self.class == o.class &&
205
- upload == o.upload &&
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
- # @see the `==` method
219
- # @param [Object] Object to be compared
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
- # Calculates hash code according to all attributes.
225
- # @return [Integer] Hash code
226
- def hash
227
- [upload, upload_file_name, metadata, upload_content_type, upload_file_size, category, side, document_type, issuing_country, id, errors].hash
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
- end
354
+ end
355
+
345
356
  end