lib/purecloud/api/presence_api.rb in purecloud-0.38.1 vs lib/purecloud/api/presence_api.rb in purecloud-0.39.1

- old
+ new

@@ -22,21 +22,21 @@ def initialize(api_client = ApiClient.default) @api_client = api_client end - # Delete an OrganizationPresence + # Delete a Presence Definition # # @param presence_id Organization Presence ID # @param [Hash] opts the optional parameters # @return [OrganizationPresence] def delete_presence_id(presence_id, opts = {}) data, status_code, headers = delete_presence_id_with_http_info(presence_id, opts) return data end - # Delete an OrganizationPresence + # Delete a Presence Definition # # @param presence_id Organization Presence ID # @param [Hash] opts the optional parameters # @return [Array<(OrganizationPresence, Fixnum, Hash)>] OrganizationPresence data, response status code and response headers def delete_presence_id_with_http_info(presence_id, opts = {}) @@ -82,21 +82,21 @@ @api_client.config.logger.debug "API called: PresenceApi#delete_presence_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get an OrganizationPresence + # Get a Presence Definition # # @param presence_id Organization Presence ID # @param [Hash] opts the optional parameters # @return [OrganizationPresence] def get_presence_id(presence_id, opts = {}) data, status_code, headers = get_presence_id_with_http_info(presence_id, opts) return data end - # Get an OrganizationPresence + # Get a Presence Definition # # @param presence_id Organization Presence ID # @param [Hash] opts the optional parameters # @return [Array<(OrganizationPresence, Fixnum, Hash)>] OrganizationPresence data, response status code and response headers def get_presence_id_with_http_info(presence_id, opts = {}) @@ -142,22 +142,22 @@ @api_client.config.logger.debug "API called: PresenceApi#get_presence_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get an Organization's list of Presences + # Get an Organization's list of Presence Definitions # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_number Page number (default to 1) # @option opts [Integer] :page_size Page size (default to 25) # @return [OrganizationPresenceEntityListing] def get_presencedefinitions(opts = {}) data, status_code, headers = get_presencedefinitions_with_http_info(opts) return data end - # Get an Organization&#39;s list of Presences + # Get an Organization&#39;s list of Presence Definitions # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_number Page number # @option opts [Integer] :page_size Page size # @return [Array<(OrganizationPresenceEntityListing, Fixnum, Hash)>] OrganizationPresenceEntityListing data, response status code and response headers @@ -203,10 +203,65 @@ @api_client.config.logger.debug "API called: PresenceApi#get_presencedefinitions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end + # Get the list of SystemPresences + # + # @param [Hash] opts the optional parameters + # @return [SystemPresence] + def get_systempresences(opts = {}) + data, status_code, headers = get_systempresences_with_http_info(opts) + return data + end + + # Get the list of SystemPresences + # + # @param [Hash] opts the optional parameters + # @return [Array<(SystemPresence, Fixnum, Hash)>] SystemPresence data, response status code and response headers + def get_systempresences_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: PresenceApi#get_systempresences ..." + end + + # resource path + local_var_path = "/api/v2/systempresences".sub('{format}','json') + + # query parameters + query_params = {} + + # header parameters + header_params = {} + + # HTTP header 'Accept' (if needed) + _header_accept = ['application/json'] + _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result + + # HTTP header 'Content-Type' + _header_content_type = ['application/json'] + header_params['Content-Type'] = @api_client.select_header_content_type(_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 => 'SystemPresence') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PresenceApi#get_systempresences\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get a user's Presence # # @param user_id user Id # @param source_id Source # @param [Hash] opts the optional parameters @@ -335,23 +390,23 @@ @api_client.config.logger.debug "API called: PresenceApi#patch_user_id_presences_source_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create an OrganizationPresence + # Create a Presence Definition # - # @param body The OrganizationPresence to create + # @param body The Presence Definition to create # @param [Hash] opts the optional parameters # @return [OrganizationPresence] def post_presencedefinitions(body, opts = {}) data, status_code, headers = post_presencedefinitions_with_http_info(body, opts) return data end - # Create an OrganizationPresence + # Create a Presence Definition # - # @param body The OrganizationPresence to create + # @param body The Presence Definition to create # @param [Hash] opts the optional parameters # @return [Array<(OrganizationPresence, Fixnum, Hash)>] OrganizationPresence data, response status code and response headers def post_presencedefinitions_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PresenceApi#post_presencedefinitions ..." @@ -395,21 +450,21 @@ @api_client.config.logger.debug "API called: PresenceApi#post_presencedefinitions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update an OrganizationPresence + # Update a Presence Definition # # @param presence_id Organization Presence ID # @param body The OrganizationPresence to update # @param [Hash] opts the optional parameters # @return [OrganizationPresence] def put_presence_id(presence_id, body, opts = {}) data, status_code, headers = put_presence_id_with_http_info(presence_id, body, opts) return data end - # Update an OrganizationPresence + # Update a Presence Definition # # @param presence_id Organization Presence ID # @param body The OrganizationPresence to update # @param [Hash] opts the optional parameters # @return [Array<(OrganizationPresence, Fixnum, Hash)>] OrganizationPresence data, response status code and response headers