transferzero-sdk 1.0.0 → 1.7.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 (163) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +17 -11
  3. data/docs/AccountMeta.md +1 -1
  4. data/docs/AccountValidationApi.md +4 -4
  5. data/docs/AccountValidationRequest.md +6 -4
  6. data/docs/Currency.md +1 -1
  7. data/docs/CurrencyExchange.md +1 -1
  8. data/docs/CurrencyInfoApi.md +20 -6
  9. data/docs/CurrencyOpposite.md +4 -2
  10. data/docs/Debit.md +2 -2
  11. data/docs/Document.md +4 -0
  12. data/docs/FieldSelectValidation.md +1 -1
  13. data/docs/FieldValidation.md +1 -1
  14. data/docs/PayinMethod.md +4 -4
  15. data/docs/PayinMethodDetails.md +7 -3
  16. data/docs/PayinMethodDetailsBTC.md +17 -0
  17. data/docs/PayinMethodDetailsMobile.md +1 -1
  18. data/docs/PayinMethodDetailsNGNBank.md +4 -2
  19. data/docs/PaymentMethod.md +2 -2
  20. data/docs/PaymentMethodOpposite.md +2 -2
  21. data/docs/PayoutMethod.md +1 -1
  22. data/docs/PayoutMethodDetails.md +12 -4
  23. data/docs/PayoutMethodDetailsBTC.md +23 -0
  24. data/docs/PayoutMethodDetailsGBPBank.md +29 -0
  25. data/docs/PayoutMethodDetailsIBAN.md +1 -1
  26. data/docs/PayoutMethodDetailsNGNBank.md +1 -1
  27. data/docs/PayoutMethodDetailsXOFBank.md +25 -0
  28. data/docs/PoliticallyExposedPerson.md +31 -0
  29. data/docs/Recipient.md +5 -3
  30. data/docs/RecipientsApi.md +3 -3
  31. data/docs/Sender.md +63 -27
  32. data/docs/Transaction.md +5 -5
  33. data/docs/TransactionTraits.md +2 -2
  34. data/docs/TransactionsApi.md +64 -0
  35. data/example/client.rb +14 -14
  36. data/git_push.sh +1 -1
  37. data/lib/transferzero-sdk.rb +5 -0
  38. data/lib/transferzero-sdk/api/account_validation_api.rb +4 -4
  39. data/lib/transferzero-sdk/api/currency_info_api.rb +6 -0
  40. data/lib/transferzero-sdk/api/recipients_api.rb +4 -4
  41. data/lib/transferzero-sdk/api/transactions_api.rb +59 -0
  42. data/lib/transferzero-sdk/api_client.rb +5 -5
  43. data/lib/transferzero-sdk/models/account.rb +70 -69
  44. data/lib/transferzero-sdk/models/account_list_response.rb +67 -66
  45. data/lib/transferzero-sdk/models/account_meta.rb +61 -60
  46. data/lib/transferzero-sdk/models/account_response.rb +66 -65
  47. data/lib/transferzero-sdk/models/account_validation_error.rb +61 -60
  48. data/lib/transferzero-sdk/models/account_validation_request.rb +164 -163
  49. data/lib/transferzero-sdk/models/account_validation_response.rb +66 -65
  50. data/lib/transferzero-sdk/models/account_validation_result.rb +61 -60
  51. data/lib/transferzero-sdk/models/api_log.rb +136 -135
  52. data/lib/transferzero-sdk/models/api_log_list_response.rb +70 -69
  53. data/lib/transferzero-sdk/models/api_log_response.rb +60 -59
  54. data/lib/transferzero-sdk/models/currency.rb +142 -141
  55. data/lib/transferzero-sdk/models/currency_exchange.rb +158 -157
  56. data/lib/transferzero-sdk/models/currency_exchange_list_response.rb +62 -61
  57. data/lib/transferzero-sdk/models/currency_list_response.rb +62 -61
  58. data/lib/transferzero-sdk/models/currency_opposite.rb +166 -155
  59. data/lib/transferzero-sdk/models/debit.rb +151 -155
  60. data/lib/transferzero-sdk/models/debit_list_request.rb +61 -60
  61. data/lib/transferzero-sdk/models/debit_list_response.rb +67 -66
  62. data/lib/transferzero-sdk/models/debit_request.rb +60 -59
  63. data/lib/transferzero-sdk/models/debit_request_wrapper.rb +80 -79
  64. data/lib/transferzero-sdk/models/debit_response.rb +60 -59
  65. data/lib/transferzero-sdk/models/document.rb +181 -160
  66. data/lib/transferzero-sdk/models/document_list_response.rb +67 -66
  67. data/lib/transferzero-sdk/models/document_request.rb +60 -59
  68. data/lib/transferzero-sdk/models/document_response.rb +60 -59
  69. data/lib/transferzero-sdk/models/document_webhook.rb +96 -95
  70. data/lib/transferzero-sdk/models/error_status.rb +66 -65
  71. data/lib/transferzero-sdk/models/field_description.rb +95 -94
  72. data/lib/transferzero-sdk/models/field_select_validation.rb +70 -69
  73. data/lib/transferzero-sdk/models/field_validation.rb +78 -77
  74. data/lib/transferzero-sdk/models/pagination.rb +97 -96
  75. data/lib/transferzero-sdk/models/pagination_meta.rb +60 -59
  76. data/lib/transferzero-sdk/models/payin_method.rb +97 -96
  77. data/lib/transferzero-sdk/models/payin_method_details.rb +122 -105
  78. data/lib/transferzero-sdk/models/payin_method_details_btc.rb +204 -0
  79. data/lib/transferzero-sdk/models/payin_method_details_mobile.rb +75 -74
  80. data/lib/transferzero-sdk/models/payin_method_details_ngn_bank.rb +71 -65
  81. data/lib/transferzero-sdk/models/payin_method_request.rb +60 -59
  82. data/lib/transferzero-sdk/models/payment_method.rb +109 -108
  83. data/lib/transferzero-sdk/models/payment_method_list_response.rb +61 -60
  84. data/lib/transferzero-sdk/models/payment_method_opposite.rb +124 -123
  85. data/lib/transferzero-sdk/models/payout_method.rb +107 -106
  86. data/lib/transferzero-sdk/models/payout_method_bank_account_type_enum.rb +14 -19
  87. data/lib/transferzero-sdk/models/payout_method_details.rb +338 -288
  88. data/lib/transferzero-sdk/models/payout_method_details_balance.rb +61 -60
  89. data/lib/transferzero-sdk/models/payout_method_details_btc.rb +250 -0
  90. data/lib/transferzero-sdk/models/payout_method_details_gbp_bank.rb +267 -0
  91. data/lib/transferzero-sdk/models/payout_method_details_ghs_bank.rb +97 -96
  92. data/lib/transferzero-sdk/models/payout_method_details_iban.rb +100 -104
  93. data/lib/transferzero-sdk/models/payout_method_details_mad_cash.rb +162 -161
  94. data/lib/transferzero-sdk/models/payout_method_details_mobile.rb +86 -85
  95. data/lib/transferzero-sdk/models/payout_method_details_ngn_bank.rb +104 -108
  96. data/lib/transferzero-sdk/models/payout_method_details_xof_bank.rb +264 -0
  97. data/lib/transferzero-sdk/models/payout_method_details_xof_mobile.rb +97 -96
  98. data/lib/transferzero-sdk/models/payout_method_gender_enum.rb +14 -19
  99. data/lib/transferzero-sdk/models/payout_method_identity_card_type_enum.rb +15 -20
  100. data/lib/transferzero-sdk/models/payout_method_list_response.rb +67 -66
  101. data/lib/transferzero-sdk/models/payout_method_mobile_provider_enum.rb +14 -19
  102. data/lib/transferzero-sdk/models/payout_method_request.rb +60 -59
  103. data/lib/transferzero-sdk/models/payout_method_response.rb +60 -59
  104. data/lib/transferzero-sdk/models/payout_method_webhook.rb +96 -95
  105. data/lib/transferzero-sdk/models/politically_exposed_person.rb +272 -0
  106. data/lib/transferzero-sdk/models/recipient.rb +230 -219
  107. data/lib/transferzero-sdk/models/recipient_list_response.rb +67 -66
  108. data/lib/transferzero-sdk/models/recipient_request.rb +60 -59
  109. data/lib/transferzero-sdk/models/recipient_response.rb +60 -59
  110. data/lib/transferzero-sdk/models/recipient_state.rb +22 -27
  111. data/lib/transferzero-sdk/models/recipient_webhook.rb +96 -95
  112. data/lib/transferzero-sdk/models/sender.rb +529 -322
  113. data/lib/transferzero-sdk/models/sender_list_response.rb +67 -66
  114. data/lib/transferzero-sdk/models/sender_request.rb +60 -59
  115. data/lib/transferzero-sdk/models/sender_response.rb +66 -65
  116. data/lib/transferzero-sdk/models/sender_response_existing.rb +60 -59
  117. data/lib/transferzero-sdk/models/sender_response_meta.rb +60 -59
  118. data/lib/transferzero-sdk/models/sender_state.rb +19 -23
  119. data/lib/transferzero-sdk/models/sender_webhook.rb +96 -95
  120. data/lib/transferzero-sdk/models/transaction.rb +192 -191
  121. data/lib/transferzero-sdk/models/transaction_list_response.rb +67 -66
  122. data/lib/transferzero-sdk/models/transaction_request.rb +60 -59
  123. data/lib/transferzero-sdk/models/transaction_response.rb +66 -65
  124. data/lib/transferzero-sdk/models/transaction_response_existing.rb +66 -65
  125. data/lib/transferzero-sdk/models/transaction_response_meta.rb +60 -59
  126. data/lib/transferzero-sdk/models/transaction_state.rb +23 -27
  127. data/lib/transferzero-sdk/models/transaction_traits.rb +71 -70
  128. data/lib/transferzero-sdk/models/transaction_webhook.rb +96 -95
  129. data/lib/transferzero-sdk/models/validation_error_description.rb +62 -61
  130. data/lib/transferzero-sdk/models/webhook.rb +92 -91
  131. data/lib/transferzero-sdk/models/webhook_definition.rb +107 -106
  132. data/lib/transferzero-sdk/models/webhook_definition_event_list_response.rb +61 -60
  133. data/lib/transferzero-sdk/models/webhook_definition_list_response.rb +67 -66
  134. data/lib/transferzero-sdk/models/webhook_definition_request.rb +60 -59
  135. data/lib/transferzero-sdk/models/webhook_definition_response.rb +60 -59
  136. data/lib/transferzero-sdk/models/webhook_log.rb +97 -96
  137. data/lib/transferzero-sdk/models/webhook_log_list_response.rb +70 -69
  138. data/lib/transferzero-sdk/models/webhook_log_metadata.rb +129 -128
  139. data/lib/transferzero-sdk/models/webhook_log_metadata_request.rb +80 -79
  140. data/lib/transferzero-sdk/models/webhook_log_metadata_response.rb +81 -80
  141. data/lib/transferzero-sdk/models/webhook_log_response.rb +60 -59
  142. data/lib/transferzero-sdk/version.rb +1 -1
  143. data/spec/api/account_validation_api_spec.rb +2 -2
  144. data/spec/api/currency_info_api_spec.rb +2 -0
  145. data/spec/api/documents_api_spec.rb +15 -0
  146. data/spec/api/recipients_api_spec.rb +1 -1
  147. data/spec/api/transactions_api_spec.rb +13 -0
  148. data/spec/models/account_validation_request_spec.rb +7 -1
  149. data/spec/models/currency_opposite_spec.rb +6 -0
  150. data/spec/models/document_spec.rb +12 -0
  151. data/spec/models/payin_method_details_btc_spec.rb +41 -0
  152. data/spec/models/payin_method_details_ngn_bank_spec.rb +6 -0
  153. data/spec/models/payin_method_details_spec.rb +6 -0
  154. data/spec/models/payout_method_details_btc_spec.rb +59 -0
  155. data/spec/models/payout_method_details_gbp_bank_spec.rb +77 -0
  156. data/spec/models/payout_method_details_spec.rb +7 -1
  157. data/spec/models/payout_method_details_xof_bank_spec.rb +65 -0
  158. data/spec/models/politically_exposed_person_spec.rb +83 -0
  159. data/spec/models/recipient_spec.rb +6 -0
  160. data/spec/models/sender_spec.rb +16 -0
  161. data/transferzero-sdk.gemspec +2 -2
  162. metadata +35 -24
  163. data/spec/api_client_spec.rb +0 -189
@@ -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,209 +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
- # Issuing country of ID in 2-character alpha ISO 3166-2 country format
37
- attr_accessor :issuing_country
36
+ # The side of the KYC ID. One of 'front' or 'back'
37
+ attr_accessor :side
38
38
 
39
- attr_accessor :id
39
+ # This is a brief description of the document type
40
+ attr_accessor :document_type
40
41
 
41
- # The fields that have some problems and don't pass validation
42
- attr_accessor :errors
42
+ # Issuing country of ID in 2-character alpha ISO 3166-2 country format
43
+ attr_accessor :issuing_country
43
44
 
44
- class EnumAttributeValidator
45
- attr_reader :datatype
46
- attr_reader :allowable_values
45
+ attr_accessor :id
47
46
 
48
- def initialize(datatype, allowable_values)
49
- @allowable_values = allowable_values.map do |value|
50
- case datatype.to_s
51
- when /Integer/i
52
- value.to_i
53
- when /Float/i
54
- value.to_f
55
- else
56
- value
57
- end
58
- end
59
- end
47
+ # The fields that have some problems and don't pass validation
48
+ attr_accessor :errors
60
49
 
61
- def valid?(value)
62
- !value || allowable_values.include?(value)
63
- end
64
- end
50
+ class EnumAttributeValidator
51
+ attr_reader :datatype
52
+ attr_reader :allowable_values
65
53
 
66
- # Attribute mapping from ruby-style variable name to JSON key.
67
- def self.attribute_map
68
- {
69
- :'upload' => :'upload',
70
- :'upload_file_name' => :'upload_file_name',
71
- :'metadata' => :'metadata',
72
- :'upload_content_type' => :'upload_content_type',
73
- :'upload_file_size' => :'upload_file_size',
74
- :'category' => :'category',
75
- :'side' => :'side',
76
- :'issuing_country' => :'issuing_country',
77
- :'id' => :'id',
78
- :'errors' => :'errors'
79
- }
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
64
+ end
80
65
  end
81
66
 
82
- # Attribute type mapping.
83
- def self.openapi_types
84
- {
85
- :'upload' => :'String',
86
- :'upload_file_name' => :'String',
87
- :'metadata' => :'Object',
88
- :'upload_content_type' => :'String',
89
- :'upload_file_size' => :'Integer',
90
- :'category' => :'String',
91
- :'side' => :'String',
92
- :'issuing_country' => :'String',
93
- :'id' => :'String',
94
- :'errors' => :'Hash<String, Array<ValidationErrorDescription>>'
95
- }
67
+ def valid?(value)
68
+ !value || allowable_values.include?(value)
96
69
  end
70
+ end
97
71
 
98
- # Initializes the object
99
- # @param [Hash] attributes Model attributes in the form of hash
100
- def initialize(attributes = {})
101
- if (!attributes.is_a?(Hash))
102
- fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::Document` initialize method"
103
- end
104
-
105
- # check to see if the attribute exists and convert string to symbol for hash key
106
- attributes = attributes.each_with_object({}) { |(k, v), h|
107
- if (!self.class.attribute_map.key?(k.to_sym))
108
- 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
109
- end
110
- h[k.to_sym] = v
111
- }
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
112
89
 
113
- if attributes.key?(:'upload')
114
- self.upload = attributes[:'upload']
115
- 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
116
107
 
117
- if attributes.key?(:'upload_file_name')
118
- self.upload_file_name = attributes[:'upload_file_name']
119
- 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
120
114
 
121
- if attributes.key?(:'metadata')
122
- self.metadata = attributes[:'metadata']
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
123
119
  end
120
+ h[k.to_sym] = v
121
+ }
124
122
 
125
- if attributes.key?(:'upload_content_type')
126
- self.upload_content_type = attributes[:'upload_content_type']
127
- end
123
+ if attributes.key?(:'upload')
124
+ self.upload = attributes[:'upload']
125
+ end
128
126
 
129
- if attributes.key?(:'upload_file_size')
130
- self.upload_file_size = attributes[:'upload_file_size']
131
- end
127
+ if attributes.key?(:'url')
128
+ self.url = attributes[:'url']
129
+ end
132
130
 
133
- if attributes.key?(:'category')
134
- self.category = attributes[:'category']
135
- end
131
+ if attributes.key?(:'upload_file_name')
132
+ self.upload_file_name = attributes[:'upload_file_name']
133
+ end
136
134
 
137
- if attributes.key?(:'side')
138
- self.side = attributes[:'side']
139
- end
135
+ if attributes.key?(:'metadata')
136
+ self.metadata = attributes[:'metadata']
137
+ end
140
138
 
141
- if attributes.key?(:'issuing_country')
142
- self.issuing_country = attributes[:'issuing_country']
143
- end
139
+ if attributes.key?(:'upload_content_type')
140
+ self.upload_content_type = attributes[:'upload_content_type']
141
+ end
144
142
 
145
- if attributes.key?(:'id')
146
- self.id = attributes[:'id']
147
- end
143
+ if attributes.key?(:'upload_file_size')
144
+ self.upload_file_size = attributes[:'upload_file_size']
145
+ end
148
146
 
149
- if attributes.key?(:'errors')
150
- if (value = attributes[:'errors']).is_a?(Hash)
151
- self.errors = value
152
- end
153
- end
147
+ if attributes.key?(:'category')
148
+ self.category = attributes[:'category']
154
149
  end
155
150
 
156
- # Show invalid properties with the reasons. Usually used together with valid?
157
- # @return Array for valid properties with the reasons
158
- def list_invalid_properties
159
- invalid_properties = Array.new
160
- if @upload.nil?
161
- invalid_properties.push('invalid value for "upload", upload cannot be nil.')
162
- end
151
+ if attributes.key?(:'side')
152
+ self.side = attributes[:'side']
153
+ end
163
154
 
164
- if @upload_file_name.nil?
165
- invalid_properties.push('invalid value for "upload_file_name", upload_file_name cannot be nil.')
166
- end
155
+ if attributes.key?(:'document_type')
156
+ self.document_type = attributes[:'document_type']
157
+ end
167
158
 
168
- invalid_properties
159
+ if attributes.key?(:'issuing_country')
160
+ self.issuing_country = attributes[:'issuing_country']
169
161
  end
170
162
 
171
- # Check to see if the all the properties in the model are valid
172
- # @return true if the model is valid
173
- def valid?
174
- return false if @upload.nil?
175
- return false if @upload_file_name.nil?
176
- side_validator = EnumAttributeValidator.new('String', ["front", "back"])
177
- return false unless side_validator.valid?(@side)
178
- true
163
+ if attributes.key?(:'id')
164
+ self.id = attributes[:'id']
179
165
  end
180
166
 
181
- # Custom attribute writer method checking allowed values (enum).
182
- # @param [Object] side Object to be assigned
183
- def side=(side)
184
- validator = EnumAttributeValidator.new('String', ["front", "back"])
185
- unless validator.valid?(side)
186
- 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
187
170
  end
188
- @side = side
189
171
  end
172
+ end
190
173
 
191
- # Checks equality by comparing each attribute.
192
- # @param [Object] Object to be compared
193
- def ==(o)
194
- return true if self.equal?(o)
195
- self.class == o.class &&
196
- upload == o.upload &&
197
- upload_file_name == o.upload_file_name &&
198
- metadata == o.metadata &&
199
- upload_content_type == o.upload_content_type &&
200
- upload_file_size == o.upload_file_size &&
201
- category == o.category &&
202
- side == o.side &&
203
- issuing_country == o.issuing_country &&
204
- id == o.id &&
205
- 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.')
206
180
  end
207
181
 
208
- # @see the `==` method
209
- # @param [Object] Object to be compared
210
- def eql?(o)
211
- self == o
182
+ if @upload_file_name.nil?
183
+ invalid_properties.push('invalid value for "upload_file_name", upload_file_name cannot be nil.')
212
184
  end
213
185
 
214
- # Calculates hash code according to all attributes.
215
- # @return [Integer] Hash code
216
- def hash
217
- [upload, upload_file_name, metadata, upload_content_type, upload_file_size, category, side, 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}."
218
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
219
239
 
220
240
  require 'active_support/core_ext/hash'
221
241
  require 'active_support/hash_with_indifferent_access.rb'
@@ -331,5 +351,6 @@ def _to_hash(value)
331
351
  end
332
352
  end
333
353
 
334
- end
354
+ end
355
+
335
356
  end