cbpr-usage-rules 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cbpr_rules/__init__.py +21 -0
- cbpr_rules/cli.py +176 -0
- cbpr_rules/engine.py +100 -0
- cbpr_rules/helpers.py +420 -0
- cbpr_rules/loader.py +77 -0
- cbpr_rules/message.py +170 -0
- cbpr_rules/models.py +83 -0
- cbpr_rules/py.typed +0 -0
- cbpr_rules/reference/__init__.py +9 -0
- cbpr_rules/reference/countries.py +28 -0
- cbpr_rules/reference/currencies.py +25 -0
- cbpr_rules/registry.py +107 -0
- cbpr_rules/rules/__init__.py +1 -0
- cbpr_rules/rules/y2025/__init__.py +1 -0
- cbpr_rules/rules/y2025/camt_052.py +224 -0
- cbpr_rules/rules/y2025/camt_054.py +176 -0
- cbpr_rules/rules/y2025/pacs_002.py +212 -0
- cbpr_rules/rules/y2025/pacs_004.py +831 -0
- cbpr_rules/rules/y2025/pacs_008.py +375 -0
- cbpr_rules/rules/y2025/pacs_008_stp.py +367 -0
- cbpr_rules/rules/y2025/pacs_009.py +273 -0
- cbpr_rules/rules/y2025/pacs_009_adv.py +255 -0
- cbpr_rules/rules/y2025/pacs_009_cov.py +358 -0
- cbpr_rules/rules/y2025/pain_001.py +306 -0
- cbpr_rules/rules/y2026/__init__.py +1 -0
- cbpr_rules/rules/y2026/camt_052.py +191 -0
- cbpr_rules/rules/y2026/camt_054.py +182 -0
- cbpr_rules/rules/y2026/pacs_002.py +208 -0
- cbpr_rules/rules/y2026/pacs_004.py +491 -0
- cbpr_rules/rules/y2026/pacs_008.py +377 -0
- cbpr_rules/rules/y2026/pacs_008_stp.py +369 -0
- cbpr_rules/rules/y2026/pacs_009.py +260 -0
- cbpr_rules/rules/y2026/pacs_009_adv.py +256 -0
- cbpr_rules/rules/y2026/pacs_009_cov.py +324 -0
- cbpr_rules/rules/y2026/pain_001.py +272 -0
- cbpr_rules/schema.py +97 -0
- cbpr_rules/validators/__init__.py +16 -0
- cbpr_rules/validators/bic.py +21 -0
- cbpr_rules/validators/country.py +11 -0
- cbpr_rules/validators/currency.py +11 -0
- cbpr_rules/validators/iban.py +26 -0
- cbpr_rules/validators/lei.py +17 -0
- cbpr_usage_rules-0.1.0.dist-info/METADATA +335 -0
- cbpr_usage_rules-0.1.0.dist-info/RECORD +48 -0
- cbpr_usage_rules-0.1.0.dist-info/WHEEL +5 -0
- cbpr_usage_rules-0.1.0.dist-info/entry_points.txt +2 -0
- cbpr_usage_rules-0.1.0.dist-info/licenses/LICENSE +21 -0
- cbpr_usage_rules-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,831 @@
|
|
|
1
|
+
"""CBPR+ SR2025 usage rules for pacs.004.001.09 (PaymentReturn).
|
|
2
|
+
|
|
3
|
+
Authored to mirror the pacs.008 reference module: shared combinators from
|
|
4
|
+
``helpers`` for the recurring presence/address/code patterns, bespoke
|
|
5
|
+
``fn(msg, report)`` checks for cross-field / cross-schema logic, and
|
|
6
|
+
``advisory`` registration for textual rules that are not mechanically
|
|
7
|
+
enforceable. Rule numbers, names and descriptions are taken from the
|
|
8
|
+
published guideline's Rules sheet; XML paths are the short ISO 20022 tags.
|
|
9
|
+
"""
|
|
10
|
+
from __future__ import annotations
|
|
11
|
+
|
|
12
|
+
import re
|
|
13
|
+
|
|
14
|
+
from ...registry import advisory, rule
|
|
15
|
+
from ...validators import is_valid_bic, is_valid_country, is_valid_currency, is_valid_lei
|
|
16
|
+
from ...helpers import (
|
|
17
|
+
address_hybrid,
|
|
18
|
+
address_lines_max_length,
|
|
19
|
+
bic_presence_exclusive,
|
|
20
|
+
business_msg_id_carries_group_id,
|
|
21
|
+
charges_required_when_amounts_differ,
|
|
22
|
+
code_in,
|
|
23
|
+
each_value_valid,
|
|
24
|
+
header_msg_def_id_matches,
|
|
25
|
+
mutually_exclusive,
|
|
26
|
+
no_postal_address_duplication,
|
|
27
|
+
not_matching_pattern,
|
|
28
|
+
presence_together,
|
|
29
|
+
required_when_absent,
|
|
30
|
+
requires_if_present,
|
|
31
|
+
)
|
|
32
|
+
from decimal import Decimal, InvalidOperation
|
|
33
|
+
|
|
34
|
+
MT = "pacs.004"
|
|
35
|
+
YEAR = 2025
|
|
36
|
+
ROOT = "/Document/PmtRtr"
|
|
37
|
+
TX = ROOT + "/TxInf"
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def reg(number, name, description, check):
|
|
41
|
+
"""Register a combinator-built check as a rule."""
|
|
42
|
+
rule(MT, YEAR, number, name, description)(check)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def _commodity_ccy(path):
|
|
46
|
+
"""@Ccy on an amount must not be a commodity code (XAU/XAG/XPD/XPT)."""
|
|
47
|
+
def check(msg, report):
|
|
48
|
+
for el, ccy in msg.attr_nodes(path, "Ccy"):
|
|
49
|
+
if ccy in {"XAU", "XAG", "XPD", "XPT"}:
|
|
50
|
+
report(el, detail=f"commodity currency '{ccy}' not allowed")
|
|
51
|
+
return check
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
# ---------------------------------------------------------------------------
|
|
55
|
+
# Bespoke cross-field / cross-schema rules
|
|
56
|
+
# ---------------------------------------------------------------------------
|
|
57
|
+
|
|
58
|
+
def _values_match(msg, report, path_a, path_b, label):
|
|
59
|
+
a_nodes = msg.find(path_a)
|
|
60
|
+
if not a_nodes:
|
|
61
|
+
return
|
|
62
|
+
b_vals = {msg.text_of(n) for n in msg.find(path_b)}
|
|
63
|
+
if not b_vals:
|
|
64
|
+
return
|
|
65
|
+
a_vals = {msg.text_of(n) for n in a_nodes}
|
|
66
|
+
if a_vals != b_vals:
|
|
67
|
+
report(a_nodes[0], detail=label)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
_BIC_PAIRS = [
|
|
71
|
+
("/AppHdr/Fr/FIId/FinInstnId/BICFI", TX + "/InstgAgt/FinInstnId/BICFI", "From vs Instructing Agent"),
|
|
72
|
+
("/AppHdr/To/FIId/FinInstnId/BICFI", TX + "/InstdAgt/FinInstnId/BICFI", "To vs Instructed Agent"),
|
|
73
|
+
]
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
@rule(MT, YEAR, "R1", 'CBPR_From_To_Instructing_Instructed_Agent_BIC_1_FormalRule',
|
|
77
|
+
'BAH "From" BIC must match "Instructing Agent" BIC, except where BAH CopyDuplicate = COPY or = CODU BAH "To" BIC must match "Instructed Agent" BIC, except where BAH CopyDuplicate = COPY or = CODU')
|
|
78
|
+
def _r1(msg, report):
|
|
79
|
+
if any(v in {"COPY", "CODU"} for v in msg.values("/AppHdr/CpyDplct")):
|
|
80
|
+
return
|
|
81
|
+
for a, b, label in _BIC_PAIRS:
|
|
82
|
+
_values_match(msg, report, a, b, label)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
@rule(MT, YEAR, "R2", 'CBPR_From_To_Instructing_Instructed_Agent_BIC_2_FormalRule',
|
|
86
|
+
'BAH "From" BIC must match "Instructing Agent" BIC if CopyDuplicate is absent. BAH "To" BIC must match "Instructed Agent" BIC if CopyDuplicate is absent.')
|
|
87
|
+
def _r2(msg, report):
|
|
88
|
+
if not msg.absent("/AppHdr/CpyDplct"):
|
|
89
|
+
return
|
|
90
|
+
for a, b, label in _BIC_PAIRS:
|
|
91
|
+
_values_match(msg, report, a, b, label)
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
@rule(MT, YEAR, "R11", 'CBPR_CRED_FormalRule',
|
|
95
|
+
'Charge information is mandatory if CRED is present – if no charges are taken, Zero must be used in "Amount" (any agent in the payment chain).')
|
|
96
|
+
def _r11(msg, report):
|
|
97
|
+
for tx in msg.each(TX):
|
|
98
|
+
cb = msg.values("ChrgBr", tx)
|
|
99
|
+
if cb and all(v == "CRED" for v in cb) and msg.absent("ChrgsInf", tx):
|
|
100
|
+
report(tx, detail="ChargesInformation required when ChargeBearer is CRED")
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
@rule(MT, YEAR, "R12", 'CBPR_Interbank_Settlement_Amount_FormalRule',
|
|
104
|
+
'If TransactionInformation/OriginalInterbankSettlementAmount is present, then OriginalTransactionReference/InterbankSettlementAmount must not be used.')
|
|
105
|
+
def _r12(msg, report):
|
|
106
|
+
for tx in msg.each(TX):
|
|
107
|
+
if msg.present("OrgnlIntrBkSttlmAmt", tx) and msg.present("OrgnlTxRef/IntrBkSttlmAmt", tx):
|
|
108
|
+
report(tx, detail="OriginalTransactionReference/InterbankSettlementAmount must be absent")
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
@rule(MT, YEAR, "R13", 'CBPR_Interbank_Settlement_Date_FormalRule',
|
|
112
|
+
'If TransactionInformation/OriginalInterbankSettlementDate is present, then OriginalTransactionReference/InterbankSettlementDate must not be used.')
|
|
113
|
+
def _r13(msg, report):
|
|
114
|
+
for tx in msg.each(TX):
|
|
115
|
+
if msg.present("OrgnlIntrBkSttlmDt", tx) and msg.present("OrgnlTxRef/IntrBkSttlmDt", tx):
|
|
116
|
+
report(tx, detail="OriginalTransactionReference/InterbankSettlementDate must be absent")
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
@rule(MT, YEAR, "R16", 'CBPR_Original_Message_Name_Identification_FormalRule',
|
|
120
|
+
'This element should be populated with either pacs.002.001.xx or pacs.008.001.xx or pacs.009.001.xx or camt.053.001.xx or camt.054.001.xx or MT103 or MT202 or MT205 or MT 900 or MT910 or MT940 or MT950 when present.')
|
|
121
|
+
def _r16(msg, report):
|
|
122
|
+
rx = re.compile(r'pacs\.00[289]\.001\.[0-9]{2}|camt\.05[34]\.001\.[0-9]{2}|MT103|MT202|MT205|MT900|MT910|MT940|MT950')
|
|
123
|
+
for node in msg.find(TX + "/OrgnlGrpInf/OrgnlMsgNmId"):
|
|
124
|
+
val = msg.text_of(node)
|
|
125
|
+
if val and not rx.fullmatch(val):
|
|
126
|
+
report(node, detail="OriginalMessageNameIdentification not an expected message identifier")
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
@rule(MT, YEAR, "R103", 'CBPR_Partial_Return_TextualRule',
|
|
130
|
+
'In case of Partial Return, the "ReturnReasonInformation/Additional information" must take the fixed value "PART" and the "ReturnReasonInformation/Reason" must be populated with a code from the External reason code list.')
|
|
131
|
+
def _r103(msg, report):
|
|
132
|
+
for tx in msg.each(TX):
|
|
133
|
+
orig = msg.find("OrgnlIntrBkSttlmAmt", tx)
|
|
134
|
+
rtrd = msg.find("RtrdIntrBkSttlmAmt", tx)
|
|
135
|
+
if not orig or not rtrd:
|
|
136
|
+
continue
|
|
137
|
+
o_ccy, r_ccy = orig[0].get("Ccy"), rtrd[0].get("Ccy")
|
|
138
|
+
if not o_ccy or o_ccy != r_ccy:
|
|
139
|
+
continue
|
|
140
|
+
try:
|
|
141
|
+
ov = Decimal(msg.text_of(orig[0]))
|
|
142
|
+
rv = Decimal(msg.text_of(rtrd[0]))
|
|
143
|
+
except (InvalidOperation, ValueError):
|
|
144
|
+
continue
|
|
145
|
+
# Partial return only detectable when the returned amount is strictly
|
|
146
|
+
# less than the original amount in the same currency.
|
|
147
|
+
if rv >= ov:
|
|
148
|
+
continue
|
|
149
|
+
addtl = [msg.text_of(n) for n in msg.find("RtrRsnInf/AddtlInf", tx)]
|
|
150
|
+
if not addtl or not any(v == "PART" for v in addtl):
|
|
151
|
+
report(tx, detail='ReturnReasonInformation/AdditionalInformation must be "PART" for a partial return')
|
|
152
|
+
elif msg.absent("RtrRsnInf/Rsn", tx):
|
|
153
|
+
report(tx, detail="ReturnReasonInformation/Reason must be populated for a partial return")
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
# ---------------------------------------------------------------------------
|
|
157
|
+
# Formal rules implemented with shared combinators
|
|
158
|
+
# ---------------------------------------------------------------------------
|
|
159
|
+
|
|
160
|
+
reg('R4', 'CBPR_Business_Message_Identifier_TextualRule',
|
|
161
|
+
'The Business Message Identifier must contain the Message Identification element from the Group Header of the underlying message, where available.',
|
|
162
|
+
business_msg_id_carries_group_id())
|
|
163
|
+
|
|
164
|
+
reg('R5', 'CBPR_Message_Definition_Identifier_TextualRule',
|
|
165
|
+
'The Message Definition Identifier must be formatted exactly as it appears in the namespace of the Business Message instance.',
|
|
166
|
+
header_msg_def_id_matches())
|
|
167
|
+
|
|
168
|
+
reg('R25', 'CBPR_Returned_Instructed_Rule_1_TextualRule',
|
|
169
|
+
'If ReturnedInstructedAmount and ReturnedInterbankSettlementAmount are expressed in the same currency and differ, Charge Information becomes mandatory.',
|
|
170
|
+
charges_required_when_amounts_differ(TX, "RtrdInstdAmt", "RtrdIntrBkSttlmAmt", "ChrgsInf"))
|
|
171
|
+
|
|
172
|
+
reg('R35', 'CBPR_Duplication_Postal_Address_TextualRule',
|
|
173
|
+
'Data present in structured elements within the Postal Address must not, under any circumstances be repeated in AddressLine.',
|
|
174
|
+
no_postal_address_duplication())
|
|
175
|
+
|
|
176
|
+
reg('R46', 'CBPR_Debtor_BIC_Presence_TextualRule',
|
|
177
|
+
'If Any BIC is present, then (Name and Postal Address) is NOT allowed (other elements remain optional).',
|
|
178
|
+
bic_presence_exclusive('/Document/PmtRtr/TxInf/RtrChain/Dbtr/Pty'))
|
|
179
|
+
|
|
180
|
+
reg('R92', 'CBPR_Creditor_BIC_Presence_TextualRule',
|
|
181
|
+
'If Any BIC is present, then (Name and Postal Address) is NOT allowed (other elements remain optional).',
|
|
182
|
+
bic_presence_exclusive('/Document/PmtRtr/TxInf/RtrChain/Cdtr/Pty'))
|
|
183
|
+
|
|
184
|
+
reg('R18', 'CBPR_Original_Instruction_Identification_FormalRule',
|
|
185
|
+
"This field must not start or end with a slash '/' and must not contain two consecutive slashes '//'.",
|
|
186
|
+
not_matching_pattern('/Document/PmtRtr/TxInf/OrgnlInstrId', r"(/.*)|(.*/)|(.*//.*)"))
|
|
187
|
+
|
|
188
|
+
reg('R23', 'CBPR_Interbank_Settlement_Currency_FormalRule',
|
|
189
|
+
'The codes XAU, XAG, XPD and XPT are not allowed, as these are codes are only used for commodities.',
|
|
190
|
+
_commodity_ccy('/Document/PmtRtr/TxInf/OrgnlIntrBkSttlmAmt'))
|
|
191
|
+
|
|
192
|
+
reg('R24', 'CBPR_Returned_Interbank_Settlement_Currency_FormalRule',
|
|
193
|
+
'The codes XAU, XAG, XPD and XPT are not allowed, as these are codes are only used for commodities.',
|
|
194
|
+
_commodity_ccy('/Document/PmtRtr/TxInf/RtrdIntrBkSttlmAmt'))
|
|
195
|
+
|
|
196
|
+
reg('R32', 'CBPR_Agent_Name_Postal_Address_FormalRule',
|
|
197
|
+
'Name and Address must always be present together.',
|
|
198
|
+
presence_together('/Document/PmtRtr/TxInf/ChrgsInf/Agt/FinInstnId', "Nm", "PstlAdr"))
|
|
199
|
+
|
|
200
|
+
reg('R33', 'CBPR_GracePeriod_Structured_FormalRule',
|
|
201
|
+
'If Postal Address is used, and if Address Line is absent, then Town Name and Country must be present.',
|
|
202
|
+
required_when_absent('/Document/PmtRtr/TxInf/ChrgsInf/Agt/FinInstnId/PstlAdr', "AdrLine", ["TwnNm", "Ctry"]))
|
|
203
|
+
|
|
204
|
+
reg('R34', 'CBPR_GracePeriod_Hybrid_FormalRule',
|
|
205
|
+
'If Address Line is present and any other Postal Address element(s) are present, then Town Name and Country are mandatory in Postal Address and a maximum of two occurrences of Address Line are allowed.',
|
|
206
|
+
address_hybrid('/Document/PmtRtr/TxInf/ChrgsInf/Agt/FinInstnId/PstlAdr'))
|
|
207
|
+
|
|
208
|
+
reg('R36', 'CBPR_GracePeriod_Unstructured_FormalRule',
|
|
209
|
+
'If Postal Address is present and if no other element than Address Line is present then every occurrence of Address Line must not exceed 35 characters.',
|
|
210
|
+
address_lines_max_length('/Document/PmtRtr/TxInf/ChrgsInf/Agt/FinInstnId/PstlAdr', 35))
|
|
211
|
+
|
|
212
|
+
reg('R37', 'CBPR_Party_Name_Postal_Address_FormalRule',
|
|
213
|
+
'If Postal Address is present then Name is mandatory.',
|
|
214
|
+
requires_if_present('/Document/PmtRtr/TxInf/RtrChain/UltmtDbtr/Pty', "PstlAdr", "Nm"))
|
|
215
|
+
|
|
216
|
+
reg('R44', 'CBPR_Party_Name_Any_BIC_FormalRule',
|
|
217
|
+
'If AnyBIC is absent then Name is mandatory and it is recommended to also provide the Postal Address.',
|
|
218
|
+
required_when_absent('/Document/PmtRtr/TxInf/RtrChain/Dbtr/Pty', "Id/OrgId/AnyBIC", ["Nm"]))
|
|
219
|
+
|
|
220
|
+
reg('R45', 'CBPR_Party_Name_Postal_Address_FormalRule',
|
|
221
|
+
'If Postal Address is present then Name is mandatory.',
|
|
222
|
+
requires_if_present('/Document/PmtRtr/TxInf/RtrChain/Dbtr/Pty', "PstlAdr", "Nm"))
|
|
223
|
+
|
|
224
|
+
reg('R47', 'CBPR_GracePeriod_Structured_FormalRule',
|
|
225
|
+
'If Postal Address is used, and if Address Line is absent, then Town Name and Country must be present.',
|
|
226
|
+
required_when_absent('/Document/PmtRtr/TxInf/RtrChain/Dbtr/Pty/PstlAdr', "AdrLine", ["TwnNm", "Ctry"]))
|
|
227
|
+
|
|
228
|
+
reg('R48', 'CBPR_GracePeriod_Hybrid_FormalRule',
|
|
229
|
+
'If Address Line is present and any other Postal Address element(s) are present, then Town Name and Country are mandatory in Postal Address and a maximum of two occurrences of Address Line are allowed.',
|
|
230
|
+
address_hybrid('/Document/PmtRtr/TxInf/RtrChain/Dbtr/Pty/PstlAdr'))
|
|
231
|
+
|
|
232
|
+
reg('R49', 'CBPR_GracePeriod_Unstructured_FormalRule',
|
|
233
|
+
'If Postal Address is present and if no other element than Address Line is present then every occurrence of Address Line must not exceed 35 characters.',
|
|
234
|
+
address_lines_max_length('/Document/PmtRtr/TxInf/RtrChain/Dbtr/Pty/PstlAdr', 35))
|
|
235
|
+
|
|
236
|
+
reg('R50', 'CBPR_Agent_Name_Postal_Address_FormalRule',
|
|
237
|
+
'Name and Address must always be present together.',
|
|
238
|
+
presence_together('/Document/PmtRtr/TxInf/RtrChain/Dbtr/Agt/FinInstnId', "Nm", "PstlAdr"))
|
|
239
|
+
|
|
240
|
+
reg('R51', 'CBPR_GracePeriod_Structured_FormalRule',
|
|
241
|
+
'If Postal Address is used, and if Address Line is absent, then Town Name and Country must be present.',
|
|
242
|
+
required_when_absent('/Document/PmtRtr/TxInf/RtrChain/Dbtr/Agt/FinInstnId/PstlAdr', "AdrLine", ["TwnNm", "Ctry"]))
|
|
243
|
+
|
|
244
|
+
reg('R52', 'CBPR_GracePeriod_Hybrid_FormalRule',
|
|
245
|
+
'If Address Line is present and any other Postal Address element(s) are present, then Town Name and Country are mandatory in Postal Address and a maximum of two occurrences of Address Line are allowed.',
|
|
246
|
+
address_hybrid('/Document/PmtRtr/TxInf/RtrChain/Dbtr/Agt/FinInstnId/PstlAdr'))
|
|
247
|
+
|
|
248
|
+
reg('R53', 'CBPR_GracePeriod_Unstructured_FormalRule',
|
|
249
|
+
'If Postal Address is present and if no other element than Address Line is present then every occurrence of Address Line must not exceed 35 characters.',
|
|
250
|
+
address_lines_max_length('/Document/PmtRtr/TxInf/RtrChain/Dbtr/Agt/FinInstnId/PstlAdr', 35))
|
|
251
|
+
|
|
252
|
+
reg('R54', 'CBPR_Party_Name_Postal_Address_FormalRule',
|
|
253
|
+
'If Postal Address is present then Name is mandatory.',
|
|
254
|
+
requires_if_present('/Document/PmtRtr/TxInf/RtrChain/InitgPty/Pty', "PstlAdr", "Nm"))
|
|
255
|
+
|
|
256
|
+
reg('R55', 'CBPR_Agent_Name_Postal_Address_FormalRule',
|
|
257
|
+
'Name and Address must always be present together.',
|
|
258
|
+
presence_together('/Document/PmtRtr/TxInf/RtrChain/DbtrAgt/FinInstnId', "Nm", "PstlAdr"))
|
|
259
|
+
|
|
260
|
+
reg('R56', 'CBPR_GracePeriod_Structured_FormalRule',
|
|
261
|
+
'If Postal Address is used, and if Address Line is absent, then Town Name and Country must be present.',
|
|
262
|
+
required_when_absent('/Document/PmtRtr/TxInf/RtrChain/DbtrAgt/FinInstnId/PstlAdr', "AdrLine", ["TwnNm", "Ctry"]))
|
|
263
|
+
|
|
264
|
+
reg('R57', 'CBPR_GracePeriod_Hybrid_FormalRule',
|
|
265
|
+
'If Address Line is present and any other Postal Address element(s) are present, then Town Name and Country are mandatory in Postal Address and a maximum of two occurrences of Address Line are allowed.',
|
|
266
|
+
address_hybrid('/Document/PmtRtr/TxInf/RtrChain/DbtrAgt/FinInstnId/PstlAdr'))
|
|
267
|
+
|
|
268
|
+
reg('R58', 'CBPR_GracePeriod_Unstructured_FormalRule',
|
|
269
|
+
'If Postal Address is present and if no other element than Address Line is present then every occurrence of Address Line must not exceed 35 characters.',
|
|
270
|
+
address_lines_max_length('/Document/PmtRtr/TxInf/RtrChain/DbtrAgt/FinInstnId/PstlAdr', 35))
|
|
271
|
+
|
|
272
|
+
reg('R59', 'CBPR_Agent_Name_Postal_Address_FormalRule',
|
|
273
|
+
'Name and Address must always be present together.',
|
|
274
|
+
presence_together('/Document/PmtRtr/TxInf/RtrChain/PrvsInstgAgt1/FinInstnId', "Nm", "PstlAdr"))
|
|
275
|
+
|
|
276
|
+
reg('R60', 'CBPR_GracePeriod_Structured_FormalRule',
|
|
277
|
+
'If Postal Address is used, and if Address Line is absent, then Town Name and Country must be present.',
|
|
278
|
+
required_when_absent('/Document/PmtRtr/TxInf/RtrChain/PrvsInstgAgt1/FinInstnId/PstlAdr', "AdrLine", ["TwnNm", "Ctry"]))
|
|
279
|
+
|
|
280
|
+
reg('R61', 'CBPR_GracePeriod_Hybrid_FormalRule',
|
|
281
|
+
'If Address Line is present and any other Postal Address element(s) are present, then Town Name and Country are mandatory in Postal Address and a maximum of two occurrences of Address Line are allowed.',
|
|
282
|
+
address_hybrid('/Document/PmtRtr/TxInf/RtrChain/PrvsInstgAgt1/FinInstnId/PstlAdr'))
|
|
283
|
+
|
|
284
|
+
reg('R62', 'CBPR_GracePeriod_Unstructured_FormalRule',
|
|
285
|
+
'If Postal Address is present and if no other element than Address Line is present then every occurrence of Address Line must not exceed 35 characters.',
|
|
286
|
+
address_lines_max_length('/Document/PmtRtr/TxInf/RtrChain/PrvsInstgAgt1/FinInstnId/PstlAdr', 35))
|
|
287
|
+
|
|
288
|
+
reg('R63', 'CBPR_Agent_Name_Postal_Address_FormalRule',
|
|
289
|
+
'Name and Address must always be present together.',
|
|
290
|
+
presence_together('/Document/PmtRtr/TxInf/RtrChain/PrvsInstgAgt2/FinInstnId', "Nm", "PstlAdr"))
|
|
291
|
+
|
|
292
|
+
reg('R64', 'CBPR_GracePeriod_Structured_FormalRule',
|
|
293
|
+
'If Postal Address is used, and if Address Line is absent, then Town Name and Country must be present.',
|
|
294
|
+
required_when_absent('/Document/PmtRtr/TxInf/RtrChain/PrvsInstgAgt2/FinInstnId/PstlAdr', "AdrLine", ["TwnNm", "Ctry"]))
|
|
295
|
+
|
|
296
|
+
reg('R65', 'CBPR_GracePeriod_Hybrid_FormalRule',
|
|
297
|
+
'If Address Line is present and any other Postal Address element(s) are present, then Town Name and Country are mandatory in Postal Address and a maximum of two occurrences of Address Line are allowed.',
|
|
298
|
+
address_hybrid('/Document/PmtRtr/TxInf/RtrChain/PrvsInstgAgt2/FinInstnId/PstlAdr'))
|
|
299
|
+
|
|
300
|
+
reg('R66', 'CBPR_GracePeriod_Unstructured_FormalRule',
|
|
301
|
+
'If Postal Address is present and if no other element than Address Line is present then every occurrence of Address Line must not exceed 35 characters.',
|
|
302
|
+
address_lines_max_length('/Document/PmtRtr/TxInf/RtrChain/PrvsInstgAgt2/FinInstnId/PstlAdr', 35))
|
|
303
|
+
|
|
304
|
+
reg('R67', 'CBPR_Agent_Name_Postal_Address_FormalRule',
|
|
305
|
+
'Name and Address must always be present together.',
|
|
306
|
+
presence_together('/Document/PmtRtr/TxInf/RtrChain/PrvsInstgAgt3/FinInstnId', "Nm", "PstlAdr"))
|
|
307
|
+
|
|
308
|
+
reg('R68', 'CBPR_GracePeriod_Structured_FormalRule',
|
|
309
|
+
'If Postal Address is used, and if Address Line is absent, then Town Name and Country must be present.',
|
|
310
|
+
required_when_absent('/Document/PmtRtr/TxInf/RtrChain/PrvsInstgAgt3/FinInstnId/PstlAdr', "AdrLine", ["TwnNm", "Ctry"]))
|
|
311
|
+
|
|
312
|
+
reg('R69', 'CBPR_GracePeriod_Hybrid_FormalRule',
|
|
313
|
+
'If Address Line is present and any other Postal Address element(s) are present, then Town Name and Country are mandatory in Postal Address and a maximum of two occurrences of Address Line are allowed.',
|
|
314
|
+
address_hybrid('/Document/PmtRtr/TxInf/RtrChain/PrvsInstgAgt3/FinInstnId/PstlAdr'))
|
|
315
|
+
|
|
316
|
+
reg('R70', 'CBPR_GracePeriod_Unstructured_FormalRule',
|
|
317
|
+
'If Postal Address is present and if no other element than Address Line is present then every occurrence of Address Line must not exceed 35 characters.',
|
|
318
|
+
address_lines_max_length('/Document/PmtRtr/TxInf/RtrChain/PrvsInstgAgt3/FinInstnId/PstlAdr', 35))
|
|
319
|
+
|
|
320
|
+
reg('R71', 'CBPR_Agent_Name_Postal_Address_FormalRule',
|
|
321
|
+
'Name and Address must always be present together.',
|
|
322
|
+
presence_together('/Document/PmtRtr/TxInf/RtrChain/IntrmyAgt1/FinInstnId', "Nm", "PstlAdr"))
|
|
323
|
+
|
|
324
|
+
reg('R72', 'CBPR_GracePeriod_Structured_FormalRule',
|
|
325
|
+
'If Postal Address is used, and if Address Line is absent, then Town Name and Country must be present.',
|
|
326
|
+
required_when_absent('/Document/PmtRtr/TxInf/RtrChain/IntrmyAgt1/FinInstnId/PstlAdr', "AdrLine", ["TwnNm", "Ctry"]))
|
|
327
|
+
|
|
328
|
+
reg('R73', 'CBPR_GracePeriod_Hybrid_FormalRule',
|
|
329
|
+
'If Address Line is present and any other Postal Address element(s) are present, then Town Name and Country are mandatory in Postal Address and a maximum of two occurrences of Address Line are allowed.',
|
|
330
|
+
address_hybrid('/Document/PmtRtr/TxInf/RtrChain/IntrmyAgt1/FinInstnId/PstlAdr'))
|
|
331
|
+
|
|
332
|
+
reg('R74', 'CBPR_GracePeriod_Unstructured_FormalRule',
|
|
333
|
+
'If Postal Address is present and if no other element than Address Line is present then every occurrence of Address Line must not exceed 35 characters.',
|
|
334
|
+
address_lines_max_length('/Document/PmtRtr/TxInf/RtrChain/IntrmyAgt1/FinInstnId/PstlAdr', 35))
|
|
335
|
+
|
|
336
|
+
reg('R75', 'CBPR_Agent_Name_Postal_Address_FormalRule',
|
|
337
|
+
'Name and Address must always be present together.',
|
|
338
|
+
presence_together('/Document/PmtRtr/TxInf/RtrChain/IntrmyAgt2/FinInstnId', "Nm", "PstlAdr"))
|
|
339
|
+
|
|
340
|
+
reg('R76', 'CBPR_GracePeriod_Structured_FormalRule',
|
|
341
|
+
'If Postal Address is used, and if Address Line is absent, then Town Name and Country must be present.',
|
|
342
|
+
required_when_absent('/Document/PmtRtr/TxInf/RtrChain/IntrmyAgt2/FinInstnId/PstlAdr', "AdrLine", ["TwnNm", "Ctry"]))
|
|
343
|
+
|
|
344
|
+
reg('R77', 'CBPR_GracePeriod_Hybrid_FormalRule',
|
|
345
|
+
'If Address Line is present and any other Postal Address element(s) are present, then Town Name and Country are mandatory in Postal Address and a maximum of two occurrences of Address Line are allowed.',
|
|
346
|
+
address_hybrid('/Document/PmtRtr/TxInf/RtrChain/IntrmyAgt2/FinInstnId/PstlAdr'))
|
|
347
|
+
|
|
348
|
+
reg('R78', 'CBPR_GracePeriod_Unstructured_FormalRule',
|
|
349
|
+
'If Postal Address is present and if no other element than Address Line is present then every occurrence of Address Line must not exceed 35 characters.',
|
|
350
|
+
address_lines_max_length('/Document/PmtRtr/TxInf/RtrChain/IntrmyAgt2/FinInstnId/PstlAdr', 35))
|
|
351
|
+
|
|
352
|
+
reg('R79', 'CBPR_Agent_Name_Postal_Address_FormalRule',
|
|
353
|
+
'Name and Address must always be present together.',
|
|
354
|
+
presence_together('/Document/PmtRtr/TxInf/RtrChain/IntrmyAgt3/FinInstnId', "Nm", "PstlAdr"))
|
|
355
|
+
|
|
356
|
+
reg('R80', 'CBPR_GracePeriod_Structured_FormalRule',
|
|
357
|
+
'If Postal Address is used, and if Address Line is absent, then Town Name and Country must be present.',
|
|
358
|
+
required_when_absent('/Document/PmtRtr/TxInf/RtrChain/IntrmyAgt3/FinInstnId/PstlAdr', "AdrLine", ["TwnNm", "Ctry"]))
|
|
359
|
+
|
|
360
|
+
reg('R81', 'CBPR_GracePeriod_Hybrid_FormalRule',
|
|
361
|
+
'If Address Line is present and any other Postal Address element(s) are present, then Town Name and Country are mandatory in Postal Address and a maximum of two occurrences of Address Line are allowed.',
|
|
362
|
+
address_hybrid('/Document/PmtRtr/TxInf/RtrChain/IntrmyAgt3/FinInstnId/PstlAdr'))
|
|
363
|
+
|
|
364
|
+
reg('R82', 'CBPR_GracePeriod_Unstructured_FormalRule',
|
|
365
|
+
'If Postal Address is present and if no other element than Address Line is present then every occurrence of Address Line must not exceed 35 characters.',
|
|
366
|
+
address_lines_max_length('/Document/PmtRtr/TxInf/RtrChain/IntrmyAgt3/FinInstnId/PstlAdr', 35))
|
|
367
|
+
|
|
368
|
+
reg('R83', 'CBPR_Agent_Name_Postal_Address_FormalRule',
|
|
369
|
+
'Name and Address must always be present together.',
|
|
370
|
+
presence_together('/Document/PmtRtr/TxInf/RtrChain/CdtrAgt/FinInstnId', "Nm", "PstlAdr"))
|
|
371
|
+
|
|
372
|
+
reg('R84', 'CBPR_GracePeriod_Structured_FormalRule',
|
|
373
|
+
'If Postal Address is used, and if Address Line is absent, then Town Name and Country must be present.',
|
|
374
|
+
required_when_absent('/Document/PmtRtr/TxInf/RtrChain/CdtrAgt/FinInstnId/PstlAdr', "AdrLine", ["TwnNm", "Ctry"]))
|
|
375
|
+
|
|
376
|
+
reg('R85', 'CBPR_GracePeriod_Hybrid_FormalRule',
|
|
377
|
+
'If Address Line is present and any other Postal Address element(s) are present, then Town Name and Country are mandatory in Postal Address and a maximum of two occurrences of Address Line are allowed.',
|
|
378
|
+
address_hybrid('/Document/PmtRtr/TxInf/RtrChain/CdtrAgt/FinInstnId/PstlAdr'))
|
|
379
|
+
|
|
380
|
+
reg('R86', 'CBPR_GracePeriod_Unstructured_FormalRule',
|
|
381
|
+
'If Postal Address is present and if no other element than Address Line is present then every occurrence of Address Line must not exceed 35 characters.',
|
|
382
|
+
address_lines_max_length('/Document/PmtRtr/TxInf/RtrChain/CdtrAgt/FinInstnId/PstlAdr', 35))
|
|
383
|
+
|
|
384
|
+
reg('R87', 'CBPR_Party_Name_Any_BIC_FormalRule',
|
|
385
|
+
'If AnyBIC is absent then Name is mandatory and it is recommended to also provide the Postal Address.',
|
|
386
|
+
required_when_absent('/Document/PmtRtr/TxInf/RtrChain/Cdtr/Pty', "Id/OrgId/AnyBIC", ["Nm"]))
|
|
387
|
+
|
|
388
|
+
reg('R91', 'CBPR_Party_Name_Postal_Address_FormalRule',
|
|
389
|
+
'If Postal Address is present then Name is mandatory.',
|
|
390
|
+
requires_if_present('/Document/PmtRtr/TxInf/RtrChain/Cdtr/Pty', "PstlAdr", "Nm"))
|
|
391
|
+
|
|
392
|
+
reg('R93', 'CBPR_GracePeriod_Structured_FormalRule',
|
|
393
|
+
'If “PostalAddress” is used, and if AddressLine is absent, then Country and Town name must be present.',
|
|
394
|
+
required_when_absent('/Document/PmtRtr/TxInf/RtrChain/Cdtr/Pty/PstlAdr', "AdrLine", ["TwnNm", "Ctry"]))
|
|
395
|
+
|
|
396
|
+
reg('R94', 'CBPR_GracePeriod_Hybrid_FormalRule',
|
|
397
|
+
'If Address Line is present and any other Postal Address element(s) are present, then Town Name and Country are mandatory in Postal Address and a maximum of two occurrences of Address Line are allowed.',
|
|
398
|
+
address_hybrid('/Document/PmtRtr/TxInf/RtrChain/Cdtr/Pty/PstlAdr'))
|
|
399
|
+
|
|
400
|
+
reg('R95', 'CBPR_GracePeriod_Unstructured_FormalRule',
|
|
401
|
+
'If Postal Address is present and if no other element than Address Line is present then every occurrence of Address Line must not exceed 35 characters.',
|
|
402
|
+
address_lines_max_length('/Document/PmtRtr/TxInf/RtrChain/Cdtr/Pty/PstlAdr', 35))
|
|
403
|
+
|
|
404
|
+
reg('R96', 'CBPR_Agent_Name_Postal_Address_FormalRule',
|
|
405
|
+
'Name and Address must always be present together.',
|
|
406
|
+
presence_together('/Document/PmtRtr/TxInf/RtrChain/Cdtr/Agt/FinInstnId', "Nm", "PstlAdr"))
|
|
407
|
+
|
|
408
|
+
reg('R97', 'CBPR_GracePeriod_Structured_FormalRule',
|
|
409
|
+
'If Postal Address is used, and if Address Line is absent, then Town Name and Country must be present.',
|
|
410
|
+
required_when_absent('/Document/PmtRtr/TxInf/RtrChain/Cdtr/Agt/FinInstnId/PstlAdr', "AdrLine", ["TwnNm", "Ctry"]))
|
|
411
|
+
|
|
412
|
+
reg('R98', 'CBPR_GracePeriod_Hybrid_FormalRule',
|
|
413
|
+
'If Address Line is present and any other Postal Address element(s) are present, then Town Name and Country are mandatory in Postal Address and a maximum of two occurrences of Address Line are allowed.',
|
|
414
|
+
address_hybrid('/Document/PmtRtr/TxInf/RtrChain/Cdtr/Agt/FinInstnId/PstlAdr'))
|
|
415
|
+
|
|
416
|
+
reg('R99', 'CBPR_GracePeriod_Unstructured_FormalRule',
|
|
417
|
+
'If Postal Address is present and if no other element than Address Line is present then every occurrence of Address Line must not exceed 35 characters.',
|
|
418
|
+
address_lines_max_length('/Document/PmtRtr/TxInf/RtrChain/Cdtr/Agt/FinInstnId/PstlAdr', 35))
|
|
419
|
+
|
|
420
|
+
reg('R102', 'CBPR_Party_Name_Postal_Address_FormalRule',
|
|
421
|
+
'If Postal Address is present then Name is mandatory.',
|
|
422
|
+
requires_if_present('/Document/PmtRtr/TxInf/RtrChain/UltmtCdtr/Pty', "PstlAdr", "Nm"))
|
|
423
|
+
|
|
424
|
+
reg('R104', 'CBPR_Party_Name_Any_BIC_FormalRule',
|
|
425
|
+
'If AnyBIC is absent, then Name is mandatory.',
|
|
426
|
+
required_when_absent('/Document/PmtRtr/TxInf/RtrRsnInf/Orgtr', "Id/OrgId/AnyBIC", ["Nm"]))
|
|
427
|
+
|
|
428
|
+
reg('R105', 'CBPR_Party_Name_Postal_Address_FormalRule',
|
|
429
|
+
'If Postal Address is present then Name is mandatory.',
|
|
430
|
+
requires_if_present('/Document/PmtRtr/TxInf/RtrRsnInf/Orgtr', "PstlAdr", "Nm"))
|
|
431
|
+
|
|
432
|
+
reg('R107', 'CBPR_GracePeriod_Structured_FormalRule',
|
|
433
|
+
'If Postal Address is used, and if Address Line is absent, then Town Name and Country must be present.',
|
|
434
|
+
required_when_absent('/Document/PmtRtr/TxInf/RtrRsnInf/Orgtr/PstlAdr', "AdrLine", ["TwnNm", "Ctry"]))
|
|
435
|
+
|
|
436
|
+
reg('R108', 'CBPR_GracePeriod_Hybrid_FormalRule',
|
|
437
|
+
'If Address Line is present and any other Postal Address element(s) are present, then Town Name and Country are mandatory in Postal Address and a maximum of two occurrences of Address Line are allowed.',
|
|
438
|
+
address_hybrid('/Document/PmtRtr/TxInf/RtrRsnInf/Orgtr/PstlAdr'))
|
|
439
|
+
|
|
440
|
+
reg('R109', 'CBPR_GracePeriod_Unstructured_FormalRule',
|
|
441
|
+
'If Postal Address is present and if no other element than Address Line is present then every occurrence of Address Line must not exceed 35 characters.',
|
|
442
|
+
address_lines_max_length('/Document/PmtRtr/TxInf/RtrRsnInf/Orgtr/PstlAdr', 35))
|
|
443
|
+
|
|
444
|
+
reg('R111', 'CBPR_Interbank_Settlement_Currency_FormalRule',
|
|
445
|
+
'The codes XAU, XAG, XPD and XPT are not allowed, as these are codes are only used for commodities.',
|
|
446
|
+
_commodity_ccy('/Document/PmtRtr/TxInf/OrgnlTxRef/IntrBkSttlmAmt'))
|
|
447
|
+
|
|
448
|
+
reg('R112', 'CBPR_GracePeriod_Structured_FormalRule',
|
|
449
|
+
'If Postal Address is used, and if Address Line is absent, then Town Name and Country must be present.',
|
|
450
|
+
required_when_absent('/Document/PmtRtr/TxInf/OrgnlTxRef/CdtrSchmeId/PstlAdr', "AdrLine", ["TwnNm", "Ctry"]))
|
|
451
|
+
|
|
452
|
+
reg('R113', 'CBPR_GracePeriod_Hybrid_FormalRule',
|
|
453
|
+
'If Address Line is present and any other Postal Address element(s) are present, then Town Name and Country are mandatory in Postal Address and a maximum of two occurrences of Address Line are allowed.',
|
|
454
|
+
address_hybrid('/Document/PmtRtr/TxInf/OrgnlTxRef/CdtrSchmeId/PstlAdr'))
|
|
455
|
+
|
|
456
|
+
reg('R114', 'CBPR_GracePeriod_Unstructured_FormalRule',
|
|
457
|
+
'If Postal Address is present and if no other element than Address Line is present then every occurrence of Address Line must not exceed 35 characters.',
|
|
458
|
+
address_lines_max_length('/Document/PmtRtr/TxInf/OrgnlTxRef/CdtrSchmeId/PstlAdr', 35))
|
|
459
|
+
|
|
460
|
+
reg('R116', 'CBPR_Name_Postal_Address_FormalRule',
|
|
461
|
+
'Name and Address must always be present together.',
|
|
462
|
+
presence_together('/Document/PmtRtr/TxInf/OrgnlTxRef/SttlmInf/InstgRmbrsmntAgt/FinInstnId', "Nm", "PstlAdr"))
|
|
463
|
+
|
|
464
|
+
reg('R117', 'CBPR_GracePeriod_Structured_FormalRule',
|
|
465
|
+
'If “PostalAddress” is used, and if AddressLine is absent, then Country and Town Name must be present.',
|
|
466
|
+
required_when_absent('/Document/PmtRtr/TxInf/OrgnlTxRef/SttlmInf/InstgRmbrsmntAgt/FinInstnId/PstlAdr', "AdrLine", ["TwnNm", "Ctry"]))
|
|
467
|
+
|
|
468
|
+
reg('R118', 'CBPR_GracePeriod_Hybrid_FormalRule',
|
|
469
|
+
'If Address Line is present and any other Postal Address element(s) are present, then Town Name and Country are mandatory in Postal Address and a maximum of two occurrences of Address Line are allowed.',
|
|
470
|
+
address_hybrid('/Document/PmtRtr/TxInf/OrgnlTxRef/SttlmInf/InstgRmbrsmntAgt/FinInstnId/PstlAdr'))
|
|
471
|
+
|
|
472
|
+
reg('R119', 'CBPR_GracePeriod_Unstructured_FormalRule',
|
|
473
|
+
'If Postal Address is present and if no other element than Address Line is present then every occurrence of Address Line must not exceed 35 characters.',
|
|
474
|
+
address_lines_max_length('/Document/PmtRtr/TxInf/OrgnlTxRef/SttlmInf/InstgRmbrsmntAgt/FinInstnId/PstlAdr', 35))
|
|
475
|
+
|
|
476
|
+
reg('R120', 'CBPR_Name_Postal_Address_FormalRule',
|
|
477
|
+
'Name and Address must always be present together.',
|
|
478
|
+
presence_together('/Document/PmtRtr/TxInf/OrgnlTxRef/SttlmInf/InstdRmbrsmntAgt/FinInstnId', "Nm", "PstlAdr"))
|
|
479
|
+
|
|
480
|
+
reg('R121', 'CBPR_GracePeriod_Structured_FormalRule',
|
|
481
|
+
'If “PostalAddress” is used, and if AddressLine is absent, then Country and Town Name must be present.',
|
|
482
|
+
required_when_absent('/Document/PmtRtr/TxInf/OrgnlTxRef/SttlmInf/InstdRmbrsmntAgt/FinInstnId/PstlAdr', "AdrLine", ["TwnNm", "Ctry"]))
|
|
483
|
+
|
|
484
|
+
reg('R122', 'CBPR_GracePeriod_Hybrid_FormalRule',
|
|
485
|
+
'If Address Line is present and any other Postal Address element(s) are present, then Town Name and Country are mandatory in Postal Address and a maximum of two occurrences of Address Line are allowed.',
|
|
486
|
+
address_hybrid('/Document/PmtRtr/TxInf/OrgnlTxRef/SttlmInf/InstdRmbrsmntAgt/FinInstnId/PstlAdr'))
|
|
487
|
+
|
|
488
|
+
reg('R123', 'CBPR_GracePeriod_Unstructured_FormalRule',
|
|
489
|
+
'If Postal Address is present and if no other element than Address Line is present then every occurrence of Address Line must not exceed 35 characters.',
|
|
490
|
+
address_lines_max_length('/Document/PmtRtr/TxInf/OrgnlTxRef/SttlmInf/InstdRmbrsmntAgt/FinInstnId/PstlAdr', 35))
|
|
491
|
+
|
|
492
|
+
reg('R124', 'CBPR_Name_Postal_Address_FormalRule',
|
|
493
|
+
'Name and Address must always be present together.',
|
|
494
|
+
presence_together('/Document/PmtRtr/TxInf/OrgnlTxRef/SttlmInf/ThrdRmbrsmntAgt/FinInstnId', "Nm", "PstlAdr"))
|
|
495
|
+
|
|
496
|
+
reg('R125', 'CBPR_GracePeriod_Structured_FormalRule',
|
|
497
|
+
'If “PostalAddress” is used, and if AddressLine is absent, then Country and Town Name must be present.',
|
|
498
|
+
required_when_absent('/Document/PmtRtr/TxInf/OrgnlTxRef/SttlmInf/ThrdRmbrsmntAgt/FinInstnId/PstlAdr', "AdrLine", ["TwnNm", "Ctry"]))
|
|
499
|
+
|
|
500
|
+
reg('R126', 'CBPR_GracePeriod_Hybrid_FormalRule',
|
|
501
|
+
'If Address Line is present and any other Postal Address element(s) are present, then Town Name and Country are mandatory in Postal Address and a maximum of two occurrences of Address Line are allowed.',
|
|
502
|
+
address_hybrid('/Document/PmtRtr/TxInf/OrgnlTxRef/SttlmInf/ThrdRmbrsmntAgt/FinInstnId/PstlAdr'))
|
|
503
|
+
|
|
504
|
+
reg('R127', 'CBPR_GracePeriod_Unstructured_FormalRule',
|
|
505
|
+
'If Postal Address is present and if no other element than Address Line is present then every occurrence of Address Line must not exceed 35 characters.',
|
|
506
|
+
address_lines_max_length('/Document/PmtRtr/TxInf/OrgnlTxRef/SttlmInf/ThrdRmbrsmntAgt/FinInstnId/PstlAdr', 35))
|
|
507
|
+
|
|
508
|
+
reg('R130', 'CBPR_GracePeriod_Hybrid_FormalRule',
|
|
509
|
+
'If Address Line is present and any other Postal Address element(s) are present, then Town Name and Country are mandatory in Postal Address and a maximum of two occurrences of Address Line are allowed.',
|
|
510
|
+
address_hybrid('/Document/PmtRtr/TxInf/OrgnlTxRef/MndtRltdInf/AmdmntInfDtls/OrgnlCdtrSchmeId/PstlAdr'))
|
|
511
|
+
|
|
512
|
+
reg('R131', 'CBPR_GracePeriod_Structured_FormalRule',
|
|
513
|
+
'If Postal Address is used, and if Address Line is absent, then Town Name and Country must be present.',
|
|
514
|
+
required_when_absent('/Document/PmtRtr/TxInf/OrgnlTxRef/MndtRltdInf/AmdmntInfDtls/OrgnlCdtrSchmeId/PstlAdr', "AdrLine", ["TwnNm", "Ctry"]))
|
|
515
|
+
|
|
516
|
+
reg('R132', 'CBPR_GracePeriod_Unstructured_FormalRule',
|
|
517
|
+
'If Postal Address is present and if no other element than Address Line is present then every occurrence of Address Line must not exceed 35 characters.',
|
|
518
|
+
address_lines_max_length('/Document/PmtRtr/TxInf/OrgnlTxRef/MndtRltdInf/AmdmntInfDtls/OrgnlCdtrSchmeId/PstlAdr', 35))
|
|
519
|
+
|
|
520
|
+
reg('R133', 'CBPR_GracePeriod_Unstructured_FormalRule',
|
|
521
|
+
'If Postal Address is present and if no other element than Address Line is present then every occurrence of Address Line must not exceed 35 characters.',
|
|
522
|
+
address_lines_max_length('/Document/PmtRtr/TxInf/OrgnlTxRef/MndtRltdInf/AmdmntInfDtls/OrgnlCdtrAgt/FinInstnId/PstlAdr', 35))
|
|
523
|
+
|
|
524
|
+
reg('R134', 'CBPR_GracePeriod_Structured_FormalRule',
|
|
525
|
+
'If “PostalAddress” is used, and if AddressLine is absent, then Country and Town name must be present.',
|
|
526
|
+
required_when_absent('/Document/PmtRtr/TxInf/OrgnlTxRef/MndtRltdInf/AmdmntInfDtls/OrgnlCdtrAgt/FinInstnId/PstlAdr', "AdrLine", ["TwnNm", "Ctry"]))
|
|
527
|
+
|
|
528
|
+
reg('R135', 'CBPR_GracePeriod_Hybrid_FormalRule',
|
|
529
|
+
'If Address Line is present and any other Postal Address element(s) are present, then Town Name and Country are mandatory in Postal Address and a maximum of two occurrences of Address Line are allowed.',
|
|
530
|
+
address_hybrid('/Document/PmtRtr/TxInf/OrgnlTxRef/MndtRltdInf/AmdmntInfDtls/OrgnlCdtrAgt/FinInstnId/PstlAdr'))
|
|
531
|
+
|
|
532
|
+
reg('R136', 'CBPR_GracePeriod_Structured_FormalRule',
|
|
533
|
+
'If “PostalAddress” is used, and if AddressLine is absent, then Country and Town name must be present.',
|
|
534
|
+
required_when_absent('/Document/PmtRtr/TxInf/OrgnlTxRef/MndtRltdInf/AmdmntInfDtls/OrgnlDbtr/PstlAdr', "AdrLine", ["TwnNm", "Ctry"]))
|
|
535
|
+
|
|
536
|
+
reg('R137', 'CBPR_GracePeriod_Unstructured_FormalRule',
|
|
537
|
+
'If Postal Address is present and if no other element than Address Line is present then every occurrence of Address Line must not exceed 35 characters.',
|
|
538
|
+
address_lines_max_length('/Document/PmtRtr/TxInf/OrgnlTxRef/MndtRltdInf/AmdmntInfDtls/OrgnlDbtr/PstlAdr', 35))
|
|
539
|
+
|
|
540
|
+
reg('R138', 'CBPR_GracePeriod_Hybrid_FormalRule',
|
|
541
|
+
'If Address Line is present and any other Postal Address element(s) are present, then Town Name and Country are mandatory in Postal Address and a maximum of two occurrences of Address Line are allowed.',
|
|
542
|
+
address_hybrid('/Document/PmtRtr/TxInf/OrgnlTxRef/MndtRltdInf/AmdmntInfDtls/OrgnlDbtr/PstlAdr'))
|
|
543
|
+
|
|
544
|
+
reg('R139', 'CBPR_GracePeriod_Hybrid_FormalRule',
|
|
545
|
+
'If Address Line is present and any other Postal Address element(s) are present, then Town Name and Country are mandatory in Postal Address and a maximum of two occurrences of Address Line are allowed.',
|
|
546
|
+
address_hybrid('/Document/PmtRtr/TxInf/OrgnlTxRef/MndtRltdInf/AmdmntInfDtls/OrgnlDbtrAgt/FinInstnId/PstlAdr'))
|
|
547
|
+
|
|
548
|
+
reg('R140', 'CBPR_GracePeriod_Structured_FormalRule',
|
|
549
|
+
'If Postal Address is used, and if Address Line is absent, then Town Name and Country must be present.',
|
|
550
|
+
required_when_absent('/Document/PmtRtr/TxInf/OrgnlTxRef/MndtRltdInf/AmdmntInfDtls/OrgnlDbtrAgt/FinInstnId/PstlAdr', "AdrLine", ["TwnNm", "Ctry"]))
|
|
551
|
+
|
|
552
|
+
reg('R141', 'CBPR_GracePeriod_Unstructured_FormalRule',
|
|
553
|
+
'If Postal Address is present and if no other element than Address Line is present then every occurrence of Address Line must not exceed 35 characters.',
|
|
554
|
+
address_lines_max_length('/Document/PmtRtr/TxInf/OrgnlTxRef/MndtRltdInf/AmdmntInfDtls/OrgnlDbtrAgt/FinInstnId/PstlAdr', 35))
|
|
555
|
+
|
|
556
|
+
reg('R142', 'CBPR_Remittance_Mutually_Exclusive_FormalRule',
|
|
557
|
+
'Either Structured or Unstructured Remittance can be present.',
|
|
558
|
+
mutually_exclusive('/Document/PmtRtr/TxInf/OrgnlTxRef/RmtInf', ["Ustrd", "Strd"]))
|
|
559
|
+
|
|
560
|
+
reg('R145', 'CBPR_Party_Name_Postal_Address_FormalRule',
|
|
561
|
+
'If Postal Address is present then Name is mandatory.',
|
|
562
|
+
requires_if_present('/Document/PmtRtr/TxInf/OrgnlTxRef/UltmtDbtr/Pty', "PstlAdr", "Nm"))
|
|
563
|
+
|
|
564
|
+
reg('R149', 'CBPR_Name_Any_BIC_FormalRule',
|
|
565
|
+
'If AnyBIC is Absent Then Name is mandatory.',
|
|
566
|
+
required_when_absent('/Document/PmtRtr/TxInf/OrgnlTxRef/Dbtr/Pty', "Id/OrgId/AnyBIC", ["Nm"]))
|
|
567
|
+
|
|
568
|
+
reg('R150', 'CBPR_Party_Name_Postal_Address_FormalRule',
|
|
569
|
+
'If Postal Address is present then Name is mandatory.',
|
|
570
|
+
requires_if_present('/Document/PmtRtr/TxInf/OrgnlTxRef/Dbtr/Pty', "PstlAdr", "Nm"))
|
|
571
|
+
|
|
572
|
+
reg('R151', 'CBPR_GracePeriod_Structured_FormalRule',
|
|
573
|
+
'If “PostalAddress” is used, and if AddressLine is absent, then Country and Town Name must be present.',
|
|
574
|
+
required_when_absent('/Document/PmtRtr/TxInf/OrgnlTxRef/Dbtr/Pty/PstlAdr', "AdrLine", ["TwnNm", "Ctry"]))
|
|
575
|
+
|
|
576
|
+
reg('R152', 'CBPR_GracePeriod_Hybrid_FormalRule',
|
|
577
|
+
'If Address Line is present and any other Postal Address element(s) are present, then Town Name and Country are mandatory in Postal Address and a maximum of two occurrences of Address Line are allowed.',
|
|
578
|
+
address_hybrid('/Document/PmtRtr/TxInf/OrgnlTxRef/Dbtr/Pty/PstlAdr'))
|
|
579
|
+
|
|
580
|
+
reg('R153', 'CBPR_GracePeriod_Unstructured_FormalRule',
|
|
581
|
+
'If Postal Address is present and if no other element than Address Line is present then every occurrence of Address Line must not exceed 35 characters.',
|
|
582
|
+
address_lines_max_length('/Document/PmtRtr/TxInf/OrgnlTxRef/Dbtr/Pty/PstlAdr', 35))
|
|
583
|
+
|
|
584
|
+
reg('R154', 'CBPR_Agent_Name_Postal_Address_FormalRule',
|
|
585
|
+
'Name and Address must always be present together.',
|
|
586
|
+
presence_together('/Document/PmtRtr/TxInf/OrgnlTxRef/Dbtr/Agt/FinInstnId', "Nm", "PstlAdr"))
|
|
587
|
+
|
|
588
|
+
reg('R155', 'CBPR_GracePeriod_Structured_FormalRule',
|
|
589
|
+
'If “PostalAddress” is used, and if AddressLine is absent, then Country and Town Name must be present.',
|
|
590
|
+
required_when_absent('/Document/PmtRtr/TxInf/OrgnlTxRef/Dbtr/Agt/FinInstnId/PstlAdr', "AdrLine", ["TwnNm", "Ctry"]))
|
|
591
|
+
|
|
592
|
+
reg('R156', 'CBPR_GracePeriod_Hybrid_FormalRule',
|
|
593
|
+
'If Address Line is present and any other Postal Address element(s) are present, then Town Name and Country are mandatory in Postal Address and a maximum of two occurrences of Address Line are allowed.',
|
|
594
|
+
address_hybrid('/Document/PmtRtr/TxInf/OrgnlTxRef/Dbtr/Agt/FinInstnId/PstlAdr'))
|
|
595
|
+
|
|
596
|
+
reg('R157', 'CBPR_GracePeriod_Unstructured_FormalRule',
|
|
597
|
+
'If Postal Address is present and if no other element than Address Line is present then every occurrence of Address Line must not exceed 35 characters.',
|
|
598
|
+
address_lines_max_length('/Document/PmtRtr/TxInf/OrgnlTxRef/Dbtr/Agt/FinInstnId/PstlAdr', 35))
|
|
599
|
+
|
|
600
|
+
reg('R158', 'CBPR_Agent_Name_Postal_Address_FormalRule',
|
|
601
|
+
'Name and Address must always be present together.',
|
|
602
|
+
presence_together('/Document/PmtRtr/TxInf/OrgnlTxRef/DbtrAgt/FinInstnId', "Nm", "PstlAdr"))
|
|
603
|
+
|
|
604
|
+
reg('R159', 'CBPR_GracePeriod_Structured_FormalRule',
|
|
605
|
+
'If “PostalAddress” is used, and if AddressLine is absent, then Country and Town Name must be present.',
|
|
606
|
+
required_when_absent('/Document/PmtRtr/TxInf/OrgnlTxRef/DbtrAgt/FinInstnId/PstlAdr', "AdrLine", ["TwnNm", "Ctry"]))
|
|
607
|
+
|
|
608
|
+
reg('R160', 'CBPR_GracePeriod_Hybrid_FormalRule',
|
|
609
|
+
'If Address Line is present and any other Postal Address element(s) are present, then Town Name and Country are mandatory in Postal Address and a maximum of two occurrences of Address Line are allowed.',
|
|
610
|
+
address_hybrid('/Document/PmtRtr/TxInf/OrgnlTxRef/DbtrAgt/FinInstnId/PstlAdr'))
|
|
611
|
+
|
|
612
|
+
reg('R161', 'CBPR_GracePeriod_Unstructured_FormalRule',
|
|
613
|
+
'If Postal Address is present and if no other element than Address Line is present then every occurrence of Address Line must not exceed 35 characters.',
|
|
614
|
+
address_lines_max_length('/Document/PmtRtr/TxInf/OrgnlTxRef/DbtrAgt/FinInstnId/PstlAdr', 35))
|
|
615
|
+
|
|
616
|
+
reg('R163', 'CBPR_Agent_Name_Postal_Address_FormalRule',
|
|
617
|
+
'Name and Address must always be present together.',
|
|
618
|
+
presence_together('/Document/PmtRtr/TxInf/OrgnlTxRef/CdtrAgt/FinInstnId', "Nm", "PstlAdr"))
|
|
619
|
+
|
|
620
|
+
reg('R164', 'CBPR_GracePeriod_Structured_FormalRule',
|
|
621
|
+
'If “PostalAddress” is used, and if AddressLine is absent, then Country and Town Name must be present.',
|
|
622
|
+
required_when_absent('/Document/PmtRtr/TxInf/OrgnlTxRef/CdtrAgt/FinInstnId/PstlAdr', "AdrLine", ["TwnNm", "Ctry"]))
|
|
623
|
+
|
|
624
|
+
reg('R165', 'CBPR_GracePeriod_Hybrid_FormalRule',
|
|
625
|
+
'If Address Line is present and any other Postal Address element(s) are present, then Town Name and Country are mandatory in Postal Address and a maximum of two occurrences of Address Line are allowed.',
|
|
626
|
+
address_hybrid('/Document/PmtRtr/TxInf/OrgnlTxRef/CdtrAgt/FinInstnId/PstlAdr'))
|
|
627
|
+
|
|
628
|
+
reg('R166', 'CBPR_GracePeriod_Unstructured_FormalRule',
|
|
629
|
+
'If Postal Address is present and if no other element than Address Line is present then every occurrence of Address Line must not exceed 35 characters.',
|
|
630
|
+
address_lines_max_length('/Document/PmtRtr/TxInf/OrgnlTxRef/CdtrAgt/FinInstnId/PstlAdr', 35))
|
|
631
|
+
|
|
632
|
+
reg('R169', 'CBPR_Party_Name_Postal_Address_FormalRule',
|
|
633
|
+
'If Postal Address is present then Name is mandatory.',
|
|
634
|
+
requires_if_present('/Document/PmtRtr/TxInf/OrgnlTxRef/Cdtr/Pty', "PstlAdr", "Nm"))
|
|
635
|
+
|
|
636
|
+
reg('R170', 'CBPR_Name_Any_BIC_FormalRule',
|
|
637
|
+
'If AnyBIC is Absent Then Name is mandatory.',
|
|
638
|
+
required_when_absent('/Document/PmtRtr/TxInf/OrgnlTxRef/Cdtr/Pty', "Id/OrgId/AnyBIC", ["Nm"]))
|
|
639
|
+
|
|
640
|
+
reg('R171', 'CBPR_GracePeriod_Structured_FormalRule',
|
|
641
|
+
'If “PostalAddress” is used, and if AddressLine is absent, then Country and Town Name must be present.',
|
|
642
|
+
required_when_absent('/Document/PmtRtr/TxInf/OrgnlTxRef/Cdtr/Pty/PstlAdr', "AdrLine", ["TwnNm", "Ctry"]))
|
|
643
|
+
|
|
644
|
+
reg('R172', 'CBPR_GracePeriod_Hybrid_FormalRule',
|
|
645
|
+
'If Address Line is present and any other Postal Address element(s) are present, then Town Name and Country are mandatory in Postal Address and a maximum of two occurrences of Address Line are allowed.',
|
|
646
|
+
address_hybrid('/Document/PmtRtr/TxInf/OrgnlTxRef/Cdtr/Pty/PstlAdr'))
|
|
647
|
+
|
|
648
|
+
reg('R173', 'CBPR_GracePeriod_Unstructured_FormalRule',
|
|
649
|
+
'If Postal Address is present and if no other element than Address Line is present then every occurrence of Address Line must not exceed 35 characters.',
|
|
650
|
+
address_lines_max_length('/Document/PmtRtr/TxInf/OrgnlTxRef/Cdtr/Pty/PstlAdr', 35))
|
|
651
|
+
|
|
652
|
+
reg('R174', 'CBPR_Agent_Name_Postal_Address_FormalRule',
|
|
653
|
+
'Name and Address must always be present together.',
|
|
654
|
+
presence_together('/Document/PmtRtr/TxInf/OrgnlTxRef/Cdtr/Agt/FinInstnId', "Nm", "PstlAdr"))
|
|
655
|
+
|
|
656
|
+
reg('R175', 'CBPR_GracePeriod_Structured_FormalRule',
|
|
657
|
+
'If “PostalAddress” is used, and if AddressLine is absent, then Country and Town Name must be present.',
|
|
658
|
+
required_when_absent('/Document/PmtRtr/TxInf/OrgnlTxRef/Cdtr/Agt/FinInstnId/PstlAdr', "AdrLine", ["TwnNm", "Ctry"]))
|
|
659
|
+
|
|
660
|
+
reg('R176', 'CBPR_GracePeriod_Hybrid_FormalRule',
|
|
661
|
+
'If Address Line is present and any other Postal Address element(s) are present, then Town Name and Country are mandatory in Postal Address and a maximum of two occurrences of Address Line are allowed.',
|
|
662
|
+
address_hybrid('/Document/PmtRtr/TxInf/OrgnlTxRef/Cdtr/Agt/FinInstnId/PstlAdr'))
|
|
663
|
+
|
|
664
|
+
reg('R177', 'CBPR_GracePeriod_Unstructured_FormalRule',
|
|
665
|
+
'If Postal Address is present and if no other element than Address Line is present then every occurrence of Address Line must not exceed 35 characters.',
|
|
666
|
+
address_lines_max_length('/Document/PmtRtr/TxInf/OrgnlTxRef/Cdtr/Agt/FinInstnId/PstlAdr', 35))
|
|
667
|
+
|
|
668
|
+
reg('R180', 'CBPR_Party_Name_Postal_Address_FormalRule',
|
|
669
|
+
'If Postal Address is present then Name is mandatory.',
|
|
670
|
+
requires_if_present('/Document/PmtRtr/TxInf/OrgnlTxRef/UltmtCdtr/Pty', "PstlAdr", "Nm"))
|
|
671
|
+
|
|
672
|
+
# ---------------------------------------------------------------------------
|
|
673
|
+
# Mechanizable textual rule
|
|
674
|
+
# ---------------------------------------------------------------------------
|
|
675
|
+
reg('R6', 'CBPR_Business_Service_Usage_TextualRule',
|
|
676
|
+
'The value "swift.cbprplus.03" must be used.',
|
|
677
|
+
code_in("/AppHdr/BizSvc", ["swift.cbprplus.03"]))
|
|
678
|
+
|
|
679
|
+
# ---------------------------------------------------------------------------
|
|
680
|
+
# Algorithmic field validation (project brief)
|
|
681
|
+
# ---------------------------------------------------------------------------
|
|
682
|
+
OTR = TX + "/OrgnlTxRef"
|
|
683
|
+
RC = TX + "/RtrChain"
|
|
684
|
+
|
|
685
|
+
|
|
686
|
+
def _run_all(*checks):
|
|
687
|
+
"""Combine several builder-produced checks into one ``check(msg, report)``."""
|
|
688
|
+
def check(msg, report):
|
|
689
|
+
for c in checks:
|
|
690
|
+
c(msg, report)
|
|
691
|
+
return check
|
|
692
|
+
|
|
693
|
+
|
|
694
|
+
def _valid_ccy(path):
|
|
695
|
+
def check(msg, report):
|
|
696
|
+
for el, ccy in msg.attr_nodes(path, "Ccy"):
|
|
697
|
+
if ccy and not is_valid_currency(ccy):
|
|
698
|
+
report(el, detail=f"invalid currency '{ccy}'")
|
|
699
|
+
return check
|
|
700
|
+
|
|
701
|
+
|
|
702
|
+
reg("VAL-CCY", "CBPR_Valid_Settlement_Currency",
|
|
703
|
+
"Settlement amount currencies must be valid ISO 4217 codes.",
|
|
704
|
+
_run_all(
|
|
705
|
+
_valid_ccy(TX + "/OrgnlIntrBkSttlmAmt"),
|
|
706
|
+
_valid_ccy(TX + "/RtrdIntrBkSttlmAmt"),
|
|
707
|
+
_valid_ccy(TX + "/RtrdInstdAmt"),
|
|
708
|
+
_valid_ccy(OTR + "/IntrBkSttlmAmt"),
|
|
709
|
+
))
|
|
710
|
+
|
|
711
|
+
reg("VAL-BIC", "CBPR_Valid_Agent_BIC",
|
|
712
|
+
"Instructing/Instructed Agent BICFI must be a structurally valid BIC.",
|
|
713
|
+
_run_all(
|
|
714
|
+
each_value_valid(TX + "/InstgAgt/FinInstnId/BICFI", is_valid_bic, "BIC"),
|
|
715
|
+
each_value_valid(TX + "/InstdAgt/FinInstnId/BICFI", is_valid_bic, "BIC"),
|
|
716
|
+
))
|
|
717
|
+
|
|
718
|
+
reg("VAL-LEI", "CBPR_Valid_Agent_LEI",
|
|
719
|
+
"Every Agent LEI must be a structurally valid LEI.",
|
|
720
|
+
_run_all(
|
|
721
|
+
each_value_valid(TX + "/InstgAgt/FinInstnId/LEI", is_valid_lei, "LEI"),
|
|
722
|
+
each_value_valid(TX + "/InstdAgt/FinInstnId/LEI", is_valid_lei, "LEI"),
|
|
723
|
+
))
|
|
724
|
+
|
|
725
|
+
reg("VAL-CTRY", "CBPR_Valid_Country",
|
|
726
|
+
"Every Country code must be a valid ISO 3166 country code.",
|
|
727
|
+
_run_all(
|
|
728
|
+
each_value_valid(RC + "/Dbtr/Pty/PstlAdr/Ctry", is_valid_country, "country"),
|
|
729
|
+
each_value_valid(RC + "/Cdtr/Pty/PstlAdr/Ctry", is_valid_country, "country"),
|
|
730
|
+
each_value_valid(OTR + "/Dbtr/Pty/PstlAdr/Ctry", is_valid_country, "country"),
|
|
731
|
+
each_value_valid(OTR + "/Cdtr/Pty/PstlAdr/Ctry", is_valid_country, "country"),
|
|
732
|
+
))
|
|
733
|
+
|
|
734
|
+
# ---------------------------------------------------------------------------
|
|
735
|
+
# Advisory textual / guideline rules (not mechanically enforceable)
|
|
736
|
+
# ---------------------------------------------------------------------------
|
|
737
|
+
_ADVISORY = [
|
|
738
|
+
('R3', 'CBPR_Character_Set_Usage_TextualRule',
|
|
739
|
+
'For further description on the usage of the field, pls refer to the CBPR Plus UHB.'),
|
|
740
|
+
('R7', 'CBPR_Business_Service_TextualRule',
|
|
741
|
+
'This field may be used by SWIFT to support differentiated processing on SWIFT-administered services such as FINplus. For a description of reserved values, please refer to the Service Description for your service. To support differentiated processing on CBPRPlus, for example, SWIFT reserves a set of values that conform to a specific format. A user-specific value may be used, but please contact your Service Administrator before doing so to ensure alignment with general practice on your service.'),
|
|
742
|
+
('R8', 'CBPR_Market_Practice_TextualRule',
|
|
743
|
+
'This field may be used by SWIFT on SWIFT-administered services. For a description of reserved values, please refer to the Service Description for your service. Contact your Service Administrator for further clarification, if necessary. A user-specific value may be used, but please contact your Service Administrator before doing so to ensure alignment with general practice on your service.'),
|
|
744
|
+
('R9', 'CBPR_Related_Business_Application_Header_TextualRule',
|
|
745
|
+
'If used, the Related BAH must transport the exact same information as in the BAH of the related message.'),
|
|
746
|
+
('R10', 'CBPR_Related_BAH_Business_Service_TextualRule',
|
|
747
|
+
'If related BAH is present, it should transport the element Business Service.'),
|
|
748
|
+
('R14', 'CBPR_Return_Chain_TextualRule',
|
|
749
|
+
'It is highly recommended for the returning party to populate the Original Information, if pacs.004 follows the original payment route.'),
|
|
750
|
+
('R15', 'CBPR_Original_Message_Identification_TextualRule',
|
|
751
|
+
'Original Message Identification must transport the Message Identification of the underlying payment (eg. pacs.008/pacs.009)'),
|
|
752
|
+
('R17', 'CBPR_Original_Instruction_Identification_TextualRule',
|
|
753
|
+
'If present in underlying pacs.008/pacs.009, the Instruction Identification must be transported in pacs.004.'),
|
|
754
|
+
('R19', 'CBPR_Original_End_To_End_Identification_TextualRule',
|
|
755
|
+
'If present in underlying pacs.008/pacs.009, the EndToEnd Identification must be transported in pacs.004.'),
|
|
756
|
+
('R20', 'CBPR_Original_Transaction_Identification_TextualRule',
|
|
757
|
+
'If present in underlying pacs.008/pacs.009, the Transaction Identification must be transported in the pacs.004.'),
|
|
758
|
+
('R21', 'CBPR_Original_UETR_TextualRule',
|
|
759
|
+
'Must transport the UETR of the underlying pacs.008/pacs.009'),
|
|
760
|
+
('R22', 'CBPR_Original_Clearing_System_Reference_TextualRule',
|
|
761
|
+
'If present in underlying pacs.008/pacs.009, the Clearing System Reference must be transported in the pacs.004.'),
|
|
762
|
+
('R26', 'CBPR_Returned_Instructed_Rule_2_TextualRule',
|
|
763
|
+
'If ReturnedInstructedAmount and ReturnedInterbankSettlementAmount are NOT expressed in the same currency: If ReturnedInstructedAmount is higher than ReturnedInterbankSettlementAmount WHEN converted in the same currency, Charge Information becomes mandatory.'),
|
|
764
|
+
('R27', 'CBPR_SHAR_TextualRule',
|
|
765
|
+
'If deduct taken then charge information is mandatory. It is optional for initiator (not taking deduct).'),
|
|
766
|
+
('R28', 'CBPR_Agent_National_only_TextualRule',
|
|
767
|
+
'Whenever Debtor Agent, Creditor Agent and all agents in between are located within the same country, the clearing code only may be used.'),
|
|
768
|
+
('R29', 'CBPR_Agent_Option_1_TextualRule',
|
|
769
|
+
'BICFI, complemented optionally with a LEI (preferred option)'),
|
|
770
|
+
('R30', 'CBPR_Agent_Option_2_TextualRule',
|
|
771
|
+
'(Clearing Code OR LEI) AND (Name AND (Unstructured postal address OR [Structured postal address with minimum Town Name and Country] OR [Hybrid postal address with minimum Town Name and Country]). It is recommended to also add the post code when available.'),
|
|
772
|
+
('R31', 'CBPR_Agent_Option_3_TextualRule',
|
|
773
|
+
'Name AND (Unstructured OR [Structured postal address with minimum Town Name and Country] OR [Hybrid postal address with minimum Town Name and Country]). It is recommended to also add the post code when available.'),
|
|
774
|
+
('R38', 'CBPR_UltimateDebtor_Option_3_Jurisdictions_only_TextualRule',
|
|
775
|
+
'For Jurisdictional transactions, Name and/or Identification (Private or Organisation (that is within a country or for regions under same legislations – eg EEA) Countries impacted by the Jurisdictional rule: Belgium, Bulgaria, Czechia, Denmark, Germany, Estonia, Ireland, Greece, Spain, France, Croatia, Italy, Cyprus, Latvia, Lithuania, Luxembourg, Hungary, Malta, Netherlands, Austria, Poland, Portugal, Romania, Slovenia, Slovakia, Finland, Sweden - Iceland, Liechtenstein, Norway. Note: The jurisdictional rules apply only when all agents in the payment chain underly the same jurisdiction.'),
|
|
776
|
+
('R39', 'CBPR_Ultimate_Debtor_Option_1_TextualRule',
|
|
777
|
+
'Name AND [(Structured Postal Address) OR (Hybrid Postal Address) with minimum Town Name & Country - it is recommended to add Post code when available)'),
|
|
778
|
+
('R40', 'CBPR_Ultimate_Debtor_Option_2_TextualRule',
|
|
779
|
+
'Name AND [(Structured Postal Address) OR (Hybrid Postal Address) with minimum Town Name & Country- it is recommended to add Post code when available] AND (Identification: Private or Organisation)'),
|
|
780
|
+
('R41', 'CBPR_Debtor_Option_3_Jurisdictions_only_TextualRule',
|
|
781
|
+
'For Jurisdictional transactions, Debtor/ Name is mandatory with either Debtor Account OR Debtor Identification (that is within a country or for regions under same legislations – eg EEA) Countries impacted by the Jurisdictional rule: Belgium, Bulgaria, Czechia, Denmark, Germany, Estonia, Ireland, Greece, Spain, France, Croatia, Italy, Cyprus, Latvia, Lithuania, Luxembourg, Hungary, Malta, Netherlands, Austria, Poland, Portugal, Romania, Slovenia, Slovakia, Finland, Sweden - Iceland, Liechtenstein, Norway. Note: The jurisdictional rules apply only when all agents in the payment chain underly the same jurisdiction.'),
|
|
782
|
+
('R42', 'CBPR_Debtor_Option_1_TextualRule',
|
|
783
|
+
'Organisation Identification/AnyBIC AND (Account Number OR Organisation Identification/Other) CBPR_Debtor_Option1 is not relevant with current version of the pacs.004 (since Debtor Account is not present). It will be applicable in the next version of the pacs.004 base message.'),
|
|
784
|
+
('R43', 'CBPR_Debtor_Option_2_TextualRule',
|
|
785
|
+
'Name AND (Unstructured OR [Structured Address with minimumTown Name & Country (+ recommended to add Post code when available)]OR [Hybrid postal address with minimum Town Name and Country (+ recommended to add Post code when available)] AND (Account Number OR Identification: Private or Organisation) CBPR_Debtor_Option2 is not relevant with current version of the pacs.004 (since Debtor Account is not present). It will be applicable in the next version of the pacs.004 base message.'),
|
|
786
|
+
('R88', 'CBPR_Creditor_Option_3_Jurisdictions_only_TextualRule',
|
|
787
|
+
'For Jurisdictional transactions, Creditor/Name is mandatory with either Creditor Account OR Creditor Identification (that is within a country or for regions under same legislations – eg EEA) Countries impacted by the Jurisdictional rule: Belgium, Bulgaria, Czechia, Denmark, Germany, Estonia, Ireland, Greece, Spain, France, Croatia, Italy, Cyprus, Latvia, Lithuania, Luxembourg, Hungary, Malta, Netherlands, Austria, Poland, Portugal, Romania, Slovenia, Slovakia, Finland, Sweden - Iceland, Liechtenstein, Norway. Note: The jurisdictional rules apply only when all agents in the payment chain underly the same jurisdiction.'),
|
|
788
|
+
('R89', 'CBPR_Creditor_Option_1_TextualRule',
|
|
789
|
+
'Organisation Identification/AnyBIC AND (Account Number OR Organisation Identification/Other) Textual rule is not relevant with current version of the pacs.004 (since Debtor Account is not present). It will be applicable in the next version of the pacs.004 base message.'),
|
|
790
|
+
('R90', 'CBPR_Creditor_Option_2_TextualRule',
|
|
791
|
+
'Name AND (Unstructured OR [Structured Address with minimumTown Name & Country (+ recommended to add Post code when available)]OR [Hybrid postal address with minimum Town Name and Country (+ recommended to add Post code when available)) AND (Account Number OR Identification: Private or Organisation) Textual rule is not relevant with current version of the pacs.004 (since Debtor Account is not present). It will be applicable in the next version of the pacs.004 base message.'),
|
|
792
|
+
('R100', 'CBPR_Ultimate_Creditor_Option_1_TextualRule',
|
|
793
|
+
'Name AND [(Structured Postal Address) OR (Hybrid Postal Address) with minimum Town Name & Country - it is recommended to add Post code when available)].'),
|
|
794
|
+
('R101', 'CBPR_UltimateCreditor_Option_2_Jurisdictions_only_TextualRule',
|
|
795
|
+
'For Jurisdictional transactions, Name and/or Identification (Private or Organisation (that is within a country or for regions under same legislations – eg EEA) Countries impacted by the Jurisdictional rule: Belgium, Bulgaria, Czechia, Denmark, Germany, Estonia, Ireland, Greece, Spain, France, Croatia, Italy, Cyprus, Latvia, Lithuania, Luxembourg, Hungary, Malta, Netherlands, Austria, Poland, Portugal, Romania, Slovenia, Slovakia, Finland, Sweden- Iceland, Liechtenstein, Norway. Note: The jurisdictional rules apply only when all agents in the payment chain underly the same jurisdiction.'),
|
|
796
|
+
('R106', 'CBPR_Originator_Identification_TextualRule',
|
|
797
|
+
'If AnyBIC is present, in addition to any other optional elements, in case of conflicting information it will always take precedence.'),
|
|
798
|
+
('R110', 'CBPR_Return_Chain_TextualRule',
|
|
799
|
+
'It is highly recommended for the returning party to populate the Original Information, if pacs.004 follows the original payment route.'),
|
|
800
|
+
('R115', 'CBPR_Agent_Point_To_Point_On_SWIFT_TextualRule',
|
|
801
|
+
'If the transaction is exchanged on the SWIFT network (ie if the sender and receiver of the message are on SWIFT), then BIC is mandatory and other elements are optional, eg LEI'),
|
|
802
|
+
('R128', 'CBPR_Local_Instrument_Guideline',
|
|
803
|
+
'The preferred option is coded information.'),
|
|
804
|
+
('R129', 'CBPR_Category_Purpose_TextualRule',
|
|
805
|
+
'The preferred option is coded information.'),
|
|
806
|
+
('R143', 'CBPR_Remittance_Rules_TextualRule',
|
|
807
|
+
'1. Use of Structured Remittance must be bilaterally or multilaterally agreed 2. Structured Remittance can be repeated, however the total business data for all occurrences (excluding tags) must not exceed 9,000 characters.'),
|
|
808
|
+
('R144', 'CBPR_Ultimate_Debtor_Option_1_TextualRule',
|
|
809
|
+
'Name AND [(Structured Postal Address) OR (Hybrid Postal Address) with minimum Town Name & Country - it is recommended to add Post code when available)'),
|
|
810
|
+
('R146', 'CBPR_Debtor_Option_3_Jurisdictions_only_TextualRule',
|
|
811
|
+
'For Jurisdictional transactions, Debtor/ Name is mandatory with either Debtor Account OR Debtor Identification (that is within a country or for regions under same legislations – eg EEA) Countries impacted by the Jurisdictional rule: Belgium, Bulgaria, Czechia, Denmark, Germany, Estonia, Ireland, Greece, Spain, France, Croatia, Italy, Cyprus, Latvia, Lithuania, Luxembourg, Hungary, Malta, Netherlands, Austria, Poland, Portugal, Romania, Slovenia, Slovakia, Finland, Sweden - Iceland, Liechtenstein, Norway. Note: The jurisdictional rules apply only when all agents in the payment chain underly the same jurisdiction.'),
|
|
812
|
+
('R147', 'CBPR_Debtor_Option_1_TextualRule',
|
|
813
|
+
'Organisation Identification/AnyBIC AND (Account Number OR Organisation Identification/Other)'),
|
|
814
|
+
('R148', 'CBPR_Debtor_Option_2_TextualRule',
|
|
815
|
+
'Name AND (Unstructured OR [Structured Address with minimumTown Name & Country (+ recommended to add Postal code when available)]) AND (Account Number OR Identification: Private or Organisation)'),
|
|
816
|
+
('R162', 'CBPR_Agent_National_only_TextualRule',
|
|
817
|
+
'Whenever Debtor Agent, Creditor Agent and all agents in between are located within the same country, the clearing code only may be used..'),
|
|
818
|
+
('R167', 'CBPR_Creditor_Option_1_TextualRule',
|
|
819
|
+
'Organisation Identification/AnyBIC AND (Account Number OR Organisation Identification/Other)'),
|
|
820
|
+
('R168', 'CBPR_Creditor_Option_2_TextualRule',
|
|
821
|
+
'Name AND (Unstructured OR [Structured Address with minimumTown Name & Country (+ recommended to add Postal code when available)]) AND (Account Number OR Identification: Private or Organisation)'),
|
|
822
|
+
('R178', 'CBPR_Ultimate_Creditor_Option_1_TextualRule',
|
|
823
|
+
'Name AND [(Structured Postal Address) OR (Hybrid Postal Address) with minimum Town Name & Country - it is recommended to add Post code when available)]. Other elements are optional, eg Identification: Private or Organisation'),
|
|
824
|
+
('R179', 'CBPR_Ultimate_Creditor_Option_2_Jurisdictions_only_TextualRule',
|
|
825
|
+
'For Jurisdictional transactions, Name and/or Identification (Private or Organisation (that is within a country or for regions under same legislations – eg EEA) Countries impacted by the Jurisdictional rule: Belgium, Bulgaria, Czechia, Denmark, Germany, Estonia, Ireland, Greece, Spain, France, Croatia, Italy, Cyprus, Latvia, Lithuania, Luxembourg, Hungary, Malta, Netherlands, Austria, Poland, Portugal, Romania, Slovenia, Slovakia, Finland, Sweden - Iceland, Liechtenstein, Norway. Note: The jurisdictional rules apply only when all agents in the payment chain underly the same jurisdiction.'),
|
|
826
|
+
('R181', 'CBPR_Purpose_Guideline',
|
|
827
|
+
'The preferred option is coded information.'),
|
|
828
|
+
]
|
|
829
|
+
for _num, _name, _desc in _ADVISORY:
|
|
830
|
+
advisory(MT, YEAR, _num, _name, _desc)
|
|
831
|
+
|