module Eancom module Edifact class DGS < Segment TAG = 'DGS'.freeze TYPE = :body attr_reader :segment_type def initialize( tag: nil, hazard_identification_code: ) @tag = tag @hazard_identification_code = hazard_identification_code super(tag: tag || TAG) end def to_json_hash hash = {} hash.merge!(hazard_identification_code: @hazard_identification_code) hash end def segment_type TYPE end end end end