Class: SmartyStreets::USZipcode::Lookup

Inherits:
JSONAble
  • Object
show all
Defined in:
lib/smartystreets_ruby_sdk/us_zipcode/lookup.rb

Overview

In addition to holding all of the input data for this lookup, this class also

will contain the result of the lookup after it comes back from the API.

See "https://smartystreets.com/docs/cloud/us-zipcode-api#http-request-input-fields"

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from JSONAble

#from_json!, #to_json

Constructor Details

#initialize(city = nil, state = nil, zipcode = nil, input_id = nil) ⇒ Lookup

Returns a new instance of Lookup.



12
13
14
15
16
17
18
# File 'lib/smartystreets_ruby_sdk/us_zipcode/lookup.rb', line 12

def initialize(city=nil, state=nil, zipcode=nil, input_id=nil)
  @result = nil
  @input_id = input_id
  @city = city
  @state = state
  @zipcode = zipcode
end

Instance Attribute Details

#cityObject

Returns the value of attribute city.



10
11
12
# File 'lib/smartystreets_ruby_sdk/us_zipcode/lookup.rb', line 10

def city
  @city
end

#input_idObject

Returns the value of attribute input_id.



10
11
12
# File 'lib/smartystreets_ruby_sdk/us_zipcode/lookup.rb', line 10

def input_id
  @input_id
end

#resultObject

Returns the value of attribute result.



10
11
12
# File 'lib/smartystreets_ruby_sdk/us_zipcode/lookup.rb', line 10

def result
  @result
end

#stateObject

Returns the value of attribute state.



10
11
12
# File 'lib/smartystreets_ruby_sdk/us_zipcode/lookup.rb', line 10

def state
  @state
end

#zipcodeObject

Returns the value of attribute zipcode.



10
11
12
# File 'lib/smartystreets_ruby_sdk/us_zipcode/lookup.rb', line 10

def zipcode
  @zipcode
end