Class | EDI::E::Message |
In: |
lib/edi4r/edifact.rb
|
Parent: | EDI::Message |
Class EDI::E::Message
This class implements a single business document according to UN/EDIFACT
Creates an empty UN/EDIFACT message Don‘t use directly - use new_message of class Interchange or MsgGroup instead!
This is always the parent object, either a message group or an interchange object. Use method new_message in the corresponding object instead of creating messages unattended, and the parent reference will be accounted for automatically.
List of supported hash keys:
:msg_type : | Sets S009.0065, default = ‘ORDERS‘ |
:version : | Sets S009.0052, default = ‘D’ |
:release : | Sets S009.0054, default = ‘96A’ |
:resp_agency : | Sets S009.0051, default = ‘UN‘ |
:assigned_code : | Sets S009.0057 (subset), default = nil |
This mode is only used internally when parsing data.
Returns a new Message object that contains the data of the strings passed in the segment_list array. Uses the context of the given parent object and configures message as a child.
Add a previously derived segment to the end of this message (append) Make sure that all mandatory elements have been supplied.
seg = msg.new_segment( 'BGM' ) seg.d1004 = '220' # etc. msg.add seg