transferzero-sdk 1.8.0 → 1.8.1

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