Class: SmartyStreets::USZipcode::City

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#cityObject (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_cityObject (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

#stateObject (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_abbreviationObject (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