Sha256: 0071aa6ffb0273e4e19b74ae1949c7d60e5115e3dabb21c8e993d6a86d831ecd

Contents?: true

Size: 1.64 KB

Versions: 72

Compression:

Stored size: 1.64 KB

Contents

module SmartyStreets
  module USStreet
    # This class contains the matched address broken down into its fundamental pieces.
    #
    # See "https://smartystreets.com/docs/cloud/us-street-api#components"
    class Components
      attr_reader :street_postdirection, :delivery_point_check_digit, :secondary_designator, :secondary_number, :zipcode,
                  :pmb_number, :state_abbreviation, :extra_secondary_designator, :urbanization, :street_name, :city_name,
                  :default_city_name, :street_suffix, :primary_number, :plus4_code, :street_predirection, :pmb_designator,
                  :extra_secondary_number, :delivery_point

      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
    end
  end
end

Version data entries

72 entries across 72 versions & 1 rubygems

Version Path
smartystreets_ruby_sdk-5.20.6 lib/smartystreets_ruby_sdk/us_street/components.rb
smartystreets_ruby_sdk-5.20.4 lib/smartystreets_ruby_sdk/us_street/components.rb
smartystreets_ruby_sdk-5.20.3 lib/smartystreets_ruby_sdk/us_street/components.rb
smartystreets_ruby_sdk-5.20.2 lib/smartystreets_ruby_sdk/us_street/components.rb
smartystreets_ruby_sdk-5.19.0 lib/smartystreets_ruby_sdk/us_street/components.rb
smartystreets_ruby_sdk-5.18.1 lib/smartystreets_ruby_sdk/us_street/components.rb
smartystreets_ruby_sdk-5.18.0 lib/smartystreets_ruby_sdk/us_street/components.rb
smartystreets_ruby_sdk-5.17.2 lib/smartystreets_ruby_sdk/us_street/components.rb
smartystreets_ruby_sdk-5.17.1 lib/smartystreets_ruby_sdk/us_street/components.rb
smartystreets_ruby_sdk-5.17.0 lib/smartystreets_ruby_sdk/us_street/components.rb
smartystreets_ruby_sdk-5.16.2 lib/smartystreets_ruby_sdk/us_street/components.rb
smartystreets_ruby_sdk-5.16.1 lib/smartystreets_ruby_sdk/us_street/components.rb
smartystreets_ruby_sdk-5.16.0 lib/smartystreets_ruby_sdk/us_street/components.rb
smartystreets_ruby_sdk-5.15.4 lib/smartystreets_ruby_sdk/us_street/components.rb
smartystreets_ruby_sdk-5.15.3 lib/smartystreets_ruby_sdk/us_street/components.rb
smartystreets_ruby_sdk-5.15.2 lib/smartystreets_ruby_sdk/us_street/components.rb
smartystreets_ruby_sdk-5.15.1 lib/smartystreets_ruby_sdk/us_street/components.rb
smartystreets_ruby_sdk-5.15.0 lib/smartystreets_ruby_sdk/us_street/components.rb
smartystreets_ruby_sdk-5.14.22 lib/smartystreets_ruby_sdk/us_street/components.rb
smartystreets_ruby_sdk-5.14.19 lib/smartystreets_ruby_sdk/us_street/components.rb