module Eancom module Edifact class BGM < Segment TAG = 'BGM'.freeze TYPE = :body.freeze attr_reader :segment_type def initialize( tag: nil, document_name_code:, code_list_responsible_agency_code: nil, code_list_identification_code: nil, document_name: nil, document_identifier: nil, message_function_code: nil ) @tag = tag @document_name_code = document_name_code @code_list_responsible_agency_code = code_list_responsible_agency_code @code_list_identification_code = code_list_identification_code @document_name = document_name @document_identifier = document_identifier @message_function_code = message_function_code super(tag: tag || TAG) end def to_json_hash { document_name_code: @document_name_code, document_identifier: @document_identifier, message_function_code: @message_function_code } end def starts_message? true end def segment_type TYPE end end end end