module Eancom module Edifact class UNH < Segment TAG = 'UNH'.freeze TYPE = :header.freeze def initialize( tag: nil, message_reference_number:, message_type:, message_version_number:, message_release_number:, controlling_agency:, association_assigned_code:, code_list_directory_version_number: nil ) @tag = tag @message_reference_number = message_reference_number @message_type = message_type @message_version_number = message_version_number @message_release_number = message_release_number @controlling_agency = controlling_agency @association_assigned_code = association_assigned_code @code_list_directory_version_number = code_list_directory_version_number super(tag: tag || TAG) end ''' Changing this to_json_hash function throws unusualy many errors. Discuss whether or not this hash function needs to be changed. ''' def to_json_hash hash = { message_reference_number: @message_reference_number, message_type: @message_type, message_version_number: @message_version_number, message_release_number: @message_release_number, controlling_agency: @controlling_agency, association_assigned_code: @association_assigned_code } end def segment_type TYPE end end end end