aboutsummaryrefslogtreecommitdiffhomepage
path: root/specification/src/Text/Edifact/D01B/Segments/CUX.hs
blob: 439619ae71503b80437b9cf49d0e68e2b7f62c0a (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
43
44
45
46
47
48
49
50
51
52
{-# LANGUAGE OverloadedStrings #-}

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

module Text.Edifact.D01B.Segments.CUX
  ( -- * Definition
    segmentCUX
    -- * Dependencies
  , compositeC504
  , simple5402
  , simple6341
  ) where

import           Text.Edifact.D01B.Composites (compositeC504)
import           Text.Edifact.D01B.Simples    (simple5402, simple6341)

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

-- | Derived from this specification:
--
-- >        CUX  CURRENCIES
-- >
-- >        Function: To specify currencies used in the transaction
-- >                  and relevant details for the rate of exchange.
-- >
-- > 010    C504 CURRENCY DETAILS                           C    1
-- >        6347  Currency usage code qualifier             M      an..3
-- >        6345  Currency identification code              C      an..3
-- >        6343  Currency type code qualifier              C      an..3
-- >        6348  Currency rate value                       C      n..4
-- >
-- > 020    C504 CURRENCY DETAILS                           C    1
-- >        6347  Currency usage code qualifier             M      an..3
-- >        6345  Currency identification code              C      an..3
-- >        6343  Currency type code qualifier              C      an..3
-- >        6348  Currency rate value                       C      n..4
-- >
-- > 030    5402 CURRENCY EXCHANGE RATE                     C    1 n..12
-- >
-- > 040    6341 EXCHANGE RATE CURRENCY MARKET IDENTIFIER   C    1 an..3
--
-- Dependencies: 'compositeC504', 'simple5402', 'simple6341'.
segmentCUX :: Parser Value
segmentCUX =
  segment "CUX"
    [ "010" .@ optional  compositeC504
    , "020" .@ optional  compositeC504
    , "030" .@ optional  simple5402
    , "040" .@ optional  simple6341
    ]