tag = 'UNA' Eancom.register_segment(tag: tag, klass: Eancom::Edifact::UNA) structure = Eancom::Edifact::Structure.new(tag: tag) composite = Eancom::Edifact::Composite.new() data = Eancom::Edifact::Data.new( type: String, length: 3, dictionary: nil, description: "Service String Advice", required: true ) composite.add(:tag, data) structure << composite composite = Eancom::Edifact::Composite.new() data = Eancom::Edifact::Data.new( type: String, length: 1, dictionary: nil, description: "Component data element separator", required: true ) composite.add(:una1, data) structure << composite composite = Eancom::Edifact::Composite.new() data = Eancom::Edifact::Data.new( type: String, length: 1, dictionary: nil, description: "Data element separator", required: true ) composite.add(:una2, data) structure << composite composite = Eancom::Edifact::Composite.new() data = Eancom::Edifact::Data.new( type: String, length: 1, dictionary: nil, description: "Decimal notation", required: true ) composite.add(:una3, data) structure << composite composite = Eancom::Edifact::Composite.new() data = Eancom::Edifact::Data.new( type: String, length: 1, dictionary: nil, description: "Release character", required: true ) composite.add(:una4, data) structure << composite composite = Eancom::Edifact::Composite.new() data = Eancom::Edifact::Data.new( type: String, length: 1, dictionary: nil, description: "Reserved for future use", required: true ) composite.add(:una5, data) structure << composite composite = Eancom::Edifact::Composite.new() data = Eancom::Edifact::Data.new( type: String, length: 1, dictionary: nil, description: "Segment terminator", required: true ) composite.add(:una6, data) structure << composite Eancom.register_structure(tag: tag, structure: structure)