Class: MessagebirdTexter::Response::Body
- Inherits:
-
Object
- Object
- MessagebirdTexter::Response::Body
- Defined in:
- lib/messagebird_texter/response/body.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#created_datetime ⇒ Object
readonly
Returns the value of attribute created_datetime.
-
#datacoding ⇒ Object
readonly
Returns the value of attribute datacoding.
-
#direction ⇒ Object
readonly
Returns the value of attribute direction.
-
#gateway ⇒ Object
readonly
Returns the value of attribute gateway.
-
#href ⇒ Object
readonly
Returns the value of attribute href.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#mclass ⇒ Object
readonly
Returns the value of attribute mclass.
-
#originator ⇒ Object
readonly
Returns the value of attribute originator.
-
#recipients ⇒ Object
readonly
Returns the value of attribute recipients.
-
#reference ⇒ Object
readonly
Returns the value of attribute reference.
-
#scheduled_datetime ⇒ Object
readonly
Returns the value of attribute scheduled_datetime.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#validity ⇒ Object
readonly
Returns the value of attribute validity.
Instance Method Summary collapse
-
#initialize(body) ⇒ Body
constructor
A new instance of Body.
Constructor Details
#initialize(body) ⇒ Body
Returns a new instance of Body.
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/messagebird_texter/response/body.rb', line 21 def initialize(body) parsed_body = JSON.parse(body, symbolize_names: true) @id = parsed_body[:id] @href = parsed_body[:href] @direction = parsed_body[:direction] @type = parsed_body[:type] @originator = parsed_body[:originator] @content = parsed_body[:body] @reference = parsed_body[:reference] @validity = parsed_body[:validity] @gateway = parsed_body[:gateway] @datacoding = parsed_body[:datacoding] @mclass = parsed_body[:mclass] @scheduled_datetime = parsed_body[:scheduledDatetime] @created_datetime = parsed_body[:createdDatetime] @recipients = parsed_body[:recipients] end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
6 7 8 |
# File 'lib/messagebird_texter/response/body.rb', line 6 def content @content end |
#created_datetime ⇒ Object (readonly)
Returns the value of attribute created_datetime.
6 7 8 |
# File 'lib/messagebird_texter/response/body.rb', line 6 def created_datetime @created_datetime end |
#datacoding ⇒ Object (readonly)
Returns the value of attribute datacoding.
6 7 8 |
# File 'lib/messagebird_texter/response/body.rb', line 6 def datacoding @datacoding end |
#direction ⇒ Object (readonly)
Returns the value of attribute direction.
6 7 8 |
# File 'lib/messagebird_texter/response/body.rb', line 6 def direction @direction end |
#gateway ⇒ Object (readonly)
Returns the value of attribute gateway.
6 7 8 |
# File 'lib/messagebird_texter/response/body.rb', line 6 def gateway @gateway end |
#href ⇒ Object (readonly)
Returns the value of attribute href.
6 7 8 |
# File 'lib/messagebird_texter/response/body.rb', line 6 def href @href end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/messagebird_texter/response/body.rb', line 6 def id @id end |
#mclass ⇒ Object (readonly)
Returns the value of attribute mclass.
6 7 8 |
# File 'lib/messagebird_texter/response/body.rb', line 6 def mclass @mclass end |
#originator ⇒ Object (readonly)
Returns the value of attribute originator.
6 7 8 |
# File 'lib/messagebird_texter/response/body.rb', line 6 def originator @originator end |
#recipients ⇒ Object (readonly)
Returns the value of attribute recipients.
6 7 8 |
# File 'lib/messagebird_texter/response/body.rb', line 6 def recipients @recipients end |
#reference ⇒ Object (readonly)
Returns the value of attribute reference.
6 7 8 |
# File 'lib/messagebird_texter/response/body.rb', line 6 def reference @reference end |
#scheduled_datetime ⇒ Object (readonly)
Returns the value of attribute scheduled_datetime.
6 7 8 |
# File 'lib/messagebird_texter/response/body.rb', line 6 def scheduled_datetime @scheduled_datetime end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
6 7 8 |
# File 'lib/messagebird_texter/response/body.rb', line 6 def type @type end |
#validity ⇒ Object (readonly)
Returns the value of attribute validity.
6 7 8 |
# File 'lib/messagebird_texter/response/body.rb', line 6 def validity @validity end |