lib/purecloud/api/presence_api.rb in purecloud-0.62.1 vs lib/purecloud/api/presence_api.rb in purecloud-0.63.1
- old
+ new
@@ -81,40 +81,44 @@
@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 a Presence Definition
+ # Get an Organization's list of Presence Definitions
#
- # @param presence_id Organization Presence ID
# @param [Hash] opts the optional parameters
- # @option opts [String] :locale_code The locale code to fetch for the presence definition. Use ALL to fetch everything.
- # @return [OrganizationPresence]
- def get_presence_id(presence_id, opts = {})
- data, status_code, headers = get_presence_id_with_http_info(presence_id, opts)
+ # @option opts [Integer] :page_number Page number (default to 1)
+ # @option opts [Integer] :page_size Page size (default to 25)
+ # @option opts [String] :deleted Deleted query can be TRUE, FALSE or ALL (default to false)
+ # @option opts [String] :locale_code The locale code to fetch for each presence definition. Use ALL to fetch everything.
+ # @return [OrganizationPresenceEntityListing]
+ def get(opts = {})
+ data, status_code, headers = get_with_http_info(opts)
return data
end
- # Get a Presence Definition
+ # Get an Organization's list of Presence Definitions
#
- # @param presence_id Organization Presence ID
# @param [Hash] opts the optional parameters
- # @option opts [String] :locale_code The locale code to fetch for the presence definition. Use ALL to fetch everything.
- # @return [Array<(OrganizationPresence, Fixnum, Hash)>] OrganizationPresence data, response status code and response headers
- def get_presence_id_with_http_info(presence_id, opts = {})
+ # @option opts [Integer] :page_number Page number
+ # @option opts [Integer] :page_size Page size
+ # @option opts [String] :deleted Deleted query can be TRUE, FALSE or ALL
+ # @option opts [String] :locale_code The locale code to fetch for each presence definition. Use ALL to fetch everything.
+ # @return [Array<(OrganizationPresenceEntityListing, Fixnum, Hash)>] OrganizationPresenceEntityListing data, response status code and response headers
+ def get_with_http_info(opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug "Calling API: PresenceApi#get_presence_id ..."
+ @api_client.config.logger.debug "Calling API: PresenceApi#get ..."
end
- # verify the required parameter 'presence_id' is set
- fail "Missing the required parameter 'presence_id' when calling get_presence_id" if presence_id.nil?
-
# resource path
- local_var_path = "/api/v2/presencedefinitions/{presenceId}".sub('{format}','json').sub('{' + 'presenceId' + '}', presence_id.to_s)
+ local_var_path = "/api/v2/presencedefinitions".sub('{format}','json')
# query parameters
query_params = {}
+ query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number']
+ query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size']
+ query_params[:'deleted'] = opts[:'deleted'] if opts[:'deleted']
query_params[:'localeCode'] = opts[:'locale_code'] if opts[:'locale_code']
# header parameters
header_params = {}
@@ -137,51 +141,47 @@
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names,
- :return_type => 'OrganizationPresence')
+ :return_type => 'OrganizationPresenceEntityListing')
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: PresenceApi#get_presence_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: PresenceApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Get an Organization's list of Presence Definitions
+ # Get a Presence Definition
#
+ # @param presence_id Organization Presence ID
# @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)
- # @option opts [String] :deleted Deleted query can be TRUE, FALSE or ALL (default to false)
- # @option opts [String] :locale_code The locale code to fetch for each presence definition. Use ALL to fetch everything.
- # @return [OrganizationPresenceEntityListing]
- def get_presencedefinitions(opts = {})
- data, status_code, headers = get_presencedefinitions_with_http_info(opts)
+ # @option opts [String] :locale_code The locale code to fetch for the presence definition. Use ALL to fetch everything.
+ # @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 Organization's list of Presence Definitions
+ # Get a Presence Definition
#
+ # @param presence_id Organization Presence ID
# @param [Hash] opts the optional parameters
- # @option opts [Integer] :page_number Page number
- # @option opts [Integer] :page_size Page size
- # @option opts [String] :deleted Deleted query can be TRUE, FALSE or ALL
- # @option opts [String] :locale_code The locale code to fetch for each presence definition. Use ALL to fetch everything.
- # @return [Array<(OrganizationPresenceEntityListing, Fixnum, Hash)>] OrganizationPresenceEntityListing data, response status code and response headers
- def get_presencedefinitions_with_http_info(opts = {})
+ # @option opts [String] :locale_code The locale code to fetch for the presence definition. Use ALL to fetch everything.
+ # @return [Array<(OrganizationPresence, Fixnum, Hash)>] OrganizationPresence data, response status code and response headers
+ def get_presence_id_with_http_info(presence_id, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug "Calling API: PresenceApi#get_presencedefinitions ..."
+ @api_client.config.logger.debug "Calling API: PresenceApi#get_presence_id ..."
end
+ # verify the required parameter 'presence_id' is set
+ fail "Missing the required parameter 'presence_id' when calling get_presence_id" if presence_id.nil?
+
# resource path
- local_var_path = "/api/v2/presencedefinitions".sub('{format}','json')
+ local_var_path = "/api/v2/presencedefinitions/{presenceId}".sub('{format}','json').sub('{' + 'presenceId' + '}', presence_id.to_s)
# query parameters
query_params = {}
- query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number']
- query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size']
- query_params[:'deleted'] = opts[:'deleted'] if opts[:'deleted']
query_params[:'localeCode'] = opts[:'locale_code'] if opts[:'locale_code']
# header parameters
header_params = {}
@@ -204,13 +204,13 @@
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names,
- :return_type => 'OrganizationPresenceEntityListing')
+ :return_type => 'OrganizationPresence')
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: PresenceApi#get_presencedefinitions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @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 the list of SystemPresences
@@ -406,27 +406,27 @@
# Create a Presence Definition
#
# @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)
+ def post(body, opts = {})
+ data, status_code, headers = post_with_http_info(body, opts)
return data
end
# Create a Presence Definition
#
# @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 = {})
+ def post_with_http_info(body, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug "Calling API: PresenceApi#post_presencedefinitions ..."
+ @api_client.config.logger.debug "Calling API: PresenceApi#post ..."
end
# verify the required parameter 'body' is set
- fail "Missing the required parameter 'body' when calling post_presencedefinitions" if body.nil?
+ fail "Missing the required parameter 'body' when calling post" if body.nil?
# resource path
local_var_path = "/api/v2/presencedefinitions".sub('{format}','json')
# query parameters
@@ -456,10 +456,10 @@
:form_params => form_params,
:body => post_body,
:auth_names => auth_names,
:return_type => 'OrganizationPresence')
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: PresenceApi#post_presencedefinitions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: PresenceApi#post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Update a Presence Definition