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,339 @@
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 SanctionsResult < ApiModelBase
18
+ # Source sanctions list
19
+ attr_accessor :source
20
+
21
+ # Source-specific reference number
22
+ attr_accessor :reference
23
+
24
+ # Primary name of the sanctioned individual or entity
25
+ attr_accessor :name
26
+
27
+ attr_accessor :type
28
+
29
+ attr_accessor :aliases
30
+
31
+ # Confidence score — higher when birth details match
32
+ attr_accessor :confidence
33
+
34
+ attr_accessor :sanctions
35
+
36
+ attr_accessor :date_of_birth
37
+
38
+ attr_accessor :place_of_birth
39
+
40
+ attr_accessor :citizenship
41
+
42
+ attr_accessor :committees
43
+
44
+ attr_accessor :listing_information
45
+
46
+ # Date of last source list update
47
+ attr_accessor :source_updated_at
48
+
49
+ class EnumAttributeValidator
50
+ attr_reader :datatype
51
+ attr_reader :allowable_values
52
+
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
63
+ end
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
+ :'source' => :'source',
75
+ :'reference' => :'reference',
76
+ :'name' => :'name',
77
+ :'type' => :'type',
78
+ :'aliases' => :'aliases',
79
+ :'confidence' => :'confidence',
80
+ :'sanctions' => :'sanctions',
81
+ :'date_of_birth' => :'date_of_birth',
82
+ :'place_of_birth' => :'place_of_birth',
83
+ :'citizenship' => :'citizenship',
84
+ :'committees' => :'committees',
85
+ :'listing_information' => :'listing_information',
86
+ :'source_updated_at' => :'source_updated_at'
87
+ }
88
+ end
89
+
90
+ # Returns attribute mapping this model knows about
91
+ def self.acceptable_attribute_map
92
+ attribute_map
93
+ end
94
+
95
+ # Returns all the JSON keys this model knows about
96
+ def self.acceptable_attributes
97
+ acceptable_attribute_map.values
98
+ end
99
+
100
+ # Attribute type mapping.
101
+ def self.openapi_types
102
+ {
103
+ :'source' => :'String',
104
+ :'reference' => :'String',
105
+ :'name' => :'String',
106
+ :'type' => :'String',
107
+ :'aliases' => :'Array<String>',
108
+ :'confidence' => :'Float',
109
+ :'sanctions' => :'SanctionsResultSanctions',
110
+ :'date_of_birth' => :'String',
111
+ :'place_of_birth' => :'String',
112
+ :'citizenship' => :'String',
113
+ :'committees' => :'String',
114
+ :'listing_information' => :'String',
115
+ :'source_updated_at' => :'String'
116
+ }
117
+ end
118
+
119
+ # List of attributes with nullable: true
120
+ def self.openapi_nullable
121
+ Set.new([
122
+ :'date_of_birth',
123
+ :'place_of_birth',
124
+ :'citizenship',
125
+ :'committees',
126
+ :'listing_information',
127
+ ])
128
+ end
129
+
130
+ # Initializes the object
131
+ # @param [Hash] attributes Model attributes in the form of hash
132
+ def initialize(attributes = {})
133
+ if (!attributes.is_a?(Hash))
134
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Checkify::SanctionsResult` initialize method"
135
+ end
136
+
137
+ # check to see if the attribute exists and convert string to symbol for hash key
138
+ acceptable_attribute_map = self.class.acceptable_attribute_map
139
+ attributes = attributes.each_with_object({}) { |(k, v), h|
140
+ if (!acceptable_attribute_map.key?(k.to_sym))
141
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Checkify::SanctionsResult`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
142
+ end
143
+ h[k.to_sym] = v
144
+ }
145
+
146
+ if attributes.key?(:'source')
147
+ self.source = attributes[:'source']
148
+ end
149
+
150
+ if attributes.key?(:'reference')
151
+ self.reference = attributes[:'reference']
152
+ end
153
+
154
+ if attributes.key?(:'name')
155
+ self.name = attributes[:'name']
156
+ end
157
+
158
+ if attributes.key?(:'type')
159
+ self.type = attributes[:'type']
160
+ end
161
+
162
+ if attributes.key?(:'aliases')
163
+ if (value = attributes[:'aliases']).is_a?(Array)
164
+ self.aliases = value
165
+ end
166
+ end
167
+
168
+ if attributes.key?(:'confidence')
169
+ self.confidence = attributes[:'confidence']
170
+ end
171
+
172
+ if attributes.key?(:'sanctions')
173
+ self.sanctions = attributes[:'sanctions']
174
+ end
175
+
176
+ if attributes.key?(:'date_of_birth')
177
+ self.date_of_birth = attributes[:'date_of_birth']
178
+ end
179
+
180
+ if attributes.key?(:'place_of_birth')
181
+ self.place_of_birth = attributes[:'place_of_birth']
182
+ end
183
+
184
+ if attributes.key?(:'citizenship')
185
+ self.citizenship = attributes[:'citizenship']
186
+ end
187
+
188
+ if attributes.key?(:'committees')
189
+ self.committees = attributes[:'committees']
190
+ end
191
+
192
+ if attributes.key?(:'listing_information')
193
+ self.listing_information = attributes[:'listing_information']
194
+ end
195
+
196
+ if attributes.key?(:'source_updated_at')
197
+ self.source_updated_at = attributes[:'source_updated_at']
198
+ end
199
+ end
200
+
201
+ # Show invalid properties with the reasons. Usually used together with valid?
202
+ # @return Array for valid properties with the reasons
203
+ def list_invalid_properties
204
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
205
+ invalid_properties = Array.new
206
+ if !@confidence.nil? && @confidence > 1
207
+ invalid_properties.push('invalid value for "confidence", must be smaller than or equal to 1.')
208
+ end
209
+
210
+ if !@confidence.nil? && @confidence < 0
211
+ invalid_properties.push('invalid value for "confidence", must be greater than or equal to 0.')
212
+ end
213
+
214
+ invalid_properties
215
+ end
216
+
217
+ # Check to see if the all the properties in the model are valid
218
+ # @return true if the model is valid
219
+ def valid?
220
+ warn '[DEPRECATED] the `valid?` method is obsolete'
221
+ source_validator = EnumAttributeValidator.new('String', ["dfat", "ofac", "eu", "uk", "un", "ca", "nz", "fr", "hk", "wb", "idb"])
222
+ return false unless source_validator.valid?(@source)
223
+ type_validator = EnumAttributeValidator.new('String', ["Individual", "Entity", "Vessel"])
224
+ return false unless type_validator.valid?(@type)
225
+ return false if !@confidence.nil? && @confidence > 1
226
+ return false if !@confidence.nil? && @confidence < 0
227
+ true
228
+ end
229
+
230
+ # Custom attribute writer method checking allowed values (enum).
231
+ # @param [Object] source Object to be assigned
232
+ def source=(source)
233
+ validator = EnumAttributeValidator.new('String', ["dfat", "ofac", "eu", "uk", "un", "ca", "nz", "fr", "hk", "wb", "idb"])
234
+ unless validator.valid?(source)
235
+ fail ArgumentError, "invalid value for \"source\", must be one of #{validator.allowable_values}."
236
+ end
237
+ @source = source
238
+ end
239
+
240
+ # Custom attribute writer method checking allowed values (enum).
241
+ # @param [Object] type Object to be assigned
242
+ def type=(type)
243
+ validator = EnumAttributeValidator.new('String', ["Individual", "Entity", "Vessel"])
244
+ unless validator.valid?(type)
245
+ fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
246
+ end
247
+ @type = type
248
+ end
249
+
250
+ # Custom attribute writer method with validation
251
+ # @param [Object] confidence Value to be assigned
252
+ def confidence=(confidence)
253
+ if confidence.nil?
254
+ fail ArgumentError, 'confidence cannot be nil'
255
+ end
256
+
257
+ if confidence > 1
258
+ fail ArgumentError, 'invalid value for "confidence", must be smaller than or equal to 1.'
259
+ end
260
+
261
+ if confidence < 0
262
+ fail ArgumentError, 'invalid value for "confidence", must be greater than or equal to 0.'
263
+ end
264
+
265
+ @confidence = confidence
266
+ end
267
+
268
+ # Checks equality by comparing each attribute.
269
+ # @param [Object] Object to be compared
270
+ def ==(o)
271
+ return true if self.equal?(o)
272
+ self.class == o.class &&
273
+ source == o.source &&
274
+ reference == o.reference &&
275
+ name == o.name &&
276
+ type == o.type &&
277
+ aliases == o.aliases &&
278
+ confidence == o.confidence &&
279
+ sanctions == o.sanctions &&
280
+ date_of_birth == o.date_of_birth &&
281
+ place_of_birth == o.place_of_birth &&
282
+ citizenship == o.citizenship &&
283
+ committees == o.committees &&
284
+ listing_information == o.listing_information &&
285
+ source_updated_at == o.source_updated_at
286
+ end
287
+
288
+ # @see the `==` method
289
+ # @param [Object] Object to be compared
290
+ def eql?(o)
291
+ self == o
292
+ end
293
+
294
+ # Calculates hash code according to all attributes.
295
+ # @return [Integer] Hash code
296
+ def hash
297
+ [source, reference, name, type, aliases, confidence, sanctions, date_of_birth, place_of_birth, citizenship, committees, listing_information, source_updated_at].hash
298
+ end
299
+
300
+ # Builds the object from hash
301
+ # @param [Hash] attributes Model attributes in the form of hash
302
+ # @return [Object] Returns the model itself
303
+ def self.build_from_hash(attributes)
304
+ return nil unless attributes.is_a?(Hash)
305
+ attributes = attributes.transform_keys(&:to_sym)
306
+ transformed_hash = {}
307
+ openapi_types.each_pair do |key, type|
308
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
309
+ transformed_hash["#{key}"] = nil
310
+ elsif type =~ /\AArray<(.*)>/i
311
+ # check to ensure the input is an array given that the attribute
312
+ # is documented as an array but the input is not
313
+ if attributes[attribute_map[key]].is_a?(Array)
314
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
315
+ end
316
+ elsif !attributes[attribute_map[key]].nil?
317
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
318
+ end
319
+ end
320
+ new(transformed_hash)
321
+ end
322
+
323
+ # Returns the object in the form of hash
324
+ # @return [Hash] Returns the object in the form of hash
325
+ def to_hash
326
+ hash = {}
327
+ self.class.attribute_map.each_pair do |attr, param|
328
+ value = self.send(attr)
329
+ if value.nil?
330
+ is_nullable = self.class.openapi_nullable.include?(attr)
331
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
332
+ end
333
+
334
+ hash[param] = _to_hash(value)
335
+ end
336
+ hash
337
+ end
338
+ end
339
+ end
@@ -0,0 +1,172 @@
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 SanctionsResultSanctions < ApiModelBase
18
+ attr_accessor :targeted_financial_sanction
19
+
20
+ attr_accessor :travel_ban
21
+
22
+ attr_accessor :arms_embargo
23
+
24
+ attr_accessor :maritime_restriction
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'targeted_financial_sanction' => :'targeted_financial_sanction',
30
+ :'travel_ban' => :'travel_ban',
31
+ :'arms_embargo' => :'arms_embargo',
32
+ :'maritime_restriction' => :'maritime_restriction'
33
+ }
34
+ end
35
+
36
+ # Returns attribute mapping this model knows about
37
+ def self.acceptable_attribute_map
38
+ attribute_map
39
+ end
40
+
41
+ # Returns all the JSON keys this model knows about
42
+ def self.acceptable_attributes
43
+ acceptable_attribute_map.values
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.openapi_types
48
+ {
49
+ :'targeted_financial_sanction' => :'Boolean',
50
+ :'travel_ban' => :'Boolean',
51
+ :'arms_embargo' => :'Boolean',
52
+ :'maritime_restriction' => :'Boolean'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Checkify::SanctionsResultSanctions` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ acceptable_attribute_map = self.class.acceptable_attribute_map
71
+ attributes = attributes.each_with_object({}) { |(k, v), h|
72
+ if (!acceptable_attribute_map.key?(k.to_sym))
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Checkify::SanctionsResultSanctions`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
74
+ end
75
+ h[k.to_sym] = v
76
+ }
77
+
78
+ if attributes.key?(:'targeted_financial_sanction')
79
+ self.targeted_financial_sanction = attributes[:'targeted_financial_sanction']
80
+ end
81
+
82
+ if attributes.key?(:'travel_ban')
83
+ self.travel_ban = attributes[:'travel_ban']
84
+ end
85
+
86
+ if attributes.key?(:'arms_embargo')
87
+ self.arms_embargo = attributes[:'arms_embargo']
88
+ end
89
+
90
+ if attributes.key?(:'maritime_restriction')
91
+ self.maritime_restriction = attributes[:'maritime_restriction']
92
+ end
93
+ end
94
+
95
+ # Show invalid properties with the reasons. Usually used together with valid?
96
+ # @return Array for valid properties with the reasons
97
+ def list_invalid_properties
98
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
99
+ invalid_properties = Array.new
100
+ invalid_properties
101
+ end
102
+
103
+ # Check to see if the all the properties in the model are valid
104
+ # @return true if the model is valid
105
+ def valid?
106
+ warn '[DEPRECATED] the `valid?` method is obsolete'
107
+ true
108
+ end
109
+
110
+ # Checks equality by comparing each attribute.
111
+ # @param [Object] Object to be compared
112
+ def ==(o)
113
+ return true if self.equal?(o)
114
+ self.class == o.class &&
115
+ targeted_financial_sanction == o.targeted_financial_sanction &&
116
+ travel_ban == o.travel_ban &&
117
+ arms_embargo == o.arms_embargo &&
118
+ maritime_restriction == o.maritime_restriction
119
+ end
120
+
121
+ # @see the `==` method
122
+ # @param [Object] Object to be compared
123
+ def eql?(o)
124
+ self == o
125
+ end
126
+
127
+ # Calculates hash code according to all attributes.
128
+ # @return [Integer] Hash code
129
+ def hash
130
+ [targeted_financial_sanction, travel_ban, arms_embargo, maritime_restriction].hash
131
+ end
132
+
133
+ # Builds the object from hash
134
+ # @param [Hash] attributes Model attributes in the form of hash
135
+ # @return [Object] Returns the model itself
136
+ def self.build_from_hash(attributes)
137
+ return nil unless attributes.is_a?(Hash)
138
+ attributes = attributes.transform_keys(&:to_sym)
139
+ transformed_hash = {}
140
+ openapi_types.each_pair do |key, type|
141
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
142
+ transformed_hash["#{key}"] = nil
143
+ elsif type =~ /\AArray<(.*)>/i
144
+ # check to ensure the input is an array given that the attribute
145
+ # is documented as an array but the input is not
146
+ if attributes[attribute_map[key]].is_a?(Array)
147
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
148
+ end
149
+ elsif !attributes[attribute_map[key]].nil?
150
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
151
+ end
152
+ end
153
+ new(transformed_hash)
154
+ end
155
+
156
+ # Returns the object in the form of hash
157
+ # @return [Hash] Returns the object in the form of hash
158
+ def to_hash
159
+ hash = {}
160
+ self.class.attribute_map.each_pair do |attr, param|
161
+ value = self.send(attr)
162
+ if value.nil?
163
+ is_nullable = self.class.openapi_nullable.include?(attr)
164
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
165
+ end
166
+
167
+ hash[param] = _to_hash(value)
168
+ end
169
+ hash
170
+ end
171
+ end
172
+ end