class PsiEligibility::DefaultApi
Attributes
Public Class Methods
# File lib/psi_eligibility/api/default_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Cancel a candidate's eligibility record. Cancels the eligibility matching the supplied candidate eligiblity code. @param account_code provided client specific account code. @param candidate_id The unique candidate id to act on. @param test_code The test code. @param [Hash] opts the optional parameters @return [nil]
# File lib/psi_eligibility/api/default_api.rb, line 29 def cancel_candidate_eligibility(account_code, candidate_id, test_code, opts = {}) cancel_candidate_eligibility_with_http_info(account_code, candidate_id, test_code, opts) nil end
Cancel a candidate's eligibility record. Cancels the eligibility matching the supplied candidate eligiblity code. @param account_code provided client specific account code. @param candidate_id The unique candidate id to act on. @param test_code The test code. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/psi_eligibility/api/default_api.rb, line 41 def cancel_candidate_eligibility_with_http_info(account_code, candidate_id, test_code, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.cancel_candidate_eligibility ...' end # verify the required parameter 'account_code' is set if @api_client.config.client_side_validation && account_code.nil? fail ArgumentError, "Missing the required parameter 'account_code' when calling DefaultApi.cancel_candidate_eligibility" end # verify the required parameter 'candidate_id' is set if @api_client.config.client_side_validation && candidate_id.nil? fail ArgumentError, "Missing the required parameter 'candidate_id' when calling DefaultApi.cancel_candidate_eligibility" end # verify the required parameter 'test_code' is set if @api_client.config.client_side_validation && test_code.nil? fail ArgumentError, "Missing the required parameter 'test_code' when calling DefaultApi.cancel_candidate_eligibility" end # resource path 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) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=UTF-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#cancel_candidate_eligibility\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Create a new candidate eligibility record. Submits a single eligibilites to the PSI Atlas system. Many parameters are optional but the more the better. @param account_code provided client specific account code. @param payload A new eligibility record. @param [Hash] opts the optional parameters @return [EligibilityResponseModel]
# File lib/psi_eligibility/api/default_api.rb, line 91 def create_candidate(account_code, payload, opts = {}) data, _status_code, _headers = create_candidate_with_http_info(account_code, payload, opts) data end
Create a new candidate eligibility record. Submits a single eligibilites to the PSI Atlas system. Many parameters are optional but the more the better. @param account_code provided client specific account code. @param payload A new eligibility record. @param [Hash] opts the optional parameters @return [Array<(EligibilityResponseModel
, Fixnum, Hash)>] EligibilityResponseModel
data, response status code and response headers
# File lib/psi_eligibility/api/default_api.rb, line 102 def create_candidate_with_http_info(account_code, payload, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.create_candidate ...' end # verify the required parameter 'account_code' is set if @api_client.config.client_side_validation && account_code.nil? fail ArgumentError, "Missing the required parameter 'account_code' when calling DefaultApi.create_candidate" end # verify the required parameter 'payload' is set if @api_client.config.client_side_validation && payload.nil? fail ArgumentError, "Missing the required parameter 'payload' when calling DefaultApi.create_candidate" end # resource path local_var_path = '/accounts/{account_code}/candidates'.sub('{' + 'account_code' + '}', account_code.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=UTF-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(payload) auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EligibilityResponseModel') if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#create_candidate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get the eligiblities associated with the candidate id. 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. @param account_code provided client specific account code. @param candidate_id the candidate id. @param [Hash] opts the optional parameters @return [Array<ExistingEligibilityModel>]
# File lib/psi_eligibility/api/default_api.rb, line 151 def get_candidate(account_code, candidate_id, opts = {}) data, _status_code, _headers = get_candidate_with_http_info(account_code, candidate_id, opts) data end
Get the eligiblities associated with the candidate id. Get's all of the eligibilities associated with the supplied candidate_id fpr a specific test code. @param account_code provided client specific account code. @param candidate_id the candidate id. @param test_code The test code. @param [Hash] opts the optional parameters @return [Array<ExistingEligibilityModel>]
# File lib/psi_eligibility/api/default_api.rb, line 210 def get_candidate_eligibilities(account_code, candidate_id, test_code, opts = {}) data, _status_code, _headers = get_candidate_eligibilities_with_http_info(account_code, candidate_id, test_code, opts) data end
Get the eligiblities associated with the candidate id. Get's all of the eligibilities associated with the supplied candidate_id fpr a specific test code. @param account_code provided client specific account code. @param candidate_id the candidate id. @param test_code The test code. @param [Hash] opts the optional parameters @return [Array<(Array<ExistingEligibilityModel>, Fixnum, Hash)>] Array<ExistingEligibilityModel> data, response status code and response headers
# File lib/psi_eligibility/api/default_api.rb, line 222 def get_candidate_eligibilities_with_http_info(account_code, candidate_id, test_code, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_candidate_eligibilities ...' end # verify the required parameter 'account_code' is set if @api_client.config.client_side_validation && account_code.nil? fail ArgumentError, "Missing the required parameter 'account_code' when calling DefaultApi.get_candidate_eligibilities" end # verify the required parameter 'candidate_id' is set if @api_client.config.client_side_validation && candidate_id.nil? fail ArgumentError, "Missing the required parameter 'candidate_id' when calling DefaultApi.get_candidate_eligibilities" end # verify the required parameter 'test_code' is set if @api_client.config.client_side_validation && test_code.nil? fail ArgumentError, "Missing the required parameter 'test_code' when calling DefaultApi.get_candidate_eligibilities" end # resource path 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) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=UTF-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array<ExistingEligibilityModel>') if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#get_candidate_eligibilities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get the eligiblities associated with the candidate id. 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. @param account_code provided client specific account code. @param candidate_id the candidate id. @param [Hash] opts the optional parameters @return [Array<(Array<ExistingEligibilityModel>, Fixnum, Hash)>] Array<ExistingEligibilityModel> data, response status code and response headers
# File lib/psi_eligibility/api/default_api.rb, line 162 def get_candidate_with_http_info(account_code, candidate_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_candidate ...' end # verify the required parameter 'account_code' is set if @api_client.config.client_side_validation && account_code.nil? fail ArgumentError, "Missing the required parameter 'account_code' when calling DefaultApi.get_candidate" end # verify the required parameter 'candidate_id' is set if @api_client.config.client_side_validation && candidate_id.nil? fail ArgumentError, "Missing the required parameter 'candidate_id' when calling DefaultApi.get_candidate" end # resource path local_var_path = '/accounts/{account_code}/candidates/{candidate_id}'.sub('{' + 'account_code' + '}', account_code.to_s).sub('{' + 'candidate_id' + '}', candidate_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=UTF-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array<ExistingEligibilityModel>') if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#get_candidate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
GET test launch url API endpoint to retrieve the test launch URL for a given eligibility code. @param psi_eligibility_code @param [Hash] opts the optional parameters @return [TestLaunchInfoModel]
# File lib/psi_eligibility/api/default_api.rb, line 272 def get_test_launch_info(psi_eligibility_code, opts = {}) data, _status_code, _headers = get_test_launch_info_with_http_info(psi_eligibility_code, opts) data end
GET test launch url API endpoint to retrieve the test launch URL for a given eligibility code. @param psi_eligibility_code @param [Hash] opts the optional parameters @return [Array<(TestLaunchInfoModel
, Fixnum, Hash)>] TestLaunchInfoModel
data, response status code and response headers
# File lib/psi_eligibility/api/default_api.rb, line 282 def get_test_launch_info_with_http_info(psi_eligibility_code, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_test_launch_info ...' end # verify the required parameter 'psi_eligibility_code' is set if @api_client.config.client_side_validation && psi_eligibility_code.nil? fail ArgumentError, "Missing the required parameter 'psi_eligibility_code' when calling DefaultApi.get_test_launch_info" end # resource path local_var_path = '/eligibilities/{psi_eligibility_code}/testLaunchInfo'.sub('{' + 'psi_eligibility_code' + '}', psi_eligibility_code.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'TestLaunchInfoModel') if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#get_test_launch_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
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) @param account_code Account code or the customer code @param candidate_id Candidate Id @param test_code Test Code @param [Hash] opts the optional parameters @option opts [Array<String>] :payload Voucher Codes to be applied to the candidate's specified exam record @return [nil]
# File lib/psi_eligibility/api/default_api.rb, line 326 def modify_vouchers_of_eligibility(account_code, candidate_id, test_code, opts = {}) modify_vouchers_of_eligibility_with_http_info(account_code, candidate_id, test_code, opts) nil end
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) @param account_code Account code or the customer code @param candidate_id Candidate Id @param test_code Test Code @param [Hash] opts the optional parameters @option opts [Array<String>] :payload Voucher Codes to be applied to the candidate's specified exam record @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/psi_eligibility/api/default_api.rb, line 338 def modify_vouchers_of_eligibility_with_http_info(account_code, candidate_id, test_code, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.modify_vouchers_of_eligibility ...' end # verify the required parameter 'account_code' is set if @api_client.config.client_side_validation && account_code.nil? fail ArgumentError, "Missing the required parameter 'account_code' when calling DefaultApi.modify_vouchers_of_eligibility" end # verify the required parameter 'candidate_id' is set if @api_client.config.client_side_validation && candidate_id.nil? fail ArgumentError, "Missing the required parameter 'candidate_id' when calling DefaultApi.modify_vouchers_of_eligibility" end # verify the required parameter 'test_code' is set if @api_client.config.client_side_validation && test_code.nil? fail ArgumentError, "Missing the required parameter 'test_code' when calling DefaultApi.modify_vouchers_of_eligibility" end # resource path 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) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'payload']) auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#modify_vouchers_of_eligibility\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update an existing candidate's eligibility record. 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. @param account_code provided client specific account code. @param candidate_id The unique candidate id to update. @param test_code The test code. @param payload The candidate's updated eligibity record. @param [Hash] opts the optional parameters @return [nil]
# File lib/psi_eligibility/api/default_api.rb, line 392 def update_candidate_eligibility(account_code, candidate_id, test_code, payload, opts = {}) update_candidate_eligibility_with_http_info(account_code, candidate_id, test_code, payload, opts) nil end
Update an existing candidate's eligibility record. 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. @param account_code provided client specific account code. @param candidate_id The unique candidate id to update. @param test_code The test code. @param payload The candidate's updated eligibity record. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/psi_eligibility/api/default_api.rb, line 405 def update_candidate_eligibility_with_http_info(account_code, candidate_id, test_code, payload, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.update_candidate_eligibility ...' end # verify the required parameter 'account_code' is set if @api_client.config.client_side_validation && account_code.nil? fail ArgumentError, "Missing the required parameter 'account_code' when calling DefaultApi.update_candidate_eligibility" end # verify the required parameter 'candidate_id' is set if @api_client.config.client_side_validation && candidate_id.nil? fail ArgumentError, "Missing the required parameter 'candidate_id' when calling DefaultApi.update_candidate_eligibility" end # verify the required parameter 'test_code' is set if @api_client.config.client_side_validation && test_code.nil? fail ArgumentError, "Missing the required parameter 'test_code' when calling DefaultApi.update_candidate_eligibility" end # verify the required parameter 'payload' is set if @api_client.config.client_side_validation && payload.nil? fail ArgumentError, "Missing the required parameter 'payload' when calling DefaultApi.update_candidate_eligibility" end # resource path 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) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=UTF-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(payload) auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#update_candidate_eligibility\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end