class Eancom::Edifact::PCI

Constants

TAG
TYPE

Attributes

segment_type[R]

Public Class Methods

new( tag: nil, marking_instructions_code:, marks_and_labels_code: nil, container_or_package_contents_indicator_mode: nil ) click to toggle source
Calls superclass method Eancom::Edifact::Segment::new
# File lib/eancom/edifact/segments/pci.rb, line 9
def initialize(
  tag: nil,
  marking_instructions_code:,
  marks_and_labels_code: nil,
  container_or_package_contents_indicator_mode: nil
)

  @tag = tag
  @marking_instructions_code = marking_instructions_code
  @marks_and_labels_code = marks_and_labels_code
  @container_or_package_contents_indicator_mode = container_or_package_contents_indicator_mode
  super(tag: tag || TAG)
end

Public Instance Methods

group_name() click to toggle source
# File lib/eancom/edifact/segments/pci.rb, line 31
def group_name
  'package_identification'
end
to_json_hash() click to toggle source
# File lib/eancom/edifact/segments/pci.rb, line 23
def to_json_hash
  hash = {}
  hash.merge!(marking_instructions_code: find_identifier(:marking_instructions_code)) if @marking_instructions_code
  hash.merge!(marks_and_labels_code: @marks_and_labels_code) if @marks_and_labels_code
  hash.merge!(container_or_package_contents_indicator_mode: @container_or_package_contents_indicator_mode) if @container_or_package_contents_indicator_mode
  hash
end