lib/purecloud/api/presence_api.rb in purecloud-0.44.1 vs lib/purecloud/api/presence_api.rb in purecloud-0.45.1
- old
+ new
@@ -330,36 +330,39 @@
# Patch a user's Presence
# The presence object can be patched one of three ways. Option 1: Set the 'primary' property to true. This will set the 'source' defined in the path as the user's primary presence source. Option 2: Provide the presenceDefinition value. The 'id' is the only value required within the presenceDefinition. Option 3: Provide the message value. Option 1 can be combined with Option 2 and/or Option 3.
# @param user_id user Id
# @param source_id Source
+ # @param body User presence
# @param [Hash] opts the optional parameters
- # @option opts [UserPresence] :body
# @return [UserPresence]
- def patch_user_id_presences_source_id(user_id, source_id, opts = {})
- data, status_code, headers = patch_user_id_presences_source_id_with_http_info(user_id, source_id, opts)
+ def patch_user_id_presences_source_id(user_id, source_id, body, opts = {})
+ data, status_code, headers = patch_user_id_presences_source_id_with_http_info(user_id, source_id, body, opts)
return data
end
# Patch a user's Presence
# The presence object can be patched one of three ways. Option 1: Set the 'primary' property to true. This will set the 'source' defined in the path as the user's primary presence source. Option 2: Provide the presenceDefinition value. The 'id' is the only value required within the presenceDefinition. Option 3: Provide the message value. Option 1 can be combined with Option 2 and/or Option 3.
# @param user_id user Id
# @param source_id Source
+ # @param body User presence
# @param [Hash] opts the optional parameters
- # @option opts [UserPresence] :body
# @return [Array<(UserPresence, Fixnum, Hash)>] UserPresence data, response status code and response headers
- def patch_user_id_presences_source_id_with_http_info(user_id, source_id, opts = {})
+ def patch_user_id_presences_source_id_with_http_info(user_id, source_id, body, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug "Calling API: PresenceApi#patch_user_id_presences_source_id ..."
end
# verify the required parameter 'user_id' is set
fail "Missing the required parameter 'user_id' when calling patch_user_id_presences_source_id" if user_id.nil?
# verify the required parameter 'source_id' is set
fail "Missing the required parameter 'source_id' when calling patch_user_id_presences_source_id" if source_id.nil?
+ # verify the required parameter 'body' is set
+ fail "Missing the required parameter 'body' when calling patch_user_id_presences_source_id" if body.nil?
+
# resource path
local_var_path = "/api/v2/users/{userId}/presences/{sourceId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'sourceId' + '}', source_id.to_s)
# query parameters
query_params = {}
@@ -377,10 +380,10 @@
# form parameters
form_params = {}
# http body (model)
- post_body = @api_client.object_to_http_body(opts[:'body'])
+ 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,