Class: FinTS::Segment::HNHBK
- Inherits:
-
BaseSegment
- Object
- BaseSegment
- FinTS::Segment::HNHBK
- Defined in:
- lib/fints/segment/hnhbk.rb
Overview
HNHBK (Nachrichtenkopf) Section B.5.2
Constant Summary collapse
- HEADER_LENGTH =
29
Instance Attribute Summary
Attributes inherited from BaseSegment
Instance Method Summary collapse
-
#initialize(msglen, dialog_id, msg_no) ⇒ HNHBK
constructor
A new instance of HNHBK.
Methods inherited from BaseSegment
Constructor Details
#initialize(msglen, dialog_id, msg_no) ⇒ HNHBK
Returns a new instance of HNHBK.
8 9 10 11 12 13 14 |
# File 'lib/fints/segment/hnhbk.rb', line 8 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 |