class CrelateClient::ContactsApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/crelate_client/api/contacts_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

public_api_delete_contact(contact_id, api_key, opts = {}) click to toggle source

delete a contact

@param contact_id identifier @param api_key crelate api key @param [Hash] opts the optional parameters @return [Object]

# File lib/crelate_client/api/contacts_api.rb, line 29
def public_api_delete_contact(contact_id, api_key, opts = {})
  data, _status_code, _headers = public_api_delete_contact_with_http_info(contact_id, api_key, opts)
  return data
end
public_api_delete_contact_attachment(contact_id, attachment_id, api_key, opts = {}) click to toggle source

delete an attachment for a contact

@param contact_id contact identifier @param attachment_id attachment identifier @param api_key crelate api key @param [Hash] opts the optional parameters @return [Object]

# File lib/crelate_client/api/contacts_api.rb, line 90
def public_api_delete_contact_attachment(contact_id, attachment_id, api_key, opts = {})
  data, _status_code, _headers = public_api_delete_contact_attachment_with_http_info(contact_id, attachment_id, api_key, opts)
  return data
end
public_api_delete_contact_attachment_with_http_info(contact_id, attachment_id, api_key, opts = {}) click to toggle source

delete an attachment for a contact

@param contact_id contact identifier @param attachment_id attachment identifier @param api_key crelate api key @param [Hash] opts the optional parameters @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers

# File lib/crelate_client/api/contacts_api.rb, line 102
def public_api_delete_contact_attachment_with_http_info(contact_id, attachment_id, api_key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ContactsApi.public_api_delete_contact_attachment ..."
  end
  # verify the required parameter 'contact_id' is set
  if @api_client.config.client_side_validation && contact_id.nil?
    fail ArgumentError, "Missing the required parameter 'contact_id' when calling ContactsApi.public_api_delete_contact_attachment"
  end
  # verify the required parameter 'attachment_id' is set
  if @api_client.config.client_side_validation && attachment_id.nil?
    fail ArgumentError, "Missing the required parameter 'attachment_id' when calling ContactsApi.public_api_delete_contact_attachment"
  end
  # verify the required parameter 'api_key' is set
  if @api_client.config.client_side_validation && api_key.nil?
    fail ArgumentError, "Missing the required parameter 'api_key' when calling ContactsApi.public_api_delete_contact_attachment"
  end
  # resource path
  local_var_path = "/api/pub/v1/contacts/{contactId}/attachments/{attachmentId}".sub('{' + 'contactId' + '}', contact_id.to_s).sub('{' + 'attachmentId' + '}', attachment_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'api_key'] = api_key

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ContactsApi#public_api_delete_contact_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
public_api_delete_contact_job(contact_id, job_id, api_key, opts = {}) click to toggle source

delete a contact from a job for the recruiting workflow

@param contact_id @param job_id @param api_key crelate api key @param [Hash] opts the optional parameters @return [Object]

# File lib/crelate_client/api/contacts_api.rb, line 156
def public_api_delete_contact_job(contact_id, job_id, api_key, opts = {})
  data, _status_code, _headers = public_api_delete_contact_job_with_http_info(contact_id, job_id, api_key, opts)
  return data
end
public_api_delete_contact_job_with_http_info(contact_id, job_id, api_key, opts = {}) click to toggle source

delete a contact from a job for the recruiting workflow

@param contact_id @param job_id @param api_key crelate api key @param [Hash] opts the optional parameters @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers

# File lib/crelate_client/api/contacts_api.rb, line 168
def public_api_delete_contact_job_with_http_info(contact_id, job_id, api_key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ContactsApi.public_api_delete_contact_job ..."
  end
  # verify the required parameter 'contact_id' is set
  if @api_client.config.client_side_validation && contact_id.nil?
    fail ArgumentError, "Missing the required parameter 'contact_id' when calling ContactsApi.public_api_delete_contact_job"
  end
  # verify the required parameter 'job_id' is set
  if @api_client.config.client_side_validation && job_id.nil?
    fail ArgumentError, "Missing the required parameter 'job_id' when calling ContactsApi.public_api_delete_contact_job"
  end
  # verify the required parameter 'api_key' is set
  if @api_client.config.client_side_validation && api_key.nil?
    fail ArgumentError, "Missing the required parameter 'api_key' when calling ContactsApi.public_api_delete_contact_job"
  end
  # resource path
  local_var_path = "/api/pub/v1/contacts/{contactId}/jobs/{jobId}".sub('{' + 'contactId' + '}', contact_id.to_s).sub('{' + 'jobId' + '}', job_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'api_key'] = api_key

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ContactsApi#public_api_delete_contact_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
public_api_delete_contact_note(contact_id, note_id, api_key, opts = {}) click to toggle source

delete a note for a contact

@param contact_id identifier @param note_id @param api_key crelate api key @param [Hash] opts the optional parameters @return [Object]

# File lib/crelate_client/api/contacts_api.rb, line 222
def public_api_delete_contact_note(contact_id, note_id, api_key, opts = {})
  data, _status_code, _headers = public_api_delete_contact_note_with_http_info(contact_id, note_id, api_key, opts)
  return data
end
public_api_delete_contact_note_with_http_info(contact_id, note_id, api_key, opts = {}) click to toggle source

delete a note for a contact

@param contact_id identifier @param note_id @param api_key crelate api key @param [Hash] opts the optional parameters @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers

# File lib/crelate_client/api/contacts_api.rb, line 234
def public_api_delete_contact_note_with_http_info(contact_id, note_id, api_key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ContactsApi.public_api_delete_contact_note ..."
  end
  # verify the required parameter 'contact_id' is set
  if @api_client.config.client_side_validation && contact_id.nil?
    fail ArgumentError, "Missing the required parameter 'contact_id' when calling ContactsApi.public_api_delete_contact_note"
  end
  # verify the required parameter 'note_id' is set
  if @api_client.config.client_side_validation && note_id.nil?
    fail ArgumentError, "Missing the required parameter 'note_id' when calling ContactsApi.public_api_delete_contact_note"
  end
  # verify the required parameter 'api_key' is set
  if @api_client.config.client_side_validation && api_key.nil?
    fail ArgumentError, "Missing the required parameter 'api_key' when calling ContactsApi.public_api_delete_contact_note"
  end
  # resource path
  local_var_path = "/api/pub/v1/contacts/{contactId}/notes/{noteId}".sub('{' + 'contactId' + '}', contact_id.to_s).sub('{' + 'noteId' + '}', note_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'api_key'] = api_key

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ContactsApi#public_api_delete_contact_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
public_api_delete_contact_task(contact_id, task_id, api_key, opts = {}) click to toggle source

delete a task for a contact

@param contact_id identifier @param task_id @param api_key crelate api key @param [Hash] opts the optional parameters @return [Object]

# File lib/crelate_client/api/contacts_api.rb, line 288
def public_api_delete_contact_task(contact_id, task_id, api_key, opts = {})
  data, _status_code, _headers = public_api_delete_contact_task_with_http_info(contact_id, task_id, api_key, opts)
  return data
end
public_api_delete_contact_task_with_http_info(contact_id, task_id, api_key, opts = {}) click to toggle source

delete a task for a contact

@param contact_id identifier @param task_id @param api_key crelate api key @param [Hash] opts the optional parameters @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers

# File lib/crelate_client/api/contacts_api.rb, line 300
def public_api_delete_contact_task_with_http_info(contact_id, task_id, api_key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ContactsApi.public_api_delete_contact_task ..."
  end
  # verify the required parameter 'contact_id' is set
  if @api_client.config.client_side_validation && contact_id.nil?
    fail ArgumentError, "Missing the required parameter 'contact_id' when calling ContactsApi.public_api_delete_contact_task"
  end
  # verify the required parameter 'task_id' is set
  if @api_client.config.client_side_validation && task_id.nil?
    fail ArgumentError, "Missing the required parameter 'task_id' when calling ContactsApi.public_api_delete_contact_task"
  end
  # verify the required parameter 'api_key' is set
  if @api_client.config.client_side_validation && api_key.nil?
    fail ArgumentError, "Missing the required parameter 'api_key' when calling ContactsApi.public_api_delete_contact_task"
  end
  # resource path
  local_var_path = "/api/pub/v1/contacts/{contactId}/tasks/{taskId}".sub('{' + 'contactId' + '}', contact_id.to_s).sub('{' + 'taskId' + '}', task_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'api_key'] = api_key

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ContactsApi#public_api_delete_contact_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
public_api_delete_contact_with_http_info(contact_id, api_key, opts = {}) click to toggle source

delete a contact

@param contact_id identifier @param api_key crelate api key @param [Hash] opts the optional parameters @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers

# File lib/crelate_client/api/contacts_api.rb, line 40
def public_api_delete_contact_with_http_info(contact_id, api_key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ContactsApi.public_api_delete_contact ..."
  end
  # verify the required parameter 'contact_id' is set
  if @api_client.config.client_side_validation && contact_id.nil?
    fail ArgumentError, "Missing the required parameter 'contact_id' when calling ContactsApi.public_api_delete_contact"
  end
  # verify the required parameter 'api_key' is set
  if @api_client.config.client_side_validation && api_key.nil?
    fail ArgumentError, "Missing the required parameter 'api_key' when calling ContactsApi.public_api_delete_contact"
  end
  # resource path
  local_var_path = "/api/pub/v1/contacts/{contactId}".sub('{' + 'contactId' + '}', contact_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'api_key'] = api_key

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ContactsApi#public_api_delete_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
public_api_get_contact(contact_id, api_key, opts = {}) click to toggle source

retrieve a contact by id

@param contact_id identifier @param api_key crelate api key @param [Hash] opts the optional parameters @return [PublicApiGetContactResponse]

# File lib/crelate_client/api/contacts_api.rb, line 353
def public_api_get_contact(contact_id, api_key, opts = {})
  data, _status_code, _headers = public_api_get_contact_with_http_info(contact_id, api_key, opts)
  return data
end
public_api_get_contact_attachment(contact_id, attachment_id, api_key, opts = {}) click to toggle source

get the content of a specific attachment for a contact

@param contact_id identifier @param attachment_id attachment identifier @param api_key crelate api key @param [Hash] opts the optional parameters @return [Object]

# File lib/crelate_client/api/contacts_api.rb, line 414
def public_api_get_contact_attachment(contact_id, attachment_id, api_key, opts = {})
  data, _status_code, _headers = public_api_get_contact_attachment_with_http_info(contact_id, attachment_id, api_key, opts)
  return data
end
public_api_get_contact_attachment_with_http_info(contact_id, attachment_id, api_key, opts = {}) click to toggle source

get the content of a specific attachment for a contact

@param contact_id identifier @param attachment_id attachment identifier @param api_key crelate api key @param [Hash] opts the optional parameters @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers

# File lib/crelate_client/api/contacts_api.rb, line 426
def public_api_get_contact_attachment_with_http_info(contact_id, attachment_id, api_key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ContactsApi.public_api_get_contact_attachment ..."
  end
  # verify the required parameter 'contact_id' is set
  if @api_client.config.client_side_validation && contact_id.nil?
    fail ArgumentError, "Missing the required parameter 'contact_id' when calling ContactsApi.public_api_get_contact_attachment"
  end
  # verify the required parameter 'attachment_id' is set
  if @api_client.config.client_side_validation && attachment_id.nil?
    fail ArgumentError, "Missing the required parameter 'attachment_id' when calling ContactsApi.public_api_get_contact_attachment"
  end
  # verify the required parameter 'api_key' is set
  if @api_client.config.client_side_validation && api_key.nil?
    fail ArgumentError, "Missing the required parameter 'api_key' when calling ContactsApi.public_api_get_contact_attachment"
  end
  # resource path
  local_var_path = "/api/pub/v1/contacts/{contactId}/attachments/{attachmentId}".sub('{' + 'contactId' + '}', contact_id.to_s).sub('{' + 'attachmentId' + '}', attachment_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'api_key'] = api_key

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ContactsApi#public_api_get_contact_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
public_api_get_contact_attachments(contact_id, api_key, opts = {}) click to toggle source

get all attachment metadata for a contact

@param contact_id @param api_key crelate api key @param [Hash] opts the optional parameters @return [PublicApiAttachmentResponseList]

# File lib/crelate_client/api/contacts_api.rb, line 479
def public_api_get_contact_attachments(contact_id, api_key, opts = {})
  data, _status_code, _headers = public_api_get_contact_attachments_with_http_info(contact_id, api_key, opts)
  return data
end
public_api_get_contact_attachments_with_http_info(contact_id, api_key, opts = {}) click to toggle source

get all attachment metadata for a contact

@param contact_id @param api_key crelate api key @param [Hash] opts the optional parameters @return [Array<(PublicApiAttachmentResponseList, Fixnum, Hash)>] PublicApiAttachmentResponseList data, response status code and response headers

# File lib/crelate_client/api/contacts_api.rb, line 490
def public_api_get_contact_attachments_with_http_info(contact_id, api_key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ContactsApi.public_api_get_contact_attachments ..."
  end
  # verify the required parameter 'contact_id' is set
  if @api_client.config.client_side_validation && contact_id.nil?
    fail ArgumentError, "Missing the required parameter 'contact_id' when calling ContactsApi.public_api_get_contact_attachments"
  end
  # verify the required parameter 'api_key' is set
  if @api_client.config.client_side_validation && api_key.nil?
    fail ArgumentError, "Missing the required parameter 'api_key' when calling ContactsApi.public_api_get_contact_attachments"
  end
  # resource path
  local_var_path = "/api/pub/v1/contacts/{contactId}/attachments".sub('{' + 'contactId' + '}', contact_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'api_key'] = api_key

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'PublicApiAttachmentResponseList')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ContactsApi#public_api_get_contact_attachments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
public_api_get_contact_jobs(contact_id, api_key, opts = {}) click to toggle source

get jobs for a contact

@param contact_id contact identifier @param api_key crelate api key @param [Hash] opts the optional parameters @return [Array<PublicApiGetContactJob>]

# File lib/crelate_client/api/contacts_api.rb, line 539
def public_api_get_contact_jobs(contact_id, api_key, opts = {})
  data, _status_code, _headers = public_api_get_contact_jobs_with_http_info(contact_id, api_key, opts)
  return data
end
public_api_get_contact_jobs_with_http_info(contact_id, api_key, opts = {}) click to toggle source

get jobs for a contact

@param contact_id contact identifier @param api_key crelate api key @param [Hash] opts the optional parameters @return [Array<(Array<PublicApiGetContactJob>, Fixnum, Hash)>] Array<PublicApiGetContactJob> data, response status code and response headers

# File lib/crelate_client/api/contacts_api.rb, line 550
def public_api_get_contact_jobs_with_http_info(contact_id, api_key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ContactsApi.public_api_get_contact_jobs ..."
  end
  # verify the required parameter 'contact_id' is set
  if @api_client.config.client_side_validation && contact_id.nil?
    fail ArgumentError, "Missing the required parameter 'contact_id' when calling ContactsApi.public_api_get_contact_jobs"
  end
  # verify the required parameter 'api_key' is set
  if @api_client.config.client_side_validation && api_key.nil?
    fail ArgumentError, "Missing the required parameter 'api_key' when calling ContactsApi.public_api_get_contact_jobs"
  end
  # resource path
  local_var_path = "/api/pub/v1/contacts/{contactId}/jobs".sub('{' + 'contactId' + '}', contact_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'api_key'] = api_key

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<PublicApiGetContactJob>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ContactsApi#public_api_get_contact_jobs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
public_api_get_contact_note(contact_id, note_id, api_key, opts = {}) click to toggle source

get a note for a contact

@param contact_id identifier @param note_id @param api_key crelate api key @param [Hash] opts the optional parameters @return [PublicApiGetNoteResponse]

# File lib/crelate_client/api/contacts_api.rb, line 600
def public_api_get_contact_note(contact_id, note_id, api_key, opts = {})
  data, _status_code, _headers = public_api_get_contact_note_with_http_info(contact_id, note_id, api_key, opts)
  return data
end
public_api_get_contact_note_with_http_info(contact_id, note_id, api_key, opts = {}) click to toggle source

get a note for a contact

@param contact_id identifier @param note_id @param api_key crelate api key @param [Hash] opts the optional parameters @return [Array<(PublicApiGetNoteResponse, Fixnum, Hash)>] PublicApiGetNoteResponse data, response status code and response headers

# File lib/crelate_client/api/contacts_api.rb, line 612
def public_api_get_contact_note_with_http_info(contact_id, note_id, api_key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ContactsApi.public_api_get_contact_note ..."
  end
  # verify the required parameter 'contact_id' is set
  if @api_client.config.client_side_validation && contact_id.nil?
    fail ArgumentError, "Missing the required parameter 'contact_id' when calling ContactsApi.public_api_get_contact_note"
  end
  # verify the required parameter 'note_id' is set
  if @api_client.config.client_side_validation && note_id.nil?
    fail ArgumentError, "Missing the required parameter 'note_id' when calling ContactsApi.public_api_get_contact_note"
  end
  # verify the required parameter 'api_key' is set
  if @api_client.config.client_side_validation && api_key.nil?
    fail ArgumentError, "Missing the required parameter 'api_key' when calling ContactsApi.public_api_get_contact_note"
  end
  # resource path
  local_var_path = "/api/pub/v1/contacts/{contactId}/notes/{noteId}".sub('{' + 'contactId' + '}', contact_id.to_s).sub('{' + 'noteId' + '}', note_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'api_key'] = api_key

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'PublicApiGetNoteResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ContactsApi#public_api_get_contact_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
public_api_get_contact_placements(contact_id, api_key, opts = {}) click to toggle source

Get placements associated with a job Please Note: TimeToFill is the amount of Days it took to fill the position

@param contact_id id for job @param api_key crelate api key @param [Hash] opts the optional parameters @option opts [Integer] :skip skip number of records, default 0 @option opts [Integer] :take retrieve x amount of records, limit 500, default 50 @return [PublicApiPlacementResponseList]

# File lib/crelate_client/api/contacts_api.rb, line 667
def public_api_get_contact_placements(contact_id, api_key, opts = {})
  data, _status_code, _headers = public_api_get_contact_placements_with_http_info(contact_id, api_key, opts)
  return data
end
public_api_get_contact_placements_with_http_info(contact_id, api_key, opts = {}) click to toggle source

Get placements associated with a job Please Note: TimeToFill is the amount of Days it took to fill the position

@param contact_id id for job @param api_key crelate api key @param [Hash] opts the optional parameters @option opts [Integer] :skip skip number of records, default 0 @option opts [Integer] :take retrieve x amount of records, limit 500, default 50 @return [Array<(PublicApiPlacementResponseList, Fixnum, Hash)>] PublicApiPlacementResponseList data, response status code and response headers

# File lib/crelate_client/api/contacts_api.rb, line 680
def public_api_get_contact_placements_with_http_info(contact_id, api_key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ContactsApi.public_api_get_contact_placements ..."
  end
  # verify the required parameter 'contact_id' is set
  if @api_client.config.client_side_validation && contact_id.nil?
    fail ArgumentError, "Missing the required parameter 'contact_id' when calling ContactsApi.public_api_get_contact_placements"
  end
  # verify the required parameter 'api_key' is set
  if @api_client.config.client_side_validation && api_key.nil?
    fail ArgumentError, "Missing the required parameter 'api_key' when calling ContactsApi.public_api_get_contact_placements"
  end
  # resource path
  local_var_path = "/api/pub/v1/contacts/{contactId}/placements".sub('{' + 'contactId' + '}', contact_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'api_key'] = api_key
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
  query_params[:'take'] = opts[:'take'] if !opts[:'take'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'PublicApiPlacementResponseList')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ContactsApi#public_api_get_contact_placements\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
public_api_get_contact_task(contact_id, task_id, api_key, opts = {}) click to toggle source

get a task for a contact

@param contact_id identifier @param task_id task identifier @param api_key crelate api key @param [Hash] opts the optional parameters @return [PublicApiGetTaskResponse]

# File lib/crelate_client/api/contacts_api.rb, line 732
def public_api_get_contact_task(contact_id, task_id, api_key, opts = {})
  data, _status_code, _headers = public_api_get_contact_task_with_http_info(contact_id, task_id, api_key, opts)
  return data
end
public_api_get_contact_task_with_http_info(contact_id, task_id, api_key, opts = {}) click to toggle source

get a task for a contact

@param contact_id identifier @param task_id task identifier @param api_key crelate api key @param [Hash] opts the optional parameters @return [Array<(PublicApiGetTaskResponse, Fixnum, Hash)>] PublicApiGetTaskResponse data, response status code and response headers

# File lib/crelate_client/api/contacts_api.rb, line 744
def public_api_get_contact_task_with_http_info(contact_id, task_id, api_key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ContactsApi.public_api_get_contact_task ..."
  end
  # verify the required parameter 'contact_id' is set
  if @api_client.config.client_side_validation && contact_id.nil?
    fail ArgumentError, "Missing the required parameter 'contact_id' when calling ContactsApi.public_api_get_contact_task"
  end
  # verify the required parameter 'task_id' is set
  if @api_client.config.client_side_validation && task_id.nil?
    fail ArgumentError, "Missing the required parameter 'task_id' when calling ContactsApi.public_api_get_contact_task"
  end
  # verify the required parameter 'api_key' is set
  if @api_client.config.client_side_validation && api_key.nil?
    fail ArgumentError, "Missing the required parameter 'api_key' when calling ContactsApi.public_api_get_contact_task"
  end
  # resource path
  local_var_path = "/api/pub/v1/contacts/{contactId}/tasks/{taskId}".sub('{' + 'contactId' + '}', contact_id.to_s).sub('{' + 'taskId' + '}', task_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'api_key'] = api_key

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'PublicApiGetTaskResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ContactsApi#public_api_get_contact_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
public_api_get_contact_with_http_info(contact_id, api_key, opts = {}) click to toggle source

retrieve a contact by id

@param contact_id identifier @param api_key crelate api key @param [Hash] opts the optional parameters @return [Array<(PublicApiGetContactResponse, Fixnum, Hash)>] PublicApiGetContactResponse data, response status code and response headers

# File lib/crelate_client/api/contacts_api.rb, line 364
def public_api_get_contact_with_http_info(contact_id, api_key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ContactsApi.public_api_get_contact ..."
  end
  # verify the required parameter 'contact_id' is set
  if @api_client.config.client_side_validation && contact_id.nil?
    fail ArgumentError, "Missing the required parameter 'contact_id' when calling ContactsApi.public_api_get_contact"
  end
  # verify the required parameter 'api_key' is set
  if @api_client.config.client_side_validation && api_key.nil?
    fail ArgumentError, "Missing the required parameter 'api_key' when calling ContactsApi.public_api_get_contact"
  end
  # resource path
  local_var_path = "/api/pub/v1/contacts/{contactId}".sub('{' + 'contactId' + '}', contact_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'api_key'] = api_key

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'PublicApiGetContactResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ContactsApi#public_api_get_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
public_api_get_contacts(modified, api_key, opts = {}) click to toggle source

retrieve a list of contact updated within a certain time frame

@param modified modified within x number of minutes @param api_key crelate api key @param [Hash] opts the optional parameters @option opts [Integer] :skip skip number of records, default 0 @option opts [Integer] :take retrieve x amount of records, limit 500, default 50 @option opts [String] :type filter by record type, acceptable options are null, 0, 1, 2, 3, 4, 5, 6, 7 defaults to 0, 0 &#x3D; All contacts regardless of record type null &#x3D; contacts without a record type Standard: 1 &#x3D; Candidate, 2 &#x3D; Sales Client Contact, 4 &#x3D; Lead Contact Combined: 3 &#x3D; 1 and 2, 5 &#x3D; 1 and 4, 6 &#x3D; 2 and 4, 7 &#x3D; 1 and 2 and 4] e.g. type 7 will select only contacts who are all three types @return [PublicApiGetContactResponseList]

# File lib/crelate_client/api/contacts_api.rb, line 800
def public_api_get_contacts(modified, api_key, opts = {})
  data, _status_code, _headers = public_api_get_contacts_with_http_info(modified, api_key, opts)
  return data
end
public_api_get_contacts_by_email(email, api_key, opts = {}) click to toggle source

retrieve a list of contacts by email

@param email email address @param api_key crelate api key @param [Hash] opts the optional parameters @return [PublicApiGetContactResponseList]

# File lib/crelate_client/api/contacts_api.rb, line 867
def public_api_get_contacts_by_email(email, api_key, opts = {})
  data, _status_code, _headers = public_api_get_contacts_by_email_with_http_info(email, api_key, opts)
  return data
end
public_api_get_contacts_by_email_with_http_info(email, api_key, opts = {}) click to toggle source

retrieve a list of contacts by email

@param email email address @param api_key crelate api key @param [Hash] opts the optional parameters @return [Array<(PublicApiGetContactResponseList, Fixnum, Hash)>] PublicApiGetContactResponseList data, response status code and response headers

# File lib/crelate_client/api/contacts_api.rb, line 878
def public_api_get_contacts_by_email_with_http_info(email, api_key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ContactsApi.public_api_get_contacts_by_email ..."
  end
  # verify the required parameter 'email' is set
  if @api_client.config.client_side_validation && email.nil?
    fail ArgumentError, "Missing the required parameter 'email' when calling ContactsApi.public_api_get_contacts_by_email"
  end
  # verify the required parameter 'api_key' is set
  if @api_client.config.client_side_validation && api_key.nil?
    fail ArgumentError, "Missing the required parameter 'api_key' when calling ContactsApi.public_api_get_contacts_by_email"
  end
  # resource path
  local_var_path = "/api/pub/v1/contacts"

  # query parameters
  query_params = {}
  query_params[:'email'] = email
  query_params[:'api_key'] = api_key

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'PublicApiGetContactResponseList')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ContactsApi#public_api_get_contacts_by_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
public_api_get_contacts_with_http_info(modified, api_key, opts = {}) click to toggle source

retrieve a list of contact updated within a certain time frame

@param modified modified within x number of minutes @param api_key crelate api key @param [Hash] opts the optional parameters @option opts [Integer] :skip skip number of records, default 0 @option opts [Integer] :take retrieve x amount of records, limit 500, default 50 @option opts [String] :type filter by record type, acceptable options are null, 0, 1, 2, 3, 4, 5, 6, 7 defaults to 0, 0 &#x3D; All contacts regardless of record type null &#x3D; contacts without a record type Standard: 1 &#x3D; Candidate, 2 &#x3D; Sales Client Contact, 4 &#x3D; Lead Contact Combined: 3 &#x3D; 1 and 2, 5 &#x3D; 1 and 4, 6 &#x3D; 2 and 4, 7 &#x3D; 1 and 2 and 4] e.g. type 7 will select only contacts who are all three types @return [Array<(PublicApiGetContactResponseList, Fixnum, Hash)>] PublicApiGetContactResponseList data, response status code and response headers

# File lib/crelate_client/api/contacts_api.rb, line 814
def public_api_get_contacts_with_http_info(modified, api_key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ContactsApi.public_api_get_contacts ..."
  end
  # verify the required parameter 'modified' is set
  if @api_client.config.client_side_validation && modified.nil?
    fail ArgumentError, "Missing the required parameter 'modified' when calling ContactsApi.public_api_get_contacts"
  end
  # verify the required parameter 'api_key' is set
  if @api_client.config.client_side_validation && api_key.nil?
    fail ArgumentError, "Missing the required parameter 'api_key' when calling ContactsApi.public_api_get_contacts"
  end
  # resource path
  local_var_path = "/api/pub/v1/contacts/recent"

  # query parameters
  query_params = {}
  query_params[:'modified'] = modified
  query_params[:'api_key'] = api_key
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
  query_params[:'take'] = opts[:'take'] if !opts[:'take'].nil?
  query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'PublicApiGetContactResponseList')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ContactsApi#public_api_get_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
public_api_post_contact(api_key, request, opts = {}) click to toggle source

create a contact

@param api_key crelate api key @param request @param [Hash] opts the optional parameters @return [PublicApiIdResponse]

# File lib/crelate_client/api/contacts_api.rb, line 928
def public_api_post_contact(api_key, request, opts = {})
  data, _status_code, _headers = public_api_post_contact_with_http_info(api_key, request, opts)
  return data
end
public_api_post_contact_attachment(contact_id, api_key, request, opts = {}) click to toggle source

add an attachment to a contact

@param contact_id identifier @param api_key crelate api key @param request @param [Hash] opts the optional parameters @return [PublicApiIdResponse]

# File lib/crelate_client/api/contacts_api.rb, line 991
def public_api_post_contact_attachment(contact_id, api_key, request, opts = {})
  data, _status_code, _headers = public_api_post_contact_attachment_with_http_info(contact_id, api_key, request, opts)
  return data
end
public_api_post_contact_attachment_with_http_info(contact_id, api_key, request, opts = {}) click to toggle source

add an attachment to a contact

@param contact_id identifier @param api_key crelate api key @param request @param [Hash] opts the optional parameters @return [Array<(PublicApiIdResponse, Fixnum, Hash)>] PublicApiIdResponse data, response status code and response headers

# File lib/crelate_client/api/contacts_api.rb, line 1003
def public_api_post_contact_attachment_with_http_info(contact_id, api_key, request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ContactsApi.public_api_post_contact_attachment ..."
  end
  # verify the required parameter 'contact_id' is set
  if @api_client.config.client_side_validation && contact_id.nil?
    fail ArgumentError, "Missing the required parameter 'contact_id' when calling ContactsApi.public_api_post_contact_attachment"
  end
  # verify the required parameter 'api_key' is set
  if @api_client.config.client_side_validation && api_key.nil?
    fail ArgumentError, "Missing the required parameter 'api_key' when calling ContactsApi.public_api_post_contact_attachment"
  end
  # verify the required parameter 'request' is set
  if @api_client.config.client_side_validation && request.nil?
    fail ArgumentError, "Missing the required parameter 'request' when calling ContactsApi.public_api_post_contact_attachment"
  end
  # resource path
  local_var_path = "/api/pub/v1/contacts/{contactId}/attachments".sub('{' + 'contactId' + '}', contact_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'api_key'] = api_key

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(request)
  auth_names = []
  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 => 'PublicApiIdResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ContactsApi#public_api_post_contact_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
public_api_post_contact_job(contact_id, job_id, api_key, request, opts = {}) click to toggle source

move a contact into a job for the first time

@param contact_id identifier @param job_id identifier @param api_key crelate api key @param request @param [Hash] opts the optional parameters @return [PublicApiIdResponse]

# File lib/crelate_client/api/contacts_api.rb, line 1060
def public_api_post_contact_job(contact_id, job_id, api_key, request, opts = {})
  data, _status_code, _headers = public_api_post_contact_job_with_http_info(contact_id, job_id, api_key, request, opts)
  return data
end
public_api_post_contact_job_with_http_info(contact_id, job_id, api_key, request, opts = {}) click to toggle source

move a contact into a job for the first time

@param contact_id identifier @param job_id identifier @param api_key crelate api key @param request @param [Hash] opts the optional parameters @return [Array<(PublicApiIdResponse, Fixnum, Hash)>] PublicApiIdResponse data, response status code and response headers

# File lib/crelate_client/api/contacts_api.rb, line 1073
def public_api_post_contact_job_with_http_info(contact_id, job_id, api_key, request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ContactsApi.public_api_post_contact_job ..."
  end
  # verify the required parameter 'contact_id' is set
  if @api_client.config.client_side_validation && contact_id.nil?
    fail ArgumentError, "Missing the required parameter 'contact_id' when calling ContactsApi.public_api_post_contact_job"
  end
  # verify the required parameter 'job_id' is set
  if @api_client.config.client_side_validation && job_id.nil?
    fail ArgumentError, "Missing the required parameter 'job_id' when calling ContactsApi.public_api_post_contact_job"
  end
  # verify the required parameter 'api_key' is set
  if @api_client.config.client_side_validation && api_key.nil?
    fail ArgumentError, "Missing the required parameter 'api_key' when calling ContactsApi.public_api_post_contact_job"
  end
  # verify the required parameter 'request' is set
  if @api_client.config.client_side_validation && request.nil?
    fail ArgumentError, "Missing the required parameter 'request' when calling ContactsApi.public_api_post_contact_job"
  end
  # resource path
  local_var_path = "/api/pub/v1/contacts/{contactId}/jobs/{jobId}".sub('{' + 'contactId' + '}', contact_id.to_s).sub('{' + 'jobId' + '}', job_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'api_key'] = api_key

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(request)
  auth_names = []
  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 => 'PublicApiIdResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ContactsApi#public_api_post_contact_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
public_api_post_contact_note(contact_id, api_key, request, opts = {}) click to toggle source

create a note for a contact

@param contact_id identifier @param api_key crelate api key @param request @param [Hash] opts the optional parameters @return [PublicApiIdResponse]

# File lib/crelate_client/api/contacts_api.rb, line 1133
def public_api_post_contact_note(contact_id, api_key, request, opts = {})
  data, _status_code, _headers = public_api_post_contact_note_with_http_info(contact_id, api_key, request, opts)
  return data
end
public_api_post_contact_note_with_http_info(contact_id, api_key, request, opts = {}) click to toggle source

create a note for a contact

@param contact_id identifier @param api_key crelate api key @param request @param [Hash] opts the optional parameters @return [Array<(PublicApiIdResponse, Fixnum, Hash)>] PublicApiIdResponse data, response status code and response headers

# File lib/crelate_client/api/contacts_api.rb, line 1145
def public_api_post_contact_note_with_http_info(contact_id, api_key, request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ContactsApi.public_api_post_contact_note ..."
  end
  # verify the required parameter 'contact_id' is set
  if @api_client.config.client_side_validation && contact_id.nil?
    fail ArgumentError, "Missing the required parameter 'contact_id' when calling ContactsApi.public_api_post_contact_note"
  end
  # verify the required parameter 'api_key' is set
  if @api_client.config.client_side_validation && api_key.nil?
    fail ArgumentError, "Missing the required parameter 'api_key' when calling ContactsApi.public_api_post_contact_note"
  end
  # verify the required parameter 'request' is set
  if @api_client.config.client_side_validation && request.nil?
    fail ArgumentError, "Missing the required parameter 'request' when calling ContactsApi.public_api_post_contact_note"
  end
  # resource path
  local_var_path = "/api/pub/v1/contacts/{contactId}/notes".sub('{' + 'contactId' + '}', contact_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'api_key'] = api_key

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(request)
  auth_names = []
  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 => 'PublicApiIdResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ContactsApi#public_api_post_contact_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
public_api_post_contact_task(contact_id, api_key, request, opts = {}) click to toggle source

save a task for a contact

@param contact_id identifier @param api_key crelate api key @param request @param [Hash] opts the optional parameters @return [PublicApiIdResponse]

# File lib/crelate_client/api/contacts_api.rb, line 1201
def public_api_post_contact_task(contact_id, api_key, request, opts = {})
  data, _status_code, _headers = public_api_post_contact_task_with_http_info(contact_id, api_key, request, opts)
  return data
end
public_api_post_contact_task_with_http_info(contact_id, api_key, request, opts = {}) click to toggle source

save a task for a contact

@param contact_id identifier @param api_key crelate api key @param request @param [Hash] opts the optional parameters @return [Array<(PublicApiIdResponse, Fixnum, Hash)>] PublicApiIdResponse data, response status code and response headers

# File lib/crelate_client/api/contacts_api.rb, line 1213
def public_api_post_contact_task_with_http_info(contact_id, api_key, request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ContactsApi.public_api_post_contact_task ..."
  end
  # verify the required parameter 'contact_id' is set
  if @api_client.config.client_side_validation && contact_id.nil?
    fail ArgumentError, "Missing the required parameter 'contact_id' when calling ContactsApi.public_api_post_contact_task"
  end
  # verify the required parameter 'api_key' is set
  if @api_client.config.client_side_validation && api_key.nil?
    fail ArgumentError, "Missing the required parameter 'api_key' when calling ContactsApi.public_api_post_contact_task"
  end
  # verify the required parameter 'request' is set
  if @api_client.config.client_side_validation && request.nil?
    fail ArgumentError, "Missing the required parameter 'request' when calling ContactsApi.public_api_post_contact_task"
  end
  # resource path
  local_var_path = "/api/pub/v1/contacts/{contactId}/tasks".sub('{' + 'contactId' + '}', contact_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'api_key'] = api_key

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(request)
  auth_names = []
  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 => 'PublicApiIdResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ContactsApi#public_api_post_contact_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
public_api_post_contact_with_http_info(api_key, request, opts = {}) click to toggle source

create a contact

@param api_key crelate api key @param request @param [Hash] opts the optional parameters @return [Array<(PublicApiIdResponse, Fixnum, Hash)>] PublicApiIdResponse data, response status code and response headers

# File lib/crelate_client/api/contacts_api.rb, line 939
def public_api_post_contact_with_http_info(api_key, request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ContactsApi.public_api_post_contact ..."
  end
  # verify the required parameter 'api_key' is set
  if @api_client.config.client_side_validation && api_key.nil?
    fail ArgumentError, "Missing the required parameter 'api_key' when calling ContactsApi.public_api_post_contact"
  end
  # verify the required parameter 'request' is set
  if @api_client.config.client_side_validation && request.nil?
    fail ArgumentError, "Missing the required parameter 'request' when calling ContactsApi.public_api_post_contact"
  end
  # resource path
  local_var_path = "/api/pub/v1/contacts"

  # query parameters
  query_params = {}
  query_params[:'api_key'] = api_key

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(request)
  auth_names = []
  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 => 'PublicApiIdResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ContactsApi#public_api_post_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
public_api_put_contact(contact_id, api_key, request, opts = {}) click to toggle source

update a contact Replaces all fields. To partially update a contact, first retrieve it using the GET method, apply changes and submit to the PUT method. @param contact_id identifier @param api_key crelate api key @param request @param [Hash] opts the optional parameters @return [Object]

# File lib/crelate_client/api/contacts_api.rb, line 1269
def public_api_put_contact(contact_id, api_key, request, opts = {})
  data, _status_code, _headers = public_api_put_contact_with_http_info(contact_id, api_key, request, opts)
  return data
end
public_api_put_contact_job_status(contact_id, job_id, api_key, request, opts = {}) click to toggle source

update job stage for a contact

@param contact_id contact identifier @param job_id job identifier @param api_key crelate api key @param request @param [Hash] opts the optional parameters @return [Object]

# File lib/crelate_client/api/contacts_api.rb, line 1338
def public_api_put_contact_job_status(contact_id, job_id, api_key, request, opts = {})
  data, _status_code, _headers = public_api_put_contact_job_status_with_http_info(contact_id, job_id, api_key, request, opts)
  return data
end
public_api_put_contact_job_status_with_http_info(contact_id, job_id, api_key, request, opts = {}) click to toggle source

update job stage for a contact

@param contact_id contact identifier @param job_id job identifier @param api_key crelate api key @param request @param [Hash] opts the optional parameters @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers

# File lib/crelate_client/api/contacts_api.rb, line 1351
def public_api_put_contact_job_status_with_http_info(contact_id, job_id, api_key, request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ContactsApi.public_api_put_contact_job_status ..."
  end
  # verify the required parameter 'contact_id' is set
  if @api_client.config.client_side_validation && contact_id.nil?
    fail ArgumentError, "Missing the required parameter 'contact_id' when calling ContactsApi.public_api_put_contact_job_status"
  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 ContactsApi.public_api_put_contact_job_status"
  end
  # verify the required parameter 'api_key' is set
  if @api_client.config.client_side_validation && api_key.nil?
    fail ArgumentError, "Missing the required parameter 'api_key' when calling ContactsApi.public_api_put_contact_job_status"
  end
  # verify the required parameter 'request' is set
  if @api_client.config.client_side_validation && request.nil?
    fail ArgumentError, "Missing the required parameter 'request' when calling ContactsApi.public_api_put_contact_job_status"
  end
  # resource path
  local_var_path = "/api/pub/v1/contacts/{contactId}/jobs/{jobId}".sub('{' + 'contactId' + '}', contact_id.to_s).sub('{' + 'jobId' + '}', job_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'api_key'] = api_key

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(request)
  auth_names = []
  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 => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ContactsApi#public_api_put_contact_job_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
public_api_put_contact_note(contact_id, note_id, api_key, request, opts = {}) click to toggle source

update a note for a contact

@param contact_id identifier @param note_id @param api_key crelate api key @param request @param [Hash] opts the optional parameters @return [Object]

# File lib/crelate_client/api/contacts_api.rb, line 1412
def public_api_put_contact_note(contact_id, note_id, api_key, request, opts = {})
  data, _status_code, _headers = public_api_put_contact_note_with_http_info(contact_id, note_id, api_key, request, opts)
  return data
end
public_api_put_contact_note_with_http_info(contact_id, note_id, api_key, request, opts = {}) click to toggle source

update a note for a contact

@param contact_id identifier @param note_id @param api_key crelate api key @param request @param [Hash] opts the optional parameters @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers

# File lib/crelate_client/api/contacts_api.rb, line 1425
def public_api_put_contact_note_with_http_info(contact_id, note_id, api_key, request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ContactsApi.public_api_put_contact_note ..."
  end
  # verify the required parameter 'contact_id' is set
  if @api_client.config.client_side_validation && contact_id.nil?
    fail ArgumentError, "Missing the required parameter 'contact_id' when calling ContactsApi.public_api_put_contact_note"
  end
  # verify the required parameter 'note_id' is set
  if @api_client.config.client_side_validation && note_id.nil?
    fail ArgumentError, "Missing the required parameter 'note_id' when calling ContactsApi.public_api_put_contact_note"
  end
  # verify the required parameter 'api_key' is set
  if @api_client.config.client_side_validation && api_key.nil?
    fail ArgumentError, "Missing the required parameter 'api_key' when calling ContactsApi.public_api_put_contact_note"
  end
  # verify the required parameter 'request' is set
  if @api_client.config.client_side_validation && request.nil?
    fail ArgumentError, "Missing the required parameter 'request' when calling ContactsApi.public_api_put_contact_note"
  end
  # resource path
  local_var_path = "/api/pub/v1/contacts/{contactId}/notes/{noteId}".sub('{' + 'contactId' + '}', contact_id.to_s).sub('{' + 'noteId' + '}', note_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'api_key'] = api_key

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(request)
  auth_names = []
  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 => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ContactsApi#public_api_put_contact_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
public_api_put_contact_task(contact_id, task_id, api_key, request, opts = {}) click to toggle source

update a task for a contact

@param contact_id identifier @param task_id @param api_key crelate api key @param request @param [Hash] opts the optional parameters @return [Object]

# File lib/crelate_client/api/contacts_api.rb, line 1486
def public_api_put_contact_task(contact_id, task_id, api_key, request, opts = {})
  data, _status_code, _headers = public_api_put_contact_task_with_http_info(contact_id, task_id, api_key, request, opts)
  return data
end
public_api_put_contact_task_with_http_info(contact_id, task_id, api_key, request, opts = {}) click to toggle source

update a task for a contact

@param contact_id identifier @param task_id @param api_key crelate api key @param request @param [Hash] opts the optional parameters @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers

# File lib/crelate_client/api/contacts_api.rb, line 1499
def public_api_put_contact_task_with_http_info(contact_id, task_id, api_key, request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ContactsApi.public_api_put_contact_task ..."
  end
  # verify the required parameter 'contact_id' is set
  if @api_client.config.client_side_validation && contact_id.nil?
    fail ArgumentError, "Missing the required parameter 'contact_id' when calling ContactsApi.public_api_put_contact_task"
  end
  # verify the required parameter 'task_id' is set
  if @api_client.config.client_side_validation && task_id.nil?
    fail ArgumentError, "Missing the required parameter 'task_id' when calling ContactsApi.public_api_put_contact_task"
  end
  # verify the required parameter 'api_key' is set
  if @api_client.config.client_side_validation && api_key.nil?
    fail ArgumentError, "Missing the required parameter 'api_key' when calling ContactsApi.public_api_put_contact_task"
  end
  # verify the required parameter 'request' is set
  if @api_client.config.client_side_validation && request.nil?
    fail ArgumentError, "Missing the required parameter 'request' when calling ContactsApi.public_api_put_contact_task"
  end
  # resource path
  local_var_path = "/api/pub/v1/contacts/{contactId}/tasks/{taskId}".sub('{' + 'contactId' + '}', contact_id.to_s).sub('{' + 'taskId' + '}', task_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'api_key'] = api_key

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(request)
  auth_names = []
  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 => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ContactsApi#public_api_put_contact_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
public_api_put_contact_with_http_info(contact_id, api_key, request, opts = {}) click to toggle source

update a contact Replaces all fields. To partially update a contact, first retrieve it using the GET method, apply changes and submit to the PUT method. @param contact_id identifier @param api_key crelate api key @param request @param [Hash] opts the optional parameters @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers

# File lib/crelate_client/api/contacts_api.rb, line 1281
def public_api_put_contact_with_http_info(contact_id, api_key, request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ContactsApi.public_api_put_contact ..."
  end
  # verify the required parameter 'contact_id' is set
  if @api_client.config.client_side_validation && contact_id.nil?
    fail ArgumentError, "Missing the required parameter 'contact_id' when calling ContactsApi.public_api_put_contact"
  end
  # verify the required parameter 'api_key' is set
  if @api_client.config.client_side_validation && api_key.nil?
    fail ArgumentError, "Missing the required parameter 'api_key' when calling ContactsApi.public_api_put_contact"
  end
  # verify the required parameter 'request' is set
  if @api_client.config.client_side_validation && request.nil?
    fail ArgumentError, "Missing the required parameter 'request' when calling ContactsApi.public_api_put_contact"
  end
  # resource path
  local_var_path = "/api/pub/v1/contacts/{contactId}".sub('{' + 'contactId' + '}', contact_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'api_key'] = api_key

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(request)
  auth_names = []
  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 => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ContactsApi#public_api_put_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end