Class: SmartyStreets::USAutocompletePro::Suggestion

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

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(obj) ⇒ Suggestion

Returns a new instance of Suggestion.



8
9
10
11
12
13
14
15
# File 'lib/smartystreets_ruby_sdk/us_autocomplete_pro/suggestion.rb', line 8

def initialize(obj)
  @street_line = obj.fetch('street_line', nil)
  @secondary = obj.fetch('secondary', nil)
  @city = obj.fetch('city', nil)
  @state = obj.fetch('state', nil)
  @zipcode = obj.fetch('zipcode', nil)
  @entries = obj.fetch('entries', 0)
end

Instance Attribute Details

#cityObject (readonly)

Returns the value of attribute city.



6
7
8
# File 'lib/smartystreets_ruby_sdk/us_autocomplete_pro/suggestion.rb', line 6

def city
  @city
end

#entriesObject (readonly)

Returns the value of attribute entries.



6
7
8
# File 'lib/smartystreets_ruby_sdk/us_autocomplete_pro/suggestion.rb', line 6

def entries
  @entries
end

#secondaryObject (readonly)

Returns the value of attribute secondary.



6
7
8
# File 'lib/smartystreets_ruby_sdk/us_autocomplete_pro/suggestion.rb', line 6

def secondary
  @secondary
end

#stateObject (readonly)

Returns the value of attribute state.



6
7
8
# File 'lib/smartystreets_ruby_sdk/us_autocomplete_pro/suggestion.rb', line 6

def state
  @state
end

#street_lineObject (readonly)

Returns the value of attribute street_line.



6
7
8
# File 'lib/smartystreets_ruby_sdk/us_autocomplete_pro/suggestion.rb', line 6

def street_line
  @street_line
end

#zipcodeObject (readonly)

Returns the value of attribute zipcode.



6
7
8
# File 'lib/smartystreets_ruby_sdk/us_autocomplete_pro/suggestion.rb', line 6

def zipcode
  @zipcode
end