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
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: a675b5054b540e4625d4bb49884fedd77cf293208e9773188a49cf32af4168d7
4
+ data.tar.gz: 581cff723983e1b838570865ab0d4c04c0a7e1d690629111e00894a182ece27d
5
+ SHA512:
6
+ metadata.gz: 5fee1e5ce567754fa5aded12eecd2adb4c5a9603c1eb27ecf487ee405e89443261bc64336d1cd617f02b66306ba8e5ade64967a60d89ff2067274b14c9f06383
7
+ data.tar.gz: ae86ada15d85b37572c701fbea9f3d6a2df1bed2de07847633f1cde24e4c2dda08f5411396a991fda4629174a9773dec5a47ace5247824168c9a14b21fa16d2c
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :development, :test do
6
+ gem 'rake', '~> 12.0.0'
7
+ end
data/README.md ADDED
@@ -0,0 +1,123 @@
1
+ # psi_eligibility
2
+
3
+ PsiEligibility - the Ruby gem for the PSI Candidate Rest Eligibility Service
4
+
5
+ PSIs REST based service to modify candidate test eligibilities.
6
+
7
+ This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
8
+
9
+ - API version: 1.0.0
10
+ - Package version: 1.0.0
11
+ - Build package: io.swagger.codegen.languages.RubyClientCodegen
12
+
13
+ ## Installation
14
+
15
+ ### Build a gem
16
+
17
+ To build the Ruby code into a gem:
18
+
19
+ ```shell
20
+ gem build psi_eligibility.gemspec
21
+ ```
22
+
23
+ Then either install the gem locally:
24
+
25
+ ```shell
26
+ gem install ./psi_eligibility-1.0.0.gem
27
+ ```
28
+ (for development, run `gem install --dev ./psi_eligibility-1.0.0.gem` to install the development dependencies)
29
+
30
+ or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
31
+
32
+ Finally add this to the Gemfile:
33
+
34
+ gem 'psi_eligibility', '~> 1.0.0'
35
+
36
+ ### Install from Git
37
+
38
+ If the Ruby gem is hosted at a git repository: https://github.com/YOUR_GIT_USERNAME/YOUR_GIT_REPO, then add the following in the Gemfile:
39
+
40
+ gem 'psi_eligibility', :git => 'https://github.com/YOUR_GIT_USERNAME/YOUR_GIT_REPO.git'
41
+
42
+ ### Include the Ruby code directly
43
+
44
+ Include the Ruby code directly using `-I` as follows:
45
+
46
+ ```shell
47
+ ruby -Ilib script.rb
48
+ ```
49
+
50
+ ## Getting Started
51
+
52
+ Please follow the [installation](#installation) procedure and then run the following code:
53
+ ```ruby
54
+ # Load the gem
55
+ require 'psi_eligibility'
56
+
57
+ # Setup authorization
58
+ PsiEligibility.configure do |config|
59
+ # Configure OAuth2 access token for authorization: oauth
60
+ config.access_token = 'YOUR ACCESS TOKEN'
61
+ end
62
+
63
+ api_instance = PsiEligibility::DefaultApi.new
64
+
65
+ account_code = 'account_code_example' # String | provided client specific account code.
66
+
67
+ candidate_id = 'candidate_id_example' # String | The unique candidate id to act on.
68
+
69
+ test_code = 'test_code_example' # String | The test code.
70
+
71
+
72
+ begin
73
+ #Cancel a candidate's eligibility record.
74
+ api_instance.cancel_candidate_eligibility(account_code, candidate_id, test_code)
75
+ rescue PsiEligibility::ApiError => e
76
+ puts "Exception when calling DefaultApi->cancel_candidate_eligibility: #{e}"
77
+ end
78
+
79
+ ```
80
+
81
+ ## Documentation for API Endpoints
82
+
83
+ All URIs are relative to *https://apiuatapi.psiexams.com/eligibility_service/1.0.0*
84
+
85
+ Class | Method | HTTP request | Description
86
+ ------------ | ------------- | ------------- | -------------
87
+ *PsiEligibility::DefaultApi* | [**cancel_candidate_eligibility**](docs/DefaultApi.md#cancel_candidate_eligibility) | **DELETE** /accounts/{account_code}/candidates/{candidate_id}/tests/{test_code} | Cancel a candidate's eligibility record.
88
+ *PsiEligibility::DefaultApi* | [**create_candidate**](docs/DefaultApi.md#create_candidate) | **POST** /accounts/{account_code}/candidates | Create a new candidate eligibility record.
89
+ *PsiEligibility::DefaultApi* | [**get_candidate**](docs/DefaultApi.md#get_candidate) | **GET** /accounts/{account_code}/candidates/{candidate_id} | Get the eligiblities associated with the candidate id.
90
+ *PsiEligibility::DefaultApi* | [**get_candidate_eligibilities**](docs/DefaultApi.md#get_candidate_eligibilities) | **GET** /accounts/{account_code}/candidates/{candidate_id}/tests/{test_code} | Get the eligiblities associated with the candidate id.
91
+ *PsiEligibility::DefaultApi* | [**get_test_launch_info**](docs/DefaultApi.md#get_test_launch_info) | **GET** /eligibilities/{psi_eligibility_code}/testLaunchInfo | GET test launch url
92
+ *PsiEligibility::DefaultApi* | [**modify_vouchers_of_eligibility**](docs/DefaultApi.md#modify_vouchers_of_eligibility) | **PUT** /accounts/{account_code}/candidates/{candidate_id}/tests/{test_code}/vouchers | 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)
93
+ *PsiEligibility::DefaultApi* | [**update_candidate_eligibility**](docs/DefaultApi.md#update_candidate_eligibility) | **PUT** /accounts/{account_code}/candidates/{candidate_id}/tests/{test_code} | Update an existing candidate's eligibility record.
94
+
95
+
96
+ ## Documentation for Models
97
+
98
+ - [PsiEligibility::AdditionalAttributeModel](docs/AdditionalAttributeModel.md)
99
+ - [PsiEligibility::CandidateModel](docs/CandidateModel.md)
100
+ - [PsiEligibility::EligibilityModel](docs/EligibilityModel.md)
101
+ - [PsiEligibility::EligibilityResponseModel](docs/EligibilityResponseModel.md)
102
+ - [PsiEligibility::ErrorModel](docs/ErrorModel.md)
103
+ - [PsiEligibility::ExistingEligibilityModel](docs/ExistingEligibilityModel.md)
104
+ - [PsiEligibility::TestLaunchInfoModel](docs/TestLaunchInfoModel.md)
105
+
106
+
107
+ ## Documentation for Authorization
108
+
109
+
110
+ ### default
111
+
112
+ - **Type**: OAuth
113
+ - **Flow**: implicit
114
+ - **Authorization URL**: https://apiuatapi.psiexams.com/authorize
115
+ - **Scopes**: N/A
116
+
117
+ ### oauth
118
+
119
+ - **Type**: OAuth
120
+ - **Flow**: password
121
+ - **Authorization URL**:
122
+ - **Scopes**: N/A
123
+
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ begin
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+ task default: :spec
6
+ rescue LoadError
7
+ # no rspec available
8
+ end
@@ -0,0 +1,9 @@
1
+ # PsiEligibility::AdditionalAttributeModel
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **value** | **String** | The vlaue of the additional attribute. | [optional]
7
+ **key** | **String** | The key agreed upon by PSI and the client in advanced to store a custom candidate attribute. | [optional]
8
+
9
+
@@ -0,0 +1,24 @@
1
+ # PsiEligibility::CandidateModel
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **country** | **String** | | [optional]
7
+ **home_phone** | **String** | | [optional]
8
+ **school_code** | **String** | If supplied, the list of school codes must be added to PSI's system in advance of the import. | [optional]
9
+ **address2** | **String** | | [optional]
10
+ **city** | **String** | | [optional]
11
+ **address1** | **String** | | [optional]
12
+ **province_state** | **String** | The canidates province, state or equivilent. | [optional]
13
+ **last_name** | **String** | |
14
+ **suffix** | **String** | | [optional]
15
+ **middle_name** | **String** | | [optional]
16
+ **special_accommodations** | **Array<String>** | | [optional]
17
+ **candidate_id** | **String** | The supplied candidates unique id. |
18
+ **office_phone** | **String** | | [optional]
19
+ **postal_code** | **String** | Candidates zip code, postal code or equivilent. | [optional]
20
+ **first_name** | **String** | |
21
+ **email** | **String** | | [optional]
22
+ **additional_attributes** | [**Array<AdditionalAttributeModel>**](AdditionalAttributeModel.md) | | [optional]
23
+
24
+
@@ -0,0 +1,411 @@
1
+ # PsiEligibility::DefaultApi
2
+
3
+ All URIs are relative to *https://apiuatapi.psiexams.com/eligibility_service/1.0.0*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**cancel_candidate_eligibility**](DefaultApi.md#cancel_candidate_eligibility) | **DELETE** /accounts/{account_code}/candidates/{candidate_id}/tests/{test_code} | Cancel a candidate's eligibility record.
8
+ [**create_candidate**](DefaultApi.md#create_candidate) | **POST** /accounts/{account_code}/candidates | Create a new candidate eligibility record.
9
+ [**get_candidate**](DefaultApi.md#get_candidate) | **GET** /accounts/{account_code}/candidates/{candidate_id} | Get the eligiblities associated with the candidate id.
10
+ [**get_candidate_eligibilities**](DefaultApi.md#get_candidate_eligibilities) | **GET** /accounts/{account_code}/candidates/{candidate_id}/tests/{test_code} | Get the eligiblities associated with the candidate id.
11
+ [**get_test_launch_info**](DefaultApi.md#get_test_launch_info) | **GET** /eligibilities/{psi_eligibility_code}/testLaunchInfo | GET test launch url
12
+ [**modify_vouchers_of_eligibility**](DefaultApi.md#modify_vouchers_of_eligibility) | **PUT** /accounts/{account_code}/candidates/{candidate_id}/tests/{test_code}/vouchers | 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)
13
+ [**update_candidate_eligibility**](DefaultApi.md#update_candidate_eligibility) | **PUT** /accounts/{account_code}/candidates/{candidate_id}/tests/{test_code} | Update an existing candidate's eligibility record.
14
+
15
+
16
+ # **cancel_candidate_eligibility**
17
+ > cancel_candidate_eligibility(account_code, candidate_id, test_code)
18
+
19
+ Cancel a candidate's eligibility record.
20
+
21
+ Cancels the eligibility matching the supplied candidate eligiblity code.
22
+
23
+ ### Example
24
+ ```ruby
25
+ # load the gem
26
+ require 'psi_eligibility'
27
+ # setup authorization
28
+ PsiEligibility.configure do |config|
29
+ # Configure OAuth2 access token for authorization: oauth
30
+ config.access_token = 'YOUR ACCESS TOKEN'
31
+ end
32
+
33
+ api_instance = PsiEligibility::DefaultApi.new
34
+
35
+ account_code = 'account_code_example' # String | provided client specific account code.
36
+
37
+ candidate_id = 'candidate_id_example' # String | The unique candidate id to act on.
38
+
39
+ test_code = 'test_code_example' # String | The test code.
40
+
41
+
42
+ begin
43
+ #Cancel a candidate's eligibility record.
44
+ api_instance.cancel_candidate_eligibility(account_code, candidate_id, test_code)
45
+ rescue PsiEligibility::ApiError => e
46
+ puts "Exception when calling DefaultApi->cancel_candidate_eligibility: #{e}"
47
+ end
48
+ ```
49
+
50
+ ### Parameters
51
+
52
+ Name | Type | Description | Notes
53
+ ------------- | ------------- | ------------- | -------------
54
+ **account_code** | **String**| provided client specific account code. |
55
+ **candidate_id** | **String**| The unique candidate id to act on. |
56
+ **test_code** | **String**| The test code. |
57
+
58
+ ### Return type
59
+
60
+ nil (empty response body)
61
+
62
+ ### Authorization
63
+
64
+ [oauth](../README.md#oauth)
65
+
66
+ ### HTTP request headers
67
+
68
+ - **Content-Type**: Not defined
69
+ - **Accept**: application/json; charset=UTF-8
70
+
71
+
72
+
73
+ # **create_candidate**
74
+ > EligibilityResponseModel create_candidate(account_code, payload)
75
+
76
+ Create a new candidate eligibility record.
77
+
78
+ Submits a single eligibilites to the PSI Atlas system. Many parameters are optional but the more the better.
79
+
80
+ ### Example
81
+ ```ruby
82
+ # load the gem
83
+ require 'psi_eligibility'
84
+ # setup authorization
85
+ PsiEligibility.configure do |config|
86
+ # Configure OAuth2 access token for authorization: oauth
87
+ config.access_token = 'YOUR ACCESS TOKEN'
88
+ end
89
+
90
+ api_instance = PsiEligibility::DefaultApi.new
91
+
92
+ account_code = 'account_code_example' # String | provided client specific account code.
93
+
94
+ payload = PsiEligibility::EligibilityModel.new # EligibilityModel | A new eligibility record.
95
+
96
+
97
+ begin
98
+ #Create a new candidate eligibility record.
99
+ result = api_instance.create_candidate(account_code, payload)
100
+ p result
101
+ rescue PsiEligibility::ApiError => e
102
+ puts "Exception when calling DefaultApi->create_candidate: #{e}"
103
+ end
104
+ ```
105
+
106
+ ### Parameters
107
+
108
+ Name | Type | Description | Notes
109
+ ------------- | ------------- | ------------- | -------------
110
+ **account_code** | **String**| provided client specific account code. |
111
+ **payload** | [**EligibilityModel**](EligibilityModel.md)| A new eligibility record. |
112
+
113
+ ### Return type
114
+
115
+ [**EligibilityResponseModel**](EligibilityResponseModel.md)
116
+
117
+ ### Authorization
118
+
119
+ [oauth](../README.md#oauth)
120
+
121
+ ### HTTP request headers
122
+
123
+ - **Content-Type**: application/json; charset=UTF-8
124
+ - **Accept**: application/json; charset=UTF-8
125
+
126
+
127
+
128
+ # **get_candidate**
129
+ > Array<ExistingEligibilityModel> get_candidate(account_code, candidate_id)
130
+
131
+ Get the eligiblities associated with the candidate id.
132
+
133
+ 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.
134
+
135
+ ### Example
136
+ ```ruby
137
+ # load the gem
138
+ require 'psi_eligibility'
139
+ # setup authorization
140
+ PsiEligibility.configure do |config|
141
+ # Configure OAuth2 access token for authorization: oauth
142
+ config.access_token = 'YOUR ACCESS TOKEN'
143
+ end
144
+
145
+ api_instance = PsiEligibility::DefaultApi.new
146
+
147
+ account_code = 'account_code_example' # String | provided client specific account code.
148
+
149
+ candidate_id = 'candidate_id_example' # String | the candidate id.
150
+
151
+
152
+ begin
153
+ #Get the eligiblities associated with the candidate id.
154
+ result = api_instance.get_candidate(account_code, candidate_id)
155
+ p result
156
+ rescue PsiEligibility::ApiError => e
157
+ puts "Exception when calling DefaultApi->get_candidate: #{e}"
158
+ end
159
+ ```
160
+
161
+ ### Parameters
162
+
163
+ Name | Type | Description | Notes
164
+ ------------- | ------------- | ------------- | -------------
165
+ **account_code** | **String**| provided client specific account code. |
166
+ **candidate_id** | **String**| the candidate id. |
167
+
168
+ ### Return type
169
+
170
+ [**Array<ExistingEligibilityModel>**](ExistingEligibilityModel.md)
171
+
172
+ ### Authorization
173
+
174
+ [oauth](../README.md#oauth)
175
+
176
+ ### HTTP request headers
177
+
178
+ - **Content-Type**: Not defined
179
+ - **Accept**: application/json; charset=UTF-8
180
+
181
+
182
+
183
+ # **get_candidate_eligibilities**
184
+ > Array<ExistingEligibilityModel> get_candidate_eligibilities(account_code, candidate_id, test_code)
185
+
186
+ Get the eligiblities associated with the candidate id.
187
+
188
+ Get's all of the eligibilities associated with the supplied candidate_id fpr a specific test code.
189
+
190
+ ### Example
191
+ ```ruby
192
+ # load the gem
193
+ require 'psi_eligibility'
194
+ # setup authorization
195
+ PsiEligibility.configure do |config|
196
+ # Configure OAuth2 access token for authorization: oauth
197
+ config.access_token = 'YOUR ACCESS TOKEN'
198
+ end
199
+
200
+ api_instance = PsiEligibility::DefaultApi.new
201
+
202
+ account_code = 'account_code_example' # String | provided client specific account code.
203
+
204
+ candidate_id = 'candidate_id_example' # String | the candidate id.
205
+
206
+ test_code = 'test_code_example' # String | The test code.
207
+
208
+
209
+ begin
210
+ #Get the eligiblities associated with the candidate id.
211
+ result = api_instance.get_candidate_eligibilities(account_code, candidate_id, test_code)
212
+ p result
213
+ rescue PsiEligibility::ApiError => e
214
+ puts "Exception when calling DefaultApi->get_candidate_eligibilities: #{e}"
215
+ end
216
+ ```
217
+
218
+ ### Parameters
219
+
220
+ Name | Type | Description | Notes
221
+ ------------- | ------------- | ------------- | -------------
222
+ **account_code** | **String**| provided client specific account code. |
223
+ **candidate_id** | **String**| the candidate id. |
224
+ **test_code** | **String**| The test code. |
225
+
226
+ ### Return type
227
+
228
+ [**Array<ExistingEligibilityModel>**](ExistingEligibilityModel.md)
229
+
230
+ ### Authorization
231
+
232
+ [oauth](../README.md#oauth)
233
+
234
+ ### HTTP request headers
235
+
236
+ - **Content-Type**: Not defined
237
+ - **Accept**: application/json; charset=UTF-8
238
+
239
+
240
+
241
+ # **get_test_launch_info**
242
+ > TestLaunchInfoModel get_test_launch_info(psi_eligibility_code)
243
+
244
+ GET test launch url
245
+
246
+ API endpoint to retrieve the test launch URL for a given eligibility code.
247
+
248
+ ### Example
249
+ ```ruby
250
+ # load the gem
251
+ require 'psi_eligibility'
252
+ # setup authorization
253
+ PsiEligibility.configure do |config|
254
+ # Configure OAuth2 access token for authorization: oauth
255
+ config.access_token = 'YOUR ACCESS TOKEN'
256
+ end
257
+
258
+ api_instance = PsiEligibility::DefaultApi.new
259
+
260
+ psi_eligibility_code = 'psi_eligibility_code_example' # String |
261
+
262
+
263
+ begin
264
+ #GET test launch url
265
+ result = api_instance.get_test_launch_info(psi_eligibility_code)
266
+ p result
267
+ rescue PsiEligibility::ApiError => e
268
+ puts "Exception when calling DefaultApi->get_test_launch_info: #{e}"
269
+ end
270
+ ```
271
+
272
+ ### Parameters
273
+
274
+ Name | Type | Description | Notes
275
+ ------------- | ------------- | ------------- | -------------
276
+ **psi_eligibility_code** | **String**| |
277
+
278
+ ### Return type
279
+
280
+ [**TestLaunchInfoModel**](TestLaunchInfoModel.md)
281
+
282
+ ### Authorization
283
+
284
+ [oauth](../README.md#oauth)
285
+
286
+ ### HTTP request headers
287
+
288
+ - **Content-Type**: Not defined
289
+ - **Accept**: application/json
290
+
291
+
292
+
293
+ # **modify_vouchers_of_eligibility**
294
+ > modify_vouchers_of_eligibility(account_code, candidate_id, test_code, opts)
295
+
296
+ 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)
297
+
298
+ ### Example
299
+ ```ruby
300
+ # load the gem
301
+ require 'psi_eligibility'
302
+ # setup authorization
303
+ PsiEligibility.configure do |config|
304
+ # Configure OAuth2 access token for authorization: oauth
305
+ config.access_token = 'YOUR ACCESS TOKEN'
306
+ end
307
+
308
+ api_instance = PsiEligibility::DefaultApi.new
309
+
310
+ account_code = 'account_code_example' # String | Account code or the customer code
311
+
312
+ candidate_id = 'candidate_id_example' # String | Candidate Id
313
+
314
+ test_code = 'test_code_example' # String | Test Code
315
+
316
+ opts = {
317
+ payload: [PsiEligibility::Array<String>.new] # Array<String> | Voucher Codes to be applied to the candidate's specified exam record
318
+ }
319
+
320
+ begin
321
+ #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)
322
+ api_instance.modify_vouchers_of_eligibility(account_code, candidate_id, test_code, opts)
323
+ rescue PsiEligibility::ApiError => e
324
+ puts "Exception when calling DefaultApi->modify_vouchers_of_eligibility: #{e}"
325
+ end
326
+ ```
327
+
328
+ ### Parameters
329
+
330
+ Name | Type | Description | Notes
331
+ ------------- | ------------- | ------------- | -------------
332
+ **account_code** | **String**| Account code or the customer code |
333
+ **candidate_id** | **String**| Candidate Id |
334
+ **test_code** | **String**| Test Code |
335
+ **payload** | **Array&lt;String&gt;**| Voucher Codes to be applied to the candidate&#39;s specified exam record | [optional]
336
+
337
+ ### Return type
338
+
339
+ nil (empty response body)
340
+
341
+ ### Authorization
342
+
343
+ [oauth](../README.md#oauth)
344
+
345
+ ### HTTP request headers
346
+
347
+ - **Content-Type**: application/json
348
+ - **Accept**: application/json
349
+
350
+
351
+
352
+ # **update_candidate_eligibility**
353
+ > update_candidate_eligibility(account_code, candidate_id, test_code, payload)
354
+
355
+ Update an existing candidate's eligibility record.
356
+
357
+ 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.
358
+
359
+ ### Example
360
+ ```ruby
361
+ # load the gem
362
+ require 'psi_eligibility'
363
+ # setup authorization
364
+ PsiEligibility.configure do |config|
365
+ # Configure OAuth2 access token for authorization: oauth
366
+ config.access_token = 'YOUR ACCESS TOKEN'
367
+ end
368
+
369
+ api_instance = PsiEligibility::DefaultApi.new
370
+
371
+ account_code = 'account_code_example' # String | provided client specific account code.
372
+
373
+ candidate_id = 'candidate_id_example' # String | The unique candidate id to update.
374
+
375
+ test_code = 'test_code_example' # String | The test code.
376
+
377
+ payload = PsiEligibility::EligibilityModel.new # EligibilityModel | The candidate's updated eligibity record.
378
+
379
+
380
+ begin
381
+ #Update an existing candidate's eligibility record.
382
+ api_instance.update_candidate_eligibility(account_code, candidate_id, test_code, payload)
383
+ rescue PsiEligibility::ApiError => e
384
+ puts "Exception when calling DefaultApi->update_candidate_eligibility: #{e}"
385
+ end
386
+ ```
387
+
388
+ ### Parameters
389
+
390
+ Name | Type | Description | Notes
391
+ ------------- | ------------- | ------------- | -------------
392
+ **account_code** | **String**| provided client specific account code. |
393
+ **candidate_id** | **String**| The unique candidate id to update. |
394
+ **test_code** | **String**| The test code. |
395
+ **payload** | [**EligibilityModel**](EligibilityModel.md)| The candidate&#39;s updated eligibity record. |
396
+
397
+ ### Return type
398
+
399
+ nil (empty response body)
400
+
401
+ ### Authorization
402
+
403
+ [oauth](../README.md#oauth)
404
+
405
+ ### HTTP request headers
406
+
407
+ - **Content-Type**: Not defined
408
+ - **Accept**: application/json; charset=UTF-8
409
+
410
+
411
+