Class: SmartRecruiters::JobsApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ JobsApi

Returns a new instance of JobsApi.



5
6
7
# File 'lib/smart_recruiters/api/jobs_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/jobs_api.rb', line 3

def api_client
  @api_client
end

Instance Method Details

#jobs_all(opts = {}) ⇒ Jobs

Search jobs Search jobs by params.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    language of returned content (default to en)

  • :q (String)

    full-text search query based on a job title; case insensitive; e.g. java developer

  • :limit (Integer)

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

  • :offset (Integer)

    number of elements to skip while processing result; this method of paging is very slow and is deprecated, please use `pageId` instead (default to 0)

  • :page_id (String)

    unique identifier for next page of jobs - returned as `nextPageId` in previous page result

  • :city (Array<String>)

    city filter (part of the location object); can be used repeatedly; case sensitive; e.g. San Francisco

  • :department (Array<String>)

    department filter (by department label); can be used repeatedly; case sensitive; e.g. “Marketing”

  • :updated_after (DateTime)

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

  • :last_activity_after (DateTime)

    ISO8601-formatted time boundaries for the job lastActivityOn time, Format: yyyy-MM-ddTHH:mm:ss.SSSZZ. lastActivityOn is updated when job is edited, new candidates apply or job is published.

  • :language (String)

    Exceptions to the language code ISO format: * &quot;en-GB&quot; - &quot;English - English (UK)&quot; * &quot;es-MX&quot; - &quot;Spanish - español (México)&quot; * &quot;fr-CA&quot; - &quot;French - français (Canada)&quot; * &quot;pt-BR&quot; - &quot;Portugal - português (Brasil)&quot; * &quot;zh-TW&quot; - &quot;Chinese (Traditional) - 中文 (香港)&quot; * &quot;zh-CN&quot; - &quot;Chinese (Simplified) - 中文 (简体)&quot; Value &quot;pt-PT&quot; is deprecated and will not work, use &quot;pt&quot; instead.

  • :status (String)

    Status of a job

  • :posting_status (String)

    Posting status of a job

Returns:



24
25
26
27
# File 'lib/smart_recruiters/api/jobs_api.rb', line 24

def jobs_all(opts = {})
  data, _status_code, _headers = jobs_all_with_http_info(opts)
  data
end

#jobs_all_with_http_info(opts = {}) ⇒ Array<(Jobs, Integer, Hash)>

Search jobs Search jobs by params.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    language of returned content

  • :q (String)

    full-text search query based on a job title; case insensitive; e.g. java developer

  • :limit (Integer)

    number of elements to return. max value is 100

  • :offset (Integer)

    number of elements to skip while processing result; this method of paging is very slow and is deprecated, please use &#x60;pageId&#x60; instead

  • :page_id (String)

    unique identifier for next page of jobs - returned as &#x60;nextPageId&#x60; in previous page result

  • :city (Array<String>)

    city filter (part of the location object); can be used repeatedly; case sensitive; e.g. San Francisco

  • :department (Array<String>)

    department filter (by department label); can be used repeatedly; case sensitive; e.g. “Marketing”

  • :updated_after (DateTime)

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

  • :last_activity_after (DateTime)

    ISO8601-formatted time boundaries for the job lastActivityOn time, Format: yyyy-MM-ddTHH:mm:ss.SSSZZ. lastActivityOn is updated when job is edited, new candidates apply or job is published.

  • :language (String)

    Exceptions to the language code ISO format: * &quot;en-GB&quot; - &quot;English - English (UK)&quot; * &quot;es-MX&quot; - &quot;Spanish - español (México)&quot; * &quot;fr-CA&quot; - &quot;French - français (Canada)&quot; * &quot;pt-BR&quot; - &quot;Portugal - português (Brasil)&quot; * &quot;zh-TW&quot; - &quot;Chinese (Traditional) - 中文 (香港)&quot; * &quot;zh-CN&quot; - &quot;Chinese (Simplified) - 中文 (简体)&quot; Value &quot;pt-PT&quot; is deprecated and will not work, use &quot;pt&quot; instead.

  • :status (String)

    Status of a job

  • :posting_status (String)

    Posting status of a job

Returns:

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

    Jobs data, response status code and response headers



45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# File 'lib/smart_recruiters/api/jobs_api.rb', line 45

def jobs_all_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: JobsApi.jobs_all ...'
  end
  if @api_client.config.client_side_validation && opts[:'accept_language'] && !['af', 'am', 'ar', 'hy', 'az', 'eu', 'bn', 'bg', 'ca', 'zh-CN', 'zh-TW', 'hr', 'cs', 'da', 'nl', 'en-GB', 'en', 'et', 'fi', 'fr', 'fr-CA', 'gl', 'ka', 'de', 'el', 'gu', 'iw', 'hi', 'hu', 'is', 'id', 'ga', 'it', 'ja', 'kn', 'km', 'ko', 'lo', 'lv', 'lt', 'ms', 'ml', 'mr', 'mn', 'ne', 'no', 'fa', 'fil', 'pl', 'pt', 'pt-BR', 'pt-PT', 'ro', 'ru', 'sr', 'si', 'sk', 'sl', 'es', 'es-MX', 'sw', 'sv', 'ta', 'te', 'tr', 'uk', 'ur', 'vi', 'cy', 'zu'].include?(opts[:'accept_language'])
    fail ArgumentError, 'invalid value for "accept_language", must be one of af, am, ar, hy, az, eu, bn, bg, ca, zh-CN, zh-TW, hr, cs, da, nl, en-GB, en, et, fi, fr, fr-CA, gl, ka, de, el, gu, iw, hi, hu, is, id, ga, it, ja, kn, km, ko, lo, lv, lt, ms, ml, mr, mn, ne, no, fa, fil, pl, pt, pt-BR, pt-PT, ro, ru, sr, si, sk, sl, es, es-MX, sw, sv, ta, te, tr, uk, ur, vi, cy, zu'
  end
  if @api_client.config.client_side_validation && opts[:'language'] && !['af', 'am', 'ar', 'az', 'bg', 'bn', 'ca', 'cs', 'cy', 'da', 'de', 'el', 'en', 'en-GB', 'es', 'es-MX', 'et', 'eu', 'fa', 'fi', 'fil', 'fr', 'fr-CA', 'ga', 'gl', 'gu', 'he', 'hi', 'hr', 'hu', 'hy', 'id', 'is', 'it', 'ja', 'ka', 'km', 'kn', 'ko', 'lo', 'lt', 'lv', 'ml', 'mn', 'mr', 'ms', 'ne', 'nl', 'no', 'pl', 'pt', 'pt-BR', 'ro', 'ru', 'si', 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'tr', 'uk', 'ur', 'vi', 'zh-CN', 'zh-TW', 'zu'].include?(opts[:'language'])
    fail ArgumentError, 'invalid value for "language", must be one of af, am, ar, az, bg, bn, ca, cs, cy, da, de, el, en, en-GB, es, es-MX, et, eu, fa, fi, fil, fr, fr-CA, ga, gl, gu, he, hi, hr, hu, hy, id, is, it, ja, ka, km, kn, ko, lo, lt, lv, ml, mn, mr, ms, ne, nl, no, pl, pt, pt-BR, ro, ru, si, sk, sl, sr, sv, sw, ta, te, tr, uk, ur, vi, zh-CN, zh-TW, zu'
  end
  if @api_client.config.client_side_validation && opts[:'status'] && !['CREATED', 'SOURCING', 'FILLED', 'INTERVIEW', 'OFFER', 'CANCELLED', 'ON_HOLD'].include?(opts[:'status'])
    fail ArgumentError, 'invalid value for "status", must be one of CREATED, SOURCING, FILLED, INTERVIEW, OFFER, CANCELLED, ON_HOLD'
  end
  if @api_client.config.client_side_validation && opts[:'posting_status'] && !['PUBLIC', 'INTERNAL', 'NOT_PUBLISHED', 'PRIVATE'].include?(opts[:'posting_status'])
    fail ArgumentError, 'invalid value for "posting_status", must be one of PUBLIC, INTERNAL, NOT_PUBLISHED, PRIVATE'
  end
  # resource path
  local_var_path = '/jobs'

  # 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[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'pageId'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'city'] = @api_client.build_collection_param(opts[:'city'], :multi) if !opts[:'city'].nil?
  query_params[:'department'] = @api_client.build_collection_param(opts[:'department'], :multi) if !opts[:'department'].nil?
  query_params[:'updatedAfter'] = opts[:'updated_after'] if !opts[:'updated_after'].nil?
  query_params[:'lastActivityAfter'] = opts[:'last_activity_after'] if !opts[:'last_activity_after'].nil?
  query_params[:'language'] = opts[:'language'] if !opts[:'language'].nil?
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
  query_params[:'postingStatus'] = opts[:'posting_status'] if !opts[:'posting_status'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'Accept-Language'] = opts[:'accept_language'] if !opts[:'accept_language'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

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

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

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

#jobs_approvals_latest(job_id, opts = {}) ⇒ JobApproval

Get latest approval request for given job

Parameters:

  • job_id

    job identifier

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    language of returned content (default to en)

Returns:



111
112
113
114
# File 'lib/smart_recruiters/api/jobs_api.rb', line 111

def jobs_approvals_latest(job_id, opts = {})
  data, _status_code, _headers = jobs_approvals_latest_with_http_info(job_id, opts)
  data
end

#jobs_approvals_latest_with_http_info(job_id, opts = {}) ⇒ Array<(JobApproval, Integer, Hash)>

Get latest approval request for given job

Parameters:

  • job_id

    job identifier

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    language of returned content

Returns:

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

    JobApproval data, response status code and response headers



121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# File 'lib/smart_recruiters/api/jobs_api.rb', line 121

def jobs_approvals_latest_with_http_info(job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: JobsApi.jobs_approvals_latest ...'
  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 JobsApi.jobs_approvals_latest"
  end
  if @api_client.config.client_side_validation && opts[:'accept_language'] && !['af', 'am', 'ar', 'hy', 'az', 'eu', 'bn', 'bg', 'ca', 'zh-CN', 'zh-TW', 'hr', 'cs', 'da', 'nl', 'en-GB', 'en', 'et', 'fi', 'fr', 'fr-CA', 'gl', 'ka', 'de', 'el', 'gu', 'iw', 'hi', 'hu', 'is', 'id', 'ga', 'it', 'ja', 'kn', 'km', 'ko', 'lo', 'lv', 'lt', 'ms', 'ml', 'mr', 'mn', 'ne', 'no', 'fa', 'fil', 'pl', 'pt', 'pt-BR', 'pt-PT', 'ro', 'ru', 'sr', 'si', 'sk', 'sl', 'es', 'es-MX', 'sw', 'sv', 'ta', 'te', 'tr', 'uk', 'ur', 'vi', 'cy', 'zu'].include?(opts[:'accept_language'])
    fail ArgumentError, 'invalid value for "accept_language", must be one of af, am, ar, hy, az, eu, bn, bg, ca, zh-CN, zh-TW, hr, cs, da, nl, en-GB, en, et, fi, fr, fr-CA, gl, ka, de, el, gu, iw, hi, hu, is, id, ga, it, ja, kn, km, ko, lo, lv, lt, ms, ml, mr, mn, ne, no, fa, fil, pl, pt, pt-BR, pt-PT, ro, ru, sr, si, sk, sl, es, es-MX, sw, sv, ta, te, tr, uk, ur, vi, cy, zu'
  end
  # resource path
  local_var_path = '/jobs/{jobId}/approvals/latest'.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'])
  header_params[:'Accept-Language'] = opts[:'accept_language'] if !opts[:'accept_language'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

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

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

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

#jobs_create(opts = {}) ⇒ JobDetails

Create a new job Create a new job. Ignores all nonexistent job properties and job properties values.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :body (JobInput)

    Job object that needs to be created

Returns:



171
172
173
174
# File 'lib/smart_recruiters/api/jobs_api.rb', line 171

def jobs_create(opts = {})
  data, _status_code, _headers = jobs_create_with_http_info(opts)
  data
end

#jobs_create_with_http_info(opts = {}) ⇒ Array<(JobDetails, Integer, Hash)>

Create a new job Create a new job. Ignores all nonexistent job properties and job properties values.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :body (JobInput)

    Job object that needs to be created

Returns:

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

    JobDetails 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
# File 'lib/smart_recruiters/api/jobs_api.rb', line 181

def jobs_create_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: JobsApi.jobs_create ...'
  end
  # resource path
  local_var_path = '/jobs'

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

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

#jobs_get(job_id, opts = {}) ⇒ JobDetails

Get content of a job with a given id. Get content of a job with a given id.

Parameters:

  • job_id

    job identifier

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    language of returned content (default to en)

Returns:



226
227
228
229
# File 'lib/smart_recruiters/api/jobs_api.rb', line 226

def jobs_get(job_id, opts = {})
  data, _status_code, _headers = jobs_get_with_http_info(job_id, opts)
  data
end

#jobs_get_with_http_info(job_id, opts = {}) ⇒ Array<(JobDetails, Integer, Hash)>

Get content of a job with a given id. Get content of a job with a given id.

Parameters:

  • job_id

    job identifier

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    language of returned content

Returns:

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

    JobDetails data, response status code and response headers



237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
# File 'lib/smart_recruiters/api/jobs_api.rb', line 237

def jobs_get_with_http_info(job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: JobsApi.jobs_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 JobsApi.jobs_get"
  end
  if @api_client.config.client_side_validation && opts[:'accept_language'] && !['af', 'am', 'ar', 'hy', 'az', 'eu', 'bn', 'bg', 'ca', 'zh-CN', 'zh-TW', 'hr', 'cs', 'da', 'nl', 'en-GB', 'en', 'et', 'fi', 'fr', 'fr-CA', 'gl', 'ka', 'de', 'el', 'gu', 'iw', 'hi', 'hu', 'is', 'id', 'ga', 'it', 'ja', 'kn', 'km', 'ko', 'lo', 'lv', 'lt', 'ms', 'ml', 'mr', 'mn', 'ne', 'no', 'fa', 'fil', 'pl', 'pt', 'pt-BR', 'pt-PT', 'ro', 'ru', 'sr', 'si', 'sk', 'sl', 'es', 'es-MX', 'sw', 'sv', 'ta', 'te', 'tr', 'uk', 'ur', 'vi', 'cy', 'zu'].include?(opts[:'accept_language'])
    fail ArgumentError, 'invalid value for "accept_language", must be one of af, am, ar, hy, az, eu, bn, bg, ca, zh-CN, zh-TW, hr, cs, da, nl, en-GB, en, et, fi, fr, fr-CA, gl, ka, de, el, gu, iw, hi, hu, is, id, ga, it, ja, kn, km, ko, lo, lv, lt, ms, ml, mr, mn, ne, no, fa, fil, pl, pt, pt-BR, pt-PT, ro, ru, sr, si, sk, sl, es, es-MX, sw, sv, ta, te, tr, uk, ur, vi, cy, zu'
  end
  # resource path
  local_var_path = '/jobs/{jobId}'.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'])
  header_params[:'Accept-Language'] = opts[:'accept_language'] if !opts[:'accept_language'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

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

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

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

#jobs_headcount_update(body, job_id, opts = {}) ⇒ HeadcountUpdateAccepted

Update job headcount. Update job headcount.

Parameters:

  • body
  • job_id

    job identifier

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

    the optional parameters

Returns:



288
289
290
291
# File 'lib/smart_recruiters/api/jobs_api.rb', line 288

def jobs_headcount_update(body, job_id, opts = {})
  data, _status_code, _headers = jobs_headcount_update_with_http_info(body, job_id, opts)
  data
end

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

Update job headcount. Update job headcount.

Parameters:

  • body
  • job_id

    job identifier

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

    the optional parameters

Returns:

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

    HeadcountUpdateAccepted data, response status code and response headers



299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
# File 'lib/smart_recruiters/api/jobs_api.rb', line 299

def jobs_headcount_update_with_http_info(body, job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: JobsApi.jobs_headcount_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 JobsApi.jobs_headcount_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 JobsApi.jobs_headcount_update"
  end
  # resource path
  local_var_path = '/jobs/{jobId}/headcount'.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] || 'HeadcountUpdateAccepted' 

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

#jobs_hiring_team_add(job_id, opts = {}) ⇒ HiringTeamMemberResponse

Add hiring team member of a job with a given id. Add hiring team member of a job with a given id

Parameters:

  • job_id

    job identifier

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

    the optional parameters

Options Hash (opts):

Returns:



352
353
354
355
# File 'lib/smart_recruiters/api/jobs_api.rb', line 352

def jobs_hiring_team_add(job_id, opts = {})
  data, _status_code, _headers = jobs_hiring_team_add_with_http_info(job_id, opts)
  data
end

#jobs_hiring_team_add_with_http_info(job_id, opts = {}) ⇒ Array<(HiringTeamMemberResponse, Integer, Hash)>

Add hiring team member of a job with a given id. Add hiring team member of a job with a given id

Parameters:

  • job_id

    job identifier

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

    the optional parameters

Options Hash (opts):

Returns:

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

    HiringTeamMemberResponse data, response status code and response headers



363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
# File 'lib/smart_recruiters/api/jobs_api.rb', line 363

def jobs_hiring_team_add_with_http_info(job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: JobsApi.jobs_hiring_team_add ...'
  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 JobsApi.jobs_hiring_team_add"
  end
  # resource path
  local_var_path = '/jobs/{jobId}/hiring-team'.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] || 'HiringTeamMemberResponse' 

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

#jobs_hiring_team_get(job_id, opts = {}) ⇒ HiringTeamMembers

Get hiring team of a job with a given id. Get hiring team of a job with a given id.

Parameters:

  • job_id

    job identifier

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    language of returned content (default to en)

Returns:



412
413
414
415
# File 'lib/smart_recruiters/api/jobs_api.rb', line 412

def jobs_hiring_team_get(job_id, opts = {})
  data, _status_code, _headers = jobs_hiring_team_get_with_http_info(job_id, opts)
  data
end

#jobs_hiring_team_get_with_http_info(job_id, opts = {}) ⇒ Array<(HiringTeamMembers, Integer, Hash)>

Get hiring team of a job with a given id. Get hiring team of a job with a given id.

Parameters:

  • job_id

    job identifier

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    language of returned content

Returns:

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

    HiringTeamMembers data, response status code and response headers



423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
# File 'lib/smart_recruiters/api/jobs_api.rb', line 423

def jobs_hiring_team_get_with_http_info(job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: JobsApi.jobs_hiring_team_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 JobsApi.jobs_hiring_team_get"
  end
  if @api_client.config.client_side_validation && opts[:'accept_language'] && !['af', 'am', 'ar', 'hy', 'az', 'eu', 'bn', 'bg', 'ca', 'zh-CN', 'zh-TW', 'hr', 'cs', 'da', 'nl', 'en-GB', 'en', 'et', 'fi', 'fr', 'fr-CA', 'gl', 'ka', 'de', 'el', 'gu', 'iw', 'hi', 'hu', 'is', 'id', 'ga', 'it', 'ja', 'kn', 'km', 'ko', 'lo', 'lv', 'lt', 'ms', 'ml', 'mr', 'mn', 'ne', 'no', 'fa', 'fil', 'pl', 'pt', 'pt-BR', 'pt-PT', 'ro', 'ru', 'sr', 'si', 'sk', 'sl', 'es', 'es-MX', 'sw', 'sv', 'ta', 'te', 'tr', 'uk', 'ur', 'vi', 'cy', 'zu'].include?(opts[:'accept_language'])
    fail ArgumentError, 'invalid value for "accept_language", must be one of af, am, ar, hy, az, eu, bn, bg, ca, zh-CN, zh-TW, hr, cs, da, nl, en-GB, en, et, fi, fr, fr-CA, gl, ka, de, el, gu, iw, hi, hu, is, id, ga, it, ja, kn, km, ko, lo, lv, lt, ms, ml, mr, mn, ne, no, fa, fil, pl, pt, pt-BR, pt-PT, ro, ru, sr, si, sk, sl, es, es-MX, sw, sv, ta, te, tr, uk, ur, vi, cy, zu'
  end
  # resource path
  local_var_path = '/jobs/{jobId}/hiring-team'.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'])
  header_params[:'Accept-Language'] = opts[:'accept_language'] if !opts[:'accept_language'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

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

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

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

#jobs_hiring_team_remove(job_id, user_id, opts = {}) ⇒ nil

Removes hiring team member of a job with a given id. Removes hiring team member of a job with a given id.

Parameters:

  • job_id

    job identifier

  • user_id

    user identifier

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

    the optional parameters

Returns:

  • (nil)


474
475
476
477
# File 'lib/smart_recruiters/api/jobs_api.rb', line 474

def jobs_hiring_team_remove(job_id, user_id, opts = {})
  jobs_hiring_team_remove_with_http_info(job_id, user_id, opts)
  nil
end

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

Removes hiring team member of a job with a given id. Removes hiring team member of a job with a given id.

Parameters:

  • job_id

    job identifier

  • user_id

    user identifier

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
# File 'lib/smart_recruiters/api/jobs_api.rb', line 485

def jobs_hiring_team_remove_with_http_info(job_id, user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: JobsApi.jobs_hiring_team_remove ...'
  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 JobsApi.jobs_hiring_team_remove"
  end
  # verify the required parameter 'user_id' is set
  if @api_client.config.client_side_validation && user_id.nil?
    fail ArgumentError, "Missing the required parameter 'user_id' when calling JobsApi.jobs_hiring_team_remove"
  end
  # resource path
  local_var_path = '/jobs/{jobId}/hiring-team/{userId}'.sub('{' + 'jobId' + '}', job_id.to_s).sub('{' + 'userId' + '}', user_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: JobsApi#jobs_hiring_team_remove\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#jobs_jobads_all(job_id, opts = {}) ⇒ JobAds

Find and list job ads for a given job

Parameters:

  • job_id

    job identifier

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    language of returned content (default to en)

Returns:



535
536
537
538
# File 'lib/smart_recruiters/api/jobs_api.rb', line 535

def jobs_jobads_all(job_id, opts = {})
  data, _status_code, _headers = jobs_jobads_all_with_http_info(job_id, opts)
  data
end

#jobs_jobads_all_with_http_info(job_id, opts = {}) ⇒ Array<(JobAds, Integer, Hash)>

Find and list job ads for a given job

Parameters:

  • job_id

    job identifier

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    language of returned content

Returns:

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

    JobAds data, response status code and response headers



545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
# File 'lib/smart_recruiters/api/jobs_api.rb', line 545

def jobs_jobads_all_with_http_info(job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: JobsApi.jobs_jobads_all ...'
  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 JobsApi.jobs_jobads_all"
  end
  if @api_client.config.client_side_validation && opts[:'accept_language'] && !['af', 'am', 'ar', 'hy', 'az', 'eu', 'bn', 'bg', 'ca', 'zh-CN', 'zh-TW', 'hr', 'cs', 'da', 'nl', 'en-GB', 'en', 'et', 'fi', 'fr', 'fr-CA', 'gl', 'ka', 'de', 'el', 'gu', 'iw', 'hi', 'hu', 'is', 'id', 'ga', 'it', 'ja', 'kn', 'km', 'ko', 'lo', 'lv', 'lt', 'ms', 'ml', 'mr', 'mn', 'ne', 'no', 'fa', 'fil', 'pl', 'pt', 'pt-BR', 'pt-PT', 'ro', 'ru', 'sr', 'si', 'sk', 'sl', 'es', 'es-MX', 'sw', 'sv', 'ta', 'te', 'tr', 'uk', 'ur', 'vi', 'cy', 'zu'].include?(opts[:'accept_language'])
    fail ArgumentError, 'invalid value for "accept_language", must be one of af, am, ar, hy, az, eu, bn, bg, ca, zh-CN, zh-TW, hr, cs, da, nl, en-GB, en, et, fi, fr, fr-CA, gl, ka, de, el, gu, iw, hi, hu, is, id, ga, it, ja, kn, km, ko, lo, lv, lt, ms, ml, mr, mn, ne, no, fa, fil, pl, pt, pt-BR, pt-PT, ro, ru, sr, si, sk, sl, es, es-MX, sw, sv, ta, te, tr, uk, ur, vi, cy, zu'
  end
  # resource path
  local_var_path = '/jobs/{jobId}/jobads'.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'])
  header_params[:'Accept-Language'] = opts[:'accept_language'] if !opts[:'accept_language'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

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

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

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

#jobs_jobads_create(body, job_id, opts = {}) ⇒ JobAdItem

Create a new job ad

Parameters:

  • body

    job ad

  • job_id

    job identifier

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

    the optional parameters

Returns:



595
596
597
598
# File 'lib/smart_recruiters/api/jobs_api.rb', line 595

def jobs_jobads_create(body, job_id, opts = {})
  data, _status_code, _headers = jobs_jobads_create_with_http_info(body, job_id, opts)
  data
end

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

Create a new job ad

Parameters:

  • body

    job ad

  • job_id

    job identifier

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

    the optional parameters

Returns:

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

    JobAdItem data, response status code and response headers



605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
# File 'lib/smart_recruiters/api/jobs_api.rb', line 605

def jobs_jobads_create_with_http_info(body, job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: JobsApi.jobs_jobads_create ...'
  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 JobsApi.jobs_jobads_create"
  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 JobsApi.jobs_jobads_create"
  end
  # resource path
  local_var_path = '/jobs/{jobId}/jobads'.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] || 'JobAdItem' 

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

#jobs_jobads_get(job_id, job_ad_id, opts = {}) ⇒ JobAdItem

Get a job ad

Parameters:

  • job_id

    job identifier

  • job_ad_id

    job ad identifier

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    language of returned content (default to en)

Returns:



658
659
660
661
# File 'lib/smart_recruiters/api/jobs_api.rb', line 658

def jobs_jobads_get(job_id, job_ad_id, opts = {})
  data, _status_code, _headers = jobs_jobads_get_with_http_info(job_id, job_ad_id, opts)
  data
end

#jobs_jobads_get_with_http_info(job_id, job_ad_id, opts = {}) ⇒ Array<(JobAdItem, Integer, Hash)>

Get a job ad

Parameters:

  • job_id

    job identifier

  • job_ad_id

    job ad identifier

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    language of returned content

Returns:

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

    JobAdItem data, response status code and response headers



669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
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
# File 'lib/smart_recruiters/api/jobs_api.rb', line 669

def jobs_jobads_get_with_http_info(job_id, job_ad_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: JobsApi.jobs_jobads_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 JobsApi.jobs_jobads_get"
  end
  # verify the required parameter 'job_ad_id' is set
  if @api_client.config.client_side_validation && job_ad_id.nil?
    fail ArgumentError, "Missing the required parameter 'job_ad_id' when calling JobsApi.jobs_jobads_get"
  end
  if @api_client.config.client_side_validation && opts[:'accept_language'] && !['af', 'am', 'ar', 'hy', 'az', 'eu', 'bn', 'bg', 'ca', 'zh-CN', 'zh-TW', 'hr', 'cs', 'da', 'nl', 'en-GB', 'en', 'et', 'fi', 'fr', 'fr-CA', 'gl', 'ka', 'de', 'el', 'gu', 'iw', 'hi', 'hu', 'is', 'id', 'ga', 'it', 'ja', 'kn', 'km', 'ko', 'lo', 'lv', 'lt', 'ms', 'ml', 'mr', 'mn', 'ne', 'no', 'fa', 'fil', 'pl', 'pt', 'pt-BR', 'pt-PT', 'ro', 'ru', 'sr', 'si', 'sk', 'sl', 'es', 'es-MX', 'sw', 'sv', 'ta', 'te', 'tr', 'uk', 'ur', 'vi', 'cy', 'zu'].include?(opts[:'accept_language'])
    fail ArgumentError, 'invalid value for "accept_language", must be one of af, am, ar, hy, az, eu, bn, bg, ca, zh-CN, zh-TW, hr, cs, da, nl, en-GB, en, et, fi, fr, fr-CA, gl, ka, de, el, gu, iw, hi, hu, is, id, ga, it, ja, kn, km, ko, lo, lv, lt, ms, ml, mr, mn, ne, no, fa, fil, pl, pt, pt-BR, pt-PT, ro, ru, sr, si, sk, sl, es, es-MX, sw, sv, ta, te, tr, uk, ur, vi, cy, zu'
  end
  # resource path
  local_var_path = '/jobs/{jobId}/jobads/{jobAdId}'.sub('{' + 'jobId' + '}', job_id.to_s).sub('{' + 'jobAdId' + '}', job_ad_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'])
  header_params[:'Accept-Language'] = opts[:'accept_language'] if !opts[:'accept_language'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

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

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

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

#jobs_jobads_postings_all(job_id, job_ad_id, opts = {}) ⇒ PublicationList

List publications for a job ad List publications for a job ad

Parameters:

  • job_id

    job identifier

  • job_ad_id

    job ad identifier

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    language of returned content (default to en)

  • :active_only (BOOLEAN)

    publication status filter; when omitted, defaults to &#x27;true&#x27; (only active publications are returned); &#x27;false&#x27; returns active and inactive publications (default to true)

Returns:



726
727
728
729
# File 'lib/smart_recruiters/api/jobs_api.rb', line 726

def jobs_jobads_postings_all(job_id, job_ad_id, opts = {})
  data, _status_code, _headers = jobs_jobads_postings_all_with_http_info(job_id, job_ad_id, opts)
  data
end

#jobs_jobads_postings_all_with_http_info(job_id, job_ad_id, opts = {}) ⇒ Array<(PublicationList, Integer, Hash)>

List publications for a job ad List publications for a job ad

Parameters:

  • job_id

    job identifier

  • job_ad_id

    job ad identifier

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    language of returned content

  • :active_only (BOOLEAN)

    publication status filter; when omitted, defaults to &#x27;true&#x27; (only active publications are returned); &#x27;false&#x27; returns active and inactive publications

Returns:

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

    PublicationList data, response status code and response headers



739
740
741
742
743
744
745
746
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
786
787
788
# File 'lib/smart_recruiters/api/jobs_api.rb', line 739

def jobs_jobads_postings_all_with_http_info(job_id, job_ad_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: JobsApi.jobs_jobads_postings_all ...'
  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 JobsApi.jobs_jobads_postings_all"
  end
  # verify the required parameter 'job_ad_id' is set
  if @api_client.config.client_side_validation && job_ad_id.nil?
    fail ArgumentError, "Missing the required parameter 'job_ad_id' when calling JobsApi.jobs_jobads_postings_all"
  end
  if @api_client.config.client_side_validation && opts[:'accept_language'] && !['af', 'am', 'ar', 'hy', 'az', 'eu', 'bn', 'bg', 'ca', 'zh-CN', 'zh-TW', 'hr', 'cs', 'da', 'nl', 'en-GB', 'en', 'et', 'fi', 'fr', 'fr-CA', 'gl', 'ka', 'de', 'el', 'gu', 'iw', 'hi', 'hu', 'is', 'id', 'ga', 'it', 'ja', 'kn', 'km', 'ko', 'lo', 'lv', 'lt', 'ms', 'ml', 'mr', 'mn', 'ne', 'no', 'fa', 'fil', 'pl', 'pt', 'pt-BR', 'pt-PT', 'ro', 'ru', 'sr', 'si', 'sk', 'sl', 'es', 'es-MX', 'sw', 'sv', 'ta', 'te', 'tr', 'uk', 'ur', 'vi', 'cy', 'zu'].include?(opts[:'accept_language'])
    fail ArgumentError, 'invalid value for "accept_language", must be one of af, am, ar, hy, az, eu, bn, bg, ca, zh-CN, zh-TW, hr, cs, da, nl, en-GB, en, et, fi, fr, fr-CA, gl, ka, de, el, gu, iw, hi, hu, is, id, ga, it, ja, kn, km, ko, lo, lv, lt, ms, ml, mr, mn, ne, no, fa, fil, pl, pt, pt-BR, pt-PT, ro, ru, sr, si, sk, sl, es, es-MX, sw, sv, ta, te, tr, uk, ur, vi, cy, zu'
  end
  # resource path
  local_var_path = '/jobs/{jobId}/jobads/{jobAdId}/postings'.sub('{' + 'jobId' + '}', job_id.to_s).sub('{' + 'jobAdId' + '}', job_ad_id.to_s)

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

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'Accept-Language'] = opts[:'accept_language'] if !opts[:'accept_language'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

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

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

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

#jobs_jobads_postings_create(job_id, job_ad_id, opts = {}) ⇒ JobAdPublicationScheduled

Publishes a job ad Publishes a job ad to internal sources (Career Pages, Job Widget, Facebook App, WordPress Plugin, Posting API) and optionally to all free job aggregators. By default it’s set to publish to job aggregators It reflects a Publish action available in the SmartRecruiters UI. Note: Internal sources depend on a company’s payment plan.

Parameters:

  • job_id

    job identifier

  • job_ad_id

    job ad identifier

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

    the optional parameters

Options Hash (opts):

Returns:



796
797
798
799
# File 'lib/smart_recruiters/api/jobs_api.rb', line 796

def jobs_jobads_postings_create(job_id, job_ad_id, opts = {})
  data, _status_code, _headers = jobs_jobads_postings_create_with_http_info(job_id, job_ad_id, opts)
  data
end

#jobs_jobads_postings_create_with_http_info(job_id, job_ad_id, opts = {}) ⇒ Array<(JobAdPublicationScheduled, Integer, Hash)>

Publishes a job ad Publishes a job ad to internal sources (Career Pages, Job Widget, Facebook App, WordPress Plugin, Posting API) and optionally to all free job aggregators. By default it&#x27;s set to publish to job aggregators It reflects a Publish action available in the SmartRecruiters UI. Note: Internal sources depend on a company&#x27;s payment plan.

Parameters:

  • job_id

    job identifier

  • job_ad_id

    job ad identifier

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

    the optional parameters

Options Hash (opts):

Returns:

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

    JobAdPublicationScheduled data, response status code and response headers



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
842
843
844
845
846
847
848
849
850
851
852
853
854
# File 'lib/smart_recruiters/api/jobs_api.rb', line 808

def jobs_jobads_postings_create_with_http_info(job_id, job_ad_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: JobsApi.jobs_jobads_postings_create ...'
  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 JobsApi.jobs_jobads_postings_create"
  end
  # verify the required parameter 'job_ad_id' is set
  if @api_client.config.client_side_validation && job_ad_id.nil?
    fail ArgumentError, "Missing the required parameter 'job_ad_id' when calling JobsApi.jobs_jobads_postings_create"
  end
  # resource path
  local_var_path = '/jobs/{jobId}/jobads/{jobAdId}/postings'.sub('{' + 'jobId' + '}', job_id.to_s).sub('{' + 'jobAdId' + '}', job_ad_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] || 'JobAdPublicationScheduled' 

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

#jobs_jobads_postings_unpublish(job_id, job_ad_id, opts = {}) ⇒ JobAdUnpublishScheduled

Unpublish a job ad Unpublishes a job ad from all sources. **Unpublishing a default job ad will unpublish all other job ads within that job.**

Parameters:

  • job_id

    job identifier

  • job_ad_id

    job ad identifier

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

    the optional parameters

Returns:



861
862
863
864
# File 'lib/smart_recruiters/api/jobs_api.rb', line 861

def jobs_jobads_postings_unpublish(job_id, job_ad_id, opts = {})
  data, _status_code, _headers = jobs_jobads_postings_unpublish_with_http_info(job_id, job_ad_id, opts)
  data
end

#jobs_jobads_postings_unpublish_with_http_info(job_id, job_ad_id, opts = {}) ⇒ Array<(JobAdUnpublishScheduled, Integer, Hash)>

Unpublish a job ad Unpublishes a job ad from all sources. **Unpublishing a default job ad will unpublish all other job ads within that job.**

Parameters:

  • job_id

    job identifier

  • job_ad_id

    job ad identifier

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

    the optional parameters

Returns:

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

    JobAdUnpublishScheduled data, response status code and response headers



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
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
# File 'lib/smart_recruiters/api/jobs_api.rb', line 872

def jobs_jobads_postings_unpublish_with_http_info(job_id, job_ad_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: JobsApi.jobs_jobads_postings_unpublish ...'
  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 JobsApi.jobs_jobads_postings_unpublish"
  end
  # verify the required parameter 'job_ad_id' is set
  if @api_client.config.client_side_validation && job_ad_id.nil?
    fail ArgumentError, "Missing the required parameter 'job_ad_id' when calling JobsApi.jobs_jobads_postings_unpublish"
  end
  # resource path
  local_var_path = '/jobs/{jobId}/jobads/{jobAdId}/postings'.sub('{' + 'jobId' + '}', job_id.to_s).sub('{' + 'jobAdId' + '}', job_ad_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] || 'JobAdUnpublishScheduled' 

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

#jobs_jobads_update(body, job_id, job_ad_id, opts = {}) ⇒ JobAdItem

Update a job ad Enables you to update an existing job ad. NOTE: In order for a job ad changes to be reflected on internal sources (Career Sites, Job Widgets etc.) and Job Aggregators, you need to Publish the job ad after making an update.

Parameters:

  • body

    job ad

  • job_id

    job identifier

  • job_ad_id

    job ad identifier

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

    the optional parameters

Returns:



924
925
926
927
# File 'lib/smart_recruiters/api/jobs_api.rb', line 924

def jobs_jobads_update(body, job_id, job_ad_id, opts = {})
  data, _status_code, _headers = jobs_jobads_update_with_http_info(body, job_id, job_ad_id, opts)
  data
end

#jobs_jobads_update_with_http_info(body, job_id, job_ad_id, opts = {}) ⇒ Array<(JobAdItem, Integer, Hash)>

Update a job ad Enables you to update an existing job ad. NOTE: In order for a job ad changes to be reflected on internal sources (Career Sites, Job Widgets etc.) and Job Aggregators, you need to Publish the job ad after making an update.

Parameters:

  • body

    job ad

  • job_id

    job identifier

  • job_ad_id

    job ad identifier

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

    the optional parameters

Returns:

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

    JobAdItem data, response status code and response headers



936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
# File 'lib/smart_recruiters/api/jobs_api.rb', line 936

def jobs_jobads_update_with_http_info(body, job_id, job_ad_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: JobsApi.jobs_jobads_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 JobsApi.jobs_jobads_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 JobsApi.jobs_jobads_update"
  end
  # verify the required parameter 'job_ad_id' is set
  if @api_client.config.client_side_validation && job_ad_id.nil?
    fail ArgumentError, "Missing the required parameter 'job_ad_id' when calling JobsApi.jobs_jobads_update"
  end
  # resource path
  local_var_path = '/jobs/{jobId}/jobads/{jobAdId}'.sub('{' + 'jobId' + '}', job_id.to_s).sub('{' + 'jobAdId' + '}', job_ad_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] || 'JobAdItem' 

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

#jobs_notes_get(job_id, opts = {}) ⇒ JobNote

Get note of a job.

Parameters:

  • job_id

    job identifier

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    language of returned content (default to en)

Returns:



992
993
994
995
# File 'lib/smart_recruiters/api/jobs_api.rb', line 992

def jobs_notes_get(job_id, opts = {})
  data, _status_code, _headers = jobs_notes_get_with_http_info(job_id, opts)
  data
end

#jobs_notes_get_with_http_info(job_id, opts = {}) ⇒ Array<(JobNote, Integer, Hash)>

Get note of a job.

Parameters:

  • job_id

    job identifier

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    language of returned content

Returns:

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

    JobNote data, response status code and response headers



1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
# File 'lib/smart_recruiters/api/jobs_api.rb', line 1002

def jobs_notes_get_with_http_info(job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: JobsApi.jobs_notes_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 JobsApi.jobs_notes_get"
  end
  if @api_client.config.client_side_validation && opts[:'accept_language'] && !['af', 'am', 'ar', 'hy', 'az', 'eu', 'bn', 'bg', 'ca', 'zh-CN', 'zh-TW', 'hr', 'cs', 'da', 'nl', 'en-GB', 'en', 'et', 'fi', 'fr', 'fr-CA', 'gl', 'ka', 'de', 'el', 'gu', 'iw', 'hi', 'hu', 'is', 'id', 'ga', 'it', 'ja', 'kn', 'km', 'ko', 'lo', 'lv', 'lt', 'ms', 'ml', 'mr', 'mn', 'ne', 'no', 'fa', 'fil', 'pl', 'pt', 'pt-BR', 'pt-PT', 'ro', 'ru', 'sr', 'si', 'sk', 'sl', 'es', 'es-MX', 'sw', 'sv', 'ta', 'te', 'tr', 'uk', 'ur', 'vi', 'cy', 'zu'].include?(opts[:'accept_language'])
    fail ArgumentError, 'invalid value for "accept_language", must be one of af, am, ar, hy, az, eu, bn, bg, ca, zh-CN, zh-TW, hr, cs, da, nl, en-GB, en, et, fi, fr, fr-CA, gl, ka, de, el, gu, iw, hi, hu, is, id, ga, it, ja, kn, km, ko, lo, lv, lt, ms, ml, mr, mn, ne, no, fa, fil, pl, pt, pt-BR, pt-PT, ro, ru, sr, si, sk, sl, es, es-MX, sw, sv, ta, te, tr, uk, ur, vi, cy, zu'
  end
  # resource path
  local_var_path = '/jobs/{jobId}/note'.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'])
  header_params[:'Accept-Language'] = opts[:'accept_language'] if !opts[:'accept_language'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

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

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

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

#jobs_notes_update(body, job_id, opts = {}) ⇒ JobNote

Update note of a job. Update note of a job.

Parameters:

  • body
  • job_id

    job identifier

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

    the optional parameters

Returns:



1053
1054
1055
1056
# File 'lib/smart_recruiters/api/jobs_api.rb', line 1053

def jobs_notes_update(body, job_id, opts = {})
  data, _status_code, _headers = jobs_notes_update_with_http_info(body, job_id, opts)
  data
end

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

Update note of a job. Update note of a job.

Parameters:

  • body
  • job_id

    job identifier

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

    the optional parameters

Returns:

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

    JobNote data, response status code and response headers



1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
# File 'lib/smart_recruiters/api/jobs_api.rb', line 1064

def jobs_notes_update_with_http_info(body, job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: JobsApi.jobs_notes_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 JobsApi.jobs_notes_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 JobsApi.jobs_notes_update"
  end
  # resource path
  local_var_path = '/jobs/{jobId}/note'.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] || 'JobNote' 

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

#jobs_patch(job_id, opts = {}) ⇒ JobDetails

Update a job Update a job. All attributes that are used when creating a job can be used. Ignores all nonexistent job properties and job properties values.

Parameters:

  • job_id

    job identifier

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

    the optional parameters

Options Hash (opts):

  • :body (Array<Object>)

    patch request

Returns:



1117
1118
1119
1120
# File 'lib/smart_recruiters/api/jobs_api.rb', line 1117

def jobs_patch(job_id, opts = {})
  data, _status_code, _headers = jobs_patch_with_http_info(job_id, opts)
  data
end

#jobs_patch_with_http_info(job_id, opts = {}) ⇒ Array<(JobDetails, Integer, Hash)>

Update a job Update a job. All attributes that are used when creating a job can be used. Ignores all nonexistent job properties and job properties values.

Parameters:

  • job_id

    job identifier

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

    the optional parameters

Options Hash (opts):

  • :body (Array<Object>)

    patch request

Returns:

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

    JobDetails data, response status code and response headers



1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
# File 'lib/smart_recruiters/api/jobs_api.rb', line 1128

def jobs_patch_with_http_info(job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: JobsApi.jobs_patch ...'
  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 JobsApi.jobs_patch"
  end
  # resource path
  local_var_path = '/jobs/{jobId}'.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-patch+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] || 'JobDetails' 

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

#jobs_positions_all(job_id, opts = {}) ⇒ JobPositions

Positions for a job

Parameters:

  • job_id

    job identifier

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    language of returned content (default to en)

Returns:



1176
1177
1178
1179
# File 'lib/smart_recruiters/api/jobs_api.rb', line 1176

def jobs_positions_all(job_id, opts = {})
  data, _status_code, _headers = jobs_positions_all_with_http_info(job_id, opts)
  data
end

#jobs_positions_all_with_http_info(job_id, opts = {}) ⇒ Array<(JobPositions, Integer, Hash)>

Positions for a job

Parameters:

  • job_id

    job identifier

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    language of returned content

Returns:

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

    JobPositions data, response status code and response headers



1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
# File 'lib/smart_recruiters/api/jobs_api.rb', line 1186

def jobs_positions_all_with_http_info(job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: JobsApi.jobs_positions_all ...'
  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 JobsApi.jobs_positions_all"
  end
  if @api_client.config.client_side_validation && opts[:'accept_language'] && !['af', 'am', 'ar', 'hy', 'az', 'eu', 'bn', 'bg', 'ca', 'zh-CN', 'zh-TW', 'hr', 'cs', 'da', 'nl', 'en-GB', 'en', 'et', 'fi', 'fr', 'fr-CA', 'gl', 'ka', 'de', 'el', 'gu', 'iw', 'hi', 'hu', 'is', 'id', 'ga', 'it', 'ja', 'kn', 'km', 'ko', 'lo', 'lv', 'lt', 'ms', 'ml', 'mr', 'mn', 'ne', 'no', 'fa', 'fil', 'pl', 'pt', 'pt-BR', 'pt-PT', 'ro', 'ru', 'sr', 'si', 'sk', 'sl', 'es', 'es-MX', 'sw', 'sv', 'ta', 'te', 'tr', 'uk', 'ur', 'vi', 'cy', 'zu'].include?(opts[:'accept_language'])
    fail ArgumentError, 'invalid value for "accept_language", must be one of af, am, ar, hy, az, eu, bn, bg, ca, zh-CN, zh-TW, hr, cs, da, nl, en-GB, en, et, fi, fr, fr-CA, gl, ka, de, el, gu, iw, hi, hu, is, id, ga, it, ja, kn, km, ko, lo, lv, lt, ms, ml, mr, mn, ne, no, fa, fil, pl, pt, pt-BR, pt-PT, ro, ru, sr, si, sk, sl, es, es-MX, sw, sv, ta, te, tr, uk, ur, vi, cy, zu'
  end
  # resource path
  local_var_path = '/jobs/{jobId}/positions'.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'])
  header_params[:'Accept-Language'] = opts[:'accept_language'] if !opts[:'accept_language'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

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

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

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

#jobs_positions_create(body, job_id, opts = {}) ⇒ JobPosition

Create a new position for a job

Parameters:

  • body

    Position body object

  • job_id

    job identifier

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

    the optional parameters

Returns:



1236
1237
1238
1239
# File 'lib/smart_recruiters/api/jobs_api.rb', line 1236

def jobs_positions_create(body, job_id, opts = {})
  data, _status_code, _headers = jobs_positions_create_with_http_info(body, job_id, opts)
  data
end

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

Create a new position for a job

Parameters:

  • body

    Position body object

  • job_id

    job identifier

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

    the optional parameters

Returns:

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

    JobPosition data, response status code and response headers



1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
# File 'lib/smart_recruiters/api/jobs_api.rb', line 1246

def jobs_positions_create_with_http_info(body, job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: JobsApi.jobs_positions_create ...'
  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 JobsApi.jobs_positions_create"
  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 JobsApi.jobs_positions_create"
  end
  # resource path
  local_var_path = '/jobs/{jobId}/positions'.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] || 'JobPosition' 

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

#jobs_positions_get(job_id, position_id, opts = {}) ⇒ JobPosition

Get a single position

Parameters:

  • job_id

    job identifier

  • position_id

    position identifier

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    language of returned content (default to en)

Returns:



1299
1300
1301
1302
# File 'lib/smart_recruiters/api/jobs_api.rb', line 1299

def jobs_positions_get(job_id, position_id, opts = {})
  data, _status_code, _headers = jobs_positions_get_with_http_info(job_id, position_id, opts)
  data
end

#jobs_positions_get_with_http_info(job_id, position_id, opts = {}) ⇒ Array<(JobPosition, Integer, Hash)>

Get a single position

Parameters:

  • job_id

    job identifier

  • position_id

    position identifier

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    language of returned content

Returns:

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

    JobPosition data, response status code and response headers



1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
# File 'lib/smart_recruiters/api/jobs_api.rb', line 1310

def jobs_positions_get_with_http_info(job_id, position_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: JobsApi.jobs_positions_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 JobsApi.jobs_positions_get"
  end
  # verify the required parameter 'position_id' is set
  if @api_client.config.client_side_validation && position_id.nil?
    fail ArgumentError, "Missing the required parameter 'position_id' when calling JobsApi.jobs_positions_get"
  end
  if @api_client.config.client_side_validation && opts[:'accept_language'] && !['af', 'am', 'ar', 'hy', 'az', 'eu', 'bn', 'bg', 'ca', 'zh-CN', 'zh-TW', 'hr', 'cs', 'da', 'nl', 'en-GB', 'en', 'et', 'fi', 'fr', 'fr-CA', 'gl', 'ka', 'de', 'el', 'gu', 'iw', 'hi', 'hu', 'is', 'id', 'ga', 'it', 'ja', 'kn', 'km', 'ko', 'lo', 'lv', 'lt', 'ms', 'ml', 'mr', 'mn', 'ne', 'no', 'fa', 'fil', 'pl', 'pt', 'pt-BR', 'pt-PT', 'ro', 'ru', 'sr', 'si', 'sk', 'sl', 'es', 'es-MX', 'sw', 'sv', 'ta', 'te', 'tr', 'uk', 'ur', 'vi', 'cy', 'zu'].include?(opts[:'accept_language'])
    fail ArgumentError, 'invalid value for "accept_language", must be one of af, am, ar, hy, az, eu, bn, bg, ca, zh-CN, zh-TW, hr, cs, da, nl, en-GB, en, et, fi, fr, fr-CA, gl, ka, de, el, gu, iw, hi, hu, is, id, ga, it, ja, kn, km, ko, lo, lv, lt, ms, ml, mr, mn, ne, no, fa, fil, pl, pt, pt-BR, pt-PT, ro, ru, sr, si, sk, sl, es, es-MX, sw, sv, ta, te, tr, uk, ur, vi, cy, zu'
  end
  # resource path
  local_var_path = '/jobs/{jobId}/positions/{positionId}'.sub('{' + 'jobId' + '}', job_id.to_s).sub('{' + 'positionId' + '}', position_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'])
  header_params[:'Accept-Language'] = opts[:'accept_language'] if !opts[:'accept_language'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

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

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

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

#jobs_positions_remove(job_id, position_id, opts = {}) ⇒ nil

Delete position

Parameters:

  • job_id

    job identifier

  • position_id

    position identifier

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

    the optional parameters

Returns:

  • (nil)


1364
1365
1366
1367
# File 'lib/smart_recruiters/api/jobs_api.rb', line 1364

def jobs_positions_remove(job_id, position_id, opts = {})
  jobs_positions_remove_with_http_info(job_id, position_id, opts)
  nil
end

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

Delete position

Parameters:

  • job_id

    job identifier

  • position_id

    position identifier

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
# File 'lib/smart_recruiters/api/jobs_api.rb', line 1374

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

#jobs_positions_update(body, job_id, position_id, opts = {}) ⇒ JobPosition

Update position

Parameters:

  • body

    Position body object

  • job_id

    job identifier

  • position_id

    position identifier

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

    the optional parameters

Returns:



1425
1426
1427
1428
# File 'lib/smart_recruiters/api/jobs_api.rb', line 1425

def jobs_positions_update(body, job_id, position_id, opts = {})
  data, _status_code, _headers = jobs_positions_update_with_http_info(body, job_id, position_id, opts)
  data
end

#jobs_positions_update_with_http_info(body, job_id, position_id, opts = {}) ⇒ Array<(JobPosition, Integer, Hash)>

Update position

Parameters:

  • body

    Position body object

  • job_id

    job identifier

  • position_id

    position identifier

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

    the optional parameters

Returns:

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

    JobPosition data, response status code and response headers



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
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
# File 'lib/smart_recruiters/api/jobs_api.rb', line 1436

def jobs_positions_update_with_http_info(body, job_id, position_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: JobsApi.jobs_positions_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 JobsApi.jobs_positions_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 JobsApi.jobs_positions_update"
  end
  # verify the required parameter 'position_id' is set
  if @api_client.config.client_side_validation && position_id.nil?
    fail ArgumentError, "Missing the required parameter 'position_id' when calling JobsApi.jobs_positions_update"
  end
  # resource path
  local_var_path = '/jobs/{jobId}/positions/{positionId}'.sub('{' + 'jobId' + '}', job_id.to_s).sub('{' + 'positionId' + '}', position_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] || 'JobPosition' 

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

#jobs_publication_all(job_id, opts = {}) ⇒ PublicationList

Find and list publications for a job Find and list publications for a job

Parameters:

  • job_id

    job identifier

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    language of returned content (default to en)

  • :active_only (BOOLEAN)

    publication status filter; defaults to &#x27;true&#x27; (only active publications are returned); &#x27;false&#x27; returns active and inactive publications (default to true)

Returns:



1494
1495
1496
1497
# File 'lib/smart_recruiters/api/jobs_api.rb', line 1494

def jobs_publication_all(job_id, opts = {})
  data, _status_code, _headers = jobs_publication_all_with_http_info(job_id, opts)
  data
end

#jobs_publication_all_with_http_info(job_id, opts = {}) ⇒ Array<(PublicationList, Integer, Hash)>

Find and list publications for a job Find and list publications for a job

Parameters:

  • job_id

    job identifier

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    language of returned content

  • :active_only (BOOLEAN)

    publication status filter; defaults to &#x27;true&#x27; (only active publications are returned); &#x27;false&#x27; returns active and inactive publications

Returns:

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

    PublicationList data, response status code and response headers



1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
# File 'lib/smart_recruiters/api/jobs_api.rb', line 1506

def jobs_publication_all_with_http_info(job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: JobsApi.jobs_publication_all ...'
  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 JobsApi.jobs_publication_all"
  end
  if @api_client.config.client_side_validation && opts[:'accept_language'] && !['af', 'am', 'ar', 'hy', 'az', 'eu', 'bn', 'bg', 'ca', 'zh-CN', 'zh-TW', 'hr', 'cs', 'da', 'nl', 'en-GB', 'en', 'et', 'fi', 'fr', 'fr-CA', 'gl', 'ka', 'de', 'el', 'gu', 'iw', 'hi', 'hu', 'is', 'id', 'ga', 'it', 'ja', 'kn', 'km', 'ko', 'lo', 'lv', 'lt', 'ms', 'ml', 'mr', 'mn', 'ne', 'no', 'fa', 'fil', 'pl', 'pt', 'pt-BR', 'pt-PT', 'ro', 'ru', 'sr', 'si', 'sk', 'sl', 'es', 'es-MX', 'sw', 'sv', 'ta', 'te', 'tr', 'uk', 'ur', 'vi', 'cy', 'zu'].include?(opts[:'accept_language'])
    fail ArgumentError, 'invalid value for "accept_language", must be one of af, am, ar, hy, az, eu, bn, bg, ca, zh-CN, zh-TW, hr, cs, da, nl, en-GB, en, et, fi, fr, fr-CA, gl, ka, de, el, gu, iw, hi, hu, is, id, ga, it, ja, kn, km, ko, lo, lv, lt, ms, ml, mr, mn, ne, no, fa, fil, pl, pt, pt-BR, pt-PT, ro, ru, sr, si, sk, sl, es, es-MX, sw, sv, ta, te, tr, uk, ur, vi, cy, zu'
  end
  # resource path
  local_var_path = '/jobs/{jobId}/publication'.sub('{' + 'jobId' + '}', job_id.to_s)

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

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'Accept-Language'] = opts[:'accept_language'] if !opts[:'accept_language'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

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

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

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

#jobs_publication_create(job_id, opts = {}) ⇒ nil

Publishes a default job ad Publishes default job ad to internal sources and to free job aggregators. It reflects a Publish action available in the SmartRecruiters UI. Note: Internal sources: Career Pages, Job Widget, Facebook App, WordPress Plugin, Posting API depend on a company’s payment plan.

Parameters:

  • job_id

    job identifier

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

    the optional parameters

Options Hash (opts):

Returns:

  • (nil)


1558
1559
1560
1561
# File 'lib/smart_recruiters/api/jobs_api.rb', line 1558

def jobs_publication_create(job_id, opts = {})
  jobs_publication_create_with_http_info(job_id, opts)
  nil
end

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

Publishes a default job ad Publishes default job ad to internal sources and to free job aggregators. It reflects a Publish action available in the SmartRecruiters UI. Note: Internal sources: Career Pages, Job Widget, Facebook App, WordPress Plugin, Posting API depend on a company&#x27;s payment plan.

Parameters:

  • 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



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
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
# File 'lib/smart_recruiters/api/jobs_api.rb', line 1569

def jobs_publication_create_with_http_info(job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: JobsApi.jobs_publication_create ...'
  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 JobsApi.jobs_publication_create"
  end
  # resource path
  local_var_path = '/jobs/{jobId}/publication'.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(: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: JobsApi#jobs_publication_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#jobs_publication_unpublish(job_id, opts = {}) ⇒ nil

Unpublishes a job from all sources Unpublishes a job from all sources

Parameters:

  • job_id

    job identifier

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

    the optional parameters

Returns:

  • (nil)


1617
1618
1619
1620
# File 'lib/smart_recruiters/api/jobs_api.rb', line 1617

def jobs_publication_unpublish(job_id, opts = {})
  jobs_publication_unpublish_with_http_info(job_id, opts)
  nil
end

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

Unpublishes a job from all sources Unpublishes a job from all sources

Parameters:

  • job_id

    job identifier

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
# File 'lib/smart_recruiters/api/jobs_api.rb', line 1627

def jobs_publication_unpublish_with_http_info(job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: JobsApi.jobs_publication_unpublish ...'
  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 JobsApi.jobs_publication_unpublish"
  end
  # resource path
  local_var_path = '/jobs/{jobId}/publication'.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] 

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

#jobs_status_history_get(job_id, opts = {}) ⇒ JobStatusHistory

Job status history

Parameters:

  • job_id

    job identifier

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    language of returned content (default to en)

Returns:



1673
1674
1675
1676
# File 'lib/smart_recruiters/api/jobs_api.rb', line 1673

def jobs_status_history_get(job_id, opts = {})
  data, _status_code, _headers = jobs_status_history_get_with_http_info(job_id, opts)
  data
end

#jobs_status_history_get_with_http_info(job_id, opts = {}) ⇒ Array<(JobStatusHistory, Integer, Hash)>

Job status history

Parameters:

  • job_id

    job identifier

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    language of returned content

Returns:

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

    JobStatusHistory data, response status code and response headers



1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
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
# File 'lib/smart_recruiters/api/jobs_api.rb', line 1683

def jobs_status_history_get_with_http_info(job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: JobsApi.jobs_status_history_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 JobsApi.jobs_status_history_get"
  end
  if @api_client.config.client_side_validation && opts[:'accept_language'] && !['af', 'am', 'ar', 'hy', 'az', 'eu', 'bn', 'bg', 'ca', 'zh-CN', 'zh-TW', 'hr', 'cs', 'da', 'nl', 'en-GB', 'en', 'et', 'fi', 'fr', 'fr-CA', 'gl', 'ka', 'de', 'el', 'gu', 'iw', 'hi', 'hu', 'is', 'id', 'ga', 'it', 'ja', 'kn', 'km', 'ko', 'lo', 'lv', 'lt', 'ms', 'ml', 'mr', 'mn', 'ne', 'no', 'fa', 'fil', 'pl', 'pt', 'pt-BR', 'pt-PT', 'ro', 'ru', 'sr', 'si', 'sk', 'sl', 'es', 'es-MX', 'sw', 'sv', 'ta', 'te', 'tr', 'uk', 'ur', 'vi', 'cy', 'zu'].include?(opts[:'accept_language'])
    fail ArgumentError, 'invalid value for "accept_language", must be one of af, am, ar, hy, az, eu, bn, bg, ca, zh-CN, zh-TW, hr, cs, da, nl, en-GB, en, et, fi, fr, fr-CA, gl, ka, de, el, gu, iw, hi, hu, is, id, ga, it, ja, kn, km, ko, lo, lv, lt, ms, ml, mr, mn, ne, no, fa, fil, pl, pt, pt-BR, pt-PT, ro, ru, sr, si, sk, sl, es, es-MX, sw, sv, ta, te, tr, uk, ur, vi, cy, zu'
  end
  # resource path
  local_var_path = '/jobs/{jobId}/status/history'.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'])
  header_params[:'Accept-Language'] = opts[:'accept_language'] if !opts[:'accept_language'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

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

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

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

#jobs_status_update(body, job_id, opts = {}) ⇒ JobStatusUpdate

Updates job status

Parameters:

  • body
  • job_id

    job identifier

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

    the optional parameters

Returns:



1733
1734
1735
1736
# File 'lib/smart_recruiters/api/jobs_api.rb', line 1733

def jobs_status_update(body, job_id, opts = {})
  data, _status_code, _headers = jobs_status_update_with_http_info(body, job_id, opts)
  data
end

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

Updates job status

Parameters:

  • body
  • job_id

    job identifier

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

    the optional parameters

Returns:

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

    JobStatusUpdate data, response status code and response headers



1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
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
# File 'lib/smart_recruiters/api/jobs_api.rb', line 1743

def jobs_status_update_with_http_info(body, job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: JobsApi.jobs_status_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 JobsApi.jobs_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 JobsApi.jobs_status_update"
  end
  # resource path
  local_var_path = '/jobs/{jobId}/status'.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] || 'JobStatusUpdate' 

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

#jobs_update(job_id, opts = {}) ⇒ JobDetails

Updates job Enables you to update job and it’s jobAd. This operation requires passing a job id within path and job’s new state within body of the PUT request. Ignores all nonexistent job properties and job properties values. However jobAd and all it’s properties need to be provided. All jobAd’s properties will be removed if not provided. Returns an updated job with jobAd.

Parameters:

  • job_id

    job identifier

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

    the optional parameters

Options Hash (opts):

  • :body (JobInput)

    Job that needs to be updated

Returns:



1796
1797
1798
1799
# File 'lib/smart_recruiters/api/jobs_api.rb', line 1796

def jobs_update(job_id, opts = {})
  data, _status_code, _headers = jobs_update_with_http_info(job_id, opts)
  data
end

#jobs_update_with_http_info(job_id, opts = {}) ⇒ Array<(JobDetails, Integer, Hash)>

Updates job Enables you to update job and it&#x27;s jobAd. This operation requires passing a job id within path and job&#x27;s new state within body of the PUT request. Ignores all nonexistent job properties and job properties values. However jobAd and all it&#x27;s properties need to be provided. All jobAd&#x27;s properties will be removed if not provided. Returns an updated job with jobAd.

Parameters:

  • job_id

    job identifier

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

    the optional parameters

Options Hash (opts):

  • :body (JobInput)

    Job that needs to be updated

Returns:

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

    JobDetails data, response status code and response headers



1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
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
# File 'lib/smart_recruiters/api/jobs_api.rb', line 1807

def jobs_update_with_http_info(job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: JobsApi.jobs_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 JobsApi.jobs_update"
  end
  # resource path
  local_var_path = '/jobs/{jobId}'.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] || 'JobDetails' 

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