sps_king 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +9 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +32 -0
  5. data/CONTRIBUTING.md +38 -0
  6. data/Gemfile +2 -0
  7. data/LICENSE.txt +24 -0
  8. data/README.md +246 -0
  9. data/Rakefile +6 -0
  10. data/gemfiles/Gemfile-activemodel-3.1.x +5 -0
  11. data/gemfiles/Gemfile-activemodel-3.2.x +5 -0
  12. data/gemfiles/Gemfile-activemodel-4.0.x +5 -0
  13. data/gemfiles/Gemfile-activemodel-4.1.x +5 -0
  14. data/gemfiles/Gemfile-activemodel-4.2.x +5 -0
  15. data/gemfiles/Gemfile-activemodel-5.0.x +5 -0
  16. data/gemfiles/Gemfile-activemodel-5.1.x +5 -0
  17. data/gemfiles/Gemfile-activemodel-5.2.x +5 -0
  18. data/lib/schema/pain.001.001.03.ch.02.xsd +1212 -0
  19. data/lib/schema/pain.008.001.02.ch.03.xsd +784 -0
  20. data/lib/sps_king.rb +22 -0
  21. data/lib/sps_king/account.rb +24 -0
  22. data/lib/sps_king/account/creditor_account.rb +11 -0
  23. data/lib/sps_king/account/creditor_address.rb +37 -0
  24. data/lib/sps_king/account/debtor_account.rb +5 -0
  25. data/lib/sps_king/account/debtor_address.rb +34 -0
  26. data/lib/sps_king/converter.rb +53 -0
  27. data/lib/sps_king/error.rb +4 -0
  28. data/lib/sps_king/message.rb +163 -0
  29. data/lib/sps_king/message/credit_transfer.rb +140 -0
  30. data/lib/sps_king/message/direct_debit.rb +177 -0
  31. data/lib/sps_king/structured_remittance_information.rb +20 -0
  32. data/lib/sps_king/transaction.rb +59 -0
  33. data/lib/sps_king/transaction/credit_transfer_transaction.rb +19 -0
  34. data/lib/sps_king/transaction/direct_debit_transaction.rb +58 -0
  35. data/lib/sps_king/validator.rb +55 -0
  36. data/lib/sps_king/version.rb +3 -0
  37. data/spec/examples/pain.001.001.03.ch.02.xml +172 -0
  38. data/spec/examples/pain.008.001.02.ch.03.xml +240 -0
  39. data/spec/lib/sps_king/account/creditor_account_spec.rb +52 -0
  40. data/spec/lib/sps_king/account/creditor_address_spec.rb +14 -0
  41. data/spec/lib/sps_king/account/debtor_account_spec.rb +14 -0
  42. data/spec/lib/sps_king/account/debtor_address_spec.rb +14 -0
  43. data/spec/lib/sps_king/account_spec.rb +42 -0
  44. data/spec/lib/sps_king/converter_spec.rb +88 -0
  45. data/spec/lib/sps_king/message/credit_transfer_spec.rb +350 -0
  46. data/spec/lib/sps_king/message/direct_debit_spec.rb +483 -0
  47. data/spec/lib/sps_king/message_spec.rb +128 -0
  48. data/spec/lib/sps_king/structured_remittance_information_spec.rb +32 -0
  49. data/spec/lib/sps_king/transaction/credit_transfer_transaction_spec.rb +53 -0
  50. data/spec/lib/sps_king/transaction/direct_debit_transaction_spec.rb +56 -0
  51. data/spec/lib/sps_king/transaction_spec.rb +133 -0
  52. data/spec/lib/sps_king/validation_spec.rb +23 -0
  53. data/spec/lib/sps_king/validator_spec.rb +78 -0
  54. data/spec/spec_helper.rb +33 -0
  55. data/spec/support/active_model.rb +30 -0
  56. data/spec/support/custom_matcher.rb +60 -0
  57. data/spec/support/factories.rb +33 -0
  58. data/spec/support/validations.rb +27 -0
  59. data/sps_king.gemspec +31 -0
  60. metadata +237 -0
@@ -0,0 +1,784 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ (C) Copyright 2015, SIX Interbank Clearing AG
4
+ CH Version fuer pain.008 Schweizer Lastschrfitverfahren: xmlns="http://www.six-interbank-clearing.com/de/pain.008.001.02.ch.03.xsd"
5
+ First part (.ch): Identification for this CH version
6
+ Last part (.03) : Version of this scheme
7
+
8
+ Based on ISO pain.008.001.02 (urn:iso:std:iso:20022:tech:xsd:pain.008.001.02)
9
+
10
+ Anregungen und Fragen zu diesem Dokument können an das jeweilige Finanzinstitut gerichtet werden.
11
+ Allgemeine Anregungen können auch bei der SIX Interbank Clearing AG unter folgender Adresse angebracht werden: pm@six-group.com
12
+
13
+ History
14
+ 30.04.2010 V01 initial version for Swiss SEPA DD, targetNamespace="http://www.iso-payments.ch/std/iso20022/ch/pain.008.001.02.ch.01.xsd" File:pain.008.001.02.ch.01.xsd
15
+ 07.05.2015 V02 initial version for Swiss Direct Debit, targetNamespace="http://www.iso-payments.ch/std/iso20022/ch/pain.008.001.02.ch.02.xsd" File:pain.008.001.02.ch.02.xsd
16
+ 30.11.2015 V03 Element CdtrAgt/Othr zugelassen, targetNamespace="http://www.iso-payments.ch/std/iso20022/ch/pain.008.001.02.ch.03.xsd" File:pain.008.001.02.ch.03.xsd
17
+ -->
18
+ <xs:schema xmlns="http://www.six-interbank-clearing.com/de/pain.008.001.02.ch.03.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.six-interbank-clearing.com/de/pain.008.001.02.ch.03.xsd" elementFormDefault="qualified">
19
+ <xs:element name="Document" type="Document_CH_pain008"/>
20
+ <xs:complexType name="AccountIdentification4Choice">
21
+ <xs:sequence>
22
+ <xs:choice>
23
+ <xs:element name="IBAN" type="IBAN2007Identifier"/>
24
+ <xs:element name="Othr" type="GenericAccountIdentification1"/>
25
+ </xs:choice>
26
+ </xs:sequence>
27
+ </xs:complexType>
28
+ <xs:complexType name="AccountIdentification4Choice_CH_pain008">
29
+ <xs:complexContent>
30
+ <xs:restriction base="AccountIdentification4Choice">
31
+ <xs:sequence>
32
+ <xs:choice>
33
+ <xs:element name="IBAN" type="IBAN2007Identifier"/>
34
+ <xs:element name="Othr" type="GenericAccountIdentification1_CH_pain008"/>
35
+ </xs:choice>
36
+ </xs:sequence>
37
+ </xs:restriction>
38
+ </xs:complexContent>
39
+ </xs:complexType>
40
+ <xs:complexType name="ActiveOrHistoricCurrencyAndAmount">
41
+ <xs:simpleContent>
42
+ <xs:extension base="ActiveOrHistoricCurrencyAndAmount_SimpleType">
43
+ <xs:attribute name="Ccy" type="ActiveOrHistoricCurrencyCode" use="required"/>
44
+ </xs:extension>
45
+ </xs:simpleContent>
46
+ </xs:complexType>
47
+ <xs:complexType name="ActiveOrHistoricCurrencyAndAmount_CH_pain008">
48
+ <xs:simpleContent>
49
+ <xs:restriction base="ActiveOrHistoricCurrencyAndAmount">
50
+ <xs:maxInclusive value="999999999.99"/>
51
+ <xs:minInclusive value="0.01"/>
52
+ <xs:totalDigits value="11"/>
53
+ <xs:fractionDigits value="2"/>
54
+ <xs:attribute name="Ccy" type="ActiveOrHistoricCurrencyCode" use="required"/>
55
+ </xs:restriction>
56
+ </xs:simpleContent>
57
+ </xs:complexType>
58
+ <xs:simpleType name="ActiveOrHistoricCurrencyAndAmount_SimpleType">
59
+ <xs:restriction base="xs:decimal">
60
+ <xs:minInclusive value="0"/>
61
+ <xs:totalDigits value="18"/>
62
+ <xs:fractionDigits value="5"/>
63
+ </xs:restriction>
64
+ </xs:simpleType>
65
+ <xs:simpleType name="ActiveOrHistoricCurrencyCode">
66
+ <xs:restriction base="xs:string">
67
+ <xs:pattern value="[A-Z]{3,3}"/>
68
+ </xs:restriction>
69
+ </xs:simpleType>
70
+ <xs:simpleType name="AnyBICIdentifier">
71
+ <xs:restriction base="xs:string">
72
+ <xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/>
73
+ </xs:restriction>
74
+ </xs:simpleType>
75
+ <xs:complexType name="BranchAndFinancialInstitutionIdentification4">
76
+ <xs:sequence>
77
+ <xs:element name="FinInstnId" type="FinancialInstitutionIdentification7"/>
78
+ </xs:sequence>
79
+ </xs:complexType>
80
+ <xs:complexType name="BranchAndFinancialInstitutionIdentification4_CH_pain008">
81
+ <xs:complexContent>
82
+ <xs:restriction base="BranchAndFinancialInstitutionIdentification4">
83
+ <xs:sequence>
84
+ <xs:element name="FinInstnId" type="FinancialInstitutionIdentification7_CH_pain008"/>
85
+ </xs:sequence>
86
+ </xs:restriction>
87
+ </xs:complexContent>
88
+ </xs:complexType>
89
+ <xs:complexType name="BranchAndFinancialInstitutionIdentification4_CH_pain008_2">
90
+ <xs:complexContent>
91
+ <xs:restriction base="BranchAndFinancialInstitutionIdentification4">
92
+ <xs:sequence>
93
+ <xs:element name="FinInstnId" type="FinancialInstitutionIdentification7_CH_pain008_2"/>
94
+ </xs:sequence>
95
+ </xs:restriction>
96
+ </xs:complexContent>
97
+ </xs:complexType>
98
+ <xs:complexType name="CashAccount16">
99
+ <xs:sequence>
100
+ <xs:element name="Id" type="AccountIdentification4Choice"/>
101
+ </xs:sequence>
102
+ </xs:complexType>
103
+ <xs:complexType name="CashAccount16_CH_pain008">
104
+ <xs:complexContent>
105
+ <xs:restriction base="CashAccount16">
106
+ <xs:sequence>
107
+ <xs:element name="Id" type="AccountIdentification4Choice_CH_pain008"/>
108
+ </xs:sequence>
109
+ </xs:restriction>
110
+ </xs:complexContent>
111
+ </xs:complexType>
112
+ <xs:complexType name="CategoryPurpose1Choice">
113
+ <xs:sequence>
114
+ <xs:choice>
115
+ <xs:element name="Cd" type="ExternalCategoryPurpose1Code"/>
116
+ <xs:element name="Prtry" type="Max35Text"/>
117
+ </xs:choice>
118
+ </xs:sequence>
119
+ </xs:complexType>
120
+ <xs:complexType name="CategoryPurpose1Choice_CH_pain008">
121
+ <xs:complexContent>
122
+ <xs:restriction base="CategoryPurpose1Choice">
123
+ <xs:sequence>
124
+ <xs:choice>
125
+ <xs:element name="Cd" type="ExternalCategoryPurpose1Code"/>
126
+ <xs:element name="Prtry" type="Max35Text_CH_pain008_2"/>
127
+ </xs:choice>
128
+ </xs:sequence>
129
+ </xs:restriction>
130
+ </xs:complexContent>
131
+ </xs:complexType>
132
+ <xs:complexType name="ClearingSystemMemberIdentification2">
133
+ <xs:sequence>
134
+ <xs:element name="MmbId" type="Max35Text"/>
135
+ </xs:sequence>
136
+ </xs:complexType>
137
+ <xs:complexType name="ContactDetails2">
138
+ <xs:sequence>
139
+ <xs:element name="Nm" type="Max140Text" minOccurs="0"/>
140
+ <xs:element name="Othr" type="Max35Text" minOccurs="0"/>
141
+ </xs:sequence>
142
+ </xs:complexType>
143
+ <xs:complexType name="ContactDetails2_CH_pain008">
144
+ <xs:complexContent>
145
+ <xs:restriction base="ContactDetails2">
146
+ <xs:sequence>
147
+ <xs:element name="Nm" type="Max140Text_CH_pain008" minOccurs="0"/>
148
+ <xs:element name="Othr" type="Max35Text_CH_pain008_2" minOccurs="0"/>
149
+ </xs:sequence>
150
+ </xs:restriction>
151
+ </xs:complexContent>
152
+ </xs:complexType>
153
+ <xs:simpleType name="CountryCode">
154
+ <xs:restriction base="xs:string">
155
+ <xs:pattern value="[A-Z]{2,2}"/>
156
+ </xs:restriction>
157
+ </xs:simpleType>
158
+ <xs:complexType name="CreditorReferenceInformation2">
159
+ <xs:sequence>
160
+ <xs:element name="Tp" type="CreditorReferenceType2"/>
161
+ <xs:element name="Ref" type="Max35Text"/>
162
+ </xs:sequence>
163
+ </xs:complexType>
164
+ <xs:complexType name="CreditorReferenceInformation2_CH_pain008">
165
+ <xs:complexContent>
166
+ <xs:restriction base="CreditorReferenceInformation2">
167
+ <xs:sequence>
168
+ <xs:element name="Tp" type="CreditorReferenceType2"/>
169
+ <xs:element name="Ref" type="Max35Text_CH_pain008_2"/>
170
+ </xs:sequence>
171
+ </xs:restriction>
172
+ </xs:complexContent>
173
+ </xs:complexType>
174
+ <xs:complexType name="CreditorReferenceType1Choice">
175
+ <xs:sequence>
176
+ <xs:choice>
177
+ <xs:element name="Prtry" type="Max35Text"/>
178
+ </xs:choice>
179
+ </xs:sequence>
180
+ </xs:complexType>
181
+ <xs:complexType name="CreditorReferenceType2">
182
+ <xs:sequence>
183
+ <xs:element name="CdOrPrtry" type="CreditorReferenceType1Choice"/>
184
+ </xs:sequence>
185
+ </xs:complexType>
186
+ <xs:complexType name="CustomerDirectDebitInitiationV02">
187
+ <xs:sequence>
188
+ <xs:element name="GrpHdr" type="GroupHeader39"/>
189
+ <xs:element name="PmtInf" type="PaymentInstructionInformation4" maxOccurs="unbounded"/>
190
+ </xs:sequence>
191
+ </xs:complexType>
192
+ <xs:complexType name="CustomerDirectDebitInitiationV02_CH_pain008">
193
+ <xs:complexContent>
194
+ <xs:restriction base="CustomerDirectDebitInitiationV02">
195
+ <xs:sequence>
196
+ <xs:element name="GrpHdr" type="GroupHeader39_CH_pain008"/>
197
+ <xs:element name="PmtInf" type="PaymentInstructionInformation4_CH_pain008" maxOccurs="unbounded"/>
198
+ </xs:sequence>
199
+ </xs:restriction>
200
+ </xs:complexContent>
201
+ </xs:complexType>
202
+ <xs:complexType name="DateAndPlaceOfBirth">
203
+ <xs:sequence>
204
+ <xs:element name="BirthDt" type="ISODate"/>
205
+ <xs:element name="CityOfBirth" type="Max35Text"/>
206
+ <xs:element name="CtryOfBirth" type="CountryCode"/>
207
+ </xs:sequence>
208
+ </xs:complexType>
209
+ <xs:simpleType name="DecimalNumber">
210
+ <xs:restriction base="xs:decimal">
211
+ <xs:totalDigits value="18"/>
212
+ <xs:fractionDigits value="17"/>
213
+ </xs:restriction>
214
+ </xs:simpleType>
215
+ <xs:complexType name="DirectDebitTransactionInformation9">
216
+ <xs:sequence>
217
+ <xs:element name="PmtId" type="PaymentIdentification1"/>
218
+ <xs:element name="InstdAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
219
+ <xs:element name="UltmtCdtr" type="PartyIdentification32" minOccurs="0"/>
220
+ <xs:element name="DbtrAgt" type="BranchAndFinancialInstitutionIdentification4"/>
221
+ <xs:element name="Dbtr" type="PartyIdentification32"/>
222
+ <xs:element name="DbtrAcct" type="CashAccount16"/>
223
+ <xs:element name="UltmtDbtr" type="PartyIdentification32" minOccurs="0"/>
224
+ <xs:element name="RmtInf" type="RemittanceInformation5" minOccurs="0"/>
225
+ </xs:sequence>
226
+ </xs:complexType>
227
+ <xs:complexType name="DirectDebitTransactionInformation9_CH_pain008">
228
+ <xs:complexContent>
229
+ <xs:restriction base="DirectDebitTransactionInformation9">
230
+ <xs:sequence>
231
+ <xs:element name="PmtId" type="PaymentIdentification1_CH_pain008"/>
232
+ <xs:element name="InstdAmt" type="ActiveOrHistoricCurrencyAndAmount_CH_pain008"/>
233
+ <xs:element name="UltmtCdtr" type="PartyIdentification32_CH_pain008_5" minOccurs="0"/>
234
+ <xs:element name="DbtrAgt" type="BranchAndFinancialInstitutionIdentification4_CH_pain008_2"/>
235
+ <xs:element name="Dbtr" type="PartyIdentification32_CH_pain008_2"/>
236
+ <xs:element name="DbtrAcct" type="CashAccount16_CH_pain008"/>
237
+ <xs:element name="UltmtDbtr" type="PartyIdentification32_CH_pain008_5" minOccurs="0"/>
238
+ <xs:element name="RmtInf" type="RemittanceInformation5_CH_pain008" minOccurs="0"/>
239
+ </xs:sequence>
240
+ </xs:restriction>
241
+ </xs:complexContent>
242
+ </xs:complexType>
243
+ <xs:complexType name="Document">
244
+ <xs:sequence>
245
+ <xs:element name="CstmrDrctDbtInitn" type="CustomerDirectDebitInitiationV02"/>
246
+ </xs:sequence>
247
+ </xs:complexType>
248
+ <xs:complexType name="Document_CH_pain008">
249
+ <xs:complexContent>
250
+ <xs:restriction base="Document">
251
+ <xs:sequence>
252
+ <xs:element name="CstmrDrctDbtInitn" type="CustomerDirectDebitInitiationV02_CH_pain008"/>
253
+ </xs:sequence>
254
+ </xs:restriction>
255
+ </xs:complexContent>
256
+ </xs:complexType>
257
+ <xs:simpleType name="ExternalCategoryPurpose1Code">
258
+ <xs:restriction base="xs:string">
259
+ <xs:minLength value="1"/>
260
+ <xs:maxLength value="4"/>
261
+ </xs:restriction>
262
+ </xs:simpleType>
263
+ <xs:simpleType name="ExternalOrganisationIdentification1Code">
264
+ <xs:restriction base="xs:string">
265
+ <xs:minLength value="1"/>
266
+ <xs:maxLength value="4"/>
267
+ </xs:restriction>
268
+ </xs:simpleType>
269
+ <xs:simpleType name="ExternalPersonIdentification1Code">
270
+ <xs:restriction base="xs:string">
271
+ <xs:minLength value="1"/>
272
+ <xs:maxLength value="4"/>
273
+ </xs:restriction>
274
+ </xs:simpleType>
275
+ <xs:complexType name="FinancialInstitutionIdentification7">
276
+ <xs:sequence>
277
+ <xs:element name="ClrSysMmbId" type="ClearingSystemMemberIdentification2" minOccurs="0"/>
278
+ <xs:element name="Othr" type="GenericFinancialIdentification1" minOccurs="0"/>
279
+ </xs:sequence>
280
+ </xs:complexType>
281
+ <xs:complexType name="FinancialInstitutionIdentification7_CH_pain008">
282
+ <xs:complexContent>
283
+ <xs:restriction base="FinancialInstitutionIdentification7">
284
+ <xs:sequence>
285
+ <xs:element name="ClrSysMmbId" type="ClearingSystemMemberIdentification2"/>
286
+ <xs:element name="Othr" type="GenericFinancialIdentification1_CH_pain008" minOccurs="0"/>
287
+ </xs:sequence>
288
+ </xs:restriction>
289
+ </xs:complexContent>
290
+ </xs:complexType>
291
+ <xs:complexType name="FinancialInstitutionIdentification7_CH_pain008_2">
292
+ <xs:complexContent>
293
+ <xs:restriction base="FinancialInstitutionIdentification7">
294
+ <xs:sequence>
295
+ <xs:element name="ClrSysMmbId" type="ClearingSystemMemberIdentification2" minOccurs="0"/>
296
+ </xs:sequence>
297
+ </xs:restriction>
298
+ </xs:complexContent>
299
+ </xs:complexType>
300
+ <xs:complexType name="GenericAccountIdentification1">
301
+ <xs:sequence>
302
+ <xs:element name="Id" type="Max34Text"/>
303
+ </xs:sequence>
304
+ </xs:complexType>
305
+ <xs:complexType name="GenericAccountIdentification1_CH_pain008">
306
+ <xs:complexContent>
307
+ <xs:restriction base="GenericAccountIdentification1">
308
+ <xs:sequence>
309
+ <xs:element name="Id" type="Max34Text_CH_pain008"/>
310
+ </xs:sequence>
311
+ </xs:restriction>
312
+ </xs:complexContent>
313
+ </xs:complexType>
314
+ <xs:complexType name="GenericFinancialIdentification1">
315
+ <xs:sequence>
316
+ <xs:element name="Id" type="Max35Text"/>
317
+ </xs:sequence>
318
+ </xs:complexType>
319
+ <xs:complexType name="GenericFinancialIdentification1_CH_pain008">
320
+ <xs:complexContent>
321
+ <xs:restriction base="GenericFinancialIdentification1">
322
+ <xs:sequence>
323
+ <xs:element name="Id" type="Max35Text_CH_pain008_2"/>
324
+ </xs:sequence>
325
+ </xs:restriction>
326
+ </xs:complexContent>
327
+ </xs:complexType>
328
+ <xs:complexType name="GenericOrganisationIdentification1">
329
+ <xs:sequence>
330
+ <xs:element name="Id" type="Max35Text"/>
331
+ <xs:element name="SchmeNm" type="OrganisationIdentificationSchemeName1Choice" minOccurs="0"/>
332
+ </xs:sequence>
333
+ </xs:complexType>
334
+ <xs:complexType name="GenericOrganisationIdentification1_CH_pain008">
335
+ <xs:complexContent>
336
+ <xs:restriction base="GenericOrganisationIdentification1">
337
+ <xs:sequence>
338
+ <xs:element name="Id" type="Max35Text"/>
339
+ </xs:sequence>
340
+ </xs:restriction>
341
+ </xs:complexContent>
342
+ </xs:complexType>
343
+ <xs:complexType name="GenericPersonIdentification1">
344
+ <xs:sequence>
345
+ <xs:element name="Id" type="Max35Text"/>
346
+ <xs:element name="SchmeNm" type="PersonIdentificationSchemeName1Choice" minOccurs="0"/>
347
+ </xs:sequence>
348
+ </xs:complexType>
349
+ <xs:complexType name="GenericPersonIdentification1_CH_pain008">
350
+ <xs:complexContent>
351
+ <xs:restriction base="GenericPersonIdentification1">
352
+ <xs:sequence>
353
+ <xs:element name="Id" type="Max35Text"/>
354
+ <xs:element name="SchmeNm" type="PersonIdentificationSchemeName1Choice_CH_pain008"/>
355
+ </xs:sequence>
356
+ </xs:restriction>
357
+ </xs:complexContent>
358
+ </xs:complexType>
359
+ <xs:complexType name="GroupHeader39">
360
+ <xs:sequence>
361
+ <xs:element name="MsgId" type="Max35Text"/>
362
+ <xs:element name="CreDtTm" type="ISODateTime"/>
363
+ <xs:element name="NbOfTxs" type="Max15NumericText"/>
364
+ <xs:element name="CtrlSum" type="DecimalNumber" minOccurs="0"/>
365
+ <xs:element name="InitgPty" type="PartyIdentification32"/>
366
+ </xs:sequence>
367
+ </xs:complexType>
368
+ <xs:complexType name="GroupHeader39_CH_pain008">
369
+ <xs:complexContent>
370
+ <xs:restriction base="GroupHeader39">
371
+ <xs:sequence>
372
+ <xs:element name="MsgId" type="Max35Text_CH_pain008"/>
373
+ <xs:element name="CreDtTm" type="ISODateTime"/>
374
+ <xs:element name="NbOfTxs" type="Max15NumericText"/>
375
+ <xs:element name="CtrlSum" type="DecimalNumber" minOccurs="0"/>
376
+ <xs:element name="InitgPty" type="PartyIdentification32_CH_pain008"/>
377
+ </xs:sequence>
378
+ </xs:restriction>
379
+ </xs:complexContent>
380
+ </xs:complexType>
381
+ <xs:simpleType name="IBAN2007Identifier">
382
+ <xs:restriction base="xs:string">
383
+ <xs:pattern value="[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}"/>
384
+ </xs:restriction>
385
+ </xs:simpleType>
386
+ <xs:simpleType name="ISODate">
387
+ <xs:restriction base="xs:date"/>
388
+ </xs:simpleType>
389
+ <xs:simpleType name="ISODateTime">
390
+ <xs:restriction base="xs:dateTime"/>
391
+ </xs:simpleType>
392
+ <xs:complexType name="LocalInstrument2Choice">
393
+ <xs:sequence>
394
+ <xs:choice>
395
+ <xs:element name="Prtry" type="Max35Text"/>
396
+ </xs:choice>
397
+ </xs:sequence>
398
+ </xs:complexType>
399
+ <xs:simpleType name="Max140Text">
400
+ <xs:restriction base="xs:string">
401
+ <xs:minLength value="1"/>
402
+ <xs:maxLength value="140"/>
403
+ </xs:restriction>
404
+ </xs:simpleType>
405
+ <xs:simpleType name="Max140Text_CH_pain008">
406
+ <xs:restriction base="Max140Text">
407
+ <xs:minLength value="1"/>
408
+ <xs:maxLength value="140"/>
409
+ <xs:pattern value="([a-zA-Z0-9\.,;:&apos;\+\-/\(\)?\*\[\]\{\}\\`´~ ]|[!&quot;#%&amp;&lt;&gt;÷=@_$£]|[àáâäçèéêëìíîïñòóôöùúûüýßÀÁÂÄÇÈÉÊËÌÍÎÏÒÓÔÖÙÚÛÜÑ])*"/>
410
+ </xs:restriction>
411
+ </xs:simpleType>
412
+ <xs:simpleType name="Max15NumericText">
413
+ <xs:restriction base="xs:string">
414
+ <xs:pattern value="[0-9]{1,15}"/>
415
+ </xs:restriction>
416
+ </xs:simpleType>
417
+ <xs:simpleType name="Max16Text">
418
+ <xs:restriction base="xs:string">
419
+ <xs:minLength value="1"/>
420
+ <xs:maxLength value="16"/>
421
+ </xs:restriction>
422
+ </xs:simpleType>
423
+ <xs:simpleType name="Max16Text_CH_pain008">
424
+ <xs:restriction base="Max16Text">
425
+ <xs:minLength value="1"/>
426
+ <xs:maxLength value="16"/>
427
+ <xs:pattern value="([a-zA-Z0-9\.,;:&apos;\+\-/\(\)?\*\[\]\{\}\\`´~ ]|[!&quot;#%&amp;&lt;&gt;÷=@_$£]|[àáâäçèéêëìíîïñòóôöùúûüýßÀÁÂÄÇÈÉÊËÌÍÎÏÒÓÔÖÙÚÛÜÑ])*"/>
428
+ </xs:restriction>
429
+ </xs:simpleType>
430
+ <xs:simpleType name="Max34Text">
431
+ <xs:restriction base="xs:string">
432
+ <xs:minLength value="1"/>
433
+ <xs:maxLength value="34"/>
434
+ </xs:restriction>
435
+ </xs:simpleType>
436
+ <xs:simpleType name="Max34Text_CH_pain008">
437
+ <xs:restriction base="Max34Text">
438
+ <xs:minLength value="1"/>
439
+ <xs:maxLength value="34"/>
440
+ <xs:pattern value="([a-zA-Z0-9\.,;:&apos;\+\-/\(\)?\*\[\]\{\}\\`´~ ]|[!&quot;#%&amp;&lt;&gt;÷=@_$£]|[àáâäçèéêëìíîïñòóôöùúûüýßÀÁÂÄÇÈÉÊËÌÍÎÏÒÓÔÖÙÚÛÜÑ])*"/>
441
+ </xs:restriction>
442
+ </xs:simpleType>
443
+ <xs:simpleType name="Max35Text">
444
+ <xs:restriction base="xs:string">
445
+ <xs:minLength value="1"/>
446
+ <xs:maxLength value="35"/>
447
+ </xs:restriction>
448
+ </xs:simpleType>
449
+ <xs:simpleType name="Max35Text_CH_pain008">
450
+ <xs:restriction base="Max35Text">
451
+ <xs:minLength value="1"/>
452
+ <xs:maxLength value="35"/>
453
+ <xs:pattern value="([A-Za-z0-9]|[+|\?|/|\-|:|\(|\)|\.|,|&apos;|\p{Zs}])*"/>
454
+ </xs:restriction>
455
+ </xs:simpleType>
456
+ <xs:simpleType name="Max35Text_CH_pain008_2">
457
+ <xs:restriction base="Max35Text">
458
+ <xs:minLength value="1"/>
459
+ <xs:maxLength value="35"/>
460
+ <xs:pattern value="([a-zA-Z0-9\.,;:&apos;\+\-/\(\)?\*\[\]\{\}\\`´~ ]|[!&quot;#%&amp;&lt;&gt;÷=@_$£]|[àáâäçèéêëìíîïñòóôöùúûüýßÀÁÂÄÇÈÉÊËÌÍÎÏÒÓÔÖÙÚÛÜÑ])*"/>
461
+ </xs:restriction>
462
+ </xs:simpleType>
463
+ <xs:simpleType name="Max70Text">
464
+ <xs:restriction base="xs:string">
465
+ <xs:minLength value="1"/>
466
+ <xs:maxLength value="70"/>
467
+ </xs:restriction>
468
+ </xs:simpleType>
469
+ <xs:simpleType name="Max70Text_CH_pain008">
470
+ <xs:restriction base="Max70Text">
471
+ <xs:minLength value="1"/>
472
+ <xs:maxLength value="70"/>
473
+ <xs:pattern value="([a-zA-Z0-9\.,;:&apos;\+\-/\(\)?\*\[\]\{\}\\`´~ ]|[!&quot;#%&amp;&lt;&gt;÷=@_$£]|[àáâäçèéêëìíîïñòóôöùúûüýßÀÁÂÄÇÈÉÊËÌÍÎÏÒÓÔÖÙÚÛÜÑ])*"/>
474
+ </xs:restriction>
475
+ </xs:simpleType>
476
+ <xs:complexType name="OrganisationIdentification4">
477
+ <xs:sequence>
478
+ <xs:element name="BICOrBEI" type="AnyBICIdentifier" minOccurs="0"/>
479
+ <xs:element name="Othr" type="GenericOrganisationIdentification1" minOccurs="0"/>
480
+ </xs:sequence>
481
+ </xs:complexType>
482
+ <xs:complexType name="OrganisationIdentification4_CH_pain008">
483
+ <xs:complexContent>
484
+ <xs:restriction base="OrganisationIdentification4">
485
+ <xs:sequence>
486
+ <xs:element name="Othr" type="GenericOrganisationIdentification1_CH_pain008"/>
487
+ </xs:sequence>
488
+ </xs:restriction>
489
+ </xs:complexContent>
490
+ </xs:complexType>
491
+ <xs:complexType name="OrganisationIdentification4_CH_pain008_2">
492
+ <xs:complexContent>
493
+ <xs:restriction base="OrganisationIdentification4">
494
+ <xs:sequence>
495
+ <xs:element name="BICOrBEI" type="AnyBICIdentifier" minOccurs="0"/>
496
+ <xs:element name="Othr" type="GenericOrganisationIdentification1" minOccurs="0"/>
497
+ </xs:sequence>
498
+ </xs:restriction>
499
+ </xs:complexContent>
500
+ </xs:complexType>
501
+ <xs:complexType name="OrganisationIdentificationSchemeName1Choice">
502
+ <xs:sequence>
503
+ <xs:choice>
504
+ <xs:element name="Cd" type="ExternalOrganisationIdentification1Code"/>
505
+ <xs:element name="Prtry" type="Max35Text"/>
506
+ </xs:choice>
507
+ </xs:sequence>
508
+ </xs:complexType>
509
+ <xs:complexType name="Party6Choice">
510
+ <xs:sequence>
511
+ <xs:choice>
512
+ <xs:element name="OrgId" type="OrganisationIdentification4"/>
513
+ <xs:element name="PrvtId" type="PersonIdentification5"/>
514
+ </xs:choice>
515
+ </xs:sequence>
516
+ </xs:complexType>
517
+ <xs:complexType name="Party6Choice_CH_pain008">
518
+ <xs:complexContent>
519
+ <xs:restriction base="Party6Choice">
520
+ <xs:sequence>
521
+ <xs:choice>
522
+ <xs:element name="OrgId" type="OrganisationIdentification4_CH_pain008"/>
523
+ </xs:choice>
524
+ </xs:sequence>
525
+ </xs:restriction>
526
+ </xs:complexContent>
527
+ </xs:complexType>
528
+ <xs:complexType name="Party6Choice_CH_pain008_2">
529
+ <xs:complexContent>
530
+ <xs:restriction base="Party6Choice">
531
+ <xs:sequence>
532
+ <xs:choice>
533
+ <xs:element name="OrgId" type="OrganisationIdentification4_CH_pain008_2"/>
534
+ <xs:element name="PrvtId" type="PersonIdentification5_CH_pain008"/>
535
+ </xs:choice>
536
+ </xs:sequence>
537
+ </xs:restriction>
538
+ </xs:complexContent>
539
+ </xs:complexType>
540
+ <xs:complexType name="Party6Choice_CH_pain008_3">
541
+ <xs:complexContent>
542
+ <xs:restriction base="Party6Choice">
543
+ <xs:sequence>
544
+ <xs:choice>
545
+ <xs:element name="PrvtId" type="PersonIdentification5_CH_pain008_2"/>
546
+ </xs:choice>
547
+ </xs:sequence>
548
+ </xs:restriction>
549
+ </xs:complexContent>
550
+ </xs:complexType>
551
+ <xs:complexType name="PartyIdentification32">
552
+ <xs:sequence>
553
+ <xs:element name="Nm" type="Max140Text" minOccurs="0"/>
554
+ <xs:element name="PstlAdr" type="PostalAddress6" minOccurs="0"/>
555
+ <xs:element name="Id" type="Party6Choice" minOccurs="0"/>
556
+ <xs:element name="CtctDtls" type="ContactDetails2" minOccurs="0"/>
557
+ </xs:sequence>
558
+ </xs:complexType>
559
+ <xs:complexType name="PartyIdentification32_CH_pain008">
560
+ <xs:complexContent>
561
+ <xs:restriction base="PartyIdentification32">
562
+ <xs:sequence>
563
+ <xs:element name="Nm" type="Max140Text_CH_pain008" minOccurs="0"/>
564
+ <xs:element name="Id" type="Party6Choice_CH_pain008"/>
565
+ <xs:element name="CtctDtls" type="ContactDetails2_CH_pain008" minOccurs="0"/>
566
+ </xs:sequence>
567
+ </xs:restriction>
568
+ </xs:complexContent>
569
+ </xs:complexType>
570
+ <xs:complexType name="PartyIdentification32_CH_pain008_2">
571
+ <xs:complexContent>
572
+ <xs:restriction base="PartyIdentification32">
573
+ <xs:sequence>
574
+ <xs:element name="Nm" type="Max140Text_CH_pain008"/>
575
+ <xs:element name="PstlAdr" type="PostalAddress6_CH_pain008" minOccurs="0"/>
576
+ </xs:sequence>
577
+ </xs:restriction>
578
+ </xs:complexContent>
579
+ </xs:complexType>
580
+ <xs:complexType name="PartyIdentification32_CH_pain008_3">
581
+ <xs:complexContent>
582
+ <xs:restriction base="PartyIdentification32">
583
+ <xs:sequence>
584
+ <xs:element name="Nm" type="Max140Text_CH_pain008" minOccurs="0"/>
585
+ <xs:element name="PstlAdr" type="PostalAddress6_CH_pain008" minOccurs="0"/>
586
+ <xs:element name="Id" type="Party6Choice_CH_pain008_2" minOccurs="0"/>
587
+ </xs:sequence>
588
+ </xs:restriction>
589
+ </xs:complexContent>
590
+ </xs:complexType>
591
+ <xs:complexType name="PartyIdentification32_CH_pain008_4">
592
+ <xs:complexContent>
593
+ <xs:restriction base="PartyIdentification32">
594
+ <xs:sequence>
595
+ <xs:element name="Id" type="Party6Choice_CH_pain008_3"/>
596
+ </xs:sequence>
597
+ </xs:restriction>
598
+ </xs:complexContent>
599
+ </xs:complexType>
600
+ <xs:complexType name="PartyIdentification32_CH_pain008_5">
601
+ <xs:complexContent>
602
+ <xs:restriction base="PartyIdentification32">
603
+ <xs:sequence>
604
+ <xs:element name="Nm" type="Max140Text_CH_pain008" minOccurs="0"/>
605
+ <xs:element name="PstlAdr" type="PostalAddress6_CH_pain008" minOccurs="0"/>
606
+ </xs:sequence>
607
+ </xs:restriction>
608
+ </xs:complexContent>
609
+ </xs:complexType>
610
+ <xs:complexType name="PaymentIdentification1">
611
+ <xs:sequence>
612
+ <xs:element name="InstrId" type="Max35Text"/>
613
+ <xs:element name="EndToEndId" type="Max35Text"/>
614
+ </xs:sequence>
615
+ </xs:complexType>
616
+ <xs:complexType name="PaymentIdentification1_CH_pain008">
617
+ <xs:complexContent>
618
+ <xs:restriction base="PaymentIdentification1">
619
+ <xs:sequence>
620
+ <xs:element name="InstrId" type="Max35Text_CH_pain008"/>
621
+ <xs:element name="EndToEndId" type="Max35Text_CH_pain008"/>
622
+ </xs:sequence>
623
+ </xs:restriction>
624
+ </xs:complexContent>
625
+ </xs:complexType>
626
+ <xs:complexType name="PaymentInstructionInformation4">
627
+ <xs:sequence>
628
+ <xs:element name="PmtInfId" type="Max35Text"/>
629
+ <xs:element name="PmtMtd" type="PaymentMethod2Code"/>
630
+ <xs:element name="PmtTpInf" type="PaymentTypeInformation20"/>
631
+ <xs:element name="ReqdColltnDt" type="ISODate"/>
632
+ <xs:element name="Cdtr" type="PartyIdentification32"/>
633
+ <xs:element name="CdtrAcct" type="CashAccount16"/>
634
+ <xs:element name="CdtrAgt" type="BranchAndFinancialInstitutionIdentification4"/>
635
+ <xs:element name="UltmtCdtr" type="PartyIdentification32" minOccurs="0"/>
636
+ <xs:element name="CdtrSchmeId" type="PartyIdentification32"/>
637
+ <xs:element name="DrctDbtTxInf" type="DirectDebitTransactionInformation9" maxOccurs="unbounded"/>
638
+ </xs:sequence>
639
+ </xs:complexType>
640
+ <xs:complexType name="PaymentInstructionInformation4_CH_pain008">
641
+ <xs:complexContent>
642
+ <xs:restriction base="PaymentInstructionInformation4">
643
+ <xs:sequence>
644
+ <xs:element name="PmtInfId" type="Max35Text_CH_pain008"/>
645
+ <xs:element name="PmtMtd" type="PaymentMethod2Code"/>
646
+ <xs:element name="PmtTpInf" type="PaymentTypeInformation20_CH_pain008"/>
647
+ <xs:element name="ReqdColltnDt" type="ISODate"/>
648
+ <xs:element name="Cdtr" type="PartyIdentification32_CH_pain008_2"/>
649
+ <xs:element name="CdtrAcct" type="CashAccount16_CH_pain008"/>
650
+ <xs:element name="CdtrAgt" type="BranchAndFinancialInstitutionIdentification4_CH_pain008"/>
651
+ <xs:element name="UltmtCdtr" type="PartyIdentification32_CH_pain008_3" minOccurs="0"/>
652
+ <xs:element name="CdtrSchmeId" type="PartyIdentification32_CH_pain008_4"/>
653
+ <xs:element name="DrctDbtTxInf" type="DirectDebitTransactionInformation9_CH_pain008" maxOccurs="unbounded"/>
654
+ </xs:sequence>
655
+ </xs:restriction>
656
+ </xs:complexContent>
657
+ </xs:complexType>
658
+ <xs:simpleType name="PaymentMethod2Code">
659
+ <xs:restriction base="xs:string">
660
+ <xs:enumeration value="DD"/>
661
+ </xs:restriction>
662
+ </xs:simpleType>
663
+ <xs:complexType name="PaymentTypeInformation20">
664
+ <xs:sequence>
665
+ <xs:element name="SvcLvl" type="ServiceLevel8Choice"/>
666
+ <xs:element name="LclInstrm" type="LocalInstrument2Choice"/>
667
+ <xs:element name="CtgyPurp" type="CategoryPurpose1Choice" minOccurs="0"/>
668
+ </xs:sequence>
669
+ </xs:complexType>
670
+ <xs:complexType name="PaymentTypeInformation20_CH_pain008">
671
+ <xs:complexContent>
672
+ <xs:restriction base="PaymentTypeInformation20">
673
+ <xs:sequence>
674
+ <xs:element name="SvcLvl" type="ServiceLevel8Choice"/>
675
+ <xs:element name="LclInstrm" type="LocalInstrument2Choice"/>
676
+ <xs:element name="CtgyPurp" type="CategoryPurpose1Choice_CH_pain008" minOccurs="0"/>
677
+ </xs:sequence>
678
+ </xs:restriction>
679
+ </xs:complexContent>
680
+ </xs:complexType>
681
+ <xs:complexType name="PersonIdentification5">
682
+ <xs:sequence>
683
+ <xs:element name="DtAndPlcOfBirth" type="DateAndPlaceOfBirth" minOccurs="0"/>
684
+ <xs:element name="Othr" type="GenericPersonIdentification1" minOccurs="0"/>
685
+ </xs:sequence>
686
+ </xs:complexType>
687
+ <xs:complexType name="PersonIdentification5_CH_pain008">
688
+ <xs:complexContent>
689
+ <xs:restriction base="PersonIdentification5">
690
+ <xs:sequence>
691
+ <xs:element name="DtAndPlcOfBirth" type="DateAndPlaceOfBirth" minOccurs="0"/>
692
+ <xs:element name="Othr" type="GenericPersonIdentification1" minOccurs="0"/>
693
+ </xs:sequence>
694
+ </xs:restriction>
695
+ </xs:complexContent>
696
+ </xs:complexType>
697
+ <xs:complexType name="PersonIdentification5_CH_pain008_2">
698
+ <xs:complexContent>
699
+ <xs:restriction base="PersonIdentification5">
700
+ <xs:sequence>
701
+ <xs:element name="Othr" type="GenericPersonIdentification1_CH_pain008"/>
702
+ </xs:sequence>
703
+ </xs:restriction>
704
+ </xs:complexContent>
705
+ </xs:complexType>
706
+ <xs:complexType name="PersonIdentificationSchemeName1Choice">
707
+ <xs:sequence>
708
+ <xs:choice>
709
+ <xs:element name="Cd" type="ExternalPersonIdentification1Code"/>
710
+ <xs:element name="Prtry" type="Max35Text"/>
711
+ </xs:choice>
712
+ </xs:sequence>
713
+ </xs:complexType>
714
+ <xs:complexType name="PersonIdentificationSchemeName1Choice_CH_pain008">
715
+ <xs:complexContent>
716
+ <xs:restriction base="PersonIdentificationSchemeName1Choice">
717
+ <xs:sequence>
718
+ <xs:choice>
719
+ <xs:element name="Prtry" type="Max35Text"/>
720
+ </xs:choice>
721
+ </xs:sequence>
722
+ </xs:restriction>
723
+ </xs:complexContent>
724
+ </xs:complexType>
725
+ <xs:complexType name="PostalAddress6">
726
+ <xs:sequence>
727
+ <xs:element name="StrtNm" type="Max70Text" minOccurs="0"/>
728
+ <xs:element name="PstCd" type="Max16Text" minOccurs="0"/>
729
+ <xs:element name="TwnNm" type="Max35Text" minOccurs="0"/>
730
+ <xs:element name="Ctry" type="CountryCode" minOccurs="0"/>
731
+ <xs:element name="AdrLine" type="Max70Text" minOccurs="0" maxOccurs="2"/>
732
+ </xs:sequence>
733
+ </xs:complexType>
734
+ <xs:complexType name="PostalAddress6_CH_pain008">
735
+ <xs:complexContent>
736
+ <xs:restriction base="PostalAddress6">
737
+ <xs:sequence>
738
+ <xs:element name="StrtNm" type="Max70Text_CH_pain008" minOccurs="0"/>
739
+ <xs:element name="PstCd" type="Max16Text_CH_pain008" minOccurs="0"/>
740
+ <xs:element name="TwnNm" type="Max35Text_CH_pain008_2" minOccurs="0"/>
741
+ <xs:element name="Ctry" type="CountryCode" minOccurs="0"/>
742
+ <xs:element name="AdrLine" type="Max70Text_CH_pain008" minOccurs="0" maxOccurs="2"/>
743
+ </xs:sequence>
744
+ </xs:restriction>
745
+ </xs:complexContent>
746
+ </xs:complexType>
747
+ <xs:complexType name="RemittanceInformation5">
748
+ <xs:sequence>
749
+ <xs:element name="Ustrd" type="Max140Text" minOccurs="0"/>
750
+ <xs:element name="Strd" type="StructuredRemittanceInformation7" minOccurs="0"/>
751
+ </xs:sequence>
752
+ </xs:complexType>
753
+ <xs:complexType name="RemittanceInformation5_CH_pain008">
754
+ <xs:complexContent>
755
+ <xs:restriction base="RemittanceInformation5">
756
+ <xs:sequence>
757
+ <xs:element name="Ustrd" type="Max140Text_CH_pain008" minOccurs="0"/>
758
+ <xs:element name="Strd" type="StructuredRemittanceInformation7_CH_pain008" minOccurs="0"/>
759
+ </xs:sequence>
760
+ </xs:restriction>
761
+ </xs:complexContent>
762
+ </xs:complexType>
763
+ <xs:complexType name="ServiceLevel8Choice">
764
+ <xs:sequence>
765
+ <xs:choice>
766
+ <xs:element name="Prtry" type="Max35Text"/>
767
+ </xs:choice>
768
+ </xs:sequence>
769
+ </xs:complexType>
770
+ <xs:complexType name="StructuredRemittanceInformation7">
771
+ <xs:sequence>
772
+ <xs:element name="CdtrRefInf" type="CreditorReferenceInformation2"/>
773
+ </xs:sequence>
774
+ </xs:complexType>
775
+ <xs:complexType name="StructuredRemittanceInformation7_CH_pain008">
776
+ <xs:complexContent>
777
+ <xs:restriction base="StructuredRemittanceInformation7">
778
+ <xs:sequence>
779
+ <xs:element name="CdtrRefInf" type="CreditorReferenceInformation2_CH_pain008"/>
780
+ </xs:sequence>
781
+ </xs:restriction>
782
+ </xs:complexContent>
783
+ </xs:complexType>
784
+ </xs:schema>