lib/eancom/edifact/segments/unb.rb in eancom-1.1.0 vs lib/eancom/edifact/segments/unb.rb in eancom-1.1.1
- old
+ new
@@ -45,16 +45,19 @@
@test_indicator = test_indicator
super(tag: tag || TAG)
end
def to_json_hash
- {
+ hash = {
interchange_sender_identification: @interchange_sender_identification,
interchange_recipient_identification: @interchange_recipient_identification,
date: @date,
time: @time,
interchange_control_reference: @interchange_control_reference
}
+
+ hash.merge!(sender_identifiction_code_qualifier: @sender_identifiction_code_qualifier) if @sender_identifiction_code_qualifier
+ hash.merge!(recipient_identifiction_code_qualifier: @recipient_identifiction_code_qualifier) if @recipient_identifiction_code_qualifier
end
def segment_type
TYPE
end