Class: CTM::Message
Instance Attribute Summary collapse
-
#account_id ⇒ Object
readonly
Returns the value of attribute account_id.
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#callerid ⇒ Object
readonly
Returns the value of attribute callerid.
-
#direction ⇒ Object
readonly
Returns the value of attribute direction.
-
#from ⇒ Object
readonly
Returns the value of attribute from.
-
#from_location ⇒ Object
readonly
Returns the value of attribute from_location.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#source_id ⇒ Object
readonly
Returns the value of attribute source_id.
-
#to ⇒ Object
readonly
Returns the value of attribute to.
-
#to_location ⇒ Object
readonly
Returns the value of attribute to_location.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(data, token = nil) ⇒ Message
constructor
A new instance of Message.
Methods inherited from Base
Constructor Details
#initialize(data, token = nil) ⇒ Message
Returns a new instance of Message.
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/ctm/message.rb', line 5 def initialize(data, token=nil) super(data, token) @id = data['id'] @account_id = data['account_id'] @body = data['body'] @to = data['to_number'] @from = data['from_number'] @callerid = data['callerid'] @from_location = CTM::Base::Location.new(nil, data['from_city'], data['from_state'], data['from_country'], data['from_zip']) @to_location = CTM::Base::Location.new(nil, data['to_city'], data['to_state'], data['to_country'], data['to_zip']) @source_id = data['tracking_source_id'] @direction = data['direction'] end |
Instance Attribute Details
#account_id ⇒ Object (readonly)
Returns the value of attribute account_id.
3 4 5 |
# File 'lib/ctm/message.rb', line 3 def account_id @account_id end |
#body ⇒ Object (readonly)
Returns the value of attribute body.
3 4 5 |
# File 'lib/ctm/message.rb', line 3 def body @body end |
#callerid ⇒ Object (readonly)
Returns the value of attribute callerid.
3 4 5 |
# File 'lib/ctm/message.rb', line 3 def callerid @callerid end |
#direction ⇒ Object (readonly)
Returns the value of attribute direction.
3 4 5 |
# File 'lib/ctm/message.rb', line 3 def direction @direction end |
#from ⇒ Object (readonly)
Returns the value of attribute from.
3 4 5 |
# File 'lib/ctm/message.rb', line 3 def from @from end |
#from_location ⇒ Object (readonly)
Returns the value of attribute from_location.
3 4 5 |
# File 'lib/ctm/message.rb', line 3 def from_location @from_location end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/ctm/message.rb', line 3 def id @id end |
#source_id ⇒ Object (readonly)
Returns the value of attribute source_id.
3 4 5 |
# File 'lib/ctm/message.rb', line 3 def source_id @source_id end |
#to ⇒ Object (readonly)
Returns the value of attribute to.
3 4 5 |
# File 'lib/ctm/message.rb', line 3 def to @to end |
#to_location ⇒ Object (readonly)
Returns the value of attribute to_location.
3 4 5 |
# File 'lib/ctm/message.rb', line 3 def to_location @to_location end |