psi_eligibility 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/README.md +123 -0
  4. data/Rakefile +8 -0
  5. data/docs/AdditionalAttributeModel.md +9 -0
  6. data/docs/CandidateModel.md +24 -0
  7. data/docs/DefaultApi.md +411 -0
  8. data/docs/EligibilityModel.md +13 -0
  9. data/docs/EligibilityResponseModel.md +8 -0
  10. data/docs/ErrorModel.md +9 -0
  11. data/docs/ExistingEligibilityModel.md +18 -0
  12. data/docs/TestLaunchInfoModel.md +8 -0
  13. data/git_push.sh +55 -0
  14. data/lib/psi_eligibility.rb +47 -0
  15. data/lib/psi_eligibility/api/default_api.rb +454 -0
  16. data/lib/psi_eligibility/api_client.rb +389 -0
  17. data/lib/psi_eligibility/api_error.rb +38 -0
  18. data/lib/psi_eligibility/configuration.rb +216 -0
  19. data/lib/psi_eligibility/models/additional_attribute_model.rb +195 -0
  20. data/lib/psi_eligibility/models/candidate_model.rb +350 -0
  21. data/lib/psi_eligibility/models/eligibility_model.rb +246 -0
  22. data/lib/psi_eligibility/models/eligibility_response_model.rb +184 -0
  23. data/lib/psi_eligibility/models/error_model.rb +194 -0
  24. data/lib/psi_eligibility/models/existing_eligibility_model.rb +320 -0
  25. data/lib/psi_eligibility/models/test_launch_info_model.rb +183 -0
  26. data/lib/psi_eligibility/version.rb +15 -0
  27. data/psi_eligibility-1.0.0.gem +0 -0
  28. data/psi_eligibility.gemspec +45 -0
  29. data/spec/api/default_api_spec.rb +130 -0
  30. data/spec/api_client_spec.rb +226 -0
  31. data/spec/configuration_spec.rb +42 -0
  32. data/spec/models/additional_attribute_model_spec.rb +47 -0
  33. data/spec/models/candidate_model_spec.rb +137 -0
  34. data/spec/models/eligibility_model_spec.rb +71 -0
  35. data/spec/models/eligibility_response_model_spec.rb +41 -0
  36. data/spec/models/error_model_spec.rb +47 -0
  37. data/spec/models/existing_eligibility_model_spec.rb +105 -0
  38. data/spec/models/test_launch_info_model_spec.rb +41 -0
  39. data/spec/spec_helper.rb +111 -0
  40. metadata +272 -0
@@ -0,0 +1,13 @@
1
+ # PsiEligibility::EligibilityModel
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **eligibility_end_date** | **String** | The last date possible for the candidate to schedule on. Java ISO_OFFSET_DATE_TIME format. Required when creating a new eligibility. | [optional]
7
+ **candidate** | [**CandidateModel**](CandidateModel.md) | |
8
+ **portion_codes** | **Array<String>** | If required, specific portion codes may be supplied. | [optional]
9
+ **schedule_start_date** | **String** | The first date possible for the candidate to schedule on. Java ISO_OFFSET_DATE_TIME format. Required when creating a new eligibility. | [optional]
10
+ **test_code** | **String** | The client specific test code for the eligibility to be created against. |
11
+ **client_eligibility_id** | **String** | Client provided unique key for this eligibility. | [optional]
12
+
13
+
@@ -0,0 +1,8 @@
1
+ # PsiEligibility::EligibilityResponseModel
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **psi_eligiblity_id** | **String** | The eligibility identifier. | [optional]
7
+
8
+
@@ -0,0 +1,9 @@
1
+ # PsiEligibility::ErrorModel
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **error_description** | **String** | Error Description. | [optional]
7
+ **error** | **String** | Error Code. | [optional]
8
+
9
+
@@ -0,0 +1,18 @@
1
+ # PsiEligibility::ExistingEligibilityModel
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **eligibility_end_date** | **String** | The last date possible for the candidate to schedule on. Java ISO_OFFSET_DATE_TIME format. | [optional]
7
+ **candidate** | [**CandidateModel**](CandidateModel.md) | | [optional]
8
+ **portion_codes** | **Array<String>** | If required, specific portion codes may be supplied. | [optional]
9
+ **schedule_start_date** | **String** | The first date possible for the candidate to schedule on. Java ISO_OFFSET_DATE_TIME format. | [optional]
10
+ **eligibility_status_message** | **String** | Any pertinent message about why a candidate is not eligibile to scheduled yet. Common reasons can be because they have been blocked, have pending special accommodations or other similar reasons. Will be null if candidate is eligible to schedule. | [optional]
11
+ **test_code** | **String** | The client specific test code for the eligibility to be created against. | [optional]
12
+ **eligible_to_schedule** | **BOOLEAN** | Whether or not this candidate is eligibile to be scheduled. | [optional]
13
+ **psi_eligiblity_id** | **String** | PSI's unique identifier for this eligibility. | [optional]
14
+ **created_datetime** | **String** | Datetime when the eligibility was created. ISO 8601 format similar to Java ISO_OFFSET_DATE_TIME format. | [optional]
15
+ **client_eligibility_id** | **String** | Client's unique identifier for this eligibility if provided. | [optional]
16
+ **status** | **String** | Only set on this object when returned back to client. Setting this has no effect when provided as part of a create or update. This is the 4 different eligibility statuses available for a candidate: REG01 is Registration Pending, REG02 is Registration approved, REG03 is Cancelled, REG04 is Scheduled | [optional]
17
+
18
+
@@ -0,0 +1,8 @@
1
+ # PsiEligibility::TestLaunchInfoModel
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **test_launch_url** | **String** | | [optional]
7
+
8
+
data/git_push.sh ADDED
@@ -0,0 +1,55 @@
1
+ #!/bin/sh
2
+ #
3
+ # Generated by: https://github.com/swagger-api/swagger-codegen.git
4
+ #
5
+ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
6
+ #
7
+ # Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
8
+
9
+ git_user_id=$1
10
+ git_repo_id=$2
11
+ release_note=$3
12
+
13
+ if [ "$git_user_id" = "" ]; then
14
+ git_user_id=""
15
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
16
+ fi
17
+
18
+ if [ "$git_repo_id" = "" ]; then
19
+ git_repo_id=""
20
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
21
+ fi
22
+
23
+ if [ "$release_note" = "" ]; then
24
+ release_note=""
25
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
26
+ fi
27
+
28
+ # Initialize the local directory as a Git repository
29
+ git init
30
+
31
+ # Adds the files in the local repository and stages them for commit.
32
+ git add .
33
+
34
+ # Commits the tracked changes and prepares them to be pushed to a remote repository.
35
+ git commit -m "$release_note"
36
+
37
+ # Sets the new remote
38
+ git_remote=`git remote`
39
+ if [ "$git_remote" = "" ]; then # git remote not defined
40
+
41
+ if [ "$GIT_TOKEN" = "" ]; then
42
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
43
+ git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
44
+ else
45
+ git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
46
+ fi
47
+
48
+ fi
49
+
50
+ git pull origin master
51
+
52
+ # Pushes (Forces) the changes in the local repository up to the remote repository
53
+ echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
54
+ git push origin master 2>&1 | grep -v 'To https'
55
+
@@ -0,0 +1,47 @@
1
+ =begin
2
+ #PSI Candidate Rest Eligibility Service
3
+
4
+ #PSIs REST based service to modify candidate test eligibilities.
5
+
6
+ OpenAPI spec version: 1.0.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.10
10
+
11
+ =end
12
+
13
+ # Common files
14
+ require 'psi_eligibility/api_client'
15
+ require 'psi_eligibility/api_error'
16
+ require 'psi_eligibility/version'
17
+ require 'psi_eligibility/configuration'
18
+
19
+ # Models
20
+ require 'psi_eligibility/models/additional_attribute_model'
21
+ require 'psi_eligibility/models/candidate_model'
22
+ require 'psi_eligibility/models/eligibility_model'
23
+ require 'psi_eligibility/models/eligibility_response_model'
24
+ require 'psi_eligibility/models/error_model'
25
+ require 'psi_eligibility/models/existing_eligibility_model'
26
+ require 'psi_eligibility/models/test_launch_info_model'
27
+
28
+ # APIs
29
+ require 'psi_eligibility/api/default_api'
30
+
31
+ module PsiEligibility
32
+ class << self
33
+ # Customize default settings for the SDK using block.
34
+ # PsiEligibility.configure do |config|
35
+ # config.username = "xxx"
36
+ # config.password = "xxx"
37
+ # end
38
+ # If no block given, return the default Configuration object.
39
+ def configure
40
+ if block_given?
41
+ yield(Configuration.default)
42
+ else
43
+ Configuration.default
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,454 @@
1
+ =begin
2
+ #PSI Candidate Rest Eligibility Service
3
+
4
+ #PSIs REST based service to modify candidate test eligibilities.
5
+
6
+ OpenAPI spec version: 1.0.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.10
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module PsiEligibility
16
+ class DefaultApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Cancel a candidate's eligibility record.
23
+ # Cancels the eligibility matching the supplied candidate eligiblity code.
24
+ # @param account_code provided client specific account code.
25
+ # @param candidate_id The unique candidate id to act on.
26
+ # @param test_code The test code.
27
+ # @param [Hash] opts the optional parameters
28
+ # @return [nil]
29
+ def cancel_candidate_eligibility(account_code, candidate_id, test_code, opts = {})
30
+ cancel_candidate_eligibility_with_http_info(account_code, candidate_id, test_code, opts)
31
+ nil
32
+ end
33
+
34
+ # Cancel a candidate&#39;s eligibility record.
35
+ # Cancels the eligibility matching the supplied candidate eligiblity code.
36
+ # @param account_code provided client specific account code.
37
+ # @param candidate_id The unique candidate id to act on.
38
+ # @param test_code The test code.
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
41
+ def cancel_candidate_eligibility_with_http_info(account_code, candidate_id, test_code, opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: DefaultApi.cancel_candidate_eligibility ...'
44
+ end
45
+ # verify the required parameter 'account_code' is set
46
+ if @api_client.config.client_side_validation && account_code.nil?
47
+ fail ArgumentError, "Missing the required parameter 'account_code' when calling DefaultApi.cancel_candidate_eligibility"
48
+ end
49
+ # verify the required parameter 'candidate_id' is set
50
+ if @api_client.config.client_side_validation && candidate_id.nil?
51
+ fail ArgumentError, "Missing the required parameter 'candidate_id' when calling DefaultApi.cancel_candidate_eligibility"
52
+ end
53
+ # verify the required parameter 'test_code' is set
54
+ if @api_client.config.client_side_validation && test_code.nil?
55
+ fail ArgumentError, "Missing the required parameter 'test_code' when calling DefaultApi.cancel_candidate_eligibility"
56
+ end
57
+ # resource path
58
+ local_var_path = '/accounts/{account_code}/candidates/{candidate_id}/tests/{test_code}'.sub('{' + 'account_code' + '}', account_code.to_s).sub('{' + 'candidate_id' + '}', candidate_id.to_s).sub('{' + 'test_code' + '}', test_code.to_s)
59
+
60
+ # query parameters
61
+ query_params = {}
62
+
63
+ # header parameters
64
+ header_params = {}
65
+ # HTTP header 'Accept' (if needed)
66
+ header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=UTF-8'])
67
+
68
+ # form parameters
69
+ form_params = {}
70
+
71
+ # http body (model)
72
+ post_body = nil
73
+ auth_names = ['oauth']
74
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
75
+ :header_params => header_params,
76
+ :query_params => query_params,
77
+ :form_params => form_params,
78
+ :body => post_body,
79
+ :auth_names => auth_names)
80
+ if @api_client.config.debugging
81
+ @api_client.config.logger.debug "API called: DefaultApi#cancel_candidate_eligibility\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
+ end
83
+ return data, status_code, headers
84
+ end
85
+ # Create a new candidate eligibility record.
86
+ # Submits a single eligibilites to the PSI Atlas system. Many parameters are optional but the more the better.
87
+ # @param account_code provided client specific account code.
88
+ # @param payload A new eligibility record.
89
+ # @param [Hash] opts the optional parameters
90
+ # @return [EligibilityResponseModel]
91
+ def create_candidate(account_code, payload, opts = {})
92
+ data, _status_code, _headers = create_candidate_with_http_info(account_code, payload, opts)
93
+ data
94
+ end
95
+
96
+ # Create a new candidate eligibility record.
97
+ # Submits a single eligibilites to the PSI Atlas system. Many parameters are optional but the more the better.
98
+ # @param account_code provided client specific account code.
99
+ # @param payload A new eligibility record.
100
+ # @param [Hash] opts the optional parameters
101
+ # @return [Array<(EligibilityResponseModel, Fixnum, Hash)>] EligibilityResponseModel data, response status code and response headers
102
+ def create_candidate_with_http_info(account_code, payload, opts = {})
103
+ if @api_client.config.debugging
104
+ @api_client.config.logger.debug 'Calling API: DefaultApi.create_candidate ...'
105
+ end
106
+ # verify the required parameter 'account_code' is set
107
+ if @api_client.config.client_side_validation && account_code.nil?
108
+ fail ArgumentError, "Missing the required parameter 'account_code' when calling DefaultApi.create_candidate"
109
+ end
110
+ # verify the required parameter 'payload' is set
111
+ if @api_client.config.client_side_validation && payload.nil?
112
+ fail ArgumentError, "Missing the required parameter 'payload' when calling DefaultApi.create_candidate"
113
+ end
114
+ # resource path
115
+ local_var_path = '/accounts/{account_code}/candidates'.sub('{' + 'account_code' + '}', account_code.to_s)
116
+
117
+ # query parameters
118
+ query_params = {}
119
+
120
+ # header parameters
121
+ header_params = {}
122
+ # HTTP header 'Accept' (if needed)
123
+ header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=UTF-8'])
124
+ # HTTP header 'Content-Type'
125
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
126
+
127
+ # form parameters
128
+ form_params = {}
129
+
130
+ # http body (model)
131
+ post_body = @api_client.object_to_http_body(payload)
132
+ auth_names = ['oauth']
133
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
134
+ :header_params => header_params,
135
+ :query_params => query_params,
136
+ :form_params => form_params,
137
+ :body => post_body,
138
+ :auth_names => auth_names,
139
+ :return_type => 'EligibilityResponseModel')
140
+ if @api_client.config.debugging
141
+ @api_client.config.logger.debug "API called: DefaultApi#create_candidate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
142
+ end
143
+ return data, status_code, headers
144
+ end
145
+ # Get the eligiblities associated with the candidate id.
146
+ # Get's all of the eligibilities associated with the supplied candidate_id. This is useful to decide which specific eligibility needs to be updated or deleted.
147
+ # @param account_code provided client specific account code.
148
+ # @param candidate_id the candidate id.
149
+ # @param [Hash] opts the optional parameters
150
+ # @return [Array<ExistingEligibilityModel>]
151
+ def get_candidate(account_code, candidate_id, opts = {})
152
+ data, _status_code, _headers = get_candidate_with_http_info(account_code, candidate_id, opts)
153
+ data
154
+ end
155
+
156
+ # Get the eligiblities associated with the candidate id.
157
+ # Get&#39;s all of the eligibilities associated with the supplied candidate_id. This is useful to decide which specific eligibility needs to be updated or deleted.
158
+ # @param account_code provided client specific account code.
159
+ # @param candidate_id the candidate id.
160
+ # @param [Hash] opts the optional parameters
161
+ # @return [Array<(Array<ExistingEligibilityModel>, Fixnum, Hash)>] Array<ExistingEligibilityModel> data, response status code and response headers
162
+ def get_candidate_with_http_info(account_code, candidate_id, opts = {})
163
+ if @api_client.config.debugging
164
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_candidate ...'
165
+ end
166
+ # verify the required parameter 'account_code' is set
167
+ if @api_client.config.client_side_validation && account_code.nil?
168
+ fail ArgumentError, "Missing the required parameter 'account_code' when calling DefaultApi.get_candidate"
169
+ end
170
+ # verify the required parameter 'candidate_id' is set
171
+ if @api_client.config.client_side_validation && candidate_id.nil?
172
+ fail ArgumentError, "Missing the required parameter 'candidate_id' when calling DefaultApi.get_candidate"
173
+ end
174
+ # resource path
175
+ local_var_path = '/accounts/{account_code}/candidates/{candidate_id}'.sub('{' + 'account_code' + '}', account_code.to_s).sub('{' + 'candidate_id' + '}', candidate_id.to_s)
176
+
177
+ # query parameters
178
+ query_params = {}
179
+
180
+ # header parameters
181
+ header_params = {}
182
+ # HTTP header 'Accept' (if needed)
183
+ header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=UTF-8'])
184
+
185
+ # form parameters
186
+ form_params = {}
187
+
188
+ # http body (model)
189
+ post_body = nil
190
+ auth_names = ['oauth']
191
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
192
+ :header_params => header_params,
193
+ :query_params => query_params,
194
+ :form_params => form_params,
195
+ :body => post_body,
196
+ :auth_names => auth_names,
197
+ :return_type => 'Array<ExistingEligibilityModel>')
198
+ if @api_client.config.debugging
199
+ @api_client.config.logger.debug "API called: DefaultApi#get_candidate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
200
+ end
201
+ return data, status_code, headers
202
+ end
203
+ # Get the eligiblities associated with the candidate id.
204
+ # Get's all of the eligibilities associated with the supplied candidate_id fpr a specific test code.
205
+ # @param account_code provided client specific account code.
206
+ # @param candidate_id the candidate id.
207
+ # @param test_code The test code.
208
+ # @param [Hash] opts the optional parameters
209
+ # @return [Array<ExistingEligibilityModel>]
210
+ def get_candidate_eligibilities(account_code, candidate_id, test_code, opts = {})
211
+ data, _status_code, _headers = get_candidate_eligibilities_with_http_info(account_code, candidate_id, test_code, opts)
212
+ data
213
+ end
214
+
215
+ # Get the eligiblities associated with the candidate id.
216
+ # Get&#39;s all of the eligibilities associated with the supplied candidate_id fpr a specific test code.
217
+ # @param account_code provided client specific account code.
218
+ # @param candidate_id the candidate id.
219
+ # @param test_code The test code.
220
+ # @param [Hash] opts the optional parameters
221
+ # @return [Array<(Array<ExistingEligibilityModel>, Fixnum, Hash)>] Array<ExistingEligibilityModel> data, response status code and response headers
222
+ def get_candidate_eligibilities_with_http_info(account_code, candidate_id, test_code, opts = {})
223
+ if @api_client.config.debugging
224
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_candidate_eligibilities ...'
225
+ end
226
+ # verify the required parameter 'account_code' is set
227
+ if @api_client.config.client_side_validation && account_code.nil?
228
+ fail ArgumentError, "Missing the required parameter 'account_code' when calling DefaultApi.get_candidate_eligibilities"
229
+ end
230
+ # verify the required parameter 'candidate_id' is set
231
+ if @api_client.config.client_side_validation && candidate_id.nil?
232
+ fail ArgumentError, "Missing the required parameter 'candidate_id' when calling DefaultApi.get_candidate_eligibilities"
233
+ end
234
+ # verify the required parameter 'test_code' is set
235
+ if @api_client.config.client_side_validation && test_code.nil?
236
+ fail ArgumentError, "Missing the required parameter 'test_code' when calling DefaultApi.get_candidate_eligibilities"
237
+ end
238
+ # resource path
239
+ local_var_path = '/accounts/{account_code}/candidates/{candidate_id}/tests/{test_code}'.sub('{' + 'account_code' + '}', account_code.to_s).sub('{' + 'candidate_id' + '}', candidate_id.to_s).sub('{' + 'test_code' + '}', test_code.to_s)
240
+
241
+ # query parameters
242
+ query_params = {}
243
+
244
+ # header parameters
245
+ header_params = {}
246
+ # HTTP header 'Accept' (if needed)
247
+ header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=UTF-8'])
248
+
249
+ # form parameters
250
+ form_params = {}
251
+
252
+ # http body (model)
253
+ post_body = nil
254
+ auth_names = ['oauth']
255
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
256
+ :header_params => header_params,
257
+ :query_params => query_params,
258
+ :form_params => form_params,
259
+ :body => post_body,
260
+ :auth_names => auth_names,
261
+ :return_type => 'Array<ExistingEligibilityModel>')
262
+ if @api_client.config.debugging
263
+ @api_client.config.logger.debug "API called: DefaultApi#get_candidate_eligibilities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
264
+ end
265
+ return data, status_code, headers
266
+ end
267
+ # GET test launch url
268
+ # API endpoint to retrieve the test launch URL for a given eligibility code.
269
+ # @param psi_eligibility_code
270
+ # @param [Hash] opts the optional parameters
271
+ # @return [TestLaunchInfoModel]
272
+ def get_test_launch_info(psi_eligibility_code, opts = {})
273
+ data, _status_code, _headers = get_test_launch_info_with_http_info(psi_eligibility_code, opts)
274
+ data
275
+ end
276
+
277
+ # GET test launch url
278
+ # API endpoint to retrieve the test launch URL for a given eligibility code.
279
+ # @param psi_eligibility_code
280
+ # @param [Hash] opts the optional parameters
281
+ # @return [Array<(TestLaunchInfoModel, Fixnum, Hash)>] TestLaunchInfoModel data, response status code and response headers
282
+ def get_test_launch_info_with_http_info(psi_eligibility_code, opts = {})
283
+ if @api_client.config.debugging
284
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_test_launch_info ...'
285
+ end
286
+ # verify the required parameter 'psi_eligibility_code' is set
287
+ if @api_client.config.client_side_validation && psi_eligibility_code.nil?
288
+ fail ArgumentError, "Missing the required parameter 'psi_eligibility_code' when calling DefaultApi.get_test_launch_info"
289
+ end
290
+ # resource path
291
+ local_var_path = '/eligibilities/{psi_eligibility_code}/testLaunchInfo'.sub('{' + 'psi_eligibility_code' + '}', psi_eligibility_code.to_s)
292
+
293
+ # query parameters
294
+ query_params = {}
295
+
296
+ # header parameters
297
+ header_params = {}
298
+ # HTTP header 'Accept' (if needed)
299
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
300
+
301
+ # form parameters
302
+ form_params = {}
303
+
304
+ # http body (model)
305
+ post_body = nil
306
+ auth_names = ['oauth']
307
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
308
+ :header_params => header_params,
309
+ :query_params => query_params,
310
+ :form_params => form_params,
311
+ :body => post_body,
312
+ :auth_names => auth_names,
313
+ :return_type => 'TestLaunchInfoModel')
314
+ if @api_client.config.debugging
315
+ @api_client.config.logger.debug "API called: DefaultApi#get_test_launch_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
316
+ end
317
+ return data, status_code, headers
318
+ end
319
+ # Associate a set of voucher codes to PSI Candidate Test Eligibility record. Previously attached vouchers to the eligibility record but not listed in the input would be unlinked from the eligibility record. Voucher Codes are agreed upon codes between PSI and the customer (identified by account_code)
320
+ # @param account_code Account code or the customer code
321
+ # @param candidate_id Candidate Id
322
+ # @param test_code Test Code
323
+ # @param [Hash] opts the optional parameters
324
+ # @option opts [Array<String>] :payload Voucher Codes to be applied to the candidate&#39;s specified exam record
325
+ # @return [nil]
326
+ def modify_vouchers_of_eligibility(account_code, candidate_id, test_code, opts = {})
327
+ modify_vouchers_of_eligibility_with_http_info(account_code, candidate_id, test_code, opts)
328
+ nil
329
+ end
330
+
331
+ # Associate a set of voucher codes to PSI Candidate Test Eligibility record. Previously attached vouchers to the eligibility record but not listed in the input would be unlinked from the eligibility record. Voucher Codes are agreed upon codes between PSI and the customer (identified by account_code)
332
+ # @param account_code Account code or the customer code
333
+ # @param candidate_id Candidate Id
334
+ # @param test_code Test Code
335
+ # @param [Hash] opts the optional parameters
336
+ # @option opts [Array<String>] :payload Voucher Codes to be applied to the candidate&#39;s specified exam record
337
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
338
+ def modify_vouchers_of_eligibility_with_http_info(account_code, candidate_id, test_code, opts = {})
339
+ if @api_client.config.debugging
340
+ @api_client.config.logger.debug 'Calling API: DefaultApi.modify_vouchers_of_eligibility ...'
341
+ end
342
+ # verify the required parameter 'account_code' is set
343
+ if @api_client.config.client_side_validation && account_code.nil?
344
+ fail ArgumentError, "Missing the required parameter 'account_code' when calling DefaultApi.modify_vouchers_of_eligibility"
345
+ end
346
+ # verify the required parameter 'candidate_id' is set
347
+ if @api_client.config.client_side_validation && candidate_id.nil?
348
+ fail ArgumentError, "Missing the required parameter 'candidate_id' when calling DefaultApi.modify_vouchers_of_eligibility"
349
+ end
350
+ # verify the required parameter 'test_code' is set
351
+ if @api_client.config.client_side_validation && test_code.nil?
352
+ fail ArgumentError, "Missing the required parameter 'test_code' when calling DefaultApi.modify_vouchers_of_eligibility"
353
+ end
354
+ # resource path
355
+ local_var_path = '/accounts/{account_code}/candidates/{candidate_id}/tests/{test_code}/vouchers'.sub('{' + 'account_code' + '}', account_code.to_s).sub('{' + 'candidate_id' + '}', candidate_id.to_s).sub('{' + 'test_code' + '}', test_code.to_s)
356
+
357
+ # query parameters
358
+ query_params = {}
359
+
360
+ # header parameters
361
+ header_params = {}
362
+ # HTTP header 'Accept' (if needed)
363
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
364
+ # HTTP header 'Content-Type'
365
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
366
+
367
+ # form parameters
368
+ form_params = {}
369
+
370
+ # http body (model)
371
+ post_body = @api_client.object_to_http_body(opts[:'payload'])
372
+ auth_names = ['oauth']
373
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
374
+ :header_params => header_params,
375
+ :query_params => query_params,
376
+ :form_params => form_params,
377
+ :body => post_body,
378
+ :auth_names => auth_names)
379
+ if @api_client.config.debugging
380
+ @api_client.config.logger.debug "API called: DefaultApi#modify_vouchers_of_eligibility\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
381
+ end
382
+ return data, status_code, headers
383
+ end
384
+ # Update an existing candidate's eligibility record.
385
+ # Update an existing candidate's eligibility details. Information such as candidate demographic data and eligibility, expiration and scheduled start date may be changed. You cannot change the associated test via this call. To do so you must cancel and create a new eligibility.
386
+ # @param account_code provided client specific account code.
387
+ # @param candidate_id The unique candidate id to update.
388
+ # @param test_code The test code.
389
+ # @param payload The candidate&#39;s updated eligibity record.
390
+ # @param [Hash] opts the optional parameters
391
+ # @return [nil]
392
+ def update_candidate_eligibility(account_code, candidate_id, test_code, payload, opts = {})
393
+ update_candidate_eligibility_with_http_info(account_code, candidate_id, test_code, payload, opts)
394
+ nil
395
+ end
396
+
397
+ # Update an existing candidate&#39;s eligibility record.
398
+ # Update an existing candidate&#39;s eligibility details. Information such as candidate demographic data and eligibility, expiration and scheduled start date may be changed. You cannot change the associated test via this call. To do so you must cancel and create a new eligibility.
399
+ # @param account_code provided client specific account code.
400
+ # @param candidate_id The unique candidate id to update.
401
+ # @param test_code The test code.
402
+ # @param payload The candidate&#39;s updated eligibity record.
403
+ # @param [Hash] opts the optional parameters
404
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
405
+ def update_candidate_eligibility_with_http_info(account_code, candidate_id, test_code, payload, opts = {})
406
+ if @api_client.config.debugging
407
+ @api_client.config.logger.debug 'Calling API: DefaultApi.update_candidate_eligibility ...'
408
+ end
409
+ # verify the required parameter 'account_code' is set
410
+ if @api_client.config.client_side_validation && account_code.nil?
411
+ fail ArgumentError, "Missing the required parameter 'account_code' when calling DefaultApi.update_candidate_eligibility"
412
+ end
413
+ # verify the required parameter 'candidate_id' is set
414
+ if @api_client.config.client_side_validation && candidate_id.nil?
415
+ fail ArgumentError, "Missing the required parameter 'candidate_id' when calling DefaultApi.update_candidate_eligibility"
416
+ end
417
+ # verify the required parameter 'test_code' is set
418
+ if @api_client.config.client_side_validation && test_code.nil?
419
+ fail ArgumentError, "Missing the required parameter 'test_code' when calling DefaultApi.update_candidate_eligibility"
420
+ end
421
+ # verify the required parameter 'payload' is set
422
+ if @api_client.config.client_side_validation && payload.nil?
423
+ fail ArgumentError, "Missing the required parameter 'payload' when calling DefaultApi.update_candidate_eligibility"
424
+ end
425
+ # resource path
426
+ local_var_path = '/accounts/{account_code}/candidates/{candidate_id}/tests/{test_code}'.sub('{' + 'account_code' + '}', account_code.to_s).sub('{' + 'candidate_id' + '}', candidate_id.to_s).sub('{' + 'test_code' + '}', test_code.to_s)
427
+
428
+ # query parameters
429
+ query_params = {}
430
+
431
+ # header parameters
432
+ header_params = {}
433
+ # HTTP header 'Accept' (if needed)
434
+ header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=UTF-8'])
435
+
436
+ # form parameters
437
+ form_params = {}
438
+
439
+ # http body (model)
440
+ post_body = @api_client.object_to_http_body(payload)
441
+ auth_names = ['oauth']
442
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
443
+ :header_params => header_params,
444
+ :query_params => query_params,
445
+ :form_params => form_params,
446
+ :body => post_body,
447
+ :auth_names => auth_names)
448
+ if @api_client.config.debugging
449
+ @api_client.config.logger.debug "API called: DefaultApi#update_candidate_eligibility\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
450
+ end
451
+ return data, status_code, headers
452
+ end
453
+ end
454
+ end