Class: Postio::Models::PhoneEnvelope
- Inherits:
-
Data
- Object
- Data
- Postio::Models::PhoneEnvelope
- Defined in:
- lib/postio/models.rb
Instance Attribute Summary collapse
-
#meta ⇒ Object
readonly
Returns the value of attribute meta.
-
#results ⇒ Object
readonly
Returns the value of attribute results.
-
#success ⇒ Object
readonly
Returns the value of attribute success.
Class Method Summary collapse
Instance Attribute Details
#meta ⇒ Object (readonly)
Returns the value of attribute meta
188 189 190 |
# File 'lib/postio/models.rb', line 188 def @meta end |
#results ⇒ Object (readonly)
Returns the value of attribute results
188 189 190 |
# File 'lib/postio/models.rb', line 188 def results @results end |
#success ⇒ Object (readonly)
Returns the value of attribute success
188 189 190 |
# File 'lib/postio/models.rb', line 188 def success @success end |
Class Method Details
.from_hash(h) ⇒ Object
189 190 191 192 193 194 195 |
# File 'lib/postio/models.rb', line 189 def self.from_hash(h) new( success: h["success"] == true, results: (h["results"] || []).map { |r| PhoneResult.from_hash(r) }, meta: Meta.from_hash(h["meta"]) ) end |