aboutsummaryrefslogtreecommitdiffhomepage
path: root/specification/src/Text/Edifact/D96A/Segments/CPS.hs
blob: 0ce27b51838cf04977f07c2b20507df9646db89d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{-# LANGUAGE OverloadedStrings #-}

---- Machine generated code.
---- Output of edi-parser-scaffolder

module Text.Edifact.D96A.Segments.CPS
  ( -- * Definition
    segmentCPS
    -- * Dependencies
  , simple7075
  , simple7164
  , simple7166
  ) where

import           Text.Edifact.D96A.Simples (simple7075, simple7164, simple7166)

import           Text.Edifact.Parsing
import           Text.Edifact.Types        (Value)

-- | Derived from this specification:
--
-- >       CPS    CONSIGNMENT PACKING SEQUENCE
-- >
-- >       Function: To identify the sequence in which physical packing is
-- >                 presented in the consignment, and optionally to
-- >                 identify the hierarchical relationship between packing
-- >                 layers.
-- >
-- > 010   7164  HIERARCHICAL ID. NUMBER                        M  an..12
-- >
-- > 020   7166  HIERARCHICAL PARENT ID.                        C  an..12
-- >
-- > 030   7075  PACKAGING LEVEL, CODED                         C  an..3
--
-- Dependencies: 'simple7075', 'simple7164', 'simple7166'.
segmentCPS :: Parser Value
segmentCPS =
  segment "CPS"
    [ "010" .@ mandatory simple7164
    , "020" .@ optional  simple7166
    , "030" .@ optional  simple7075
    ]