Class: SmartyStreets::InternationalAutocomplete::Suggestion
- Inherits:
-
Object
- Object
- SmartyStreets::InternationalAutocomplete::Suggestion
- Defined in:
- lib/smartystreets_ruby_sdk/international_autocomplete/suggestion.rb
Instance Attribute Summary collapse
-
#address_id ⇒ Object
readonly
Returns the value of attribute address_id.
-
#address_text ⇒ Object
readonly
Returns the value of attribute address_text.
-
#administrative_area ⇒ Object
readonly
Returns the value of attribute administrative_area.
-
#administrative_area_long ⇒ Object
readonly
Returns the value of attribute administrative_area_long.
-
#administrative_area_short ⇒ Object
readonly
Returns the value of attribute administrative_area_short.
-
#country_iso3 ⇒ Object
readonly
Returns the value of attribute country_iso3.
-
#entries ⇒ Object
readonly
Returns the value of attribute entries.
-
#locality ⇒ Object
readonly
Returns the value of attribute locality.
-
#postal_code ⇒ Object
readonly
Returns the value of attribute postal_code.
-
#street ⇒ Object
readonly
Returns the value of attribute street.
Instance Method Summary collapse
-
#initialize(obj) ⇒ Suggestion
constructor
A new instance of Suggestion.
Constructor Details
#initialize(obj) ⇒ Suggestion
Returns a new instance of Suggestion.
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/smartystreets_ruby_sdk/international_autocomplete/suggestion.rb', line 7 def initialize(obj) @street = obj.fetch('street', nil) @locality = obj.fetch('locality', nil) @administrative_area = obj.fetch('administrative_area', nil) @administrative_area_short = obj.fetch('administrative_area_short', nil) @administrative_area_long = obj.fetch('administrative_area_long', nil) @postal_code = obj.fetch('postal_code', nil) @country_iso3 = obj.fetch('country_iso3', nil) # v2 fields @entries = obj.fetch('entries', nil) @address_text = obj.fetch('address_text', nil) @address_id = obj.fetch('address_id', nil) end |
Instance Attribute Details
#address_id ⇒ Object (readonly)
Returns the value of attribute address_id.
5 6 7 |
# File 'lib/smartystreets_ruby_sdk/international_autocomplete/suggestion.rb', line 5 def address_id @address_id end |
#address_text ⇒ Object (readonly)
Returns the value of attribute address_text.
5 6 7 |
# File 'lib/smartystreets_ruby_sdk/international_autocomplete/suggestion.rb', line 5 def address_text @address_text end |
#administrative_area ⇒ Object (readonly)
Returns the value of attribute administrative_area.
5 6 7 |
# File 'lib/smartystreets_ruby_sdk/international_autocomplete/suggestion.rb', line 5 def administrative_area @administrative_area end |
#administrative_area_long ⇒ Object (readonly)
Returns the value of attribute administrative_area_long.
5 6 7 |
# File 'lib/smartystreets_ruby_sdk/international_autocomplete/suggestion.rb', line 5 def administrative_area_long @administrative_area_long end |
#administrative_area_short ⇒ Object (readonly)
Returns the value of attribute administrative_area_short.
5 6 7 |
# File 'lib/smartystreets_ruby_sdk/international_autocomplete/suggestion.rb', line 5 def administrative_area_short @administrative_area_short end |
#country_iso3 ⇒ Object (readonly)
Returns the value of attribute country_iso3.
5 6 7 |
# File 'lib/smartystreets_ruby_sdk/international_autocomplete/suggestion.rb', line 5 def country_iso3 @country_iso3 end |
#entries ⇒ Object (readonly)
Returns the value of attribute entries.
5 6 7 |
# File 'lib/smartystreets_ruby_sdk/international_autocomplete/suggestion.rb', line 5 def entries @entries end |
#locality ⇒ Object (readonly)
Returns the value of attribute locality.
5 6 7 |
# File 'lib/smartystreets_ruby_sdk/international_autocomplete/suggestion.rb', line 5 def locality @locality end |
#postal_code ⇒ Object (readonly)
Returns the value of attribute postal_code.
5 6 7 |
# File 'lib/smartystreets_ruby_sdk/international_autocomplete/suggestion.rb', line 5 def postal_code @postal_code end |
#street ⇒ Object (readonly)
Returns the value of attribute street.
5 6 7 |
# File 'lib/smartystreets_ruby_sdk/international_autocomplete/suggestion.rb', line 5 def street @street end |