class NucleusApi::ContactApi

Attributes

api_client[RW]

Public Class Methods

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

Public Instance Methods

create_contact_using_post(contact, opts = {}) click to toggle source

Create a contact Create a new contact, with your firm. @param contact contact @param [Hash] opts the optional parameters @return [Contact]

# File lib/nucleus_api/api/contact_api.rb, line 27
def create_contact_using_post(contact, opts = {})
  data, _status_code, _headers = create_contact_using_post_with_http_info(contact, opts)
  data
end
create_contact_using_post_with_http_info(contact, opts = {}) click to toggle source

Create a contact Create a new contact, with your firm. @param contact contact @param [Hash] opts the optional parameters @return [Array<(Contact, Fixnum, Hash)>] Contact data, response status code and response headers

# File lib/nucleus_api/api/contact_api.rb, line 37
def create_contact_using_post_with_http_info(contact, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContactApi.create_contact_using_post ...'
  end
  # verify the required parameter 'contact' is set
  if @api_client.config.client_side_validation && contact.nil?
    fail ArgumentError, "Missing the required parameter 'contact' when calling ContactApi.create_contact_using_post"
  end
  # resource path
  local_var_path = '/nucleus/v1/contact'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

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

Create a customer revenue Create a new customer revenue, with your firm. @param customer_revenue customerRevenue @param [Hash] opts the optional parameters @return [CustomerRevenue]

# File lib/nucleus_api/api/contact_api.rb, line 81
def create_customer_revenue_using_post(customer_revenue, opts = {})
  data, _status_code, _headers = create_customer_revenue_using_post_with_http_info(customer_revenue, opts)
  data
end
create_customer_revenue_using_post_with_http_info(customer_revenue, opts = {}) click to toggle source

Create a customer revenue Create a new customer revenue, with your firm. @param customer_revenue customerRevenue @param [Hash] opts the optional parameters @return [Array<(CustomerRevenue, Fixnum, Hash)>] CustomerRevenue data, response status code and response headers

# File lib/nucleus_api/api/contact_api.rb, line 91
def create_customer_revenue_using_post_with_http_info(customer_revenue, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContactApi.create_customer_revenue_using_post ...'
  end
  # verify the required parameter 'customer_revenue' is set
  if @api_client.config.client_side_validation && customer_revenue.nil?
    fail ArgumentError, "Missing the required parameter 'customer_revenue' when calling ContactApi.create_customer_revenue_using_post"
  end
  # resource path
  local_var_path = '/nucleus/v1/customer_revenue'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

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

Delete a contact Delete a contact. @param contact_id UUID contact_id @param [Hash] opts the optional parameters @return [nil]

# File lib/nucleus_api/api/contact_api.rb, line 135
def delete_contact_using_delete(contact_id, opts = {})
  delete_contact_using_delete_with_http_info(contact_id, opts)
  nil
end
delete_contact_using_delete_with_http_info(contact_id, opts = {}) click to toggle source

Delete a contact Delete a contact. @param contact_id UUID contact_id @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/nucleus_api/api/contact_api.rb, line 145
def delete_contact_using_delete_with_http_info(contact_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContactApi.delete_contact_using_delete ...'
  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 ContactApi.delete_contact_using_delete"
  end
  # resource path
  local_var_path = '/nucleus/v1/contact/{contact_id}'.sub('{' + 'contact_id' + '}', contact_id.to_s)

  # query parameters
  query_params = {}

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

  # form parameters
  form_params = {}

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

Delete a customer revenue Delete a customer revenue. @param customer_revenue_id UUID customer_revenue_id @param [Hash] opts the optional parameters @return [nil]

# File lib/nucleus_api/api/contact_api.rb, line 186
def delete_customer_revenue_using_delete(customer_revenue_id, opts = {})
  delete_customer_revenue_using_delete_with_http_info(customer_revenue_id, opts)
  nil
end
delete_customer_revenue_using_delete_with_http_info(customer_revenue_id, opts = {}) click to toggle source

Delete a customer revenue Delete a customer revenue. @param customer_revenue_id UUID customer_revenue_id @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/nucleus_api/api/contact_api.rb, line 196
def delete_customer_revenue_using_delete_with_http_info(customer_revenue_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContactApi.delete_customer_revenue_using_delete ...'
  end
  # verify the required parameter 'customer_revenue_id' is set
  if @api_client.config.client_side_validation && customer_revenue_id.nil?
    fail ArgumentError, "Missing the required parameter 'customer_revenue_id' when calling ContactApi.delete_customer_revenue_using_delete"
  end
  # resource path
  local_var_path = '/nucleus/v1/customer_revenue/{customer_revenue_id}'.sub('{' + 'customer_revenue_id' + '}', customer_revenue_id.to_s)

  # query parameters
  query_params = {}

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

  # form parameters
  form_params = {}

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

List all contact List all contact. @param [Hash] opts the optional parameters @option opts [BOOLEAN] :ascending ascending (default to false) @option opts [String] :filter filter @option opts [String] :order_by order_by (default to update_date) @option opts [Integer] :page page (default to 0) @option opts [Integer] :size size (default to 25) @return [PageContact]

# File lib/nucleus_api/api/contact_api.rb, line 241
def get_contact_all_using_get(opts = {})
  data, _status_code, _headers = get_contact_all_using_get_with_http_info(opts)
  data
end
get_contact_all_using_get_with_http_info(opts = {}) click to toggle source

List all contact List all contact. @param [Hash] opts the optional parameters @option opts [BOOLEAN] :ascending ascending @option opts [String] :filter filter @option opts [String] :order_by order_by @option opts [Integer] :page page @option opts [Integer] :size size @return [Array<(PageContact, Fixnum, Hash)>] PageContact data, response status code and response headers

# File lib/nucleus_api/api/contact_api.rb, line 255
def get_contact_all_using_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContactApi.get_contact_all_using_get ...'
  end
  # resource path
  local_var_path = '/nucleus/v1/contact'

  # query parameters
  query_params = {}
  query_params[:'ascending'] = opts[:'ascending'] if !opts[:'ascending'].nil?
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?

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

  # form parameters
  form_params = {}

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

Retrieve a contact Retrieve a contact. @param contact_id UUID contact_id @param [Hash] opts the optional parameters @return [Contact]

# File lib/nucleus_api/api/contact_api.rb, line 298
def get_contact_using_get(contact_id, opts = {})
  data, _status_code, _headers = get_contact_using_get_with_http_info(contact_id, opts)
  data
end
get_contact_using_get_with_http_info(contact_id, opts = {}) click to toggle source

Retrieve a contact Retrieve a contact. @param contact_id UUID contact_id @param [Hash] opts the optional parameters @return [Array<(Contact, Fixnum, Hash)>] Contact data, response status code and response headers

# File lib/nucleus_api/api/contact_api.rb, line 308
def get_contact_using_get_with_http_info(contact_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContactApi.get_contact_using_get ...'
  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 ContactApi.get_contact_using_get"
  end
  # resource path
  local_var_path = '/nucleus/v1/contact/{contact_id}'.sub('{' + 'contact_id' + '}', contact_id.to_s)

  # query parameters
  query_params = {}

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

  # form parameters
  form_params = {}

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

List all customer revenue List all customer revenue. @param [Hash] opts the optional parameters @option opts [BOOLEAN] :ascending ascending (default to false) @option opts [String] :currency_conversion currency_conversion @option opts [String] :filter filter @option opts [String] :order_by order_by (default to update_date) @option opts [Integer] :page page (default to 0) @option opts [Integer] :size size (default to 25) @return [PageCustomerRevenue]

# File lib/nucleus_api/api/contact_api.rb, line 355
def get_customer_revenue_all_using_get(opts = {})
  data, _status_code, _headers = get_customer_revenue_all_using_get_with_http_info(opts)
  data
end
get_customer_revenue_all_using_get_with_http_info(opts = {}) click to toggle source

List all customer revenue List all customer revenue. @param [Hash] opts the optional parameters @option opts [BOOLEAN] :ascending ascending @option opts [String] :currency_conversion currency_conversion @option opts [String] :filter filter @option opts [String] :order_by order_by @option opts [Integer] :page page @option opts [Integer] :size size @return [Array<(PageCustomerRevenue, Fixnum, Hash)>] PageCustomerRevenue data, response status code and response headers

# File lib/nucleus_api/api/contact_api.rb, line 370
def get_customer_revenue_all_using_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContactApi.get_customer_revenue_all_using_get ...'
  end
  # resource path
  local_var_path = '/nucleus/v1/customer_revenue'

  # query parameters
  query_params = {}
  query_params[:'ascending'] = opts[:'ascending'] if !opts[:'ascending'].nil?
  query_params[:'currency_conversion'] = opts[:'currency_conversion'] if !opts[:'currency_conversion'].nil?
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?

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

  # form parameters
  form_params = {}

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

Retrieve a customer revenue Retrieve a customer revenue. @param customer_revenue_id UUID customer_revenue_id @param [Hash] opts the optional parameters @option opts [String] :currency_conversion USD @return [CustomerRevenue]

# File lib/nucleus_api/api/contact_api.rb, line 415
def get_customer_revenue_using_get(customer_revenue_id, opts = {})
  data, _status_code, _headers = get_customer_revenue_using_get_with_http_info(customer_revenue_id, opts)
  data
end
get_customer_revenue_using_get_with_http_info(customer_revenue_id, opts = {}) click to toggle source

Retrieve a customer revenue Retrieve a customer revenue. @param customer_revenue_id UUID customer_revenue_id @param [Hash] opts the optional parameters @option opts [String] :currency_conversion USD @return [Array<(CustomerRevenue, Fixnum, Hash)>] CustomerRevenue data, response status code and response headers

# File lib/nucleus_api/api/contact_api.rb, line 426
def get_customer_revenue_using_get_with_http_info(customer_revenue_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContactApi.get_customer_revenue_using_get ...'
  end
  # verify the required parameter 'customer_revenue_id' is set
  if @api_client.config.client_side_validation && customer_revenue_id.nil?
    fail ArgumentError, "Missing the required parameter 'customer_revenue_id' when calling ContactApi.get_customer_revenue_using_get"
  end
  # resource path
  local_var_path = '/nucleus/v1/customer_revenue/{customer_revenue_id}'.sub('{' + 'customer_revenue_id' + '}', customer_revenue_id.to_s)

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

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

  # form parameters
  form_params = {}

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

Update a contact Update a contact. @param contact contact @param contact_id UUID contact_id @param [Hash] opts the optional parameters @return [Contact]

# File lib/nucleus_api/api/contact_api.rb, line 470
def update_contact_using_put(contact, contact_id, opts = {})
  data, _status_code, _headers = update_contact_using_put_with_http_info(contact, contact_id, opts)
  data
end
update_contact_using_put_with_http_info(contact, contact_id, opts = {}) click to toggle source

Update a contact Update a contact. @param contact contact @param contact_id UUID contact_id @param [Hash] opts the optional parameters @return [Array<(Contact, Fixnum, Hash)>] Contact data, response status code and response headers

# File lib/nucleus_api/api/contact_api.rb, line 481
def update_contact_using_put_with_http_info(contact, contact_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContactApi.update_contact_using_put ...'
  end
  # verify the required parameter 'contact' is set
  if @api_client.config.client_side_validation && contact.nil?
    fail ArgumentError, "Missing the required parameter 'contact' when calling ContactApi.update_contact_using_put"
  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 ContactApi.update_contact_using_put"
  end
  # resource path
  local_var_path = '/nucleus/v1/contact/{contact_id}'.sub('{' + 'contact_id' + '}', contact_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(contact)
  auth_names = ['oauth2']
  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 => 'Contact')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ContactApi#update_contact_using_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_customer_revenue_using_put(customer_revenue, customer_revenue_id, opts = {}) click to toggle source

Update a customer revenue Update a customer revenue. @param customer_revenue customer_revenue @param customer_revenue_id UUID customer_revenue_id @param [Hash] opts the optional parameters @return [CustomerRevenue]

# File lib/nucleus_api/api/contact_api.rb, line 530
def update_customer_revenue_using_put(customer_revenue, customer_revenue_id, opts = {})
  data, _status_code, _headers = update_customer_revenue_using_put_with_http_info(customer_revenue, customer_revenue_id, opts)
  data
end
update_customer_revenue_using_put_with_http_info(customer_revenue, customer_revenue_id, opts = {}) click to toggle source

Update a customer revenue Update a customer revenue. @param customer_revenue customer_revenue @param customer_revenue_id UUID customer_revenue_id @param [Hash] opts the optional parameters @return [Array<(CustomerRevenue, Fixnum, Hash)>] CustomerRevenue data, response status code and response headers

# File lib/nucleus_api/api/contact_api.rb, line 541
def update_customer_revenue_using_put_with_http_info(customer_revenue, customer_revenue_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContactApi.update_customer_revenue_using_put ...'
  end
  # verify the required parameter 'customer_revenue' is set
  if @api_client.config.client_side_validation && customer_revenue.nil?
    fail ArgumentError, "Missing the required parameter 'customer_revenue' when calling ContactApi.update_customer_revenue_using_put"
  end
  # verify the required parameter 'customer_revenue_id' is set
  if @api_client.config.client_side_validation && customer_revenue_id.nil?
    fail ArgumentError, "Missing the required parameter 'customer_revenue_id' when calling ContactApi.update_customer_revenue_using_put"
  end
  # resource path
  local_var_path = '/nucleus/v1/customer_revenue/{customer_revenue_id}'.sub('{' + 'customer_revenue_id' + '}', customer_revenue_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

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