Class: SmartyStreets::InternationalStreet::Candidate

Inherits:
Object
  • Object
show all
Defined in:
lib/smartystreets_ruby_sdk/international_street/candidate.rb

Overview

A candidate is a possible match for an address that was submitted. A lookup can have multiple candidates if the address was ambiguous.

See “smartystreets.com/docs/cloud/international-street-api#root

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(obj) ⇒ Candidate

Returns a new instance of Candidate.



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/smartystreets_ruby_sdk/international_street/candidate.rb', line 15

def initialize(obj)
  @organization = obj.fetch('organization', nil)
  @address1 = obj.fetch('address1', nil)
  @address2 = obj.fetch('address2', nil)
  @address3 = obj.fetch('address3', nil)
  @address4 = obj.fetch('address4', nil)
  @address5 = obj.fetch('address5', nil)
  @address6 = obj.fetch('address6', nil)
  @address7 = obj.fetch('address7', nil)
  @address8 = obj.fetch('address8', nil)
  @address9 = obj.fetch('address9', nil)
  @address10 = obj.fetch('address10', nil)
  @address11 = obj.fetch('address11', nil)
  @address12 = obj.fetch('address12', nil)
  @components = Components.new(obj.fetch('components', {}))
  @metadata = Metadata.new(obj.fetch('metadata', {}))
  @analysis = Analysis.new(obj.fetch('analysis', {}))
end

Instance Attribute Details

#address1Object (readonly)

Returns the value of attribute address1.



12
13
14
# File 'lib/smartystreets_ruby_sdk/international_street/candidate.rb', line 12

def address1
  @address1
end

#address10Object (readonly)

Returns the value of attribute address10.



12
13
14
# File 'lib/smartystreets_ruby_sdk/international_street/candidate.rb', line 12

def address10
  @address10
end

#address11Object (readonly)

Returns the value of attribute address11.



12
13
14
# File 'lib/smartystreets_ruby_sdk/international_street/candidate.rb', line 12

def address11
  @address11
end

#address12Object (readonly)

Returns the value of attribute address12.



12
13
14
# File 'lib/smartystreets_ruby_sdk/international_street/candidate.rb', line 12

def address12
  @address12
end

#address2Object (readonly)

Returns the value of attribute address2.



12
13
14
# File 'lib/smartystreets_ruby_sdk/international_street/candidate.rb', line 12

def address2
  @address2
end

#address3Object (readonly)

Returns the value of attribute address3.



12
13
14
# File 'lib/smartystreets_ruby_sdk/international_street/candidate.rb', line 12

def address3
  @address3
end

#address4Object (readonly)

Returns the value of attribute address4.



12
13
14
# File 'lib/smartystreets_ruby_sdk/international_street/candidate.rb', line 12

def address4
  @address4
end

#address5Object (readonly)

Returns the value of attribute address5.



12
13
14
# File 'lib/smartystreets_ruby_sdk/international_street/candidate.rb', line 12

def address5
  @address5
end

#address6Object (readonly)

Returns the value of attribute address6.



12
13
14
# File 'lib/smartystreets_ruby_sdk/international_street/candidate.rb', line 12

def address6
  @address6
end

#address7Object (readonly)

Returns the value of attribute address7.



12
13
14
# File 'lib/smartystreets_ruby_sdk/international_street/candidate.rb', line 12

def address7
  @address7
end

#address8Object (readonly)

Returns the value of attribute address8.



12
13
14
# File 'lib/smartystreets_ruby_sdk/international_street/candidate.rb', line 12

def address8
  @address8
end

#address9Object (readonly)

Returns the value of attribute address9.



12
13
14
# File 'lib/smartystreets_ruby_sdk/international_street/candidate.rb', line 12

def address9
  @address9
end

#analysisObject (readonly)

Returns the value of attribute analysis.



12
13
14
# File 'lib/smartystreets_ruby_sdk/international_street/candidate.rb', line 12

def analysis
  @analysis
end

#componentsObject (readonly)

Returns the value of attribute components.



12
13
14
# File 'lib/smartystreets_ruby_sdk/international_street/candidate.rb', line 12

def components
  @components
end

#metadataObject (readonly)

Returns the value of attribute metadata.



12
13
14
# File 'lib/smartystreets_ruby_sdk/international_street/candidate.rb', line 12

def 
  @metadata
end

#organizationObject (readonly)

Returns the value of attribute organization.



12
13
14
# File 'lib/smartystreets_ruby_sdk/international_street/candidate.rb', line 12

def organization
  @organization
end