Class: SmartyStreets::USStreet::Components

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

Overview

This class contains the matched address broken down into its fundamental pieces.

See “smartystreets.com/docs/cloud/us-street-api#components

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(obj) ⇒ Components

Returns a new instance of Components.



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

def initialize(obj)
  @urbanization = obj['urbanization']
  @primary_number = obj['primary_number']
  @street_name = obj['street_name']
  @street_predirection = obj['street_predirection']
  @street_postdirection = obj['street_postdirection']
  @street_suffix = obj['street_suffix']
  @secondary_number = obj['secondary_number']
  @secondary_designator = obj['secondary_designator']
  @extra_secondary_number = obj['extra_secondary_number']
  @extra_secondary_designator = obj['extra_secondary_designator']
  @pmb_designator = obj['pmb_designator']
  @pmb_number = obj['pmb_number']
  @city_name = obj['city_name']
  @default_city_name = obj['default_city_name']
  @state_abbreviation = obj['state_abbreviation']
  @zipcode = obj['zipcode']
  @plus4_code = obj['plus4_code']
  @delivery_point = obj['delivery_point']
  @delivery_point_check_digit = obj['delivery_point_check_digit']
end

Instance Attribute Details

#city_nameObject (readonly)

Returns the value of attribute city_name.



7
8
9
# File 'lib/smartystreets_ruby_sdk/us_street/components.rb', line 7

def city_name
  @city_name
end

#default_city_nameObject (readonly)

Returns the value of attribute default_city_name.



7
8
9
# File 'lib/smartystreets_ruby_sdk/us_street/components.rb', line 7

def default_city_name
  @default_city_name
end

#delivery_pointObject (readonly)

Returns the value of attribute delivery_point.



7
8
9
# File 'lib/smartystreets_ruby_sdk/us_street/components.rb', line 7

def delivery_point
  @delivery_point
end

#delivery_point_check_digitObject (readonly)

Returns the value of attribute delivery_point_check_digit.



7
8
9
# File 'lib/smartystreets_ruby_sdk/us_street/components.rb', line 7

def delivery_point_check_digit
  @delivery_point_check_digit
end

#extra_secondary_designatorObject (readonly)

Returns the value of attribute extra_secondary_designator.



7
8
9
# File 'lib/smartystreets_ruby_sdk/us_street/components.rb', line 7

def extra_secondary_designator
  @extra_secondary_designator
end

#extra_secondary_numberObject (readonly)

Returns the value of attribute extra_secondary_number.



7
8
9
# File 'lib/smartystreets_ruby_sdk/us_street/components.rb', line 7

def extra_secondary_number
  @extra_secondary_number
end

#plus4_codeObject (readonly)

Returns the value of attribute plus4_code.



7
8
9
# File 'lib/smartystreets_ruby_sdk/us_street/components.rb', line 7

def plus4_code
  @plus4_code
end

#pmb_designatorObject (readonly)

Returns the value of attribute pmb_designator.



7
8
9
# File 'lib/smartystreets_ruby_sdk/us_street/components.rb', line 7

def pmb_designator
  @pmb_designator
end

#pmb_numberObject (readonly)

Returns the value of attribute pmb_number.



7
8
9
# File 'lib/smartystreets_ruby_sdk/us_street/components.rb', line 7

def pmb_number
  @pmb_number
end

#primary_numberObject (readonly)

Returns the value of attribute primary_number.



7
8
9
# File 'lib/smartystreets_ruby_sdk/us_street/components.rb', line 7

def primary_number
  @primary_number
end

#secondary_designatorObject (readonly)

Returns the value of attribute secondary_designator.



7
8
9
# File 'lib/smartystreets_ruby_sdk/us_street/components.rb', line 7

def secondary_designator
  @secondary_designator
end

#secondary_numberObject (readonly)

Returns the value of attribute secondary_number.



7
8
9
# File 'lib/smartystreets_ruby_sdk/us_street/components.rb', line 7

def secondary_number
  @secondary_number
end

#state_abbreviationObject (readonly)

Returns the value of attribute state_abbreviation.



7
8
9
# File 'lib/smartystreets_ruby_sdk/us_street/components.rb', line 7

def state_abbreviation
  @state_abbreviation
end

#street_nameObject (readonly)

Returns the value of attribute street_name.



7
8
9
# File 'lib/smartystreets_ruby_sdk/us_street/components.rb', line 7

def street_name
  @street_name
end

#street_postdirectionObject (readonly)

Returns the value of attribute street_postdirection.



7
8
9
# File 'lib/smartystreets_ruby_sdk/us_street/components.rb', line 7

def street_postdirection
  @street_postdirection
end

#street_predirectionObject (readonly)

Returns the value of attribute street_predirection.



7
8
9
# File 'lib/smartystreets_ruby_sdk/us_street/components.rb', line 7

def street_predirection
  @street_predirection
end

#street_suffixObject (readonly)

Returns the value of attribute street_suffix.



7
8
9
# File 'lib/smartystreets_ruby_sdk/us_street/components.rb', line 7

def street_suffix
  @street_suffix
end

#urbanizationObject (readonly)

Returns the value of attribute urbanization.



7
8
9
# File 'lib/smartystreets_ruby_sdk/us_street/components.rb', line 7

def urbanization
  @urbanization
end

#zipcodeObject (readonly)

Returns the value of attribute zipcode.



7
8
9
# File 'lib/smartystreets_ruby_sdk/us_street/components.rb', line 7

def zipcode
  @zipcode
end