Class: AfTalk::SendMessageResponse
- Defined in:
- lib/aftalk/responses/send_message_response.rb
Constant Summary
Constants inherited from Response
Response::JSON_CONTENT, Response::SUCCESS_STATUSES
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#recipients ⇒ Object
readonly
Returns the value of attribute recipients.
Attributes inherited from Response
#body, #error_message, #status
Instance Method Summary collapse
-
#initialize(response) ⇒ SendMessageResponse
constructor
A new instance of SendMessageResponse.
Constructor Details
#initialize(response) ⇒ SendMessageResponse
Returns a new instance of SendMessageResponse.
5 6 7 8 9 10 11 12 13 |
# File 'lib/aftalk/responses/send_message_response.rb', line 5 def initialize(response) super(response) if success? @message = body_data[:Message] @recipients = body_data[:Recipients].map do |recipient| SmsMessageStatus.new(recipient) end end end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
3 4 5 |
# File 'lib/aftalk/responses/send_message_response.rb', line 3 def @message end |
#recipients ⇒ Object (readonly)
Returns the value of attribute recipients.
3 4 5 |
# File 'lib/aftalk/responses/send_message_response.rb', line 3 def recipients @recipients end |