pescheck-client 0.4.3 → 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 +52 -45
- data/docs/AddOnsApi.md +305 -0
- data/docs/AddonPrice.md +20 -0
- data/docs/AuthenticationApi.md +0 -70
- 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 +3 -1
- data/docs/V2ScreeningDetail.md +3 -1
- data/docs/{V2ScreeningDetailProfile.md → V2ScreeningDetailOrganisation.md} +2 -2
- data/docs/V2ScreeningListItem.md +3 -1
- data/docs/V2ScreeningNoteInput.md +1 -1
- 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 +0 -66
- 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/{custom_token_obtain_pair.rb → addon_price.rb} +46 -45
- data/lib/pescheck-client/models/disabled_division.rb +190 -0
- 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 +14 -4
- data/lib/pescheck-client/models/v2_screening_detail.rb +14 -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_input.rb +3 -3
- data/lib/pescheck-client/models/webhook_response.rb +5 -5
- data/lib/pescheck-client/version.rb +1 -1
- data/lib/pescheck-client.rb +8 -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 +1 -1
- metadata +65 -41
- data/docs/CustomTokenObtainPair.md +0 -22
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Pescheck API
|
|
3
|
+
|
|
4
|
+
#Official client library for the Pescheck API (v2), generated from the OpenAPI specification. Authenticate with OAuth2 client credentials and use the checks, profiles, screenings, webhooks and divisions endpoints. See https://github.com/pescheckit/pescheck-clients for installation and usage.
|
|
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 'cgi'
|
|
14
|
+
|
|
15
|
+
module Pescheck
|
|
16
|
+
class AddOnsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# List every add-on with whether it is enabled for the organisation.
|
|
23
|
+
# @param [Hash] opts the optional parameters
|
|
24
|
+
# @option opts [String] :division_id Act on this division instead of the organisation the token belongs to.
|
|
25
|
+
# @return [Array<OrganisationAddon>]
|
|
26
|
+
def v2_organisations_addons_list(opts = {})
|
|
27
|
+
data, _status_code, _headers = v2_organisations_addons_list_with_http_info(opts)
|
|
28
|
+
data
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# List every add-on with whether it is enabled for the organisation.
|
|
32
|
+
# @param [Hash] opts the optional parameters
|
|
33
|
+
# @option opts [String] :division_id Act on this division instead of the organisation the token belongs to.
|
|
34
|
+
# @return [Array<(Array<OrganisationAddon>, Integer, Hash)>] Array<OrganisationAddon> data, response status code and response headers
|
|
35
|
+
def v2_organisations_addons_list_with_http_info(opts = {})
|
|
36
|
+
if @api_client.config.debugging
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: AddOnsApi.v2_organisations_addons_list ...'
|
|
38
|
+
end
|
|
39
|
+
# resource path
|
|
40
|
+
local_var_path = '/api/v2/organisations/addons/'
|
|
41
|
+
|
|
42
|
+
# query parameters
|
|
43
|
+
query_params = opts[:query_params] || {}
|
|
44
|
+
query_params[:'division_id'] = opts[:'division_id'] if !opts[:'division_id'].nil?
|
|
45
|
+
|
|
46
|
+
# header parameters
|
|
47
|
+
header_params = opts[:header_params] || {}
|
|
48
|
+
# HTTP header 'Accept' (if needed)
|
|
49
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
50
|
+
|
|
51
|
+
# form parameters
|
|
52
|
+
form_params = opts[:form_params] || {}
|
|
53
|
+
|
|
54
|
+
# http body (model)
|
|
55
|
+
post_body = opts[:debug_body]
|
|
56
|
+
|
|
57
|
+
# return_type
|
|
58
|
+
return_type = opts[:debug_return_type] || 'Array<OrganisationAddon>'
|
|
59
|
+
|
|
60
|
+
# auth_names
|
|
61
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
|
62
|
+
|
|
63
|
+
new_options = opts.merge(
|
|
64
|
+
:operation => :"AddOnsApi.v2_organisations_addons_list",
|
|
65
|
+
:header_params => header_params,
|
|
66
|
+
:query_params => query_params,
|
|
67
|
+
:form_params => form_params,
|
|
68
|
+
:body => post_body,
|
|
69
|
+
:auth_names => auth_names,
|
|
70
|
+
:return_type => return_type
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
74
|
+
if @api_client.config.debugging
|
|
75
|
+
@api_client.config.logger.debug "API called: AddOnsApi#v2_organisations_addons_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
76
|
+
end
|
|
77
|
+
return data, status_code, headers
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Switch an add-on on or off. Enabling is billed monthly from today.
|
|
81
|
+
# @param addon [String] The add-on to act on.
|
|
82
|
+
# @param [Hash] opts the optional parameters
|
|
83
|
+
# @option opts [String] :division_id Act on this division instead of the organisation the token belongs to.
|
|
84
|
+
# @option opts [PatchedOrganisationAddonUpdate] :patched_organisation_addon_update
|
|
85
|
+
# @return [OrganisationAddonUpdateResult]
|
|
86
|
+
def v2_organisations_addons_partial_update(addon, opts = {})
|
|
87
|
+
data, _status_code, _headers = v2_organisations_addons_partial_update_with_http_info(addon, opts)
|
|
88
|
+
data
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Switch an add-on on or off. Enabling is billed monthly from today.
|
|
92
|
+
# @param addon [String] The add-on to act on.
|
|
93
|
+
# @param [Hash] opts the optional parameters
|
|
94
|
+
# @option opts [String] :division_id Act on this division instead of the organisation the token belongs to.
|
|
95
|
+
# @option opts [PatchedOrganisationAddonUpdate] :patched_organisation_addon_update
|
|
96
|
+
# @return [Array<(OrganisationAddonUpdateResult, Integer, Hash)>] OrganisationAddonUpdateResult data, response status code and response headers
|
|
97
|
+
def v2_organisations_addons_partial_update_with_http_info(addon, opts = {})
|
|
98
|
+
if @api_client.config.debugging
|
|
99
|
+
@api_client.config.logger.debug 'Calling API: AddOnsApi.v2_organisations_addons_partial_update ...'
|
|
100
|
+
end
|
|
101
|
+
# verify the required parameter 'addon' is set
|
|
102
|
+
if @api_client.config.client_side_validation && addon.nil?
|
|
103
|
+
fail ArgumentError, "Missing the required parameter 'addon' when calling AddOnsApi.v2_organisations_addons_partial_update"
|
|
104
|
+
end
|
|
105
|
+
# verify enum value
|
|
106
|
+
allowable_values = ["api_access", "branded_journey", "connected_ats", "sso"]
|
|
107
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(addon)
|
|
108
|
+
fail ArgumentError, "invalid value for \"addon\", must be one of #{allowable_values}"
|
|
109
|
+
end
|
|
110
|
+
# resource path
|
|
111
|
+
local_var_path = '/api/v2/organisations/addons/{addon}/'.sub('{addon}', CGI.escape(addon.to_s))
|
|
112
|
+
|
|
113
|
+
# query parameters
|
|
114
|
+
query_params = opts[:query_params] || {}
|
|
115
|
+
query_params[:'division_id'] = opts[:'division_id'] if !opts[:'division_id'].nil?
|
|
116
|
+
|
|
117
|
+
# header parameters
|
|
118
|
+
header_params = opts[:header_params] || {}
|
|
119
|
+
# HTTP header 'Accept' (if needed)
|
|
120
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
121
|
+
# HTTP header 'Content-Type'
|
|
122
|
+
content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])
|
|
123
|
+
if !content_type.nil?
|
|
124
|
+
header_params['Content-Type'] = content_type
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# form parameters
|
|
128
|
+
form_params = opts[:form_params] || {}
|
|
129
|
+
|
|
130
|
+
# http body (model)
|
|
131
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'patched_organisation_addon_update'])
|
|
132
|
+
|
|
133
|
+
# return_type
|
|
134
|
+
return_type = opts[:debug_return_type] || 'OrganisationAddonUpdateResult'
|
|
135
|
+
|
|
136
|
+
# auth_names
|
|
137
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
|
138
|
+
|
|
139
|
+
new_options = opts.merge(
|
|
140
|
+
:operation => :"AddOnsApi.v2_organisations_addons_partial_update",
|
|
141
|
+
:header_params => header_params,
|
|
142
|
+
:query_params => query_params,
|
|
143
|
+
:form_params => form_params,
|
|
144
|
+
:body => post_body,
|
|
145
|
+
:auth_names => auth_names,
|
|
146
|
+
:return_type => return_type
|
|
147
|
+
)
|
|
148
|
+
|
|
149
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
150
|
+
if @api_client.config.debugging
|
|
151
|
+
@api_client.config.logger.debug "API called: AddOnsApi#v2_organisations_addons_partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
152
|
+
end
|
|
153
|
+
return data, status_code, headers
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Get one add-on's state for the organisation.
|
|
157
|
+
# @param addon [String] The add-on to act on.
|
|
158
|
+
# @param [Hash] opts the optional parameters
|
|
159
|
+
# @option opts [String] :division_id Act on this division instead of the organisation the token belongs to.
|
|
160
|
+
# @return [OrganisationAddon]
|
|
161
|
+
def v2_organisations_addons_retrieve(addon, opts = {})
|
|
162
|
+
data, _status_code, _headers = v2_organisations_addons_retrieve_with_http_info(addon, opts)
|
|
163
|
+
data
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Get one add-on's state for the organisation.
|
|
167
|
+
# @param addon [String] The add-on to act on.
|
|
168
|
+
# @param [Hash] opts the optional parameters
|
|
169
|
+
# @option opts [String] :division_id Act on this division instead of the organisation the token belongs to.
|
|
170
|
+
# @return [Array<(OrganisationAddon, Integer, Hash)>] OrganisationAddon data, response status code and response headers
|
|
171
|
+
def v2_organisations_addons_retrieve_with_http_info(addon, opts = {})
|
|
172
|
+
if @api_client.config.debugging
|
|
173
|
+
@api_client.config.logger.debug 'Calling API: AddOnsApi.v2_organisations_addons_retrieve ...'
|
|
174
|
+
end
|
|
175
|
+
# verify the required parameter 'addon' is set
|
|
176
|
+
if @api_client.config.client_side_validation && addon.nil?
|
|
177
|
+
fail ArgumentError, "Missing the required parameter 'addon' when calling AddOnsApi.v2_organisations_addons_retrieve"
|
|
178
|
+
end
|
|
179
|
+
# verify enum value
|
|
180
|
+
allowable_values = ["api_access", "branded_journey", "connected_ats", "sso"]
|
|
181
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(addon)
|
|
182
|
+
fail ArgumentError, "invalid value for \"addon\", must be one of #{allowable_values}"
|
|
183
|
+
end
|
|
184
|
+
# resource path
|
|
185
|
+
local_var_path = '/api/v2/organisations/addons/{addon}/'.sub('{addon}', CGI.escape(addon.to_s))
|
|
186
|
+
|
|
187
|
+
# query parameters
|
|
188
|
+
query_params = opts[:query_params] || {}
|
|
189
|
+
query_params[:'division_id'] = opts[:'division_id'] if !opts[:'division_id'].nil?
|
|
190
|
+
|
|
191
|
+
# header parameters
|
|
192
|
+
header_params = opts[:header_params] || {}
|
|
193
|
+
# HTTP header 'Accept' (if needed)
|
|
194
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
195
|
+
|
|
196
|
+
# form parameters
|
|
197
|
+
form_params = opts[:form_params] || {}
|
|
198
|
+
|
|
199
|
+
# http body (model)
|
|
200
|
+
post_body = opts[:debug_body]
|
|
201
|
+
|
|
202
|
+
# return_type
|
|
203
|
+
return_type = opts[:debug_return_type] || 'OrganisationAddon'
|
|
204
|
+
|
|
205
|
+
# auth_names
|
|
206
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
|
207
|
+
|
|
208
|
+
new_options = opts.merge(
|
|
209
|
+
:operation => :"AddOnsApi.v2_organisations_addons_retrieve",
|
|
210
|
+
:header_params => header_params,
|
|
211
|
+
:query_params => query_params,
|
|
212
|
+
:form_params => form_params,
|
|
213
|
+
:body => post_body,
|
|
214
|
+
:auth_names => auth_names,
|
|
215
|
+
:return_type => return_type
|
|
216
|
+
)
|
|
217
|
+
|
|
218
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
219
|
+
if @api_client.config.debugging
|
|
220
|
+
@api_client.config.logger.debug "API called: AddOnsApi#v2_organisations_addons_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
221
|
+
end
|
|
222
|
+
return data, status_code, headers
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# Switch an add-on on or off. Enabling is billed monthly from today.
|
|
226
|
+
# @param addon [String] The add-on to act on.
|
|
227
|
+
# @param organisation_addon_update [OrganisationAddonUpdate]
|
|
228
|
+
# @param [Hash] opts the optional parameters
|
|
229
|
+
# @option opts [String] :division_id Act on this division instead of the organisation the token belongs to.
|
|
230
|
+
# @return [OrganisationAddonUpdateResult]
|
|
231
|
+
def v2_organisations_addons_update(addon, organisation_addon_update, opts = {})
|
|
232
|
+
data, _status_code, _headers = v2_organisations_addons_update_with_http_info(addon, organisation_addon_update, opts)
|
|
233
|
+
data
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
# Switch an add-on on or off. Enabling is billed monthly from today.
|
|
237
|
+
# @param addon [String] The add-on to act on.
|
|
238
|
+
# @param organisation_addon_update [OrganisationAddonUpdate]
|
|
239
|
+
# @param [Hash] opts the optional parameters
|
|
240
|
+
# @option opts [String] :division_id Act on this division instead of the organisation the token belongs to.
|
|
241
|
+
# @return [Array<(OrganisationAddonUpdateResult, Integer, Hash)>] OrganisationAddonUpdateResult data, response status code and response headers
|
|
242
|
+
def v2_organisations_addons_update_with_http_info(addon, organisation_addon_update, opts = {})
|
|
243
|
+
if @api_client.config.debugging
|
|
244
|
+
@api_client.config.logger.debug 'Calling API: AddOnsApi.v2_organisations_addons_update ...'
|
|
245
|
+
end
|
|
246
|
+
# verify the required parameter 'addon' is set
|
|
247
|
+
if @api_client.config.client_side_validation && addon.nil?
|
|
248
|
+
fail ArgumentError, "Missing the required parameter 'addon' when calling AddOnsApi.v2_organisations_addons_update"
|
|
249
|
+
end
|
|
250
|
+
# verify enum value
|
|
251
|
+
allowable_values = ["api_access", "branded_journey", "connected_ats", "sso"]
|
|
252
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(addon)
|
|
253
|
+
fail ArgumentError, "invalid value for \"addon\", must be one of #{allowable_values}"
|
|
254
|
+
end
|
|
255
|
+
# verify the required parameter 'organisation_addon_update' is set
|
|
256
|
+
if @api_client.config.client_side_validation && organisation_addon_update.nil?
|
|
257
|
+
fail ArgumentError, "Missing the required parameter 'organisation_addon_update' when calling AddOnsApi.v2_organisations_addons_update"
|
|
258
|
+
end
|
|
259
|
+
# resource path
|
|
260
|
+
local_var_path = '/api/v2/organisations/addons/{addon}/'.sub('{addon}', CGI.escape(addon.to_s))
|
|
261
|
+
|
|
262
|
+
# query parameters
|
|
263
|
+
query_params = opts[:query_params] || {}
|
|
264
|
+
query_params[:'division_id'] = opts[:'division_id'] if !opts[:'division_id'].nil?
|
|
265
|
+
|
|
266
|
+
# header parameters
|
|
267
|
+
header_params = opts[:header_params] || {}
|
|
268
|
+
# HTTP header 'Accept' (if needed)
|
|
269
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
270
|
+
# HTTP header 'Content-Type'
|
|
271
|
+
content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])
|
|
272
|
+
if !content_type.nil?
|
|
273
|
+
header_params['Content-Type'] = content_type
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
# form parameters
|
|
277
|
+
form_params = opts[:form_params] || {}
|
|
278
|
+
|
|
279
|
+
# http body (model)
|
|
280
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(organisation_addon_update)
|
|
281
|
+
|
|
282
|
+
# return_type
|
|
283
|
+
return_type = opts[:debug_return_type] || 'OrganisationAddonUpdateResult'
|
|
284
|
+
|
|
285
|
+
# auth_names
|
|
286
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
|
287
|
+
|
|
288
|
+
new_options = opts.merge(
|
|
289
|
+
:operation => :"AddOnsApi.v2_organisations_addons_update",
|
|
290
|
+
:header_params => header_params,
|
|
291
|
+
:query_params => query_params,
|
|
292
|
+
:form_params => form_params,
|
|
293
|
+
:body => post_body,
|
|
294
|
+
:auth_names => auth_names,
|
|
295
|
+
:return_type => return_type
|
|
296
|
+
)
|
|
297
|
+
|
|
298
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
299
|
+
if @api_client.config.debugging
|
|
300
|
+
@api_client.config.logger.debug "API called: AddOnsApi#v2_organisations_addons_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
301
|
+
end
|
|
302
|
+
return data, status_code, headers
|
|
303
|
+
end
|
|
304
|
+
end
|
|
305
|
+
end
|
|
@@ -85,72 +85,6 @@ module Pescheck
|
|
|
85
85
|
return data, status_code, headers
|
|
86
86
|
end
|
|
87
87
|
|
|
88
|
-
# Log in with email + password. Returns a JWT pair scoped to one organization. Pass organization_id to select the organization or division to act for; it is required when your account has access to more than one. Without it, your single organization is used.
|
|
89
|
-
# @param custom_token_obtain_pair [CustomTokenObtainPair]
|
|
90
|
-
# @param [Hash] opts the optional parameters
|
|
91
|
-
# @return [CustomTokenObtainPair]
|
|
92
|
-
def jwt_create(custom_token_obtain_pair, opts = {})
|
|
93
|
-
data, _status_code, _headers = jwt_create_with_http_info(custom_token_obtain_pair, opts)
|
|
94
|
-
data
|
|
95
|
-
end
|
|
96
|
-
|
|
97
|
-
# Log in with email + password. Returns a JWT pair scoped to one organization. Pass organization_id to select the organization or division to act for; it is required when your account has access to more than one. Without it, your single organization is used.
|
|
98
|
-
# @param custom_token_obtain_pair [CustomTokenObtainPair]
|
|
99
|
-
# @param [Hash] opts the optional parameters
|
|
100
|
-
# @return [Array<(CustomTokenObtainPair, Integer, Hash)>] CustomTokenObtainPair data, response status code and response headers
|
|
101
|
-
def jwt_create_with_http_info(custom_token_obtain_pair, opts = {})
|
|
102
|
-
if @api_client.config.debugging
|
|
103
|
-
@api_client.config.logger.debug 'Calling API: AuthenticationApi.jwt_create ...'
|
|
104
|
-
end
|
|
105
|
-
# verify the required parameter 'custom_token_obtain_pair' is set
|
|
106
|
-
if @api_client.config.client_side_validation && custom_token_obtain_pair.nil?
|
|
107
|
-
fail ArgumentError, "Missing the required parameter 'custom_token_obtain_pair' when calling AuthenticationApi.jwt_create"
|
|
108
|
-
end
|
|
109
|
-
# resource path
|
|
110
|
-
local_var_path = '/api/jwt/'
|
|
111
|
-
|
|
112
|
-
# query parameters
|
|
113
|
-
query_params = opts[:query_params] || {}
|
|
114
|
-
|
|
115
|
-
# header parameters
|
|
116
|
-
header_params = opts[:header_params] || {}
|
|
117
|
-
# HTTP header 'Accept' (if needed)
|
|
118
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
119
|
-
# HTTP header 'Content-Type'
|
|
120
|
-
content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])
|
|
121
|
-
if !content_type.nil?
|
|
122
|
-
header_params['Content-Type'] = content_type
|
|
123
|
-
end
|
|
124
|
-
|
|
125
|
-
# form parameters
|
|
126
|
-
form_params = opts[:form_params] || {}
|
|
127
|
-
|
|
128
|
-
# http body (model)
|
|
129
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(custom_token_obtain_pair)
|
|
130
|
-
|
|
131
|
-
# return_type
|
|
132
|
-
return_type = opts[:debug_return_type] || 'CustomTokenObtainPair'
|
|
133
|
-
|
|
134
|
-
# auth_names
|
|
135
|
-
auth_names = opts[:debug_auth_names] || ['oauth2']
|
|
136
|
-
|
|
137
|
-
new_options = opts.merge(
|
|
138
|
-
:operation => :"AuthenticationApi.jwt_create",
|
|
139
|
-
:header_params => header_params,
|
|
140
|
-
:query_params => query_params,
|
|
141
|
-
:form_params => form_params,
|
|
142
|
-
:body => post_body,
|
|
143
|
-
:auth_names => auth_names,
|
|
144
|
-
:return_type => return_type
|
|
145
|
-
)
|
|
146
|
-
|
|
147
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
148
|
-
if @api_client.config.debugging
|
|
149
|
-
@api_client.config.logger.debug "API called: AuthenticationApi#jwt_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
150
|
-
end
|
|
151
|
-
return data, status_code, headers
|
|
152
|
-
end
|
|
153
|
-
|
|
154
88
|
# Takes a refresh type JSON web token and returns an access type JSON web token if the refresh token is valid.
|
|
155
89
|
# @param token_refresh [TokenRefresh]
|
|
156
90
|
# @param [Hash] opts the optional parameters
|
|
@@ -167,7 +167,7 @@ module Pescheck
|
|
|
167
167
|
if @api_client.config.debugging
|
|
168
168
|
@api_client.config.logger.debug 'Calling API: ProfilesApi.v2_profiles_list ...'
|
|
169
169
|
end
|
|
170
|
-
allowable_values = ["addresscheck", "adversemedia2check", "
|
|
170
|
+
allowable_values = ["addresscheck", "adversemedia2check", "bigcheck", "criminalrecordscheck", "criminalrecordsuploadcheck", "customintegritycheck", "cvcheck", "edrcheck", "ibancheck", "id2check", "integritycheck", "openhealthcarecheck", "qualificationcheck", "righttoworkcheck", "vogcheck", "watchlist2check", "watchlistcheck", "workreferencecheck", "worldwidecreditcheck"]
|
|
171
171
|
if @api_client.config.client_side_validation && opts[:'check_type'] && !allowable_values.include?(opts[:'check_type'])
|
|
172
172
|
fail ArgumentError, "invalid value for \"check_type\", must be one of #{allowable_values}"
|
|
173
173
|
end
|
|
@@ -19,6 +19,69 @@ module Pescheck
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
+
# Close a screening
|
|
23
|
+
# Stop a running screening (status OPEN, HOLD, WAITING or ATTENTION). Every check that has not finished is rejected, no more checks are done and the screening becomes FINISHED. This cannot be undone. The screening is still invoiced. Returns 409 when the screening is not running, for example a draft or a finished screening.
|
|
24
|
+
# @param id [String] A UUID string identifying this screening.
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [V2ScreeningDetail]
|
|
27
|
+
def v2_screenings_close_create(id, opts = {})
|
|
28
|
+
data, _status_code, _headers = v2_screenings_close_create_with_http_info(id, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Close a screening
|
|
33
|
+
# Stop a running screening (status OPEN, HOLD, WAITING or ATTENTION). Every check that has not finished is rejected, no more checks are done and the screening becomes FINISHED. This cannot be undone. The screening is still invoiced. Returns 409 when the screening is not running, for example a draft or a finished screening.
|
|
34
|
+
# @param id [String] A UUID string identifying this screening.
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(V2ScreeningDetail, Integer, Hash)>] V2ScreeningDetail data, response status code and response headers
|
|
37
|
+
def v2_screenings_close_create_with_http_info(id, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: ScreeningsApi.v2_screenings_close_create ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'id' is set
|
|
42
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ScreeningsApi.v2_screenings_close_create"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/api/v2/screenings/{id}/close/'.sub('{id}', CGI.escape(id.to_s))
|
|
47
|
+
|
|
48
|
+
# query parameters
|
|
49
|
+
query_params = opts[:query_params] || {}
|
|
50
|
+
|
|
51
|
+
# header parameters
|
|
52
|
+
header_params = opts[:header_params] || {}
|
|
53
|
+
# HTTP header 'Accept' (if needed)
|
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
55
|
+
|
|
56
|
+
# form parameters
|
|
57
|
+
form_params = opts[:form_params] || {}
|
|
58
|
+
|
|
59
|
+
# http body (model)
|
|
60
|
+
post_body = opts[:debug_body]
|
|
61
|
+
|
|
62
|
+
# return_type
|
|
63
|
+
return_type = opts[:debug_return_type] || 'V2ScreeningDetail'
|
|
64
|
+
|
|
65
|
+
# auth_names
|
|
66
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
|
67
|
+
|
|
68
|
+
new_options = opts.merge(
|
|
69
|
+
:operation => :"ScreeningsApi.v2_screenings_close_create",
|
|
70
|
+
:header_params => header_params,
|
|
71
|
+
:query_params => query_params,
|
|
72
|
+
:form_params => form_params,
|
|
73
|
+
:body => post_body,
|
|
74
|
+
:auth_names => auth_names,
|
|
75
|
+
:return_type => return_type
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
79
|
+
if @api_client.config.debugging
|
|
80
|
+
@api_client.config.logger.debug "API called: ScreeningsApi#v2_screenings_close_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
81
|
+
end
|
|
82
|
+
return data, status_code, headers
|
|
83
|
+
end
|
|
84
|
+
|
|
22
85
|
# @param v2_screening_create [V2ScreeningCreate]
|
|
23
86
|
# @param [Hash] opts the optional parameters
|
|
24
87
|
# @return [V2ScreeningDetail]
|
|
@@ -153,6 +216,7 @@ module Pescheck
|
|
|
153
216
|
end
|
|
154
217
|
|
|
155
218
|
# @param [Hash] opts the optional parameters
|
|
219
|
+
# @option opts [String] :organisation Restrict to screenings owned by this organisation. Use it with a parent-organisation token to list a single department's screenings.
|
|
156
220
|
# @option opts [Integer] :page A page number within the paginated result set. (default to 1)
|
|
157
221
|
# @option opts [Integer] :page_size Number of results to return per page. (default to 50)
|
|
158
222
|
# @option opts [Boolean] :paginate Enable/disable pagination. When false, max 500 records returned. (default to true)
|
|
@@ -163,6 +227,7 @@ module Pescheck
|
|
|
163
227
|
end
|
|
164
228
|
|
|
165
229
|
# @param [Hash] opts the optional parameters
|
|
230
|
+
# @option opts [String] :organisation Restrict to screenings owned by this organisation. Use it with a parent-organisation token to list a single department's screenings.
|
|
166
231
|
# @option opts [Integer] :page A page number within the paginated result set. (default to 1)
|
|
167
232
|
# @option opts [Integer] :page_size Number of results to return per page. (default to 50)
|
|
168
233
|
# @option opts [Boolean] :paginate Enable/disable pagination. When false, max 500 records returned. (default to true)
|
|
@@ -188,6 +253,7 @@ module Pescheck
|
|
|
188
253
|
|
|
189
254
|
# query parameters
|
|
190
255
|
query_params = opts[:query_params] || {}
|
|
256
|
+
query_params[:'organisation'] = opts[:'organisation'] if !opts[:'organisation'].nil?
|
|
191
257
|
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
192
258
|
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
193
259
|
query_params[:'paginate'] = opts[:'paginate'] if !opts[:'paginate'].nil?
|
|
@@ -19,7 +19,7 @@ module Pescheck
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
-
# Create webhook for event notifications. **Authentication Notes:** - OAuth2: Organization is automatically determined from the OAuth application - If your OAuth app has no organization set, pass it via `X-Organization-Id` header or `organization_id` query parameter **Valid Events:** - `check.
|
|
22
|
+
# Create webhook for event notifications. **Authentication Notes:** - OAuth2: Organization is automatically determined from the OAuth application - If your OAuth app has no organization set, pass it via `X-Organization-Id` header or `organization_id` query parameter **Valid Events:** - `check.status_changed` - Check status has changed (new status in payload) - `screening.status_changed` - Screening status has changed (new status in payload) - `screening.archived` - Screening has been archived - `package.created` - New package has been created - `package.updated` - Package has been updated - `profile.created` - New profile has been created - `profile.updated` - Profile has been updated - `division.created` - New division has been created - `division.updated` - Division has been updated Limited to 5 webhooks per organization/division.
|
|
23
23
|
# @param webhook [Webhook]
|
|
24
24
|
# @param [Hash] opts the optional parameters
|
|
25
25
|
# @option opts [String] :x_organization_id Organization ID (for JWT/Session auth only)
|
|
@@ -30,7 +30,7 @@ module Pescheck
|
|
|
30
30
|
data
|
|
31
31
|
end
|
|
32
32
|
|
|
33
|
-
# Create webhook for event notifications. **Authentication Notes:** - OAuth2: Organization is automatically determined from the OAuth application - If your OAuth app has no organization set, pass it via `X-Organization-Id` header or `organization_id` query parameter **Valid Events:** - `check.
|
|
33
|
+
# Create webhook for event notifications. **Authentication Notes:** - OAuth2: Organization is automatically determined from the OAuth application - If your OAuth app has no organization set, pass it via `X-Organization-Id` header or `organization_id` query parameter **Valid Events:** - `check.status_changed` - Check status has changed (new status in payload) - `screening.status_changed` - Screening status has changed (new status in payload) - `screening.archived` - Screening has been archived - `package.created` - New package has been created - `package.updated` - Package has been updated - `profile.created` - New profile has been created - `profile.updated` - Profile has been updated - `division.created` - New division has been created - `division.updated` - Division has been updated Limited to 5 webhooks per organization/division.
|
|
34
34
|
# @param webhook [Webhook]
|
|
35
35
|
# @param [Hash] opts the optional parameters
|
|
36
36
|
# @option opts [String] :x_organization_id Organization ID (for JWT/Session auth only)
|
|
@@ -159,6 +159,14 @@ module Pescheck
|
|
|
159
159
|
@scheme = 'https'
|
|
160
160
|
@host = 'api.pescheck.io'
|
|
161
161
|
@base_path = ''
|
|
162
|
+
# Default host: $PESCHECK_BASE_URL if set, else production.
|
|
163
|
+
if (env_url = ENV['PESCHECK_BASE_URL']) && !env_url.empty?
|
|
164
|
+
require 'uri'
|
|
165
|
+
uri = URI.parse(env_url)
|
|
166
|
+
@scheme = uri.scheme
|
|
167
|
+
@host = uri.port == uri.default_port ? uri.host : "#{uri.host}:#{uri.port}"
|
|
168
|
+
@base_path = uri.path.sub(%r{/+\z}, '')
|
|
169
|
+
end
|
|
162
170
|
@server_index = nil
|
|
163
171
|
@server_operation_index = {}
|
|
164
172
|
@server_variables = {}
|