Sha256: 25a42395ec85a3561f286b3c340e5a1466831e4ab9af2a4dcb20c368867e86c2

Contents?: true

Size: 1.12 KB

Versions: 1

Compression:

Stored size: 1.12 KB

Contents

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

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

structure << tag

equipment_code_qualifier = Eancom::Edifact::Composite.new
data = Eancom::Edifact::Data.new(
    type: String,
    length: 1..3,
    dictionary: {
        'CN' => {
            description: 'Container',
            identifier: 'container'
        }
    },
    description: 'Equipment code qualifier',
    required: true
)
equipment_code_qualifier.add(:equipment_code_qualifier, data)

structure << equipment_code_qualifier
#==============================================================================
Eancom.register_structure(tag: 'EQD', structure: structure)

Version data entries

1 entries across 1 versions & 1 rubygems

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