definitions/segments/unh.rb in eancom-1.6.3 vs definitions/segments/unh.rb in eancom-2.0.0

- old
+ new

@@ -36,12 +36,37 @@ message_identifier = Eancom::Edifact::Composite.new() data = Eancom::Edifact::Data.new( type: String, length: 1..6, - dictionary: nil, - description: 'Identification of a message', + dictionary: { + 'ORDERS' => { + description: 'Purchase order message' + }, + 'SLSRPT' => { + description: 'Sales data report message' + }, + 'DESADV' => { + description: 'Despatch advice message' + }, + 'INVRPT' => { + description: 'Inventory report message' + }, + 'PRICAT' => { + description: 'Price catalogue message' + }, + 'ORDRSP' => { + description: 'Orders report message' + }, + 'INVOIC' => { + description: 'Invoice message' + }, + 'RETANN' => { + description: 'Announcement for returns message' + } + }, + description: 'Message Type', required: true ) message_identifier.add(:message_type, data) data = Eancom::Edifact::Data.new( @@ -67,10 +92,13 @@ '93A' => { description: 'Release 93A' }, '96A' => { description: 'Release 96A' + }, + 'UN' => { + description: 'UN/CEFACT' } }, description: 'Message release number', required: true ) @@ -80,28 +108,65 @@ type: String, length: 1..2, dictionary: { 'UN' => { description: 'UN/CEFACT' + }, + 'EN' => { + description: 'Default value' } }, description: 'Controlling agency', required: true ) message_identifier.add(:controlling_agency, data) data = Eancom::Edifact::Data.new( type: String, length: 1..6, - dictionary: nil, + dictionary: { + 'EAN001' => { + description: 'GS1 version control number (GS1 Permanent Code)' + }, + 'EAN011' => { + description: 'GS1 version control number (GS1 Permanent Code)' + }, + 'EAN003' => { + description: 'GS1 version control number (GS1 Permanent Code)' + }, + 'EAN004' => { + description: 'GS1 version control number (GS1 Permanent Code)' + }, + 'EAN005' => { + description: 'GS1 version control number (GS1 Permanent Code)' + }, + 'EAN006' => { + description: 'GS1 version control number (GS1 Permanent Code)' + }, + 'EAN007' => { + description: 'GS1 version control number (GS1 Permanent Code)' + }, + 'EAN008' => { + description: 'GS1 version control number (GS1 Permanent Code)' + }, + 'EAN009' => { + description: 'GS1 version control number (GS1 Permanent Code)' + }, + 'EAN010' => { + description: 'GS1 version control number (GS1 Code)' + }, + 'GDSN23' => { + description: 'GDSN version 2.3 (GS1 Permanent Code)' + } + }, description: 'Association assigned code', - required: true + required: false ) message_identifier.add(:association_assigned_code, data) structure << message_identifier #============================================================================== -# Code list directory version number # # +# Code list directory version number # #============================================================================== code_list_directory_version_number = Eancom::Edifact::Composite.new() data = Eancom::Edifact::Data.new( type: String,