lib/purecloud/api/voicemail_api.rb in purecloud-0.35.1 vs lib/purecloud/api/voicemail_api.rb in purecloud-0.36.1
- old
+ new
@@ -1,35 +1,51 @@
+=begin
+PureCloud API
+
+PureCloud API
+
+OpenAPI spec version: v1
+Contact: chuck.pulfer@inin.com
+Generated by: https://github.com/swagger-api/swagger-codegen.git
+
+License: ININ
+http://www.inin.com
+
+Terms of Service: http://www.inin.com
+
+=end
+
require "uri"
module PureCloud
class VoicemailApi
attr_accessor :api_client
def initialize(api_client = ApiClient.default)
@api_client = api_client
end
- # Get mailbox information
+ # Delete all voicemail messages
#
# @param [Hash] opts the optional parameters
- # @return [VoicemailMailboxInfo]
- def get_mailbox(opts = {})
- data, status_code, headers = get_mailbox_with_http_info(opts)
+ # @return [String]
+ def delete_messages(opts = {})
+ data, status_code, headers = delete_messages_with_http_info(opts)
return data
end
- # Get mailbox information
+ # Delete all voicemail messages
#
# @param [Hash] opts the optional parameters
- # @return [Array<(VoicemailMailboxInfo, Fixnum, Hash)>] VoicemailMailboxInfo data, response status code and response headers
- def get_mailbox_with_http_info(opts = {})
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
+ def delete_messages_with_http_info(opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug "Calling API: VoicemailApi#get_mailbox ..."
+ @api_client.config.logger.debug "Calling API: VoicemailApi#delete_messages ..."
end
# resource path
- path = "/api/v2/voicemail/mailbox".sub('{format}','json')
+ local_var_path = "/api/v2/voicemail/messages".sub('{format}','json')
# query parameters
query_params = {}
# header parameters
@@ -47,45 +63,49 @@
form_params = {}
# http body (model)
post_body = nil
-
auth_names = ['PureCloud Auth']
- data, status_code, headers = @api_client.call_api(:GET, path,
+ 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,
- :return_type => 'VoicemailMailboxInfo')
+ :return_type => 'String')
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: VoicemailApi#get_mailbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: VoicemailApi#delete_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # List voicemail messages
+ # Delete a message.
#
+ # @param message_id Message ID
# @param [Hash] opts the optional parameters
- # @return [VoicemailMessageEntityListing]
- def get_messages(opts = {})
- data, status_code, headers = get_messages_with_http_info(opts)
+ # @return [String]
+ def delete_messages_message_id(message_id, opts = {})
+ data, status_code, headers = delete_messages_message_id_with_http_info(message_id, opts)
return data
end
- # List voicemail messages
+ # Delete a message.
#
+ # @param message_id Message ID
# @param [Hash] opts the optional parameters
- # @return [Array<(VoicemailMessageEntityListing, Fixnum, Hash)>] VoicemailMessageEntityListing data, response status code and response headers
- def get_messages_with_http_info(opts = {})
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
+ def delete_messages_message_id_with_http_info(message_id, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug "Calling API: VoicemailApi#get_messages ..."
+ @api_client.config.logger.debug "Calling API: VoicemailApi#delete_messages_message_id ..."
end
+ # verify the required parameter 'message_id' is set
+ fail "Missing the required parameter 'message_id' when calling delete_messages_message_id" if message_id.nil?
+
# resource path
- path = "/api/v2/voicemail/messages".sub('{format}','json')
+ local_var_path = "/api/v2/voicemail/messages/{messageId}".sub('{format}','json').sub('{' + 'messageId' + '}', message_id.to_s)
# query parameters
query_params = {}
# header parameters
@@ -103,45 +123,44 @@
form_params = {}
# http body (model)
post_body = nil
-
auth_names = ['PureCloud Auth']
- data, status_code, headers = @api_client.call_api(:GET, path,
+ 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,
- :return_type => 'VoicemailMessageEntityListing')
+ :return_type => 'String')
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: VoicemailApi#get_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: VoicemailApi#delete_messages_message_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Delete all voicemail messages
+ # Get mailbox information
#
# @param [Hash] opts the optional parameters
- # @return [String]
- def delete_messages(opts = {})
- data, status_code, headers = delete_messages_with_http_info(opts)
+ # @return [VoicemailMailboxInfo]
+ def get_mailbox(opts = {})
+ data, status_code, headers = get_mailbox_with_http_info(opts)
return data
end
- # Delete all voicemail messages
+ # Get mailbox information
#
# @param [Hash] opts the optional parameters
- # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
- def delete_messages_with_http_info(opts = {})
+ # @return [Array<(VoicemailMailboxInfo, Fixnum, Hash)>] VoicemailMailboxInfo data, response status code and response headers
+ def get_mailbox_with_http_info(opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug "Calling API: VoicemailApi#delete_messages ..."
+ @api_client.config.logger.debug "Calling API: VoicemailApi#get_mailbox ..."
end
# resource path
- path = "/api/v2/voicemail/messages".sub('{format}','json')
+ local_var_path = "/api/v2/voicemail/mailbox".sub('{format}','json')
# query parameters
query_params = {}
# header parameters
@@ -159,50 +178,44 @@
form_params = {}
# http body (model)
post_body = nil
-
auth_names = ['PureCloud Auth']
- data, status_code, headers = @api_client.call_api(:DELETE, path,
+ 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')
+ :return_type => 'VoicemailMailboxInfo')
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: VoicemailApi#delete_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: VoicemailApi#get_mailbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Get message.
+ # List voicemail messages
#
- # @param message_id Message ID
# @param [Hash] opts the optional parameters
- # @return [VoicemailMessage]
- def get_messages_message_id(message_id, opts = {})
- data, status_code, headers = get_messages_message_id_with_http_info(message_id, opts)
+ # @return [VoicemailMessageEntityListing]
+ def get_messages(opts = {})
+ data, status_code, headers = get_messages_with_http_info(opts)
return data
end
- # Get message.
+ # List voicemail messages
#
- # @param message_id Message ID
# @param [Hash] opts the optional parameters
- # @return [Array<(VoicemailMessage, Fixnum, Hash)>] VoicemailMessage data, response status code and response headers
- def get_messages_message_id_with_http_info(message_id, opts = {})
+ # @return [Array<(VoicemailMessageEntityListing, Fixnum, Hash)>] VoicemailMessageEntityListing data, response status code and response headers
+ def get_messages_with_http_info(opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug "Calling API: VoicemailApi#get_messages_message_id ..."
+ @api_client.config.logger.debug "Calling API: VoicemailApi#get_messages ..."
end
- # verify the required parameter 'message_id' is set
- fail "Missing the required parameter 'message_id' when calling get_messages_message_id" if message_id.nil?
-
# resource path
- path = "/api/v2/voicemail/messages/{messageId}".sub('{format}','json').sub('{' + 'messageId' + '}', message_id.to_s)
+ local_var_path = "/api/v2/voicemail/messages".sub('{format}','json')
# query parameters
query_params = {}
# header parameters
@@ -220,52 +233,49 @@
form_params = {}
# http body (model)
post_body = nil
-
auth_names = ['PureCloud Auth']
- data, status_code, headers = @api_client.call_api(:GET, path,
+ 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 => 'VoicemailMessage')
+ :return_type => 'VoicemailMessageEntityListing')
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: VoicemailApi#get_messages_message_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: VoicemailApi#get_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Update a message.
+ # Get message.
#
# @param message_id Message ID
# @param [Hash] opts the optional parameters
- # @option opts [VoicemailMessage] :body VoicemailMessage
# @return [VoicemailMessage]
- def put_messages_message_id(message_id, opts = {})
- data, status_code, headers = put_messages_message_id_with_http_info(message_id, opts)
+ def get_messages_message_id(message_id, opts = {})
+ data, status_code, headers = get_messages_message_id_with_http_info(message_id, opts)
return data
end
- # Update a message.
+ # Get message.
#
# @param message_id Message ID
# @param [Hash] opts the optional parameters
- # @option opts [VoicemailMessage] :body VoicemailMessage
# @return [Array<(VoicemailMessage, Fixnum, Hash)>] VoicemailMessage data, response status code and response headers
- def put_messages_message_id_with_http_info(message_id, opts = {})
+ def get_messages_message_id_with_http_info(message_id, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug "Calling API: VoicemailApi#put_messages_message_id ..."
+ @api_client.config.logger.debug "Calling API: VoicemailApi#get_messages_message_id ..."
end
# verify the required parameter 'message_id' is set
- fail "Missing the required parameter 'message_id' when calling put_messages_message_id" if message_id.nil?
+ fail "Missing the required parameter 'message_id' when calling get_messages_message_id" if message_id.nil?
# resource path
- path = "/api/v2/voicemail/messages/{messageId}".sub('{format}','json').sub('{' + 'messageId' + '}', message_id.to_s)
+ local_var_path = "/api/v2/voicemail/messages/{messageId}".sub('{format}','json').sub('{' + 'messageId' + '}', message_id.to_s)
# query parameters
query_params = {}
# header parameters
@@ -281,55 +291,61 @@
# form parameters
form_params = {}
# http body (model)
- post_body = @api_client.object_to_http_body(opts[:'body'])
+ post_body = nil
-
auth_names = ['PureCloud Auth']
- data, status_code, headers = @api_client.call_api(:PUT, path,
+ 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 => 'VoicemailMessage')
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: VoicemailApi#put_messages_message_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: VoicemailApi#get_messages_message_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Delete a message.
+ # Get media playback URI for this message
#
# @param message_id Message ID
# @param [Hash] opts the optional parameters
- # @return [String]
- def delete_messages_message_id(message_id, opts = {})
- data, status_code, headers = delete_messages_message_id_with_http_info(message_id, opts)
+ # @option opts [String] :format_id The desired media format (WEBM, WAV) (default to WEBM)
+ # @return [VoicemailMediaInfo]
+ def get_messages_message_id_media(message_id, opts = {})
+ data, status_code, headers = get_messages_message_id_media_with_http_info(message_id, opts)
return data
end
- # Delete a message.
+ # Get media playback URI for this message
#
# @param message_id Message ID
# @param [Hash] opts the optional parameters
- # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
- def delete_messages_message_id_with_http_info(message_id, opts = {})
+ # @option opts [String] :format_id The desired media format (WEBM, WAV)
+ # @return [Array<(VoicemailMediaInfo, Fixnum, Hash)>] VoicemailMediaInfo data, response status code and response headers
+ def get_messages_message_id_media_with_http_info(message_id, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug "Calling API: VoicemailApi#delete_messages_message_id ..."
+ @api_client.config.logger.debug "Calling API: VoicemailApi#get_messages_message_id_media ..."
end
# verify the required parameter 'message_id' is set
- fail "Missing the required parameter 'message_id' when calling delete_messages_message_id" if message_id.nil?
+ fail "Missing the required parameter 'message_id' when calling get_messages_message_id_media" if message_id.nil?
+ if opts[:'format_id'] && !['WEBM', 'WAV'].include?(opts[:'format_id'])
+ fail 'invalid value for "format_id", must be one of WEBM, WAV'
+ end
+
# resource path
- path = "/api/v2/voicemail/messages/{messageId}".sub('{format}','json').sub('{' + 'messageId' + '}', message_id.to_s)
+ local_var_path = "/api/v2/voicemail/messages/{messageId}/media".sub('{format}','json').sub('{' + 'messageId' + '}', message_id.to_s)
# query parameters
query_params = {}
+ query_params[:'formatId'] = opts[:'format_id'] if opts[:'format_id']
# header parameters
header_params = {}
# HTTP header 'Accept' (if needed)
@@ -344,60 +360,47 @@
form_params = {}
# http body (model)
post_body = nil
-
auth_names = ['PureCloud Auth']
- data, status_code, headers = @api_client.call_api(:DELETE, path,
+ 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')
+ :return_type => 'VoicemailMediaInfo')
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: VoicemailApi#delete_messages_message_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: VoicemailApi#get_messages_message_id_media\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Get media playback URI for this message
+ # Get a policy
#
- # @param message_id Message ID
# @param [Hash] opts the optional parameters
- # @option opts [String] :format_id The desired media format (WEBM, WAV)
- # @return [VoicemailMediaInfo]
- def get_messages_message_id_media(message_id, opts = {})
- data, status_code, headers = get_messages_message_id_media_with_http_info(message_id, opts)
+ # @return [VoicemailOrganizationPolicy]
+ def get_policy(opts = {})
+ data, status_code, headers = get_policy_with_http_info(opts)
return data
end
- # Get media playback URI for this message
+ # Get a policy
#
- # @param message_id Message ID
# @param [Hash] opts the optional parameters
- # @option opts [String] :format_id The desired media format (WEBM, WAV)
- # @return [Array<(VoicemailMediaInfo, Fixnum, Hash)>] VoicemailMediaInfo data, response status code and response headers
- def get_messages_message_id_media_with_http_info(message_id, opts = {})
+ # @return [Array<(VoicemailOrganizationPolicy, Fixnum, Hash)>] VoicemailOrganizationPolicy data, response status code and response headers
+ def get_policy_with_http_info(opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug "Calling API: VoicemailApi#get_messages_message_id_media ..."
+ @api_client.config.logger.debug "Calling API: VoicemailApi#get_policy ..."
end
- # verify the required parameter 'message_id' is set
- fail "Missing the required parameter 'message_id' when calling get_messages_message_id_media" if message_id.nil?
-
- if opts[:'format_id'] && !['WEBM', 'WAV'].include?(opts[:'format_id'])
- fail 'invalid value for "format_id", must be one of WEBM, WAV'
- end
-
# resource path
- path = "/api/v2/voicemail/messages/{messageId}/media".sub('{format}','json').sub('{' + 'messageId' + '}', message_id.to_s)
+ local_var_path = "/api/v2/voicemail/policy".sub('{format}','json')
# query parameters
query_params = {}
- query_params[:'formatId'] = opts[:'format_id'] if opts[:'format_id']
# header parameters
header_params = {}
# HTTP header 'Accept' (if needed)
@@ -412,45 +415,49 @@
form_params = {}
# http body (model)
post_body = nil
-
auth_names = ['PureCloud Auth']
- data, status_code, headers = @api_client.call_api(:GET, path,
+ 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 => 'VoicemailMediaInfo')
+ :return_type => 'VoicemailOrganizationPolicy')
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: VoicemailApi#get_messages_message_id_media\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: VoicemailApi#get_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Get a policy
+ # Get a user's voicemail policy
#
+ # @param user_id User ID
# @param [Hash] opts the optional parameters
- # @return [VoicemailOrganizationPolicy]
- def get_policy(opts = {})
- data, status_code, headers = get_policy_with_http_info(opts)
+ # @return [VoicemailUserPolicy]
+ def get_userpolicies_user_id(user_id, opts = {})
+ data, status_code, headers = get_userpolicies_user_id_with_http_info(user_id, opts)
return data
end
- # Get a policy
+ # Get a user's voicemail policy
#
+ # @param user_id User ID
# @param [Hash] opts the optional parameters
- # @return [Array<(VoicemailOrganizationPolicy, Fixnum, Hash)>] VoicemailOrganizationPolicy data, response status code and response headers
- def get_policy_with_http_info(opts = {})
+ # @return [Array<(VoicemailUserPolicy, Fixnum, Hash)>] VoicemailUserPolicy data, response status code and response headers
+ def get_userpolicies_user_id_with_http_info(user_id, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug "Calling API: VoicemailApi#get_policy ..."
+ @api_client.config.logger.debug "Calling API: VoicemailApi#get_userpolicies_user_id ..."
end
+ # verify the required parameter 'user_id' is set
+ fail "Missing the required parameter 'user_id' when calling get_userpolicies_user_id" if user_id.nil?
+
# resource path
- path = "/api/v2/voicemail/policy".sub('{format}','json')
+ local_var_path = "/api/v2/voicemail/userpolicies/{userId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s)
# query parameters
query_params = {}
# header parameters
@@ -468,47 +475,54 @@
form_params = {}
# http body (model)
post_body = nil
-
auth_names = ['PureCloud Auth']
- data, status_code, headers = @api_client.call_api(:GET, path,
+ 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 => 'VoicemailOrganizationPolicy')
+ :return_type => 'VoicemailUserPolicy')
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: VoicemailApi#get_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: VoicemailApi#get_userpolicies_user_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Update a policy
+ # Update a user's voicemail policy
#
+ # @param user_id User ID
+ # @param body The user's voicemail policy
# @param [Hash] opts the optional parameters
- # @option opts [VoicemailOrganizationPolicy] :body Policy
- # @return [VoicemailOrganizationPolicy]
- def put_policy(opts = {})
- data, status_code, headers = put_policy_with_http_info(opts)
+ # @return [VoicemailUserPolicy]
+ def patch_userpolicies_user_id(user_id, body, opts = {})
+ data, status_code, headers = patch_userpolicies_user_id_with_http_info(user_id, body, opts)
return data
end
- # Update a policy
+ # Update a user's voicemail policy
#
+ # @param user_id User ID
+ # @param body The user's voicemail policy
# @param [Hash] opts the optional parameters
- # @option opts [VoicemailOrganizationPolicy] :body Policy
- # @return [Array<(VoicemailOrganizationPolicy, Fixnum, Hash)>] VoicemailOrganizationPolicy data, response status code and response headers
- def put_policy_with_http_info(opts = {})
+ # @return [Array<(VoicemailUserPolicy, Fixnum, Hash)>] VoicemailUserPolicy data, response status code and response headers
+ def patch_userpolicies_user_id_with_http_info(user_id, body, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug "Calling API: VoicemailApi#put_policy ..."
+ @api_client.config.logger.debug "Calling API: VoicemailApi#patch_userpolicies_user_id ..."
end
+ # verify the required parameter 'user_id' is set
+ fail "Missing the required parameter 'user_id' when calling patch_userpolicies_user_id" if user_id.nil?
+
+ # verify the required parameter 'body' is set
+ fail "Missing the required parameter 'body' when calling patch_userpolicies_user_id" if body.nil?
+
# resource path
- path = "/api/v2/voicemail/policy".sub('{format}','json')
+ local_var_path = "/api/v2/voicemail/userpolicies/{userId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s)
# query parameters
query_params = {}
# header parameters
@@ -524,52 +538,53 @@
# 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(:PUT, path,
+ 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 => 'VoicemailOrganizationPolicy')
+ :return_type => 'VoicemailUserPolicy')
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: VoicemailApi#put_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: VoicemailApi#patch_userpolicies_user_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Get a user's voicemail policy
+ # Update a message.
#
- # @param user_id User ID
+ # @param message_id Message ID
# @param [Hash] opts the optional parameters
- # @return [VoicemailUserPolicy]
- def get_userpolicies_user_id(user_id, opts = {})
- data, status_code, headers = get_userpolicies_user_id_with_http_info(user_id, opts)
+ # @option opts [VoicemailMessage] :body VoicemailMessage
+ # @return [VoicemailMessage]
+ def put_messages_message_id(message_id, opts = {})
+ data, status_code, headers = put_messages_message_id_with_http_info(message_id, opts)
return data
end
- # Get a user's voicemail policy
+ # Update a message.
#
- # @param user_id User ID
+ # @param message_id Message ID
# @param [Hash] opts the optional parameters
- # @return [Array<(VoicemailUserPolicy, Fixnum, Hash)>] VoicemailUserPolicy data, response status code and response headers
- def get_userpolicies_user_id_with_http_info(user_id, opts = {})
+ # @option opts [VoicemailMessage] :body VoicemailMessage
+ # @return [Array<(VoicemailMessage, Fixnum, Hash)>] VoicemailMessage data, response status code and response headers
+ def put_messages_message_id_with_http_info(message_id, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug "Calling API: VoicemailApi#get_userpolicies_user_id ..."
+ @api_client.config.logger.debug "Calling API: VoicemailApi#put_messages_message_id ..."
end
- # verify the required parameter 'user_id' is set
- fail "Missing the required parameter 'user_id' when calling get_userpolicies_user_id" if user_id.nil?
+ # verify the required parameter 'message_id' is set
+ fail "Missing the required parameter 'message_id' when calling put_messages_message_id" if message_id.nil?
# resource path
- path = "/api/v2/voicemail/userpolicies/{userId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s)
+ local_var_path = "/api/v2/voicemail/messages/{messageId}".sub('{format}','json').sub('{' + 'messageId' + '}', message_id.to_s)
# query parameters
query_params = {}
# header parameters
@@ -585,57 +600,48 @@
# form parameters
form_params = {}
# http body (model)
- post_body = nil
+ post_body = @api_client.object_to_http_body(opts[:'body'])
-
auth_names = ['PureCloud Auth']
- data, status_code, headers = @api_client.call_api(:GET, path,
+ 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 => 'VoicemailUserPolicy')
+ :return_type => 'VoicemailMessage')
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: VoicemailApi#get_userpolicies_user_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: VoicemailApi#put_messages_message_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Update a user's voicemail policy
+ # Update a policy
#
- # @param user_id User ID
- # @param body The user's voicemail policy
# @param [Hash] opts the optional parameters
- # @return [VoicemailUserPolicy]
- def patch_userpolicies_user_id(user_id, body, opts = {})
- data, status_code, headers = patch_userpolicies_user_id_with_http_info(user_id, body, opts)
+ # @option opts [VoicemailOrganizationPolicy] :body Policy
+ # @return [VoicemailOrganizationPolicy]
+ def put_policy(opts = {})
+ data, status_code, headers = put_policy_with_http_info(opts)
return data
end
- # Update a user's voicemail policy
+ # Update a policy
#
- # @param user_id User ID
- # @param body The user's voicemail policy
# @param [Hash] opts the optional parameters
- # @return [Array<(VoicemailUserPolicy, Fixnum, Hash)>] VoicemailUserPolicy data, response status code and response headers
- def patch_userpolicies_user_id_with_http_info(user_id, body, opts = {})
+ # @option opts [VoicemailOrganizationPolicy] :body Policy
+ # @return [Array<(VoicemailOrganizationPolicy, Fixnum, Hash)>] VoicemailOrganizationPolicy data, response status code and response headers
+ def put_policy_with_http_info(opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug "Calling API: VoicemailApi#patch_userpolicies_user_id ..."
+ @api_client.config.logger.debug "Calling API: VoicemailApi#put_policy ..."
end
- # verify the required parameter 'user_id' is set
- fail "Missing the required parameter 'user_id' when calling patch_userpolicies_user_id" if user_id.nil?
-
- # verify the required parameter 'body' is set
- fail "Missing the required parameter 'body' when calling patch_userpolicies_user_id" if body.nil?
-
# resource path
- path = "/api/v2/voicemail/userpolicies/{userId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s)
+ local_var_path = "/api/v2/voicemail/policy".sub('{format}','json')
# query parameters
query_params = {}
# header parameters
@@ -651,27 +657,22 @@
# form parameters
form_params = {}
# http body (model)
- post_body = @api_client.object_to_http_body(body)
+ post_body = @api_client.object_to_http_body(opts[:'body'])
-
auth_names = ['PureCloud Auth']
- data, status_code, headers = @api_client.call_api(:PATCH, path,
+ 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 => 'VoicemailUserPolicy')
+ :return_type => 'VoicemailOrganizationPolicy')
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: VoicemailApi#patch_userpolicies_user_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: VoicemailApi#put_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
end
end
-
-
-
-