class Eancom::Edifact::CTA

Constants

TAG
TYPE

Attributes

segment_type[R]

Public Class Methods

new( tag: nil, contact_function_code: ) click to toggle source
Calls superclass method Eancom::Edifact::Segment::new
# File lib/eancom/edifact/segments/cta.rb, line 9
def initialize(
  tag: nil,
  contact_function_code:
)

  @tag = tag
  @contact_function_code = contact_function_code
  super(tag: tag || TAG)
end

Public Instance Methods

to_json_hash() click to toggle source
# File lib/eancom/edifact/segments/cta.rb, line 19
def to_json_hash
  hash = {}
  hash.merge!(contact_function_code: find_identifier(:contact_function_code)) if @contact_function_code
  hash
end