module Eancom module Edifact class UNB < Segment TAG = 'UNB'.freeze TYPE = :header.freeze def initialize(tag: nil, syntax_identifier:, syntax_version_number:, interchange_sender_identification:, sender_identifiction_code_qualifier:, interchange_sender_internal_identification: nil, interchange_recipient_identification:, recipient_identifiction_code_qualifier:, interchange_recipient_internal_identification: nil, date:, time:, interchange_control_reference:, recipient_reference: nil, recipient_reference_qualifier: nil, application_reference: nil, processing_priority_code: nil, acknowledgement_request: nil, interchange_agreement_identifier: nil, test_indicator: nil ) @tag = tag @syntax_identifier = syntax_identifier @syntax_version_number = syntax_version_number @interchange_sender_identification = interchange_sender_identification @sender_identifiction_code_qualifier = sender_identifiction_code_qualifier @interchange_sender_internal_identification = interchange_sender_internal_identification @interchange_recipient_identification = interchange_recipient_identification @recipient_identifiction_code_qualifier = recipient_identifiction_code_qualifier @interchange_recipient_internal_identification = interchange_recipient_internal_identification @date = date @time = time @interchange_control_reference = interchange_control_reference @recipient_reference = recipient_reference @recipient_reference_qualifier = recipient_reference_qualifier @application_reference = application_reference @processing_priority_code = processing_priority_code @acknowledgement_request = acknowledgement_request @interchange_agreement_identifier = interchange_agreement_identifier @test_indicator = test_indicator super(tag: tag || TAG) end def to_json_hash { interchange_sender_identification: @interchange_sender_identification, interchange_recipient_identification: @interchange_recipient_identification, date: @date, time: @time, interchange_control_reference: @interchange_control_reference, application_reference: @application_reference, interchange_agreement_identifier: @interchange_agreement_identifier } end def segment_type TYPE end end end end