class SmoochApi::IntegrationApi

Attributes

api_client[RW]

Public Class Methods

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

Public Instance Methods

create_integration(appId, integrationCreateBody, opts = {}) click to toggle source

Create an integration for the specified app. @param appId Identifies the app. @param integrationCreateBody Body for a createIntegration request. Additional arguments are necessary based on integration type. For detailed instructions, visit our [official docs](docs.smooch.io/rest/#create-integration) @param [Hash] opts the optional parameters @return [IntegrationResponse]

# File lib/smooch-api/api/integration_api.rb, line 29
def create_integration(appId, integrationCreateBody, opts = {})
  data, _status_code, _headers = create_integration_with_http_info(appId, integrationCreateBody, opts)
  return data
end
create_integration_menu(appId, integrationId, menuCreateBody, opts = {}) click to toggle source

Create the specified integration’s menu, overriding the app menu if configured. @param appId Identifies the app. @param integrationId Identifies the integration. @param menuCreateBody Body for a createMenu request. @param [Hash] opts the optional parameters @return [MenuResponse]

# File lib/smooch-api/api/integration_api.rb, line 91
def create_integration_menu(appId, integrationId, menuCreateBody, opts = {})
  data, _status_code, _headers = create_integration_menu_with_http_info(appId, integrationId, menuCreateBody, opts)
  return data
end
create_integration_menu_with_http_info(appId, integrationId, menuCreateBody, opts = {}) click to toggle source

Create the specified integration’s menu, overriding the app menu if configured. @param appId Identifies the app. @param integrationId Identifies the integration. @param menuCreateBody Body for a createMenu request. @param [Hash] opts the optional parameters @return [Array<(MenuResponse, Fixnum, Hash)>] MenuResponse data, response status code and response headers

# File lib/smooch-api/api/integration_api.rb, line 103
def create_integration_menu_with_http_info(appId, integrationId, menuCreateBody, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: IntegrationApi.create_integration_menu ..."
  end
  # verify the required parameter 'appId' is set
  if @api_client.config.client_side_validation && appId.nil?
    fail ArgumentError, "Missing the required parameter 'appId' when calling IntegrationApi.create_integration_menu"
  end
  # verify the required parameter 'integrationId' is set
  if @api_client.config.client_side_validation && integrationId.nil?
    fail ArgumentError, "Missing the required parameter 'integrationId' when calling IntegrationApi.create_integration_menu"
  end
  # verify the required parameter 'menuCreateBody' is set
  if @api_client.config.client_side_validation && menuCreateBody.nil?
    fail ArgumentError, "Missing the required parameter 'menuCreateBody' when calling IntegrationApi.create_integration_menu"
  end
  # resource path
  local_var_path = "/v1.1/apps/{appId}/integrations/{integrationId}/menu".sub('{' + 'appId' + '}', appId.to_s).sub('{' + 'integrationId' + '}', integrationId.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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(menuCreateBody)
  auth_names = ['basicAuth', 'jwt']
  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 => 'MenuResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IntegrationApi#create_integration_menu\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_integration_with_http_info(appId, integrationCreateBody, opts = {}) click to toggle source

Create an integration for the specified app. @param appId Identifies the app. @param integrationCreateBody Body for a createIntegration request. Additional arguments are necessary based on integration type. For detailed instructions, visit our [official docs](docs.smooch.io/rest/#create-integration) @param [Hash] opts the optional parameters @return [Array<(IntegrationResponse, Fixnum, Hash)>] IntegrationResponse data, response status code and response headers

# File lib/smooch-api/api/integration_api.rb, line 40
def create_integration_with_http_info(appId, integrationCreateBody, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: IntegrationApi.create_integration ..."
  end
  # verify the required parameter 'appId' is set
  if @api_client.config.client_side_validation && appId.nil?
    fail ArgumentError, "Missing the required parameter 'appId' when calling IntegrationApi.create_integration"
  end
  # verify the required parameter 'integrationCreateBody' is set
  if @api_client.config.client_side_validation && integrationCreateBody.nil?
    fail ArgumentError, "Missing the required parameter 'integrationCreateBody' when calling IntegrationApi.create_integration"
  end
  # resource path
  local_var_path = "/v1.1/apps/{appId}/integrations".sub('{' + 'appId' + '}', appId.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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(integrationCreateBody)
  auth_names = ['basicAuth', 'jwt']
  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 => 'IntegrationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IntegrationApi#create_integration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_integration(appId, integrationId, opts = {}) click to toggle source

Delete the specified integration. @param appId Identifies the app. @param integrationId Identifies the integration. @param [Hash] opts the optional parameters @return [nil]

# File lib/smooch-api/api/integration_api.rb, line 157
def delete_integration(appId, integrationId, opts = {})
  delete_integration_with_http_info(appId, integrationId, opts)
  return nil
end
delete_integration_menu(appId, integrationId, opts = {}) click to toggle source

Delete the specified integration’s menu. @param appId Identifies the app. @param integrationId Identifies the integration. @param [Hash] opts the optional parameters @return [nil]

# File lib/smooch-api/api/integration_api.rb, line 217
def delete_integration_menu(appId, integrationId, opts = {})
  delete_integration_menu_with_http_info(appId, integrationId, opts)
  return nil
end
delete_integration_menu_with_http_info(appId, integrationId, opts = {}) click to toggle source

Delete the specified integration’s menu. @param appId Identifies the app. @param integrationId Identifies the integration. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/smooch-api/api/integration_api.rb, line 228
def delete_integration_menu_with_http_info(appId, integrationId, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: IntegrationApi.delete_integration_menu ..."
  end
  # verify the required parameter 'appId' is set
  if @api_client.config.client_side_validation && appId.nil?
    fail ArgumentError, "Missing the required parameter 'appId' when calling IntegrationApi.delete_integration_menu"
  end
  # verify the required parameter 'integrationId' is set
  if @api_client.config.client_side_validation && integrationId.nil?
    fail ArgumentError, "Missing the required parameter 'integrationId' when calling IntegrationApi.delete_integration_menu"
  end
  # resource path
  local_var_path = "/v1.1/apps/{appId}/integrations/{integrationId}/menu".sub('{' + 'appId' + '}', appId.to_s).sub('{' + 'integrationId' + '}', integrationId.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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth', 'jwt']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IntegrationApi#delete_integration_menu\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_integration_with_http_info(appId, integrationId, opts = {}) click to toggle source

Delete the specified integration. @param appId Identifies the app. @param integrationId Identifies the integration. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/smooch-api/api/integration_api.rb, line 168
def delete_integration_with_http_info(appId, integrationId, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: IntegrationApi.delete_integration ..."
  end
  # verify the required parameter 'appId' is set
  if @api_client.config.client_side_validation && appId.nil?
    fail ArgumentError, "Missing the required parameter 'appId' when calling IntegrationApi.delete_integration"
  end
  # verify the required parameter 'integrationId' is set
  if @api_client.config.client_side_validation && integrationId.nil?
    fail ArgumentError, "Missing the required parameter 'integrationId' when calling IntegrationApi.delete_integration"
  end
  # resource path
  local_var_path = "/v1.1/apps/{appId}/integrations/{integrationId}".sub('{' + 'appId' + '}', appId.to_s).sub('{' + 'integrationId' + '}', integrationId.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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth', 'jwt']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IntegrationApi#delete_integration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_integration(appId, integrationId, opts = {}) click to toggle source

Get the specified integration. @param appId Identifies the app. @param integrationId Identifies the integration. @param [Hash] opts the optional parameters @return [IntegrationResponse]

# File lib/smooch-api/api/integration_api.rb, line 277
def get_integration(appId, integrationId, opts = {})
  data, _status_code, _headers = get_integration_with_http_info(appId, integrationId, opts)
  return data
end
get_integration_menu(appId, integrationId, opts = {}) click to toggle source

Get the specified integration's menu. @param appId Identifies the app. @param integrationId Identifies the integration. @param [Hash] opts the optional parameters @return [MenuResponse]

# File lib/smooch-api/api/integration_api.rb, line 338
def get_integration_menu(appId, integrationId, opts = {})
  data, _status_code, _headers = get_integration_menu_with_http_info(appId, integrationId, opts)
  return data
end
get_integration_menu_with_http_info(appId, integrationId, opts = {}) click to toggle source

Get the specified integration&#39;s menu. @param appId Identifies the app. @param integrationId Identifies the integration. @param [Hash] opts the optional parameters @return [Array<(MenuResponse, Fixnum, Hash)>] MenuResponse data, response status code and response headers

# File lib/smooch-api/api/integration_api.rb, line 349
def get_integration_menu_with_http_info(appId, integrationId, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: IntegrationApi.get_integration_menu ..."
  end
  # verify the required parameter 'appId' is set
  if @api_client.config.client_side_validation && appId.nil?
    fail ArgumentError, "Missing the required parameter 'appId' when calling IntegrationApi.get_integration_menu"
  end
  # verify the required parameter 'integrationId' is set
  if @api_client.config.client_side_validation && integrationId.nil?
    fail ArgumentError, "Missing the required parameter 'integrationId' when calling IntegrationApi.get_integration_menu"
  end
  # resource path
  local_var_path = "/v1.1/apps/{appId}/integrations/{integrationId}/menu".sub('{' + 'appId' + '}', appId.to_s).sub('{' + 'integrationId' + '}', integrationId.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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

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

Get the specified integration’s profile. @param appId Identifies the app. @param integrationId Identifies the integration. @param [Hash] opts the optional parameters @return [GetIntegrationProfileResponse]

# File lib/smooch-api/api/integration_api.rb, line 399
def get_integration_profile(appId, integrationId, opts = {})
  data, _status_code, _headers = get_integration_profile_with_http_info(appId, integrationId, opts)
  return data
end
get_integration_profile_with_http_info(appId, integrationId, opts = {}) click to toggle source

Get the specified integration’s profile. @param appId Identifies the app. @param integrationId Identifies the integration. @param [Hash] opts the optional parameters @return [Array<(GetIntegrationProfileResponse, Fixnum, Hash)>] GetIntegrationProfileResponse data, response status code and response headers

# File lib/smooch-api/api/integration_api.rb, line 410
def get_integration_profile_with_http_info(appId, integrationId, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: IntegrationApi.get_integration_profile ..."
  end
  # verify the required parameter 'appId' is set
  if @api_client.config.client_side_validation && appId.nil?
    fail ArgumentError, "Missing the required parameter 'appId' when calling IntegrationApi.get_integration_profile"
  end
  # verify the required parameter 'integrationId' is set
  if @api_client.config.client_side_validation && integrationId.nil?
    fail ArgumentError, "Missing the required parameter 'integrationId' when calling IntegrationApi.get_integration_profile"
  end
  # resource path
  local_var_path = "/v1.1/apps/{appId}/integrations/{integrationId}/profile".sub('{' + 'appId' + '}', appId.to_s).sub('{' + 'integrationId' + '}', integrationId.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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

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

Get the specified integration. @param appId Identifies the app. @param integrationId Identifies the integration. @param [Hash] opts the optional parameters @return [Array<(IntegrationResponse, Fixnum, Hash)>] IntegrationResponse data, response status code and response headers

# File lib/smooch-api/api/integration_api.rb, line 288
def get_integration_with_http_info(appId, integrationId, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: IntegrationApi.get_integration ..."
  end
  # verify the required parameter 'appId' is set
  if @api_client.config.client_side_validation && appId.nil?
    fail ArgumentError, "Missing the required parameter 'appId' when calling IntegrationApi.get_integration"
  end
  # verify the required parameter 'integrationId' is set
  if @api_client.config.client_side_validation && integrationId.nil?
    fail ArgumentError, "Missing the required parameter 'integrationId' when calling IntegrationApi.get_integration"
  end
  # resource path
  local_var_path = "/v1.1/apps/{appId}/integrations/{integrationId}".sub('{' + 'appId' + '}', appId.to_s).sub('{' + 'integrationId' + '}', integrationId.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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

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

List integrations for the specified app. @param appId Identifies the app. @param [Hash] opts the optional parameters @option opts [String] :types List of types to filter the query by. More than one value can be specified through comma separation e.g. ?types&#x3D;twilio,line. @option opts [Integer] :limit The number of records to return. (default to 25) @option opts [Integer] :offset The number of initial records to skip before picking records to return. (default to 0) @return [ListIntegrationsResponse]

# File lib/smooch-api/api/integration_api.rb, line 462
def list_integrations(appId, opts = {})
  data, _status_code, _headers = list_integrations_with_http_info(appId, opts)
  return data
end
list_integrations_with_http_info(appId, opts = {}) click to toggle source

List integrations for the specified app. @param appId Identifies the app. @param [Hash] opts the optional parameters @option opts [String] :types List of types to filter the query by. More than one value can be specified through comma separation e.g. ?types&#x3D;twilio,line. @option opts [Integer] :limit The number of records to return. @option opts [Integer] :offset The number of initial records to skip before picking records to return. @return [Array<(ListIntegrationsResponse, Fixnum, Hash)>] ListIntegrationsResponse data, response status code and response headers

# File lib/smooch-api/api/integration_api.rb, line 475
def list_integrations_with_http_info(appId, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: IntegrationApi.list_integrations ..."
  end
  # verify the required parameter 'appId' is set
  if @api_client.config.client_side_validation && appId.nil?
    fail ArgumentError, "Missing the required parameter 'appId' when calling IntegrationApi.list_integrations"
  end
  # resource path
  local_var_path = "/v1.1/apps/{appId}/integrations".sub('{' + 'appId' + '}', appId.to_s)

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

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

  # form parameters
  form_params = {}

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

Update the specified integration. @param appId Identifies the app. @param integrationId Identifies the integration. @param integrationUpdateBody Body for a updateIntegration request. Additional arguments are necessary based on integration type. For detailed instructions, visit our [official docs](docs.smooch.io/rest/#update-integration) @param [Hash] opts the optional parameters @return [IntegrationResponse]

# File lib/smooch-api/api/integration_api.rb, line 525
def update_integration(appId, integrationId, integrationUpdateBody, opts = {})
  data, _status_code, _headers = update_integration_with_http_info(appId, integrationId, integrationUpdateBody, opts)
  return data
end
update_integration_menu(appId, integrationId, menuUpdateBody, opts = {}) click to toggle source

Update the specified integration’s menu. @param appId Identifies the app. @param integrationId Identifies the integration. @param menuUpdateBody Body for a updateMenu request. @param [Hash] opts the optional parameters @return [MenuResponse]

# File lib/smooch-api/api/integration_api.rb, line 592
def update_integration_menu(appId, integrationId, menuUpdateBody, opts = {})
  data, _status_code, _headers = update_integration_menu_with_http_info(appId, integrationId, menuUpdateBody, opts)
  return data
end
update_integration_menu_with_http_info(appId, integrationId, menuUpdateBody, opts = {}) click to toggle source

Update the specified integration’s menu. @param appId Identifies the app. @param integrationId Identifies the integration. @param menuUpdateBody Body for a updateMenu request. @param [Hash] opts the optional parameters @return [Array<(MenuResponse, Fixnum, Hash)>] MenuResponse data, response status code and response headers

# File lib/smooch-api/api/integration_api.rb, line 604
def update_integration_menu_with_http_info(appId, integrationId, menuUpdateBody, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: IntegrationApi.update_integration_menu ..."
  end
  # verify the required parameter 'appId' is set
  if @api_client.config.client_side_validation && appId.nil?
    fail ArgumentError, "Missing the required parameter 'appId' when calling IntegrationApi.update_integration_menu"
  end
  # verify the required parameter 'integrationId' is set
  if @api_client.config.client_side_validation && integrationId.nil?
    fail ArgumentError, "Missing the required parameter 'integrationId' when calling IntegrationApi.update_integration_menu"
  end
  # verify the required parameter 'menuUpdateBody' is set
  if @api_client.config.client_side_validation && menuUpdateBody.nil?
    fail ArgumentError, "Missing the required parameter 'menuUpdateBody' when calling IntegrationApi.update_integration_menu"
  end
  # resource path
  local_var_path = "/v1.1/apps/{appId}/integrations/{integrationId}/menu".sub('{' + 'appId' + '}', appId.to_s).sub('{' + 'integrationId' + '}', integrationId.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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(menuUpdateBody)
  auth_names = ['basicAuth', 'jwt']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'MenuResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IntegrationApi#update_integration_menu\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_integration_profile(appId, integrationId, integrationProfileBody, opts = {}) click to toggle source

Update the specified integration’s profile. @param appId Identifies the app. @param integrationId Identifies the integration. @param integrationProfileBody Body for a profileUpdate request. @param [Hash] opts the optional parameters @return [nil]

# File lib/smooch-api/api/integration_api.rb, line 659
def update_integration_profile(appId, integrationId, integrationProfileBody, opts = {})
  update_integration_profile_with_http_info(appId, integrationId, integrationProfileBody, opts)
  return nil
end
update_integration_profile_with_http_info(appId, integrationId, integrationProfileBody, opts = {}) click to toggle source

Update the specified integration’s profile. @param appId Identifies the app. @param integrationId Identifies the integration. @param integrationProfileBody Body for a profileUpdate request. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/smooch-api/api/integration_api.rb, line 671
def update_integration_profile_with_http_info(appId, integrationId, integrationProfileBody, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: IntegrationApi.update_integration_profile ..."
  end
  # verify the required parameter 'appId' is set
  if @api_client.config.client_side_validation && appId.nil?
    fail ArgumentError, "Missing the required parameter 'appId' when calling IntegrationApi.update_integration_profile"
  end
  # verify the required parameter 'integrationId' is set
  if @api_client.config.client_side_validation && integrationId.nil?
    fail ArgumentError, "Missing the required parameter 'integrationId' when calling IntegrationApi.update_integration_profile"
  end
  # verify the required parameter 'integrationProfileBody' is set
  if @api_client.config.client_side_validation && integrationProfileBody.nil?
    fail ArgumentError, "Missing the required parameter 'integrationProfileBody' when calling IntegrationApi.update_integration_profile"
  end
  # resource path
  local_var_path = "/v1.1/apps/{appId}/integrations/{integrationId}/profile".sub('{' + 'appId' + '}', appId.to_s).sub('{' + 'integrationId' + '}', integrationId.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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(integrationProfileBody)
  auth_names = ['basicAuth', 'jwt']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IntegrationApi#update_integration_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_integration_with_http_info(appId, integrationId, integrationUpdateBody, opts = {}) click to toggle source

Update the specified integration. @param appId Identifies the app. @param integrationId Identifies the integration. @param integrationUpdateBody Body for a updateIntegration request. Additional arguments are necessary based on integration type. For detailed instructions, visit our [official docs](docs.smooch.io/rest/#update-integration) @param [Hash] opts the optional parameters @return [Array<(IntegrationResponse, Fixnum, Hash)>] IntegrationResponse data, response status code and response headers

# File lib/smooch-api/api/integration_api.rb, line 537
def update_integration_with_http_info(appId, integrationId, integrationUpdateBody, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: IntegrationApi.update_integration ..."
  end
  # verify the required parameter 'appId' is set
  if @api_client.config.client_side_validation && appId.nil?
    fail ArgumentError, "Missing the required parameter 'appId' when calling IntegrationApi.update_integration"
  end
  # verify the required parameter 'integrationId' is set
  if @api_client.config.client_side_validation && integrationId.nil?
    fail ArgumentError, "Missing the required parameter 'integrationId' when calling IntegrationApi.update_integration"
  end
  # verify the required parameter 'integrationUpdateBody' is set
  if @api_client.config.client_side_validation && integrationUpdateBody.nil?
    fail ArgumentError, "Missing the required parameter 'integrationUpdateBody' when calling IntegrationApi.update_integration"
  end
  # resource path
  local_var_path = "/v1.1/apps/{appId}/integrations/{integrationId}".sub('{' + 'appId' + '}', appId.to_s).sub('{' + 'integrationId' + '}', integrationId.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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(integrationUpdateBody)
  auth_names = ['basicAuth', 'jwt']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'IntegrationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IntegrationApi#update_integration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
upload_integration_profile_photo(appId, integrationId, source, opts = {}) click to toggle source

Upload a photo to be used for the the specified integration’s profile. @param appId Identifies the app. @param integrationId Identifies the integration. @param source Photo to be uploaded @param [Hash] opts the optional parameters @return [UploadIntegrationProfilePhotoResponse]

# File lib/smooch-api/api/integration_api.rb, line 725
def upload_integration_profile_photo(appId, integrationId, source, opts = {})
  data, _status_code, _headers = upload_integration_profile_photo_with_http_info(appId, integrationId, source, opts)
  return data
end
upload_integration_profile_photo_with_http_info(appId, integrationId, source, opts = {}) click to toggle source

Upload a photo to be used for the the specified integration’s profile. @param appId Identifies the app. @param integrationId Identifies the integration. @param source Photo to be uploaded @param [Hash] opts the optional parameters @return [Array<(UploadIntegrationProfilePhotoResponse, Fixnum, Hash)>] UploadIntegrationProfilePhotoResponse data, response status code and response headers

# File lib/smooch-api/api/integration_api.rb, line 737
def upload_integration_profile_photo_with_http_info(appId, integrationId, source, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: IntegrationApi.upload_integration_profile_photo ..."
  end
  # verify the required parameter 'appId' is set
  if @api_client.config.client_side_validation && appId.nil?
    fail ArgumentError, "Missing the required parameter 'appId' when calling IntegrationApi.upload_integration_profile_photo"
  end
  # verify the required parameter 'integrationId' is set
  if @api_client.config.client_side_validation && integrationId.nil?
    fail ArgumentError, "Missing the required parameter 'integrationId' when calling IntegrationApi.upload_integration_profile_photo"
  end
  # verify the required parameter 'source' is set
  if @api_client.config.client_side_validation && source.nil?
    fail ArgumentError, "Missing the required parameter 'source' when calling IntegrationApi.upload_integration_profile_photo"
  end
  # resource path
  local_var_path = "/v1.1/apps/{appId}/integrations/{integrationId}/profile/photo".sub('{' + 'appId' + '}', appId.to_s).sub('{' + 'integrationId' + '}', integrationId.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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params["source"] = source

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth', 'jwt']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'UploadIntegrationProfilePhotoResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IntegrationApi#upload_integration_profile_photo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end