Class: Plivo::Resources::Endpoint
Constant Summary
Constants included
from Utils
Utils::TYPE_WHITELIST
Instance Attribute Summary collapse
#id
Instance Method Summary
collapse
Methods included from Utils
GetSortedQueryParamString?, compute_signatureV3?, expected_type?, expected_value?, generate_url?, getMapFromQueryString?, is_one_among_string_url?, multi_valid_param?, raise_invalid_request, valid_account?, valid_date_format?, valid_mainaccount?, valid_multiple_destination_integers?, valid_multiple_destination_nos?, valid_param?, valid_range?, valid_signature?, valid_signatureV3?, valid_subaccount?, valid_url?
Constructor Details
#initialize(client, options = nil) ⇒ Endpoint
Returns a new instance of Endpoint.
5
6
7
8
9
10
|
# 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
|
Instance Attribute Details
#password ⇒ Object
Returns the value of attribute password.
36
37
38
|
# File 'lib/plivo/resources/endpoints.rb', line 36
def password
@password
end
|
#sip_expires ⇒ Object
Returns the value of attribute sip_expires.
38
39
40
|
# File 'lib/plivo/resources/endpoints.rb', line 38
def sip_expires
@sip_expires
end
|
Instance Method Details
#delete ⇒ Object
32
33
34
|
# File 'lib/plivo/resources/endpoints.rb', line 32
def delete
perform_delete
end
|
40
41
42
|
# File 'lib/plivo/resources/endpoints.rb', line 40
def sip_contact
@sip_expires
end
|
#sip_user_agent ⇒ Object
44
45
46
|
# File 'lib/plivo/resources/endpoints.rb', line 44
def sip_user_agent
@sip_expires
end
|
#to_s ⇒ Object
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# 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) ⇒ Object
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# 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
|