class CrelateClient::CompaniesApi

Attributes

api_client[RW]

Public Class Methods

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

Public Instance Methods

public_api_delete_account(company_id, api_key, opts = {}) click to toggle source

delete a company

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

# File lib/crelate_client/api/companies_api.rb, line 29
def public_api_delete_account(company_id, api_key, opts = {})
  data, _status_code, _headers = public_api_delete_account_with_http_info(company_id, api_key, opts)
  return data
end
public_api_delete_account_attachment(company_id, attachment_id, api_key, opts = {}) click to toggle source

delete an attachment for a company

@param company_id job 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/companies_api.rb, line 90
def public_api_delete_account_attachment(company_id, attachment_id, api_key, opts = {})
  data, _status_code, _headers = public_api_delete_account_attachment_with_http_info(company_id, attachment_id, api_key, opts)
  return data
end
public_api_delete_account_attachment_with_http_info(company_id, attachment_id, api_key, opts = {}) click to toggle source

delete an attachment for a company

@param company_id job 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/companies_api.rb, line 102
def public_api_delete_account_attachment_with_http_info(company_id, attachment_id, api_key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompaniesApi.public_api_delete_account_attachment ..."
  end
  # verify the required parameter 'company_id' is set
  if @api_client.config.client_side_validation && company_id.nil?
    fail ArgumentError, "Missing the required parameter 'company_id' when calling CompaniesApi.public_api_delete_account_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 CompaniesApi.public_api_delete_account_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 CompaniesApi.public_api_delete_account_attachment"
  end
  # resource path
  local_var_path = "/api/pub/v1/companies/{companyId}/attachments/{attachmentId}".sub('{' + 'companyId' + '}', company_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: CompaniesApi#public_api_delete_account_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
public_api_delete_account_note(company_id, note_id, api_key, opts = {}) click to toggle source

delete a note for a company

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

# File lib/crelate_client/api/companies_api.rb, line 156
def public_api_delete_account_note(company_id, note_id, api_key, opts = {})
  data, _status_code, _headers = public_api_delete_account_note_with_http_info(company_id, note_id, api_key, opts)
  return data
end
public_api_delete_account_note_with_http_info(company_id, note_id, api_key, opts = {}) click to toggle source

delete a note for a company

@param company_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/companies_api.rb, line 168
def public_api_delete_account_note_with_http_info(company_id, note_id, api_key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompaniesApi.public_api_delete_account_note ..."
  end
  # verify the required parameter 'company_id' is set
  if @api_client.config.client_side_validation && company_id.nil?
    fail ArgumentError, "Missing the required parameter 'company_id' when calling CompaniesApi.public_api_delete_account_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 CompaniesApi.public_api_delete_account_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 CompaniesApi.public_api_delete_account_note"
  end
  # resource path
  local_var_path = "/api/pub/v1/companies/{companyId}/notes/{noteId}".sub('{' + 'companyId' + '}', company_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: CompaniesApi#public_api_delete_account_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
public_api_delete_account_task(company_id, task_id, api_key, opts = {}) click to toggle source

delete a task for a company

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

# File lib/crelate_client/api/companies_api.rb, line 222
def public_api_delete_account_task(company_id, task_id, api_key, opts = {})
  data, _status_code, _headers = public_api_delete_account_task_with_http_info(company_id, task_id, api_key, opts)
  return data
end
public_api_delete_account_task_with_http_info(company_id, task_id, api_key, opts = {}) click to toggle source

delete a task for a company

@param company_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/companies_api.rb, line 234
def public_api_delete_account_task_with_http_info(company_id, task_id, api_key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompaniesApi.public_api_delete_account_task ..."
  end
  # verify the required parameter 'company_id' is set
  if @api_client.config.client_side_validation && company_id.nil?
    fail ArgumentError, "Missing the required parameter 'company_id' when calling CompaniesApi.public_api_delete_account_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 CompaniesApi.public_api_delete_account_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 CompaniesApi.public_api_delete_account_task"
  end
  # resource path
  local_var_path = "/api/pub/v1/companies/{companyId}/tasks/{taskId}".sub('{' + 'companyId' + '}', company_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: CompaniesApi#public_api_delete_account_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
public_api_delete_account_with_http_info(company_id, api_key, opts = {}) click to toggle source

delete a company

@param company_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/companies_api.rb, line 40
def public_api_delete_account_with_http_info(company_id, api_key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompaniesApi.public_api_delete_account ..."
  end
  # verify the required parameter 'company_id' is set
  if @api_client.config.client_side_validation && company_id.nil?
    fail ArgumentError, "Missing the required parameter 'company_id' when calling CompaniesApi.public_api_delete_account"
  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 CompaniesApi.public_api_delete_account"
  end
  # resource path
  local_var_path = "/api/pub/v1/companies/{companyId}".sub('{' + 'companyId' + '}', company_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: CompaniesApi#public_api_delete_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
public_api_get_account(company_id, api_key, opts = {}) click to toggle source

retrieve a company

@param company_id identifier @param api_key crelate api key @param [Hash] opts the optional parameters @return [PublicApiGetAccountResponse]

# File lib/crelate_client/api/companies_api.rb, line 287
def public_api_get_account(company_id, api_key, opts = {})
  data, _status_code, _headers = public_api_get_account_with_http_info(company_id, api_key, opts)
  return data
end
public_api_get_account_attachment(company_id, attachment_id, api_key, opts = {}) click to toggle source

get the content of a specific attachment for a company

@param company_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/companies_api.rb, line 348
def public_api_get_account_attachment(company_id, attachment_id, api_key, opts = {})
  data, _status_code, _headers = public_api_get_account_attachment_with_http_info(company_id, attachment_id, api_key, opts)
  return data
end
public_api_get_account_attachment_with_http_info(company_id, attachment_id, api_key, opts = {}) click to toggle source

get the content of a specific attachment for a company

@param company_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/companies_api.rb, line 360
def public_api_get_account_attachment_with_http_info(company_id, attachment_id, api_key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompaniesApi.public_api_get_account_attachment ..."
  end
  # verify the required parameter 'company_id' is set
  if @api_client.config.client_side_validation && company_id.nil?
    fail ArgumentError, "Missing the required parameter 'company_id' when calling CompaniesApi.public_api_get_account_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 CompaniesApi.public_api_get_account_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 CompaniesApi.public_api_get_account_attachment"
  end
  # resource path
  local_var_path = "/api/pub/v1/companies/{companyId}/attachments/{attachmentId}".sub('{' + 'companyId' + '}', company_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: CompaniesApi#public_api_get_account_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
public_api_get_account_attachments(company_id, api_key, opts = {}) click to toggle source

get all attachment metadata for a company

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

# File lib/crelate_client/api/companies_api.rb, line 413
def public_api_get_account_attachments(company_id, api_key, opts = {})
  data, _status_code, _headers = public_api_get_account_attachments_with_http_info(company_id, api_key, opts)
  return data
end
public_api_get_account_attachments_with_http_info(company_id, api_key, opts = {}) click to toggle source

get all attachment metadata for a company

@param company_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/companies_api.rb, line 424
def public_api_get_account_attachments_with_http_info(company_id, api_key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompaniesApi.public_api_get_account_attachments ..."
  end
  # verify the required parameter 'company_id' is set
  if @api_client.config.client_side_validation && company_id.nil?
    fail ArgumentError, "Missing the required parameter 'company_id' when calling CompaniesApi.public_api_get_account_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 CompaniesApi.public_api_get_account_attachments"
  end
  # resource path
  local_var_path = "/api/pub/v1/companies/{companyId}/attachments".sub('{' + 'companyId' + '}', company_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: CompaniesApi#public_api_get_account_attachments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
public_api_get_account_note(company_id, note_id, api_key, opts = {}) click to toggle source

retrieve a note for a company

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

# File lib/crelate_client/api/companies_api.rb, line 474
def public_api_get_account_note(company_id, note_id, api_key, opts = {})
  data, _status_code, _headers = public_api_get_account_note_with_http_info(company_id, note_id, api_key, opts)
  return data
end
public_api_get_account_note_with_http_info(company_id, note_id, api_key, opts = {}) click to toggle source

retrieve a note for a company

@param company_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/companies_api.rb, line 486
def public_api_get_account_note_with_http_info(company_id, note_id, api_key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompaniesApi.public_api_get_account_note ..."
  end
  # verify the required parameter 'company_id' is set
  if @api_client.config.client_side_validation && company_id.nil?
    fail ArgumentError, "Missing the required parameter 'company_id' when calling CompaniesApi.public_api_get_account_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 CompaniesApi.public_api_get_account_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 CompaniesApi.public_api_get_account_note"
  end
  # resource path
  local_var_path = "/api/pub/v1/companies/{companyId}/notes/{noteId}".sub('{' + 'companyId' + '}', company_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: CompaniesApi#public_api_get_account_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
public_api_get_account_task(company_id, task_id, api_key, opts = {}) click to toggle source

get a task for a company

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

# File lib/crelate_client/api/companies_api.rb, line 540
def public_api_get_account_task(company_id, task_id, api_key, opts = {})
  data, _status_code, _headers = public_api_get_account_task_with_http_info(company_id, task_id, api_key, opts)
  return data
end
public_api_get_account_task_with_http_info(company_id, task_id, api_key, opts = {}) click to toggle source

get a task for a company

@param company_id identifier @param task_id @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/companies_api.rb, line 552
def public_api_get_account_task_with_http_info(company_id, task_id, api_key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompaniesApi.public_api_get_account_task ..."
  end
  # verify the required parameter 'company_id' is set
  if @api_client.config.client_side_validation && company_id.nil?
    fail ArgumentError, "Missing the required parameter 'company_id' when calling CompaniesApi.public_api_get_account_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 CompaniesApi.public_api_get_account_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 CompaniesApi.public_api_get_account_task"
  end
  # resource path
  local_var_path = "/api/pub/v1/companies/{companyId}/tasks/{taskId}".sub('{' + 'companyId' + '}', company_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: CompaniesApi#public_api_get_account_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
public_api_get_account_with_http_info(company_id, api_key, opts = {}) click to toggle source

retrieve a company

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

# File lib/crelate_client/api/companies_api.rb, line 298
def public_api_get_account_with_http_info(company_id, api_key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompaniesApi.public_api_get_account ..."
  end
  # verify the required parameter 'company_id' is set
  if @api_client.config.client_side_validation && company_id.nil?
    fail ArgumentError, "Missing the required parameter 'company_id' when calling CompaniesApi.public_api_get_account"
  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 CompaniesApi.public_api_get_account"
  end
  # resource path
  local_var_path = "/api/pub/v1/companies/{companyId}".sub('{' + 'companyId' + '}', company_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 => 'PublicApiGetAccountResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompaniesApi#public_api_get_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
public_api_get_accounts(modified, api_key, opts = {}) click to toggle source

retrieve a list of companies 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; Customer, 2 &#x3D; Potential Customer, Combined: 3 &#x3D; Customer and Potential Customer e.g. type 7 will select only contacts who are all three types @return [PublicApiGetAccountResponseList]

# File lib/crelate_client/api/companies_api.rb, line 608
def public_api_get_accounts(modified, api_key, opts = {})
  data, _status_code, _headers = public_api_get_accounts_with_http_info(modified, api_key, opts)
  return data
end
public_api_get_accounts_with_http_info(modified, api_key, opts = {}) click to toggle source

retrieve a list of companies 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; Customer, 2 &#x3D; Potential Customer, Combined: 3 &#x3D; Customer and Potential Customer e.g. type 7 will select only contacts who are all three types @return [Array<(PublicApiGetAccountResponseList, Fixnum, Hash)>] PublicApiGetAccountResponseList data, response status code and response headers

# File lib/crelate_client/api/companies_api.rb, line 622
def public_api_get_accounts_with_http_info(modified, api_key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompaniesApi.public_api_get_accounts ..."
  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 CompaniesApi.public_api_get_accounts"
  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 CompaniesApi.public_api_get_accounts"
  end
  # resource path
  local_var_path = "/api/pub/v1/companies/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 => 'PublicApiGetAccountResponseList')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompaniesApi#public_api_get_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
public_api_post_account(api_key, request, opts = {}) click to toggle source

create a company

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

# File lib/crelate_client/api/companies_api.rb, line 675
def public_api_post_account(api_key, request, opts = {})
  data, _status_code, _headers = public_api_post_account_with_http_info(api_key, request, opts)
  return data
end
public_api_post_account_attachment(company_id, api_key, request, opts = {}) click to toggle source

add an attachment to a company

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

# File lib/crelate_client/api/companies_api.rb, line 738
def public_api_post_account_attachment(company_id, api_key, request, opts = {})
  data, _status_code, _headers = public_api_post_account_attachment_with_http_info(company_id, api_key, request, opts)
  return data
end
public_api_post_account_attachment_with_http_info(company_id, api_key, request, opts = {}) click to toggle source

add an attachment to a company

@param company_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/companies_api.rb, line 750
def public_api_post_account_attachment_with_http_info(company_id, api_key, request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompaniesApi.public_api_post_account_attachment ..."
  end
  # verify the required parameter 'company_id' is set
  if @api_client.config.client_side_validation && company_id.nil?
    fail ArgumentError, "Missing the required parameter 'company_id' when calling CompaniesApi.public_api_post_account_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 CompaniesApi.public_api_post_account_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 CompaniesApi.public_api_post_account_attachment"
  end
  # resource path
  local_var_path = "/api/pub/v1/companies/{companyId}/attachments".sub('{' + 'companyId' + '}', company_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: CompaniesApi#public_api_post_account_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
public_api_post_account_note(company_id, api_key, request, opts = {}) click to toggle source

create a note for a company

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

# File lib/crelate_client/api/companies_api.rb, line 806
def public_api_post_account_note(company_id, api_key, request, opts = {})
  data, _status_code, _headers = public_api_post_account_note_with_http_info(company_id, api_key, request, opts)
  return data
end
public_api_post_account_note_with_http_info(company_id, api_key, request, opts = {}) click to toggle source

create a note for a company

@param company_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/companies_api.rb, line 818
def public_api_post_account_note_with_http_info(company_id, api_key, request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompaniesApi.public_api_post_account_note ..."
  end
  # verify the required parameter 'company_id' is set
  if @api_client.config.client_side_validation && company_id.nil?
    fail ArgumentError, "Missing the required parameter 'company_id' when calling CompaniesApi.public_api_post_account_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 CompaniesApi.public_api_post_account_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 CompaniesApi.public_api_post_account_note"
  end
  # resource path
  local_var_path = "/api/pub/v1/companies/{companyId}/notes".sub('{' + 'companyId' + '}', company_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: CompaniesApi#public_api_post_account_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
public_api_post_account_task(company_id, api_key, request, opts = {}) click to toggle source

create a task for a company

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

# File lib/crelate_client/api/companies_api.rb, line 874
def public_api_post_account_task(company_id, api_key, request, opts = {})
  data, _status_code, _headers = public_api_post_account_task_with_http_info(company_id, api_key, request, opts)
  return data
end
public_api_post_account_task_with_http_info(company_id, api_key, request, opts = {}) click to toggle source

create a task for a company

@param company_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/companies_api.rb, line 886
def public_api_post_account_task_with_http_info(company_id, api_key, request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompaniesApi.public_api_post_account_task ..."
  end
  # verify the required parameter 'company_id' is set
  if @api_client.config.client_side_validation && company_id.nil?
    fail ArgumentError, "Missing the required parameter 'company_id' when calling CompaniesApi.public_api_post_account_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 CompaniesApi.public_api_post_account_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 CompaniesApi.public_api_post_account_task"
  end
  # resource path
  local_var_path = "/api/pub/v1/companies/{companyId}/tasks".sub('{' + 'companyId' + '}', company_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: CompaniesApi#public_api_post_account_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
public_api_post_account_with_http_info(api_key, request, opts = {}) click to toggle source

create a company

@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/companies_api.rb, line 686
def public_api_post_account_with_http_info(api_key, request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompaniesApi.public_api_post_account ..."
  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 CompaniesApi.public_api_post_account"
  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 CompaniesApi.public_api_post_account"
  end
  # resource path
  local_var_path = "/api/pub/v1/companies"

  # 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: CompaniesApi#public_api_post_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
public_api_put_account(company_id, api_key, request, opts = {}) click to toggle source

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

# File lib/crelate_client/api/companies_api.rb, line 942
def public_api_put_account(company_id, api_key, request, opts = {})
  data, _status_code, _headers = public_api_put_account_with_http_info(company_id, api_key, request, opts)
  return data
end
public_api_put_account_note(company_id, note_id, api_key, request, opts = {}) click to toggle source

update a note for a company

@param company_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/companies_api.rb, line 1011
def public_api_put_account_note(company_id, note_id, api_key, request, opts = {})
  data, _status_code, _headers = public_api_put_account_note_with_http_info(company_id, note_id, api_key, request, opts)
  return data
end
public_api_put_account_note_with_http_info(company_id, note_id, api_key, request, opts = {}) click to toggle source

update a note for a company

@param company_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/companies_api.rb, line 1024
def public_api_put_account_note_with_http_info(company_id, note_id, api_key, request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompaniesApi.public_api_put_account_note ..."
  end
  # verify the required parameter 'company_id' is set
  if @api_client.config.client_side_validation && company_id.nil?
    fail ArgumentError, "Missing the required parameter 'company_id' when calling CompaniesApi.public_api_put_account_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 CompaniesApi.public_api_put_account_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 CompaniesApi.public_api_put_account_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 CompaniesApi.public_api_put_account_note"
  end
  # resource path
  local_var_path = "/api/pub/v1/companies/{companyId}/notes/{noteId}".sub('{' + 'companyId' + '}', company_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: CompaniesApi#public_api_put_account_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
public_api_put_account_task(company_id, task_id, api_key, request, opts = {}) click to toggle source

update a task for a company

@param company_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/companies_api.rb, line 1085
def public_api_put_account_task(company_id, task_id, api_key, request, opts = {})
  data, _status_code, _headers = public_api_put_account_task_with_http_info(company_id, task_id, api_key, request, opts)
  return data
end
public_api_put_account_task_with_http_info(company_id, task_id, api_key, request, opts = {}) click to toggle source

update a task for a company

@param company_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/companies_api.rb, line 1098
def public_api_put_account_task_with_http_info(company_id, task_id, api_key, request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompaniesApi.public_api_put_account_task ..."
  end
  # verify the required parameter 'company_id' is set
  if @api_client.config.client_side_validation && company_id.nil?
    fail ArgumentError, "Missing the required parameter 'company_id' when calling CompaniesApi.public_api_put_account_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 CompaniesApi.public_api_put_account_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 CompaniesApi.public_api_put_account_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 CompaniesApi.public_api_put_account_task"
  end
  # resource path
  local_var_path = "/api/pub/v1/companies/{companyId}/tasks/{taskId}".sub('{' + 'companyId' + '}', company_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: CompaniesApi#public_api_put_account_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
public_api_put_account_with_http_info(company_id, api_key, request, opts = {}) click to toggle source

update a company Replaces all fields. To partially update a company, first retrieve it using the GET method, apply changes and submit to the PUT method. @param company_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/companies_api.rb, line 954
def public_api_put_account_with_http_info(company_id, api_key, request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompaniesApi.public_api_put_account ..."
  end
  # verify the required parameter 'company_id' is set
  if @api_client.config.client_side_validation && company_id.nil?
    fail ArgumentError, "Missing the required parameter 'company_id' when calling CompaniesApi.public_api_put_account"
  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 CompaniesApi.public_api_put_account"
  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 CompaniesApi.public_api_put_account"
  end
  # resource path
  local_var_path = "/api/pub/v1/companies/{companyId}".sub('{' + 'companyId' + '}', company_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: CompaniesApi#public_api_put_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end