Class: SmartyStreets::InternationalAutocomplete::Suggestion

Inherits:
Object
  • Object
show all
Defined in:
lib/smartystreets_ruby_sdk/international_autocomplete/suggestion.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_idObject (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_textObject (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_areaObject (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_longObject (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_shortObject (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_iso3Object (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

#entriesObject (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

#localityObject (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_codeObject (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

#streetObject (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