Class: SmartyStreets::USStreet::Candidate

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

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(obj) ⇒ Candidate

Returns a new instance of Candidate.



12
13
14
15
16
17
18
19
20
21
22
23
24
# 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']
  @components = Components.new(obj.fetch('components', {}))
  @metadata = Metadata.new(obj.fetch('metadata', {}))
  @analysis = Analysis.new(obj.fetch('analysis', {}))
end

Instance Attribute Details

#addresseeObject (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

#analysisObject (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_indexObject (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

#componentsObject (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_1Object (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_2Object (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_barcodeObject (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
  @delivery_point_barcode
end

#input_idObject (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_indexObject (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_lineObject (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

#metadataObject (readonly)

Returns the value of attribute metadata.



9
10
11
# File 'lib/smartystreets_ruby_sdk/us_street/candidate.rb', line 9

def 
  @metadata
end