Sha256: ebebbe26cc6cbe2dc13cc409a259e3107432a91d811b73b950c5361ef2430dcf

Contents?: true

Size: 1.72 KB

Versions: 4

Compression:

Stored size: 1.72 KB

Contents

module Eddy
  module Elements
    # ### Element Summary:
    #
    # - Id: 156
    # - Name: State or Province Code
    # - Type: ID
    # - Min/Max: 2/2
    # - Description: Code (Standard State/Province) as defined by appropriate government agency.
    #
    # ### Notes:
    #
    # - FIXME: Currently only accepts states in the USA.
    class E156 < Eddy::Element::ID

      # @param val [String] (nil)
      # @param req [String] (nil)
      # @param ref [String] (nil)
      # @return [void]
      def initialize(val: nil, req: nil, ref: nil)
        @id = "156"
        @name = "State or Province Code"
        @description = "(Standard State/Province) as defined by appropriate government agency."
        super(
          min: 2,
          max: 2,
          req: req,
          ref: ref,
          val: val,
        )
      end

      # @return [Array<String>]
      def code_list()
        return [
          "AL",
          "AK",
          "AZ",
          "AR",
          "CA",
          "CO",
          "CT",
          "DE",
          "DC",
          "FL",
          "GA",
          "HI",
          "ID",
          "IL",
          "IN",
          "IA",
          "KS",
          "KY",
          "LA",
          "ME",
          "MD",
          "MA",
          "MI",
          "MN",
          "MS",
          "MO",
          "MT",
          "NE",
          "NV",
          "NH",
          "NJ",
          "NM",
          "NY",
          "NC",
          "ND",
          "OH",
          "OK",
          "OR",
          "PA",
          "RI",
          "SC",
          "SD",
          "TN",
          "TX",
          "UT",
          "VT",
          "VA",
          "WA",
          "WV",
          "WI",
          "WY",
        ]
      end

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
eddy-0.5.1 lib/definitions/elements/manual/156.state_or_province_code.rb
eddy-0.5.0 lib/definitions/elements/manual/156.state_or_province_code.rb
eddy-0.4.0 lib/definitions/elements/manual/156.state_or_province_code.rb
eddy-0.3.0 lib/definitions/elements/manual/156.state_or_province_code.rb