Class: CTM::Source
Instance Attribute Summary collapse
-
#account_id ⇒ Object
readonly
Returns the value of attribute account_id.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#landing_url ⇒ Object
Returns the value of attribute landing_url.
-
#name ⇒ Object
Returns the value of attribute name.
-
#online ⇒ Object
Returns the value of attribute online.
-
#position ⇒ Object
Returns the value of attribute position.
-
#referring_url ⇒ Object
Returns the value of attribute referring_url.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(data, token = nil) ⇒ Source
constructor
A new instance of Source.
- #numbers(options = {}) ⇒ Object
- #save ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(data, token = nil) ⇒ Source
Returns a new instance of Source.
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/ctm/source.rb', line 6 def initialize(data, token=nil) super(data, token) @id = data['id'] @account_id = data['account_id'] @name = data['name'] @referring_url = data['referring_url'] @landing_url = data['landing_url'] @position = data['position'] @online = data['online'] end |
Instance Attribute Details
#account_id ⇒ Object (readonly)
Returns the value of attribute account_id.
3 4 5 |
# File 'lib/ctm/source.rb', line 3 def account_id @account_id end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/ctm/source.rb', line 3 def id @id end |
#landing_url ⇒ Object
Returns the value of attribute landing_url.
4 5 6 |
# File 'lib/ctm/source.rb', line 4 def landing_url @landing_url end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/ctm/source.rb', line 4 def name @name end |
#online ⇒ Object
Returns the value of attribute online.
4 5 6 |
# File 'lib/ctm/source.rb', line 4 def online @online end |
#position ⇒ Object
Returns the value of attribute position.
4 5 6 |
# File 'lib/ctm/source.rb', line 4 def position @position end |
#referring_url ⇒ Object
Returns the value of attribute referring_url.
4 5 6 |
# File 'lib/ctm/source.rb', line 4 def referring_url @referring_url end |
Instance Method Details
#numbers(options = {}) ⇒ Object
28 29 30 |
# File 'lib/ctm/source.rb', line 28 def numbers(={}) CTM::NumberList.new(.merge(:account_id => @account_id, :source_id => @id), @token) end |
#save ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/ctm/source.rb', line 17 def save = { :name => @name, :position => @position, :online => @online, :referring_url => @referring_url, :landing_url => @landing_url } super() end |