pescheck-client 0.0.5
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 +7 -0
- data/Gemfile +9 -0
- data/README.md +182 -0
- data/Rakefile +10 -0
- data/docs/AuthenticationApi.md +217 -0
- data/docs/ChecksApi.md +147 -0
- data/docs/CustomTokenObtainPair.md +20 -0
- data/docs/DivisionReadOnly.md +46 -0
- data/docs/DivisionWrite.md +40 -0
- data/docs/DivisionsApi.md +369 -0
- data/docs/JWTGeneration.md +24 -0
- data/docs/JWTResponse.md +28 -0
- data/docs/OAuthApi.md +213 -0
- data/docs/OAuthApplication.md +26 -0
- data/docs/OAuthApplicationResponse.md +32 -0
- data/docs/PaginatedDivisionReadOnlyList.md +24 -0
- data/docs/PaginatedV2ProfileListItemList.md +24 -0
- data/docs/PaginatedV2ScreeningListItemList.md +24 -0
- data/docs/PatchedDivisionWrite.md +40 -0
- data/docs/PatchedV2ProfilePartialUpdate.md +20 -0
- data/docs/ProfilesApi.md +438 -0
- data/docs/ScreeningsApi.md +293 -0
- data/docs/TokenRefresh.md +20 -0
- data/docs/V2Candidate.md +36 -0
- data/docs/V2CheckField.md +26 -0
- data/docs/V2CheckInfo.md +40 -0
- data/docs/V2Document.md +28 -0
- data/docs/V2DocumentContent.md +20 -0
- data/docs/V2Money.md +20 -0
- data/docs/V2ProfileCheck.md +20 -0
- data/docs/V2ProfileCheckEntry.md +30 -0
- data/docs/V2ProfileCreate.md +22 -0
- data/docs/V2ProfileDetail.md +38 -0
- data/docs/V2ProfileListItem.md +30 -0
- data/docs/V2ProfileUpdate.md +22 -0
- data/docs/V2ProfileUpdateCheck.md +22 -0
- data/docs/V2ScreeningCheck.md +24 -0
- data/docs/V2ScreeningCheckEntry.md +34 -0
- data/docs/V2ScreeningCheckListItem.md +22 -0
- data/docs/V2ScreeningCreate.md +22 -0
- data/docs/V2ScreeningDetail.md +34 -0
- data/docs/V2ScreeningDetailProfile.md +20 -0
- data/docs/V2ScreeningListItem.md +34 -0
- data/docs/VerifyWebhook.md +18 -0
- data/docs/Webhook.md +26 -0
- data/docs/WebhookResponse.md +36 -0
- data/docs/WebhooksApi.md +290 -0
- data/git_push.sh +57 -0
- data/lib/pescheck-client/api/authentication_api.rb +220 -0
- data/lib/pescheck-client/api/checks_api.rb +144 -0
- data/lib/pescheck-client/api/divisions_api.rb +365 -0
- data/lib/pescheck-client/api/o_auth_api.rb +202 -0
- data/lib/pescheck-client/api/profiles_api.rb +432 -0
- data/lib/pescheck-client/api/screenings_api.rb +288 -0
- data/lib/pescheck-client/api/webhooks_api.rb +278 -0
- data/lib/pescheck-client/api_client.rb +441 -0
- data/lib/pescheck-client/api_error.rb +58 -0
- data/lib/pescheck-client/api_model_base.rb +88 -0
- data/lib/pescheck-client/configuration.rb +429 -0
- data/lib/pescheck-client/models/custom_token_obtain_pair.rb +191 -0
- data/lib/pescheck-client/models/division_read_only.rb +469 -0
- data/lib/pescheck-client/models/division_write.rb +436 -0
- data/lib/pescheck-client/models/jwt_generation.rb +213 -0
- data/lib/pescheck-client/models/jwt_response.rb +285 -0
- data/lib/pescheck-client/models/o_auth_application.rb +265 -0
- data/lib/pescheck-client/models/o_auth_application_response.rb +379 -0
- data/lib/pescheck-client/models/paginated_division_read_only_list.rb +216 -0
- data/lib/pescheck-client/models/paginated_v2_profile_list_item_list.rb +216 -0
- data/lib/pescheck-client/models/paginated_v2_screening_list_item_list.rb +216 -0
- data/lib/pescheck-client/models/patched_division_write.rb +360 -0
- data/lib/pescheck-client/models/patched_v2_profile_partial_update.rb +176 -0
- data/lib/pescheck-client/models/token_refresh.rb +173 -0
- data/lib/pescheck-client/models/v2_candidate.rb +390 -0
- data/lib/pescheck-client/models/v2_check_field.rb +246 -0
- data/lib/pescheck-client/models/v2_check_info.rb +438 -0
- data/lib/pescheck-client/models/v2_document.rb +308 -0
- data/lib/pescheck-client/models/v2_document_content.rb +175 -0
- data/lib/pescheck-client/models/v2_money.rb +210 -0
- data/lib/pescheck-client/models/v2_profile_check.rb +201 -0
- data/lib/pescheck-client/models/v2_profile_check_entry.rb +349 -0
- data/lib/pescheck-client/models/v2_profile_create.rb +212 -0
- data/lib/pescheck-client/models/v2_profile_detail.rb +401 -0
- data/lib/pescheck-client/models/v2_profile_list_item.rb +291 -0
- data/lib/pescheck-client/models/v2_profile_update.rb +213 -0
- data/lib/pescheck-client/models/v2_profile_update_check.rb +210 -0
- data/lib/pescheck-client/models/v2_screening_check.rb +221 -0
- data/lib/pescheck-client/models/v2_screening_check_entry.rb +376 -0
- data/lib/pescheck-client/models/v2_screening_check_list_item.rb +242 -0
- data/lib/pescheck-client/models/v2_screening_create.rb +201 -0
- data/lib/pescheck-client/models/v2_screening_detail.rb +348 -0
- data/lib/pescheck-client/models/v2_screening_detail_profile.rb +156 -0
- data/lib/pescheck-client/models/v2_screening_list_item.rb +330 -0
- data/lib/pescheck-client/models/verify_webhook.rb +166 -0
- data/lib/pescheck-client/models/webhook.rb +265 -0
- data/lib/pescheck-client/models/webhook_response.rb +353 -0
- data/lib/pescheck-client/version.rb +15 -0
- data/lib/pescheck-client.rb +83 -0
- data/pescheck-client.gemspec +41 -0
- data/spec/api/authentication_api_spec.rb +68 -0
- data/spec/api/checks_api_spec.rb +56 -0
- data/spec/api/divisions_api_spec.rb +94 -0
- data/spec/api/o_auth_api_spec.rb +67 -0
- data/spec/api/profiles_api_spec.rb +105 -0
- data/spec/api/screenings_api_spec.rb +81 -0
- data/spec/api/webhooks_api_spec.rb +81 -0
- data/spec/models/custom_token_obtain_pair_spec.rb +42 -0
- data/spec/models/division_read_only_spec.rb +120 -0
- data/spec/models/division_write_spec.rb +102 -0
- data/spec/models/jwt_generation_spec.rb +54 -0
- data/spec/models/jwt_response_spec.rb +66 -0
- data/spec/models/o_auth_application_response_spec.rb +86 -0
- data/spec/models/o_auth_application_spec.rb +68 -0
- data/spec/models/paginated_division_read_only_list_spec.rb +54 -0
- data/spec/models/paginated_v2_profile_list_item_list_spec.rb +54 -0
- data/spec/models/paginated_v2_screening_list_item_list_spec.rb +54 -0
- data/spec/models/patched_division_write_spec.rb +102 -0
- data/spec/models/patched_v2_profile_partial_update_spec.rb +42 -0
- data/spec/models/token_refresh_spec.rb +42 -0
- data/spec/models/v2_candidate_spec.rb +94 -0
- data/spec/models/v2_check_field_spec.rb +60 -0
- data/spec/models/v2_check_info_spec.rb +102 -0
- data/spec/models/v2_document_content_spec.rb +42 -0
- data/spec/models/v2_document_spec.rb +70 -0
- data/spec/models/v2_money_spec.rb +42 -0
- data/spec/models/v2_profile_check_entry_spec.rb +76 -0
- data/spec/models/v2_profile_check_spec.rb +46 -0
- data/spec/models/v2_profile_create_spec.rb +48 -0
- data/spec/models/v2_profile_detail_spec.rb +96 -0
- data/spec/models/v2_profile_list_item_spec.rb +72 -0
- data/spec/models/v2_profile_update_check_spec.rb +52 -0
- data/spec/models/v2_profile_update_spec.rb +48 -0
- data/spec/models/v2_screening_check_entry_spec.rb +88 -0
- data/spec/models/v2_screening_check_list_item_spec.rb +52 -0
- data/spec/models/v2_screening_check_spec.rb +58 -0
- data/spec/models/v2_screening_create_spec.rb +48 -0
- data/spec/models/v2_screening_detail_profile_spec.rb +42 -0
- data/spec/models/v2_screening_detail_spec.rb +84 -0
- data/spec/models/v2_screening_list_item_spec.rb +84 -0
- data/spec/models/verify_webhook_spec.rb +36 -0
- data/spec/models/webhook_response_spec.rb +90 -0
- data/spec/models/webhook_spec.rb +64 -0
- data/spec/spec_helper.rb +111 -0
- metadata +299 -0
|
@@ -0,0 +1,432 @@
|
|
|
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 ProfilesApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# @param v2_profile_create [V2ProfileCreate]
|
|
23
|
+
# @param [Hash] opts the optional parameters
|
|
24
|
+
# @return [V2ProfileDetail]
|
|
25
|
+
def v2_profiles_create(v2_profile_create, opts = {})
|
|
26
|
+
data, _status_code, _headers = v2_profiles_create_with_http_info(v2_profile_create, opts)
|
|
27
|
+
data
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# @param v2_profile_create [V2ProfileCreate]
|
|
31
|
+
# @param [Hash] opts the optional parameters
|
|
32
|
+
# @return [Array<(V2ProfileDetail, Integer, Hash)>] V2ProfileDetail data, response status code and response headers
|
|
33
|
+
def v2_profiles_create_with_http_info(v2_profile_create, opts = {})
|
|
34
|
+
if @api_client.config.debugging
|
|
35
|
+
@api_client.config.logger.debug 'Calling API: ProfilesApi.v2_profiles_create ...'
|
|
36
|
+
end
|
|
37
|
+
# verify the required parameter 'v2_profile_create' is set
|
|
38
|
+
if @api_client.config.client_side_validation && v2_profile_create.nil?
|
|
39
|
+
fail ArgumentError, "Missing the required parameter 'v2_profile_create' when calling ProfilesApi.v2_profiles_create"
|
|
40
|
+
end
|
|
41
|
+
# resource path
|
|
42
|
+
local_var_path = '/api/v2/profiles/'
|
|
43
|
+
|
|
44
|
+
# query parameters
|
|
45
|
+
query_params = opts[:query_params] || {}
|
|
46
|
+
|
|
47
|
+
# header parameters
|
|
48
|
+
header_params = opts[:header_params] || {}
|
|
49
|
+
# HTTP header 'Accept' (if needed)
|
|
50
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
51
|
+
# HTTP header 'Content-Type'
|
|
52
|
+
content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])
|
|
53
|
+
if !content_type.nil?
|
|
54
|
+
header_params['Content-Type'] = content_type
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# form parameters
|
|
58
|
+
form_params = opts[:form_params] || {}
|
|
59
|
+
|
|
60
|
+
# http body (model)
|
|
61
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(v2_profile_create)
|
|
62
|
+
|
|
63
|
+
# return_type
|
|
64
|
+
return_type = opts[:debug_return_type] || 'V2ProfileDetail'
|
|
65
|
+
|
|
66
|
+
# auth_names
|
|
67
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
|
68
|
+
|
|
69
|
+
new_options = opts.merge(
|
|
70
|
+
:operation => :"ProfilesApi.v2_profiles_create",
|
|
71
|
+
:header_params => header_params,
|
|
72
|
+
:query_params => query_params,
|
|
73
|
+
:form_params => form_params,
|
|
74
|
+
:body => post_body,
|
|
75
|
+
:auth_names => auth_names,
|
|
76
|
+
:return_type => return_type
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
80
|
+
if @api_client.config.debugging
|
|
81
|
+
@api_client.config.logger.debug "API called: ProfilesApi#v2_profiles_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
82
|
+
end
|
|
83
|
+
return data, status_code, headers
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# @param id [String] A UUID string identifying this profile.
|
|
87
|
+
# @param [Hash] opts the optional parameters
|
|
88
|
+
# @return [nil]
|
|
89
|
+
def v2_profiles_destroy(id, opts = {})
|
|
90
|
+
v2_profiles_destroy_with_http_info(id, opts)
|
|
91
|
+
nil
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# @param id [String] A UUID string identifying this profile.
|
|
95
|
+
# @param [Hash] opts the optional parameters
|
|
96
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
97
|
+
def v2_profiles_destroy_with_http_info(id, opts = {})
|
|
98
|
+
if @api_client.config.debugging
|
|
99
|
+
@api_client.config.logger.debug 'Calling API: ProfilesApi.v2_profiles_destroy ...'
|
|
100
|
+
end
|
|
101
|
+
# verify the required parameter 'id' is set
|
|
102
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
103
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ProfilesApi.v2_profiles_destroy"
|
|
104
|
+
end
|
|
105
|
+
# resource path
|
|
106
|
+
local_var_path = '/api/v2/profiles/{id}/'.sub('{id}', CGI.escape(id.to_s))
|
|
107
|
+
|
|
108
|
+
# query parameters
|
|
109
|
+
query_params = opts[:query_params] || {}
|
|
110
|
+
|
|
111
|
+
# header parameters
|
|
112
|
+
header_params = opts[:header_params] || {}
|
|
113
|
+
|
|
114
|
+
# form parameters
|
|
115
|
+
form_params = opts[:form_params] || {}
|
|
116
|
+
|
|
117
|
+
# http body (model)
|
|
118
|
+
post_body = opts[:debug_body]
|
|
119
|
+
|
|
120
|
+
# return_type
|
|
121
|
+
return_type = opts[:debug_return_type]
|
|
122
|
+
|
|
123
|
+
# auth_names
|
|
124
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
|
125
|
+
|
|
126
|
+
new_options = opts.merge(
|
|
127
|
+
:operation => :"ProfilesApi.v2_profiles_destroy",
|
|
128
|
+
:header_params => header_params,
|
|
129
|
+
:query_params => query_params,
|
|
130
|
+
:form_params => form_params,
|
|
131
|
+
:body => post_body,
|
|
132
|
+
:auth_names => auth_names,
|
|
133
|
+
:return_type => return_type
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
137
|
+
if @api_client.config.debugging
|
|
138
|
+
@api_client.config.logger.debug "API called: ProfilesApi#v2_profiles_destroy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
139
|
+
end
|
|
140
|
+
return data, status_code, headers
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# @param [Hash] opts the optional parameters
|
|
144
|
+
# @option opts [String] :check_type Restrict to profiles containing at least one check of this type.
|
|
145
|
+
# @option opts [Boolean] :is_custom Restrict to custom (true) or system (false) profiles.
|
|
146
|
+
# @option opts [String] :name Restrict to profiles whose name contains this value (case-insensitive).
|
|
147
|
+
# @option opts [Integer] :page A page number within the paginated result set. (default to 1)
|
|
148
|
+
# @option opts [Integer] :page_size Number of results to return per page. (default to 50)
|
|
149
|
+
# @option opts [Boolean] :paginate Enable/disable pagination. When false, max 500 records returned. (default to true)
|
|
150
|
+
# @option opts [String] :sort Which field to use when ordering the results.
|
|
151
|
+
# @return [PaginatedV2ProfileListItemList]
|
|
152
|
+
def v2_profiles_list(opts = {})
|
|
153
|
+
data, _status_code, _headers = v2_profiles_list_with_http_info(opts)
|
|
154
|
+
data
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# @param [Hash] opts the optional parameters
|
|
158
|
+
# @option opts [String] :check_type Restrict to profiles containing at least one check of this type.
|
|
159
|
+
# @option opts [Boolean] :is_custom Restrict to custom (true) or system (false) profiles.
|
|
160
|
+
# @option opts [String] :name Restrict to profiles whose name contains this value (case-insensitive).
|
|
161
|
+
# @option opts [Integer] :page A page number within the paginated result set. (default to 1)
|
|
162
|
+
# @option opts [Integer] :page_size Number of results to return per page. (default to 50)
|
|
163
|
+
# @option opts [Boolean] :paginate Enable/disable pagination. When false, max 500 records returned. (default to true)
|
|
164
|
+
# @option opts [String] :sort Which field to use when ordering the results.
|
|
165
|
+
# @return [Array<(PaginatedV2ProfileListItemList, Integer, Hash)>] PaginatedV2ProfileListItemList data, response status code and response headers
|
|
166
|
+
def v2_profiles_list_with_http_info(opts = {})
|
|
167
|
+
if @api_client.config.debugging
|
|
168
|
+
@api_client.config.logger.debug 'Calling API: ProfilesApi.v2_profiles_list ...'
|
|
169
|
+
end
|
|
170
|
+
allowable_values = ["addresscheck", "adversemediacheck", "bigcheck", "criminalrecordscheck", "criminalrecordsuploadcheck", "customintegritycheck", "cvcheck", "edrcheck", "id2check", "integritycheck", "openhealthcarecheck", "qualificationcheck", "righttoworkcheck", "vogcheck", "watchlist2check", "watchlistcheck", "workreferencecheck", "worldwidecreditcheck"]
|
|
171
|
+
if @api_client.config.client_side_validation && opts[:'check_type'] && !allowable_values.include?(opts[:'check_type'])
|
|
172
|
+
fail ArgumentError, "invalid value for \"check_type\", must be one of #{allowable_values}"
|
|
173
|
+
end
|
|
174
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
175
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling ProfilesApi.v2_profiles_list, must be greater than or equal to 1.'
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100
|
|
179
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ProfilesApi.v2_profiles_list, must be smaller than or equal to 100.'
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
|
|
183
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ProfilesApi.v2_profiles_list, must be greater than or equal to 1.'
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# resource path
|
|
187
|
+
local_var_path = '/api/v2/profiles/'
|
|
188
|
+
|
|
189
|
+
# query parameters
|
|
190
|
+
query_params = opts[:query_params] || {}
|
|
191
|
+
query_params[:'check_type'] = opts[:'check_type'] if !opts[:'check_type'].nil?
|
|
192
|
+
query_params[:'is_custom'] = opts[:'is_custom'] if !opts[:'is_custom'].nil?
|
|
193
|
+
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
|
194
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
195
|
+
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
196
|
+
query_params[:'paginate'] = opts[:'paginate'] if !opts[:'paginate'].nil?
|
|
197
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
198
|
+
|
|
199
|
+
# header parameters
|
|
200
|
+
header_params = opts[:header_params] || {}
|
|
201
|
+
# HTTP header 'Accept' (if needed)
|
|
202
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
203
|
+
|
|
204
|
+
# form parameters
|
|
205
|
+
form_params = opts[:form_params] || {}
|
|
206
|
+
|
|
207
|
+
# http body (model)
|
|
208
|
+
post_body = opts[:debug_body]
|
|
209
|
+
|
|
210
|
+
# return_type
|
|
211
|
+
return_type = opts[:debug_return_type] || 'PaginatedV2ProfileListItemList'
|
|
212
|
+
|
|
213
|
+
# auth_names
|
|
214
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
|
215
|
+
|
|
216
|
+
new_options = opts.merge(
|
|
217
|
+
:operation => :"ProfilesApi.v2_profiles_list",
|
|
218
|
+
:header_params => header_params,
|
|
219
|
+
:query_params => query_params,
|
|
220
|
+
:form_params => form_params,
|
|
221
|
+
:body => post_body,
|
|
222
|
+
:auth_names => auth_names,
|
|
223
|
+
:return_type => return_type
|
|
224
|
+
)
|
|
225
|
+
|
|
226
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
227
|
+
if @api_client.config.debugging
|
|
228
|
+
@api_client.config.logger.debug "API called: ProfilesApi#v2_profiles_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
229
|
+
end
|
|
230
|
+
return data, status_code, headers
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
# Update name and/or description only. Use PUT to change the check list.
|
|
234
|
+
# @param id [String] A UUID string identifying this profile.
|
|
235
|
+
# @param [Hash] opts the optional parameters
|
|
236
|
+
# @option opts [PatchedV2ProfilePartialUpdate] :patched_v2_profile_partial_update
|
|
237
|
+
# @return [V2ProfileDetail]
|
|
238
|
+
def v2_profiles_partial_update(id, opts = {})
|
|
239
|
+
data, _status_code, _headers = v2_profiles_partial_update_with_http_info(id, opts)
|
|
240
|
+
data
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
# Update name and/or description only. Use PUT to change the check list.
|
|
244
|
+
# @param id [String] A UUID string identifying this profile.
|
|
245
|
+
# @param [Hash] opts the optional parameters
|
|
246
|
+
# @option opts [PatchedV2ProfilePartialUpdate] :patched_v2_profile_partial_update
|
|
247
|
+
# @return [Array<(V2ProfileDetail, Integer, Hash)>] V2ProfileDetail data, response status code and response headers
|
|
248
|
+
def v2_profiles_partial_update_with_http_info(id, opts = {})
|
|
249
|
+
if @api_client.config.debugging
|
|
250
|
+
@api_client.config.logger.debug 'Calling API: ProfilesApi.v2_profiles_partial_update ...'
|
|
251
|
+
end
|
|
252
|
+
# verify the required parameter 'id' is set
|
|
253
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
254
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ProfilesApi.v2_profiles_partial_update"
|
|
255
|
+
end
|
|
256
|
+
# resource path
|
|
257
|
+
local_var_path = '/api/v2/profiles/{id}/'.sub('{id}', CGI.escape(id.to_s))
|
|
258
|
+
|
|
259
|
+
# query parameters
|
|
260
|
+
query_params = opts[:query_params] || {}
|
|
261
|
+
|
|
262
|
+
# header parameters
|
|
263
|
+
header_params = opts[:header_params] || {}
|
|
264
|
+
# HTTP header 'Accept' (if needed)
|
|
265
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
266
|
+
# HTTP header 'Content-Type'
|
|
267
|
+
content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])
|
|
268
|
+
if !content_type.nil?
|
|
269
|
+
header_params['Content-Type'] = content_type
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
# form parameters
|
|
273
|
+
form_params = opts[:form_params] || {}
|
|
274
|
+
|
|
275
|
+
# http body (model)
|
|
276
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'patched_v2_profile_partial_update'])
|
|
277
|
+
|
|
278
|
+
# return_type
|
|
279
|
+
return_type = opts[:debug_return_type] || 'V2ProfileDetail'
|
|
280
|
+
|
|
281
|
+
# auth_names
|
|
282
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
|
283
|
+
|
|
284
|
+
new_options = opts.merge(
|
|
285
|
+
:operation => :"ProfilesApi.v2_profiles_partial_update",
|
|
286
|
+
:header_params => header_params,
|
|
287
|
+
:query_params => query_params,
|
|
288
|
+
:form_params => form_params,
|
|
289
|
+
:body => post_body,
|
|
290
|
+
:auth_names => auth_names,
|
|
291
|
+
:return_type => return_type
|
|
292
|
+
)
|
|
293
|
+
|
|
294
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
295
|
+
if @api_client.config.debugging
|
|
296
|
+
@api_client.config.logger.debug "API called: ProfilesApi#v2_profiles_partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
297
|
+
end
|
|
298
|
+
return data, status_code, headers
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
# @param id [String] A UUID string identifying this profile.
|
|
302
|
+
# @param [Hash] opts the optional parameters
|
|
303
|
+
# @return [V2ProfileDetail]
|
|
304
|
+
def v2_profiles_retrieve(id, opts = {})
|
|
305
|
+
data, _status_code, _headers = v2_profiles_retrieve_with_http_info(id, opts)
|
|
306
|
+
data
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
# @param id [String] A UUID string identifying this profile.
|
|
310
|
+
# @param [Hash] opts the optional parameters
|
|
311
|
+
# @return [Array<(V2ProfileDetail, Integer, Hash)>] V2ProfileDetail data, response status code and response headers
|
|
312
|
+
def v2_profiles_retrieve_with_http_info(id, opts = {})
|
|
313
|
+
if @api_client.config.debugging
|
|
314
|
+
@api_client.config.logger.debug 'Calling API: ProfilesApi.v2_profiles_retrieve ...'
|
|
315
|
+
end
|
|
316
|
+
# verify the required parameter 'id' is set
|
|
317
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
318
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ProfilesApi.v2_profiles_retrieve"
|
|
319
|
+
end
|
|
320
|
+
# resource path
|
|
321
|
+
local_var_path = '/api/v2/profiles/{id}/'.sub('{id}', CGI.escape(id.to_s))
|
|
322
|
+
|
|
323
|
+
# query parameters
|
|
324
|
+
query_params = opts[:query_params] || {}
|
|
325
|
+
|
|
326
|
+
# header parameters
|
|
327
|
+
header_params = opts[:header_params] || {}
|
|
328
|
+
# HTTP header 'Accept' (if needed)
|
|
329
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
330
|
+
|
|
331
|
+
# form parameters
|
|
332
|
+
form_params = opts[:form_params] || {}
|
|
333
|
+
|
|
334
|
+
# http body (model)
|
|
335
|
+
post_body = opts[:debug_body]
|
|
336
|
+
|
|
337
|
+
# return_type
|
|
338
|
+
return_type = opts[:debug_return_type] || 'V2ProfileDetail'
|
|
339
|
+
|
|
340
|
+
# auth_names
|
|
341
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
|
342
|
+
|
|
343
|
+
new_options = opts.merge(
|
|
344
|
+
:operation => :"ProfilesApi.v2_profiles_retrieve",
|
|
345
|
+
:header_params => header_params,
|
|
346
|
+
:query_params => query_params,
|
|
347
|
+
:form_params => form_params,
|
|
348
|
+
:body => post_body,
|
|
349
|
+
:auth_names => auth_names,
|
|
350
|
+
:return_type => return_type
|
|
351
|
+
)
|
|
352
|
+
|
|
353
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
354
|
+
if @api_client.config.debugging
|
|
355
|
+
@api_client.config.logger.debug "API called: ProfilesApi#v2_profiles_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
356
|
+
end
|
|
357
|
+
return data, status_code, headers
|
|
358
|
+
end
|
|
359
|
+
|
|
360
|
+
# Replace the profile. Checks matched by profile_check_id are updated in place; entries without one are added; existing checks not referenced in the request are removed.
|
|
361
|
+
# @param id [String] A UUID string identifying this profile.
|
|
362
|
+
# @param v2_profile_update [V2ProfileUpdate]
|
|
363
|
+
# @param [Hash] opts the optional parameters
|
|
364
|
+
# @return [V2ProfileDetail]
|
|
365
|
+
def v2_profiles_update(id, v2_profile_update, opts = {})
|
|
366
|
+
data, _status_code, _headers = v2_profiles_update_with_http_info(id, v2_profile_update, opts)
|
|
367
|
+
data
|
|
368
|
+
end
|
|
369
|
+
|
|
370
|
+
# Replace the profile. Checks matched by profile_check_id are updated in place; entries without one are added; existing checks not referenced in the request are removed.
|
|
371
|
+
# @param id [String] A UUID string identifying this profile.
|
|
372
|
+
# @param v2_profile_update [V2ProfileUpdate]
|
|
373
|
+
# @param [Hash] opts the optional parameters
|
|
374
|
+
# @return [Array<(V2ProfileDetail, Integer, Hash)>] V2ProfileDetail data, response status code and response headers
|
|
375
|
+
def v2_profiles_update_with_http_info(id, v2_profile_update, opts = {})
|
|
376
|
+
if @api_client.config.debugging
|
|
377
|
+
@api_client.config.logger.debug 'Calling API: ProfilesApi.v2_profiles_update ...'
|
|
378
|
+
end
|
|
379
|
+
# verify the required parameter 'id' is set
|
|
380
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
381
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ProfilesApi.v2_profiles_update"
|
|
382
|
+
end
|
|
383
|
+
# verify the required parameter 'v2_profile_update' is set
|
|
384
|
+
if @api_client.config.client_side_validation && v2_profile_update.nil?
|
|
385
|
+
fail ArgumentError, "Missing the required parameter 'v2_profile_update' when calling ProfilesApi.v2_profiles_update"
|
|
386
|
+
end
|
|
387
|
+
# resource path
|
|
388
|
+
local_var_path = '/api/v2/profiles/{id}/'.sub('{id}', CGI.escape(id.to_s))
|
|
389
|
+
|
|
390
|
+
# query parameters
|
|
391
|
+
query_params = opts[:query_params] || {}
|
|
392
|
+
|
|
393
|
+
# header parameters
|
|
394
|
+
header_params = opts[:header_params] || {}
|
|
395
|
+
# HTTP header 'Accept' (if needed)
|
|
396
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
397
|
+
# HTTP header 'Content-Type'
|
|
398
|
+
content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])
|
|
399
|
+
if !content_type.nil?
|
|
400
|
+
header_params['Content-Type'] = content_type
|
|
401
|
+
end
|
|
402
|
+
|
|
403
|
+
# form parameters
|
|
404
|
+
form_params = opts[:form_params] || {}
|
|
405
|
+
|
|
406
|
+
# http body (model)
|
|
407
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(v2_profile_update)
|
|
408
|
+
|
|
409
|
+
# return_type
|
|
410
|
+
return_type = opts[:debug_return_type] || 'V2ProfileDetail'
|
|
411
|
+
|
|
412
|
+
# auth_names
|
|
413
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
|
414
|
+
|
|
415
|
+
new_options = opts.merge(
|
|
416
|
+
:operation => :"ProfilesApi.v2_profiles_update",
|
|
417
|
+
:header_params => header_params,
|
|
418
|
+
:query_params => query_params,
|
|
419
|
+
:form_params => form_params,
|
|
420
|
+
:body => post_body,
|
|
421
|
+
:auth_names => auth_names,
|
|
422
|
+
:return_type => return_type
|
|
423
|
+
)
|
|
424
|
+
|
|
425
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
426
|
+
if @api_client.config.debugging
|
|
427
|
+
@api_client.config.logger.debug "API called: ProfilesApi#v2_profiles_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
428
|
+
end
|
|
429
|
+
return data, status_code, headers
|
|
430
|
+
end
|
|
431
|
+
end
|
|
432
|
+
end
|