Class: SmartyStreets::InternationalStreet::Candidate

Inherits:
RootLevel
  • 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

Attributes inherited from RootLevel

#address1, #address10, #address11, #address12, #address2, #address3, #address4, #address5, #address6, #address7, #address8, #address9, #input_id, #organization

Instance Method Summary collapse

Constructor Details

#initialize(obj) ⇒ Candidate

Returns a new instance of Candidate.



15
16
17
18
19
20
# File 'lib/smartystreets_ruby_sdk/international_street/candidate.rb', line 15

def initialize(obj)
  @components = Components.new(obj.fetch('components', {}))
  @metadata = Metadata.new(obj.fetch('metadata', {}))
  @analysis = Analysis.new(obj.fetch('analysis', {}))
  super(obj)
end

Instance Attribute Details

#analysisObject (readonly)

Returns the value of attribute analysis.



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

def analysis
  @analysis
end

#componentsObject (readonly)

Returns the value of attribute components.



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

def components
  @components
end

#metadataObject (readonly)

Returns the value of attribute metadata.



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

def 
  @metadata
end