Sha256: 609f250530b371fab4d050c3fbe69f51d09b23984c265b75c10b8e9b99ca1b5c
Contents?: true
Size: 1.47 KB
Versions: 11
Compression:
Stored size: 1.47 KB
Contents
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: nil, 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 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, } hash[:association_assigned_code] = @association_assigned_code if @association_assigned_code hash[:code_list_directory_version_number] = @code_list_directory_version_number if @code_list_directory_version_number hash end def segment_type TYPE end end end end
Version data entries
11 entries across 11 versions & 1 rubygems