Class EDI::E::MsgGroup
In: lib/edi4r/edifact.rb
Parent: EDI::MsgGroup

Class EDI::E::MsgGroup

This class implements a group of business documents of the same type Its header unites features from UNB as well as from UNH.

Methods

add   new   new_message   parse   to_s   validate  

Attributes

messages_created  [R] 

Public Class methods

Creates an empty UN/EDIFACT message group Don‘t use directly - use new_msggroup of class Interchange instead!

First parameter

This is always the parent object (an interchange object). Use method new_msggroup in the corresponding object instead of creating message groups unattended - the parent reference will be accounted for automatically.

Second parameter

List of supported hash keys:

UNG presets for your convenience, may be changed later

:msg_type :Sets DE 0038, default = ‘INVOIC‘
:resp_agency :Sets DE 0051, default = ‘UN‘
:version :Sets S008.0052, default = ‘D’
:release :Sets S008.0054, default = ‘96A’

Optional parameters, required depending upon use case

:assigned_code :Sets S008.0057 (subset), default = nil
:sender :Presets DE S006/0040, default = nil
:recipient :Presets DE S007/0044, default = nil
:group_reference :Presets DE 0048, auto-incremented

Notes

  • The functional group reference number in UNG and UNE (0048) is set automatically to a number that is unique for this message group and the running process (auto-increment).
  • The counter in UNG (0060) is set automatically to the number of included messages.
  • The trailer segment (UNE) is generated automatically.
  • Whenever possible, avoid writing to the counters of the message header or trailer segments!

Public Instance methods

[Validate]