Class: SmartRecruiters::CandidatesApi

Inherits:
Object
  • Object
show all
Defined in:
lib/smart_recruiters/api/candidates_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ CandidatesApi

Returns a new instance of CandidatesApi.



5
6
7
# File 'lib/smart_recruiters/api/candidates_api.rb', line 5

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



3
4
5
# File 'lib/smart_recruiters/api/candidates_api.rb', line 3

def api_client
  @api_client
end

Instance Method Details

#candidates_add(body, opts = {}) ⇒ CandidateDetails

Create a new candidate and assign to a Talent Pool Create a new candidate and assign to a Talent Pool. **Tracking candidate source** When adding a new candidate, it’s very important you track its source appropriately. In order to associate a source with your app/integration, add below object to a candidate body object for this endpoint: “‘ { "sourceDetails": { "sourceTypeId": "string", "sourceSubTypeId": "string", "sourceId": "string" } } “` sourceTypeId - it’s a Source Type - available values can be found using [get /configuration/sources](developers.smartrecruiters.com/reference/configurationsourcetypes-1) endpoint sourceSubTypeId - it’s a Source Subtype, an optional parameter - available values can be found using [get /configuration/sources](developers.smartrecruiters.com/reference/configurationsourcetypes-1) endpoint sourceId - it’s a Source Id - available values for a given sourceTypeId can be found using [get /configuration/sources/:sourceTypeId/values](developers.smartrecruiters.com/reference/configurationsourcevaluesall-1) endpoint NOTE: Not defining the source will default to API source. NOTE II: In case you can’t find an appropriate source to track against you can: * Create a custom source for each customer account separately on [this admin page](www.smartrecruiters.com/settings/configuration/custom-sources) (you need to be logged in as an admin to the customer account in order to view this page) * Request to [[email protected]]([email protected]) adding a standard source that will be available for all customers if your app/integration is productised (available to all SmartRecruiters customers)

Parameters:

  • body

    Candidate object that needs to be created.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



13
14
15
16
# File 'lib/smart_recruiters/api/candidates_api.rb', line 13

def candidates_add(body, opts = {})
  data, _status_code, _headers = candidates_add_with_http_info(body, opts)
  data
end

#candidates_add_to_job(body, job_id, opts = {}) ⇒ CandidateDetails

Create a new candidate and assign to a job Create a new candidate and assign to a job. **Tracking candidate source** When adding a new candidate, it’s very important you track its source appropriately. In order to associate a source with your app / integration, add the below object to a candidate body object for this endpoint: “‘ { "sourceDetails": { "sourceTypeId": "string", "sourceSubTypeId": "string", "sourceId": "string" } } “` sourceTypeId - it’s a Source Type - available values can be found using [get /configuration/sources](developers.smartrecruiters.com/reference/configurationsourcetypes-1) endpoint sourceSubTypeId - it’s a Source Subtype, an optional parameter - available values can be found using [get /configuration/sources](developers.smartrecruiters.com/reference/configurationsourcetypes-1) endpoint sourceId - it’s a Source Id - available values for a given sourceTypeId can be found using [get /configuration/sources/:sourceTypeId/values](developers.smartrecruiters.com/reference/configurationsourcevaluesall-1) endpoint NOTE: Not defining the source will default to API source. NOTE II: In case you can’t find an appropriate source to track against you can: * Create a custom source for each customer account separately on [this admin page](www.smartrecruiters.com/settings/configuration/custom-sources\) (you need to be logged in as an admin to the customer account in order to view this page) * Request to [[email protected]]([email protected]) adding a standard source that will be available for all customers if your app / integration is productised (available to all SmartRecruiters customers)

Parameters:

  • body

    Candidate object that needs to be created.

  • job_id

    job identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



72
73
74
75
# File 'lib/smart_recruiters/api/candidates_api.rb', line 72

def candidates_add_to_job(body, job_id, opts = {})
  data, _status_code, _headers = candidates_add_to_job_with_http_info(body, job_id, opts)
  data
end

#candidates_add_to_job_with_http_info(body, job_id, opts = {}) ⇒ Array<(CandidateDetails, Integer, Hash)>

Create a new candidate and assign to a job Create a new candidate and assign to a job. **Tracking candidate source** When adding a new candidate, it&#x27;s very important you track its source appropriately. In order to associate a source with your app / integration, add the below object to a candidate body object for this endpoint: &#x60;&#x60;&#x60; { &quot;sourceDetails&quot;: { &quot;sourceTypeId&quot;: &quot;string&quot;, &quot;sourceSubTypeId&quot;: &quot;string&quot;, &quot;sourceId&quot;: &quot;string&quot; } } &#x60;&#x60;&#x60; sourceTypeId - it&#x27;s a Source Type - available values can be found using [get /configuration/sources](developers.smartrecruiters.com/reference/configurationsourcetypes-1) endpoint sourceSubTypeId - it&#x27;s a Source Subtype, an optional parameter - available values can be found using [get /configuration/sources](developers.smartrecruiters.com/reference/configurationsourcetypes-1) endpoint sourceId - it&#x27;s a Source Id - available values for a given sourceTypeId can be found using [get /configuration/sources/:sourceTypeId/values](developers.smartrecruiters.com/reference/configurationsourcevaluesall-1) endpoint NOTE: Not defining the source will default to API source. NOTE II: In case you can&#x27;t find an appropriate source to track against you can: * Create a custom source for each customer account separately on [this admin page](www.smartrecruiters.com/settings/configuration/custom-sources\) (you need to be logged in as an admin to the customer account in order to view this page) * Request to [[email protected]]([email protected]) adding a standard source that will be available for all customers if your app / integration is productised (available to all SmartRecruiters customers)

Parameters:

  • body

    Candidate object that needs to be created.

  • job_id

    job identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(CandidateDetails, Integer, Hash)>)

    CandidateDetails data, response status code and response headers



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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# File 'lib/smart_recruiters/api/candidates_api.rb', line 83

def candidates_add_to_job_with_http_info(body, job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CandidatesApi.candidates_add_to_job ...'
  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 CandidatesApi.candidates_add_to_job"
  end
  # verify the required parameter 'job_id' is set
  if @api_client.config.client_side_validation && job_id.nil?
    fail ArgumentError, "Missing the required parameter 'job_id' when calling CandidatesApi.candidates_add_to_job"
  end
  # resource path
  local_var_path = '/jobs/{jobId}/candidates'.sub('{' + 'jobId' + '}', job_id.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'])
  # 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] || 'CandidateDetails' 

  auth_names = opts[:auth_names] || ['key', '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 => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CandidatesApi#candidates_add_to_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#candidates_add_with_http_info(body, opts = {}) ⇒ Array<(CandidateDetails, Integer, Hash)>

Create a new candidate and assign to a Talent Pool Create a new candidate and assign to a Talent Pool. **Tracking candidate source** When adding a new candidate, it&#x27;s very important you track its source appropriately. In order to associate a source with your app/integration, add below object to a candidate body object for this endpoint: &#x60;&#x60;&#x60; { &quot;sourceDetails&quot;: { &quot;sourceTypeId&quot;: &quot;string&quot;, &quot;sourceSubTypeId&quot;: &quot;string&quot;, &quot;sourceId&quot;: &quot;string&quot; } } &#x60;&#x60;&#x60; sourceTypeId - it&#x27;s a Source Type - available values can be found using [get /configuration/sources](developers.smartrecruiters.com/reference/configurationsourcetypes-1) endpoint sourceSubTypeId - it&#x27;s a Source Subtype, an optional parameter - available values can be found using [get /configuration/sources](developers.smartrecruiters.com/reference/configurationsourcetypes-1) endpoint sourceId - it&#x27;s a Source Id - available values for a given sourceTypeId can be found using [get /configuration/sources/:sourceTypeId/values](developers.smartrecruiters.com/reference/configurationsourcevaluesall-1) endpoint NOTE: Not defining the source will default to API source. NOTE II: In case you can&#x27;t find an appropriate source to track against you can: * Create a custom source for each customer account separately on [this admin page](www.smartrecruiters.com/settings/configuration/custom-sources) (you need to be logged in as an admin to the customer account in order to view this page) * Request to [[email protected]]([email protected]) adding a standard source that will be available for all customers if your app/integration is productised (available to all SmartRecruiters customers)

Parameters:

  • body

    Candidate object that needs to be created.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(CandidateDetails, Integer, Hash)>)

    CandidateDetails data, response status code and response headers



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
64
65
# File 'lib/smart_recruiters/api/candidates_api.rb', line 23

def candidates_add_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CandidatesApi.candidates_add ...'
  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 CandidatesApi.candidates_add"
  end
  # resource path
  local_var_path = '/candidates'

  # 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] || 'CandidateDetails' 

  auth_names = opts[:auth_names] || ['key', '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 => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CandidatesApi#candidates_add\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#candidates_all(opts = {}) ⇒ Candidates

Search candidates

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :q (String)

    keyword search, for more infromation see [SmartRecruiters HelpCenter](help.smartrecruiters.com/Getting_Started/Platform/Searching_candidates_via_Candidate_API)

  • :limit (Integer)

    number of elements to return. max value is 100 (default to 10)

  • :page_id (String)

    page identifier of elements to return The &#x60;pageId&#x60; param can be used to fetch multiple page response, in case the number of results is higher than max number of elements to return (specified in the &#x60;limit&#x60; parameter). The &#x60;pageId&#x60; should not be present when requesting the first page of results. The pageId of the following page is returned either in the &#x60;nextPageId&#x60; property, or is available in the HTTP header &#x60;Link&#x60; value of relation type &#x60;next&#x60;. Example of the &#x60;Link&#x60; header: &#x60;&#x60;&#x60; &lt;/candidates?limit&#x3D;10&amp;pageId&#x3D;SKYfn51wTboVGco6%2FvIsIC%2FYbyYP%2F4WgqHLArvCRtYhQEMCgvp1Zj0ya0wpjfKIblyGRcbHytMcvCehVazcjQA%3D%3D&gt;; rel&#x3D;&quot;next&quot; &#x60;&#x60;&#x60;

  • :job_id (Array<String>)

    job filter to display candidates who applied for a job [id]; can be used repeatedly;

  • :location (Array<String>)

    location keyword search which looks up a string in a candidate’s location data; can be used repeatedly; case insensitive; e.g. Krakow

  • :average_rating (Array<Integer>)

    average rating filter to display candidates with a specific average rating (integer); can be used repeatedly; e.g. 4

  • :status (Array<String>)

    candidate’s status filter in a context of a job; can be used repeatedly

  • :consent_status (Array<ConsentStatus>)

    candidate’s consent status filter; can be used repeatedly

  • :sub_status (String)

    candidate’s sub-status filter in a context of a job. Works only in a correlation with a set value for the &quot;status&quot; field.

  • :tag (Array<String>)

    tag assigned to a candidate; can be used repeatedly; case insensitive; e.g. fluent english

  • :updated_after (DateTime)

    ISO8601-formatted time boundaries for the candidate update time, Format: yyyy-MM-ddTHH:mm:ss.SSSZZ

  • :onboarding_status (String)

    candidate&#x27;s onboarding status

  • :property_id (Array<String>)

    candidate&#x27;s property id (1-N) (default to [])

  • :property_value_id (Array<String>)

    candidate&#x27;s property value id (1-N) (default to [])

  • :source_type (Array<String>)

    candidate&#x27;s source type (1-N) (default to [])

  • :source_sub_type (Array<String>)

    candidate&#x27;s source subtype (1-N) (default to [])

  • :source_value_id (Array<String>)

    candidate&#x27;s source value id (1-N) (default to [])

  • :question_category (Array<String>)

    screening question category (1-N) (default to [])

  • :question_field_id (Array<String>)

    screening question field id (1-N) (default to [])

  • :question_field_value_id (Array<String>)

    screening question field value id (1-N) (default to [])

Returns:



153
154
155
156
# File 'lib/smart_recruiters/api/candidates_api.rb', line 153

def candidates_all(opts = {})
  data, _status_code, _headers = candidates_all_with_http_info(opts)
  data
end

#candidates_all_with_http_info(opts = {}) ⇒ Array<(Candidates, Integer, Hash)>

Search candidates

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :q (String)

    keyword search, for more infromation see [SmartRecruiters HelpCenter](help.smartrecruiters.com/Getting_Started/Platform/Searching_candidates_via_Candidate_API)

  • :limit (Integer)

    number of elements to return. max value is 100

  • :page_id (String)

    page identifier of elements to return The &#x60;pageId&#x60; param can be used to fetch multiple page response, in case the number of results is higher than max number of elements to return (specified in the &#x60;limit&#x60; parameter). The &#x60;pageId&#x60; should not be present when requesting the first page of results. The pageId of the following page is returned either in the &#x60;nextPageId&#x60; property, or is available in the HTTP header &#x60;Link&#x60; value of relation type &#x60;next&#x60;. Example of the &#x60;Link&#x60; header: &#x60;&#x60;&#x60; &lt;/candidates?limit&#x3D;10&amp;pageId&#x3D;SKYfn51wTboVGco6%2FvIsIC%2FYbyYP%2F4WgqHLArvCRtYhQEMCgvp1Zj0ya0wpjfKIblyGRcbHytMcvCehVazcjQA%3D%3D&gt;; rel&#x3D;&quot;next&quot; &#x60;&#x60;&#x60;

  • :job_id (Array<String>)

    job filter to display candidates who applied for a job [id]; can be used repeatedly;

  • :location (Array<String>)

    location keyword search which looks up a string in a candidate’s location data; can be used repeatedly; case insensitive; e.g. Krakow

  • :average_rating (Array<Integer>)

    average rating filter to display candidates with a specific average rating (integer); can be used repeatedly; e.g. 4

  • :status (Array<String>)

    candidate’s status filter in a context of a job; can be used repeatedly

  • :consent_status (Array<ConsentStatus>)

    candidate’s consent status filter; can be used repeatedly

  • :sub_status (String)

    candidate’s sub-status filter in a context of a job. Works only in a correlation with a set value for the &quot;status&quot; field.

  • :tag (Array<String>)

    tag assigned to a candidate; can be used repeatedly; case insensitive; e.g. fluent english

  • :updated_after (DateTime)

    ISO8601-formatted time boundaries for the candidate update time, Format: yyyy-MM-ddTHH:mm:ss.SSSZZ

  • :onboarding_status (String)

    candidate&#x27;s onboarding status

  • :property_id (Array<String>)

    candidate&#x27;s property id (1-N)

  • :property_value_id (Array<String>)

    candidate&#x27;s property value id (1-N)

  • :source_type (Array<String>)

    candidate&#x27;s source type (1-N)

  • :source_sub_type (Array<String>)

    candidate&#x27;s source subtype (1-N)

  • :source_value_id (Array<String>)

    candidate&#x27;s source value id (1-N)

  • :question_category (Array<String>)

    screening question category (1-N)

  • :question_field_id (Array<String>)

    screening question field id (1-N)

  • :question_field_value_id (Array<String>)

    screening question field value id (1-N)

Returns:

  • (Array<(Candidates, Integer, Hash)>)

    Candidates data, response status code and response headers



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
# File 'lib/smart_recruiters/api/candidates_api.rb', line 181

def candidates_all_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CandidatesApi.candidates_all ...'
  end
  if @api_client.config.client_side_validation && opts[:'status'] && !opts[:'status'].all? { |item| ['LEAD', 'NEW', 'IN_REVIEW', 'INTERVIEW', 'OFFERED', 'HIRED', 'REJECTED', 'WITHDRAWN', 'TRANSFERRED'].include?(item) }
    fail ArgumentError, 'invalid value for "status", must include one of LEAD, NEW, IN_REVIEW, INTERVIEW, OFFERED, HIRED, REJECTED, WITHDRAWN, TRANSFERRED'
  end
  if @api_client.config.client_side_validation && opts[:'onboarding_status'] && !['READY_TO_ONBOARD', 'ONBOARDING_SUCCESSFUL', 'ONBOARDING_FAILED'].include?(opts[:'onboarding_status'])
    fail ArgumentError, 'invalid value for "onboarding_status", must be one of READY_TO_ONBOARD, ONBOARDING_SUCCESSFUL, ONBOARDING_FAILED'
  end
  # resource path
  local_var_path = '/candidates'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'pageId'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'jobId'] = @api_client.build_collection_param(opts[:'job_id'], :multi) if !opts[:'job_id'].nil?
  query_params[:'location'] = @api_client.build_collection_param(opts[:'location'], :multi) if !opts[:'location'].nil?
  query_params[:'averageRating'] = @api_client.build_collection_param(opts[:'average_rating'], :multi) if !opts[:'average_rating'].nil?
  query_params[:'status'] = @api_client.build_collection_param(opts[:'status'], :multi) if !opts[:'status'].nil?
  query_params[:'consentStatus'] = @api_client.build_collection_param(opts[:'consent_status'], :multi) if !opts[:'consent_status'].nil?
  query_params[:'subStatus'] = opts[:'sub_status'] if !opts[:'sub_status'].nil?
  query_params[:'tag'] = @api_client.build_collection_param(opts[:'tag'], :multi) if !opts[:'tag'].nil?
  query_params[:'updatedAfter'] = opts[:'updated_after'] if !opts[:'updated_after'].nil?
  query_params[:'onboardingStatus'] = opts[:'onboarding_status'] if !opts[:'onboarding_status'].nil?
  query_params[:'propertyId'] = @api_client.build_collection_param(opts[:'property_id'], :multi) if !opts[:'property_id'].nil?
  query_params[:'propertyValueId'] = @api_client.build_collection_param(opts[:'property_value_id'], :multi) if !opts[:'property_value_id'].nil?
  query_params[:'sourceType'] = @api_client.build_collection_param(opts[:'source_type'], :multi) if !opts[:'source_type'].nil?
  query_params[:'sourceSubType'] = @api_client.build_collection_param(opts[:'source_sub_type'], :multi) if !opts[:'source_sub_type'].nil?
  query_params[:'sourceValueId'] = @api_client.build_collection_param(opts[:'source_value_id'], :multi) if !opts[:'source_value_id'].nil?
  query_params[:'questionCategory'] = @api_client.build_collection_param(opts[:'question_category'], :multi) if !opts[:'question_category'].nil?
  query_params[:'questionFieldId'] = @api_client.build_collection_param(opts[:'question_field_id'], :multi) if !opts[:'question_field_id'].nil?
  query_params[:'questionFieldValueId'] = @api_client.build_collection_param(opts[:'question_field_value_id'], :multi) if !opts[:'question_field_value_id'].nil?

  # 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] || 'Candidates' 

  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: CandidatesApi#candidates_all\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#candidates_attachments_add(id, opts = {}) ⇒ Attachment

Attach files to a candidate. Attach files to a candidate.

Parameters:

  • id

    candidate identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :attachment_type (String)
  • :file (String)

Returns:



251
252
253
254
# File 'lib/smart_recruiters/api/candidates_api.rb', line 251

def candidates_attachments_add(id, opts = {})
  data, _status_code, _headers = candidates_attachments_add_with_http_info(id, opts)
  data
end

#candidates_attachments_add_for_job(id, job_id, opts = {}) ⇒ CandidateAttachmentForJob

Attach file to candidate in context of given job. Attach file to candidate in context of given job.

Parameters:

  • id

    candidate identifier

  • job_id

    job identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :attachment_type (String)
  • :file (String)

Returns:



319
320
321
322
# File 'lib/smart_recruiters/api/candidates_api.rb', line 319

def candidates_attachments_add_for_job(id, job_id, opts = {})
  data, _status_code, _headers = candidates_attachments_add_for_job_with_http_info(id, job_id, opts)
  data
end

#candidates_attachments_add_for_job_with_http_info(id, job_id, opts = {}) ⇒ Array<(CandidateAttachmentForJob, Integer, Hash)>

Attach file to candidate in context of given job. Attach file to candidate in context of given job.

Parameters:

  • id

    candidate identifier

  • job_id

    job identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :attachment_type (String)
  • :file (String)

Returns:

  • (Array<(CandidateAttachmentForJob, Integer, Hash)>)

    CandidateAttachmentForJob data, response status code and response headers



332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
# File 'lib/smart_recruiters/api/candidates_api.rb', line 332

def candidates_attachments_add_for_job_with_http_info(id, job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CandidatesApi.candidates_attachments_add_for_job ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling CandidatesApi.candidates_attachments_add_for_job"
  end
  # verify the required parameter 'job_id' is set
  if @api_client.config.client_side_validation && job_id.nil?
    fail ArgumentError, "Missing the required parameter 'job_id' when calling CandidatesApi.candidates_attachments_add_for_job"
  end
  if @api_client.config.client_side_validation && opts[:'attachment_type'] && !['GENERIC_FILE', 'RESUME', 'COVER_LETTER'].include?(opts[:'attachment_type'])
    fail ArgumentError, 'invalid value for "attachment_type", must be one of GENERIC_FILE, RESUME, COVER_LETTER'
  end
  # resource path
  local_var_path = '/candidates/{id}/jobs/{jobId}/attachments'.sub('{' + 'id' + '}', id.to_s).sub('{' + 'jobId' + '}', job_id.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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['attachmentType'] = opts[:'attachment_type'] if !opts[:'attachment_type'].nil?
  form_params['file'] = opts[:'file'] if !opts[:'file'].nil?

  # http body (model)
  post_body = opts[:body] 

  return_type = opts[:return_type] || 'CandidateAttachmentForJob' 

  auth_names = opts[:auth_names] || ['key', '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 => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CandidatesApi#candidates_attachments_add_for_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#candidates_attachments_add_with_http_info(id, opts = {}) ⇒ Array<(Attachment, Integer, Hash)>

Attach files to a candidate. Attach files to a candidate.

Parameters:

  • id

    candidate identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :attachment_type (String)
  • :file (String)

Returns:

  • (Array<(Attachment, Integer, Hash)>)

    Attachment data, response status code and response headers



263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
# File 'lib/smart_recruiters/api/candidates_api.rb', line 263

def candidates_attachments_add_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CandidatesApi.candidates_attachments_add ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling CandidatesApi.candidates_attachments_add"
  end
  if @api_client.config.client_side_validation && opts[:'attachment_type'] && !['GENERIC_FILE', 'RESUME', 'COVER_LETTER'].include?(opts[:'attachment_type'])
    fail ArgumentError, 'invalid value for "attachment_type", must be one of GENERIC_FILE, RESUME, COVER_LETTER'
  end
  # resource path
  local_var_path = '/candidates/{id}/attachments'.sub('{' + 'id' + '}', id.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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['attachmentType'] = opts[:'attachment_type'] if !opts[:'attachment_type'].nil?
  form_params['file'] = opts[:'file'] if !opts[:'file'].nil?

  # http body (model)
  post_body = opts[:body] 

  return_type = opts[:return_type] || 'Attachment' 

  auth_names = opts[:auth_names] || ['key', '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 => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CandidatesApi#candidates_attachments_add\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#candidates_attachments_delete_for_job(attachment_id, opts = {}) ⇒ nil

Delete attachment. Delete attachment.

Parameters:

  • attachment_id

    attachment identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


389
390
391
392
# File 'lib/smart_recruiters/api/candidates_api.rb', line 389

def candidates_attachments_delete_for_job(attachment_id, opts = {})
  candidates_attachments_delete_for_job_with_http_info(attachment_id, opts)
  nil
end

#candidates_attachments_delete_for_job_with_http_info(attachment_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete attachment. Delete attachment.

Parameters:

  • attachment_id

    attachment identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
# File 'lib/smart_recruiters/api/candidates_api.rb', line 399

def candidates_attachments_delete_for_job_with_http_info(attachment_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CandidatesApi.candidates_attachments_delete_for_job ...'
  end
  # verify the required parameter 'attachment_id' is set
  if @api_client.config.client_side_validation && attachment_id.nil?
    fail ArgumentError, "Missing the required parameter 'attachment_id' when calling CandidatesApi.candidates_attachments_delete_for_job"
  end
  # resource path
  local_var_path = '/candidates/attachments/{attachmentId}'.sub('{' + 'attachmentId' + '}', attachment_id.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: CandidatesApi#candidates_attachments_delete_for_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#candidates_attachments_get(id, attachment_id, opts = {}) ⇒ nil

Get a candidate’s attachment. Get a candidate’s attachment.

Parameters:

  • id

    candidate identifier

  • attachment_id

    Identifier of an attachment

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


446
447
448
449
# File 'lib/smart_recruiters/api/candidates_api.rb', line 446

def candidates_attachments_get(id, attachment_id, opts = {})
  candidates_attachments_get_with_http_info(id, attachment_id, opts)
  nil
end

#candidates_attachments_get_for_job(attachment_id, opts = {}) ⇒ nil

Get candidate’s attachment. Get candidate’s attachment.

Parameters:

  • attachment_id

    attachment identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


507
508
509
510
# File 'lib/smart_recruiters/api/candidates_api.rb', line 507

def candidates_attachments_get_for_job(attachment_id, opts = {})
  candidates_attachments_get_for_job_with_http_info(attachment_id, opts)
  nil
end

#candidates_attachments_get_for_job_with_http_info(attachment_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Get candidate&#x27;s attachment. Get candidate&#x27;s attachment.

Parameters:

  • attachment_id

    attachment identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
# File 'lib/smart_recruiters/api/candidates_api.rb', line 517

def candidates_attachments_get_for_job_with_http_info(attachment_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CandidatesApi.candidates_attachments_get_for_job ...'
  end
  # verify the required parameter 'attachment_id' is set
  if @api_client.config.client_side_validation && attachment_id.nil?
    fail ArgumentError, "Missing the required parameter 'attachment_id' when calling CandidatesApi.candidates_attachments_get_for_job"
  end
  # resource path
  local_var_path = '/candidates/attachments/{attachmentId}'.sub('{' + 'attachmentId' + '}', attachment_id.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(: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: CandidatesApi#candidates_attachments_get_for_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#candidates_attachments_get_with_http_info(id, attachment_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Get a candidate&#x27;s attachment. Get a candidate&#x27;s attachment.

Parameters:

  • id

    candidate identifier

  • attachment_id

    Identifier of an attachment

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
# File 'lib/smart_recruiters/api/candidates_api.rb', line 457

def candidates_attachments_get_with_http_info(id, attachment_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CandidatesApi.candidates_attachments_get ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling CandidatesApi.candidates_attachments_get"
  end
  # verify the required parameter 'attachment_id' is set
  if @api_client.config.client_side_validation && attachment_id.nil?
    fail ArgumentError, "Missing the required parameter 'attachment_id' when calling CandidatesApi.candidates_attachments_get"
  end
  # resource path
  local_var_path = '/candidates/{id}/attachments/{attachmentId}'.sub('{' + 'id' + '}', id.to_s).sub('{' + 'attachmentId' + '}', attachment_id.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(: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: CandidatesApi#candidates_attachments_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#candidates_attachments_list(id, opts = {}) ⇒ Attachments

Get list candidate’s attachments. Get list of candidate’s attachments.

Parameters:

  • id

    candidate identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



563
564
565
566
# File 'lib/smart_recruiters/api/candidates_api.rb', line 563

def candidates_attachments_list(id, opts = {})
  data, _status_code, _headers = candidates_attachments_list_with_http_info(id, opts)
  data
end

#candidates_attachments_list_for_job(id, job_id, opts = {}) ⇒ CandidateAttachmentsForJob

Get list of candidate’s attachments in context of given job. Get list of candidate’s attachments in context of given job.

Parameters:

  • id

    candidate identifier

  • job_id

    job identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



620
621
622
623
# File 'lib/smart_recruiters/api/candidates_api.rb', line 620

def candidates_attachments_list_for_job(id, job_id, opts = {})
  data, _status_code, _headers = candidates_attachments_list_for_job_with_http_info(id, job_id, opts)
  data
end

#candidates_attachments_list_for_job_with_http_info(id, job_id, opts = {}) ⇒ Array<(CandidateAttachmentsForJob, Integer, Hash)>

Get list of candidate&#x27;s attachments in context of given job. Get list of candidate&#x27;s attachments in context of given job.

Parameters:

  • id

    candidate identifier

  • job_id

    job identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(CandidateAttachmentsForJob, Integer, Hash)>)

    CandidateAttachmentsForJob data, response status code and response headers



631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
# File 'lib/smart_recruiters/api/candidates_api.rb', line 631

def candidates_attachments_list_for_job_with_http_info(id, job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CandidatesApi.candidates_attachments_list_for_job ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling CandidatesApi.candidates_attachments_list_for_job"
  end
  # verify the required parameter 'job_id' is set
  if @api_client.config.client_side_validation && job_id.nil?
    fail ArgumentError, "Missing the required parameter 'job_id' when calling CandidatesApi.candidates_attachments_list_for_job"
  end
  # resource path
  local_var_path = '/candidates/{id}/jobs/{jobId}/attachments'.sub('{' + 'id' + '}', id.to_s).sub('{' + 'jobId' + '}', job_id.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] || 'CandidateAttachmentsForJob' 

  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: CandidatesApi#candidates_attachments_list_for_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#candidates_attachments_list_with_http_info(id, opts = {}) ⇒ Array<(Attachments, Integer, Hash)>

Get list candidate&#x27;s attachments. Get list of candidate&#x27;s attachments.

Parameters:

  • id

    candidate identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Attachments, Integer, Hash)>)

    Attachments data, response status code and response headers



573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
# File 'lib/smart_recruiters/api/candidates_api.rb', line 573

def candidates_attachments_list_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CandidatesApi.candidates_attachments_list ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling CandidatesApi.candidates_attachments_list"
  end
  # resource path
  local_var_path = '/candidates/{id}/attachments'.sub('{' + 'id' + '}', id.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] || 'Attachments' 

  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: CandidatesApi#candidates_attachments_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

Candidate consent decisions Depending on the consent approach which a customer chooses, the response will either contain one candidates’ consent decision - known as "single consent" - or contain one candidates’ consent broken out by the data scopes which the customer has subscribed to - such as SmartRecruit and SmartCRM. This is referred to as "separated consent". Provided there is at least one pending consent request (without a decision) for a candidate, the response contains a date and time of the most recent of such consent requests. Read more about GDPR tools on [SmartRecruiters HelpCenter](help.smartrecruiters.com/GDPR/GDPR_Tools_for_Companies)

Parameters:

  • id

    candidate identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



681
682
683
684
# File 'lib/smart_recruiters/api/candidates_api.rb', line 681

def candidates_consent_decisions(id, opts = {})
  data, _status_code, _headers = candidates_consent_decisions_with_http_info(id, opts)
  data
end

Candidate consent decisions Depending on the consent approach which a customer chooses, the response will either contain one candidates&#x27; consent decision - known as &quot;single consent&quot; - or contain one candidates&#x27; consent broken out by the data scopes which the customer has subscribed to - such as SmartRecruit and SmartCRM. This is referred to as &quot;separated consent&quot;. Provided there is at least one pending consent request (without a decision) for a candidate, the response contains a date and time of the most recent of such consent requests. Read more about GDPR tools on [SmartRecruiters HelpCenter](help.smartrecruiters.com/GDPR/GDPR_Tools_for_Companies)

Parameters:

  • id

    candidate identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(CandidateConsentDecisions, Integer, Hash)>)

    CandidateConsentDecisions data, response status code and response headers



691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
# File 'lib/smart_recruiters/api/candidates_api.rb', line 691

def candidates_consent_decisions_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CandidatesApi.candidates_consent_decisions ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling CandidatesApi.candidates_consent_decisions"
  end
  # resource path
  local_var_path = '/candidates/{id}/consents'.sub('{' + 'id' + '}', id.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] || 'CandidateConsentDecisions' 

  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: CandidatesApi#candidates_consent_decisions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

Request consent from multiple candidates Read more about GDPR tools on [SmartRecruiters HelpCenter](help.smartrecruiters.com/GDPR/GDPR_Tools_for_Companies)

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :body (Object)

Returns:



737
738
739
740
# File 'lib/smart_recruiters/api/candidates_api.rb', line 737

def candidates_consent_request_batch(opts = {})
  data, _status_code, _headers = candidates_consent_request_batch_with_http_info(opts)
  data
end

Request consent from multiple candidates Read more about GDPR tools on [SmartRecruiters HelpCenter](help.smartrecruiters.com/GDPR/GDPR_Tools_for_Companies)

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :body (Object)

Returns:

  • (Array<(ConsentRequestsResults, Integer, Hash)>)

    ConsentRequestsResults data, response status code and response headers



747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
# File 'lib/smart_recruiters/api/candidates_api.rb', line 747

def candidates_consent_request_batch_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CandidatesApi.candidates_consent_request_batch ...'
  end
  # resource path
  local_var_path = '/candidates/consent-requests'

  # 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(opts[:'body']) 

  return_type = opts[:return_type] || 'ConsentRequestsResults' 

  auth_names = opts[:auth_names] || ['key', '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 => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CandidatesApi#candidates_consent_request_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

Status of candidate consent Get candidate consent status

Parameters:

  • id

    candidate identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



791
792
793
794
# File 'lib/smart_recruiters/api/candidates_api.rb', line 791

def candidates_consent_status(id, opts = {})
  data, _status_code, _headers = candidates_consent_status_with_http_info(id, opts)
  data
end

Status of candidate consent Get candidate consent status

Parameters:

  • id

    candidate identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(CandidateConsentStatus, Integer, Hash)>)

    CandidateConsentStatus data, response status code and response headers



801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
# File 'lib/smart_recruiters/api/candidates_api.rb', line 801

def candidates_consent_status_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CandidatesApi.candidates_consent_status ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling CandidatesApi.candidates_consent_status"
  end
  # resource path
  local_var_path = '/candidates/{id}/consent'.sub('{' + 'id' + '}', id.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] || 'CandidateConsentStatus' 

  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: CandidatesApi#candidates_consent_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#candidates_delete(id, opts = {}) ⇒ nil

Delete Candidate Delete candidate

Parameters:

  • id

    candidate identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


847
848
849
850
# File 'lib/smart_recruiters/api/candidates_api.rb', line 847

def candidates_delete(id, opts = {})
  candidates_delete_with_http_info(id, opts)
  nil
end

#candidates_delete_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete Candidate Delete candidate

Parameters:

  • id

    candidate identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
# File 'lib/smart_recruiters/api/candidates_api.rb', line 857

def candidates_delete_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CandidatesApi.candidates_delete ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling CandidatesApi.candidates_delete"
  end
  # resource path
  local_var_path = '/candidates/{id}'.sub('{' + 'id' + '}', id.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: CandidatesApi#candidates_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#candidates_get(id, opts = {}) ⇒ CandidateDetails

Get details of a candidate Get details of a candidate

Parameters:

  • id

    candidate identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



903
904
905
906
# File 'lib/smart_recruiters/api/candidates_api.rb', line 903

def candidates_get(id, opts = {})
  data, _status_code, _headers = candidates_get_with_http_info(id, opts)
  data
end

#candidates_get_application(id, job_id, opts = {}) ⇒ Application

Get details of a candidate’s application to a job Get details of a candidate’s application to a job

Parameters:

  • id

    candidate identifier

  • job_id

    job identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



960
961
962
963
# File 'lib/smart_recruiters/api/candidates_api.rb', line 960

def candidates_get_application(id, job_id, opts = {})
  data, _status_code, _headers = candidates_get_application_with_http_info(id, job_id, opts)
  data
end

#candidates_get_application_with_http_info(id, job_id, opts = {}) ⇒ Array<(Application, Integer, Hash)>

Get details of a candidate&#x27;s application to a job Get details of a candidate&#x27;s application to a job

Parameters:

  • id

    candidate identifier

  • job_id

    job identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Application, Integer, Hash)>)

    Application data, response status code and response headers



971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
# File 'lib/smart_recruiters/api/candidates_api.rb', line 971

def candidates_get_application_with_http_info(id, job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CandidatesApi.candidates_get_application ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling CandidatesApi.candidates_get_application"
  end
  # verify the required parameter 'job_id' is set
  if @api_client.config.client_side_validation && job_id.nil?
    fail ArgumentError, "Missing the required parameter 'job_id' when calling CandidatesApi.candidates_get_application"
  end
  # resource path
  local_var_path = '/candidates/{id}/jobs/{jobId}'.sub('{' + 'id' + '}', id.to_s).sub('{' + 'jobId' + '}', job_id.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] || 'Application' 

  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: CandidatesApi#candidates_get_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#candidates_get_with_http_info(id, opts = {}) ⇒ Array<(CandidateDetails, Integer, Hash)>

Get details of a candidate Get details of a candidate

Parameters:

  • id

    candidate identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(CandidateDetails, Integer, Hash)>)

    CandidateDetails data, response status code and response headers



913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
# File 'lib/smart_recruiters/api/candidates_api.rb', line 913

def candidates_get_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CandidatesApi.candidates_get ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling CandidatesApi.candidates_get"
  end
  # resource path
  local_var_path = '/candidates/{id}'.sub('{' + 'id' + '}', id.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] || 'CandidateDetails' 

  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: CandidatesApi#candidates_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#candidates_onboarding_get(id, opts = {}) ⇒ OnboardingStatus

Get Onboarding Status for a candidate Get Onboarding Status for a candidate. Please use ‘GET /candidates/id/jobs/jobId/onboardingStatus` instead.

Parameters:

  • id

    candidate identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1021
1022
1023
1024
# File 'lib/smart_recruiters/api/candidates_api.rb', line 1021

def candidates_onboarding_get(id, opts = {})
  data, _status_code, _headers = candidates_onboarding_get_with_http_info(id, opts)
  data
end

#candidates_onboarding_get_for_job(id, job_id, opts = {}) ⇒ OnboardingStatus

Get Onboarding Status for a candidate associated with given job Get Onboarding Status for a candidate associated with given job.

Parameters:

  • id

    candidate identifier

  • job_id

    job identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1078
1079
1080
1081
# File 'lib/smart_recruiters/api/candidates_api.rb', line 1078

def candidates_onboarding_get_for_job(id, job_id, opts = {})
  data, _status_code, _headers = candidates_onboarding_get_for_job_with_http_info(id, job_id, opts)
  data
end

#candidates_onboarding_get_for_job_with_http_info(id, job_id, opts = {}) ⇒ Array<(OnboardingStatus, Integer, Hash)>

Get Onboarding Status for a candidate associated with given job Get Onboarding Status for a candidate associated with given job.

Parameters:

  • id

    candidate identifier

  • job_id

    job identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(OnboardingStatus, Integer, Hash)>)

    OnboardingStatus data, response status code and response headers



1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
# File 'lib/smart_recruiters/api/candidates_api.rb', line 1089

def candidates_onboarding_get_for_job_with_http_info(id, job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CandidatesApi.candidates_onboarding_get_for_job ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling CandidatesApi.candidates_onboarding_get_for_job"
  end
  # verify the required parameter 'job_id' is set
  if @api_client.config.client_side_validation && job_id.nil?
    fail ArgumentError, "Missing the required parameter 'job_id' when calling CandidatesApi.candidates_onboarding_get_for_job"
  end
  # resource path
  local_var_path = '/candidates/{id}/jobs/{jobId}/onboardingStatus'.sub('{' + 'id' + '}', id.to_s).sub('{' + 'jobId' + '}', job_id.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] || 'OnboardingStatus' 

  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: CandidatesApi#candidates_onboarding_get_for_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#candidates_onboarding_get_with_http_info(id, opts = {}) ⇒ Array<(OnboardingStatus, Integer, Hash)>

Get Onboarding Status for a candidate Get Onboarding Status for a candidate. Please use &#x60;GET /candidates/id/jobs/jobId/onboardingStatus&#x60; instead.

Parameters:

  • id

    candidate identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(OnboardingStatus, Integer, Hash)>)

    OnboardingStatus data, response status code and response headers



1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
# File 'lib/smart_recruiters/api/candidates_api.rb', line 1031

def candidates_onboarding_get_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CandidatesApi.candidates_onboarding_get ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling CandidatesApi.candidates_onboarding_get"
  end
  # resource path
  local_var_path = '/candidates/{id}/onboardingStatus'.sub('{' + 'id' + '}', id.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] || 'OnboardingStatus' 

  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: CandidatesApi#candidates_onboarding_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#candidates_onboarding_update(body, id, opts = {}) ⇒ nil

Set Onboarding Status for a candidate Set Onboarding Status for a candidate. Please use ‘PUT /candidates/id/jobs/jobId/onboardingStatus` instead.

Parameters:

  • body

    Onboarding status.

  • id

    candidate identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


1140
1141
1142
1143
# File 'lib/smart_recruiters/api/candidates_api.rb', line 1140

def candidates_onboarding_update(body, id, opts = {})
  candidates_onboarding_update_with_http_info(body, id, opts)
  nil
end

#candidates_onboarding_update_for_job(body, id, job_id, opts = {}) ⇒ nil

Sets Onboarding Status for a candidate associated with given job Sets Onboarding Status for a candidate associated with given job.

Parameters:

  • body

    Onboarding status.

  • id

    candidate identifier

  • job_id

    job identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


1205
1206
1207
1208
# File 'lib/smart_recruiters/api/candidates_api.rb', line 1205

def candidates_onboarding_update_for_job(body, id, job_id, opts = {})
  candidates_onboarding_update_for_job_with_http_info(body, id, job_id, opts)
  nil
end

#candidates_onboarding_update_for_job_with_http_info(body, id, job_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Sets Onboarding Status for a candidate associated with given job Sets Onboarding Status for a candidate associated with given job.

Parameters:

  • body

    Onboarding status.

  • id

    candidate identifier

  • job_id

    job identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
# File 'lib/smart_recruiters/api/candidates_api.rb', line 1217

def candidates_onboarding_update_for_job_with_http_info(body, id, job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CandidatesApi.candidates_onboarding_update_for_job ...'
  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 CandidatesApi.candidates_onboarding_update_for_job"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling CandidatesApi.candidates_onboarding_update_for_job"
  end
  # verify the required parameter 'job_id' is set
  if @api_client.config.client_side_validation && job_id.nil?
    fail ArgumentError, "Missing the required parameter 'job_id' when calling CandidatesApi.candidates_onboarding_update_for_job"
  end
  # resource path
  local_var_path = '/candidates/{id}/jobs/{jobId}/onboardingStatus'.sub('{' + 'id' + '}', id.to_s).sub('{' + 'jobId' + '}', job_id.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'])
  # 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(:PUT, 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: CandidatesApi#candidates_onboarding_update_for_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#candidates_onboarding_update_with_http_info(body, id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Set Onboarding Status for a candidate Set Onboarding Status for a candidate. Please use &#x60;PUT /candidates/id/jobs/jobId/onboardingStatus&#x60; instead.

Parameters:

  • body

    Onboarding status.

  • id

    candidate identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
# File 'lib/smart_recruiters/api/candidates_api.rb', line 1151

def candidates_onboarding_update_with_http_info(body, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CandidatesApi.candidates_onboarding_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 CandidatesApi.candidates_onboarding_update"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling CandidatesApi.candidates_onboarding_update"
  end
  # resource path
  local_var_path = '/candidates/{id}/onboardingStatus'.sub('{' + 'id' + '}', id.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'])
  # 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(:PUT, 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: CandidatesApi#candidates_onboarding_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#candidates_properties_get(id, opts = {}) ⇒ CandidateProperties

Get candidate property values for a candidate Please use ‘GET /candidates/id/jobs/jobId/properties` instead. Returns “` {} “` when there is no value set for a candidate property.

Parameters:

  • id

    candidate identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    context for candidate properties to display

Returns:



1274
1275
1276
1277
# File 'lib/smart_recruiters/api/candidates_api.rb', line 1274

def candidates_properties_get(id, opts = {})
  data, _status_code, _headers = candidates_properties_get_with_http_info(id, opts)
  data
end

#candidates_properties_get_for_job(id, job_id, opts = {}) ⇒ CandidateProperties

Get candidate property values for a candidate’s job Returns “‘ {} “` when there is no value set for a candidate property.

Parameters:

  • id

    candidate identifier

  • job_id

    job identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    context for candidate properties to display

Returns:



1337
1338
1339
1340
# File 'lib/smart_recruiters/api/candidates_api.rb', line 1337

def candidates_properties_get_for_job(id, job_id, opts = {})
  data, _status_code, _headers = candidates_properties_get_for_job_with_http_info(id, job_id, opts)
  data
end

#candidates_properties_get_for_job_with_http_info(id, job_id, opts = {}) ⇒ Array<(CandidateProperties, Integer, Hash)>

Get candidate property values for a candidate&#x27;s job Returns &#x60;&#x60;&#x60; {} &#x60;&#x60;&#x60; when there is no value set for a candidate property.

Parameters:

  • id

    candidate identifier

  • job_id

    job identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    context for candidate properties to display

Returns:

  • (Array<(CandidateProperties, Integer, Hash)>)

    CandidateProperties data, response status code and response headers



1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
# File 'lib/smart_recruiters/api/candidates_api.rb', line 1349

def candidates_properties_get_for_job_with_http_info(id, job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CandidatesApi.candidates_properties_get_for_job ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling CandidatesApi.candidates_properties_get_for_job"
  end
  # verify the required parameter 'job_id' is set
  if @api_client.config.client_side_validation && job_id.nil?
    fail ArgumentError, "Missing the required parameter 'job_id' when calling CandidatesApi.candidates_properties_get_for_job"
  end
  if @api_client.config.client_side_validation && opts[:'context'] && !['PROFILE', 'OFFER_FORM', 'HIRE_FORM', 'OFFER_APPROVAL_FORM'].include?(opts[:'context'])
    fail ArgumentError, 'invalid value for "context", must be one of PROFILE, OFFER_FORM, HIRE_FORM, OFFER_APPROVAL_FORM'
  end
  # resource path
  local_var_path = '/candidates/{id}/jobs/{jobId}/properties'.sub('{' + 'id' + '}', id.to_s).sub('{' + 'jobId' + '}', job_id.to_s)

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil?

  # 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] || 'CandidateProperties' 

  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: CandidatesApi#candidates_properties_get_for_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#candidates_properties_get_with_http_info(id, opts = {}) ⇒ Array<(CandidateProperties, Integer, Hash)>

Get candidate property values for a candidate Please use &#x60;GET /candidates/id/jobs/jobId/properties&#x60; instead. Returns &#x60;&#x60;&#x60; {} &#x60;&#x60;&#x60; when there is no value set for a candidate property.

Parameters:

  • id

    candidate identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    context for candidate properties to display

Returns:

  • (Array<(CandidateProperties, Integer, Hash)>)

    CandidateProperties data, response status code and response headers



1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
# File 'lib/smart_recruiters/api/candidates_api.rb', line 1285

def candidates_properties_get_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CandidatesApi.candidates_properties_get ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling CandidatesApi.candidates_properties_get"
  end
  if @api_client.config.client_side_validation && opts[:'context'] && !['PROFILE', 'OFFER_FORM', 'HIRE_FORM', 'OFFER_APPROVAL_FORM'].include?(opts[:'context'])
    fail ArgumentError, 'invalid value for "context", must be one of PROFILE, OFFER_FORM, HIRE_FORM, OFFER_APPROVAL_FORM'
  end
  # resource path
  local_var_path = '/candidates/{id}/properties'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil?

  # 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] || 'CandidateProperties' 

  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: CandidatesApi#candidates_properties_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#candidates_properties_values_batch_update_for_job(id, job_id, opts = {}) ⇒ nil

Add/update candidate properties values Set candidate properties values for the candidate’s job Below you can find a list of value examples, dependent on different candidate property types. ### BOOLEAN “‘ [{ "id": "propertyId", "value": true }] “` Value has to be `true` or `false`. ### COUNTRY “` [{ "id": "propertyId", "value": "us" }] “` Value has to be lowercase string in ISO 3166-1 alpha-2 format. ### CURRENCY “` [{ "id": "propertyId", "value": { "code": "GBP", "value": 23232 } }] “` Code of value is a currency code in ISO 4217 format. ### DATE “` [{ "id": "propertyId", "value": "2015-11-17T23:00:00.000Z" }] “` ### NUMBER, PERCENT “` [{ "id": "propertyId", "value": 42 }] “` ### REGION “` [{ "id": "propertyId", "value": "us-wa" }] “` Value has to be lowercase string in ISO 3166-2 compatible format. ### SINGLE_SELECT “` [{ "id": "propertyId", "value": "f6fe768f-b5e6-4794-9938-c2f42ab0a572" }] “` Value has to be an id of candidate property value (provided by `GET /configuration/candidate-properties/propertyId/values`). ### TEXT “` [{ "id": "propertyId", "value": "Example text" }] “` ### USER “` [{ "id": "propertyId", "value": "50fe861de4b00265edec6775" }] “` Value has to be a valid user id ### Resetting a value To reset a value for any of the above types, please pass: “` ["propertyId"] “`

Parameters:

  • id

    candidate identifier

  • job_id

    job identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (nil)


1405
1406
1407
1408
# File 'lib/smart_recruiters/api/candidates_api.rb', line 1405

def candidates_properties_values_batch_update_for_job(id, job_id, opts = {})
  candidates_properties_values_batch_update_for_job_with_http_info(id, job_id, opts)
  nil
end

#candidates_properties_values_batch_update_for_job_with_http_info(id, job_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Add/update candidate properties values Set candidate properties values for the candidate&#x27;s job Below you can find a list of value examples, dependent on different candidate property types. ### BOOLEAN &#x60;&#x60;&#x60; [{ &quot;id&quot;: &quot;propertyId&quot;, &quot;value&quot;: true }] &#x60;&#x60;&#x60; Value has to be &#x60;true&#x60; or &#x60;false&#x60;. ### COUNTRY &#x60;&#x60;&#x60; [{ &quot;id&quot;: &quot;propertyId&quot;, &quot;value&quot;: &quot;us&quot; }] &#x60;&#x60;&#x60; Value has to be lowercase string in ISO 3166-1 alpha-2 format. ### CURRENCY &#x60;&#x60;&#x60; [{ &quot;id&quot;: &quot;propertyId&quot;, &quot;value&quot;: { &quot;code&quot;: &quot;GBP&quot;, &quot;value&quot;: 23232 } }] &#x60;&#x60;&#x60; Code of value is a currency code in ISO 4217 format. ### DATE &#x60;&#x60;&#x60; [{ &quot;id&quot;: &quot;propertyId&quot;, &quot;value&quot;: &quot;2015-11-17T23:00:00.000Z&quot; }] &#x60;&#x60;&#x60; ### NUMBER, PERCENT &#x60;&#x60;&#x60; [{ &quot;id&quot;: &quot;propertyId&quot;, &quot;value&quot;: 42 }] &#x60;&#x60;&#x60; ### REGION &#x60;&#x60;&#x60; [{ &quot;id&quot;: &quot;propertyId&quot;, &quot;value&quot;: &quot;us-wa&quot; }] &#x60;&#x60;&#x60; Value has to be lowercase string in ISO 3166-2 compatible format. ### SINGLE_SELECT &#x60;&#x60;&#x60; [{ &quot;id&quot;: &quot;propertyId&quot;, &quot;value&quot;: &quot;f6fe768f-b5e6-4794-9938-c2f42ab0a572&quot; }] &#x60;&#x60;&#x60; Value has to be an id of candidate property value (provided by &#x60;GET /configuration/candidate-properties/propertyId/values&#x60;). ### TEXT &#x60;&#x60;&#x60; [{ &quot;id&quot;: &quot;propertyId&quot;, &quot;value&quot;: &quot;Example text&quot; }] &#x60;&#x60;&#x60; ### USER &#x60;&#x60;&#x60; [{ &quot;id&quot;: &quot;propertyId&quot;, &quot;value&quot;: &quot;50fe861de4b00265edec6775&quot; }] &#x60;&#x60;&#x60; Value has to be a valid user id ### Resetting a value To reset a value for any of the above types, please pass: &#x60;&#x60;&#x60; [&quot;propertyId&quot;] &#x60;&#x60;&#x60;

Parameters:

  • id

    candidate identifier

  • job_id

    job identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
# File 'lib/smart_recruiters/api/candidates_api.rb', line 1417

def candidates_properties_values_batch_update_for_job_with_http_info(id, job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CandidatesApi.candidates_properties_values_batch_update_for_job ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling CandidatesApi.candidates_properties_values_batch_update_for_job"
  end
  # verify the required parameter 'job_id' is set
  if @api_client.config.client_side_validation && job_id.nil?
    fail ArgumentError, "Missing the required parameter 'job_id' when calling CandidatesApi.candidates_properties_values_batch_update_for_job"
  end
  # resource path
  local_var_path = '/candidates/{id}/jobs/{jobId}/properties'.sub('{' + 'id' + '}', id.to_s).sub('{' + 'jobId' + '}', job_id.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'])
  # 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(opts[:'body']) 

  return_type = opts[:return_type] 

  auth_names = opts[:auth_names] || ['key', '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,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CandidatesApi#candidates_properties_values_batch_update_for_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#candidates_properties_values_update(id, property_id, opts = {}) ⇒ nil

Add/update candidate property value Please use ‘PUT /candidates/id/jobs/jobId/properties` instead. Set a candidate property value for the candidate. Below you can find a list of value examples, dependent on different candidate property types. * BOOLEAN “` { "value": true } “` Value has to be `true` or `false`. * COUNTRY “` { "value": "us" } “` Value has to be lowercase string in ISO 3166-1 alpha-2 format. * CURRENCY “` { "value": { "code": "GBP", "value": 23232 } } “` Code of value is a currency code in ISO 4217 format. * DATE “` { "value": "2015-11-17T23:00:00.000Z" } “` * **NUMBER, PERCENT** “` { "value": 42 } “` * REGION “` { "value": "us-wa" } “` Value has to be lowercase string in ISO 3166-2 compatible format. * SINGLE_SELECT “` { "value": "f6fe768f-b5e6-4794-9938-c2f42ab0a572" } “` Value has to be an id of candidate property value (provided by GET /configuration/candidate-properties/propertyId/values). * TEXT “` { "value": "Example text" } “` * USER “` { "value": "50fe861de4b00265edec6775" } “` Value has to be a valid user id To reset a value for any of the above types, please pass “` {} “`

Parameters:

  • id

    candidate identifier

  • property_id

    Identifier of a Candidate Property

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (nil)


1471
1472
1473
1474
# File 'lib/smart_recruiters/api/candidates_api.rb', line 1471

def candidates_properties_values_update(id, property_id, opts = {})
  candidates_properties_values_update_with_http_info(id, property_id, opts)
  nil
end

#candidates_properties_values_update_for_job(id, job_id, property_id, opts = {}) ⇒ nil

Add/update candidate property value Please use ‘PUT /candidates/id/jobs/jobId/properties` instead. Set a candidate property value for the candidate. Below you can find a list of value examples, dependent on different candidate property types. ### BOOLEAN “` { "value": true } “` Value has to be `true` or `false`. ### COUNTRY “` { "value": "us" } “` Value has to be lowercase string in ISO 3166-1 alpha-2 format. ### CURRENCY “` { "value": { "code": "GBP", "value": 23232 } } “` Code of value is a currency code in ISO 4217 format. ### DATE “` { "value": "2015-11-17T23:00:00.000Z" } “` ### NUMBER, PERCENT “` { "value": 42 } “` ### REGION “` { "value": "us-wa" } “` Value has to be lowercase string in ISO 3166-2 compatible format. ### SINGLE_SELECT “` { "value": "f6fe768f-b5e6-4794-9938-c2f42ab0a572" } “` Value has to be an id of candidate property value (provided by `GET /configuration/candidate-properties/propertyId/values`). ### TEXT “` { "value": "Example text" } “` ### USER “` { "value": "50fe861de4b00265edec6775" } “` Value has to be a valid user id ### Resetting a value To reset a value for any of the above types, please pass: “` {} “`

Parameters:

  • id

    candidate identifier

  • job_id

    job identifier

  • property_id

    Identifier of a Candidate Property

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (nil)


1538
1539
1540
1541
# File 'lib/smart_recruiters/api/candidates_api.rb', line 1538

def candidates_properties_values_update_for_job(id, job_id, property_id, opts = {})
  candidates_properties_values_update_for_job_with_http_info(id, job_id, property_id, opts)
  nil
end

#candidates_properties_values_update_for_job_with_http_info(id, job_id, property_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Add/update candidate property value Please use &#x60;PUT /candidates/id/jobs/jobId/properties&#x60; instead. Set a candidate property value for the candidate. Below you can find a list of value examples, dependent on different candidate property types. ### BOOLEAN &#x60;&#x60;&#x60; { &quot;value&quot;: true } &#x60;&#x60;&#x60; Value has to be &#x60;true&#x60; or &#x60;false&#x60;. ### COUNTRY &#x60;&#x60;&#x60; { &quot;value&quot;: &quot;us&quot; } &#x60;&#x60;&#x60; Value has to be lowercase string in ISO 3166-1 alpha-2 format. ### CURRENCY &#x60;&#x60;&#x60; { &quot;value&quot;: { &quot;code&quot;: &quot;GBP&quot;, &quot;value&quot;: 23232 } } &#x60;&#x60;&#x60; Code of value is a currency code in ISO 4217 format. ### DATE &#x60;&#x60;&#x60; { &quot;value&quot;: &quot;2015-11-17T23:00:00.000Z&quot; } &#x60;&#x60;&#x60; ### NUMBER, PERCENT &#x60;&#x60;&#x60; { &quot;value&quot;: 42 } &#x60;&#x60;&#x60; ### REGION &#x60;&#x60;&#x60; { &quot;value&quot;: &quot;us-wa&quot; } &#x60;&#x60;&#x60; Value has to be lowercase string in ISO 3166-2 compatible format. ### SINGLE_SELECT &#x60;&#x60;&#x60; { &quot;value&quot;: &quot;f6fe768f-b5e6-4794-9938-c2f42ab0a572&quot; } &#x60;&#x60;&#x60; Value has to be an id of candidate property value (provided by &#x60;GET /configuration/candidate-properties/propertyId/values&#x60;). ### TEXT &#x60;&#x60;&#x60; { &quot;value&quot;: &quot;Example text&quot; } &#x60;&#x60;&#x60; ### USER &#x60;&#x60;&#x60; { &quot;value&quot;: &quot;50fe861de4b00265edec6775&quot; } &#x60;&#x60;&#x60; Value has to be a valid user id ### Resetting a value To reset a value for any of the above types, please pass: &#x60;&#x60;&#x60; {} &#x60;&#x60;&#x60;

Parameters:

  • id

    candidate identifier

  • job_id

    job identifier

  • property_id

    Identifier of a Candidate Property

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
# File 'lib/smart_recruiters/api/candidates_api.rb', line 1551

def candidates_properties_values_update_for_job_with_http_info(id, job_id, property_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CandidatesApi.candidates_properties_values_update_for_job ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling CandidatesApi.candidates_properties_values_update_for_job"
  end
  # verify the required parameter 'job_id' is set
  if @api_client.config.client_side_validation && job_id.nil?
    fail ArgumentError, "Missing the required parameter 'job_id' when calling CandidatesApi.candidates_properties_values_update_for_job"
  end
  # verify the required parameter 'property_id' is set
  if @api_client.config.client_side_validation && property_id.nil?
    fail ArgumentError, "Missing the required parameter 'property_id' when calling CandidatesApi.candidates_properties_values_update_for_job"
  end
  # resource path
  local_var_path = '/candidates/{id}/jobs/{jobId}/properties/{propertyId}'.sub('{' + 'id' + '}', id.to_s).sub('{' + 'jobId' + '}', job_id.to_s).sub('{' + 'propertyId' + '}', property_id.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'])
  # 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(opts[:'body']) 

  return_type = opts[:return_type] 

  auth_names = opts[:auth_names] || ['key', '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,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CandidatesApi#candidates_properties_values_update_for_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#candidates_properties_values_update_with_http_info(id, property_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Add/update candidate property value Please use &#x60;PUT /candidates/id/jobs/jobId/properties&#x60; instead. Set a candidate property value for the candidate. Below you can find a list of value examples, dependent on different candidate property types. * BOOLEAN &#x60;&#x60;&#x60; { &quot;value&quot;: true } &#x60;&#x60;&#x60; Value has to be &#x60;true&#x60; or &#x60;false&#x60;. * COUNTRY &#x60;&#x60;&#x60; { &quot;value&quot;: &quot;us&quot; } &#x60;&#x60;&#x60; Value has to be lowercase string in ISO 3166-1 alpha-2 format. * CURRENCY &#x60;&#x60;&#x60; { &quot;value&quot;: { &quot;code&quot;: &quot;GBP&quot;, &quot;value&quot;: 23232 } } &#x60;&#x60;&#x60; Code of value is a currency code in ISO 4217 format. * DATE &#x60;&#x60;&#x60; { &quot;value&quot;: &quot;2015-11-17T23:00:00.000Z&quot; } &#x60;&#x60;&#x60; * **NUMBER, PERCENT** &#x60;&#x60;&#x60; { &quot;value&quot;: 42 } &#x60;&#x60;&#x60; * REGION &#x60;&#x60;&#x60; { &quot;value&quot;: &quot;us-wa&quot; } &#x60;&#x60;&#x60; Value has to be lowercase string in ISO 3166-2 compatible format. * SINGLE_SELECT &#x60;&#x60;&#x60; { &quot;value&quot;: &quot;f6fe768f-b5e6-4794-9938-c2f42ab0a572&quot; } &#x60;&#x60;&#x60; Value has to be an id of candidate property value (provided by GET /configuration/candidate-properties/propertyId/values). * TEXT &#x60;&#x60;&#x60; { &quot;value&quot;: &quot;Example text&quot; } &#x60;&#x60;&#x60; * USER &#x60;&#x60;&#x60; { &quot;value&quot;: &quot;50fe861de4b00265edec6775&quot; } &#x60;&#x60;&#x60; Value has to be a valid user id To reset a value for any of the above types, please pass &#x60;&#x60;&#x60; {} &#x60;&#x60;&#x60;

Parameters:

  • id

    candidate identifier

  • property_id

    Identifier of a Candidate Property

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
# File 'lib/smart_recruiters/api/candidates_api.rb', line 1483

def candidates_properties_values_update_with_http_info(id, property_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CandidatesApi.candidates_properties_values_update ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling CandidatesApi.candidates_properties_values_update"
  end
  # verify the required parameter 'property_id' is set
  if @api_client.config.client_side_validation && property_id.nil?
    fail ArgumentError, "Missing the required parameter 'property_id' when calling CandidatesApi.candidates_properties_values_update"
  end
  # resource path
  local_var_path = '/candidates/{id}/properties/{propertyId}'.sub('{' + 'id' + '}', id.to_s).sub('{' + 'propertyId' + '}', property_id.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'])
  # 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(opts[:'body']) 

  return_type = opts[:return_type] 

  auth_names = opts[:auth_names] || ['key', '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,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CandidatesApi#candidates_properties_values_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#candidates_resume_add(opts = {}) ⇒ CandidateDetails

Parse a resume, create a candidate and assign to a Talent Pool. Parse a resume, create a candidate and assign to a Talent Pool.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :source_type_id (String)
  • :source_sub_type_id (String)
  • :source_id (String)
  • :internal (BOOLEAN)
  • :file (String)

Returns:



1611
1612
1613
1614
# File 'lib/smart_recruiters/api/candidates_api.rb', line 1611

def candidates_resume_add(opts = {})
  data, _status_code, _headers = candidates_resume_add_with_http_info(opts)
  data
end

#candidates_resume_add_to_job(job_id, opts = {}) ⇒ CandidateDetails

Parse a resume, create a candidate and assign to a job. Parse a resume, create a candidate and assign to a job.

Parameters:

  • job_id

    job identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :source_type_id (String)
  • :source_sub_type_id (String)
  • :source_id (String)
  • :internal (BOOLEAN)
  • :file (String)

Returns:



1679
1680
1681
1682
# File 'lib/smart_recruiters/api/candidates_api.rb', line 1679

def candidates_resume_add_to_job(job_id, opts = {})
  data, _status_code, _headers = candidates_resume_add_to_job_with_http_info(job_id, opts)
  data
end

#candidates_resume_add_to_job_with_http_info(job_id, opts = {}) ⇒ Array<(CandidateDetails, Integer, Hash)>

Parse a resume, create a candidate and assign to a job. Parse a resume, create a candidate and assign to a job.

Parameters:

  • job_id

    job identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :source_type_id (String)
  • :source_sub_type_id (String)
  • :source_id (String)
  • :internal (BOOLEAN)
  • :file (String)

Returns:

  • (Array<(CandidateDetails, Integer, Hash)>)

    CandidateDetails data, response status code and response headers



1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
# File 'lib/smart_recruiters/api/candidates_api.rb', line 1694

def candidates_resume_add_to_job_with_http_info(job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CandidatesApi.candidates_resume_add_to_job ...'
  end
  # verify the required parameter 'job_id' is set
  if @api_client.config.client_side_validation && job_id.nil?
    fail ArgumentError, "Missing the required parameter 'job_id' when calling CandidatesApi.candidates_resume_add_to_job"
  end
  # resource path
  local_var_path = '/jobs/{jobId}/candidates/cv'.sub('{' + 'jobId' + '}', job_id.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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['sourceTypeId'] = opts[:'source_type_id'] if !opts[:'source_type_id'].nil?
  form_params['sourceSubTypeId'] = opts[:'source_sub_type_id'] if !opts[:'source_sub_type_id'].nil?
  form_params['sourceId'] = opts[:'source_id'] if !opts[:'source_id'].nil?
  form_params['internal'] = opts[:'internal'] if !opts[:'internal'].nil?
  form_params['file'] = opts[:'file'] if !opts[:'file'].nil?

  # http body (model)
  post_body = opts[:body] 

  return_type = opts[:return_type] || 'CandidateDetails' 

  auth_names = opts[:auth_names] || ['key', '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 => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CandidatesApi#candidates_resume_add_to_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#candidates_resume_add_with_http_info(opts = {}) ⇒ Array<(CandidateDetails, Integer, Hash)>

Parse a resume, create a candidate and assign to a Talent Pool. Parse a resume, create a candidate and assign to a Talent Pool.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :source_type_id (String)
  • :source_sub_type_id (String)
  • :source_id (String)
  • :internal (BOOLEAN)
  • :file (String)

Returns:

  • (Array<(CandidateDetails, Integer, Hash)>)

    CandidateDetails data, response status code and response headers



1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
# File 'lib/smart_recruiters/api/candidates_api.rb', line 1625

def candidates_resume_add_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CandidatesApi.candidates_resume_add ...'
  end
  # resource path
  local_var_path = '/candidates/cv'

  # 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(['multipart/form-data'])

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['sourceTypeId'] = opts[:'source_type_id'] if !opts[:'source_type_id'].nil?
  form_params['sourceSubTypeId'] = opts[:'source_sub_type_id'] if !opts[:'source_sub_type_id'].nil?
  form_params['sourceId'] = opts[:'source_id'] if !opts[:'source_id'].nil?
  form_params['internal'] = opts[:'internal'] if !opts[:'internal'].nil?
  form_params['file'] = opts[:'file'] if !opts[:'file'].nil?

  # http body (model)
  post_body = opts[:body] 

  return_type = opts[:return_type] || 'CandidateDetails' 

  auth_names = opts[:auth_names] || ['key', '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 => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CandidatesApi#candidates_resume_add\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#candidates_screening_answers_get(id, job_id, opts = {}) ⇒ ScreeningAnswers

Get candidate screening answers for a candidate’s job Returns candidate screening question answers for a candidate’s job. Returns an empty array when there is no screening answers for given candidate’s job. UUID in question category indicates custom question. Other value indicates predefined library question. In order to create human readable format of answers please use label properties. Ignore labels for answers with single field. Based on labels from included example you can get following text: “‘text Do you have a current driver’s license? - No Free text question - Long text answer for free text questions Checkbox question - Confirmed Legacy acknowledgment question - replaced by checkbox - Confirmed Gender, Race and Ethnicity [(definitions)](smartrecruiters.com/oneclick/static/html/en/eeoGeneral.html) - Gender: Male - Race/Ethnicity: Prefer not to answer Currency question - 1234 Multiple choice dropdown - third value, second value, first value Languages 1) - Language: English - Proficiency level: Advanced 2) - Language: Spanish - Proficiency level: Beginner 3) - Language: French - Proficiency level: Intermediate What are your preferred work shifts? 1) - Day: Weekdays - From: 08:00 AM - To: 04:00 PM 2) - Day: Weekdays - From: 10:00 AM - To: 02:00 PM Your Name - John “‘

Parameters:

  • id

    candidate identifier

  • job_id

    job identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1748
1749
1750
1751
# File 'lib/smart_recruiters/api/candidates_api.rb', line 1748

def candidates_screening_answers_get(id, job_id, opts = {})
  data, _status_code, _headers = candidates_screening_answers_get_with_http_info(id, job_id, opts)
  data
end

#candidates_screening_answers_get_with_http_info(id, job_id, opts = {}) ⇒ Array<(ScreeningAnswers, Integer, Hash)>

Get candidate screening answers for a candidate&#x27;s job Returns candidate screening question answers for a candidate&#x27;s job. Returns an empty array when there is no screening answers for given candidate&#x27;s job. UUID in question category indicates custom question. Other value indicates predefined library question. In order to create human readable format of answers please use label properties. Ignore labels for answers with single field. Based on labels from included example you can get following text: &#x60;&#x60;&#x60;text Do you have a current driver&#x27;s license? - No Free text question - Long text answer for free text questions Checkbox question - Confirmed Legacy acknowledgment question - replaced by checkbox - Confirmed Gender, Race and Ethnicity [(definitions)](smartrecruiters.com/oneclick/static/html/en/eeoGeneral.html) - Gender: Male - Race/Ethnicity: Prefer not to answer Currency question - 1234 Multiple choice dropdown - third value, second value, first value Languages 1) - Language: English - Proficiency level: Advanced 2) - Language: Spanish - Proficiency level: Beginner 3) - Language: French - Proficiency level: Intermediate What are your preferred work shifts? 1) - Day: Weekdays - From: 08:00 AM - To: 04:00 PM 2) - Day: Weekdays - From: 10:00 AM - To: 02:00 PM Your Name - John &#x60;&#x60;&#x60;

Parameters:

  • id

    candidate identifier

  • job_id

    job identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ScreeningAnswers, Integer, Hash)>)

    ScreeningAnswers data, response status code and response headers



1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
# File 'lib/smart_recruiters/api/candidates_api.rb', line 1759

def candidates_screening_answers_get_with_http_info(id, job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CandidatesApi.candidates_screening_answers_get ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling CandidatesApi.candidates_screening_answers_get"
  end
  # verify the required parameter 'job_id' is set
  if @api_client.config.client_side_validation && job_id.nil?
    fail ArgumentError, "Missing the required parameter 'job_id' when calling CandidatesApi.candidates_screening_answers_get"
  end
  # resource path
  local_var_path = '/candidates/{id}/jobs/{jobId}/screening-answers'.sub('{' + 'id' + '}', id.to_s).sub('{' + 'jobId' + '}', job_id.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] || 'ScreeningAnswers' 

  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: CandidatesApi#candidates_screening_answers_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#candidates_source_update(body, id, job_id, opts = {}) ⇒ nil

Update a candidate’s source Update a candidate’s source

Parameters:

  • body

    Candidate source to be set

  • id

    candidate identifier

  • job_id

    job identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


1811
1812
1813
1814
# File 'lib/smart_recruiters/api/candidates_api.rb', line 1811

def candidates_source_update(body, id, job_id, opts = {})
  candidates_source_update_with_http_info(body, id, job_id, opts)
  nil
end

#candidates_source_update_with_http_info(body, id, job_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Update a candidate&#x27;s source Update a candidate&#x27;s source

Parameters:

  • body

    Candidate source to be set

  • id

    candidate identifier

  • job_id

    job identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
# File 'lib/smart_recruiters/api/candidates_api.rb', line 1823

def candidates_source_update_with_http_info(body, id, job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CandidatesApi.candidates_source_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 CandidatesApi.candidates_source_update"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling CandidatesApi.candidates_source_update"
  end
  # verify the required parameter 'job_id' is set
  if @api_client.config.client_side_validation && job_id.nil?
    fail ArgumentError, "Missing the required parameter 'job_id' when calling CandidatesApi.candidates_source_update"
  end
  # resource path
  local_var_path = '/candidates/{id}/jobs/{jobId}/source'.sub('{' + 'id' + '}', id.to_s).sub('{' + 'jobId' + '}', job_id.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'])
  # 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(:PUT, 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: CandidatesApi#candidates_source_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#candidates_status_history_get(id, opts = {}) ⇒ CandidateStatusHistoryList

Get candidate’s status history Get candidate’s status history. Please use ‘GET /candidates/id/jobs/jobId/status/history` instead.

Parameters:

  • id

    candidate identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1879
1880
1881
1882
# File 'lib/smart_recruiters/api/candidates_api.rb', line 1879

def candidates_status_history_get(id, opts = {})
  data, _status_code, _headers = candidates_status_history_get_with_http_info(id, opts)
  data
end

#candidates_status_history_get_for_job(id, job_id, opts = {}) ⇒ CandidateStatusHistoryList

Get candidate’s status history for a candidate’s job Get candidate’s status history for a candidate’s job

Parameters:

  • id

    candidate identifier

  • job_id

    job identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1936
1937
1938
1939
# File 'lib/smart_recruiters/api/candidates_api.rb', line 1936

def candidates_status_history_get_for_job(id, job_id, opts = {})
  data, _status_code, _headers = candidates_status_history_get_for_job_with_http_info(id, job_id, opts)
  data
end

#candidates_status_history_get_for_job_with_http_info(id, job_id, opts = {}) ⇒ Array<(CandidateStatusHistoryList, Integer, Hash)>

Get candidate&#x27;s status history for a candidate&#x27;s job Get candidate&#x27;s status history for a candidate&#x27;s job

Parameters:

  • id

    candidate identifier

  • job_id

    job identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(CandidateStatusHistoryList, Integer, Hash)>)

    CandidateStatusHistoryList data, response status code and response headers



1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
# File 'lib/smart_recruiters/api/candidates_api.rb', line 1947

def candidates_status_history_get_for_job_with_http_info(id, job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CandidatesApi.candidates_status_history_get_for_job ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling CandidatesApi.candidates_status_history_get_for_job"
  end
  # verify the required parameter 'job_id' is set
  if @api_client.config.client_side_validation && job_id.nil?
    fail ArgumentError, "Missing the required parameter 'job_id' when calling CandidatesApi.candidates_status_history_get_for_job"
  end
  # resource path
  local_var_path = '/candidates/{id}/jobs/{jobId}/status/history'.sub('{' + 'id' + '}', id.to_s).sub('{' + 'jobId' + '}', job_id.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] || 'CandidateStatusHistoryList' 

  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: CandidatesApi#candidates_status_history_get_for_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#candidates_status_history_get_with_http_info(id, opts = {}) ⇒ Array<(CandidateStatusHistoryList, Integer, Hash)>

Get candidate&#x27;s status history Get candidate&#x27;s status history. Please use &#x60;GET /candidates/id/jobs/jobId/status/history&#x60; instead.

Parameters:

  • id

    candidate identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(CandidateStatusHistoryList, Integer, Hash)>)

    CandidateStatusHistoryList data, response status code and response headers



1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
# File 'lib/smart_recruiters/api/candidates_api.rb', line 1889

def candidates_status_history_get_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CandidatesApi.candidates_status_history_get ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling CandidatesApi.candidates_status_history_get"
  end
  # resource path
  local_var_path = '/candidates/{id}/status/history'.sub('{' + 'id' + '}', id.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] || 'CandidateStatusHistoryList' 

  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: CandidatesApi#candidates_status_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#candidates_status_update(id, job_id, opts = {}) ⇒ nil

Update a candidate’s status Update a candidate’s status

Parameters:

  • id

    candidate identifier

  • job_id

    job identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (nil)


1999
2000
2001
2002
# File 'lib/smart_recruiters/api/candidates_api.rb', line 1999

def candidates_status_update(id, job_id, opts = {})
  candidates_status_update_with_http_info(id, job_id, opts)
  nil
end

#candidates_status_update_primary(id, opts = {}) ⇒ nil

Update a candidate’s status on primary assignment Update a candidate’s status on primary assignment. Please use ‘PUT /candidates/id/jobs/jobId/status` instead.

Parameters:

  • id

    candidate identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (nil)


2064
2065
2066
2067
# File 'lib/smart_recruiters/api/candidates_api.rb', line 2064

def candidates_status_update_primary(id, opts = {})
  candidates_status_update_primary_with_http_info(id, opts)
  nil
end

#candidates_status_update_primary_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Update a candidate&#x27;s status on primary assignment Update a candidate&#x27;s status on primary assignment. Please use &#x60;PUT /candidates/id/jobs/jobId/status&#x60; instead.

Parameters:

  • id

    candidate identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
# File 'lib/smart_recruiters/api/candidates_api.rb', line 2075

def candidates_status_update_primary_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CandidatesApi.candidates_status_update_primary ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling CandidatesApi.candidates_status_update_primary"
  end
  # resource path
  local_var_path = '/candidates/{id}/status'.sub('{' + 'id' + '}', id.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'])
  # 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(opts[:'body']) 

  return_type = opts[:return_type] 

  auth_names = opts[:auth_names] || ['key', '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,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CandidatesApi#candidates_status_update_primary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#candidates_status_update_with_http_info(id, job_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Update a candidate&#x27;s status Update a candidate&#x27;s status

Parameters:

  • id

    candidate identifier

  • job_id

    job identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
# File 'lib/smart_recruiters/api/candidates_api.rb', line 2011

def candidates_status_update_with_http_info(id, job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CandidatesApi.candidates_status_update ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling CandidatesApi.candidates_status_update"
  end
  # verify the required parameter 'job_id' is set
  if @api_client.config.client_side_validation && job_id.nil?
    fail ArgumentError, "Missing the required parameter 'job_id' when calling CandidatesApi.candidates_status_update"
  end
  # resource path
  local_var_path = '/candidates/{id}/jobs/{jobId}/status'.sub('{' + 'id' + '}', id.to_s).sub('{' + 'jobId' + '}', job_id.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'])
  # 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(opts[:'body']) 

  return_type = opts[:return_type] 

  auth_names = opts[:auth_names] || ['key', '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,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CandidatesApi#candidates_status_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#candidates_tags_add(body, id, opts = {}) ⇒ CandidateTags

Add tags to a candidate Add new tags to a given candidate. It doesn’t replace existing tags.

Parameters:

  • body

    Tags to be added.

  • id

    candidate identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2124
2125
2126
2127
# File 'lib/smart_recruiters/api/candidates_api.rb', line 2124

def candidates_tags_add(body, id, opts = {})
  data, _status_code, _headers = candidates_tags_add_with_http_info(body, id, opts)
  data
end

#candidates_tags_add_with_http_info(body, id, opts = {}) ⇒ Array<(CandidateTags, Integer, Hash)>

Add tags to a candidate Add new tags to a given candidate. It doesn&#x27;t replace existing tags.

Parameters:

  • body

    Tags to be added.

  • id

    candidate identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(CandidateTags, Integer, Hash)>)

    CandidateTags data, response status code and response headers



2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
# File 'lib/smart_recruiters/api/candidates_api.rb', line 2135

def candidates_tags_add_with_http_info(body, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CandidatesApi.candidates_tags_add ...'
  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 CandidatesApi.candidates_tags_add"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling CandidatesApi.candidates_tags_add"
  end
  # resource path
  local_var_path = '/candidates/{id}/tags'.sub('{' + 'id' + '}', id.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'])
  # 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] || 'CandidateTags' 

  auth_names = opts[:auth_names] || ['key', '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 => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CandidatesApi#candidates_tags_add\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#candidates_tags_delete(id, opts = {}) ⇒ nil

Delete tags for a candidate Delete tags for a given candidate. All tags associated with a candidate are removed.

Parameters:

  • id

    candidate identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


2187
2188
2189
2190
# File 'lib/smart_recruiters/api/candidates_api.rb', line 2187

def candidates_tags_delete(id, opts = {})
  candidates_tags_delete_with_http_info(id, opts)
  nil
end

#candidates_tags_delete_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete tags for a candidate Delete tags for a given candidate. All tags associated with a candidate are removed.

Parameters:

  • id

    candidate identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
# File 'lib/smart_recruiters/api/candidates_api.rb', line 2197

def candidates_tags_delete_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CandidatesApi.candidates_tags_delete ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling CandidatesApi.candidates_tags_delete"
  end
  # resource path
  local_var_path = '/candidates/{id}/tags'.sub('{' + 'id' + '}', id.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: CandidatesApi#candidates_tags_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#candidates_tags_get(id, opts = {}) ⇒ CandidateTags

Get tags for a candidate

Parameters:

  • id

    candidate identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2242
2243
2244
2245
# File 'lib/smart_recruiters/api/candidates_api.rb', line 2242

def candidates_tags_get(id, opts = {})
  data, _status_code, _headers = candidates_tags_get_with_http_info(id, opts)
  data
end

#candidates_tags_get_with_http_info(id, opts = {}) ⇒ Array<(CandidateTags, Integer, Hash)>

Get tags for a candidate

Parameters:

  • id

    candidate identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(CandidateTags, Integer, Hash)>)

    CandidateTags data, response status code and response headers



2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
# File 'lib/smart_recruiters/api/candidates_api.rb', line 2251

def candidates_tags_get_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CandidatesApi.candidates_tags_get ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling CandidatesApi.candidates_tags_get"
  end
  # resource path
  local_var_path = '/candidates/{id}/tags'.sub('{' + 'id' + '}', id.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] || 'CandidateTags' 

  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: CandidatesApi#candidates_tags_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#candidates_tags_replace(body, id, opts = {}) ⇒ CandidateTags

Update tags for a candidate Update tags for a given candidate. It replaces all existing tags with the new array provided.

Parameters:

  • body

    Tags to be set.

  • id

    candidate identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2298
2299
2300
2301
# File 'lib/smart_recruiters/api/candidates_api.rb', line 2298

def candidates_tags_replace(body, id, opts = {})
  data, _status_code, _headers = candidates_tags_replace_with_http_info(body, id, opts)
  data
end

#candidates_tags_replace_with_http_info(body, id, opts = {}) ⇒ Array<(CandidateTags, Integer, Hash)>

Update tags for a candidate Update tags for a given candidate. It replaces all existing tags with the new array provided.

Parameters:

  • body

    Tags to be set.

  • id

    candidate identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(CandidateTags, Integer, Hash)>)

    CandidateTags data, response status code and response headers



2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
# File 'lib/smart_recruiters/api/candidates_api.rb', line 2309

def candidates_tags_replace_with_http_info(body, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CandidatesApi.candidates_tags_replace ...'
  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 CandidatesApi.candidates_tags_replace"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling CandidatesApi.candidates_tags_replace"
  end
  # resource path
  local_var_path = '/candidates/{id}/tags'.sub('{' + 'id' + '}', id.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'])
  # 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] || 'CandidateTags' 

  auth_names = opts[:auth_names] || ['key', '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,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CandidatesApi#candidates_tags_replace\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#candidates_update(id, opts = {}) ⇒ CandidateDetails

Update candidate personal information Update candidate details

Parameters:

  • id

    candidate identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



2362
2363
2364
2365
# File 'lib/smart_recruiters/api/candidates_api.rb', line 2362

def candidates_update(id, opts = {})
  data, _status_code, _headers = candidates_update_with_http_info(id, opts)
  data
end

#candidates_update_with_http_info(id, opts = {}) ⇒ Array<(CandidateDetails, Integer, Hash)>

Update candidate personal information Update candidate details

Parameters:

  • id

    candidate identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(CandidateDetails, Integer, Hash)>)

    CandidateDetails data, response status code and response headers



2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
# File 'lib/smart_recruiters/api/candidates_api.rb', line 2373

def candidates_update_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CandidatesApi.candidates_update ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling CandidatesApi.candidates_update"
  end
  # resource path
  local_var_path = '/candidates/{id}'.sub('{' + 'id' + '}', id.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'])
  # 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(opts[:'body']) 

  return_type = opts[:return_type] || 'CandidateDetails' 

  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: CandidatesApi#candidates_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end