=begin PureCloud Platform API With the PureCloud Platform API, you can control all aspects of your PureCloud environment. With the APIs you can access the system configuration, manage conversations and more. OpenAPI spec version: v2 Contact: DeveloperEvangelists@genesys.com Generated by: https://github.com/swagger-api/swagger-codegen.git License: ININ http://www.inin.com Terms of Service: https://developer.mypurecloud.com/tos =end require "uri" module PureCloud class IntegrationsApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # Delete an Action # # @param action_id actionId # @param [Hash] opts the optional parameters # @return [nil] def delete_integrations_action(action_id, opts = {}) delete_integrations_action_with_http_info(action_id, opts) return nil end # Delete an Action # # @param action_id actionId # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_integrations_action_with_http_info(action_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IntegrationsApi.delete_integrations_action ..." end # verify the required parameter 'action_id' is set fail ArgumentError, "Missing the required parameter 'action_id' when calling IntegrationsApi.delete_integrations_action" if action_id.nil? # resource path local_var_path = "/api/v2/integrations/actions/{actionId}".sub('{format}','json').sub('{' + 'actionId' + '}', action_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] 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: IntegrationsApi#delete_integrations_action\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete a Draft # # @param action_id actionId # @param [Hash] opts the optional parameters # @return [nil] def delete_integrations_action_draft(action_id, opts = {}) delete_integrations_action_draft_with_http_info(action_id, opts) return nil end # Delete a Draft # # @param action_id actionId # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_integrations_action_draft_with_http_info(action_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IntegrationsApi.delete_integrations_action_draft ..." end # verify the required parameter 'action_id' is set fail ArgumentError, "Missing the required parameter 'action_id' when calling IntegrationsApi.delete_integrations_action_draft" if action_id.nil? # resource path local_var_path = "/api/v2/integrations/actions/{actionId}/draft".sub('{format}','json').sub('{' + 'actionId' + '}', action_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] 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: IntegrationsApi#delete_integrations_action_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Retrieves a single Action matching id. # # @param action_id actionId # @param [Hash] opts the optional parameters # @option opts [String] :expand Indicates fields of the response which should be expanded. # @option opts [BOOLEAN] :include_config Show config when available (default to false) # @return [Action] def get_integrations_action(action_id, opts = {}) data, _status_code, _headers = get_integrations_action_with_http_info(action_id, opts) return data end # Retrieves a single Action matching id. # # @param action_id actionId # @param [Hash] opts the optional parameters # @option opts [String] :expand Indicates fields of the response which should be expanded. # @option opts [BOOLEAN] :include_config Show config when available # @return [Array<(Action, Fixnum, Hash)>] Action data, response status code and response headers def get_integrations_action_with_http_info(action_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IntegrationsApi.get_integrations_action ..." end # verify the required parameter 'action_id' is set fail ArgumentError, "Missing the required parameter 'action_id' when calling IntegrationsApi.get_integrations_action" if action_id.nil? if opts[:'expand'] && !['contract'].include?(opts[:'expand']) fail ArgumentError, 'invalid value for "expand", must be one of contract' end # resource path local_var_path = "/api/v2/integrations/actions/{actionId}".sub('{format}','json').sub('{' + 'actionId' + '}', action_id.to_s) # query parameters query_params = {} query_params[:'expand'] = opts[:'expand'] if opts[:'expand'] query_params[:'includeConfig'] = opts[:'include_config'] if opts[:'include_config'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] 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 => 'Action') if @api_client.config.debugging @api_client.config.logger.debug "API called: IntegrationsApi#get_integrations_action\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Retrieve a Draft # # @param action_id actionId # @param [Hash] opts the optional parameters # @option opts [String] :expand Indicates fields of the response which should be expanded. # @option opts [BOOLEAN] :include_config Show config when available (default to false) # @return [Action] def get_integrations_action_draft(action_id, opts = {}) data, _status_code, _headers = get_integrations_action_draft_with_http_info(action_id, opts) return data end # Retrieve a Draft # # @param action_id actionId # @param [Hash] opts the optional parameters # @option opts [String] :expand Indicates fields of the response which should be expanded. # @option opts [BOOLEAN] :include_config Show config when available # @return [Array<(Action, Fixnum, Hash)>] Action data, response status code and response headers def get_integrations_action_draft_with_http_info(action_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IntegrationsApi.get_integrations_action_draft ..." end # verify the required parameter 'action_id' is set fail ArgumentError, "Missing the required parameter 'action_id' when calling IntegrationsApi.get_integrations_action_draft" if action_id.nil? if opts[:'expand'] && !['contract'].include?(opts[:'expand']) fail ArgumentError, 'invalid value for "expand", must be one of contract' end # resource path local_var_path = "/api/v2/integrations/actions/{actionId}/draft".sub('{format}','json').sub('{' + 'actionId' + '}', action_id.to_s) # query parameters query_params = {} query_params[:'expand'] = opts[:'expand'] if opts[:'expand'] query_params[:'includeConfig'] = opts[:'include_config'] if opts[:'include_config'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] 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 => 'Action') if @api_client.config.debugging @api_client.config.logger.debug "API called: IntegrationsApi#get_integrations_action_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Retrieve schema for a Draft based on filename. # # @param action_id actionId # @param file_name Name of schema file to be retrieved for this draft. # @param [Hash] opts the optional parameters # @return [JsonSchemaDocument] def get_integrations_action_draft_schema(action_id, file_name, opts = {}) data, _status_code, _headers = get_integrations_action_draft_schema_with_http_info(action_id, file_name, opts) return data end # Retrieve schema for a Draft based on filename. # # @param action_id actionId # @param file_name Name of schema file to be retrieved for this draft. # @param [Hash] opts the optional parameters # @return [Array<(JsonSchemaDocument, Fixnum, Hash)>] JsonSchemaDocument data, response status code and response headers def get_integrations_action_draft_schema_with_http_info(action_id, file_name, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IntegrationsApi.get_integrations_action_draft_schema ..." end # verify the required parameter 'action_id' is set fail ArgumentError, "Missing the required parameter 'action_id' when calling IntegrationsApi.get_integrations_action_draft_schema" if action_id.nil? # verify the required parameter 'file_name' is set fail ArgumentError, "Missing the required parameter 'file_name' when calling IntegrationsApi.get_integrations_action_draft_schema" if file_name.nil? # resource path local_var_path = "/api/v2/integrations/actions/{actionId}/draft/schemas/{fileName}".sub('{format}','json').sub('{' + 'actionId' + '}', action_id.to_s).sub('{' + 'fileName' + '}', file_name.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] 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 => 'JsonSchemaDocument') if @api_client.config.debugging @api_client.config.logger.debug "API called: IntegrationsApi#get_integrations_action_draft_schema\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Retrieve templates for a Draft based on filename. # # @param action_id actionId # @param file_name Name of template file to be retrieved for this action draft. # @param [Hash] opts the optional parameters # @return [String] def get_integrations_action_draft_template(action_id, file_name, opts = {}) data, _status_code, _headers = get_integrations_action_draft_template_with_http_info(action_id, file_name, opts) return data end # Retrieve templates for a Draft based on filename. # # @param action_id actionId # @param file_name Name of template file to be retrieved for this action draft. # @param [Hash] opts the optional parameters # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def get_integrations_action_draft_template_with_http_info(action_id, file_name, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IntegrationsApi.get_integrations_action_draft_template ..." end # verify the required parameter 'action_id' is set fail ArgumentError, "Missing the required parameter 'action_id' when calling IntegrationsApi.get_integrations_action_draft_template" if action_id.nil? # verify the required parameter 'file_name' is set fail ArgumentError, "Missing the required parameter 'file_name' when calling IntegrationsApi.get_integrations_action_draft_template" if file_name.nil? # resource path local_var_path = "/api/v2/integrations/actions/{actionId}/draft/templates/{fileName}".sub('{format}','json').sub('{' + 'actionId' + '}', action_id.to_s).sub('{' + 'fileName' + '}', file_name.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['text/plain'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] 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 => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: IntegrationsApi#get_integrations_action_draft_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Validate current Draft configuration. # # @param action_id actionId # @param [Hash] opts the optional parameters # @return [DraftValidationResult] def get_integrations_action_draft_validation(action_id, opts = {}) data, _status_code, _headers = get_integrations_action_draft_validation_with_http_info(action_id, opts) return data end # Validate current Draft configuration. # # @param action_id actionId # @param [Hash] opts the optional parameters # @return [Array<(DraftValidationResult, Fixnum, Hash)>] DraftValidationResult data, response status code and response headers def get_integrations_action_draft_validation_with_http_info(action_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IntegrationsApi.get_integrations_action_draft_validation ..." end # verify the required parameter 'action_id' is set fail ArgumentError, "Missing the required parameter 'action_id' when calling IntegrationsApi.get_integrations_action_draft_validation" if action_id.nil? # resource path local_var_path = "/api/v2/integrations/actions/{actionId}/draft/validation".sub('{format}','json').sub('{' + 'actionId' + '}', action_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] 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 => 'DraftValidationResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: IntegrationsApi#get_integrations_action_draft_validation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Retrieve schema for an action based on filename. # # @param action_id actionId # @param file_name Name of schema file to be retrieved for this action. # @param [Hash] opts the optional parameters # @return [JsonSchemaDocument] def get_integrations_action_schema(action_id, file_name, opts = {}) data, _status_code, _headers = get_integrations_action_schema_with_http_info(action_id, file_name, opts) return data end # Retrieve schema for an action based on filename. # # @param action_id actionId # @param file_name Name of schema file to be retrieved for this action. # @param [Hash] opts the optional parameters # @return [Array<(JsonSchemaDocument, Fixnum, Hash)>] JsonSchemaDocument data, response status code and response headers def get_integrations_action_schema_with_http_info(action_id, file_name, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IntegrationsApi.get_integrations_action_schema ..." end # verify the required parameter 'action_id' is set fail ArgumentError, "Missing the required parameter 'action_id' when calling IntegrationsApi.get_integrations_action_schema" if action_id.nil? # verify the required parameter 'file_name' is set fail ArgumentError, "Missing the required parameter 'file_name' when calling IntegrationsApi.get_integrations_action_schema" if file_name.nil? # resource path local_var_path = "/api/v2/integrations/actions/{actionId}/schemas/{fileName}".sub('{format}','json').sub('{' + 'actionId' + '}', action_id.to_s).sub('{' + 'fileName' + '}', file_name.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] 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 => 'JsonSchemaDocument') if @api_client.config.debugging @api_client.config.logger.debug "API called: IntegrationsApi#get_integrations_action_schema\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Retrieve text of templates for an action based on filename. # # @param action_id actionId # @param file_name Name of template file to be retrieved for this action. # @param [Hash] opts the optional parameters # @return [String] def get_integrations_action_template(action_id, file_name, opts = {}) data, _status_code, _headers = get_integrations_action_template_with_http_info(action_id, file_name, opts) return data end # Retrieve text of templates for an action based on filename. # # @param action_id actionId # @param file_name Name of template file to be retrieved for this action. # @param [Hash] opts the optional parameters # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def get_integrations_action_template_with_http_info(action_id, file_name, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IntegrationsApi.get_integrations_action_template ..." end # verify the required parameter 'action_id' is set fail ArgumentError, "Missing the required parameter 'action_id' when calling IntegrationsApi.get_integrations_action_template" if action_id.nil? # verify the required parameter 'file_name' is set fail ArgumentError, "Missing the required parameter 'file_name' when calling IntegrationsApi.get_integrations_action_template" if file_name.nil? # resource path local_var_path = "/api/v2/integrations/actions/{actionId}/templates/{fileName}".sub('{format}','json').sub('{' + 'actionId' + '}', action_id.to_s).sub('{' + 'fileName' + '}', file_name.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['text/plain'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] 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 => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: IntegrationsApi#get_integrations_action_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Retrieves all actions associated with filters passed in via query param. # # @param [Hash] opts the optional parameters # @option opts [String] :category Filter by category name # @option opts [String] :secure Filter to only include secure actions. True will only include actions marked secured. False will include only unsecure actions. Do not use filter if you want all Actions. # @option opts [String] :include_auth_actions Whether or not to include authentication actions in the response. These actions are not directly executable. Some integrations create them and will run them as needed to refresh authentication information for other actions. # @option opts [Integer] :page_size The total page size requested (default to 25) # @option opts [Integer] :page_number The page number requested (default to 1) # @option opts [String] :sort_by variable name requested to sort by # @option opts [Array] :expand variable name requested by expand list # @option opts [String] :next_page next page token # @option opts [String] :previous_page Previous page token # @return [ActionEntityListing] def get_integrations_actions(opts = {}) data, _status_code, _headers = get_integrations_actions_with_http_info(opts) return data end # Retrieves all actions associated with filters passed in via query param. # # @param [Hash] opts the optional parameters # @option opts [String] :category Filter by category name # @option opts [String] :secure Filter to only include secure actions. True will only include actions marked secured. False will include only unsecure actions. Do not use filter if you want all Actions. # @option opts [String] :include_auth_actions Whether or not to include authentication actions in the response. These actions are not directly executable. Some integrations create them and will run them as needed to refresh authentication information for other actions. # @option opts [Integer] :page_size The total page size requested # @option opts [Integer] :page_number The page number requested # @option opts [String] :sort_by variable name requested to sort by # @option opts [Array] :expand variable name requested by expand list # @option opts [String] :next_page next page token # @option opts [String] :previous_page Previous page token # @return [Array<(ActionEntityListing, Fixnum, Hash)>] ActionEntityListing data, response status code and response headers def get_integrations_actions_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IntegrationsApi.get_integrations_actions ..." end if opts[:'secure'] && !['true', 'false'].include?(opts[:'secure']) fail ArgumentError, 'invalid value for "secure", must be one of true, false' end if opts[:'include_auth_actions'] && !['true', 'false'].include?(opts[:'include_auth_actions']) fail ArgumentError, 'invalid value for "include_auth_actions", must be one of true, false' end # resource path local_var_path = "/api/v2/integrations/actions".sub('{format}','json') # query parameters query_params = {} query_params[:'category'] = opts[:'category'] if opts[:'category'] query_params[:'secure'] = opts[:'secure'] if opts[:'secure'] query_params[:'includeAuthActions'] = opts[:'include_auth_actions'] if opts[:'include_auth_actions'] query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by'] query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] query_params[:'nextPage'] = opts[:'next_page'] if opts[:'next_page'] query_params[:'previousPage'] = opts[:'previous_page'] if opts[:'previous_page'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] 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 => 'ActionEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: IntegrationsApi#get_integrations_actions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Retrieves all categories of available Actions # # @param [Hash] opts the optional parameters # @option opts [String] :secure Filter to only include/exclude Action categories based on if they are considered secure. True will only include categories with Actions marked secured. False will only include categories of unsecured Actions. # @option opts [Integer] :page_size The total page size requested (default to 25) # @option opts [Integer] :page_number The page number requested (default to 1) # @option opts [String] :sort_by variable name requested to sort by # @option opts [Array] :expand variable name requested by expand list # @option opts [String] :next_page next page token # @option opts [String] :previous_page Previous page token # @return [CategoryEntityListing] def get_integrations_actions_categories(opts = {}) data, _status_code, _headers = get_integrations_actions_categories_with_http_info(opts) return data end # Retrieves all categories of available Actions # # @param [Hash] opts the optional parameters # @option opts [String] :secure Filter to only include/exclude Action categories based on if they are considered secure. True will only include categories with Actions marked secured. False will only include categories of unsecured Actions. # @option opts [Integer] :page_size The total page size requested # @option opts [Integer] :page_number The page number requested # @option opts [String] :sort_by variable name requested to sort by # @option opts [Array] :expand variable name requested by expand list # @option opts [String] :next_page next page token # @option opts [String] :previous_page Previous page token # @return [Array<(CategoryEntityListing, Fixnum, Hash)>] CategoryEntityListing data, response status code and response headers def get_integrations_actions_categories_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IntegrationsApi.get_integrations_actions_categories ..." end if opts[:'secure'] && !['true', 'false'].include?(opts[:'secure']) fail ArgumentError, 'invalid value for "secure", must be one of true, false' end # resource path local_var_path = "/api/v2/integrations/actions/categories".sub('{format}','json') # query parameters query_params = {} query_params[:'secure'] = opts[:'secure'] if opts[:'secure'] query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by'] query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] query_params[:'nextPage'] = opts[:'next_page'] if opts[:'next_page'] query_params[:'previousPage'] = opts[:'previous_page'] if opts[:'previous_page'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] 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 => 'CategoryEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: IntegrationsApi#get_integrations_actions_categories\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Retrieves all action drafts associated with the filters passed in via query param. # # @param [Hash] opts the optional parameters # @option opts [String] :category Filter by category name # @option opts [String] :secure Filter to only include secure actions. True will only include actions marked secured. False will include only unsecure actions. Do not use filter if you want all Actions. # @option opts [String] :include_auth_actions Whether or not to include authentication actions in the response. These actions are not directly executable. Some integrations create them and will run them as needed to refresh authentication information for other actions. # @option opts [Integer] :page_size The total page size requested (default to 25) # @option opts [Integer] :page_number The page number requested (default to 1) # @option opts [String] :sort_by variable name requested to sort by # @option opts [Array] :expand variable name requested by expand list # @option opts [String] :next_page next page token # @option opts [String] :previous_page Previous page token # @return [ActionEntityListing] def get_integrations_actions_drafts(opts = {}) data, _status_code, _headers = get_integrations_actions_drafts_with_http_info(opts) return data end # Retrieves all action drafts associated with the filters passed in via query param. # # @param [Hash] opts the optional parameters # @option opts [String] :category Filter by category name # @option opts [String] :secure Filter to only include secure actions. True will only include actions marked secured. False will include only unsecure actions. Do not use filter if you want all Actions. # @option opts [String] :include_auth_actions Whether or not to include authentication actions in the response. These actions are not directly executable. Some integrations create them and will run them as needed to refresh authentication information for other actions. # @option opts [Integer] :page_size The total page size requested # @option opts [Integer] :page_number The page number requested # @option opts [String] :sort_by variable name requested to sort by # @option opts [Array] :expand variable name requested by expand list # @option opts [String] :next_page next page token # @option opts [String] :previous_page Previous page token # @return [Array<(ActionEntityListing, Fixnum, Hash)>] ActionEntityListing data, response status code and response headers def get_integrations_actions_drafts_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IntegrationsApi.get_integrations_actions_drafts ..." end if opts[:'secure'] && !['true', 'false'].include?(opts[:'secure']) fail ArgumentError, 'invalid value for "secure", must be one of true, false' end if opts[:'include_auth_actions'] && !['true', 'false'].include?(opts[:'include_auth_actions']) fail ArgumentError, 'invalid value for "include_auth_actions", must be one of true, false' end # resource path local_var_path = "/api/v2/integrations/actions/drafts".sub('{format}','json') # query parameters query_params = {} query_params[:'category'] = opts[:'category'] if opts[:'category'] query_params[:'secure'] = opts[:'secure'] if opts[:'secure'] query_params[:'includeAuthActions'] = opts[:'include_auth_actions'] if opts[:'include_auth_actions'] query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by'] query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] query_params[:'nextPage'] = opts[:'next_page'] if opts[:'next_page'] query_params[:'previousPage'] = opts[:'previous_page'] if opts[:'previous_page'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] 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 => 'ActionEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: IntegrationsApi#get_integrations_actions_drafts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Patch an Action # # @param action_id actionId # @param body Input used to patch the Action. # @param [Hash] opts the optional parameters # @return [Action] def patch_integrations_action(action_id, body, opts = {}) data, _status_code, _headers = patch_integrations_action_with_http_info(action_id, body, opts) return data end # Patch an Action # # @param action_id actionId # @param body Input used to patch the Action. # @param [Hash] opts the optional parameters # @return [Array<(Action, Fixnum, Hash)>] Action data, response status code and response headers def patch_integrations_action_with_http_info(action_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IntegrationsApi.patch_integrations_action ..." end # verify the required parameter 'action_id' is set fail ArgumentError, "Missing the required parameter 'action_id' when calling IntegrationsApi.patch_integrations_action" if action_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling IntegrationsApi.patch_integrations_action" if body.nil? # resource path local_var_path = "/api/v2/integrations/actions/{actionId}".sub('{format}','json').sub('{' + 'actionId' + '}', action_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Action') if @api_client.config.debugging @api_client.config.logger.debug "API called: IntegrationsApi#patch_integrations_action\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update an existing Draft # # @param action_id actionId # @param body Input used to patch the Action Draft. # @param [Hash] opts the optional parameters # @return [Action] def patch_integrations_action_draft(action_id, body, opts = {}) data, _status_code, _headers = patch_integrations_action_draft_with_http_info(action_id, body, opts) return data end # Update an existing Draft # # @param action_id actionId # @param body Input used to patch the Action Draft. # @param [Hash] opts the optional parameters # @return [Array<(Action, Fixnum, Hash)>] Action data, response status code and response headers def patch_integrations_action_draft_with_http_info(action_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IntegrationsApi.patch_integrations_action_draft ..." end # verify the required parameter 'action_id' is set fail ArgumentError, "Missing the required parameter 'action_id' when calling IntegrationsApi.patch_integrations_action_draft" if action_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling IntegrationsApi.patch_integrations_action_draft" if body.nil? # resource path local_var_path = "/api/v2/integrations/actions/{actionId}/draft".sub('{format}','json').sub('{' + 'actionId' + '}', action_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Action') if @api_client.config.debugging @api_client.config.logger.debug "API called: IntegrationsApi#patch_integrations_action_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a new Draft from existing Action # # @param action_id actionId # @param [Hash] opts the optional parameters # @return [Action] def post_integrations_action_draft(action_id, opts = {}) data, _status_code, _headers = post_integrations_action_draft_with_http_info(action_id, opts) return data end # Create a new Draft from existing Action # # @param action_id actionId # @param [Hash] opts the optional parameters # @return [Array<(Action, Fixnum, Hash)>] Action data, response status code and response headers def post_integrations_action_draft_with_http_info(action_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IntegrationsApi.post_integrations_action_draft ..." end # verify the required parameter 'action_id' is set fail ArgumentError, "Missing the required parameter 'action_id' when calling IntegrationsApi.post_integrations_action_draft" if action_id.nil? # resource path local_var_path = "/api/v2/integrations/actions/{actionId}/draft".sub('{format}','json').sub('{' + 'actionId' + '}', action_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] 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 => 'Action') if @api_client.config.debugging @api_client.config.logger.debug "API called: IntegrationsApi#post_integrations_action_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Publish a Draft and make it the active Action configuration # # @param action_id actionId # @param body Input used to patch the Action. # @param [Hash] opts the optional parameters # @return [Action] def post_integrations_action_draft_publish(action_id, body, opts = {}) data, _status_code, _headers = post_integrations_action_draft_publish_with_http_info(action_id, body, opts) return data end # Publish a Draft and make it the active Action configuration # # @param action_id actionId # @param body Input used to patch the Action. # @param [Hash] opts the optional parameters # @return [Array<(Action, Fixnum, Hash)>] Action data, response status code and response headers def post_integrations_action_draft_publish_with_http_info(action_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IntegrationsApi.post_integrations_action_draft_publish ..." end # verify the required parameter 'action_id' is set fail ArgumentError, "Missing the required parameter 'action_id' when calling IntegrationsApi.post_integrations_action_draft_publish" if action_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling IntegrationsApi.post_integrations_action_draft_publish" if body.nil? # resource path local_var_path = "/api/v2/integrations/actions/{actionId}/draft/publish".sub('{format}','json').sub('{' + 'actionId' + '}', action_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud Auth'] 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 => 'Action') if @api_client.config.debugging @api_client.config.logger.debug "API called: IntegrationsApi#post_integrations_action_draft_publish\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Test the execution of a draft. Responses will show execution steps broken out with intermediate results to help in debugging. # # @param action_id actionId # @param body Map of parameters used for variable substitution. # @param [Hash] opts the optional parameters # @return [TestExecutionResult] def post_integrations_action_draft_test(action_id, body, opts = {}) data, _status_code, _headers = post_integrations_action_draft_test_with_http_info(action_id, body, opts) return data end # Test the execution of a draft. Responses will show execution steps broken out with intermediate results to help in debugging. # # @param action_id actionId # @param body Map of parameters used for variable substitution. # @param [Hash] opts the optional parameters # @return [Array<(TestExecutionResult, Fixnum, Hash)>] TestExecutionResult data, response status code and response headers def post_integrations_action_draft_test_with_http_info(action_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IntegrationsApi.post_integrations_action_draft_test ..." end # verify the required parameter 'action_id' is set fail ArgumentError, "Missing the required parameter 'action_id' when calling IntegrationsApi.post_integrations_action_draft_test" if action_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling IntegrationsApi.post_integrations_action_draft_test" if body.nil? # resource path local_var_path = "/api/v2/integrations/actions/{actionId}/draft/test".sub('{format}','json').sub('{' + 'actionId' + '}', action_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud Auth'] 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 => 'TestExecutionResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: IntegrationsApi#post_integrations_action_draft_test\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Execute Action and return response from 3rd party. Responses will follow the schemas defined on the Action for success and error. # # @param action_id actionId # @param body Map of parameters used for variable substitution. # @param [Hash] opts the optional parameters # @return [Object] def post_integrations_action_execute(action_id, body, opts = {}) data, _status_code, _headers = post_integrations_action_execute_with_http_info(action_id, body, opts) return data end # Execute Action and return response from 3rd party. Responses will follow the schemas defined on the Action for success and error. # # @param action_id actionId # @param body Map of parameters used for variable substitution. # @param [Hash] opts the optional parameters # @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers def post_integrations_action_execute_with_http_info(action_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IntegrationsApi.post_integrations_action_execute ..." end # verify the required parameter 'action_id' is set fail ArgumentError, "Missing the required parameter 'action_id' when calling IntegrationsApi.post_integrations_action_execute" if action_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling IntegrationsApi.post_integrations_action_execute" if body.nil? # resource path local_var_path = "/api/v2/integrations/actions/{actionId}/execute".sub('{format}','json').sub('{' + 'actionId' + '}', action_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud Auth'] 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: IntegrationsApi#post_integrations_action_execute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Test the execution of an action. Responses will show execution steps broken out with intermediate results to help in debugging. # # @param action_id actionId # @param body Map of parameters used for variable substitution. # @param [Hash] opts the optional parameters # @return [TestExecutionResult] def post_integrations_action_test(action_id, body, opts = {}) data, _status_code, _headers = post_integrations_action_test_with_http_info(action_id, body, opts) return data end # Test the execution of an action. Responses will show execution steps broken out with intermediate results to help in debugging. # # @param action_id actionId # @param body Map of parameters used for variable substitution. # @param [Hash] opts the optional parameters # @return [Array<(TestExecutionResult, Fixnum, Hash)>] TestExecutionResult data, response status code and response headers def post_integrations_action_test_with_http_info(action_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IntegrationsApi.post_integrations_action_test ..." end # verify the required parameter 'action_id' is set fail ArgumentError, "Missing the required parameter 'action_id' when calling IntegrationsApi.post_integrations_action_test" if action_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling IntegrationsApi.post_integrations_action_test" if body.nil? # resource path local_var_path = "/api/v2/integrations/actions/{actionId}/test".sub('{format}','json').sub('{' + 'actionId' + '}', action_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud Auth'] 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 => 'TestExecutionResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: IntegrationsApi#post_integrations_action_test\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a new Action # # @param body Input used to create Action. # @param [Hash] opts the optional parameters # @return [Action] def post_integrations_actions(body, opts = {}) data, _status_code, _headers = post_integrations_actions_with_http_info(body, opts) return data end # Create a new Action # # @param body Input used to create Action. # @param [Hash] opts the optional parameters # @return [Array<(Action, Fixnum, Hash)>] Action data, response status code and response headers def post_integrations_actions_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IntegrationsApi.post_integrations_actions ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling IntegrationsApi.post_integrations_actions" if body.nil? # resource path local_var_path = "/api/v2/integrations/actions".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud Auth'] 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 => 'Action') if @api_client.config.debugging @api_client.config.logger.debug "API called: IntegrationsApi#post_integrations_actions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a new Draft # # @param body Input used to create Action Draft. # @param [Hash] opts the optional parameters # @return [Action] def post_integrations_actions_drafts(body, opts = {}) data, _status_code, _headers = post_integrations_actions_drafts_with_http_info(body, opts) return data end # Create a new Draft # # @param body Input used to create Action Draft. # @param [Hash] opts the optional parameters # @return [Array<(Action, Fixnum, Hash)>] Action data, response status code and response headers def post_integrations_actions_drafts_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IntegrationsApi.post_integrations_actions_drafts ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling IntegrationsApi.post_integrations_actions_drafts" if body.nil? # resource path local_var_path = "/api/v2/integrations/actions/drafts".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud Auth'] 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 => 'Action') if @api_client.config.debugging @api_client.config.logger.debug "API called: IntegrationsApi#post_integrations_actions_drafts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end