Skip to content

Commit 0db8bf7

Browse files
author
Tobias Schoknecht
committed
Add container.nnn.001.04 support
1 parent 46f0c4b commit 0db8bf7

8 files changed

+2969
-1
lines changed

README.md

+36
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,42 @@ xml_string = sct.to_xml # Use schema pain.001.001.03
240240
xml_string = sct.to_xml('pain.001.002.03') # Use schema pain.001.002.03
241241
```
242242

243+
How to create the XML for Container files
244+
245+
```ruby
246+
sct = SEPA::CreditTransfer.new(
247+
name: 'Schuldner GmbH',
248+
bic: 'BANKDEFFXXX',
249+
iban: 'DE87200500001234567890'
250+
)
251+
252+
sct.add_transaction(
253+
name: 'Telekomiker AG',
254+
bic: 'PBNKDEFF370',
255+
iban: 'DE37112589611964645802',
256+
amount: 102.50,
257+
currency: 'EUR',
258+
instruction: '12345',
259+
reference: 'XYZ-1234/123',
260+
remittance_information: 'Rechnung vom 22.08.2013',
261+
requested_date: Date.new(2024,6,5),
262+
)
263+
264+
265+
container = SEPA::Container.new(
266+
# Depends on alignment with the bank executing the file
267+
sender_id: 'ABCDEFGH',
268+
# Depends on alignment with the bank executing the file
269+
id_type: 'EBIC',
270+
)
271+
272+
container.add_message(sct)
273+
container.add_message ...
274+
275+
container.to_xml # Use schema container.nnn.001.GBIC4
276+
container.to_xml('container.nnn.001.04') # Use schema container.nnn.001.04
277+
```
278+
243279
## Validations
244280

245281
You can rely on our internal validations, raising errors when needed, during

lib/schema/container.nnn.001.04.xsd

+102
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
<?xml version="1.0"?>
2+
<!-- XML-Container der DK - Version gemäß DFÜ-Abkommen Anlage 3, Version 3.7, gültig ab November 2023 -->
3+
<!-- Mit XMLSpy v2020 rel. 2 sp1 (http://www.altova.com) am 28.10.2022 von Sabine Wenzel(SIZ GmbH) bearbeitet -->
4+
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:conxml="urn:conxml:xsd:container.nnn.001.04" xmlns:DocPain001="urn:iso:std:iso:20022:tech:xsd:pain.001.001.09" xmlns:DocPain007="urn:iso:std:iso:20022:tech:xsd:pain.007.001.09" xmlns:DocPain008="urn:iso:std:iso:20022:tech:xsd:pain.008.001.08" xmlns:ns1="urn:conxml:xsd:container.nnn.001.04" targetNamespace="urn:conxml:xsd:container.nnn.001.04" elementFormDefault="qualified" attributeFormDefault="unqualified">
5+
<!-- Die Angaben beziehen sich auf die technical Validation Subsets (TSV) der Deutschen Kreditwirtschaft für den SEPA-ZV -->
6+
<!-- Daher ist hier der xsd-Name der DK-TVS genannt - bei Bedarf kann auch schemaLocation ohne den Zusatz _GBIC_4 verwendet werden -->
7+
<xs:import namespace="urn:iso:std:iso:20022:tech:xsd:pain.001.001.09" schemaLocation="pain.001.001.09.xsd"/>
8+
<xs:import namespace="urn:iso:std:iso:20022:tech:xsd:pain.007.001.09" schemaLocation="pain.007.001.09.xsd"/>
9+
<xs:import namespace="urn:iso:std:iso:20022:tech:xsd:pain.008.001.08" schemaLocation="pain.008.001.08.xsd"/>
10+
<xs:element name="conxml" type="conxml:conxml"/>
11+
<xs:complexType name="conxml">
12+
<xs:sequence>
13+
<xs:element name="ContainerId">
14+
<xs:annotation>
15+
<xs:documentation>ContainerId and CreDtTm should form a unique reference. This reference must be provided in the signature authorizing the container.
16+
Defined as optional because the data might be provided by the bank's responder system instead of customers.</xs:documentation>
17+
</xs:annotation>
18+
<xs:complexType>
19+
<xs:sequence>
20+
<xs:element name="SenderId">
21+
<xs:annotation>
22+
<xs:documentation>User ID (BCS or EBICS or RVS file and station ID, or other)</xs:documentation>
23+
</xs:annotation>
24+
<xs:simpleType>
25+
<xs:restriction base="xs:string">
26+
<xs:maxLength value="22"/>
27+
</xs:restriction>
28+
</xs:simpleType>
29+
</xs:element>
30+
<xs:element name="IdType">
31+
<xs:annotation>
32+
<xs:documentation>Type of ID provided. It may indicate the routing layer/communication protocol the id is valid for. Recommended are: BCS, EBIC, BFTP, H2H, RVS, X400, CD, SFTP, SCP. It is intended to allow for additional bilaterally agreed values, so no enumeration is defined here.</xs:documentation>
33+
</xs:annotation>
34+
<xs:simpleType>
35+
<xs:restriction base="xs:string">
36+
<xs:minLength value="1"/>
37+
<xs:maxLength value="4"/>
38+
</xs:restriction>
39+
</xs:simpleType>
40+
</xs:element>
41+
<xs:element name="TimeStamp">
42+
<xs:annotation>
43+
<xs:documentation>Time Stamp with a millisecond precision, as a numeric string of length 9 (hhmmssxxx)</xs:documentation>
44+
</xs:annotation>
45+
<xs:simpleType>
46+
<xs:restriction base="xs:string">
47+
<xs:length value="9"/>
48+
<xs:pattern value="[0-9]{9,9}"/>
49+
</xs:restriction>
50+
</xs:simpleType>
51+
</xs:element>
52+
</xs:sequence>
53+
</xs:complexType>
54+
</xs:element>
55+
<xs:element name="CreDtTm" type="conxml:ISODateTime">
56+
<xs:annotation>
57+
<xs:documentation>Creation Timestamp for container structure</xs:documentation>
58+
</xs:annotation>
59+
</xs:element>
60+
<xs:choice>
61+
<xs:element name="MsgPain001" type="conxml:MsgPain001" maxOccurs="unbounded"/>
62+
<xs:element name="MsgPain007" type="conxml:MsgPain007" maxOccurs="unbounded"/>
63+
<xs:element name="MsgPain008" type="conxml:MsgPain008" maxOccurs="unbounded"/>
64+
</xs:choice>
65+
</xs:sequence>
66+
</xs:complexType>
67+
<xs:complexType name="MsgPain001">
68+
<xs:sequence>
69+
<xs:element name="HashValue" type="conxml:HashSHA256" minOccurs="0"/>
70+
<xs:element name="HashAlgorithm" type="conxml:HashAlgorithm" minOccurs="0"/>
71+
<xs:element ref="DocPain001:Document"/>
72+
</xs:sequence>
73+
</xs:complexType>
74+
<xs:complexType name="MsgPain007">
75+
<xs:sequence>
76+
<xs:element name="HashValue" type="conxml:HashSHA256" minOccurs="0"/>
77+
<xs:element name="HashAlgorithm" type="conxml:HashAlgorithm" minOccurs="0"/>
78+
<xs:element ref="DocPain007:Document"/>
79+
</xs:sequence>
80+
</xs:complexType>
81+
<xs:complexType name="MsgPain008">
82+
<xs:sequence>
83+
<xs:element name="HashValue" type="conxml:HashSHA256" minOccurs="0"/>
84+
<xs:element name="HashAlgorithm" type="conxml:HashAlgorithm" minOccurs="0"/>
85+
<xs:element ref="DocPain008:Document"/>
86+
</xs:sequence>
87+
</xs:complexType>
88+
<xs:simpleType name="HashSHA256">
89+
<xs:restriction base="xs:string">
90+
<xs:minLength value="64"/>
91+
<xs:maxLength value="64"/>
92+
</xs:restriction>
93+
</xs:simpleType>
94+
<xs:simpleType name="HashAlgorithm">
95+
<xs:restriction base="xs:string">
96+
<xs:enumeration value="SHA256"/>
97+
</xs:restriction>
98+
</xs:simpleType>
99+
<xs:simpleType name="ISODateTime">
100+
<xs:restriction base="xs:dateTime"/>
101+
</xs:simpleType>
102+
</xs:schema>
+102
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
<?xml version="1.0"?>
2+
<!-- XML-Container der DK - Version gemäß DFÜ-Abkommen Anlage 3, Version 3.7, gültig ab November 2023 -->
3+
<!-- Mit XMLSpy v2020 rel. 2 sp1 (http://www.altova.com) am 28.10.2022 von Sabine Wenzel(SIZ GmbH) bearbeitet -->
4+
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:conxml="urn:conxml:xsd:container.nnn.001.GBIC4" xmlns:DocPain001="urn:iso:std:iso:20022:tech:xsd:pain.001.001.09" xmlns:DocPain007="urn:iso:std:iso:20022:tech:xsd:pain.007.001.09" xmlns:DocPain008="urn:iso:std:iso:20022:tech:xsd:pain.008.001.08" xmlns:ns1="urn:conxml:xsd:container.nnn.001.GBIC4" targetNamespace="urn:conxml:xsd:container.nnn.001.GBIC4" elementFormDefault="qualified" attributeFormDefault="unqualified">
5+
<!-- Die Angaben beziehen sich auf die technical Validation Subsets (TSV) der Deutschen Kreditwirtschaft für den SEPA-ZV -->
6+
<!-- Daher ist hier der xsd-Name der DK-TVS genannt - bei Bedarf kann auch schemaLocation ohne den Zusatz _GBIC_4 verwendet werden -->
7+
<xs:import namespace="urn:iso:std:iso:20022:tech:xsd:pain.001.001.09" schemaLocation="pain.001.001.09.xsd"/>
8+
<xs:import namespace="urn:iso:std:iso:20022:tech:xsd:pain.007.001.09" schemaLocation="pain.007.001.09.xsd"/>
9+
<xs:import namespace="urn:iso:std:iso:20022:tech:xsd:pain.008.001.08" schemaLocation="pain.008.001.08.xsd"/>
10+
<xs:element name="conxml" type="conxml:conxml"/>
11+
<xs:complexType name="conxml">
12+
<xs:sequence>
13+
<xs:element name="ContainerId">
14+
<xs:annotation>
15+
<xs:documentation>ContainerId and CreDtTm should form a unique reference. This reference must be provided in the signature authorizing the container.
16+
Defined as optional because the data might be provided by the bank's responder system instead of customers.</xs:documentation>
17+
</xs:annotation>
18+
<xs:complexType>
19+
<xs:sequence>
20+
<xs:element name="SenderId">
21+
<xs:annotation>
22+
<xs:documentation>User ID (BCS or EBICS or RVS file and station ID, or other)</xs:documentation>
23+
</xs:annotation>
24+
<xs:simpleType>
25+
<xs:restriction base="xs:string">
26+
<xs:maxLength value="22"/>
27+
</xs:restriction>
28+
</xs:simpleType>
29+
</xs:element>
30+
<xs:element name="IdType">
31+
<xs:annotation>
32+
<xs:documentation>Type of ID provided. It may indicate the routing layer/communication protocol the id is valid for. Recommended are: BCS, EBIC, BFTP, H2H, RVS, X400, CD, SFTP, SCP. It is intended to allow for additional bilaterally agreed values, so no enumeration is defined here.</xs:documentation>
33+
</xs:annotation>
34+
<xs:simpleType>
35+
<xs:restriction base="xs:string">
36+
<xs:minLength value="1"/>
37+
<xs:maxLength value="4"/>
38+
</xs:restriction>
39+
</xs:simpleType>
40+
</xs:element>
41+
<xs:element name="TimeStamp">
42+
<xs:annotation>
43+
<xs:documentation>Time Stamp with a millisecond precision, as a numeric string of length 9 (hhmmssxxx)</xs:documentation>
44+
</xs:annotation>
45+
<xs:simpleType>
46+
<xs:restriction base="xs:string">
47+
<xs:length value="9"/>
48+
<xs:pattern value="[0-9]{9,9}"/>
49+
</xs:restriction>
50+
</xs:simpleType>
51+
</xs:element>
52+
</xs:sequence>
53+
</xs:complexType>
54+
</xs:element>
55+
<xs:element name="CreDtTm" type="conxml:ISODateTime">
56+
<xs:annotation>
57+
<xs:documentation>Creation Timestamp for container structure</xs:documentation>
58+
</xs:annotation>
59+
</xs:element>
60+
<xs:choice>
61+
<xs:element name="MsgPain001" type="conxml:MsgPain001" maxOccurs="unbounded"/>
62+
<xs:element name="MsgPain007" type="conxml:MsgPain007" maxOccurs="unbounded"/>
63+
<xs:element name="MsgPain008" type="conxml:MsgPain008" maxOccurs="unbounded"/>
64+
</xs:choice>
65+
</xs:sequence>
66+
</xs:complexType>
67+
<xs:complexType name="MsgPain001">
68+
<xs:sequence>
69+
<xs:element name="HashValue" type="conxml:HashSHA256" minOccurs="0"/>
70+
<xs:element name="HashAlgorithm" type="conxml:HashAlgorithm" minOccurs="0"/>
71+
<xs:element ref="DocPain001:Document"/>
72+
</xs:sequence>
73+
</xs:complexType>
74+
<xs:complexType name="MsgPain007">
75+
<xs:sequence>
76+
<xs:element name="HashValue" type="conxml:HashSHA256" minOccurs="0"/>
77+
<xs:element name="HashAlgorithm" type="conxml:HashAlgorithm" minOccurs="0"/>
78+
<xs:element ref="DocPain007:Document"/>
79+
</xs:sequence>
80+
</xs:complexType>
81+
<xs:complexType name="MsgPain008">
82+
<xs:sequence>
83+
<xs:element name="HashValue" type="conxml:HashSHA256" minOccurs="0"/>
84+
<xs:element name="HashAlgorithm" type="conxml:HashAlgorithm" minOccurs="0"/>
85+
<xs:element ref="DocPain008:Document"/>
86+
</xs:sequence>
87+
</xs:complexType>
88+
<xs:simpleType name="HashSHA256">
89+
<xs:restriction base="xs:string">
90+
<xs:minLength value="64"/>
91+
<xs:maxLength value="64"/>
92+
</xs:restriction>
93+
</xs:simpleType>
94+
<xs:simpleType name="HashAlgorithm">
95+
<xs:restriction base="xs:string">
96+
<xs:enumeration value="SHA256"/>
97+
</xs:restriction>
98+
</xs:simpleType>
99+
<xs:simpleType name="ISODateTime">
100+
<xs:restriction base="xs:dateTime"/>
101+
</xs:simpleType>
102+
</xs:schema>

0 commit comments

Comments
 (0)