Class: Postio::Models::AddressSearchEnvelope
- Inherits:
-
Data
- Object
- Data
- Postio::Models::AddressSearchEnvelope
- Defined in:
- lib/postio/models.rb
Overview
Envelopes — one per endpoint.
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
148 149 150 |
# File 'lib/postio/models.rb', line 148 def @meta end |
#results ⇒ Object (readonly)
Returns the value of attribute results
148 149 150 |
# File 'lib/postio/models.rb', line 148 def results @results end |
#success ⇒ Object (readonly)
Returns the value of attribute success
148 149 150 |
# File 'lib/postio/models.rb', line 148 def success @success end |
Class Method Details
.from_hash(h) ⇒ Object
149 150 151 152 153 154 155 |
# File 'lib/postio/models.rb', line 149 def self.from_hash(h) new( success: h["success"] == true, results: (h["results"] || []).map { |r| AddressSearchResult.from_hash(r) }, meta: Meta.from_hash(h["meta"]) ) end |