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