Class: SmartyStreets::InternationalAutocomplete::Lookup

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

Instance Method Summary collapse

Methods inherited from JSONAble

#from_json!, #to_json

Constructor Details

#initialize(search = nil, address_id = nil, country = nil, max_results = nil, locality = nil, postal_code = nil) ⇒ Lookup

Returns a new instance of Lookup.



11
12
13
14
15
16
17
18
19
# 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)
  @result = []
  @search = search
  @address_id = address_id
  @country = country
  @max_results = max_results
  @locality = locality
  @postal_code = postal_code
end

Instance Attribute Details

#address_idObject

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

#countryObject

Returns the value of attribute country.



9
10
11
# File 'lib/smartystreets_ruby_sdk/international_autocomplete/lookup.rb', line 9

def country
  @country
end

#localityObject

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_resultsObject

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_codeObject

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

#resultObject

Returns the value of attribute result.



9
10
11
# File 'lib/smartystreets_ruby_sdk/international_autocomplete/lookup.rb', line 9

def result
  @result
end

#searchObject

Returns the value of attribute search.



9
10
11
# File 'lib/smartystreets_ruby_sdk/international_autocomplete/lookup.rb', line 9

def search
  @search
end