Class: Bandwidth::EndPoint
- Inherits:
-
Object
- Object
- Bandwidth::EndPoint
- Includes:
- ApiItem
- Defined in:
- lib/bandwidth/endpoint.rb
Overview
Endpoint of domain
Instance Attribute Summary collapse
-
#domain_id ⇒ Object
Returns the value of attribute domain_id.
Instance Method Summary collapse
-
#create_auth_token(expires = 86400) ⇒ Object
Create auth token.
-
#delete ⇒ Object
(also: #destroy)
Remove an endpoint from domain.
-
#delete_auth_token(token) ⇒ Object
Delete auth token.
Methods included from ApiItem
#[], #[]=, #initialize, #to_data
Instance Attribute Details
#domain_id ⇒ Object
Returns the value of attribute domain_id
5 6 7 |
# File 'lib/bandwidth/endpoint.rb', line 5 def domain_id @domain_id end |
Instance Method Details
#create_auth_token(expires = 86400) ⇒ Object
Create auth token.
20 21 22 |
# File 'lib/bandwidth/endpoint.rb', line 20 def create_auth_token(expires = 86400) @client.make_request(:post, @client.concat_user_path("#{DOMAIN_PATH}/#{domain_id}/endpoints/#{id}/tokens"), {expires: expires})[0] end |
#delete ⇒ Object Also known as: destroy
Remove an endpoint from domain.
10 11 12 |
# File 'lib/bandwidth/endpoint.rb', line 10 def delete() @client.make_request(:delete, @client.concat_user_path("#{DOMAIN_PATH}/#{domain_id}/endpoints/#{id}"))[0] end |
#delete_auth_token(token) ⇒ Object
Delete auth token.
27 28 29 |
# File 'lib/bandwidth/endpoint.rb', line 27 def delete_auth_token(token) @client.make_request(:delete, @client.concat_user_path("#{DOMAIN_PATH}/#{domain_id}/endpoints/#{id}/tokens/#{token}"))[0] end |