Class: Eancom::Edifact::CPS

Inherits:
Segment
  • Object
show all
Defined in:
lib/eancom/edifact/segments/cps.rb

Constant Summary collapse

TAG =
'CPS'.freeze
TYPE =
:body.freeze

Instance Attribute Summary

Attributes inherited from Segment

#tag

Instance Method Summary collapse

Methods inherited from Segment

#array, #group_name, initialize_by_components, #is_body?, #is_footer?, #is_header?, #item_group_name, #starts_item?, #starts_location?, #starts_message?, #structure, #tag?, #to_edi, #to_hash, #to_s, #validate_structure

Constructor Details

#initialize(tag: nil, hierarchical_structure_level_identifier:, hierarchical_structure_parent_identifier: nil, packaging_level_code: nil) ⇒ CPS

Returns a new instance of CPS.



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/eancom/edifact/segments/cps.rb', line 7

def initialize(
  tag: nil,
  hierarchical_structure_level_identifier:,
  hierarchical_structure_parent_identifier: nil,
  packaging_level_code: nil
)
  @tag = tag
  @hierarchical_structure_level_identifier = hierarchical_structure_level_identifier
  @hierarchical_structure_parent_identifier = hierarchical_structure_parent_identifier
  @packaging_level_code = packaging_level_code

  super(tag: tag || TAG)
end

Instance Method Details

#segment_typeObject



25
26
27
# File 'lib/eancom/edifact/segments/cps.rb', line 25

def segment_type
  TYPE
end

#to_json_hashObject



21
22
23
# File 'lib/eancom/edifact/segments/cps.rb', line 21

def to_json_hash
  {}
end