class Plivo::Resources::Endpoint
Attributes
password[R]
sip_expires[R]
Public Class Methods
new(client, options = nil)
click to toggle source
Calls superclass method
Plivo::Base::Resource::new
# File lib/plivo/resources/endpoints.rb, line 5 def initialize(client, options = nil) @_name = 'Endpoint' @_identifier_string = 'endpoint_id' super @_is_voice_request = true end
Public Instance Methods
delete()
click to toggle source
# File lib/plivo/resources/endpoints.rb, line 32 def delete perform_delete end
sip_contact()
click to toggle source
# File lib/plivo/resources/endpoints.rb, line 40 def sip_contact @sip_expires end
sip_user_agent()
click to toggle source
# File lib/plivo/resources/endpoints.rb, line 44 def sip_user_agent @sip_expires end
to_s()
click to toggle source
# File lib/plivo/resources/endpoints.rb, line 48 def to_s { alias: @alias, application: @application, endpoint_id: @endpoint_id, resource_uri: @resource_uri, sip_contact: @sip_contact, sip_expires: @sip_expires, sip_registered: @sip_registered, sip_uri: @sip_uri, sip_user_agent: @sip_user_agent, sub_account: @sub_account, username: @username, password: @password }.to_s end
update(options = nil)
click to toggle source
@param [Hash] options @option options [String] :password The password for your endpoint username. @option options [String] :alias Alias for this endpoint @option options [String] :app_id The app_id of the application that is to be attached to this endpoint. If app_id is not specified, then the endpoint does not point to any application.
# File lib/plivo/resources/endpoints.rb, line 16 def update(options = nil) return if options.nil? valid_param?(:options, options, Hash, true) params = {} params_expected = %i[password alias app_id] params_expected.each do |param| if options.key?(param) && valid_param?(param, options[param], [String, Symbol], true) params[param] = options[param] end end perform_update(params) end