class Eancom::Edifact::CAV
Constants
- TAG
- TYPE
Attributes
segment_type[R]
Public Class Methods
new( tag: nil, characterisitc_value_description_code: nil, code_list_identification_code: nil, code_list_respobsibility_agency_code: nil, characterisitc_value_description_1: nil, characterisitc_value_description_2: nil )
click to toggle source
Calls superclass method
Eancom::Edifact::Segment::new
# File lib/eancom/edifact/segments/cav.rb, line 9 def initialize( tag: nil, characterisitc_value_description_code: nil, code_list_identification_code: nil, code_list_respobsibility_agency_code: nil, characterisitc_value_description_1: nil, characterisitc_value_description_2: nil ) @tag = tag @characterisitc_value_description_code = characterisitc_value_description_code @code_list_identification_code = code_list_identification_code @code_list_respobsibility_agency_code = code_list_respobsibility_agency_code @characterisitc_value_description_1 = characterisitc_value_description_1 @characterisitc_value_description_2 = characterisitc_value_description_2 super(tag: tag || TAG) end
Public Instance Methods
group_name()
click to toggle source
# File lib/eancom/edifact/segments/cav.rb, line 37 def group_name 'characterisitcs' end
to_json_hash()
click to toggle source
# File lib/eancom/edifact/segments/cav.rb, line 27 def to_json_hash hash = {} hash.merge!(characterisitc_value_description_code: find_identifier(:characterisitc_value_description_code)) if @characterisitc_value_description_code hash.merge!(code_list_identification_code: @code_list_identification_code) if @code_list_identification_code hash.merge!(code_list_respobsibility_agency_code: find_identifier(:code_list_respobsibility_agency_code)) if @code_list_respobsibility_agency_code hash.merge!(characterisitc_value_description_1: find_identifier(:characterisitc_value_description_1)) if @characterisitc_value_description_1 hash.merge!(characterisitc_value_description_2: @characterisitc_value_description_2) if @characterisitc_value_description_2 hash end