class Eancom::Edifact::CNT
Constants
- TAG
- TYPE
Attributes
segment_type[R]
Public Class Methods
new( tag: nil, control_total_type_code_quantifier:, control_total_value:, measurment_unit_code: nil )
click to toggle source
Calls superclass method
Eancom::Edifact::Segment::new
# File lib/eancom/edifact/segments/cnt.rb, line 9 def initialize( tag: nil, control_total_type_code_quantifier:, control_total_value:, measurment_unit_code: nil ) @tag = tag @control_total_type_code_quantifier = control_total_type_code_quantifier @control_total_value = control_total_value @measurment_unit_code = measurment_unit_code super(tag: tag || TAG) end
Public Instance Methods
group_name()
click to toggle source
# File lib/eancom/edifact/segments/cnt.rb, line 30 def group_name 'counts' end
to_json_hash()
click to toggle source
# File lib/eancom/edifact/segments/cnt.rb, line 23 def to_json_hash hash = {} hash.merge!(control_total_type_code_quantifier: find_identifier(:control_total_type_code_quantifier)) if @control_total_type_code_quantifier hash.merge!(control_total_value: @control_total_value) if @control_total_value hash end