pescheck 0.0.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 (143) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +193 -0
  4. data/Rakefile +10 -0
  5. data/docs/AuthenticationApi.md +217 -0
  6. data/docs/ChecksApi.md +147 -0
  7. data/docs/CustomTokenObtainPair.md +20 -0
  8. data/docs/DivisionReadOnly.md +46 -0
  9. data/docs/DivisionWrite.md +40 -0
  10. data/docs/DivisionsApi.md +369 -0
  11. data/docs/JWTGeneration.md +24 -0
  12. data/docs/JWTResponse.md +28 -0
  13. data/docs/OAuthApi.md +213 -0
  14. data/docs/OAuthApplication.md +26 -0
  15. data/docs/OAuthApplicationResponse.md +32 -0
  16. data/docs/PaginatedDivisionReadOnlyList.md +24 -0
  17. data/docs/PaginatedV2ProfileListItemList.md +24 -0
  18. data/docs/PaginatedV2ScreeningListItemList.md +24 -0
  19. data/docs/PatchedDivisionWrite.md +40 -0
  20. data/docs/PatchedV2ProfilePartialUpdate.md +20 -0
  21. data/docs/ProfilesApi.md +438 -0
  22. data/docs/ScreeningsApi.md +293 -0
  23. data/docs/TokenRefresh.md +20 -0
  24. data/docs/V2Candidate.md +36 -0
  25. data/docs/V2CheckField.md +26 -0
  26. data/docs/V2CheckInfo.md +40 -0
  27. data/docs/V2Document.md +28 -0
  28. data/docs/V2DocumentContent.md +20 -0
  29. data/docs/V2Money.md +20 -0
  30. data/docs/V2ProfileCheck.md +20 -0
  31. data/docs/V2ProfileCheckEntry.md +30 -0
  32. data/docs/V2ProfileCreate.md +22 -0
  33. data/docs/V2ProfileDetail.md +38 -0
  34. data/docs/V2ProfileListItem.md +30 -0
  35. data/docs/V2ProfileUpdate.md +22 -0
  36. data/docs/V2ProfileUpdateCheck.md +22 -0
  37. data/docs/V2ScreeningCheck.md +24 -0
  38. data/docs/V2ScreeningCheckEntry.md +34 -0
  39. data/docs/V2ScreeningCheckListItem.md +22 -0
  40. data/docs/V2ScreeningCreate.md +22 -0
  41. data/docs/V2ScreeningDetail.md +34 -0
  42. data/docs/V2ScreeningDetailProfile.md +20 -0
  43. data/docs/V2ScreeningListItem.md +34 -0
  44. data/docs/VerifyWebhook.md +18 -0
  45. data/docs/Webhook.md +26 -0
  46. data/docs/WebhookResponse.md +36 -0
  47. data/docs/WebhooksApi.md +290 -0
  48. data/git_push.sh +57 -0
  49. data/lib/pescheck/api/authentication_api.rb +220 -0
  50. data/lib/pescheck/api/checks_api.rb +144 -0
  51. data/lib/pescheck/api/divisions_api.rb +365 -0
  52. data/lib/pescheck/api/o_auth_api.rb +202 -0
  53. data/lib/pescheck/api/profiles_api.rb +432 -0
  54. data/lib/pescheck/api/screenings_api.rb +288 -0
  55. data/lib/pescheck/api/webhooks_api.rb +278 -0
  56. data/lib/pescheck/api_client.rb +441 -0
  57. data/lib/pescheck/api_error.rb +58 -0
  58. data/lib/pescheck/api_model_base.rb +88 -0
  59. data/lib/pescheck/configuration.rb +429 -0
  60. data/lib/pescheck/models/custom_token_obtain_pair.rb +191 -0
  61. data/lib/pescheck/models/division_read_only.rb +469 -0
  62. data/lib/pescheck/models/division_write.rb +436 -0
  63. data/lib/pescheck/models/jwt_generation.rb +213 -0
  64. data/lib/pescheck/models/jwt_response.rb +285 -0
  65. data/lib/pescheck/models/o_auth_application.rb +265 -0
  66. data/lib/pescheck/models/o_auth_application_response.rb +379 -0
  67. data/lib/pescheck/models/paginated_division_read_only_list.rb +216 -0
  68. data/lib/pescheck/models/paginated_v2_profile_list_item_list.rb +216 -0
  69. data/lib/pescheck/models/paginated_v2_screening_list_item_list.rb +216 -0
  70. data/lib/pescheck/models/patched_division_write.rb +360 -0
  71. data/lib/pescheck/models/patched_v2_profile_partial_update.rb +176 -0
  72. data/lib/pescheck/models/token_refresh.rb +173 -0
  73. data/lib/pescheck/models/v2_candidate.rb +390 -0
  74. data/lib/pescheck/models/v2_check_field.rb +246 -0
  75. data/lib/pescheck/models/v2_check_info.rb +438 -0
  76. data/lib/pescheck/models/v2_document.rb +308 -0
  77. data/lib/pescheck/models/v2_document_content.rb +175 -0
  78. data/lib/pescheck/models/v2_money.rb +210 -0
  79. data/lib/pescheck/models/v2_profile_check.rb +201 -0
  80. data/lib/pescheck/models/v2_profile_check_entry.rb +349 -0
  81. data/lib/pescheck/models/v2_profile_create.rb +212 -0
  82. data/lib/pescheck/models/v2_profile_detail.rb +401 -0
  83. data/lib/pescheck/models/v2_profile_list_item.rb +291 -0
  84. data/lib/pescheck/models/v2_profile_update.rb +213 -0
  85. data/lib/pescheck/models/v2_profile_update_check.rb +210 -0
  86. data/lib/pescheck/models/v2_screening_check.rb +221 -0
  87. data/lib/pescheck/models/v2_screening_check_entry.rb +376 -0
  88. data/lib/pescheck/models/v2_screening_check_list_item.rb +242 -0
  89. data/lib/pescheck/models/v2_screening_create.rb +201 -0
  90. data/lib/pescheck/models/v2_screening_detail.rb +348 -0
  91. data/lib/pescheck/models/v2_screening_detail_profile.rb +156 -0
  92. data/lib/pescheck/models/v2_screening_list_item.rb +330 -0
  93. data/lib/pescheck/models/verify_webhook.rb +166 -0
  94. data/lib/pescheck/models/webhook.rb +265 -0
  95. data/lib/pescheck/models/webhook_response.rb +353 -0
  96. data/lib/pescheck/version.rb +15 -0
  97. data/lib/pescheck.rb +83 -0
  98. data/pescheck.gemspec +41 -0
  99. data/spec/api/authentication_api_spec.rb +68 -0
  100. data/spec/api/checks_api_spec.rb +56 -0
  101. data/spec/api/divisions_api_spec.rb +94 -0
  102. data/spec/api/o_auth_api_spec.rb +67 -0
  103. data/spec/api/profiles_api_spec.rb +105 -0
  104. data/spec/api/screenings_api_spec.rb +81 -0
  105. data/spec/api/webhooks_api_spec.rb +81 -0
  106. data/spec/models/custom_token_obtain_pair_spec.rb +42 -0
  107. data/spec/models/division_read_only_spec.rb +120 -0
  108. data/spec/models/division_write_spec.rb +102 -0
  109. data/spec/models/jwt_generation_spec.rb +54 -0
  110. data/spec/models/jwt_response_spec.rb +66 -0
  111. data/spec/models/o_auth_application_response_spec.rb +86 -0
  112. data/spec/models/o_auth_application_spec.rb +68 -0
  113. data/spec/models/paginated_division_read_only_list_spec.rb +54 -0
  114. data/spec/models/paginated_v2_profile_list_item_list_spec.rb +54 -0
  115. data/spec/models/paginated_v2_screening_list_item_list_spec.rb +54 -0
  116. data/spec/models/patched_division_write_spec.rb +102 -0
  117. data/spec/models/patched_v2_profile_partial_update_spec.rb +42 -0
  118. data/spec/models/token_refresh_spec.rb +42 -0
  119. data/spec/models/v2_candidate_spec.rb +94 -0
  120. data/spec/models/v2_check_field_spec.rb +60 -0
  121. data/spec/models/v2_check_info_spec.rb +102 -0
  122. data/spec/models/v2_document_content_spec.rb +42 -0
  123. data/spec/models/v2_document_spec.rb +70 -0
  124. data/spec/models/v2_money_spec.rb +42 -0
  125. data/spec/models/v2_profile_check_entry_spec.rb +76 -0
  126. data/spec/models/v2_profile_check_spec.rb +46 -0
  127. data/spec/models/v2_profile_create_spec.rb +48 -0
  128. data/spec/models/v2_profile_detail_spec.rb +96 -0
  129. data/spec/models/v2_profile_list_item_spec.rb +72 -0
  130. data/spec/models/v2_profile_update_check_spec.rb +52 -0
  131. data/spec/models/v2_profile_update_spec.rb +48 -0
  132. data/spec/models/v2_screening_check_entry_spec.rb +88 -0
  133. data/spec/models/v2_screening_check_list_item_spec.rb +52 -0
  134. data/spec/models/v2_screening_check_spec.rb +58 -0
  135. data/spec/models/v2_screening_create_spec.rb +48 -0
  136. data/spec/models/v2_screening_detail_profile_spec.rb +42 -0
  137. data/spec/models/v2_screening_detail_spec.rb +84 -0
  138. data/spec/models/v2_screening_list_item_spec.rb +84 -0
  139. data/spec/models/verify_webhook_spec.rb +36 -0
  140. data/spec/models/webhook_response_spec.rb +90 -0
  141. data/spec/models/webhook_spec.rb +64 -0
  142. data/spec/spec_helper.rb +111 -0
  143. metadata +302 -0
@@ -0,0 +1,376 @@
1
+ =begin
2
+ #Pescheck API
3
+
4
+ #API for Pescheck ## Authentication This API supports three authentication methods: 1. **OAuth2** (recommended for API clients) - Use client credentials flow 2. **JWT Bearer** (for user-based access) - Obtain tokens via /api/jwt/ endpoint 3. **Cookie** (for browser-based access) - Session authentication via web login ## Quick Start for API Clients 1. Select your environment from the servers dropdown 2. Use OAuth2 with client credentials flow 3. Scopes are automatically included: read:api, create:api, update:api
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.23.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Pescheck
17
+ class V2ScreeningCheckEntry < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :profile_check_id
21
+
22
+ # * `addresscheck` - addresscheck * `adversemediacheck` - adversemediacheck * `bigcheck` - bigcheck * `criminalrecordscheck` - criminalrecordscheck * `criminalrecordsuploadcheck` - criminalrecordsuploadcheck * `customintegritycheck` - customintegritycheck * `cvcheck` - cvcheck * `edrcheck` - edrcheck * `focumcheck` - focumcheck * `id2check` - id2check * `idcheck` - idcheck * `integritycheck` - integritycheck * `openhealthcarecheck` - openhealthcarecheck * `permissioncheck` - permissioncheck * `pescheckadversemediacheck` - pescheckadversemediacheck * `qualificationcheck` - qualificationcheck * `righttoworkcheck` - righttoworkcheck * `vogcheck` - vogcheck * `watchlist2check` - watchlist2check * `watchlistcheck` - watchlistcheck * `workreferencecheck` - workreferencecheck * `worldwidecreditcheck` - worldwidecreditcheck
23
+ attr_accessor :check_type
24
+
25
+ attr_accessor :display_name
26
+
27
+ attr_accessor :status
28
+
29
+ attr_accessor :config
30
+
31
+ attr_accessor :input
32
+
33
+ attr_accessor :output
34
+
35
+ # Deep link to this check's candidate wizard step. Null when the check has no dedicated candidate step.
36
+ attr_accessor :candidate_wizard_url
37
+
38
+ class EnumAttributeValidator
39
+ attr_reader :datatype
40
+ attr_reader :allowable_values
41
+
42
+ def initialize(datatype, allowable_values)
43
+ @allowable_values = allowable_values.map do |value|
44
+ case datatype.to_s
45
+ when /Integer/i
46
+ value.to_i
47
+ when /Float/i
48
+ value.to_f
49
+ else
50
+ value
51
+ end
52
+ end
53
+ end
54
+
55
+ def valid?(value)
56
+ !value || allowable_values.include?(value)
57
+ end
58
+ end
59
+
60
+ # Attribute mapping from ruby-style variable name to JSON key.
61
+ def self.attribute_map
62
+ {
63
+ :'id' => :'id',
64
+ :'profile_check_id' => :'profile_check_id',
65
+ :'check_type' => :'check_type',
66
+ :'display_name' => :'display_name',
67
+ :'status' => :'status',
68
+ :'config' => :'config',
69
+ :'input' => :'input',
70
+ :'output' => :'output',
71
+ :'candidate_wizard_url' => :'candidate_wizard_url'
72
+ }
73
+ end
74
+
75
+ # Returns attribute mapping this model knows about
76
+ def self.acceptable_attribute_map
77
+ attribute_map
78
+ end
79
+
80
+ # Returns all the JSON keys this model knows about
81
+ def self.acceptable_attributes
82
+ acceptable_attribute_map.values
83
+ end
84
+
85
+ # Attribute type mapping.
86
+ def self.openapi_types
87
+ {
88
+ :'id' => :'String',
89
+ :'profile_check_id' => :'String',
90
+ :'check_type' => :'String',
91
+ :'display_name' => :'String',
92
+ :'status' => :'String',
93
+ :'config' => :'Hash<String, Object>',
94
+ :'input' => :'Hash<String, Object>',
95
+ :'output' => :'Hash<String, Object>',
96
+ :'candidate_wizard_url' => :'String'
97
+ }
98
+ end
99
+
100
+ # List of attributes with nullable: true
101
+ def self.openapi_nullable
102
+ Set.new([
103
+ :'profile_check_id',
104
+ :'candidate_wizard_url'
105
+ ])
106
+ end
107
+
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 `Pescheck::V2ScreeningCheckEntry` initialize method"
113
+ end
114
+
115
+ # check to see if the attribute exists and convert string to symbol for hash key
116
+ acceptable_attribute_map = self.class.acceptable_attribute_map
117
+ attributes = attributes.each_with_object({}) { |(k, v), h|
118
+ if (!acceptable_attribute_map.key?(k.to_sym))
119
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pescheck::V2ScreeningCheckEntry`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
120
+ end
121
+ h[k.to_sym] = v
122
+ }
123
+
124
+ if attributes.key?(:'id')
125
+ self.id = attributes[:'id']
126
+ else
127
+ self.id = nil
128
+ end
129
+
130
+ if attributes.key?(:'profile_check_id')
131
+ self.profile_check_id = attributes[:'profile_check_id']
132
+ else
133
+ self.profile_check_id = nil
134
+ end
135
+
136
+ if attributes.key?(:'check_type')
137
+ self.check_type = attributes[:'check_type']
138
+ else
139
+ self.check_type = nil
140
+ end
141
+
142
+ if attributes.key?(:'display_name')
143
+ self.display_name = attributes[:'display_name']
144
+ else
145
+ self.display_name = nil
146
+ end
147
+
148
+ if attributes.key?(:'status')
149
+ self.status = attributes[:'status']
150
+ else
151
+ self.status = nil
152
+ end
153
+
154
+ if attributes.key?(:'config')
155
+ if (value = attributes[:'config']).is_a?(Hash)
156
+ self.config = value
157
+ end
158
+ else
159
+ self.config = nil
160
+ end
161
+
162
+ if attributes.key?(:'input')
163
+ if (value = attributes[:'input']).is_a?(Hash)
164
+ self.input = value
165
+ end
166
+ else
167
+ self.input = nil
168
+ end
169
+
170
+ if attributes.key?(:'output')
171
+ if (value = attributes[:'output']).is_a?(Hash)
172
+ self.output = value
173
+ end
174
+ else
175
+ self.output = nil
176
+ end
177
+
178
+ if attributes.key?(:'candidate_wizard_url')
179
+ self.candidate_wizard_url = attributes[:'candidate_wizard_url']
180
+ else
181
+ self.candidate_wizard_url = nil
182
+ end
183
+ end
184
+
185
+ # Show invalid properties with the reasons. Usually used together with valid?
186
+ # @return Array for valid properties with the reasons
187
+ def list_invalid_properties
188
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
189
+ invalid_properties = Array.new
190
+ if @id.nil?
191
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
192
+ end
193
+
194
+ if @check_type.nil?
195
+ invalid_properties.push('invalid value for "check_type", check_type cannot be nil.')
196
+ end
197
+
198
+ if @display_name.nil?
199
+ invalid_properties.push('invalid value for "display_name", display_name cannot be nil.')
200
+ end
201
+
202
+ if @status.nil?
203
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
204
+ end
205
+
206
+ if @config.nil?
207
+ invalid_properties.push('invalid value for "config", config cannot be nil.')
208
+ end
209
+
210
+ if @input.nil?
211
+ invalid_properties.push('invalid value for "input", input cannot be nil.')
212
+ end
213
+
214
+ if @output.nil?
215
+ invalid_properties.push('invalid value for "output", output cannot be nil.')
216
+ end
217
+
218
+ invalid_properties
219
+ end
220
+
221
+ # Check to see if the all the properties in the model are valid
222
+ # @return true if the model is valid
223
+ def valid?
224
+ warn '[DEPRECATED] the `valid?` method is obsolete'
225
+ return false if @id.nil?
226
+ return false if @check_type.nil?
227
+ check_type_validator = EnumAttributeValidator.new('String', ["addresscheck", "adversemediacheck", "bigcheck", "criminalrecordscheck", "criminalrecordsuploadcheck", "customintegritycheck", "cvcheck", "edrcheck", "focumcheck", "id2check", "idcheck", "integritycheck", "openhealthcarecheck", "permissioncheck", "pescheckadversemediacheck", "qualificationcheck", "righttoworkcheck", "vogcheck", "watchlist2check", "watchlistcheck", "workreferencecheck", "worldwidecreditcheck"])
228
+ return false unless check_type_validator.valid?(@check_type)
229
+ return false if @display_name.nil?
230
+ return false if @status.nil?
231
+ return false if @config.nil?
232
+ return false if @input.nil?
233
+ return false if @output.nil?
234
+ true
235
+ end
236
+
237
+ # Custom attribute writer method with validation
238
+ # @param [Object] id Value to be assigned
239
+ def id=(id)
240
+ if id.nil?
241
+ fail ArgumentError, 'id cannot be nil'
242
+ end
243
+
244
+ @id = id
245
+ end
246
+
247
+ # Custom attribute writer method checking allowed values (enum).
248
+ # @param [Object] check_type Object to be assigned
249
+ def check_type=(check_type)
250
+ validator = EnumAttributeValidator.new('String', ["addresscheck", "adversemediacheck", "bigcheck", "criminalrecordscheck", "criminalrecordsuploadcheck", "customintegritycheck", "cvcheck", "edrcheck", "focumcheck", "id2check", "idcheck", "integritycheck", "openhealthcarecheck", "permissioncheck", "pescheckadversemediacheck", "qualificationcheck", "righttoworkcheck", "vogcheck", "watchlist2check", "watchlistcheck", "workreferencecheck", "worldwidecreditcheck"])
251
+ unless validator.valid?(check_type)
252
+ fail ArgumentError, "invalid value for \"check_type\", must be one of #{validator.allowable_values}."
253
+ end
254
+ @check_type = check_type
255
+ end
256
+
257
+ # Custom attribute writer method with validation
258
+ # @param [Object] display_name Value to be assigned
259
+ def display_name=(display_name)
260
+ if display_name.nil?
261
+ fail ArgumentError, 'display_name cannot be nil'
262
+ end
263
+
264
+ @display_name = display_name
265
+ end
266
+
267
+ # Custom attribute writer method with validation
268
+ # @param [Object] status Value to be assigned
269
+ def status=(status)
270
+ if status.nil?
271
+ fail ArgumentError, 'status cannot be nil'
272
+ end
273
+
274
+ @status = status
275
+ end
276
+
277
+ # Custom attribute writer method with validation
278
+ # @param [Object] config Value to be assigned
279
+ def config=(config)
280
+ if config.nil?
281
+ fail ArgumentError, 'config cannot be nil'
282
+ end
283
+
284
+ @config = config
285
+ end
286
+
287
+ # Custom attribute writer method with validation
288
+ # @param [Object] input Value to be assigned
289
+ def input=(input)
290
+ if input.nil?
291
+ fail ArgumentError, 'input cannot be nil'
292
+ end
293
+
294
+ @input = input
295
+ end
296
+
297
+ # Custom attribute writer method with validation
298
+ # @param [Object] output Value to be assigned
299
+ def output=(output)
300
+ if output.nil?
301
+ fail ArgumentError, 'output cannot be nil'
302
+ end
303
+
304
+ @output = output
305
+ end
306
+
307
+ # Checks equality by comparing each attribute.
308
+ # @param [Object] Object to be compared
309
+ def ==(o)
310
+ return true if self.equal?(o)
311
+ self.class == o.class &&
312
+ id == o.id &&
313
+ profile_check_id == o.profile_check_id &&
314
+ check_type == o.check_type &&
315
+ display_name == o.display_name &&
316
+ status == o.status &&
317
+ config == o.config &&
318
+ input == o.input &&
319
+ output == o.output &&
320
+ candidate_wizard_url == o.candidate_wizard_url
321
+ end
322
+
323
+ # @see the `==` method
324
+ # @param [Object] Object to be compared
325
+ def eql?(o)
326
+ self == o
327
+ end
328
+
329
+ # Calculates hash code according to all attributes.
330
+ # @return [Integer] Hash code
331
+ def hash
332
+ [id, profile_check_id, check_type, display_name, status, config, input, output, candidate_wizard_url].hash
333
+ end
334
+
335
+ # Builds the object from hash
336
+ # @param [Hash] attributes Model attributes in the form of hash
337
+ # @return [Object] Returns the model itself
338
+ def self.build_from_hash(attributes)
339
+ return nil unless attributes.is_a?(Hash)
340
+ attributes = attributes.transform_keys(&:to_sym)
341
+ transformed_hash = {}
342
+ openapi_types.each_pair do |key, type|
343
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
344
+ transformed_hash["#{key}"] = nil
345
+ elsif type =~ /\AArray<(.*)>/i
346
+ # check to ensure the input is an array given that the attribute
347
+ # is documented as an array but the input is not
348
+ if attributes[attribute_map[key]].is_a?(Array)
349
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
350
+ end
351
+ elsif !attributes[attribute_map[key]].nil?
352
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
353
+ end
354
+ end
355
+ new(transformed_hash)
356
+ end
357
+
358
+ # Returns the object in the form of hash
359
+ # @return [Hash] Returns the object in the form of hash
360
+ def to_hash
361
+ hash = {}
362
+ self.class.attribute_map.each_pair do |attr, param|
363
+ value = self.send(attr)
364
+ if value.nil?
365
+ is_nullable = self.class.openapi_nullable.include?(attr)
366
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
367
+ end
368
+
369
+ hash[param] = _to_hash(value)
370
+ end
371
+ hash
372
+ end
373
+
374
+ end
375
+
376
+ end
@@ -0,0 +1,242 @@
1
+ =begin
2
+ #Pescheck API
3
+
4
+ #API for Pescheck ## Authentication This API supports three authentication methods: 1. **OAuth2** (recommended for API clients) - Use client credentials flow 2. **JWT Bearer** (for user-based access) - Obtain tokens via /api/jwt/ endpoint 3. **Cookie** (for browser-based access) - Session authentication via web login ## Quick Start for API Clients 1. Select your environment from the servers dropdown 2. Use OAuth2 with client credentials flow 3. Scopes are automatically included: read:api, create:api, update:api
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.23.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Pescheck
17
+ # Minimal check entry shape for screening list items. No config/input/etc.
18
+ class V2ScreeningCheckListItem < ApiModelBase
19
+ attr_accessor :id
20
+
21
+ # * `addresscheck` - addresscheck * `adversemediacheck` - adversemediacheck * `bigcheck` - bigcheck * `criminalrecordscheck` - criminalrecordscheck * `criminalrecordsuploadcheck` - criminalrecordsuploadcheck * `customintegritycheck` - customintegritycheck * `cvcheck` - cvcheck * `edrcheck` - edrcheck * `focumcheck` - focumcheck * `id2check` - id2check * `idcheck` - idcheck * `integritycheck` - integritycheck * `openhealthcarecheck` - openhealthcarecheck * `permissioncheck` - permissioncheck * `pescheckadversemediacheck` - pescheckadversemediacheck * `qualificationcheck` - qualificationcheck * `righttoworkcheck` - righttoworkcheck * `vogcheck` - vogcheck * `watchlist2check` - watchlist2check * `watchlistcheck` - watchlistcheck * `workreferencecheck` - workreferencecheck * `worldwidecreditcheck` - worldwidecreditcheck
22
+ attr_accessor :check_type
23
+
24
+ attr_accessor :status
25
+
26
+ class EnumAttributeValidator
27
+ attr_reader :datatype
28
+ attr_reader :allowable_values
29
+
30
+ def initialize(datatype, allowable_values)
31
+ @allowable_values = allowable_values.map do |value|
32
+ case datatype.to_s
33
+ when /Integer/i
34
+ value.to_i
35
+ when /Float/i
36
+ value.to_f
37
+ else
38
+ value
39
+ end
40
+ end
41
+ end
42
+
43
+ def valid?(value)
44
+ !value || allowable_values.include?(value)
45
+ end
46
+ end
47
+
48
+ # Attribute mapping from ruby-style variable name to JSON key.
49
+ def self.attribute_map
50
+ {
51
+ :'id' => :'id',
52
+ :'check_type' => :'check_type',
53
+ :'status' => :'status'
54
+ }
55
+ end
56
+
57
+ # Returns attribute mapping this model knows about
58
+ def self.acceptable_attribute_map
59
+ attribute_map
60
+ end
61
+
62
+ # Returns all the JSON keys this model knows about
63
+ def self.acceptable_attributes
64
+ acceptable_attribute_map.values
65
+ end
66
+
67
+ # Attribute type mapping.
68
+ def self.openapi_types
69
+ {
70
+ :'id' => :'String',
71
+ :'check_type' => :'String',
72
+ :'status' => :'String'
73
+ }
74
+ end
75
+
76
+ # List of attributes with nullable: true
77
+ def self.openapi_nullable
78
+ Set.new([
79
+ ])
80
+ end
81
+
82
+ # Initializes the object
83
+ # @param [Hash] attributes Model attributes in the form of hash
84
+ def initialize(attributes = {})
85
+ if (!attributes.is_a?(Hash))
86
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pescheck::V2ScreeningCheckListItem` initialize method"
87
+ end
88
+
89
+ # check to see if the attribute exists and convert string to symbol for hash key
90
+ acceptable_attribute_map = self.class.acceptable_attribute_map
91
+ attributes = attributes.each_with_object({}) { |(k, v), h|
92
+ if (!acceptable_attribute_map.key?(k.to_sym))
93
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pescheck::V2ScreeningCheckListItem`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
94
+ end
95
+ h[k.to_sym] = v
96
+ }
97
+
98
+ if attributes.key?(:'id')
99
+ self.id = attributes[:'id']
100
+ else
101
+ self.id = nil
102
+ end
103
+
104
+ if attributes.key?(:'check_type')
105
+ self.check_type = attributes[:'check_type']
106
+ else
107
+ self.check_type = nil
108
+ end
109
+
110
+ if attributes.key?(:'status')
111
+ self.status = attributes[:'status']
112
+ else
113
+ self.status = nil
114
+ end
115
+ end
116
+
117
+ # Show invalid properties with the reasons. Usually used together with valid?
118
+ # @return Array for valid properties with the reasons
119
+ def list_invalid_properties
120
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
121
+ invalid_properties = Array.new
122
+ if @id.nil?
123
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
124
+ end
125
+
126
+ if @check_type.nil?
127
+ invalid_properties.push('invalid value for "check_type", check_type cannot be nil.')
128
+ end
129
+
130
+ if @status.nil?
131
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
132
+ end
133
+
134
+ invalid_properties
135
+ end
136
+
137
+ # Check to see if the all the properties in the model are valid
138
+ # @return true if the model is valid
139
+ def valid?
140
+ warn '[DEPRECATED] the `valid?` method is obsolete'
141
+ return false if @id.nil?
142
+ return false if @check_type.nil?
143
+ check_type_validator = EnumAttributeValidator.new('String', ["addresscheck", "adversemediacheck", "bigcheck", "criminalrecordscheck", "criminalrecordsuploadcheck", "customintegritycheck", "cvcheck", "edrcheck", "focumcheck", "id2check", "idcheck", "integritycheck", "openhealthcarecheck", "permissioncheck", "pescheckadversemediacheck", "qualificationcheck", "righttoworkcheck", "vogcheck", "watchlist2check", "watchlistcheck", "workreferencecheck", "worldwidecreditcheck"])
144
+ return false unless check_type_validator.valid?(@check_type)
145
+ return false if @status.nil?
146
+ true
147
+ end
148
+
149
+ # Custom attribute writer method with validation
150
+ # @param [Object] id Value to be assigned
151
+ def id=(id)
152
+ if id.nil?
153
+ fail ArgumentError, 'id cannot be nil'
154
+ end
155
+
156
+ @id = id
157
+ end
158
+
159
+ # Custom attribute writer method checking allowed values (enum).
160
+ # @param [Object] check_type Object to be assigned
161
+ def check_type=(check_type)
162
+ validator = EnumAttributeValidator.new('String', ["addresscheck", "adversemediacheck", "bigcheck", "criminalrecordscheck", "criminalrecordsuploadcheck", "customintegritycheck", "cvcheck", "edrcheck", "focumcheck", "id2check", "idcheck", "integritycheck", "openhealthcarecheck", "permissioncheck", "pescheckadversemediacheck", "qualificationcheck", "righttoworkcheck", "vogcheck", "watchlist2check", "watchlistcheck", "workreferencecheck", "worldwidecreditcheck"])
163
+ unless validator.valid?(check_type)
164
+ fail ArgumentError, "invalid value for \"check_type\", must be one of #{validator.allowable_values}."
165
+ end
166
+ @check_type = check_type
167
+ end
168
+
169
+ # Custom attribute writer method with validation
170
+ # @param [Object] status Value to be assigned
171
+ def status=(status)
172
+ if status.nil?
173
+ fail ArgumentError, 'status cannot be nil'
174
+ end
175
+
176
+ @status = status
177
+ end
178
+
179
+ # Checks equality by comparing each attribute.
180
+ # @param [Object] Object to be compared
181
+ def ==(o)
182
+ return true if self.equal?(o)
183
+ self.class == o.class &&
184
+ id == o.id &&
185
+ check_type == o.check_type &&
186
+ status == o.status
187
+ end
188
+
189
+ # @see the `==` method
190
+ # @param [Object] Object to be compared
191
+ def eql?(o)
192
+ self == o
193
+ end
194
+
195
+ # Calculates hash code according to all attributes.
196
+ # @return [Integer] Hash code
197
+ def hash
198
+ [id, check_type, status].hash
199
+ end
200
+
201
+ # Builds the object from hash
202
+ # @param [Hash] attributes Model attributes in the form of hash
203
+ # @return [Object] Returns the model itself
204
+ def self.build_from_hash(attributes)
205
+ return nil unless attributes.is_a?(Hash)
206
+ attributes = attributes.transform_keys(&:to_sym)
207
+ transformed_hash = {}
208
+ openapi_types.each_pair do |key, type|
209
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
210
+ transformed_hash["#{key}"] = nil
211
+ elsif type =~ /\AArray<(.*)>/i
212
+ # check to ensure the input is an array given that the attribute
213
+ # is documented as an array but the input is not
214
+ if attributes[attribute_map[key]].is_a?(Array)
215
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
216
+ end
217
+ elsif !attributes[attribute_map[key]].nil?
218
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
219
+ end
220
+ end
221
+ new(transformed_hash)
222
+ end
223
+
224
+ # Returns the object in the form of hash
225
+ # @return [Hash] Returns the object in the form of hash
226
+ def to_hash
227
+ hash = {}
228
+ self.class.attribute_map.each_pair do |attr, param|
229
+ value = self.send(attr)
230
+ if value.nil?
231
+ is_nullable = self.class.openapi_nullable.include?(attr)
232
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
233
+ end
234
+
235
+ hash[param] = _to_hash(value)
236
+ end
237
+ hash
238
+ end
239
+
240
+ end
241
+
242
+ end