Class: Glabssms::SmsResult
- Inherits:
-
Object
- Object
- Glabssms::SmsResult
- Includes:
- BaseModule
- Defined in:
- lib/glabssms/sms_result.rb
Overview
This class is used as a response object when we successfully send an SMS to a subscriber
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#sender_address ⇒ Object
readonly
Returns the value of attribute sender_address.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes) ⇒ SmsResult
constructor
A new instance of SmsResult.
- #success? ⇒ Boolean
Methods included from BaseModule
Methods included from BaseModule::Methods
#set_instance_variables_from_hash
Constructor Details
#initialize(attributes) ⇒ SmsResult
Returns a new instance of SmsResult.
13 14 15 16 17 18 |
# File 'lib/glabssms/sms_result.rb', line 13 def initialize(attributes) = attributes.dig('outboundSMSMessageRequest') @number = .dig('address') @sender_address = .dig('senderAddress') @message = .dig('outboundSMSTextMessage', 'message') end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
11 12 13 |
# File 'lib/glabssms/sms_result.rb', line 11 def @message end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
9 10 11 |
# File 'lib/glabssms/sms_result.rb', line 9 def number @number end |
#sender_address ⇒ Object (readonly)
Returns the value of attribute sender_address.
10 11 12 |
# File 'lib/glabssms/sms_result.rb', line 10 def sender_address @sender_address end |
Class Method Details
._new(*args) ⇒ Object
22 23 24 |
# File 'lib/glabssms/sms_result.rb', line 22 def _new(*args) new(*args) end |
Instance Method Details
#success? ⇒ Boolean
27 28 29 |
# File 'lib/glabssms/sms_result.rb', line 27 def success? true end |