Class: SmartyStreets::USStreet::Lookup

Inherits:
JSONAble
  • Object
show all
Defined in:
lib/smartystreets_ruby_sdk/us_street/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 “smartystreets.com/docs/cloud/us-street-api#input-fields

@match

Must be set to ‘strict’, ‘range’, or ‘invalid’. Constants for these are in match_type.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from JSONAble

#from_json!, #to_json

Constructor Details

#initialize(street = nil, street2 = nil, secondary = nil, city = nil, state = nil, zipcode = nil, lastline = nil, addressee = nil, urbanization = nil, match = nil, candidates = 0, input_id = nil) ⇒ Lookup

Returns a new instance of Lookup.



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/smartystreets_ruby_sdk/us_street/lookup.rb', line 14

def initialize(street=nil, street2=nil, secondary=nil, city=nil, state=nil, zipcode=nil, lastline=nil,
               addressee=nil, urbanization=nil, match=nil, candidates=0, input_id=nil)
  @input_id = input_id
  @street = street
  @street2 = street2
  @secondary = secondary
  @city = city
  @state = state
  @zipcode = zipcode
  @lastline = lastline
  @addressee = addressee
  @urbanization = urbanization
  @match = match
  @candidates = candidates
  @result = []
end

Instance Attribute Details

#addresseeObject

Returns the value of attribute addressee.



11
12
13
# File 'lib/smartystreets_ruby_sdk/us_street/lookup.rb', line 11

def addressee
  @addressee
end

#candidatesObject

Returns the value of attribute candidates.



11
12
13
# File 'lib/smartystreets_ruby_sdk/us_street/lookup.rb', line 11

def candidates
  @candidates
end

#cityObject

Returns the value of attribute city.



11
12
13
# File 'lib/smartystreets_ruby_sdk/us_street/lookup.rb', line 11

def city
  @city
end

#input_idObject

Returns the value of attribute input_id.



11
12
13
# File 'lib/smartystreets_ruby_sdk/us_street/lookup.rb', line 11

def input_id
  @input_id
end

#lastlineObject

Returns the value of attribute lastline.



11
12
13
# File 'lib/smartystreets_ruby_sdk/us_street/lookup.rb', line 11

def lastline
  @lastline
end

#matchObject

Returns the value of attribute match.



11
12
13
# File 'lib/smartystreets_ruby_sdk/us_street/lookup.rb', line 11

def match
  @match
end

#resultObject

Returns the value of attribute result.



11
12
13
# File 'lib/smartystreets_ruby_sdk/us_street/lookup.rb', line 11

def result
  @result
end

#secondaryObject

Returns the value of attribute secondary.



11
12
13
# File 'lib/smartystreets_ruby_sdk/us_street/lookup.rb', line 11

def secondary
  @secondary
end

#stateObject

Returns the value of attribute state.



11
12
13
# File 'lib/smartystreets_ruby_sdk/us_street/lookup.rb', line 11

def state
  @state
end

#streetObject

Returns the value of attribute street.



11
12
13
# File 'lib/smartystreets_ruby_sdk/us_street/lookup.rb', line 11

def street
  @street
end

#street2Object

Returns the value of attribute street2.



11
12
13
# File 'lib/smartystreets_ruby_sdk/us_street/lookup.rb', line 11

def street2
  @street2
end

#urbanizationObject

Returns the value of attribute urbanization.



11
12
13
# File 'lib/smartystreets_ruby_sdk/us_street/lookup.rb', line 11

def urbanization
  @urbanization
end

#zipcodeObject

Returns the value of attribute zipcode.



11
12
13
# File 'lib/smartystreets_ruby_sdk/us_street/lookup.rb', line 11

def zipcode
  @zipcode
end