Sha256: 2a926d3f88cc3b23a5aebb917e7d45ea7f92a03c249b0a26241a9cf06a46ddd4

Contents?: true

Size: 549 Bytes

Versions: 3

Compression:

Stored size: 549 Bytes

Contents

module FinTS
  module Segment
    # HNHBK (Nachrichtenkopf)
    # Section B.5.2
    class HNHBK < BaseSegment
      HEADER_LENGTH = 29

      def initialize(msglen, dialog_id, msg_no)
        if msglen.to_s.length != 12
          msglen = (msglen.to_i + HEADER_LENGTH + dialog_id.to_s.length + msg_no.to_s.length).to_s.rjust(12, '0')
        end
        data = [msglen, 300, dialog_id, msg_no]
        super(1, data)
      end

      protected

      def type
        'HNHBK'
      end
      
      def version
        3
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ruby_fints-0.0.4 lib/fints/segment/hnhbk.rb
ruby_fints-0.0.3 lib/fints/segment/hnhbk.rb
ruby_fints-0.0.2 lib/fints/segment/hnhbk.rb