pescheck-client 0.4.2 → 0.5.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.
- checksums.yaml +4 -4
- data/README.md +54 -45
- data/docs/AddOnsApi.md +305 -0
- data/docs/AddonPrice.md +20 -0
- data/docs/AuthenticationApi.md +1 -71
- data/docs/DisabledDivision.md +20 -0
- data/docs/OAuthApplication.md +1 -1
- data/docs/OAuthApplicationResponse.md +6 -2
- data/docs/OrganisationAddon.md +32 -0
- data/docs/OrganisationAddonUpdate.md +18 -0
- data/docs/OrganisationAddonUpdateResult.md +34 -0
- data/docs/PatchedOrganisationAddonUpdate.md +18 -0
- data/docs/ScreeningsApi.md +72 -0
- data/docs/V2Candidate.md +1 -1
- data/docs/V2CheckField.md +1 -1
- data/docs/V2Document.md +1 -1
- data/docs/V2ProfileCheck.md +1 -1
- data/docs/V2ProfileCheckEntry.md +1 -1
- data/docs/V2ProfileDetail.md +4 -0
- data/docs/V2ProfileUpdateCheck.md +1 -1
- data/docs/V2ScreeningCheck.md +1 -1
- data/docs/V2ScreeningCheckEntry.md +1 -1
- data/docs/V2ScreeningCheckListItem.md +1 -1
- data/docs/V2ScreeningCreate.md +5 -1
- data/docs/V2ScreeningDetail.md +5 -1
- data/docs/{V2ScreeningDetailProfile.md → V2ScreeningDetailOrganisation.md} +2 -2
- data/docs/V2ScreeningListItem.md +3 -1
- data/docs/V2ScreeningNote.md +24 -0
- data/docs/V2ScreeningNoteInput.md +22 -0
- data/docs/WebhooksApi.md +1 -1
- data/lib/pescheck-client/api/add_ons_api.rb +305 -0
- data/lib/pescheck-client/api/authentication_api.rb +2 -68
- data/lib/pescheck-client/api/profiles_api.rb +1 -1
- data/lib/pescheck-client/api/screenings_api.rb +66 -0
- data/lib/pescheck-client/api/webhooks_api.rb +2 -2
- data/lib/pescheck-client/configuration.rb +8 -0
- data/lib/pescheck-client/models/addon_price.rb +202 -0
- data/lib/pescheck-client/models/{custom_token_obtain_pair.rb → disabled_division.rb} +34 -35
- data/lib/pescheck-client/models/o_auth_application.rb +3 -3
- data/lib/pescheck-client/models/o_auth_application_response.rb +70 -44
- data/lib/pescheck-client/models/organisation_addon.rb +339 -0
- data/lib/pescheck-client/models/organisation_addon_update.rb +165 -0
- data/lib/pescheck-client/models/organisation_addon_update_result.rb +368 -0
- data/lib/pescheck-client/models/patched_organisation_addon_update.rb +148 -0
- data/lib/pescheck-client/models/v2_candidate.rb +1 -35
- data/lib/pescheck-client/models/v2_check_field.rb +2 -2
- data/lib/pescheck-client/models/v2_document.rb +6 -30
- data/lib/pescheck-client/models/v2_profile_check.rb +3 -3
- data/lib/pescheck-client/models/v2_profile_check_entry.rb +6 -30
- data/lib/pescheck-client/models/v2_profile_detail.rb +55 -1
- data/lib/pescheck-client/models/v2_profile_update_check.rb +3 -3
- data/lib/pescheck-client/models/v2_screening_check.rb +3 -3
- data/lib/pescheck-client/models/v2_screening_check_entry.rb +6 -30
- data/lib/pescheck-client/models/v2_screening_check_list_item.rb +6 -30
- data/lib/pescheck-client/models/v2_screening_create.rb +25 -4
- data/lib/pescheck-client/models/v2_screening_detail.rb +42 -2
- data/lib/pescheck-client/models/{v2_screening_detail_profile.rb → v2_screening_detail_organisation.rb} +4 -3
- data/lib/pescheck-client/models/v2_screening_list_item.rb +14 -2
- data/lib/pescheck-client/models/v2_screening_note.rb +229 -0
- data/lib/pescheck-client/models/v2_screening_note_input.rb +220 -0
- data/lib/pescheck-client/models/webhook_response.rb +5 -5
- data/lib/pescheck-client/version.rb +1 -1
- data/lib/pescheck-client.rb +10 -2
- data/spec/api/add_ons_api_spec.rb +84 -0
- data/spec/api/authentication_api_spec.rb +1 -12
- data/spec/api/screenings_api_spec.rb +13 -0
- data/spec/api/webhooks_api_spec.rb +1 -1
- data/spec/models/{custom_token_obtain_pair_spec.rb → addon_price_spec.rb} +8 -8
- data/spec/models/disabled_division_spec.rb +42 -0
- data/spec/models/o_auth_application_response_spec.rb +12 -8
- data/spec/models/o_auth_application_spec.rb +1 -1
- data/spec/models/organisation_addon_spec.rb +78 -0
- data/spec/models/organisation_addon_update_result_spec.rb +84 -0
- data/spec/models/organisation_addon_update_spec.rb +36 -0
- data/spec/models/patched_organisation_addon_update_spec.rb +36 -0
- data/spec/models/v2_candidate_spec.rb +0 -4
- data/spec/models/v2_document_spec.rb +0 -4
- data/spec/models/v2_profile_check_entry_spec.rb +0 -4
- data/spec/models/v2_profile_check_spec.rb +1 -1
- data/spec/models/v2_profile_detail_spec.rb +12 -0
- data/spec/models/v2_profile_update_check_spec.rb +1 -1
- data/spec/models/v2_screening_check_entry_spec.rb +0 -4
- data/spec/models/v2_screening_check_list_item_spec.rb +0 -4
- data/spec/models/v2_screening_check_spec.rb +1 -1
- data/spec/models/v2_screening_create_spec.rb +12 -0
- data/spec/models/{v2_screening_detail_profile_spec.rb → v2_screening_detail_organisation_spec.rb} +6 -6
- data/spec/models/v2_screening_detail_spec.rb +12 -0
- data/spec/models/v2_screening_list_item_spec.rb +6 -0
- data/spec/models/v2_screening_note_input_spec.rb +52 -0
- data/spec/models/v2_screening_note_spec.rb +54 -0
- metadata +71 -39
- data/docs/CustomTokenObtainPair.md +0 -20
|
@@ -18,7 +18,7 @@ module Pescheck
|
|
|
18
18
|
class V2Document < ApiModelBase
|
|
19
19
|
attr_accessor :check_id
|
|
20
20
|
|
|
21
|
-
# * `addresscheck` - addresscheck * `adversemediacheck` - adversemediacheck * `bigcheck` - bigcheck * `criminalrecordscheck` - criminalrecordscheck * `criminalrecordsuploadcheck` - criminalrecordsuploadcheck * `customintegritycheck` - customintegritycheck * `cvcheck` - cvcheck * `edrcheck` - edrcheck * `
|
|
21
|
+
# * `addresscheck` - addresscheck * `adversemedia2check` - adversemedia2check * `adversemediacheck` - adversemediacheck * `bigcheck` - bigcheck * `criminalrecordscheck` - criminalrecordscheck * `criminalrecordsuploadcheck` - criminalrecordsuploadcheck * `customintegritycheck` - customintegritycheck * `cvcheck` - cvcheck * `edrcheck` - edrcheck * `ibancheck` - ibancheck * `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 Known values: addresscheck, adversemedia2check, adversemediacheck, bigcheck, criminalrecordscheck, criminalrecordsuploadcheck, customintegritycheck, cvcheck, edrcheck, ibancheck, id2check, idcheck, integritycheck, openhealthcarecheck, permissioncheck, pescheckadversemediacheck, qualificationcheck, righttoworkcheck, vogcheck, watchlist2check, watchlistcheck, workreferencecheck, worldwidecreditcheck. New values may be added; handle unknown values.
|
|
22
22
|
attr_accessor :check_type
|
|
23
23
|
|
|
24
24
|
attr_accessor :filename
|
|
@@ -29,28 +29,6 @@ module Pescheck
|
|
|
29
29
|
|
|
30
30
|
attr_accessor :metadata
|
|
31
31
|
|
|
32
|
-
class EnumAttributeValidator
|
|
33
|
-
attr_reader :datatype
|
|
34
|
-
attr_reader :allowable_values
|
|
35
|
-
|
|
36
|
-
def initialize(datatype, allowable_values)
|
|
37
|
-
@allowable_values = allowable_values.map do |value|
|
|
38
|
-
case datatype.to_s
|
|
39
|
-
when /Integer/i
|
|
40
|
-
value.to_i
|
|
41
|
-
when /Float/i
|
|
42
|
-
value.to_f
|
|
43
|
-
else
|
|
44
|
-
value
|
|
45
|
-
end
|
|
46
|
-
end
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
def valid?(value)
|
|
50
|
-
!value || allowable_values.include?(value)
|
|
51
|
-
end
|
|
52
|
-
end
|
|
53
|
-
|
|
54
32
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
55
33
|
def self.attribute_map
|
|
56
34
|
{
|
|
@@ -180,8 +158,6 @@ module Pescheck
|
|
|
180
158
|
def valid?
|
|
181
159
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
182
160
|
return false if @check_type.nil?
|
|
183
|
-
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"])
|
|
184
|
-
return false unless check_type_validator.valid?(@check_type)
|
|
185
161
|
return false if @filename.nil?
|
|
186
162
|
return false if @extension.nil?
|
|
187
163
|
return false if @content.nil?
|
|
@@ -189,13 +165,13 @@ module Pescheck
|
|
|
189
165
|
true
|
|
190
166
|
end
|
|
191
167
|
|
|
192
|
-
# Custom attribute writer method
|
|
193
|
-
# @param [Object] check_type
|
|
168
|
+
# Custom attribute writer method with validation
|
|
169
|
+
# @param [Object] check_type Value to be assigned
|
|
194
170
|
def check_type=(check_type)
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
fail ArgumentError, "invalid value for \"check_type\", must be one of #{validator.allowable_values}."
|
|
171
|
+
if check_type.nil?
|
|
172
|
+
fail ArgumentError, 'check_type cannot be nil'
|
|
198
173
|
end
|
|
174
|
+
|
|
199
175
|
@check_type = check_type
|
|
200
176
|
end
|
|
201
177
|
|
|
@@ -16,7 +16,7 @@ require 'time'
|
|
|
16
16
|
module Pescheck
|
|
17
17
|
# Input serializer for one `{check_type, config}` profile-check entry. Used by profile create directly. Subclass with `PARTIAL_CONFIG = True` for screening overrides where only the fields actually being changed should be validated.
|
|
18
18
|
class V2ProfileCheck < ApiModelBase
|
|
19
|
-
# * `addresscheck` - addresscheck * `
|
|
19
|
+
# * `addresscheck` - addresscheck * `adversemedia2check` - adversemedia2check * `bigcheck` - bigcheck * `criminalrecordscheck` - criminalrecordscheck * `criminalrecordsuploadcheck` - criminalrecordsuploadcheck * `customintegritycheck` - customintegritycheck * `cvcheck` - cvcheck * `edrcheck` - edrcheck * `ibancheck` - ibancheck * `id2check` - id2check * `integritycheck` - integritycheck * `openhealthcarecheck` - openhealthcarecheck * `qualificationcheck` - qualificationcheck * `righttoworkcheck` - righttoworkcheck * `vogcheck` - vogcheck * `watchlist2check` - watchlist2check * `watchlistcheck` - watchlistcheck * `workreferencecheck` - workreferencecheck * `worldwidecreditcheck` - worldwidecreditcheck
|
|
20
20
|
attr_accessor :check_type
|
|
21
21
|
|
|
22
22
|
attr_accessor :config
|
|
@@ -121,7 +121,7 @@ module Pescheck
|
|
|
121
121
|
def valid?
|
|
122
122
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
123
123
|
return false if @check_type.nil?
|
|
124
|
-
check_type_validator = EnumAttributeValidator.new('String', ["addresscheck", "
|
|
124
|
+
check_type_validator = EnumAttributeValidator.new('String', ["addresscheck", "adversemedia2check", "bigcheck", "criminalrecordscheck", "criminalrecordsuploadcheck", "customintegritycheck", "cvcheck", "edrcheck", "ibancheck", "id2check", "integritycheck", "openhealthcarecheck", "qualificationcheck", "righttoworkcheck", "vogcheck", "watchlist2check", "watchlistcheck", "workreferencecheck", "worldwidecreditcheck"])
|
|
125
125
|
return false unless check_type_validator.valid?(@check_type)
|
|
126
126
|
true
|
|
127
127
|
end
|
|
@@ -129,7 +129,7 @@ module Pescheck
|
|
|
129
129
|
# Custom attribute writer method checking allowed values (enum).
|
|
130
130
|
# @param [Object] check_type Object to be assigned
|
|
131
131
|
def check_type=(check_type)
|
|
132
|
-
validator = EnumAttributeValidator.new('String', ["addresscheck", "
|
|
132
|
+
validator = EnumAttributeValidator.new('String', ["addresscheck", "adversemedia2check", "bigcheck", "criminalrecordscheck", "criminalrecordsuploadcheck", "customintegritycheck", "cvcheck", "edrcheck", "ibancheck", "id2check", "integritycheck", "openhealthcarecheck", "qualificationcheck", "righttoworkcheck", "vogcheck", "watchlist2check", "watchlistcheck", "workreferencecheck", "worldwidecreditcheck"])
|
|
133
133
|
unless validator.valid?(check_type)
|
|
134
134
|
fail ArgumentError, "invalid value for \"check_type\", must be one of #{validator.allowable_values}."
|
|
135
135
|
end
|
|
@@ -17,7 +17,7 @@ module Pescheck
|
|
|
17
17
|
class V2ProfileCheckEntry < ApiModelBase
|
|
18
18
|
attr_accessor :id
|
|
19
19
|
|
|
20
|
-
# * `addresscheck` - addresscheck * `adversemediacheck` - adversemediacheck * `bigcheck` - bigcheck * `criminalrecordscheck` - criminalrecordscheck * `criminalrecordsuploadcheck` - criminalrecordsuploadcheck * `customintegritycheck` - customintegritycheck * `cvcheck` - cvcheck * `edrcheck` - edrcheck * `
|
|
20
|
+
# * `addresscheck` - addresscheck * `adversemedia2check` - adversemedia2check * `adversemediacheck` - adversemediacheck * `bigcheck` - bigcheck * `criminalrecordscheck` - criminalrecordscheck * `criminalrecordsuploadcheck` - criminalrecordsuploadcheck * `customintegritycheck` - customintegritycheck * `cvcheck` - cvcheck * `edrcheck` - edrcheck * `ibancheck` - ibancheck * `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 Known values: addresscheck, adversemedia2check, adversemediacheck, bigcheck, criminalrecordscheck, criminalrecordsuploadcheck, customintegritycheck, cvcheck, edrcheck, ibancheck, id2check, idcheck, integritycheck, openhealthcarecheck, permissioncheck, pescheckadversemediacheck, qualificationcheck, righttoworkcheck, vogcheck, watchlist2check, watchlistcheck, workreferencecheck, worldwidecreditcheck. New values may be added; handle unknown values.
|
|
21
21
|
attr_accessor :check_type
|
|
22
22
|
|
|
23
23
|
attr_accessor :display_name
|
|
@@ -30,28 +30,6 @@ module Pescheck
|
|
|
30
30
|
|
|
31
31
|
attr_accessor :is_system_managed
|
|
32
32
|
|
|
33
|
-
class EnumAttributeValidator
|
|
34
|
-
attr_reader :datatype
|
|
35
|
-
attr_reader :allowable_values
|
|
36
|
-
|
|
37
|
-
def initialize(datatype, allowable_values)
|
|
38
|
-
@allowable_values = allowable_values.map do |value|
|
|
39
|
-
case datatype.to_s
|
|
40
|
-
when /Integer/i
|
|
41
|
-
value.to_i
|
|
42
|
-
when /Float/i
|
|
43
|
-
value.to_f
|
|
44
|
-
else
|
|
45
|
-
value
|
|
46
|
-
end
|
|
47
|
-
end
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
def valid?(value)
|
|
51
|
-
!value || allowable_values.include?(value)
|
|
52
|
-
end
|
|
53
|
-
end
|
|
54
|
-
|
|
55
33
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
56
34
|
def self.attribute_map
|
|
57
35
|
{
|
|
@@ -195,8 +173,6 @@ module Pescheck
|
|
|
195
173
|
def valid?
|
|
196
174
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
197
175
|
return false if @check_type.nil?
|
|
198
|
-
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"])
|
|
199
|
-
return false unless check_type_validator.valid?(@check_type)
|
|
200
176
|
return false if @display_name.nil?
|
|
201
177
|
return false if @configured_price.nil?
|
|
202
178
|
return false if @config.nil?
|
|
@@ -205,13 +181,13 @@ module Pescheck
|
|
|
205
181
|
true
|
|
206
182
|
end
|
|
207
183
|
|
|
208
|
-
# Custom attribute writer method
|
|
209
|
-
# @param [Object] check_type
|
|
184
|
+
# Custom attribute writer method with validation
|
|
185
|
+
# @param [Object] check_type Value to be assigned
|
|
210
186
|
def check_type=(check_type)
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
fail ArgumentError, "invalid value for \"check_type\", must be one of #{validator.allowable_values}."
|
|
187
|
+
if check_type.nil?
|
|
188
|
+
fail ArgumentError, 'check_type cannot be nil'
|
|
214
189
|
end
|
|
190
|
+
|
|
215
191
|
@check_type = check_type
|
|
216
192
|
end
|
|
217
193
|
|
|
@@ -33,6 +33,10 @@ module Pescheck
|
|
|
33
33
|
|
|
34
34
|
attr_accessor :candidate_fields
|
|
35
35
|
|
|
36
|
+
attr_accessor :creates_as_draft
|
|
37
|
+
|
|
38
|
+
attr_accessor :draft_reasons
|
|
39
|
+
|
|
36
40
|
attr_accessor :created_at
|
|
37
41
|
|
|
38
42
|
attr_accessor :updated_at
|
|
@@ -49,6 +53,8 @@ module Pescheck
|
|
|
49
53
|
:'supported_countries_of_work' => :'supported_countries_of_work',
|
|
50
54
|
:'supported_countries_of_residence' => :'supported_countries_of_residence',
|
|
51
55
|
:'candidate_fields' => :'candidate_fields',
|
|
56
|
+
:'creates_as_draft' => :'creates_as_draft',
|
|
57
|
+
:'draft_reasons' => :'draft_reasons',
|
|
52
58
|
:'created_at' => :'created_at',
|
|
53
59
|
:'updated_at' => :'updated_at'
|
|
54
60
|
}
|
|
@@ -76,6 +82,8 @@ module Pescheck
|
|
|
76
82
|
:'supported_countries_of_work' => :'Array<String>',
|
|
77
83
|
:'supported_countries_of_residence' => :'Array<String>',
|
|
78
84
|
:'candidate_fields' => :'Array<Object>',
|
|
85
|
+
:'creates_as_draft' => :'Boolean',
|
|
86
|
+
:'draft_reasons' => :'Array<String>',
|
|
79
87
|
:'created_at' => :'Time',
|
|
80
88
|
:'updated_at' => :'Time'
|
|
81
89
|
}
|
|
@@ -164,6 +172,20 @@ module Pescheck
|
|
|
164
172
|
self.candidate_fields = nil
|
|
165
173
|
end
|
|
166
174
|
|
|
175
|
+
if attributes.key?(:'creates_as_draft')
|
|
176
|
+
self.creates_as_draft = attributes[:'creates_as_draft']
|
|
177
|
+
else
|
|
178
|
+
self.creates_as_draft = nil
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
if attributes.key?(:'draft_reasons')
|
|
182
|
+
if (value = attributes[:'draft_reasons']).is_a?(Array)
|
|
183
|
+
self.draft_reasons = value
|
|
184
|
+
end
|
|
185
|
+
else
|
|
186
|
+
self.draft_reasons = nil
|
|
187
|
+
end
|
|
188
|
+
|
|
167
189
|
if attributes.key?(:'created_at')
|
|
168
190
|
self.created_at = attributes[:'created_at']
|
|
169
191
|
else
|
|
@@ -210,6 +232,14 @@ module Pescheck
|
|
|
210
232
|
invalid_properties.push('invalid value for "candidate_fields", candidate_fields cannot be nil.')
|
|
211
233
|
end
|
|
212
234
|
|
|
235
|
+
if @creates_as_draft.nil?
|
|
236
|
+
invalid_properties.push('invalid value for "creates_as_draft", creates_as_draft cannot be nil.')
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
if @draft_reasons.nil?
|
|
240
|
+
invalid_properties.push('invalid value for "draft_reasons", draft_reasons cannot be nil.')
|
|
241
|
+
end
|
|
242
|
+
|
|
213
243
|
if @created_at.nil?
|
|
214
244
|
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
215
245
|
end
|
|
@@ -232,6 +262,8 @@ module Pescheck
|
|
|
232
262
|
return false if @supported_countries_of_work.nil?
|
|
233
263
|
return false if @supported_countries_of_residence.nil?
|
|
234
264
|
return false if @candidate_fields.nil?
|
|
265
|
+
return false if @creates_as_draft.nil?
|
|
266
|
+
return false if @draft_reasons.nil?
|
|
235
267
|
return false if @created_at.nil?
|
|
236
268
|
return false if @updated_at.nil?
|
|
237
269
|
true
|
|
@@ -307,6 +339,26 @@ module Pescheck
|
|
|
307
339
|
@candidate_fields = candidate_fields
|
|
308
340
|
end
|
|
309
341
|
|
|
342
|
+
# Custom attribute writer method with validation
|
|
343
|
+
# @param [Object] creates_as_draft Value to be assigned
|
|
344
|
+
def creates_as_draft=(creates_as_draft)
|
|
345
|
+
if creates_as_draft.nil?
|
|
346
|
+
fail ArgumentError, 'creates_as_draft cannot be nil'
|
|
347
|
+
end
|
|
348
|
+
|
|
349
|
+
@creates_as_draft = creates_as_draft
|
|
350
|
+
end
|
|
351
|
+
|
|
352
|
+
# Custom attribute writer method with validation
|
|
353
|
+
# @param [Object] draft_reasons Value to be assigned
|
|
354
|
+
def draft_reasons=(draft_reasons)
|
|
355
|
+
if draft_reasons.nil?
|
|
356
|
+
fail ArgumentError, 'draft_reasons cannot be nil'
|
|
357
|
+
end
|
|
358
|
+
|
|
359
|
+
@draft_reasons = draft_reasons
|
|
360
|
+
end
|
|
361
|
+
|
|
310
362
|
# Custom attribute writer method with validation
|
|
311
363
|
# @param [Object] created_at Value to be assigned
|
|
312
364
|
def created_at=(created_at)
|
|
@@ -341,6 +393,8 @@ module Pescheck
|
|
|
341
393
|
supported_countries_of_work == o.supported_countries_of_work &&
|
|
342
394
|
supported_countries_of_residence == o.supported_countries_of_residence &&
|
|
343
395
|
candidate_fields == o.candidate_fields &&
|
|
396
|
+
creates_as_draft == o.creates_as_draft &&
|
|
397
|
+
draft_reasons == o.draft_reasons &&
|
|
344
398
|
created_at == o.created_at &&
|
|
345
399
|
updated_at == o.updated_at
|
|
346
400
|
end
|
|
@@ -354,7 +408,7 @@ module Pescheck
|
|
|
354
408
|
# Calculates hash code according to all attributes.
|
|
355
409
|
# @return [Integer] Hash code
|
|
356
410
|
def hash
|
|
357
|
-
[id, name, description, is_custom, checks, total_price, supported_countries_of_work, supported_countries_of_residence, candidate_fields, created_at, updated_at].hash
|
|
411
|
+
[id, name, description, is_custom, checks, total_price, supported_countries_of_work, supported_countries_of_residence, candidate_fields, creates_as_draft, draft_reasons, created_at, updated_at].hash
|
|
358
412
|
end
|
|
359
413
|
|
|
360
414
|
# Builds the object from hash
|
|
@@ -16,7 +16,7 @@ require 'time'
|
|
|
16
16
|
module Pescheck
|
|
17
17
|
# Profile update entry. Same shape as create plus optional profile_check_id for in-place update of an existing check. Absent profile_check_id = add new.
|
|
18
18
|
class V2ProfileUpdateCheck < ApiModelBase
|
|
19
|
-
# * `addresscheck` - addresscheck * `adversemediacheck` - adversemediacheck * `bigcheck` - bigcheck * `criminalrecordscheck` - criminalrecordscheck * `criminalrecordsuploadcheck` - criminalrecordsuploadcheck * `customintegritycheck` - customintegritycheck * `cvcheck` - cvcheck * `edrcheck` - edrcheck * `
|
|
19
|
+
# * `addresscheck` - addresscheck * `adversemedia2check` - adversemedia2check * `adversemediacheck` - adversemediacheck * `bigcheck` - bigcheck * `criminalrecordscheck` - criminalrecordscheck * `criminalrecordsuploadcheck` - criminalrecordsuploadcheck * `customintegritycheck` - customintegritycheck * `cvcheck` - cvcheck * `edrcheck` - edrcheck * `ibancheck` - ibancheck * `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
|
|
20
20
|
attr_accessor :check_type
|
|
21
21
|
|
|
22
22
|
attr_accessor :config
|
|
@@ -129,7 +129,7 @@ module Pescheck
|
|
|
129
129
|
def valid?
|
|
130
130
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
131
131
|
return false if @check_type.nil?
|
|
132
|
-
check_type_validator = EnumAttributeValidator.new('String', ["addresscheck", "adversemediacheck", "bigcheck", "criminalrecordscheck", "criminalrecordsuploadcheck", "customintegritycheck", "cvcheck", "edrcheck", "
|
|
132
|
+
check_type_validator = EnumAttributeValidator.new('String', ["addresscheck", "adversemedia2check", "adversemediacheck", "bigcheck", "criminalrecordscheck", "criminalrecordsuploadcheck", "customintegritycheck", "cvcheck", "edrcheck", "ibancheck", "id2check", "idcheck", "integritycheck", "openhealthcarecheck", "permissioncheck", "pescheckadversemediacheck", "qualificationcheck", "righttoworkcheck", "vogcheck", "watchlist2check", "watchlistcheck", "workreferencecheck", "worldwidecreditcheck"])
|
|
133
133
|
return false unless check_type_validator.valid?(@check_type)
|
|
134
134
|
true
|
|
135
135
|
end
|
|
@@ -137,7 +137,7 @@ module Pescheck
|
|
|
137
137
|
# Custom attribute writer method checking allowed values (enum).
|
|
138
138
|
# @param [Object] check_type Object to be assigned
|
|
139
139
|
def check_type=(check_type)
|
|
140
|
-
validator = EnumAttributeValidator.new('String', ["addresscheck", "adversemediacheck", "bigcheck", "criminalrecordscheck", "criminalrecordsuploadcheck", "customintegritycheck", "cvcheck", "edrcheck", "
|
|
140
|
+
validator = EnumAttributeValidator.new('String', ["addresscheck", "adversemedia2check", "adversemediacheck", "bigcheck", "criminalrecordscheck", "criminalrecordsuploadcheck", "customintegritycheck", "cvcheck", "edrcheck", "ibancheck", "id2check", "idcheck", "integritycheck", "openhealthcarecheck", "permissioncheck", "pescheckadversemediacheck", "qualificationcheck", "righttoworkcheck", "vogcheck", "watchlist2check", "watchlistcheck", "workreferencecheck", "worldwidecreditcheck"])
|
|
141
141
|
unless validator.valid?(check_type)
|
|
142
142
|
fail ArgumentError, "invalid value for \"check_type\", must be one of #{validator.allowable_values}."
|
|
143
143
|
end
|
|
@@ -16,7 +16,7 @@ require 'time'
|
|
|
16
16
|
module Pescheck
|
|
17
17
|
# Per-screening entry: identifies a target ProfileCheck (by check_type when unambiguous, or via profile_check_id when the profile has multiple ProfileChecks of the same type) and supplies optional `config` patch + per-check `input`.
|
|
18
18
|
class V2ScreeningCheck < ApiModelBase
|
|
19
|
-
# * `addresscheck` - addresscheck * `
|
|
19
|
+
# * `addresscheck` - addresscheck * `adversemedia2check` - adversemedia2check * `bigcheck` - bigcheck * `criminalrecordscheck` - criminalrecordscheck * `criminalrecordsuploadcheck` - criminalrecordsuploadcheck * `customintegritycheck` - customintegritycheck * `cvcheck` - cvcheck * `edrcheck` - edrcheck * `ibancheck` - ibancheck * `id2check` - id2check * `integritycheck` - integritycheck * `openhealthcarecheck` - openhealthcarecheck * `qualificationcheck` - qualificationcheck * `righttoworkcheck` - righttoworkcheck * `vogcheck` - vogcheck * `watchlist2check` - watchlist2check * `watchlistcheck` - watchlistcheck * `workreferencecheck` - workreferencecheck * `worldwidecreditcheck` - worldwidecreditcheck
|
|
20
20
|
attr_accessor :check_type
|
|
21
21
|
|
|
22
22
|
attr_accessor :config
|
|
@@ -139,7 +139,7 @@ module Pescheck
|
|
|
139
139
|
def valid?
|
|
140
140
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
141
141
|
return false if @check_type.nil?
|
|
142
|
-
check_type_validator = EnumAttributeValidator.new('String', ["addresscheck", "
|
|
142
|
+
check_type_validator = EnumAttributeValidator.new('String', ["addresscheck", "adversemedia2check", "bigcheck", "criminalrecordscheck", "criminalrecordsuploadcheck", "customintegritycheck", "cvcheck", "edrcheck", "ibancheck", "id2check", "integritycheck", "openhealthcarecheck", "qualificationcheck", "righttoworkcheck", "vogcheck", "watchlist2check", "watchlistcheck", "workreferencecheck", "worldwidecreditcheck"])
|
|
143
143
|
return false unless check_type_validator.valid?(@check_type)
|
|
144
144
|
true
|
|
145
145
|
end
|
|
@@ -147,7 +147,7 @@ module Pescheck
|
|
|
147
147
|
# Custom attribute writer method checking allowed values (enum).
|
|
148
148
|
# @param [Object] check_type Object to be assigned
|
|
149
149
|
def check_type=(check_type)
|
|
150
|
-
validator = EnumAttributeValidator.new('String', ["addresscheck", "
|
|
150
|
+
validator = EnumAttributeValidator.new('String', ["addresscheck", "adversemedia2check", "bigcheck", "criminalrecordscheck", "criminalrecordsuploadcheck", "customintegritycheck", "cvcheck", "edrcheck", "ibancheck", "id2check", "integritycheck", "openhealthcarecheck", "qualificationcheck", "righttoworkcheck", "vogcheck", "watchlist2check", "watchlistcheck", "workreferencecheck", "worldwidecreditcheck"])
|
|
151
151
|
unless validator.valid?(check_type)
|
|
152
152
|
fail ArgumentError, "invalid value for \"check_type\", must be one of #{validator.allowable_values}."
|
|
153
153
|
end
|
|
@@ -19,7 +19,7 @@ module Pescheck
|
|
|
19
19
|
|
|
20
20
|
attr_accessor :profile_check_id
|
|
21
21
|
|
|
22
|
-
# * `addresscheck` - addresscheck * `adversemediacheck` - adversemediacheck * `bigcheck` - bigcheck * `criminalrecordscheck` - criminalrecordscheck * `criminalrecordsuploadcheck` - criminalrecordsuploadcheck * `customintegritycheck` - customintegritycheck * `cvcheck` - cvcheck * `edrcheck` - edrcheck * `
|
|
22
|
+
# * `addresscheck` - addresscheck * `adversemedia2check` - adversemedia2check * `adversemediacheck` - adversemediacheck * `bigcheck` - bigcheck * `criminalrecordscheck` - criminalrecordscheck * `criminalrecordsuploadcheck` - criminalrecordsuploadcheck * `customintegritycheck` - customintegritycheck * `cvcheck` - cvcheck * `edrcheck` - edrcheck * `ibancheck` - ibancheck * `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 Known values: addresscheck, adversemedia2check, adversemediacheck, bigcheck, criminalrecordscheck, criminalrecordsuploadcheck, customintegritycheck, cvcheck, edrcheck, ibancheck, id2check, idcheck, integritycheck, openhealthcarecheck, permissioncheck, pescheckadversemediacheck, qualificationcheck, righttoworkcheck, vogcheck, watchlist2check, watchlistcheck, workreferencecheck, worldwidecreditcheck. New values may be added; handle unknown values.
|
|
23
23
|
attr_accessor :check_type
|
|
24
24
|
|
|
25
25
|
attr_accessor :display_name
|
|
@@ -35,28 +35,6 @@ module Pescheck
|
|
|
35
35
|
# Deep link to this check's candidate wizard step. Null when the check has no dedicated candidate step.
|
|
36
36
|
attr_accessor :candidate_wizard_url
|
|
37
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
38
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
61
39
|
def self.attribute_map
|
|
62
40
|
{
|
|
@@ -224,8 +202,6 @@ module Pescheck
|
|
|
224
202
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
225
203
|
return false if @id.nil?
|
|
226
204
|
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
205
|
return false if @display_name.nil?
|
|
230
206
|
return false if @status.nil?
|
|
231
207
|
return false if @config.nil?
|
|
@@ -244,13 +220,13 @@ module Pescheck
|
|
|
244
220
|
@id = id
|
|
245
221
|
end
|
|
246
222
|
|
|
247
|
-
# Custom attribute writer method
|
|
248
|
-
# @param [Object] check_type
|
|
223
|
+
# Custom attribute writer method with validation
|
|
224
|
+
# @param [Object] check_type Value to be assigned
|
|
249
225
|
def check_type=(check_type)
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
fail ArgumentError, "invalid value for \"check_type\", must be one of #{validator.allowable_values}."
|
|
226
|
+
if check_type.nil?
|
|
227
|
+
fail ArgumentError, 'check_type cannot be nil'
|
|
253
228
|
end
|
|
229
|
+
|
|
254
230
|
@check_type = check_type
|
|
255
231
|
end
|
|
256
232
|
|
|
@@ -18,33 +18,11 @@ module Pescheck
|
|
|
18
18
|
class V2ScreeningCheckListItem < ApiModelBase
|
|
19
19
|
attr_accessor :id
|
|
20
20
|
|
|
21
|
-
# * `addresscheck` - addresscheck * `adversemediacheck` - adversemediacheck * `bigcheck` - bigcheck * `criminalrecordscheck` - criminalrecordscheck * `criminalrecordsuploadcheck` - criminalrecordsuploadcheck * `customintegritycheck` - customintegritycheck * `cvcheck` - cvcheck * `edrcheck` - edrcheck * `
|
|
21
|
+
# * `addresscheck` - addresscheck * `adversemedia2check` - adversemedia2check * `adversemediacheck` - adversemediacheck * `bigcheck` - bigcheck * `criminalrecordscheck` - criminalrecordscheck * `criminalrecordsuploadcheck` - criminalrecordsuploadcheck * `customintegritycheck` - customintegritycheck * `cvcheck` - cvcheck * `edrcheck` - edrcheck * `ibancheck` - ibancheck * `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 Known values: addresscheck, adversemedia2check, adversemediacheck, bigcheck, criminalrecordscheck, criminalrecordsuploadcheck, customintegritycheck, cvcheck, edrcheck, ibancheck, id2check, idcheck, integritycheck, openhealthcarecheck, permissioncheck, pescheckadversemediacheck, qualificationcheck, righttoworkcheck, vogcheck, watchlist2check, watchlistcheck, workreferencecheck, worldwidecreditcheck. New values may be added; handle unknown values.
|
|
22
22
|
attr_accessor :check_type
|
|
23
23
|
|
|
24
24
|
attr_accessor :status
|
|
25
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
26
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
49
27
|
def self.attribute_map
|
|
50
28
|
{
|
|
@@ -140,8 +118,6 @@ module Pescheck
|
|
|
140
118
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
141
119
|
return false if @id.nil?
|
|
142
120
|
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
121
|
return false if @status.nil?
|
|
146
122
|
true
|
|
147
123
|
end
|
|
@@ -156,13 +132,13 @@ module Pescheck
|
|
|
156
132
|
@id = id
|
|
157
133
|
end
|
|
158
134
|
|
|
159
|
-
# Custom attribute writer method
|
|
160
|
-
# @param [Object] check_type
|
|
135
|
+
# Custom attribute writer method with validation
|
|
136
|
+
# @param [Object] check_type Value to be assigned
|
|
161
137
|
def check_type=(check_type)
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
fail ArgumentError, "invalid value for \"check_type\", must be one of #{validator.allowable_values}."
|
|
138
|
+
if check_type.nil?
|
|
139
|
+
fail ArgumentError, 'check_type cannot be nil'
|
|
165
140
|
end
|
|
141
|
+
|
|
166
142
|
@check_type = check_type
|
|
167
143
|
end
|
|
168
144
|
|
|
@@ -21,12 +21,19 @@ module Pescheck
|
|
|
21
21
|
|
|
22
22
|
attr_accessor :checks
|
|
23
23
|
|
|
24
|
+
attr_accessor :screening_notes
|
|
25
|
+
|
|
26
|
+
# Create the screening for this department instead of the token's own organisation. Omit for the usual case. Same field as on webhook and OAuth application creation.
|
|
27
|
+
attr_accessor :division_id
|
|
28
|
+
|
|
24
29
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
30
|
def self.attribute_map
|
|
26
31
|
{
|
|
27
32
|
:'profile_id' => :'profile_id',
|
|
28
33
|
:'candidate' => :'candidate',
|
|
29
|
-
:'checks' => :'checks'
|
|
34
|
+
:'checks' => :'checks',
|
|
35
|
+
:'screening_notes' => :'screening_notes',
|
|
36
|
+
:'division_id' => :'division_id'
|
|
30
37
|
}
|
|
31
38
|
end
|
|
32
39
|
|
|
@@ -45,7 +52,9 @@ module Pescheck
|
|
|
45
52
|
{
|
|
46
53
|
:'profile_id' => :'String',
|
|
47
54
|
:'candidate' => :'V2Candidate',
|
|
48
|
-
:'checks' => :'Array<V2ScreeningCheck>'
|
|
55
|
+
:'checks' => :'Array<V2ScreeningCheck>',
|
|
56
|
+
:'screening_notes' => :'Array<V2ScreeningNoteInput>',
|
|
57
|
+
:'division_id' => :'String'
|
|
49
58
|
}
|
|
50
59
|
end
|
|
51
60
|
|
|
@@ -88,6 +97,16 @@ module Pescheck
|
|
|
88
97
|
self.checks = value
|
|
89
98
|
end
|
|
90
99
|
end
|
|
100
|
+
|
|
101
|
+
if attributes.key?(:'screening_notes')
|
|
102
|
+
if (value = attributes[:'screening_notes']).is_a?(Array)
|
|
103
|
+
self.screening_notes = value
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
if attributes.key?(:'division_id')
|
|
108
|
+
self.division_id = attributes[:'division_id']
|
|
109
|
+
end
|
|
91
110
|
end
|
|
92
111
|
|
|
93
112
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -142,7 +161,9 @@ module Pescheck
|
|
|
142
161
|
self.class == o.class &&
|
|
143
162
|
profile_id == o.profile_id &&
|
|
144
163
|
candidate == o.candidate &&
|
|
145
|
-
checks == o.checks
|
|
164
|
+
checks == o.checks &&
|
|
165
|
+
screening_notes == o.screening_notes &&
|
|
166
|
+
division_id == o.division_id
|
|
146
167
|
end
|
|
147
168
|
|
|
148
169
|
# @see the `==` method
|
|
@@ -154,7 +175,7 @@ module Pescheck
|
|
|
154
175
|
# Calculates hash code according to all attributes.
|
|
155
176
|
# @return [Integer] Hash code
|
|
156
177
|
def hash
|
|
157
|
-
[profile_id, candidate, checks].hash
|
|
178
|
+
[profile_id, candidate, checks, screening_notes, division_id].hash
|
|
158
179
|
end
|
|
159
180
|
|
|
160
181
|
# Builds the object from hash
|