Sha256: e23f51c15aaedcfcb110329b8675f3b18952855e12ab992bf26581bf545eeaee

Contents?: true

Size: 1.14 KB

Versions: 1

Compression:

Stored size: 1.14 KB

Contents

tag = 'TRU'
Eancom.register_segment(tag: tag, klass: Eancom::Edifact::TRU)

structure = Eancom::Edifact::Structure.new(tag: tag)
#==============================================================================
# Tag                                                                         #
#==============================================================================
tag = Eancom::Edifact::Composite.new
data = Eancom::Edifact::Data.new(
  type: String,
  length: 3,
  dictionary: nil,
  description: 'Message Header',
  required: true
)
tag.add(:tag, data)

structure << tag
#==============================================================================
# Object identifier
#==============================================================================
object_identifier = Eancom::Edifact::Composite.new
data = Eancom::Edifact::Data.new(
  type: String,
  length: 1..35,
  dictionary: nil,
  description: 'Object identifier',
  required: true
)
object_identifier.add(:object_identifier, data)

structure << object_identifier
#==============================================================================
Eancom.register_structure(tag: 'TRU', structure: structure)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
eancom-2.0.0 definitions/segments/tru.rb