Class: Essential::Messaging::Property

Inherits:
Resource
  • Object
show all
Includes:
Resource::Delete, Resource::Update
Defined in:
lib/essential/messaging/property.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Resource::Delete

#delete

Methods included from Resource::Update

#update

Methods inherited from Resource

#==, #as_json, #fetch, #init_from, #initialize, #inspect, request, #to_json

Methods included from Resource::AttrMethods

#filter_attrs, included

Constructor Details

This class inherits a constructor from Essential::Resource

Class Method Details

.retrieve(*args) ⇒ Object

Raises:

  • (NotImplementedError)


9
10
11
# File 'lib/essential/messaging/property.rb', line 9

def self.retrieve(*args)
  raise NotImplementedError, 'must be retrieved from a Subscriber'
end

.url(subscriber_sid) ⇒ Object



13
14
15
# File 'lib/essential/messaging/property.rb', line 13

def self.url(subscriber_sid)
  format('%s/%s/properties', Subscriber.url, CGI.escape(subscriber_sid))
end

Instance Method Details

#urlObject



17
18
19
# File 'lib/essential/messaging/property.rb', line 17

def url
  format('%s/%s', self.class.url(subscriber_sid), CGI.escape(name))
end