Sha256: 49c9a0c6e1fa032f7fa46a2ba46cbb09348c04c9cce99e6ad0d0c0148443528c

Contents?: true

Size: 1.52 KB

Versions: 4

Compression:

Stored size: 1.52 KB

Contents

module Eddy
  module Segments
    # ### Segment Summary:
    #
    # - Id: SE
    # - Name: Transaction Set Trailer
    # - Purpose: To indicate the end of the transaction set and provide the count of the transmitted segments (including the beginning (ST) and ending (SE) segments).
    class SE < Eddy::Segment

      # @param store [Eddy::Data::Store]
      # @return [void]
      def initialize(store)
        @id = "SE"
        @name = "Transaction Set Trailer"
        @se01 = Eddy::Elements::E96.new(ref:  "SE01", req: "M")
        @se02 = Eddy::Elements::E329.new(ref: "SE02", req: "M") # TODO: store.transaction_set_control_number
        super(store, @se01, @se02)
      end

      # ### SE01
      #
      # - Id: 96
      # - Name: Number of Included Segments
      # - Type: N0
      # - Min/Max: 1/10
      # - Description: Total number of segments included in a transaction set including ST and SE segments
      #
      # @param arg [String]
      # @return [void]
      def SE01=(arg)
        @se01.value = arg
      end
      alias NumberOfIncludedSegments= SE01=

      # ### SE02
      #
      # - 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 SE02=(arg)
        @se02.value = arg
      end
      alias TransactionSetControlNumber= SE02=

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

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