checkify 0.1.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 (87) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +9 -0
  3. data/LICENSE +21 -0
  4. data/README.md +319 -0
  5. data/docs/AbnAddress.md +24 -0
  6. data/docs/AbnResponse.md +34 -0
  7. data/docs/AbnResponseAbnDetails.md +22 -0
  8. data/docs/Account.md +36 -0
  9. data/docs/AccountApi.md +74 -0
  10. data/docs/AcnAddress.md +24 -0
  11. data/docs/AcnResponse.md +38 -0
  12. data/docs/AcnResponseAbnDetails.md +18 -0
  13. data/docs/AcnResponseAcnDetails.md +22 -0
  14. data/docs/AddressApi.md +457 -0
  15. data/docs/AddressDetails.md +52 -0
  16. data/docs/AsicDocument.md +28 -0
  17. data/docs/AsicDocumentContentsInner.md +20 -0
  18. data/docs/BatchApi.md +217 -0
  19. data/docs/BulkCreateRequest.md +20 -0
  20. data/docs/BulkCreateRequestItems.md +49 -0
  21. data/docs/BulkJob.md +26 -0
  22. data/docs/BusinessActivity.md +22 -0
  23. data/docs/BusinessActivityResponse.md +22 -0
  24. data/docs/BusinessApi.md +361 -0
  25. data/docs/CommunicationApi.md +151 -0
  26. data/docs/DirectorIdResponse.md +24 -0
  27. data/docs/EmailResponse.md +42 -0
  28. data/docs/EmailResponseDns.md +18 -0
  29. data/docs/EmailResponseFormat.md +22 -0
  30. data/docs/Error.md +22 -0
  31. data/docs/FormerName.md +22 -0
  32. data/docs/IdentityApi.md +225 -0
  33. data/docs/NameAvailability.md +26 -0
  34. data/docs/PhoneResponse.md +32 -0
  35. data/docs/PostcodeResult.md +30 -0
  36. data/docs/ReverseResult.md +38 -0
  37. data/docs/SanctionsResponse.md +20 -0
  38. data/docs/SanctionsResult.md +42 -0
  39. data/docs/SanctionsResultSanctions.md +24 -0
  40. data/docs/SuburbDetails.md +30 -0
  41. data/docs/TfnResponse.md +24 -0
  42. data/lib/checkify/api/account_api.rb +79 -0
  43. data/lib/checkify/api/address_api.rb +490 -0
  44. data/lib/checkify/api/batch_api.rb +216 -0
  45. data/lib/checkify/api/business_api.rb +365 -0
  46. data/lib/checkify/api/communication_api.rb +157 -0
  47. data/lib/checkify/api/identity_api.rb +248 -0
  48. data/lib/checkify/api_client.rb +397 -0
  49. data/lib/checkify/api_error.rb +58 -0
  50. data/lib/checkify/api_model_base.rb +88 -0
  51. data/lib/checkify/client.rb +25 -0
  52. data/lib/checkify/configuration.rb +305 -0
  53. data/lib/checkify/models/abn_address.rb +173 -0
  54. data/lib/checkify/models/abn_response.rb +223 -0
  55. data/lib/checkify/models/abn_response_abn_details.rb +165 -0
  56. data/lib/checkify/models/account.rb +277 -0
  57. data/lib/checkify/models/acn_address.rb +173 -0
  58. data/lib/checkify/models/acn_response.rb +244 -0
  59. data/lib/checkify/models/acn_response_abn_details.rb +145 -0
  60. data/lib/checkify/models/acn_response_acn_details.rb +164 -0
  61. data/lib/checkify/models/address_details.rb +324 -0
  62. data/lib/checkify/models/asic_document.rb +192 -0
  63. data/lib/checkify/models/asic_document_contents_inner.rb +154 -0
  64. data/lib/checkify/models/bulk_create_request.rb +213 -0
  65. data/lib/checkify/models/bulk_create_request_items.rb +103 -0
  66. data/lib/checkify/models/bulk_job.rb +215 -0
  67. data/lib/checkify/models/business_activity.rb +166 -0
  68. data/lib/checkify/models/business_activity_response.rb +165 -0
  69. data/lib/checkify/models/director_id_response.rb +174 -0
  70. data/lib/checkify/models/email_response.rb +292 -0
  71. data/lib/checkify/models/email_response_dns.rb +146 -0
  72. data/lib/checkify/models/email_response_format.rb +167 -0
  73. data/lib/checkify/models/error.rb +166 -0
  74. data/lib/checkify/models/former_name.rb +163 -0
  75. data/lib/checkify/models/name_availability.rb +186 -0
  76. data/lib/checkify/models/phone_response.rb +216 -0
  77. data/lib/checkify/models/postcode_result.rb +201 -0
  78. data/lib/checkify/models/reverse_result.rb +237 -0
  79. data/lib/checkify/models/sanctions_response.rb +157 -0
  80. data/lib/checkify/models/sanctions_result.rb +339 -0
  81. data/lib/checkify/models/sanctions_result_sanctions.rb +172 -0
  82. data/lib/checkify/models/suburb_details.rb +207 -0
  83. data/lib/checkify/models/tfn_response.rb +174 -0
  84. data/lib/checkify/version.rb +15 -0
  85. data/lib/checkify.rb +78 -0
  86. data/openapi.yaml +1373 -0
  87. metadata +182 -0
@@ -0,0 +1,324 @@
1
+ =begin
2
+ #Checkify API
3
+
4
+ #Australian and New Zealand address validation, business lookups, identity checks, and communication validation through a single REST interface.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.21.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Checkify
17
+ class AddressDetails < ApiModelBase
18
+ # Flat/unit number and type
19
+ attr_accessor :unit
20
+
21
+ # Floor/level descriptor
22
+ attr_accessor :level
23
+
24
+ # Combined unit and level
25
+ attr_accessor :unit_level
26
+
27
+ # House/lot number
28
+ attr_accessor :street_number
29
+
30
+ # Street name only
31
+ attr_accessor :street_name
32
+
33
+ # Street type code (ST, RD, AVE…)
34
+ attr_accessor :street_type
35
+
36
+ # Number + full street name combined
37
+ attr_accessor :street
38
+
39
+ # Locality/suburb name
40
+ attr_accessor :city
41
+
42
+ # 4-digit postcode
43
+ attr_accessor :postcode
44
+
45
+ # State abbreviation (NSW, VIC…) — AU only
46
+ attr_accessor :state
47
+
48
+ # Full state name — AU only
49
+ attr_accessor :state_full
50
+
51
+ # Region/city (e.g. Auckland) — NZ only
52
+ attr_accessor :region
53
+
54
+ # Country code (AU or NZ)
55
+ attr_accessor :country
56
+
57
+ # Full country name
58
+ attr_accessor :country_full
59
+
60
+ attr_accessor :latitude
61
+
62
+ attr_accessor :longitude
63
+
64
+ # ABS Mesh Block identifier — AU only
65
+ attr_accessor :mesh_block_code
66
+
67
+ # Named building or complex — AU only
68
+ attr_accessor :building_name
69
+
70
+ # Attribute mapping from ruby-style variable name to JSON key.
71
+ def self.attribute_map
72
+ {
73
+ :'unit' => :'unit',
74
+ :'level' => :'level',
75
+ :'unit_level' => :'unitLevel',
76
+ :'street_number' => :'streetNumber',
77
+ :'street_name' => :'streetName',
78
+ :'street_type' => :'streetType',
79
+ :'street' => :'street',
80
+ :'city' => :'city',
81
+ :'postcode' => :'postcode',
82
+ :'state' => :'state',
83
+ :'state_full' => :'stateFull',
84
+ :'region' => :'region',
85
+ :'country' => :'country',
86
+ :'country_full' => :'countryFull',
87
+ :'latitude' => :'latitude',
88
+ :'longitude' => :'longitude',
89
+ :'mesh_block_code' => :'meshBlockCode',
90
+ :'building_name' => :'buildingName'
91
+ }
92
+ end
93
+
94
+ # Returns attribute mapping this model knows about
95
+ def self.acceptable_attribute_map
96
+ attribute_map
97
+ end
98
+
99
+ # Returns all the JSON keys this model knows about
100
+ def self.acceptable_attributes
101
+ acceptable_attribute_map.values
102
+ end
103
+
104
+ # Attribute type mapping.
105
+ def self.openapi_types
106
+ {
107
+ :'unit' => :'String',
108
+ :'level' => :'String',
109
+ :'unit_level' => :'String',
110
+ :'street_number' => :'String',
111
+ :'street_name' => :'String',
112
+ :'street_type' => :'String',
113
+ :'street' => :'String',
114
+ :'city' => :'String',
115
+ :'postcode' => :'String',
116
+ :'state' => :'String',
117
+ :'state_full' => :'String',
118
+ :'region' => :'String',
119
+ :'country' => :'String',
120
+ :'country_full' => :'String',
121
+ :'latitude' => :'Float',
122
+ :'longitude' => :'Float',
123
+ :'mesh_block_code' => :'String',
124
+ :'building_name' => :'String'
125
+ }
126
+ end
127
+
128
+ # List of attributes with nullable: true
129
+ def self.openapi_nullable
130
+ Set.new([
131
+ :'unit',
132
+ :'level',
133
+ :'unit_level',
134
+ :'state',
135
+ :'state_full',
136
+ :'region',
137
+ :'latitude',
138
+ :'longitude',
139
+ :'mesh_block_code',
140
+ :'building_name'
141
+ ])
142
+ end
143
+
144
+ # Initializes the object
145
+ # @param [Hash] attributes Model attributes in the form of hash
146
+ def initialize(attributes = {})
147
+ if (!attributes.is_a?(Hash))
148
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Checkify::AddressDetails` initialize method"
149
+ end
150
+
151
+ # check to see if the attribute exists and convert string to symbol for hash key
152
+ acceptable_attribute_map = self.class.acceptable_attribute_map
153
+ attributes = attributes.each_with_object({}) { |(k, v), h|
154
+ if (!acceptable_attribute_map.key?(k.to_sym))
155
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Checkify::AddressDetails`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
156
+ end
157
+ h[k.to_sym] = v
158
+ }
159
+
160
+ if attributes.key?(:'unit')
161
+ self.unit = attributes[:'unit']
162
+ end
163
+
164
+ if attributes.key?(:'level')
165
+ self.level = attributes[:'level']
166
+ end
167
+
168
+ if attributes.key?(:'unit_level')
169
+ self.unit_level = attributes[:'unit_level']
170
+ end
171
+
172
+ if attributes.key?(:'street_number')
173
+ self.street_number = attributes[:'street_number']
174
+ end
175
+
176
+ if attributes.key?(:'street_name')
177
+ self.street_name = attributes[:'street_name']
178
+ end
179
+
180
+ if attributes.key?(:'street_type')
181
+ self.street_type = attributes[:'street_type']
182
+ end
183
+
184
+ if attributes.key?(:'street')
185
+ self.street = attributes[:'street']
186
+ end
187
+
188
+ if attributes.key?(:'city')
189
+ self.city = attributes[:'city']
190
+ end
191
+
192
+ if attributes.key?(:'postcode')
193
+ self.postcode = attributes[:'postcode']
194
+ end
195
+
196
+ if attributes.key?(:'state')
197
+ self.state = attributes[:'state']
198
+ end
199
+
200
+ if attributes.key?(:'state_full')
201
+ self.state_full = attributes[:'state_full']
202
+ end
203
+
204
+ if attributes.key?(:'region')
205
+ self.region = attributes[:'region']
206
+ end
207
+
208
+ if attributes.key?(:'country')
209
+ self.country = attributes[:'country']
210
+ end
211
+
212
+ if attributes.key?(:'country_full')
213
+ self.country_full = attributes[:'country_full']
214
+ end
215
+
216
+ if attributes.key?(:'latitude')
217
+ self.latitude = attributes[:'latitude']
218
+ end
219
+
220
+ if attributes.key?(:'longitude')
221
+ self.longitude = attributes[:'longitude']
222
+ end
223
+
224
+ if attributes.key?(:'mesh_block_code')
225
+ self.mesh_block_code = attributes[:'mesh_block_code']
226
+ end
227
+
228
+ if attributes.key?(:'building_name')
229
+ self.building_name = attributes[:'building_name']
230
+ end
231
+ end
232
+
233
+ # Show invalid properties with the reasons. Usually used together with valid?
234
+ # @return Array for valid properties with the reasons
235
+ def list_invalid_properties
236
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
237
+ invalid_properties = Array.new
238
+ invalid_properties
239
+ end
240
+
241
+ # Check to see if the all the properties in the model are valid
242
+ # @return true if the model is valid
243
+ def valid?
244
+ warn '[DEPRECATED] the `valid?` method is obsolete'
245
+ true
246
+ end
247
+
248
+ # Checks equality by comparing each attribute.
249
+ # @param [Object] Object to be compared
250
+ def ==(o)
251
+ return true if self.equal?(o)
252
+ self.class == o.class &&
253
+ unit == o.unit &&
254
+ level == o.level &&
255
+ unit_level == o.unit_level &&
256
+ street_number == o.street_number &&
257
+ street_name == o.street_name &&
258
+ street_type == o.street_type &&
259
+ street == o.street &&
260
+ city == o.city &&
261
+ postcode == o.postcode &&
262
+ state == o.state &&
263
+ state_full == o.state_full &&
264
+ region == o.region &&
265
+ country == o.country &&
266
+ country_full == o.country_full &&
267
+ latitude == o.latitude &&
268
+ longitude == o.longitude &&
269
+ mesh_block_code == o.mesh_block_code &&
270
+ building_name == o.building_name
271
+ end
272
+
273
+ # @see the `==` method
274
+ # @param [Object] Object to be compared
275
+ def eql?(o)
276
+ self == o
277
+ end
278
+
279
+ # Calculates hash code according to all attributes.
280
+ # @return [Integer] Hash code
281
+ def hash
282
+ [unit, level, unit_level, street_number, street_name, street_type, street, city, postcode, state, state_full, region, country, country_full, latitude, longitude, mesh_block_code, building_name].hash
283
+ end
284
+
285
+ # Builds the object from hash
286
+ # @param [Hash] attributes Model attributes in the form of hash
287
+ # @return [Object] Returns the model itself
288
+ def self.build_from_hash(attributes)
289
+ return nil unless attributes.is_a?(Hash)
290
+ attributes = attributes.transform_keys(&:to_sym)
291
+ transformed_hash = {}
292
+ openapi_types.each_pair do |key, type|
293
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
294
+ transformed_hash["#{key}"] = nil
295
+ elsif type =~ /\AArray<(.*)>/i
296
+ # check to ensure the input is an array given that the attribute
297
+ # is documented as an array but the input is not
298
+ if attributes[attribute_map[key]].is_a?(Array)
299
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
300
+ end
301
+ elsif !attributes[attribute_map[key]].nil?
302
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
303
+ end
304
+ end
305
+ new(transformed_hash)
306
+ end
307
+
308
+ # Returns the object in the form of hash
309
+ # @return [Hash] Returns the object in the form of hash
310
+ def to_hash
311
+ hash = {}
312
+ self.class.attribute_map.each_pair do |attr, param|
313
+ value = self.send(attr)
314
+ if value.nil?
315
+ is_nullable = self.class.openapi_nullable.include?(attr)
316
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
317
+ end
318
+
319
+ hash[param] = _to_hash(value)
320
+ end
321
+ hash
322
+ end
323
+ end
324
+ end
@@ -0,0 +1,192 @@
1
+ =begin
2
+ #Checkify API
3
+
4
+ #Australian and New Zealand address validation, business lookups, identity checks, and communication validation through a single REST interface.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.21.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Checkify
17
+ class AsicDocument < ApiModelBase
18
+ attr_accessor :number
19
+
20
+ attr_accessor :date
21
+
22
+ attr_accessor :code
23
+
24
+ attr_accessor :title
25
+
26
+ attr_accessor :pages
27
+
28
+ attr_accessor :contents
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'number' => :'number',
34
+ :'date' => :'date',
35
+ :'code' => :'code',
36
+ :'title' => :'title',
37
+ :'pages' => :'pages',
38
+ :'contents' => :'contents'
39
+ }
40
+ end
41
+
42
+ # Returns attribute mapping this model knows about
43
+ def self.acceptable_attribute_map
44
+ attribute_map
45
+ end
46
+
47
+ # Returns all the JSON keys this model knows about
48
+ def self.acceptable_attributes
49
+ acceptable_attribute_map.values
50
+ end
51
+
52
+ # Attribute type mapping.
53
+ def self.openapi_types
54
+ {
55
+ :'number' => :'String',
56
+ :'date' => :'Date',
57
+ :'code' => :'String',
58
+ :'title' => :'String',
59
+ :'pages' => :'Integer',
60
+ :'contents' => :'Array<AsicDocumentContentsInner>'
61
+ }
62
+ end
63
+
64
+ # List of attributes with nullable: true
65
+ def self.openapi_nullable
66
+ Set.new([
67
+ ])
68
+ end
69
+
70
+ # Initializes the object
71
+ # @param [Hash] attributes Model attributes in the form of hash
72
+ def initialize(attributes = {})
73
+ if (!attributes.is_a?(Hash))
74
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Checkify::AsicDocument` initialize method"
75
+ end
76
+
77
+ # check to see if the attribute exists and convert string to symbol for hash key
78
+ acceptable_attribute_map = self.class.acceptable_attribute_map
79
+ attributes = attributes.each_with_object({}) { |(k, v), h|
80
+ if (!acceptable_attribute_map.key?(k.to_sym))
81
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Checkify::AsicDocument`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
82
+ end
83
+ h[k.to_sym] = v
84
+ }
85
+
86
+ if attributes.key?(:'number')
87
+ self.number = attributes[:'number']
88
+ end
89
+
90
+ if attributes.key?(:'date')
91
+ self.date = attributes[:'date']
92
+ end
93
+
94
+ if attributes.key?(:'code')
95
+ self.code = attributes[:'code']
96
+ end
97
+
98
+ if attributes.key?(:'title')
99
+ self.title = attributes[:'title']
100
+ end
101
+
102
+ if attributes.key?(:'pages')
103
+ self.pages = attributes[:'pages']
104
+ end
105
+
106
+ if attributes.key?(:'contents')
107
+ if (value = attributes[:'contents']).is_a?(Array)
108
+ self.contents = value
109
+ end
110
+ end
111
+ end
112
+
113
+ # Show invalid properties with the reasons. Usually used together with valid?
114
+ # @return Array for valid properties with the reasons
115
+ def list_invalid_properties
116
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
117
+ invalid_properties = Array.new
118
+ invalid_properties
119
+ end
120
+
121
+ # Check to see if the all the properties in the model are valid
122
+ # @return true if the model is valid
123
+ def valid?
124
+ warn '[DEPRECATED] the `valid?` method is obsolete'
125
+ true
126
+ end
127
+
128
+ # Checks equality by comparing each attribute.
129
+ # @param [Object] Object to be compared
130
+ def ==(o)
131
+ return true if self.equal?(o)
132
+ self.class == o.class &&
133
+ number == o.number &&
134
+ date == o.date &&
135
+ code == o.code &&
136
+ title == o.title &&
137
+ pages == o.pages &&
138
+ contents == o.contents
139
+ end
140
+
141
+ # @see the `==` method
142
+ # @param [Object] Object to be compared
143
+ def eql?(o)
144
+ self == o
145
+ end
146
+
147
+ # Calculates hash code according to all attributes.
148
+ # @return [Integer] Hash code
149
+ def hash
150
+ [number, date, code, title, pages, contents].hash
151
+ end
152
+
153
+ # Builds the object from hash
154
+ # @param [Hash] attributes Model attributes in the form of hash
155
+ # @return [Object] Returns the model itself
156
+ def self.build_from_hash(attributes)
157
+ return nil unless attributes.is_a?(Hash)
158
+ attributes = attributes.transform_keys(&:to_sym)
159
+ transformed_hash = {}
160
+ openapi_types.each_pair do |key, type|
161
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
162
+ transformed_hash["#{key}"] = nil
163
+ elsif type =~ /\AArray<(.*)>/i
164
+ # check to ensure the input is an array given that the attribute
165
+ # is documented as an array but the input is not
166
+ if attributes[attribute_map[key]].is_a?(Array)
167
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
168
+ end
169
+ elsif !attributes[attribute_map[key]].nil?
170
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
171
+ end
172
+ end
173
+ new(transformed_hash)
174
+ end
175
+
176
+ # Returns the object in the form of hash
177
+ # @return [Hash] Returns the object in the form of hash
178
+ def to_hash
179
+ hash = {}
180
+ self.class.attribute_map.each_pair do |attr, param|
181
+ value = self.send(attr)
182
+ if value.nil?
183
+ is_nullable = self.class.openapi_nullable.include?(attr)
184
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
185
+ end
186
+
187
+ hash[param] = _to_hash(value)
188
+ end
189
+ hash
190
+ end
191
+ end
192
+ end
@@ -0,0 +1,154 @@
1
+ =begin
2
+ #Checkify API
3
+
4
+ #Australian and New Zealand address validation, business lookups, identity checks, and communication validation through a single REST interface.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.21.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Checkify
17
+ class AsicDocumentContentsInner < ApiModelBase
18
+ attr_accessor :sub_code
19
+
20
+ attr_accessor :title
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'sub_code' => :'subCode',
26
+ :'title' => :'title'
27
+ }
28
+ end
29
+
30
+ # Returns attribute mapping this model knows about
31
+ def self.acceptable_attribute_map
32
+ attribute_map
33
+ end
34
+
35
+ # Returns all the JSON keys this model knows about
36
+ def self.acceptable_attributes
37
+ acceptable_attribute_map.values
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.openapi_types
42
+ {
43
+ :'sub_code' => :'String',
44
+ :'title' => :'String'
45
+ }
46
+ end
47
+
48
+ # List of attributes with nullable: true
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ ])
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Checkify::AsicDocumentContentsInner` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ acceptable_attribute_map = self.class.acceptable_attribute_map
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!acceptable_attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Checkify::AsicDocumentContentsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'sub_code')
71
+ self.sub_code = attributes[:'sub_code']
72
+ end
73
+
74
+ if attributes.key?(:'title')
75
+ self.title = attributes[:'title']
76
+ end
77
+ end
78
+
79
+ # Show invalid properties with the reasons. Usually used together with valid?
80
+ # @return Array for valid properties with the reasons
81
+ def list_invalid_properties
82
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
83
+ invalid_properties = Array.new
84
+ invalid_properties
85
+ end
86
+
87
+ # Check to see if the all the properties in the model are valid
88
+ # @return true if the model is valid
89
+ def valid?
90
+ warn '[DEPRECATED] the `valid?` method is obsolete'
91
+ true
92
+ end
93
+
94
+ # Checks equality by comparing each attribute.
95
+ # @param [Object] Object to be compared
96
+ def ==(o)
97
+ return true if self.equal?(o)
98
+ self.class == o.class &&
99
+ sub_code == o.sub_code &&
100
+ title == o.title
101
+ end
102
+
103
+ # @see the `==` method
104
+ # @param [Object] Object to be compared
105
+ def eql?(o)
106
+ self == o
107
+ end
108
+
109
+ # Calculates hash code according to all attributes.
110
+ # @return [Integer] Hash code
111
+ def hash
112
+ [sub_code, title].hash
113
+ end
114
+
115
+ # Builds the object from hash
116
+ # @param [Hash] attributes Model attributes in the form of hash
117
+ # @return [Object] Returns the model itself
118
+ def self.build_from_hash(attributes)
119
+ return nil unless attributes.is_a?(Hash)
120
+ attributes = attributes.transform_keys(&:to_sym)
121
+ transformed_hash = {}
122
+ openapi_types.each_pair do |key, type|
123
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
124
+ transformed_hash["#{key}"] = nil
125
+ elsif type =~ /\AArray<(.*)>/i
126
+ # check to ensure the input is an array given that the attribute
127
+ # is documented as an array but the input is not
128
+ if attributes[attribute_map[key]].is_a?(Array)
129
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
130
+ end
131
+ elsif !attributes[attribute_map[key]].nil?
132
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
133
+ end
134
+ end
135
+ new(transformed_hash)
136
+ end
137
+
138
+ # Returns the object in the form of hash
139
+ # @return [Hash] Returns the object in the form of hash
140
+ def to_hash
141
+ hash = {}
142
+ self.class.attribute_map.each_pair do |attr, param|
143
+ value = self.send(attr)
144
+ if value.nil?
145
+ is_nullable = self.class.openapi_nullable.include?(attr)
146
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
147
+ end
148
+
149
+ hash[param] = _to_hash(value)
150
+ end
151
+ hash
152
+ end
153
+ end
154
+ end