Class: SmartyStreets::USStreet::Candidate
- Inherits:
-
Object
- Object
- SmartyStreets::USStreet::Candidate
- Defined in:
- lib/smartystreets_ruby_sdk/us_street/candidate.rb
Overview
Instance Attribute Summary collapse
-
#addressee ⇒ Object
readonly
Returns the value of attribute addressee.
-
#analysis ⇒ Object
readonly
Returns the value of attribute analysis.
-
#candidate_index ⇒ Object
readonly
Returns the value of attribute candidate_index.
-
#components ⇒ Object
readonly
Returns the value of attribute components.
-
#delivery_line_1 ⇒ Object
readonly
Returns the value of attribute delivery_line_1.
-
#delivery_line_2 ⇒ Object
readonly
Returns the value of attribute delivery_line_2.
-
#delivery_point_barcode ⇒ Object
readonly
Returns the value of attribute delivery_point_barcode.
-
#input_id ⇒ Object
readonly
Returns the value of attribute input_id.
-
#input_index ⇒ Object
readonly
Returns the value of attribute input_index.
-
#last_line ⇒ Object
readonly
Returns the value of attribute last_line.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#smarty_key ⇒ Object
readonly
Returns the value of attribute smarty_key.
Instance Method Summary collapse
-
#initialize(obj) ⇒ Candidate
constructor
A new instance of Candidate.
Constructor Details
#initialize(obj) ⇒ Candidate
Returns a new instance of Candidate.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/smartystreets_ruby_sdk/us_street/candidate.rb', line 12 def initialize(obj) @input_id = obj['input_id'] @input_index = obj['input_index'] @candidate_index = obj['candidate_index'] @addressee = obj['addressee'] @delivery_line_1 = obj['delivery_line_1'] @delivery_line_2 = obj['delivery_line_2'] @last_line = obj['last_line'] @delivery_point_barcode = obj['delivery_point_barcode'] @smarty_key = obj['smarty_key'] @components = Components.new(obj.fetch('components', {})) @metadata = Metadata.new(obj.fetch('metadata', {})) @analysis = Analysis.new(obj.fetch('analysis', {})) end |
Instance Attribute Details
#addressee ⇒ Object (readonly)
Returns the value of attribute addressee.
9 10 11 |
# File 'lib/smartystreets_ruby_sdk/us_street/candidate.rb', line 9 def addressee @addressee end |
#analysis ⇒ Object (readonly)
Returns the value of attribute analysis.
9 10 11 |
# File 'lib/smartystreets_ruby_sdk/us_street/candidate.rb', line 9 def analysis @analysis end |
#candidate_index ⇒ Object (readonly)
Returns the value of attribute candidate_index.
9 10 11 |
# File 'lib/smartystreets_ruby_sdk/us_street/candidate.rb', line 9 def candidate_index @candidate_index end |
#components ⇒ Object (readonly)
Returns the value of attribute components.
9 10 11 |
# File 'lib/smartystreets_ruby_sdk/us_street/candidate.rb', line 9 def components @components end |
#delivery_line_1 ⇒ Object (readonly)
Returns the value of attribute delivery_line_1.
9 10 11 |
# File 'lib/smartystreets_ruby_sdk/us_street/candidate.rb', line 9 def delivery_line_1 @delivery_line_1 end |
#delivery_line_2 ⇒ Object (readonly)
Returns the value of attribute delivery_line_2.
9 10 11 |
# File 'lib/smartystreets_ruby_sdk/us_street/candidate.rb', line 9 def delivery_line_2 @delivery_line_2 end |
#delivery_point_barcode ⇒ Object (readonly)
Returns the value of attribute delivery_point_barcode.
9 10 11 |
# File 'lib/smartystreets_ruby_sdk/us_street/candidate.rb', line 9 def @delivery_point_barcode end |
#input_id ⇒ Object (readonly)
Returns the value of attribute input_id.
9 10 11 |
# File 'lib/smartystreets_ruby_sdk/us_street/candidate.rb', line 9 def input_id @input_id end |
#input_index ⇒ Object (readonly)
Returns the value of attribute input_index.
9 10 11 |
# File 'lib/smartystreets_ruby_sdk/us_street/candidate.rb', line 9 def input_index @input_index end |
#last_line ⇒ Object (readonly)
Returns the value of attribute last_line.
9 10 11 |
# File 'lib/smartystreets_ruby_sdk/us_street/candidate.rb', line 9 def last_line @last_line end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
9 10 11 |
# File 'lib/smartystreets_ruby_sdk/us_street/candidate.rb', line 9 def @metadata end |
#smarty_key ⇒ Object (readonly)
Returns the value of attribute smarty_key.
9 10 11 |
# File 'lib/smartystreets_ruby_sdk/us_street/candidate.rb', line 9 def smarty_key @smarty_key end |