class PureCloud::VoicemailApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 23
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

delete_voicemail_message(message_id, opts = {}) click to toggle source

Delete a voicemail message. A user voicemail can only be deleted by its associated user. A group voicemail can only be deleted by a user that is a member of the group. A queue voicemail can only be deleted by a user with the acd voicemail delete permission. @param message_id Message ID @param [Hash] opts the optional parameters @return [nil]

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 32
def delete_voicemail_message(message_id, opts = {})
  delete_voicemail_message_with_http_info(message_id, opts)
  return nil
end
delete_voicemail_message_with_http_info(message_id, opts = {}) click to toggle source

Delete a voicemail message. A user voicemail can only be deleted by its associated user. A group voicemail can only be deleted by a user that is a member of the group. A queue voicemail can only be deleted by a user with the acd voicemail delete permission. @param message_id Message ID @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 42
def delete_voicemail_message_with_http_info(message_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: VoicemailApi.delete_voicemail_message ..."
  end
  
  
  # verify the required parameter 'message_id' is set
  fail ArgumentError, "Missing the required parameter 'message_id' when calling VoicemailApi.delete_voicemail_message" if message_id.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/voicemail/messages/{messageId}".sub('{format}','json').sub('{' + 'messageId' + '}', message_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 OAuth']
  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: VoicemailApi#delete_voicemail_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_voicemail_messages(opts = {}) click to toggle source

Delete all voicemail messages

@param [Hash] opts the optional parameters @return [nil]

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 95
def delete_voicemail_messages(opts = {})
  delete_voicemail_messages_with_http_info(opts)
  return nil
end
delete_voicemail_messages_with_http_info(opts = {}) click to toggle source

Delete all voicemail messages

@param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 104
def delete_voicemail_messages_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: VoicemailApi.delete_voicemail_messages ..."
  end
  
  # resource path
  local_var_path = "/api/v2/voicemail/messages".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 = nil
  
  auth_names = ['PureCloud OAuth']
  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: VoicemailApi#delete_voicemail_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_voicemail_group_mailbox(group_id, opts = {}) click to toggle source

Get the group's mailbox information

@param group_id groupId @param [Hash] opts the optional parameters @return [VoicemailMailboxInfo]

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 150
def get_voicemail_group_mailbox(group_id, opts = {})
  data, _status_code, _headers = get_voicemail_group_mailbox_with_http_info(group_id, opts)
  return data
end
get_voicemail_group_mailbox_with_http_info(group_id, opts = {}) click to toggle source

Get the group&#39;s mailbox information

@param group_id groupId @param [Hash] opts the optional parameters @return [Array<(VoicemailMailboxInfo, Fixnum, Hash)>] VoicemailMailboxInfo data, response status code and response headers

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 160
def get_voicemail_group_mailbox_with_http_info(group_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: VoicemailApi.get_voicemail_group_mailbox ..."
  end
  
  
  # verify the required parameter 'group_id' is set
  fail ArgumentError, "Missing the required parameter 'group_id' when calling VoicemailApi.get_voicemail_group_mailbox" if group_id.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/voicemail/groups/{groupId}/mailbox".sub('{format}','json').sub('{' + 'groupId' + '}', group_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 OAuth']
  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 => 'VoicemailMailboxInfo')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VoicemailApi#get_voicemail_group_mailbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_voicemail_group_messages(group_id, opts = {}) click to toggle source

List voicemail messages

@param group_id Group ID @param [Hash] opts the optional parameters @option opts [Integer] :page_size Page size (default to 25) @option opts [Integer] :page_number Page number (default to 1) @return [VoicemailMessageEntityListing]

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 217
def get_voicemail_group_messages(group_id, opts = {})
  data, _status_code, _headers = get_voicemail_group_messages_with_http_info(group_id, opts)
  return data
end
get_voicemail_group_messages_with_http_info(group_id, opts = {}) click to toggle source

List voicemail messages

@param group_id Group ID @param [Hash] opts the optional parameters @option opts [Integer] :page_size Page size @option opts [Integer] :page_number Page number @return [Array<(VoicemailMessageEntityListing, Fixnum, Hash)>] VoicemailMessageEntityListing data, response status code and response headers

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 229
def get_voicemail_group_messages_with_http_info(group_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: VoicemailApi.get_voicemail_group_messages ..."
  end
  
  
  # verify the required parameter 'group_id' is set
  fail ArgumentError, "Missing the required parameter 'group_id' when calling VoicemailApi.get_voicemail_group_messages" if group_id.nil?
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/voicemail/groups/{groupId}/messages".sub('{format}','json').sub('{' + 'groupId' + '}', group_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size']
  query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number']

  # 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 OAuth']
  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 => 'VoicemailMessageEntityListing')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VoicemailApi#get_voicemail_group_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_voicemail_group_policy(group_id, opts = {}) click to toggle source

Get a group's voicemail policy

@param group_id Group ID @param [Hash] opts the optional parameters @return [VoicemailGroupPolicy]

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 298
def get_voicemail_group_policy(group_id, opts = {})
  data, _status_code, _headers = get_voicemail_group_policy_with_http_info(group_id, opts)
  return data
end
get_voicemail_group_policy_with_http_info(group_id, opts = {}) click to toggle source

Get a group&#39;s voicemail policy

@param group_id Group ID @param [Hash] opts the optional parameters @return [Array<(VoicemailGroupPolicy, Fixnum, Hash)>] VoicemailGroupPolicy data, response status code and response headers

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 308
def get_voicemail_group_policy_with_http_info(group_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: VoicemailApi.get_voicemail_group_policy ..."
  end
  
  
  # verify the required parameter 'group_id' is set
  fail ArgumentError, "Missing the required parameter 'group_id' when calling VoicemailApi.get_voicemail_group_policy" if group_id.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/voicemail/groups/{groupId}/policy".sub('{format}','json').sub('{' + 'groupId' + '}', group_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 OAuth']
  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 => 'VoicemailGroupPolicy')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VoicemailApi#get_voicemail_group_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_voicemail_mailbox(opts = {}) click to toggle source

Get the current user's mailbox information

@param [Hash] opts the optional parameters @return [VoicemailMailboxInfo]

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 362
def get_voicemail_mailbox(opts = {})
  data, _status_code, _headers = get_voicemail_mailbox_with_http_info(opts)
  return data
end
get_voicemail_mailbox_with_http_info(opts = {}) click to toggle source

Get the current user&#39;s mailbox information

@param [Hash] opts the optional parameters @return [Array<(VoicemailMailboxInfo, Fixnum, Hash)>] VoicemailMailboxInfo data, response status code and response headers

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 371
def get_voicemail_mailbox_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: VoicemailApi.get_voicemail_mailbox ..."
  end
  
  # resource path
  local_var_path = "/api/v2/voicemail/mailbox".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 = nil
  
  auth_names = ['PureCloud OAuth']
  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 => 'VoicemailMailboxInfo')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VoicemailApi#get_voicemail_mailbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_voicemail_me_mailbox(opts = {}) click to toggle source

Get the current user's mailbox information

@param [Hash] opts the optional parameters @return [VoicemailMailboxInfo]

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 417
def get_voicemail_me_mailbox(opts = {})
  data, _status_code, _headers = get_voicemail_me_mailbox_with_http_info(opts)
  return data
end
get_voicemail_me_mailbox_with_http_info(opts = {}) click to toggle source

Get the current user&#39;s mailbox information

@param [Hash] opts the optional parameters @return [Array<(VoicemailMailboxInfo, Fixnum, Hash)>] VoicemailMailboxInfo data, response status code and response headers

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 426
def get_voicemail_me_mailbox_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: VoicemailApi.get_voicemail_me_mailbox ..."
  end
  
  # resource path
  local_var_path = "/api/v2/voicemail/me/mailbox".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 = nil
  
  auth_names = ['PureCloud OAuth']
  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 => 'VoicemailMailboxInfo')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VoicemailApi#get_voicemail_me_mailbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_voicemail_me_messages(opts = {}) click to toggle source

List voicemail messages

@param [Hash] opts the optional parameters @option opts [Integer] :page_size Page size (default to 25) @option opts [Integer] :page_number Page number (default to 1) @return [VoicemailMessageEntityListing]

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 474
def get_voicemail_me_messages(opts = {})
  data, _status_code, _headers = get_voicemail_me_messages_with_http_info(opts)
  return data
end
get_voicemail_me_messages_with_http_info(opts = {}) click to toggle source

List voicemail messages

@param [Hash] opts the optional parameters @option opts [Integer] :page_size Page size @option opts [Integer] :page_number Page number @return [Array<(VoicemailMessageEntityListing, Fixnum, Hash)>] VoicemailMessageEntityListing data, response status code and response headers

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 485
def get_voicemail_me_messages_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: VoicemailApi.get_voicemail_me_messages ..."
  end
  
  
  
  
  
  
  
  
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/voicemail/me/messages".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size']
  query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number']

  # 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 OAuth']
  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 => 'VoicemailMessageEntityListing')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VoicemailApi#get_voicemail_me_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_voicemail_me_policy(opts = {}) click to toggle source

Get the current user's voicemail policy

@param [Hash] opts the optional parameters @return [VoicemailUserPolicy]

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 545
def get_voicemail_me_policy(opts = {})
  data, _status_code, _headers = get_voicemail_me_policy_with_http_info(opts)
  return data
end
get_voicemail_me_policy_with_http_info(opts = {}) click to toggle source

Get the current user&#39;s voicemail policy

@param [Hash] opts the optional parameters @return [Array<(VoicemailUserPolicy, Fixnum, Hash)>] VoicemailUserPolicy data, response status code and response headers

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 554
def get_voicemail_me_policy_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: VoicemailApi.get_voicemail_me_policy ..."
  end
  
  # resource path
  local_var_path = "/api/v2/voicemail/me/policy".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 = nil
  
  auth_names = ['PureCloud OAuth']
  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 => 'VoicemailUserPolicy')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VoicemailApi#get_voicemail_me_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_voicemail_message(message_id, opts = {}) click to toggle source

Get a voicemail message

@param message_id Message ID @param [Hash] opts the optional parameters @option opts [Array<String>] :expand If the caller is a known user, which fields, if any, to expand @return [VoicemailMessage]

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 602
def get_voicemail_message(message_id, opts = {})
  data, _status_code, _headers = get_voicemail_message_with_http_info(message_id, opts)
  return data
end
get_voicemail_message_media(message_id, opts = {}) click to toggle source

Get media playback URI for this voicemail message

@param message_id Message ID @param [Hash] opts the optional parameters @option opts [String] :format_id The desired media format. (default to WEBM) @return [VoicemailMediaInfo]

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 676
def get_voicemail_message_media(message_id, opts = {})
  data, _status_code, _headers = get_voicemail_message_media_with_http_info(message_id, opts)
  return data
end
get_voicemail_message_media_with_http_info(message_id, opts = {}) click to toggle source

Get media playback URI for this voicemail message

@param message_id Message ID @param [Hash] opts the optional parameters @option opts [String] :format_id The desired media format. @return [Array<(VoicemailMediaInfo, Fixnum, Hash)>] VoicemailMediaInfo data, response status code and response headers

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 687
def get_voicemail_message_media_with_http_info(message_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: VoicemailApi.get_voicemail_message_media ..."
  end
  
  
  # verify the required parameter 'message_id' is set
  fail ArgumentError, "Missing the required parameter 'message_id' when calling VoicemailApi.get_voicemail_message_media" if message_id.nil?
  
  
  
  
  
  
  
  
  if opts[:'format_id'] && !['WAV', 'WEBM', 'WAV_ULAW', 'OGG_VORBIS', 'OGG_OPUS', 'MP3', 'NONE'].include?(opts[:'format_id'])
    fail ArgumentError, 'invalid value for "format_id", must be one of WAV, WEBM, WAV_ULAW, OGG_VORBIS, OGG_OPUS, MP3, NONE'
  end
  
  
  
  
  # resource path
  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)
  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 OAuth']
  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')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VoicemailApi#get_voicemail_message_media\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_voicemail_message_with_http_info(message_id, opts = {}) click to toggle source

Get a voicemail message

@param message_id Message ID @param [Hash] opts the optional parameters @option opts [Array<String>] :expand If the caller is a known user, which fields, if any, to expand @return [Array<(VoicemailMessage, Fixnum, Hash)>] VoicemailMessage data, response status code and response headers

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 613
def get_voicemail_message_with_http_info(message_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: VoicemailApi.get_voicemail_message ..."
  end
  
  
  # verify the required parameter 'message_id' is set
  fail ArgumentError, "Missing the required parameter 'message_id' when calling VoicemailApi.get_voicemail_message" if message_id.nil?
  
  
  
  
  
  
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/voicemail/messages/{messageId}".sub('{format}','json').sub('{' + 'messageId' + '}', message_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand']

  # 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 OAuth']
  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#get_voicemail_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_voicemail_messages(opts = {}) click to toggle source

List voicemail messages

@param [Hash] opts the optional parameters @option opts [String] :ids An optional comma separated list of VoicemailMessage ids @option opts [Array<String>] :expand If the caller is a known user, which fields, if any, to expand @return [VoicemailMessageEntityListing]

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 754
def get_voicemail_messages(opts = {})
  data, _status_code, _headers = get_voicemail_messages_with_http_info(opts)
  return data
end
get_voicemail_messages_with_http_info(opts = {}) click to toggle source

List voicemail messages

@param [Hash] opts the optional parameters @option opts [String] :ids An optional comma separated list of VoicemailMessage ids @option opts [Array<String>] :expand If the caller is a known user, which fields, if any, to expand @return [Array<(VoicemailMessageEntityListing, Fixnum, Hash)>] VoicemailMessageEntityListing data, response status code and response headers

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 765
def get_voicemail_messages_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: VoicemailApi.get_voicemail_messages ..."
  end
  
  
  
  
  
  
  
  
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/voicemail/messages".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'ids'] = opts[:'ids'] if opts[:'ids']
  query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand']

  # 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 OAuth']
  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 => 'VoicemailMessageEntityListing')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VoicemailApi#get_voicemail_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_voicemail_policy(opts = {}) click to toggle source

Get a policy

@param [Hash] opts the optional parameters @return [VoicemailOrganizationPolicy]

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 825
def get_voicemail_policy(opts = {})
  data, _status_code, _headers = get_voicemail_policy_with_http_info(opts)
  return data
end
get_voicemail_policy_with_http_info(opts = {}) click to toggle source

Get a policy

@param [Hash] opts the optional parameters @return [Array<(VoicemailOrganizationPolicy, Fixnum, Hash)>] VoicemailOrganizationPolicy data, response status code and response headers

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 834
def get_voicemail_policy_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: VoicemailApi.get_voicemail_policy ..."
  end
  
  # resource path
  local_var_path = "/api/v2/voicemail/policy".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 = nil
  
  auth_names = ['PureCloud OAuth']
  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')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VoicemailApi#get_voicemail_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_voicemail_queue_messages(queue_id, opts = {}) click to toggle source

List voicemail messages

@param queue_id Queue ID @param [Hash] opts the optional parameters @option opts [Integer] :page_size Page size (default to 25) @option opts [Integer] :page_number Page number (default to 1) @return [VoicemailMessageEntityListing]

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 883
def get_voicemail_queue_messages(queue_id, opts = {})
  data, _status_code, _headers = get_voicemail_queue_messages_with_http_info(queue_id, opts)
  return data
end
get_voicemail_queue_messages_with_http_info(queue_id, opts = {}) click to toggle source

List voicemail messages

@param queue_id Queue ID @param [Hash] opts the optional parameters @option opts [Integer] :page_size Page size @option opts [Integer] :page_number Page number @return [Array<(VoicemailMessageEntityListing, Fixnum, Hash)>] VoicemailMessageEntityListing data, response status code and response headers

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 895
def get_voicemail_queue_messages_with_http_info(queue_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: VoicemailApi.get_voicemail_queue_messages ..."
  end
  
  
  # verify the required parameter 'queue_id' is set
  fail ArgumentError, "Missing the required parameter 'queue_id' when calling VoicemailApi.get_voicemail_queue_messages" if queue_id.nil?
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/voicemail/queues/{queueId}/messages".sub('{format}','json').sub('{' + 'queueId' + '}', queue_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size']
  query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number']

  # 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 OAuth']
  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 => 'VoicemailMessageEntityListing')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VoicemailApi#get_voicemail_queue_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_voicemail_search_with_http_info(q64, opts = {}) click to toggle source

Search voicemails using the q64 value returned from a previous search

@param q64 q64 @param [Hash] opts the optional parameters @option opts [Array<String>] :expand expand @return [Array<(VoicemailsSearchResponse, Fixnum, Hash)>] VoicemailsSearchResponse data, response status code and response headers

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 976
def get_voicemail_search_with_http_info(q64, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: VoicemailApi.get_voicemail_search ..."
  end
  
  
  # verify the required parameter 'q64' is set
  fail ArgumentError, "Missing the required parameter 'q64' when calling VoicemailApi.get_voicemail_search" if q64.nil?
  
  
  
  
  
  
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/voicemail/search".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'q64'] = q64
  query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand']

  # 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 OAuth']
  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 => 'VoicemailsSearchResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VoicemailApi#get_voicemail_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_voicemail_userpolicy(user_id, opts = {}) click to toggle source

Get a user's voicemail policy

@param user_id User ID @param [Hash] opts the optional parameters @return [VoicemailUserPolicy]

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 1039
def get_voicemail_userpolicy(user_id, opts = {})
  data, _status_code, _headers = get_voicemail_userpolicy_with_http_info(user_id, opts)
  return data
end
get_voicemail_userpolicy_with_http_info(user_id, opts = {}) click to toggle source

Get a user&#39;s voicemail policy

@param user_id User ID @param [Hash] opts the optional parameters @return [Array<(VoicemailUserPolicy, Fixnum, Hash)>] VoicemailUserPolicy data, response status code and response headers

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 1049
def get_voicemail_userpolicy_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: VoicemailApi.get_voicemail_userpolicy ..."
  end
  
  
  # verify the required parameter 'user_id' is set
  fail ArgumentError, "Missing the required parameter 'user_id' when calling VoicemailApi.get_voicemail_userpolicy" if user_id.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/voicemail/userpolicies/{userId}".sub('{format}','json').sub('{' + 'userId' + '}', user_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 OAuth']
  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 => 'VoicemailUserPolicy')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VoicemailApi#get_voicemail_userpolicy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
patch_voicemail_group_policy(group_id, body, opts = {}) click to toggle source

Update a group's voicemail policy

@param group_id Group ID @param body The group&#39;s voicemail policy @param [Hash] opts the optional parameters @return [VoicemailGroupPolicy]

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 1105
def patch_voicemail_group_policy(group_id, body, opts = {})
  data, _status_code, _headers = patch_voicemail_group_policy_with_http_info(group_id, body, opts)
  return data
end
patch_voicemail_group_policy_with_http_info(group_id, body, opts = {}) click to toggle source

Update a group&#39;s voicemail policy

@param group_id Group ID @param body The group&#39;s voicemail policy @param [Hash] opts the optional parameters @return [Array<(VoicemailGroupPolicy, Fixnum, Hash)>] VoicemailGroupPolicy data, response status code and response headers

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 1116
def patch_voicemail_group_policy_with_http_info(group_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: VoicemailApi.patch_voicemail_group_policy ..."
  end
  
  
  # verify the required parameter 'group_id' is set
  fail ArgumentError, "Missing the required parameter 'group_id' when calling VoicemailApi.patch_voicemail_group_policy" if group_id.nil?
  
  
  
  
  
  
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling VoicemailApi.patch_voicemail_group_policy" if body.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/voicemail/groups/{groupId}/policy".sub('{format}','json').sub('{' + 'groupId' + '}', group_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 OAuth']
  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 => 'VoicemailGroupPolicy')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VoicemailApi#patch_voicemail_group_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
patch_voicemail_me_policy(body, opts = {}) click to toggle source

Update the current user's voicemail policy

@param body The user&#39;s voicemail policy @param [Hash] opts the optional parameters @return [VoicemailUserPolicy]

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 1179
def patch_voicemail_me_policy(body, opts = {})
  data, _status_code, _headers = patch_voicemail_me_policy_with_http_info(body, opts)
  return data
end
patch_voicemail_me_policy_with_http_info(body, opts = {}) click to toggle source

Update the current user&#39;s voicemail policy

@param body The user&#39;s voicemail policy @param [Hash] opts the optional parameters @return [Array<(VoicemailUserPolicy, Fixnum, Hash)>] VoicemailUserPolicy data, response status code and response headers

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 1189
def patch_voicemail_me_policy_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: VoicemailApi.patch_voicemail_me_policy ..."
  end
  
  
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling VoicemailApi.patch_voicemail_me_policy" if body.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/voicemail/me/policy".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 OAuth']
  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 => 'VoicemailUserPolicy')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VoicemailApi#patch_voicemail_me_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
patch_voicemail_message(message_id, body, opts = {}) click to toggle source

Update a voicemail message A user voicemail can only be modified by its associated user. A group voicemail can only be modified by a user that is a member of the group. A queue voicemail can only be modified by a participant of the conversation the voicemail is associated with. @param message_id Message ID @param body VoicemailMessage @param [Hash] opts the optional parameters @return [VoicemailMessage]

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 1245
def patch_voicemail_message(message_id, body, opts = {})
  data, _status_code, _headers = patch_voicemail_message_with_http_info(message_id, body, opts)
  return data
end
patch_voicemail_message_with_http_info(message_id, body, opts = {}) click to toggle source

Update a voicemail message A user voicemail can only be modified by its associated user. A group voicemail can only be modified by a user that is a member of the group. A queue voicemail can only be modified by a participant of the conversation the voicemail is associated with. @param message_id Message ID @param body VoicemailMessage @param [Hash] opts the optional parameters @return [Array<(VoicemailMessage, Fixnum, Hash)>] VoicemailMessage data, response status code and response headers

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 1256
def patch_voicemail_message_with_http_info(message_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: VoicemailApi.patch_voicemail_message ..."
  end
  
  
  # verify the required parameter 'message_id' is set
  fail ArgumentError, "Missing the required parameter 'message_id' when calling VoicemailApi.patch_voicemail_message" if message_id.nil?
  
  
  
  
  
  
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling VoicemailApi.patch_voicemail_message" if body.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/voicemail/messages/{messageId}".sub('{format}','json').sub('{' + 'messageId' + '}', message_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 OAuth']
  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 => 'VoicemailMessage')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VoicemailApi#patch_voicemail_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
patch_voicemail_userpolicy(user_id, body, opts = {}) click to toggle source

Update a user's voicemail policy

@param user_id User ID @param body The user&#39;s voicemail policy @param [Hash] opts the optional parameters @return [VoicemailUserPolicy]

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 1320
def patch_voicemail_userpolicy(user_id, body, opts = {})
  data, _status_code, _headers = patch_voicemail_userpolicy_with_http_info(user_id, body, opts)
  return data
end
patch_voicemail_userpolicy_with_http_info(user_id, body, opts = {}) click to toggle source

Update a user&#39;s voicemail policy

@param user_id User ID @param body The user&#39;s voicemail policy @param [Hash] opts the optional parameters @return [Array<(VoicemailUserPolicy, Fixnum, Hash)>] VoicemailUserPolicy data, response status code and response headers

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 1331
def patch_voicemail_userpolicy_with_http_info(user_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: VoicemailApi.patch_voicemail_userpolicy ..."
  end
  
  
  # verify the required parameter 'user_id' is set
  fail ArgumentError, "Missing the required parameter 'user_id' when calling VoicemailApi.patch_voicemail_userpolicy" if user_id.nil?
  
  
  
  
  
  
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling VoicemailApi.patch_voicemail_userpolicy" if body.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/voicemail/userpolicies/{userId}".sub('{format}','json').sub('{' + 'userId' + '}', user_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 OAuth']
  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 => 'VoicemailUserPolicy')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VoicemailApi#patch_voicemail_userpolicy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_voicemail_messages(opts = {}) click to toggle source

Copy a voicemail message to a user or group

@param [Hash] opts the optional parameters @option opts [CopyVoicemailMessage] :body @return [VoicemailMessage]

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 1394
def post_voicemail_messages(opts = {})
  data, _status_code, _headers = post_voicemail_messages_with_http_info(opts)
  return data
end
post_voicemail_messages_with_http_info(opts = {}) click to toggle source

Copy a voicemail message to a user or group

@param [Hash] opts the optional parameters @option opts [CopyVoicemailMessage] :body @return [Array<(VoicemailMessage, Fixnum, Hash)>] VoicemailMessage data, response status code and response headers

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 1404
def post_voicemail_messages_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: VoicemailApi.post_voicemail_messages ..."
  end
  
  
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/voicemail/messages".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(opts[:'body'])
  
  auth_names = ['PureCloud OAuth']
  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 => 'VoicemailMessage')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VoicemailApi#post_voicemail_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_voicemail_search(body, opts = {}) click to toggle source

Search voicemails

@param body Search request options @param [Hash] opts the optional parameters @return [VoicemailsSearchResponse]

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 1457
def post_voicemail_search(body, opts = {})
  data, _status_code, _headers = post_voicemail_search_with_http_info(body, opts)
  return data
end
post_voicemail_search_with_http_info(body, opts = {}) click to toggle source

Search voicemails

@param body Search request options @param [Hash] opts the optional parameters @return [Array<(VoicemailsSearchResponse, Fixnum, Hash)>] VoicemailsSearchResponse data, response status code and response headers

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 1467
def post_voicemail_search_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: VoicemailApi.post_voicemail_search ..."
  end
  
  
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling VoicemailApi.post_voicemail_search" if body.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/voicemail/search".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 OAuth']
  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 => 'VoicemailsSearchResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VoicemailApi#post_voicemail_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_voicemail_message(message_id, body, opts = {}) click to toggle source

Update a voicemail message A user voicemail can only be modified by its associated user. A group voicemail can only be modified by a user that is a member of the group. A queue voicemail can only be modified by a participant of the conversation the voicemail is associated with. @param message_id Message ID @param body VoicemailMessage @param [Hash] opts the optional parameters @return [VoicemailMessage]

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 1523
def put_voicemail_message(message_id, body, opts = {})
  data, _status_code, _headers = put_voicemail_message_with_http_info(message_id, body, opts)
  return data
end
put_voicemail_message_with_http_info(message_id, body, opts = {}) click to toggle source

Update a voicemail message A user voicemail can only be modified by its associated user. A group voicemail can only be modified by a user that is a member of the group. A queue voicemail can only be modified by a participant of the conversation the voicemail is associated with. @param message_id Message ID @param body VoicemailMessage @param [Hash] opts the optional parameters @return [Array<(VoicemailMessage, Fixnum, Hash)>] VoicemailMessage data, response status code and response headers

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 1534
def put_voicemail_message_with_http_info(message_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: VoicemailApi.put_voicemail_message ..."
  end
  
  
  # verify the required parameter 'message_id' is set
  fail ArgumentError, "Missing the required parameter 'message_id' when calling VoicemailApi.put_voicemail_message" if message_id.nil?
  
  
  
  
  
  
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling VoicemailApi.put_voicemail_message" if body.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/voicemail/messages/{messageId}".sub('{format}','json').sub('{' + 'messageId' + '}', message_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 OAuth']
  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 => 'VoicemailMessage')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VoicemailApi#put_voicemail_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_voicemail_policy(body, opts = {}) click to toggle source

Update a policy

@param body Policy @param [Hash] opts the optional parameters @return [VoicemailOrganizationPolicy]

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 1597
def put_voicemail_policy(body, opts = {})
  data, _status_code, _headers = put_voicemail_policy_with_http_info(body, opts)
  return data
end
put_voicemail_policy_with_http_info(body, opts = {}) click to toggle source

Update a policy

@param body Policy @param [Hash] opts the optional parameters @return [Array<(VoicemailOrganizationPolicy, Fixnum, Hash)>] VoicemailOrganizationPolicy data, response status code and response headers

# File lib/purecloudplatformclientv2/api/voicemail_api.rb, line 1607
def put_voicemail_policy_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: VoicemailApi.put_voicemail_policy ..."
  end
  
  
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling VoicemailApi.put_voicemail_policy" if body.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/voicemail/policy".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 OAuth']
  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 => 'VoicemailOrganizationPolicy')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VoicemailApi#put_voicemail_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end