Sha256: e1cd7153492035b10deef7fccf7b9c53e32edb1930fd00c51e16a0ace2913739

Contents?: true

Size: 1.42 KB

Versions: 4

Compression:

Stored size: 1.42 KB

Contents

module Eddy
  module Segments
    # ### Segment Summary:
    #
    # - Id: ST
    # - Name: Transaction Set Header
    # - Purpose: To indicate the start of a transaction set and to assign a control number.
    class ST < Eddy::Segment

      # @param store [Eddy::Data::Store]
      # @return [void]
      def initialize(store)
        @id = "ST"
        @name = "Transaction Set Header"
        @st01 = Eddy::Elements::E143.new(ref: "ST01", req: "M")
        @st02 = Eddy::Elements::E329.new(ref: "ST02", req: "M") # TODO: store.transaction_set_control_number
        super(store, @st01, @st02)
      end

      # ### ST01
      #
      # - Id: 143
      # - Name: Transaction Set Identifier Code
      # - Type: ID
      # - Min/Max: 3/3
      # - Description: Code uniquely identifying a Transaction Set
      #
      # @param arg [String]
      # @return [void]
      def ST01=(arg)
        @st01.value = arg
      end
      alias TransactionSetIdentifierCode= ST01=

      # ### ST02
      #
      # - Id: 329
      # - Name: Transaction Set Control Number
      # - Type: AN
      # - Min/Max: 4/9
      # - Description: Identifying control number that must be unique within the transaction set functional group assigned by the originator for a transaction set
      #
      # @param arg [String]
      # @return [void]
      def ST02=(arg)
        @st02.value = arg
      end
      alias TransactionSetControlNumber= ST02=

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
eddy-0.5.1 lib/definitions/segments/manual/envelopes/st.rb
eddy-0.5.0 lib/definitions/segments/manual/envelopes/st.rb
eddy-0.4.0 lib/definitions/segments/manual/envelopes/st.rb
eddy-0.3.0 lib/definitions/segments/manual/envelopes/st.rb