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, country = nil, max_results = nil, distance = nil, geolocation = nil, administrative_area = nil, locality = nil, postal_code = nil, latitude = nil, longitude = nil) ⇒ Lookup

Returns a new instance of Lookup.



11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/smartystreets_ruby_sdk/international_autocomplete/lookup.rb', line 11

def initialize(search = nil, country = nil, max_results = nil, distance = nil, geolocation = nil, administrative_area = nil, locality = nil, postal_code = nil, latitude = nil, longitude = nil)
  @result = []
  @search = search
  @country = country
  @max_results = max_results
  @distance = distance
  @geolocation = geolocation
  @administrative_area = administrative_area
  @locality = locality
  @postal_code = postal_code
  @latitude = latitude
  @longitude = longitude
end

Instance Attribute Details

#administrative_areaObject

Returns the value of attribute administrative_area.



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

def administrative_area
  @administrative_area
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

#distanceObject

Returns the value of attribute distance.



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

def distance
  @distance
end

#geolocationObject

Returns the value of attribute geolocation.



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

def geolocation
  @geolocation
end

#latitudeObject

Returns the value of attribute latitude.



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

def latitude
  @latitude
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

#longitudeObject

Returns the value of attribute longitude.



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

def longitude
  @longitude
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