Class: SmartyStreets::USZipcode::Lookup
- 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
-
#city ⇒ Object
Returns the value of attribute city.
-
#custom_param_hash ⇒ Object
Returns the value of attribute custom_param_hash.
-
#input_id ⇒ Object
Returns the value of attribute input_id.
-
#result ⇒ Object
Returns the value of attribute result.
-
#state ⇒ Object
Returns the value of attribute state.
-
#zipcode ⇒ Object
Returns the value of attribute zipcode.
Instance Method Summary collapse
- #add_custom_parameter(parameter, value) ⇒ Object
-
#initialize(city = nil, state = nil, zipcode = nil, input_id = nil, custom_param_hash = nil) ⇒ Lookup
constructor
A new instance of Lookup.
Methods inherited from JSONAble
Constructor Details
#initialize(city = nil, state = nil, zipcode = nil, input_id = nil, custom_param_hash = nil) ⇒ Lookup
Returns a new instance of Lookup.
12 13 14 15 16 17 18 19 |
# File 'lib/smartystreets_ruby_sdk/us_zipcode/lookup.rb', line 12 def initialize(city=nil, state=nil, zipcode=nil, input_id=nil, custom_param_hash=nil) @result = nil @input_id = input_id @city = city @state = state @zipcode = zipcode @custom_param_hash = {} end |
Instance Attribute Details
#city ⇒ Object
Returns the value of attribute city.
10 11 12 |
# File 'lib/smartystreets_ruby_sdk/us_zipcode/lookup.rb', line 10 def city @city end |
#custom_param_hash ⇒ Object
Returns the value of attribute custom_param_hash.
10 11 12 |
# File 'lib/smartystreets_ruby_sdk/us_zipcode/lookup.rb', line 10 def custom_param_hash @custom_param_hash end |
#input_id ⇒ Object
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 |
#result ⇒ Object
Returns the value of attribute result.
10 11 12 |
# File 'lib/smartystreets_ruby_sdk/us_zipcode/lookup.rb', line 10 def result @result end |
#state ⇒ Object
Returns the value of attribute state.
10 11 12 |
# File 'lib/smartystreets_ruby_sdk/us_zipcode/lookup.rb', line 10 def state @state end |
#zipcode ⇒ Object
Returns the value of attribute zipcode.
10 11 12 |
# File 'lib/smartystreets_ruby_sdk/us_zipcode/lookup.rb', line 10 def zipcode @zipcode end |
Instance Method Details
#add_custom_parameter(parameter, value) ⇒ Object
21 22 23 |
# File 'lib/smartystreets_ruby_sdk/us_zipcode/lookup.rb', line 21 def add_custom_parameter(parameter, value) @custom_param_hash[parameter] = value end |