Sha256: 88c8bb3535b7dda5b02fd9a0aa3301f0d633b8c00e2f9906091dbde8644d704b

Contents?: true

Size: 1.31 KB

Versions: 1

Compression:

Stored size: 1.31 KB

Contents

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

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
#==============================================================================
# Section identification
#==============================================================================
section_identification = Eancom::Edifact::Composite.new()

data = Eancom::Edifact::Data.new(
  type: String,
  length: 0..1,
  dictionary: {
    'S' => {
      description: 'Detail/summary section separation',
      identifier: 'detail_summary_section_separation'
    }
  },
  description: "Section identification",
  required: true
)
section_identification.add(:section_identification, data)

structure << section_identification
#==============================================================================
Eancom.register_structure(tag: 'UNS', structure: structure)

Version data entries

1 entries across 1 versions & 1 rubygems

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