Class: SmsNotify::MessageResponse
- Inherits:
-
Object
- Object
- SmsNotify::MessageResponse
- Defined in:
- lib/sms_notify/message_response.rb
Overview
Represents an SMS message response (text reply) in the form of a Ruby-like object.
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#received_date ⇒ Object
readonly
Returns the value of attribute received_date.
-
#response_id ⇒ Object
readonly
Returns the value of attribute response_id.
-
#status_code ⇒ Object
readonly
Returns the value of attribute status_code.
-
#text_id ⇒ Object
readonly
Returns the value of attribute text_id.
Instance Method Summary collapse
-
#initialize(attrs) ⇒ MessageResponse
constructor
Create a new instance of a #MessageResponse.
Constructor Details
#initialize(attrs) ⇒ MessageResponse
Create a new instance of a #MessageResponse
Example
SmsNotify::MessageResponse.new(
"ResponseID" => '1',
"TextID" => '123',
"StatusCode" => '6',
"ReceivedDate" => '2010-04-03T14:29:14.7',
"Message" => 'foo')
16 17 18 19 20 21 22 |
# File 'lib/sms_notify/message_response.rb', line 16 def initialize(attrs) @response_id = attrs["ResponseID"] || nil @text_id = attrs["TextID"] || nil @status_code = attrs["StatusCode"] || nil @received_date = attrs["ReceivedDate"] || nil = attrs["Message"] || nil end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
5 6 7 |
# File 'lib/sms_notify/message_response.rb', line 5 def end |
#received_date ⇒ Object (readonly)
Returns the value of attribute received_date.
5 6 7 |
# File 'lib/sms_notify/message_response.rb', line 5 def received_date @received_date end |
#response_id ⇒ Object (readonly)
Returns the value of attribute response_id.
5 6 7 |
# File 'lib/sms_notify/message_response.rb', line 5 def response_id @response_id end |
#status_code ⇒ Object (readonly)
Returns the value of attribute status_code.
5 6 7 |
# File 'lib/sms_notify/message_response.rb', line 5 def status_code @status_code end |
#text_id ⇒ Object (readonly)
Returns the value of attribute text_id.
5 6 7 |
# File 'lib/sms_notify/message_response.rb', line 5 def text_id @text_id end |