class Plivo::Resources::EndpointInterface
@!method get @!method create @!method list
Public Class Methods
Source
# File lib/plivo/resources/endpoints.rb, line 70 def initialize(client, resource_list_json = nil) @_name = 'Endpoint' @_resource_type = Endpoint @_identifier_string = 'endpoint_id' super @_is_voice_request = true end
Calls superclass method
Plivo::Base::ResourceInterface::new
Public Instance Methods
Source
# File lib/plivo/resources/endpoints.rb, line 88 def create(username, password, alias_, app_id = nil) valid_param?(:username, username, [String, Symbol], true) valid_param?(:password, password, [String, Symbol], true) valid_param?(:alias, alias_, [String, Symbol], true) params = { username: username, password: password, alias: alias_ } params[:app_id] = app_id unless app_id.nil? perform_create(params) end
@param [String] username @param [String] password @param [String] alias_ @param [String] app_id
Source
# File lib/plivo/resources/endpoints.rb, line 125 def delete(endpoint_id) valid_param?(:endpoint_id, endpoint_id, [String, Symbol], true) Endpoint.new(@_client, resource_id: endpoint_id).delete end
@param [String] endpoint_id
Source
# File lib/plivo/resources/endpoints.rb, line 108 def each endpoint_list = list endpoint_list[:objects].each { |endpoint| yield endpoint } end
Source
# File lib/plivo/resources/endpoints.rb, line 79 def get(endpoint_id) valid_param?(:endpoint_id, endpoint_id, [String, Symbol], true) perform_get(endpoint_id) end
@param [String] endpoint_id
Source
# File lib/plivo/resources/endpoints.rb, line 118 def update(endpoint_id, options = nil) valid_param?(:endpoint_id, endpoint_id, [String, Symbol], true) Endpoint.new(@_client, resource_id: endpoint_id).update(options) end
@param [String] endpoint_id @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.