Class: SmartyStreets::USZipcode::City
- Inherits:
-
Object
- Object
- SmartyStreets::USZipcode::City
- Defined in:
- lib/smartystreets_ruby_sdk/us_zipcode/city.rb
Overview
Known in the SmartyStreets US ZIP Code API documentation as a city_state See “smartystreets.com/docs/cloud/us-zipcode-api#cities”
Instance Attribute Summary collapse
-
#city ⇒ Object
readonly
Returns the value of attribute city.
-
#mailable_city ⇒ Object
readonly
Returns the value of attribute mailable_city.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
-
#state_abbreviation ⇒ Object
readonly
Returns the value of attribute state_abbreviation.
Instance Method Summary collapse
-
#initialize(obj) ⇒ City
constructor
A new instance of City.
Constructor Details
#initialize(obj) ⇒ City
Returns a new instance of City.
8 9 10 11 12 13 |
# File 'lib/smartystreets_ruby_sdk/us_zipcode/city.rb', line 8 def initialize(obj) @city = obj['city'] @mailable_city = obj['mailable_city'] @state_abbreviation = obj['state_abbreviation'] @state = obj['state'] end |
Instance Attribute Details
#city ⇒ Object (readonly)
Returns the value of attribute city.
6 7 8 |
# File 'lib/smartystreets_ruby_sdk/us_zipcode/city.rb', line 6 def city @city end |
#mailable_city ⇒ Object (readonly)
Returns the value of attribute mailable_city.
6 7 8 |
# File 'lib/smartystreets_ruby_sdk/us_zipcode/city.rb', line 6 def mailable_city @mailable_city end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
6 7 8 |
# File 'lib/smartystreets_ruby_sdk/us_zipcode/city.rb', line 6 def state @state end |
#state_abbreviation ⇒ Object (readonly)
Returns the value of attribute state_abbreviation.
6 7 8 |
# File 'lib/smartystreets_ruby_sdk/us_zipcode/city.rb', line 6 def state_abbreviation @state_abbreviation end |