class PureCloud::VoicemailApi

Attributes

api_client[RW]

Public Class Methods

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

Public Instance Methods

delete_messages(opts = {}) click to toggle source

Delete all voicemail messages

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

# File lib/purecloud/api/voicemail_api.rb, line 31
def delete_messages(opts = {})
  data, status_code, headers = delete_messages_with_http_info(opts)
  return data
end
delete_messages_message_id(message_id, opts = {}) click to toggle source

Delete a message.

@param message_id Message ID @param [Hash] opts the optional parameters @return [String]

# File lib/purecloud/api/voicemail_api.rb, line 87
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
delete_messages_message_id_with_http_info(message_id, opts = {}) click to toggle source

Delete a 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

# File lib/purecloud/api/voicemail_api.rb, line 97
def delete_messages_message_id_with_http_info(message_id, opts = {})
  if @api_client.config.debugging
    @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
  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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(: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 => 'String')
  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}"
  end
  return data, status_code, headers
end
delete_messages_with_http_info(opts = {}) click to toggle source

Delete all voicemail messages

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

# File lib/purecloud/api/voicemail_api.rb, line 40
def delete_messages_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: VoicemailApi#delete_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(: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 => 'String')
  if @api_client.config.debugging
    @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
get_groups_group_id_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/purecloud/api/voicemail_api.rb, line 147
def get_groups_group_id_mailbox(group_id, opts = {})
  data, status_code, headers = get_groups_group_id_mailbox_with_http_info(group_id, opts)
  return data
end
get_groups_group_id_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/purecloud/api/voicemail_api.rb, line 157
def get_groups_group_id_mailbox_with_http_info(group_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: VoicemailApi#get_groups_group_id_mailbox ..."
  end
  
  # verify the required parameter 'group_id' is set
  fail "Missing the required parameter 'group_id' when calling get_groups_group_id_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'VoicemailMailboxInfo')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VoicemailApi#get_groups_group_id_mailbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_groups_group_id_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/purecloud/api/voicemail_api.rb, line 209
def get_groups_group_id_messages(group_id, opts = {})
  data, status_code, headers = get_groups_group_id_messages_with_http_info(group_id, opts)
  return data
end
get_groups_group_id_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/purecloud/api/voicemail_api.rb, line 221
def get_groups_group_id_messages_with_http_info(group_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: VoicemailApi#get_groups_group_id_messages ..."
  end
  
  # verify the required parameter 'group_id' is set
  fail "Missing the required parameter 'group_id' when calling get_groups_group_id_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'VoicemailMessageEntityListing')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VoicemailApi#get_groups_group_id_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_groups_group_id_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/purecloud/api/voicemail_api.rb, line 273
def get_groups_group_id_policy(group_id, opts = {})
  data, status_code, headers = get_groups_group_id_policy_with_http_info(group_id, opts)
  return data
end
get_groups_group_id_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/purecloud/api/voicemail_api.rb, line 283
def get_groups_group_id_policy_with_http_info(group_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: VoicemailApi#get_groups_group_id_policy ..."
  end
  
  # verify the required parameter 'group_id' is set
  fail "Missing the required parameter 'group_id' when calling get_groups_group_id_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'VoicemailGroupPolicy')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VoicemailApi#get_groups_group_id_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_mailbox(opts = {}) click to toggle source

Get the current user's mailbox information

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

# File lib/purecloud/api/voicemail_api.rb, line 332
def get_mailbox(opts = {})
  data, status_code, headers = get_mailbox_with_http_info(opts)
  return data
end
get_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/purecloud/api/voicemail_api.rb, line 341
def get_mailbox_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: VoicemailApi#get_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'VoicemailMailboxInfo')
  if @api_client.config.debugging
    @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_me_mailbox(opts = {}) click to toggle source

Get the current user's mailbox information

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

# File lib/purecloud/api/voicemail_api.rb, line 387
def get_me_mailbox(opts = {})
  data, status_code, headers = get_me_mailbox_with_http_info(opts)
  return data
end
get_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/purecloud/api/voicemail_api.rb, line 396
def get_me_mailbox_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: VoicemailApi#get_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'VoicemailMailboxInfo')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VoicemailApi#get_me_mailbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_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/purecloud/api/voicemail_api.rb, line 444
def get_me_messages(opts = {})
  data, status_code, headers = get_me_messages_with_http_info(opts)
  return data
end
get_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/purecloud/api/voicemail_api.rb, line 455
def get_me_messages_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: VoicemailApi#get_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'VoicemailMessageEntityListing')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VoicemailApi#get_me_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_me_policy(opts = {}) click to toggle source

Get the current user's voicemail policy

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

# File lib/purecloud/api/voicemail_api.rb, line 503
def get_me_policy(opts = {})
  data, status_code, headers = get_me_policy_with_http_info(opts)
  return data
end
get_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/purecloud/api/voicemail_api.rb, line 512
def get_me_policy_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: VoicemailApi#get_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'VoicemailUserPolicy')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VoicemailApi#get_me_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_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/purecloud/api/voicemail_api.rb, line 560
def get_messages(opts = {})
  data, status_code, headers = get_messages_with_http_info(opts)
  return data
end
get_messages_message_id(message_id, opts = {}) click to toggle source

Get 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/purecloud/api/voicemail_api.rb, line 621
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
get_messages_message_id_media(message_id, opts = {}) click to toggle source

Get media playback URI for this 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/purecloud/api/voicemail_api.rb, line 684
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
get_messages_message_id_media_with_http_info(message_id, opts = {}) click to toggle source

Get media playback URI for this 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/purecloud/api/voicemail_api.rb, line 695
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#get_messages_message_id_media ..."
  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'] && !['WAV', 'WEBM', 'WAV_ULAW', 'OGG_VORBIS', 'OGG_OPUS', 'NONE'].include?(opts[:'format_id'])
    fail 'invalid value for "format_id", must be one of WAV, WEBM, WAV_ULAW, OGG_VORBIS, OGG_OPUS, 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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'VoicemailMediaInfo')
  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}"
  end
  return data, status_code, headers
end
get_messages_message_id_with_http_info(message_id, opts = {}) click to toggle source

Get 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/purecloud/api/voicemail_api.rb, line 632
def get_messages_message_id_with_http_info(message_id, opts = {})
  if @api_client.config.debugging
    @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 get_messages_message_id" 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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'VoicemailMessage')
  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}"
  end
  return data, status_code, headers
end
get_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/purecloud/api/voicemail_api.rb, line 571
def get_messages_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: VoicemailApi#get_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'VoicemailMessageEntityListing')
  if @api_client.config.debugging
    @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
get_policy(opts = {}) click to toggle source

Get a policy

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

# File lib/purecloud/api/voicemail_api.rb, line 749
def get_policy(opts = {})
  data, status_code, headers = get_policy_with_http_info(opts)
  return data
end
get_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/purecloud/api/voicemail_api.rb, line 758
def get_policy_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: VoicemailApi#get_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'VoicemailOrganizationPolicy')
  if @api_client.config.debugging
    @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_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/purecloud/api/voicemail_api.rb, line 817
def get_search_with_http_info(q64, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: VoicemailApi#get_search ..."
  end
  
  # verify the required parameter 'q64' is set
  fail "Missing the required parameter 'q64' when calling get_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'VoicemailsSearchResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VoicemailApi#get_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_userpolicies_user_id(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/purecloud/api/voicemail_api.rb, line 869
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_userpolicies_user_id_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/purecloud/api/voicemail_api.rb, line 879
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_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
  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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'VoicemailUserPolicy')
  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}"
  end
  return data, status_code, headers
end
patch_groups_group_id_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/purecloud/api/voicemail_api.rb, line 930
def patch_groups_group_id_policy(group_id, body, opts = {})
  data, status_code, headers = patch_groups_group_id_policy_with_http_info(group_id, body, opts)
  return data
end
patch_groups_group_id_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/purecloud/api/voicemail_api.rb, line 941
def patch_groups_group_id_policy_with_http_info(group_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: VoicemailApi#patch_groups_group_id_policy ..."
  end
  
  # verify the required parameter 'group_id' is set
  fail "Missing the required parameter 'group_id' when calling patch_groups_group_id_policy" if group_id.nil?
  
  # verify the required parameter 'body' is set
  fail "Missing the required parameter 'body' when calling patch_groups_group_id_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @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,
    :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_groups_group_id_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
patch_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/purecloud/api/voicemail_api.rb, line 994
def patch_me_policy(body, opts = {})
  data, status_code, headers = patch_me_policy_with_http_info(body, opts)
  return data
end
patch_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/purecloud/api/voicemail_api.rb, line 1004
def patch_me_policy_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: VoicemailApi#patch_me_policy ..."
  end
  
  # verify the required parameter 'body' is set
  fail "Missing the required parameter 'body' when calling patch_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @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,
    :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_me_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
patch_userpolicies_user_id(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/purecloud/api/voicemail_api.rb, line 1055
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
patch_userpolicies_user_id_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/purecloud/api/voicemail_api.rb, line 1066
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#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
  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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @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,
    :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_userpolicies_user_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_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/purecloud/api/voicemail_api.rb, line 1119
def post_messages(opts = {})
  data, status_code, headers = post_messages_with_http_info(opts)
  return data
end
post_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/purecloud/api/voicemail_api.rb, line 1129
def post_messages_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: VoicemailApi#post_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(opts[:'body'])
  
  auth_names = ['PureCloud Auth']
  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_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_search(body, opts = {}) click to toggle source

Search voicemails

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

# File lib/purecloud/api/voicemail_api.rb, line 1176
def post_search(body, opts = {})
  data, status_code, headers = post_search_with_http_info(body, opts)
  return data
end
post_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/purecloud/api/voicemail_api.rb, line 1186
def post_search_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: VoicemailApi#post_search ..."
  end
  
  # verify the required parameter 'body' is set
  fail "Missing the required parameter 'body' when calling post_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['PureCloud Auth']
  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_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_messages_message_id(message_id, body, opts = {}) click to toggle source

Update a message.

@param message_id Message ID @param body VoicemailMessage @param [Hash] opts the optional parameters @return [VoicemailMessage]

# File lib/purecloud/api/voicemail_api.rb, line 1237
def put_messages_message_id(message_id, body, opts = {})
  data, status_code, headers = put_messages_message_id_with_http_info(message_id, body, opts)
  return data
end
put_messages_message_id_with_http_info(message_id, body, opts = {}) click to toggle source

Update a message.

@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/purecloud/api/voicemail_api.rb, line 1248
def put_messages_message_id_with_http_info(message_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: VoicemailApi#put_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?
  
  # verify the required parameter 'body' is set
  fail "Missing the required parameter 'body' when calling put_messages_message_id" 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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['PureCloud Auth']
  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_messages_message_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_policy(body, opts = {}) click to toggle source

Update a policy

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

# File lib/purecloud/api/voicemail_api.rb, line 1301
def put_policy(body, opts = {})
  data, status_code, headers = put_policy_with_http_info(body, opts)
  return data
end
put_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/purecloud/api/voicemail_api.rb, line 1311
def put_policy_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: VoicemailApi#put_policy ..."
  end
  
  # verify the required parameter 'body' is set
  fail "Missing the required parameter 'body' when calling put_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['PureCloud Auth']
  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_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end