Class: SmartyStreets::InternationalAutocomplete::Lookup
- Defined in:
- lib/smartystreets_ruby_sdk/international_autocomplete/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.
Instance Attribute Summary collapse
-
#address_id ⇒ Object
Returns the value of attribute address_id.
-
#country ⇒ Object
Returns the value of attribute country.
-
#custom_param_hash ⇒ Object
Returns the value of attribute custom_param_hash.
-
#locality ⇒ Object
Returns the value of attribute locality.
-
#max_results ⇒ Object
Returns the value of attribute max_results.
-
#postal_code ⇒ Object
Returns the value of attribute postal_code.
-
#result ⇒ Object
Returns the value of attribute result.
-
#search ⇒ Object
Returns the value of attribute search.
Instance Method Summary collapse
- #add_custom_parameter(parameter, value) ⇒ Object
-
#initialize(search = nil, address_id = nil, country = nil, max_results = nil, locality = nil, postal_code = nil, custom_param_hash = nil) ⇒ Lookup
constructor
A new instance of Lookup.
Methods inherited from JSONAble
Constructor Details
#initialize(search = nil, address_id = nil, country = nil, max_results = nil, locality = nil, postal_code = nil, custom_param_hash = nil) ⇒ Lookup
Returns a new instance of Lookup.
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/smartystreets_ruby_sdk/international_autocomplete/lookup.rb', line 11 def initialize(search = nil, address_id = nil, country = nil, max_results = nil, locality = nil, postal_code = nil, custom_param_hash = nil) @result = [] @search = search @address_id = address_id @country = country @max_results = max_results @locality = locality @postal_code = postal_code @custom_param_hash = {} end |
Instance Attribute Details
#address_id ⇒ Object
Returns the value of attribute address_id.
9 10 11 |
# File 'lib/smartystreets_ruby_sdk/international_autocomplete/lookup.rb', line 9 def address_id @address_id end |
#country ⇒ Object
Returns the value of attribute country.
9 10 11 |
# File 'lib/smartystreets_ruby_sdk/international_autocomplete/lookup.rb', line 9 def country @country end |
#custom_param_hash ⇒ Object
Returns the value of attribute custom_param_hash.
9 10 11 |
# File 'lib/smartystreets_ruby_sdk/international_autocomplete/lookup.rb', line 9 def custom_param_hash @custom_param_hash end |
#locality ⇒ Object
Returns the value of attribute locality.
9 10 11 |
# File 'lib/smartystreets_ruby_sdk/international_autocomplete/lookup.rb', line 9 def locality @locality end |
#max_results ⇒ Object
Returns the value of attribute max_results.
9 10 11 |
# File 'lib/smartystreets_ruby_sdk/international_autocomplete/lookup.rb', line 9 def max_results @max_results end |
#postal_code ⇒ Object
Returns the value of attribute postal_code.
9 10 11 |
# File 'lib/smartystreets_ruby_sdk/international_autocomplete/lookup.rb', line 9 def postal_code @postal_code end |
#result ⇒ Object
Returns the value of attribute result.
9 10 11 |
# File 'lib/smartystreets_ruby_sdk/international_autocomplete/lookup.rb', line 9 def result @result end |
#search ⇒ Object
Returns the value of attribute search.
9 10 11 |
# File 'lib/smartystreets_ruby_sdk/international_autocomplete/lookup.rb', line 9 def search @search end |
Instance Method Details
#add_custom_parameter(parameter, value) ⇒ Object
22 23 24 |
# File 'lib/smartystreets_ruby_sdk/international_autocomplete/lookup.rb', line 22 def add_custom_parameter(parameter, value) @custom_param_hash[parameter] = value end |