class SwaggerClient::ClientApi

Attributes

api_client[RW]

Public Class Methods

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

Public Instance Methods

client_add_arrival(request, site_id, version, opts = {}) click to toggle source

Add an arrival for a client. @param request @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. (default to ) @return [AddArrivalResponse]

# File lib/swagger_client/api/client_api.rb, line 29
def client_add_arrival(request, site_id, version, opts = {})
  data, _status_code, _headers = client_add_arrival_with_http_info(request, site_id, version, opts)
  data
end
client_add_arrival_with_http_info(request, site_id, version, opts = {}) click to toggle source

Add an arrival for a client. @param request @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. @return [Array<(AddArrivalResponse, Fixnum, Hash)>] AddArrivalResponse data, response status code and response headers

# File lib/swagger_client/api/client_api.rb, line 41
def client_add_arrival_with_http_info(request, site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_add_arrival ...'
  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 ClientApi.client_add_arrival"
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_add_arrival"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_add_arrival"
  end
  # resource path
  local_var_path = '/public/v{version}/client/addarrival'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # 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 => 'AddArrivalResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_add_arrival\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
client_add_client(request, site_id, version, opts = {}) click to toggle source

Add a client to a site. The `FirstName` and `LastName` parameters are always required in this request. All other parameters are optional, but note that any of the optional parameters could be required by a particular business, depending on how the business has configured the site settings. Use after calling the `GetRequiredClientFields` endpoint to make sure you are collecting all required pieces of information. @param request @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. (default to ) @return [AddClientResponse]

# File lib/swagger_client/api/client_api.rb, line 98
def client_add_client(request, site_id, version, opts = {})
  data, _status_code, _headers = client_add_client_with_http_info(request, site_id, version, opts)
  data
end
client_add_client_with_http_info(request, site_id, version, opts = {}) click to toggle source

Add a client to a site. The &#x60;FirstName&#x60; and &#x60;LastName&#x60; parameters are always required in this request. All other parameters are optional, but note that any of the optional parameters could be required by a particular business, depending on how the business has configured the site settings. Use after calling the &#x60;GetRequiredClientFields&#x60; endpoint to make sure you are collecting all required pieces of information. @param request @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. @return [Array<(AddClientResponse, Fixnum, Hash)>] AddClientResponse data, response status code and response headers

# File lib/swagger_client/api/client_api.rb, line 111
def client_add_client_with_http_info(request, site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_add_client ...'
  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 ClientApi.client_add_client"
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_add_client"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_add_client"
  end
  # resource path
  local_var_path = '/public/v{version}/client/addclient'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # 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 => 'AddClientResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_add_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
client_add_contact_log(request, site_id, version, opts = {}) click to toggle source

Add a contact log to a client's account. @param request @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. (default to ) @return [ContactLog]

# File lib/swagger_client/api/client_api.rb, line 167
def client_add_contact_log(request, site_id, version, opts = {})
  data, _status_code, _headers = client_add_contact_log_with_http_info(request, site_id, version, opts)
  data
end
client_add_contact_log_with_http_info(request, site_id, version, opts = {}) click to toggle source

Add a contact log to a client&#39;s account. @param request @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. @return [Array<(ContactLog, Fixnum, Hash)>] ContactLog data, response status code and response headers

# File lib/swagger_client/api/client_api.rb, line 179
def client_add_contact_log_with_http_info(request, site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_add_contact_log ...'
  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 ClientApi.client_add_contact_log"
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_add_contact_log"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_add_contact_log"
  end
  # resource path
  local_var_path = '/public/v{version}/client/addcontactlog'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # 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 => 'ContactLog')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_add_contact_log\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
client_get_active_client_memberships(request_client_id, site_id, version, opts = {}) click to toggle source

Get a client's active memberships. @param request_client_id The ID of the client whose membership was requested. @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. (default to ) @option opts [Integer] :request_limit Number of results to include, defaults to 100 @option opts [Integer] :request_location_id The ID of the location where the requested membership was created. @option opts [Integer] :request_offset Page offset, defaults to 0. @return [GetActiveClientMembershipsResponse]

# File lib/swagger_client/api/client_api.rb, line 238
def client_get_active_client_memberships(request_client_id, site_id, version, opts = {})
  data, _status_code, _headers = client_get_active_client_memberships_with_http_info(request_client_id, site_id, version, opts)
  data
end
client_get_active_client_memberships_with_http_info(request_client_id, site_id, version, opts = {}) click to toggle source

Get a client&#39;s active memberships. @param request_client_id The ID of the client whose membership was requested. @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. @option opts [Integer] :request_limit Number of results to include, defaults to 100 @option opts [Integer] :request_location_id The ID of the location where the requested membership was created. @option opts [Integer] :request_offset Page offset, defaults to 0. @return [Array<(GetActiveClientMembershipsResponse, Fixnum, Hash)>] GetActiveClientMembershipsResponse data, response status code and response headers

# File lib/swagger_client/api/client_api.rb, line 253
def client_get_active_client_memberships_with_http_info(request_client_id, site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_get_active_client_memberships ...'
  end
  # verify the required parameter 'request_client_id' is set
  if @api_client.config.client_side_validation && request_client_id.nil?
    fail ArgumentError, "Missing the required parameter 'request_client_id' when calling ClientApi.client_get_active_client_memberships"
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_get_active_client_memberships"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_get_active_client_memberships"
  end
  # resource path
  local_var_path = '/public/v{version}/client/activeclientmemberships'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}
  query_params[:'request.clientId'] = request_client_id
  query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil?
  query_params[:'request.locationId'] = opts[:'request_location_id'] if !opts[:'request_location_id'].nil?
  query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # 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 => 'GetActiveClientMembershipsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_get_active_client_memberships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
client_get_client_account_balances(request_client_ids, site_id, version, opts = {}) click to toggle source

Get account balance information for one or more client(s). @param request_client_ids The list of clients IDs for which you want account balances. @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. (default to ) @option opts [DateTime] :request_balance_date The date you want a balance relative to. Default: **the current date** @option opts [Integer] :request_class_id The class ID of the event for which you want a balance. @option opts [Integer] :request_limit Number of results to include, defaults to 100 @option opts [Integer] :request_offset Page offset, defaults to 0. @return [GetClientAccountBalancesResponse]

# File lib/swagger_client/api/client_api.rb, line 315
def client_get_client_account_balances(request_client_ids, site_id, version, opts = {})
  data, _status_code, _headers = client_get_client_account_balances_with_http_info(request_client_ids, site_id, version, opts)
  data
end
client_get_client_account_balances_with_http_info(request_client_ids, site_id, version, opts = {}) click to toggle source

Get account balance information for one or more client(s). @param request_client_ids The list of clients IDs for which you want account balances. @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. @option opts [DateTime] :request_balance_date The date you want a balance relative to. Default: **the current date** @option opts [Integer] :request_class_id The class ID of the event for which you want a balance. @option opts [Integer] :request_limit Number of results to include, defaults to 100 @option opts [Integer] :request_offset Page offset, defaults to 0. @return [Array<(GetClientAccountBalancesResponse, Fixnum, Hash)>] GetClientAccountBalancesResponse data, response status code and response headers

# File lib/swagger_client/api/client_api.rb, line 331
def client_get_client_account_balances_with_http_info(request_client_ids, site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_get_client_account_balances ...'
  end
  # verify the required parameter 'request_client_ids' is set
  if @api_client.config.client_side_validation && request_client_ids.nil?
    fail ArgumentError, "Missing the required parameter 'request_client_ids' when calling ClientApi.client_get_client_account_balances"
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_get_client_account_balances"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_get_client_account_balances"
  end
  # resource path
  local_var_path = '/public/v{version}/client/clientaccountbalances'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}
  query_params[:'request.clientIds'] = @api_client.build_collection_param(request_client_ids, :multi)
  query_params[:'request.balanceDate'] = opts[:'request_balance_date'] if !opts[:'request_balance_date'].nil?
  query_params[:'request.classId'] = opts[:'request_class_id'] if !opts[:'request_class_id'].nil?
  query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil?
  query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # 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 => 'GetClientAccountBalancesResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_get_client_account_balances\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
client_get_client_contracts(request_client_id, site_id, version, opts = {}) click to toggle source

Get contracts that a client has purchased. @param request_client_id The ID of the client. @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. (default to ) @option opts [Integer] :request_client_associated_sites_offset Determines how many sites are skipped over when retrieving a client’s cross regional contracts. Used when a client ID is linked to more than ten sites in an organization. Only a maximum of ten site databases are queried when this call is made and &#x60;CrossRegionalLookup&#x60; is set to &#x60;true&#x60;. To change which sites are queried, change this offset value. Default: 0 @option opts [BOOLEAN] :request_cross_regional_lookup When &#x60;true&#x60;, indicates that the requesting client’s cross regional contracts are returned, if any.&lt;br /&gt; When &#x60;false&#x60;, indicates that cross regional contracts are not returned. @option opts [Integer] :request_limit Number of results to include, defaults to 100 @option opts [Integer] :request_offset Page offset, defaults to 0. @return [GetClientContractsResponse]

# File lib/swagger_client/api/client_api.rb, line 394
def client_get_client_contracts(request_client_id, site_id, version, opts = {})
  data, _status_code, _headers = client_get_client_contracts_with_http_info(request_client_id, site_id, version, opts)
  data
end
client_get_client_contracts_with_http_info(request_client_id, site_id, version, opts = {}) click to toggle source

Get contracts that a client has purchased. @param request_client_id The ID of the client. @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. @option opts [Integer] :request_client_associated_sites_offset Determines how many sites are skipped over when retrieving a client’s cross regional contracts. Used when a client ID is linked to more than ten sites in an organization. Only a maximum of ten site databases are queried when this call is made and &#x60;CrossRegionalLookup&#x60; is set to &#x60;true&#x60;. To change which sites are queried, change this offset value. Default: 0 @option opts [BOOLEAN] :request_cross_regional_lookup When &#x60;true&#x60;, indicates that the requesting client’s cross regional contracts are returned, if any.&lt;br /&gt; When &#x60;false&#x60;, indicates that cross regional contracts are not returned. @option opts [Integer] :request_limit Number of results to include, defaults to 100 @option opts [Integer] :request_offset Page offset, defaults to 0. @return [Array<(GetClientContractsResponse, Fixnum, Hash)>] GetClientContractsResponse data, response status code and response headers

# File lib/swagger_client/api/client_api.rb, line 410
def client_get_client_contracts_with_http_info(request_client_id, site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_get_client_contracts ...'
  end
  # verify the required parameter 'request_client_id' is set
  if @api_client.config.client_side_validation && request_client_id.nil?
    fail ArgumentError, "Missing the required parameter 'request_client_id' when calling ClientApi.client_get_client_contracts"
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_get_client_contracts"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_get_client_contracts"
  end
  # resource path
  local_var_path = '/public/v{version}/client/clientcontracts'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}
  query_params[:'request.clientId'] = request_client_id
  query_params[:'request.clientAssociatedSitesOffset'] = opts[:'request_client_associated_sites_offset'] if !opts[:'request_client_associated_sites_offset'].nil?
  query_params[:'request.crossRegionalLookup'] = opts[:'request_cross_regional_lookup'] if !opts[:'request_cross_regional_lookup'].nil?
  query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil?
  query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # 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 => 'GetClientContractsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_get_client_contracts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
client_get_client_formula_notes(site_id, version, opts = {}) click to toggle source

Get a client's formula notes. @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. (default to ) @option opts [Integer] :request_appointment_id The appointment ID of the appointment that the formula notes are related to. @option opts [String] :request_client_id The client ID of the client whose formula notes are being requested. @option opts [Integer] :request_limit Number of results to include, defaults to 100 @option opts [Integer] :request_offset Page offset, defaults to 0. @return [GetClientFormulaNotesResponse]

# File lib/swagger_client/api/client_api.rb, line 472
def client_get_client_formula_notes(site_id, version, opts = {})
  data, _status_code, _headers = client_get_client_formula_notes_with_http_info(site_id, version, opts)
  data
end
client_get_client_formula_notes_with_http_info(site_id, version, opts = {}) click to toggle source

Get a client&#39;s formula notes. @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. @option opts [Integer] :request_appointment_id The appointment ID of the appointment that the formula notes are related to. @option opts [String] :request_client_id The client ID of the client whose formula notes are being requested. @option opts [Integer] :request_limit Number of results to include, defaults to 100 @option opts [Integer] :request_offset Page offset, defaults to 0. @return [Array<(GetClientFormulaNotesResponse, Fixnum, Hash)>] GetClientFormulaNotesResponse data, response status code and response headers

# File lib/swagger_client/api/client_api.rb, line 487
def client_get_client_formula_notes_with_http_info(site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_get_client_formula_notes ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_get_client_formula_notes"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_get_client_formula_notes"
  end
  # resource path
  local_var_path = '/public/v{version}/client/clientformulanotes'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}
  query_params[:'request.appointmentId'] = opts[:'request_appointment_id'] if !opts[:'request_appointment_id'].nil?
  query_params[:'request.clientId'] = opts[:'request_client_id'] if !opts[:'request_client_id'].nil?
  query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil?
  query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # 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 => 'GetClientFormulaNotesResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_get_client_formula_notes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
client_get_client_indexes(site_id, version, opts = {}) click to toggle source

Get a site's configured client indexes and client index values. Client indexes are used to analyze client demographics. A business owner can set up different categories with sets of values which they can assign to each client. Client indexes are used in client searches, for tagging clients so that the owner can send mass emails to similar groups, and for many reports. For more information, see Client Indexes and [Client Index Values (video tutorial)](support.mindbodyonline.com/s/article/203261653-Client-indexes-and-client-index-values-video-tutorial?language=en_USclient). @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. (default to ) @option opts [BOOLEAN] :request_required_only When &#x60;true&#x60;, filters the results to only indexes that are required on creation.&lt;br /&gt; When &#x60;false&#x60; or omitted, returns all of the client indexes. @return [GetClientIndexesResponse]

# File lib/swagger_client/api/client_api.rb, line 542
def client_get_client_indexes(site_id, version, opts = {})
  data, _status_code, _headers = client_get_client_indexes_with_http_info(site_id, version, opts)
  data
end
client_get_client_indexes_with_http_info(site_id, version, opts = {}) click to toggle source

Get a site&#39;s configured client indexes and client index values. Client indexes are used to analyze client demographics. A business owner can set up different categories with sets of values which they can assign to each client. Client indexes are used in client searches, for tagging clients so that the owner can send mass emails to similar groups, and for many reports. For more information, see Client Indexes and [Client Index Values (video tutorial)](support.mindbodyonline.com/s/article/203261653-Client-indexes-and-client-index-values-video-tutorial?language=en_USclient). @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. @option opts [BOOLEAN] :request_required_only When &#x60;true&#x60;, filters the results to only indexes that are required on creation.&lt;br /&gt; When &#x60;false&#x60; or omitted, returns all of the client indexes. @return [Array<(GetClientIndexesResponse, Fixnum, Hash)>] GetClientIndexesResponse data, response status code and response headers

# File lib/swagger_client/api/client_api.rb, line 555
def client_get_client_indexes_with_http_info(site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_get_client_indexes ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_get_client_indexes"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_get_client_indexes"
  end
  # resource path
  local_var_path = '/public/v{version}/client/clientindexes'.sub('{' + 'version' + '}', version.to_s)

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

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # 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 => 'GetClientIndexesResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_get_client_indexes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
client_get_client_purchases(request_client_id, site_id, version, opts = {}) click to toggle source

Get a client's purchase history. @param request_client_id The ID of the client you are querying for purchases. @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. (default to ) @option opts [DateTime] :request_end_date Filters results to purchases made before this timestamp.&lt;br /&gt; Default: **end of today** @option opts [Integer] :request_limit Number of results to include, defaults to 100 @option opts [Integer] :request_offset Page offset, defaults to 0. @option opts [Integer] :request_sale_id Filters results to the single record associated with this ID. @option opts [DateTime] :request_start_date Filters results to purchases made on or after this timestamp.&lt;br /&gt; Default: now @return [GetClientPurchasesResponse]

# File lib/swagger_client/api/client_api.rb, line 611
def client_get_client_purchases(request_client_id, site_id, version, opts = {})
  data, _status_code, _headers = client_get_client_purchases_with_http_info(request_client_id, site_id, version, opts)
  data
end
client_get_client_purchases_with_http_info(request_client_id, site_id, version, opts = {}) click to toggle source

Get a client&#39;s purchase history. @param request_client_id The ID of the client you are querying for purchases. @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. @option opts [DateTime] :request_end_date Filters results to purchases made before this timestamp.&lt;br /&gt; Default: **end of today** @option opts [Integer] :request_limit Number of results to include, defaults to 100 @option opts [Integer] :request_offset Page offset, defaults to 0. @option opts [Integer] :request_sale_id Filters results to the single record associated with this ID. @option opts [DateTime] :request_start_date Filters results to purchases made on or after this timestamp.&lt;br /&gt; Default: now @return [Array<(GetClientPurchasesResponse, Fixnum, Hash)>] GetClientPurchasesResponse data, response status code and response headers

# File lib/swagger_client/api/client_api.rb, line 628
def client_get_client_purchases_with_http_info(request_client_id, site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_get_client_purchases ...'
  end
  # verify the required parameter 'request_client_id' is set
  if @api_client.config.client_side_validation && request_client_id.nil?
    fail ArgumentError, "Missing the required parameter 'request_client_id' when calling ClientApi.client_get_client_purchases"
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_get_client_purchases"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_get_client_purchases"
  end
  # resource path
  local_var_path = '/public/v{version}/client/clientpurchases'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}
  query_params[:'request.clientId'] = request_client_id
  query_params[:'request.endDate'] = opts[:'request_end_date'] if !opts[:'request_end_date'].nil?
  query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil?
  query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil?
  query_params[:'request.saleId'] = opts[:'request_sale_id'] if !opts[:'request_sale_id'].nil?
  query_params[:'request.startDate'] = opts[:'request_start_date'] if !opts[:'request_start_date'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # 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 => 'GetClientPurchasesResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_get_client_purchases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
client_get_client_referral_types(site_id, version, opts = {}) click to toggle source

Get a site's configured client referral types. Gets a list of referral types. Referral types are options that new clients can choose to identify how they learned about the business. Referral types are typically used for the sign-up process. @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. (default to ) @option opts [BOOLEAN] :request_include_inactive When &#x60;true&#x60;, filters the results to include subtypes and inactive referral types.&lt;br /&gt; When &#x60;false&#x60;, includes no subtypes and only active types. @return [GetClientReferralTypesResponse]

# File lib/swagger_client/api/client_api.rb, line 689
def client_get_client_referral_types(site_id, version, opts = {})
  data, _status_code, _headers = client_get_client_referral_types_with_http_info(site_id, version, opts)
  data
end
client_get_client_referral_types_with_http_info(site_id, version, opts = {}) click to toggle source

Get a site&#39;s configured client referral types. Gets a list of referral types. Referral types are options that new clients can choose to identify how they learned about the business. Referral types are typically used for the sign-up process. @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. @option opts [BOOLEAN] :request_include_inactive When &#x60;true&#x60;, filters the results to include subtypes and inactive referral types.&lt;br /&gt; When &#x60;false&#x60;, includes no subtypes and only active types. @return [Array<(GetClientReferralTypesResponse, Fixnum, Hash)>] GetClientReferralTypesResponse data, response status code and response headers

# File lib/swagger_client/api/client_api.rb, line 702
def client_get_client_referral_types_with_http_info(site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_get_client_referral_types ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_get_client_referral_types"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_get_client_referral_types"
  end
  # resource path
  local_var_path = '/public/v{version}/client/clientreferraltypes'.sub('{' + 'version' + '}', version.to_s)

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

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # 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 => 'GetClientReferralTypesResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_get_client_referral_types\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
client_get_client_services(request_client_id, site_id, version, opts = {}) click to toggle source

Get pricing options that a client has purchased. @param request_client_id The ID of the client to query. The results are a list of pricing options that the client has purchased. Note that “service” and “pricing option” are synonymous in this section of the documentation. @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. (default to ) @option opts [Integer] :request_class_id Filters results to only those pricing options that can be used to pay for this class. @option opts [Integer] :request_client_associated_sites_offset Used to retrieve a client’s pricing options from multiple sites within an organization when the client is associated with more than ten sites. To change which ten sites are searched, change this offset value. A value of 0 means that no sites are skipped and the first ten sites are returned. You can use the &#x60;CrossRegionalClientAssociations&#x60; value from &#x60;GET CrossRegionalClientAssociations&#x60; to determine how many sites the client is associated with. Note that you must always have &#x60;CrossRegionalLookup&#x60; set to &#x60;true&#x60; to use this parameter.&lt;br /&gt; Default: 0 For example, if a client is associated with 25 sites, you need to call &#x60;GetClientServices&#x60; three times, as follows: * Use &#x60;GET CrossRegionalClientAssociations&#x60; to determine how many sites a client is associated with, which tells you how many additional calls you need to make. * Either omit &#x60;ClientAssociatedSitesOffset&#x60; or set it to 0 to return the client’s services (pricing options) from sites 1-10. * Set &#x60;ClientAssociatedSitesOffset&#x60; to 10 to return the client pricing options from sites 11-20 * Set &#x60;ClientAssociatedSitesOffset&#x60; to 20 to return the client pricing options from sites 21-25 @option opts [BOOLEAN] :request_cross_regional_lookup Used to retrieve a client’s pricing options from multiple sites within an organization. When included and set to &#x60;true&#x60;, it searches a maximum of ten sites with which this client is associated. When a client is associated with more than ten sites, use &#x60;ClientAssociatedSitesOffset&#x60; as many times as needed to search the additional sites with which the client is associated. You can use the &#x60;CrossRegionalClientAssociations&#x60; value from &#x60;GET CrossRegionalClientAssociations&#x60; to determine how many sites the client is associated with. Note that a &#x60;SiteID&#x60; is returned and populated in the &#x60;ClientServices&#x60; response when &#x60;CrossRegionalLookup&#x60; is set to &#x60;true&#x60;. Default: false @option opts [DateTime] :request_end_date Filters results to pricing options that are valid on or before this date. @option opts [Integer] :request_limit Number of results to include, defaults to 100 @option opts [Array<Integer>] :request_location_ids Filters results to pricing options that can be used at the listed location IDs. @option opts [Integer] :request_offset Page offset, defaults to 0. @option opts [Array<Integer>] :request_program_ids Filters results to pricing options that belong to one of the given program IDs. @option opts [Integer] :request_session_type_id Filters results to pricing options that will pay for the given session type ID. Use this to find pricing options that will pay for a specific appointment type. @option opts [BOOLEAN] :request_show_active_only When &#x60;true&#x60;, includes active services only. Default: false @option opts [DateTime] :request_start_date Filters results to pricing options that are valid on or after this date. @option opts [Integer] :request_visit_count A filter on the minimum number of visits a service can pay for. @return [GetClientServicesResponse]

# File lib/swagger_client/api/client_api.rb, line 765
def client_get_client_services(request_client_id, site_id, version, opts = {})
  data, _status_code, _headers = client_get_client_services_with_http_info(request_client_id, site_id, version, opts)
  data
end
client_get_client_services_with_http_info(request_client_id, site_id, version, opts = {}) click to toggle source

Get pricing options that a client has purchased. @param request_client_id The ID of the client to query. The results are a list of pricing options that the client has purchased. Note that “service” and “pricing option” are synonymous in this section of the documentation. @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. @option opts [Integer] :request_class_id Filters results to only those pricing options that can be used to pay for this class. @option opts [Integer] :request_client_associated_sites_offset Used to retrieve a client’s pricing options from multiple sites within an organization when the client is associated with more than ten sites. To change which ten sites are searched, change this offset value. A value of 0 means that no sites are skipped and the first ten sites are returned. You can use the &#x60;CrossRegionalClientAssociations&#x60; value from &#x60;GET CrossRegionalClientAssociations&#x60; to determine how many sites the client is associated with. Note that you must always have &#x60;CrossRegionalLookup&#x60; set to &#x60;true&#x60; to use this parameter.&lt;br /&gt; Default: 0 For example, if a client is associated with 25 sites, you need to call &#x60;GetClientServices&#x60; three times, as follows: * Use &#x60;GET CrossRegionalClientAssociations&#x60; to determine how many sites a client is associated with, which tells you how many additional calls you need to make. * Either omit &#x60;ClientAssociatedSitesOffset&#x60; or set it to 0 to return the client’s services (pricing options) from sites 1-10. * Set &#x60;ClientAssociatedSitesOffset&#x60; to 10 to return the client pricing options from sites 11-20 * Set &#x60;ClientAssociatedSitesOffset&#x60; to 20 to return the client pricing options from sites 21-25 @option opts [BOOLEAN] :request_cross_regional_lookup Used to retrieve a client’s pricing options from multiple sites within an organization. When included and set to &#x60;true&#x60;, it searches a maximum of ten sites with which this client is associated. When a client is associated with more than ten sites, use &#x60;ClientAssociatedSitesOffset&#x60; as many times as needed to search the additional sites with which the client is associated. You can use the &#x60;CrossRegionalClientAssociations&#x60; value from &#x60;GET CrossRegionalClientAssociations&#x60; to determine how many sites the client is associated with. Note that a &#x60;SiteID&#x60; is returned and populated in the &#x60;ClientServices&#x60; response when &#x60;CrossRegionalLookup&#x60; is set to &#x60;true&#x60;. Default: false @option opts [DateTime] :request_end_date Filters results to pricing options that are valid on or before this date. @option opts [Integer] :request_limit Number of results to include, defaults to 100 @option opts [Array<Integer>] :request_location_ids Filters results to pricing options that can be used at the listed location IDs. @option opts [Integer] :request_offset Page offset, defaults to 0. @option opts [Array<Integer>] :request_program_ids Filters results to pricing options that belong to one of the given program IDs. @option opts [Integer] :request_session_type_id Filters results to pricing options that will pay for the given session type ID. Use this to find pricing options that will pay for a specific appointment type. @option opts [BOOLEAN] :request_show_active_only When &#x60;true&#x60;, includes active services only. Default: false @option opts [DateTime] :request_start_date Filters results to pricing options that are valid on or after this date. @option opts [Integer] :request_visit_count A filter on the minimum number of visits a service can pay for. @return [Array<(GetClientServicesResponse, Fixnum, Hash)>] GetClientServicesResponse data, response status code and response headers

# File lib/swagger_client/api/client_api.rb, line 789
def client_get_client_services_with_http_info(request_client_id, site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_get_client_services ...'
  end
  # verify the required parameter 'request_client_id' is set
  if @api_client.config.client_side_validation && request_client_id.nil?
    fail ArgumentError, "Missing the required parameter 'request_client_id' when calling ClientApi.client_get_client_services"
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_get_client_services"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_get_client_services"
  end
  # resource path
  local_var_path = '/public/v{version}/client/clientservices'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}
  query_params[:'request.clientId'] = request_client_id
  query_params[:'request.classId'] = opts[:'request_class_id'] if !opts[:'request_class_id'].nil?
  query_params[:'request.clientAssociatedSitesOffset'] = opts[:'request_client_associated_sites_offset'] if !opts[:'request_client_associated_sites_offset'].nil?
  query_params[:'request.crossRegionalLookup'] = opts[:'request_cross_regional_lookup'] if !opts[:'request_cross_regional_lookup'].nil?
  query_params[:'request.endDate'] = opts[:'request_end_date'] if !opts[:'request_end_date'].nil?
  query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil?
  query_params[:'request.locationIds'] = @api_client.build_collection_param(opts[:'request_location_ids'], :multi) if !opts[:'request_location_ids'].nil?
  query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil?
  query_params[:'request.programIds'] = @api_client.build_collection_param(opts[:'request_program_ids'], :multi) if !opts[:'request_program_ids'].nil?
  query_params[:'request.sessionTypeId'] = opts[:'request_session_type_id'] if !opts[:'request_session_type_id'].nil?
  query_params[:'request.showActiveOnly'] = opts[:'request_show_active_only'] if !opts[:'request_show_active_only'].nil?
  query_params[:'request.startDate'] = opts[:'request_start_date'] if !opts[:'request_start_date'].nil?
  query_params[:'request.visitCount'] = opts[:'request_visit_count'] if !opts[:'request_visit_count'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # 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 => 'GetClientServicesResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_get_client_services\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
client_get_client_visits(request_client_id, site_id, version, opts = {}) click to toggle source

Get a client's visit history. @param request_client_id The ID of the requested client. @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. (default to ) @option opts [Integer] :request_client_associated_sites_offset The number of sites to skip when returning the site associated with a client. @option opts [BOOLEAN] :request_cross_regional_lookup When &#x60;true&#x60;, indicates that past and scheduled client visits across all sites in the region are returned.&lt;br /&gt; When &#x60;false&#x60;, indicates that only visits at the current site are returned. @option opts [DateTime] :request_end_date The date past which class visits are not returned. Default: **today’s date** @option opts [Integer] :request_limit Number of results to include, defaults to 100 @option opts [Integer] :request_offset Page offset, defaults to 0. @option opts [DateTime] :request_start_date The date before which class visits are not returned. Default: **the end date** @option opts [BOOLEAN] :request_unpaids_only When &#x60;true&#x60;, indicates that only visits that have not been paid for are returned.&lt;br /&gt; When &#x60;false&#x60;, indicates that all visits are returned, regardless of whether they have been paid for.&lt;br /&gt; Default: false @return [GetClientVisitsResponse]

# File lib/swagger_client/api/client_api.rb, line 863
def client_get_client_visits(request_client_id, site_id, version, opts = {})
  data, _status_code, _headers = client_get_client_visits_with_http_info(request_client_id, site_id, version, opts)
  data
end
client_get_client_visits_with_http_info(request_client_id, site_id, version, opts = {}) click to toggle source

Get a client&#39;s visit history. @param request_client_id The ID of the requested client. @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. @option opts [Integer] :request_client_associated_sites_offset The number of sites to skip when returning the site associated with a client. @option opts [BOOLEAN] :request_cross_regional_lookup When &#x60;true&#x60;, indicates that past and scheduled client visits across all sites in the region are returned.&lt;br /&gt; When &#x60;false&#x60;, indicates that only visits at the current site are returned. @option opts [DateTime] :request_end_date The date past which class visits are not returned. Default: **today’s date** @option opts [Integer] :request_limit Number of results to include, defaults to 100 @option opts [Integer] :request_offset Page offset, defaults to 0. @option opts [DateTime] :request_start_date The date before which class visits are not returned. Default: **the end date** @option opts [BOOLEAN] :request_unpaids_only When &#x60;true&#x60;, indicates that only visits that have not been paid for are returned.&lt;br /&gt; When &#x60;false&#x60;, indicates that all visits are returned, regardless of whether they have been paid for.&lt;br /&gt; Default: false @return [Array<(GetClientVisitsResponse, Fixnum, Hash)>] GetClientVisitsResponse data, response status code and response headers

# File lib/swagger_client/api/client_api.rb, line 882
def client_get_client_visits_with_http_info(request_client_id, site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_get_client_visits ...'
  end
  # verify the required parameter 'request_client_id' is set
  if @api_client.config.client_side_validation && request_client_id.nil?
    fail ArgumentError, "Missing the required parameter 'request_client_id' when calling ClientApi.client_get_client_visits"
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_get_client_visits"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_get_client_visits"
  end
  # resource path
  local_var_path = '/public/v{version}/client/clientvisits'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}
  query_params[:'request.clientId'] = request_client_id
  query_params[:'request.clientAssociatedSitesOffset'] = opts[:'request_client_associated_sites_offset'] if !opts[:'request_client_associated_sites_offset'].nil?
  query_params[:'request.crossRegionalLookup'] = opts[:'request_cross_regional_lookup'] if !opts[:'request_cross_regional_lookup'].nil?
  query_params[:'request.endDate'] = opts[:'request_end_date'] if !opts[:'request_end_date'].nil?
  query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil?
  query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil?
  query_params[:'request.startDate'] = opts[:'request_start_date'] if !opts[:'request_start_date'].nil?
  query_params[:'request.unpaidsOnly'] = opts[:'request_unpaids_only'] if !opts[:'request_unpaids_only'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # 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 => 'GetClientVisitsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_get_client_visits\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
client_get_clients(site_id, version, opts = {}) click to toggle source

Get clients. @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. (default to ) @option opts [Array<String>] :request_client_i_ds The requested client IDs. Default: **all IDs** that the authenticated user’s access level allows. @option opts [BOOLEAN] :request_is_prospect When &#x60;true&#x60;, filters the results to include only those clients marked as prospects for the business.&lt;br /&gt; When &#x60;false&#x60;, indicates that only those clients who are not marked prospects should be returned. @option opts [DateTime] :request_last_modified_date Filters the results to include only the clients that have been modified on or after this date. @option opts [Integer] :request_limit Number of results to include, defaults to 100 @option opts [Integer] :request_offset Page offset, defaults to 0. @option opts [String] :request_search_text Text to use in the search. Can include FirstName, LastName, and Email. Note that user credentials must be provided. @return [GetClientsResponse]

# File lib/swagger_client/api/client_api.rb, line 949
def client_get_clients(site_id, version, opts = {})
  data, _status_code, _headers = client_get_clients_with_http_info(site_id, version, opts)
  data
end
client_get_clients_with_http_info(site_id, version, opts = {}) click to toggle source

Get clients. @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. @option opts [Array<String>] :request_client_i_ds The requested client IDs. Default: **all IDs** that the authenticated user’s access level allows. @option opts [BOOLEAN] :request_is_prospect When &#x60;true&#x60;, filters the results to include only those clients marked as prospects for the business.&lt;br /&gt; When &#x60;false&#x60;, indicates that only those clients who are not marked prospects should be returned. @option opts [DateTime] :request_last_modified_date Filters the results to include only the clients that have been modified on or after this date. @option opts [Integer] :request_limit Number of results to include, defaults to 100 @option opts [Integer] :request_offset Page offset, defaults to 0. @option opts [String] :request_search_text Text to use in the search. Can include FirstName, LastName, and Email. Note that user credentials must be provided. @return [Array<(GetClientsResponse, Fixnum, Hash)>] GetClientsResponse data, response status code and response headers

# File lib/swagger_client/api/client_api.rb, line 966
def client_get_clients_with_http_info(site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_get_clients ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_get_clients"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_get_clients"
  end
  # resource path
  local_var_path = '/public/v{version}/client/clients'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}
  query_params[:'request.clientIDs'] = @api_client.build_collection_param(opts[:'request_client_i_ds'], :multi) if !opts[:'request_client_i_ds'].nil?
  query_params[:'request.isProspect'] = opts[:'request_is_prospect'] if !opts[:'request_is_prospect'].nil?
  query_params[:'request.lastModifiedDate'] = opts[:'request_last_modified_date'] if !opts[:'request_last_modified_date'].nil?
  query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil?
  query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil?
  query_params[:'request.searchText'] = opts[:'request_search_text'] if !opts[:'request_search_text'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # 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 => 'GetClientsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_get_clients\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
client_get_contact_logs(request_client_id, site_id, version, opts = {}) click to toggle source

Get contact logs on a client's account. This endpoint contains a variety of filters that can return not just all contact logs, but also system-generated contact logs, contact logs assigned to specific staff members, and contact logs of specific types or subtypes. @param request_client_id The ID of the client whose contact logs are being requested. @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. (default to ) @option opts [DateTime] :request_end_date Filters the results to contact logs created before this date.&lt;br /&gt; Default: **the start date** @option opts [Integer] :request_limit Number of results to include, defaults to 100 @option opts [Integer] :request_offset Page offset, defaults to 0. @option opts [BOOLEAN] :request_show_system_generated When &#x60;true&#x60;, system-generated contact logs are returned in the results.&lt;br /&gt; Default: false @option opts [Array<Integer>] :request_staff_ids Filters the results to return contact logs assigned to one or more staff IDs. @option opts [DateTime] :request_start_date Filters the results to contact logs created on or after this date.&lt;br /&gt; Default: **the current date** @option opts [Array<Integer>] :request_subtype_ids Filters the results to contact logs assigned one or more of these subtype IDs. @option opts [Array<Integer>] :request_type_ids Filters the results to contact logs assigned one or more of these type IDs. @return [GetContactLogsResponse]

# File lib/swagger_client/api/client_api.rb, line 1031
def client_get_contact_logs(request_client_id, site_id, version, opts = {})
  data, _status_code, _headers = client_get_contact_logs_with_http_info(request_client_id, site_id, version, opts)
  data
end
client_get_contact_logs_with_http_info(request_client_id, site_id, version, opts = {}) click to toggle source

Get contact logs on a client&#39;s account. This endpoint contains a variety of filters that can return not just all contact logs, but also system-generated contact logs, contact logs assigned to specific staff members, and contact logs of specific types or subtypes. @param request_client_id The ID of the client whose contact logs are being requested. @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. @option opts [DateTime] :request_end_date Filters the results to contact logs created before this date.&lt;br /&gt; Default: **the start date** @option opts [Integer] :request_limit Number of results to include, defaults to 100 @option opts [Integer] :request_offset Page offset, defaults to 0. @option opts [BOOLEAN] :request_show_system_generated When &#x60;true&#x60;, system-generated contact logs are returned in the results.&lt;br /&gt; Default: false @option opts [Array<Integer>] :request_staff_ids Filters the results to return contact logs assigned to one or more staff IDs. @option opts [DateTime] :request_start_date Filters the results to contact logs created on or after this date.&lt;br /&gt; Default: **the current date** @option opts [Array<Integer>] :request_subtype_ids Filters the results to contact logs assigned one or more of these subtype IDs. @option opts [Array<Integer>] :request_type_ids Filters the results to contact logs assigned one or more of these type IDs. @return [Array<(GetContactLogsResponse, Fixnum, Hash)>] GetContactLogsResponse data, response status code and response headers

# File lib/swagger_client/api/client_api.rb, line 1052
def client_get_contact_logs_with_http_info(request_client_id, site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_get_contact_logs ...'
  end
  # verify the required parameter 'request_client_id' is set
  if @api_client.config.client_side_validation && request_client_id.nil?
    fail ArgumentError, "Missing the required parameter 'request_client_id' when calling ClientApi.client_get_contact_logs"
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_get_contact_logs"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_get_contact_logs"
  end
  # resource path
  local_var_path = '/public/v{version}/client/contactlogs'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}
  query_params[:'request.clientId'] = request_client_id
  query_params[:'request.endDate'] = opts[:'request_end_date'] if !opts[:'request_end_date'].nil?
  query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil?
  query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil?
  query_params[:'request.showSystemGenerated'] = opts[:'request_show_system_generated'] if !opts[:'request_show_system_generated'].nil?
  query_params[:'request.staffIds'] = @api_client.build_collection_param(opts[:'request_staff_ids'], :multi) if !opts[:'request_staff_ids'].nil?
  query_params[:'request.startDate'] = opts[:'request_start_date'] if !opts[:'request_start_date'].nil?
  query_params[:'request.subtypeIds'] = @api_client.build_collection_param(opts[:'request_subtype_ids'], :multi) if !opts[:'request_subtype_ids'].nil?
  query_params[:'request.typeIds'] = @api_client.build_collection_param(opts[:'request_type_ids'], :multi) if !opts[:'request_type_ids'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # 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 => 'GetContactLogsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_get_contact_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
client_get_cross_regional_client_associations(site_id, version, opts = {}) click to toggle source

Get a client's cross regional site associations. Returns a list of sites that a particular client ID (also referred to as an RSSID) or a client email address is associated with in a cross-regional organization. Either the `ClientID` or `Email` parameter is required. If both are provided, the `ClientID` is used. Use this endpoint to retrieve information for other Public API endpoints, about the same client at multiple sites within an organization. To use this endpoint, your developer account must have been granted permission to the site’s entire organization. Note that this endpoint does not work on the Developer Sandbox site, as it is not set up for cross-regional use cases. @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. (default to ) @option opts [String] :request_client_id Looks up the cross regional associations by the client’s ID. Either &#x60;ClientId&#x60; or &#x60;Email&#x60; must be provided. If both are provided, the &#x60;ClientId&#x60; is used by default. @option opts [String] :request_email Looks up the cross regional associations by the client’s email address. Either &#x60;ClientId&#x60; or &#x60;Email&#x60; must be provided. If both are provided, the &#x60;ClientId&#x60; is used by default. @option opts [Integer] :request_limit Number of results to include, defaults to 100 @option opts [Integer] :request_offset Page offset, defaults to 0. @return [GetCrossRegionalClientAssociationsResponse]

# File lib/swagger_client/api/client_api.rb, line 1119
def client_get_cross_regional_client_associations(site_id, version, opts = {})
  data, _status_code, _headers = client_get_cross_regional_client_associations_with_http_info(site_id, version, opts)
  data
end
client_get_cross_regional_client_associations_with_http_info(site_id, version, opts = {}) click to toggle source

Get a client&#39;s cross regional site associations. Returns a list of sites that a particular client ID (also referred to as an RSSID) or a client email address is associated with in a cross-regional organization. Either the &#x60;ClientID&#x60; or &#x60;Email&#x60; parameter is required. If both are provided, the &#x60;ClientID&#x60; is used. Use this endpoint to retrieve information for other Public API endpoints, about the same client at multiple sites within an organization. To use this endpoint, your developer account must have been granted permission to the site’s entire organization. Note that this endpoint does not work on the Developer Sandbox site, as it is not set up for cross-regional use cases. @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. @option opts [String] :request_client_id Looks up the cross regional associations by the client’s ID. Either &#x60;ClientId&#x60; or &#x60;Email&#x60; must be provided. If both are provided, the &#x60;ClientId&#x60; is used by default. @option opts [String] :request_email Looks up the cross regional associations by the client’s email address. Either &#x60;ClientId&#x60; or &#x60;Email&#x60; must be provided. If both are provided, the &#x60;ClientId&#x60; is used by default. @option opts [Integer] :request_limit Number of results to include, defaults to 100 @option opts [Integer] :request_offset Page offset, defaults to 0. @return [Array<(GetCrossRegionalClientAssociationsResponse, Fixnum, Hash)>] GetCrossRegionalClientAssociationsResponse data, response status code and response headers

# File lib/swagger_client/api/client_api.rb, line 1135
def client_get_cross_regional_client_associations_with_http_info(site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_get_cross_regional_client_associations ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_get_cross_regional_client_associations"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_get_cross_regional_client_associations"
  end
  # resource path
  local_var_path = '/public/v{version}/client/crossregionalclientassociations'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}
  query_params[:'request.clientId'] = opts[:'request_client_id'] if !opts[:'request_client_id'].nil?
  query_params[:'request.email'] = opts[:'request_email'] if !opts[:'request_email'].nil?
  query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil?
  query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # 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 => 'GetCrossRegionalClientAssociationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_get_cross_regional_client_associations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
client_get_custom_client_fields(site_id, version, opts = {}) click to toggle source

Get a site's configured custom client fields. @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. (default to ) @option opts [Integer] :request_limit Number of results to include, defaults to 100 @option opts [Integer] :request_offset Page offset, defaults to 0. @return [GetCustomClientFieldsResponse]

# File lib/swagger_client/api/client_api.rb, line 1190
def client_get_custom_client_fields(site_id, version, opts = {})
  data, _status_code, _headers = client_get_custom_client_fields_with_http_info(site_id, version, opts)
  data
end
client_get_custom_client_fields_with_http_info(site_id, version, opts = {}) click to toggle source

Get a site&#39;s configured custom client fields. @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. @option opts [Integer] :request_limit Number of results to include, defaults to 100 @option opts [Integer] :request_offset Page offset, defaults to 0. @return [Array<(GetCustomClientFieldsResponse, Fixnum, Hash)>] GetCustomClientFieldsResponse data, response status code and response headers

# File lib/swagger_client/api/client_api.rb, line 1203
def client_get_custom_client_fields_with_http_info(site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_get_custom_client_fields ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_get_custom_client_fields"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_get_custom_client_fields"
  end
  # resource path
  local_var_path = '/public/v{version}/client/customclientfields'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}
  query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil?
  query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # 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 => 'GetCustomClientFieldsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_get_custom_client_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
client_get_required_client_fields(site_id, version, opts = {}) click to toggle source

Get client required fields for a site. Gets the list of fields that a new client has to fill out in business mode, specifically for the sign-up process. `AddClient` and `UpdateClient` validate against these fields. This endpoint has no query parameters. @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. (default to ) @return [GetRequiredClientFieldsResponse]

# File lib/swagger_client/api/client_api.rb, line 1255
def client_get_required_client_fields(site_id, version, opts = {})
  data, _status_code, _headers = client_get_required_client_fields_with_http_info(site_id, version, opts)
  data
end
client_get_required_client_fields_with_http_info(site_id, version, opts = {}) click to toggle source

Get client required fields for a site. Gets the list of fields that a new client has to fill out in business mode, specifically for the sign-up process. &#x60;AddClient&#x60; and &#x60;UpdateClient&#x60; validate against these fields. This endpoint has no query parameters. @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. @return [Array<(GetRequiredClientFieldsResponse, Fixnum, Hash)>] GetRequiredClientFieldsResponse data, response status code and response headers

# File lib/swagger_client/api/client_api.rb, line 1267
def client_get_required_client_fields_with_http_info(site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_get_required_client_fields ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_get_required_client_fields"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_get_required_client_fields"
  end
  # resource path
  local_var_path = '/public/v{version}/client/requiredclientfields'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # 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 => 'GetRequiredClientFieldsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_get_required_client_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
client_send_password_reset_email(request, site_id, version, opts = {}) click to toggle source

Send a password reset email to a client. @param request @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. (default to ) @return [Object]

# File lib/swagger_client/api/client_api.rb, line 1317
def client_send_password_reset_email(request, site_id, version, opts = {})
  data, _status_code, _headers = client_send_password_reset_email_with_http_info(request, site_id, version, opts)
  data
end
client_send_password_reset_email_with_http_info(request, site_id, version, opts = {}) click to toggle source

Send a password reset email to a client. @param request @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers

# File lib/swagger_client/api/client_api.rb, line 1329
def client_send_password_reset_email_with_http_info(request, site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_send_password_reset_email ...'
  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 ClientApi.client_send_password_reset_email"
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_send_password_reset_email"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_send_password_reset_email"
  end
  # resource path
  local_var_path = '/public/v{version}/client/sendpasswordresetemail'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # 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 => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_send_password_reset_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
client_update_client(request, site_id, version, opts = {}) click to toggle source

Update a client at a site. Updates an existing client for a specific subscriber. Use this endpoint as follows: * If you need to update the `ReferredBy` parameter, use this endpoint after calling `GET ClientReferralTypes`. * When updating a client’s home location, use after calling `GET Locations`. * If you are updating a client’s stored credit card, use after calling `GET AcceptedCardTypes` so that you can make sure the card is a type that is accepted at the subscriber. If this endpoint is used on a cross-regional site, passing in a client’s RSSID and email address creates a cross-regional link. This means that the client is created in cross-regional sites where the client does not exist and `GET CrossRegionalClientAssociations` returns all appropriate cross-regional sites. When `CrossRegionalUpdate` is omitted or set to `true`, the client’s updated information is propagated to all of the region’s sites. If `CrossRegionalUpdate` is set to `false`, only the local client is updated. Note that the following items cannot be updated for a cross-regional client: * `ClientIndexes` * `ClientRelationships` * `CustomClientFields` * `SalesReps` * `SendAccountEmails` * `SendAccountTexts` * `SendPromotionalEmails` * `SendPromotionalTexts` * `SendScheduleEmails` * `SendScheduleTexts` @param request @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. (default to ) @return [UpdateClientResponse]

# File lib/swagger_client/api/client_api.rb, line 1386
def client_update_client(request, site_id, version, opts = {})
  data, _status_code, _headers = client_update_client_with_http_info(request, site_id, version, opts)
  data
end
client_update_client_service(request, site_id, version, opts = {}) click to toggle source

Update a client's purchase pricing option. Updates the active date and/or expiration date of a client pricing option. This request requires staff user credentials. If the active date is modified, the expiration date is also modified accordingly. If the expiration date is modified, the active date is unchanged. @param request @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. (default to ) @return [UpdateClientServiceResponse]

# File lib/swagger_client/api/client_api.rb, line 1456
def client_update_client_service(request, site_id, version, opts = {})
  data, _status_code, _headers = client_update_client_service_with_http_info(request, site_id, version, opts)
  data
end
client_update_client_service_with_http_info(request, site_id, version, opts = {}) click to toggle source

Update a client&#39;s purchase pricing option. Updates the active date and/or expiration date of a client pricing option. This request requires staff user credentials. If the active date is modified, the expiration date is also modified accordingly. If the expiration date is modified, the active date is unchanged. @param request @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. @return [Array<(UpdateClientServiceResponse, Fixnum, Hash)>] UpdateClientServiceResponse data, response status code and response headers

# File lib/swagger_client/api/client_api.rb, line 1469
def client_update_client_service_with_http_info(request, site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_update_client_service ...'
  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 ClientApi.client_update_client_service"
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_update_client_service"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_update_client_service"
  end
  # resource path
  local_var_path = '/public/v{version}/client/updateclientservice'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # 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 => 'UpdateClientServiceResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_update_client_service\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
client_update_client_visit(request, site_id, version, opts = {}) click to toggle source

Update a client's visit. @param request @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. (default to ) @return [UpdateClientVisitResponse]

# File lib/swagger_client/api/client_api.rb, line 1525
def client_update_client_visit(request, site_id, version, opts = {})
  data, _status_code, _headers = client_update_client_visit_with_http_info(request, site_id, version, opts)
  data
end
client_update_client_visit_with_http_info(request, site_id, version, opts = {}) click to toggle source

Update a client&#39;s visit. @param request @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. @return [Array<(UpdateClientVisitResponse, Fixnum, Hash)>] UpdateClientVisitResponse data, response status code and response headers

# File lib/swagger_client/api/client_api.rb, line 1537
def client_update_client_visit_with_http_info(request, site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_update_client_visit ...'
  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 ClientApi.client_update_client_visit"
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_update_client_visit"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_update_client_visit"
  end
  # resource path
  local_var_path = '/public/v{version}/client/updateclientvisit'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # 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 => 'UpdateClientVisitResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_update_client_visit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
client_update_client_with_http_info(request, site_id, version, opts = {}) click to toggle source

Update a client at a site. Updates an existing client for a specific subscriber. Use this endpoint as follows: * If you need to update the &#x60;ReferredBy&#x60; parameter, use this endpoint after calling &#x60;GET ClientReferralTypes&#x60;. * When updating a client’s home location, use after calling &#x60;GET Locations&#x60;. * If you are updating a client’s stored credit card, use after calling &#x60;GET AcceptedCardTypes&#x60; so that you can make sure the card is a type that is accepted at the subscriber. If this endpoint is used on a cross-regional site, passing in a client’s RSSID and email address creates a cross-regional link. This means that the client is created in cross-regional sites where the client does not exist and &#x60;GET CrossRegionalClientAssociations&#x60; returns all appropriate cross-regional sites. When &#x60;CrossRegionalUpdate&#x60; is omitted or set to &#x60;true&#x60;, the client’s updated information is propagated to all of the region’s sites. If &#x60;CrossRegionalUpdate&#x60; is set to &#x60;false&#x60;, only the local client is updated. Note that the following items cannot be updated for a cross-regional client: * &#x60;ClientIndexes&#x60; * &#x60;ClientRelationships&#x60; * &#x60;CustomClientFields&#x60; * &#x60;SalesReps&#x60; * &#x60;SendAccountEmails&#x60; * &#x60;SendAccountTexts&#x60; * &#x60;SendPromotionalEmails&#x60; * &#x60;SendPromotionalTexts&#x60; * &#x60;SendScheduleEmails&#x60; * &#x60;SendScheduleTexts&#x60; @param request @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. @return [Array<(UpdateClientResponse, Fixnum, Hash)>] UpdateClientResponse data, response status code and response headers

# File lib/swagger_client/api/client_api.rb, line 1399
def client_update_client_with_http_info(request, site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_update_client ...'
  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 ClientApi.client_update_client"
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_update_client"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_update_client"
  end
  # resource path
  local_var_path = '/public/v{version}/client/updateclient'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # 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 => 'UpdateClientResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_update_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
client_update_contact_log(request, site_id, version, opts = {}) click to toggle source

Update a contact log on a client's account. @param request @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. (default to ) @return [ContactLog]

# File lib/swagger_client/api/client_api.rb, line 1593
def client_update_contact_log(request, site_id, version, opts = {})
  data, _status_code, _headers = client_update_contact_log_with_http_info(request, site_id, version, opts)
  data
end
client_update_contact_log_with_http_info(request, site_id, version, opts = {}) click to toggle source

Update a contact log on a client&#39;s account. @param request @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. @return [Array<(ContactLog, Fixnum, Hash)>] ContactLog data, response status code and response headers

# File lib/swagger_client/api/client_api.rb, line 1605
def client_update_contact_log_with_http_info(request, site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_update_contact_log ...'
  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 ClientApi.client_update_contact_log"
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_update_contact_log"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_update_contact_log"
  end
  # resource path
  local_var_path = '/public/v{version}/client/updatecontactlog'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # 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 => 'ContactLog')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_update_contact_log\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
client_upload_client_document(request, site_id, version, opts = {}) click to toggle source

Upload a document to a client's profile. Returns a string representation of the image byte array. The maximum document size is 1MB. The maximum size file that can be uploaded is 4 MB. @param request @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. (default to ) @return [UploadClientDocumentResponse]

# File lib/swagger_client/api/client_api.rb, line 1662
def client_upload_client_document(request, site_id, version, opts = {})
  data, _status_code, _headers = client_upload_client_document_with_http_info(request, site_id, version, opts)
  data
end
client_upload_client_document_with_http_info(request, site_id, version, opts = {}) click to toggle source

Upload a document to a client&#39;s profile. Returns a string representation of the image byte array. The maximum document size is 1MB. The maximum size file that can be uploaded is 4 MB. @param request @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. @return [Array<(UploadClientDocumentResponse, Fixnum, Hash)>] UploadClientDocumentResponse data, response status code and response headers

# File lib/swagger_client/api/client_api.rb, line 1675
def client_upload_client_document_with_http_info(request, site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_upload_client_document ...'
  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 ClientApi.client_upload_client_document"
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_upload_client_document"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_upload_client_document"
  end
  # resource path
  local_var_path = '/public/v{version}/client/uploadclientdocument'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # 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 => 'UploadClientDocumentResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_upload_client_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
client_upload_client_photo(request, site_id, version, opts = {}) click to toggle source

Upload a profile photo to a client's profile. The maximum file size is 4 MB and acceptable file types are: * bmp * jpeg * gif * tiff * png @param request @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. (default to ) @return [UploadClientPhotoResponse]

# File lib/swagger_client/api/client_api.rb, line 1732
def client_upload_client_photo(request, site_id, version, opts = {})
  data, _status_code, _headers = client_upload_client_photo_with_http_info(request, site_id, version, opts)
  data
end
client_upload_client_photo_with_http_info(request, site_id, version, opts = {}) click to toggle source

Upload a profile photo to a client&#39;s profile. The maximum file size is 4 MB and acceptable file types are: * bmp * jpeg * gif * tiff * png @param request @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. @return [Array<(UploadClientPhotoResponse, Fixnum, Hash)>] UploadClientPhotoResponse data, response status code and response headers

# File lib/swagger_client/api/client_api.rb, line 1745
def client_upload_client_photo_with_http_info(request, site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_upload_client_photo ...'
  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 ClientApi.client_upload_client_photo"
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_upload_client_photo"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_upload_client_photo"
  end
  # resource path
  local_var_path = '/public/v{version}/client/uploadclientphoto'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # 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 => 'UploadClientPhotoResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_upload_client_photo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end