Class: SmartyStreets::InternationalStreet::Candidate
- 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
-
#analysis ⇒ Object
readonly
Returns the value of attribute analysis.
-
#components ⇒ Object
readonly
Returns the value of attribute components.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
Attributes inherited from RootLevel
#address1, #address10, #address11, #address12, #address2, #address3, #address4, #address5, #address6, #address7, #address8, #address9, #input_id, #organization
Instance Method Summary collapse
-
#initialize(obj) ⇒ Candidate
constructor
A new instance of Candidate.
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
#analysis ⇒ Object (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 |
#components ⇒ Object (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 |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
13 14 15 |
# File 'lib/smartystreets_ruby_sdk/international_street/candidate.rb', line 13 def @metadata end |