Class: SmartRecruiters::InterviewTypesApi
- Inherits:
-
Object
- Object
- SmartRecruiters::InterviewTypesApi
- Defined in:
- lib/smart_recruiters/api/interview_types_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ InterviewTypesApi
constructor
A new instance of InterviewTypesApi.
-
#types_delete(interview_type, opts = {}) ⇒ nil
Removes interview type with given name.
-
#types_delete_with_http_info(interview_type, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Removes interview type with given name.
-
#types_get(opts = {}) ⇒ InterviewTypes
Retrieves interview types.
-
#types_get_with_http_info(opts = {}) ⇒ Array<(InterviewTypes, Integer, Hash)>
Retrieves interview types.
-
#types_update(body, opts = {}) ⇒ nil
Adds interview types to already existing ones.
-
#types_update_with_http_info(body, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Adds interview types to already existing ones.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ InterviewTypesApi
Returns a new instance of InterviewTypesApi.
7 8 9 |
# File 'lib/smart_recruiters/api/interview_types_api.rb', line 7 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
5 6 7 |
# File 'lib/smart_recruiters/api/interview_types_api.rb', line 5 def api_client @api_client end |
Instance Method Details
#types_delete(interview_type, opts = {}) ⇒ nil
Removes interview type with given name
14 15 16 17 |
# File 'lib/smart_recruiters/api/interview_types_api.rb', line 14 def types_delete(interview_type, opts = {}) types_delete_with_http_info(interview_type, opts) nil end |
#types_delete_with_http_info(interview_type, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Removes interview type with given name
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/smart_recruiters/api/interview_types_api.rb', line 23 def types_delete_with_http_info(interview_type, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InterviewTypesApi.types_delete ...' end # verify the required parameter 'interview_type' is set if @api_client.config.client_side_validation && interview_type.nil? fail ArgumentError, "Missing the required parameter 'interview_type' when calling InterviewTypesApi.types_delete" end # resource path local_var_path = '/interview-types/{interviewType}'.sub('{' + 'interviewType' + '}', interview_type.to_s) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] auth_names = opts[:auth_names] || ['key', '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, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: InterviewTypesApi#types_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#types_get(opts = {}) ⇒ InterviewTypes
Retrieves interview types
67 68 69 70 |
# File 'lib/smart_recruiters/api/interview_types_api.rb', line 67 def types_get(opts = {}) data, _status_code, _headers = types_get_with_http_info(opts) data end |
#types_get_with_http_info(opts = {}) ⇒ Array<(InterviewTypes, Integer, Hash)>
Retrieves interview types
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/smart_recruiters/api/interview_types_api.rb', line 75 def types_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InterviewTypesApi.types_get ...' end # resource path local_var_path = '/interview-types' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'InterviewTypes' auth_names = opts[:auth_names] || ['key', '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 => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: InterviewTypesApi#types_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#types_update(body, opts = {}) ⇒ nil
Adds interview types to already existing ones
116 117 118 119 |
# File 'lib/smart_recruiters/api/interview_types_api.rb', line 116 def types_update(body, opts = {}) types_update_with_http_info(body, opts) nil end |
#types_update_with_http_info(body, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Adds interview types to already existing ones
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
# File 'lib/smart_recruiters/api/interview_types_api.rb', line 125 def types_update_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InterviewTypesApi.types_update ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling InterviewTypesApi.types_update" end # resource path local_var_path = '/interview-types' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[: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 = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) return_type = opts[:return_type] auth_names = opts[:auth_names] || ['key', 'oauth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: InterviewTypesApi#types_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |