sepa_rator 1.2.0 → 1.3.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 142a5f6d6bff2b0355c10149b9654e20f2754b73db9ba049191c00dd5571e370
4
- data.tar.gz: 34979be8d246b1e4dbcbb4ac8e0e9d6852a7b5406b76bd171838bb4a16f55b5f
3
+ metadata.gz: 1f81f775b9672175eb25c887d1c4d31525b1b218e7e7c4efa36b372bb85010e0
4
+ data.tar.gz: f64ce6a61f43c39f968bc17ead46ba48370351b440c32f838def6385dd719ca0
5
5
  SHA512:
6
- metadata.gz: ee2885d89f417ff31bf9ee8ebe692ba5aaddd5533cc129b995d039f2727447e47f4e62ad7867ad1d34f53a5f8f4a4c5f61c3168f5050cd0c194ec435c6b68d05
7
- data.tar.gz: 4f0cd2f5f693efbbb91decb08384d54b6e9b97580ba01f9921a5ff8513c199a44445f7365e91cd1dd80f28c50280a394b8f8638b493a7b86d7e5d8f6ea31c483
6
+ metadata.gz: dc7867b7ecf3f7bd2e19bc0fb557e75d1fb5492cc4ad51b34162fd522e798f7befdc4b47af0d9f52ede7eb0368d154834399466bb1b59b2d70faf6166d1a4a33
7
+ data.tar.gz: 8b3a5dfd400470eb34d62e263bf429ef4dc2d407ee5a2a7b9e69307c206374169b528f307bb729e1af0fb57c263f4de7cc83ce15c6427249e8333e0d078a3113
data/README.md CHANGED
@@ -28,6 +28,7 @@ national variants (CFONB for France, DK/DFÜ for Germany, …) first-class.
28
28
  | SPS 🇨🇭 | `Profiles::SPS` | `country: :ch` | `SCT_03`, `SCT_09`, `SCT_13` | `SDD_02`, `SDD_08`, `SDD_12` |
29
29
  | GB 🇬🇧 | `Profiles::GB` | `country: :gb` | `SCT_03`, `SCT_09`, `SCT_13` | `SDD_02`, `SDD_08`, `SDD_12` |
30
30
  | AT / PSA 🇦🇹 | `Profiles::AT` | `country: :at` | `SCT_03`, `SCT_09`, `SCT_13` | `SDD_02`, `SDD_08`, `SDD_12` |
31
+ | NL 🇳🇱 | `Profiles::NL` | `country: :nl` | `SCT_03`, `SCT_09`, `SCT_13` | `SDD_02`, `SDD_08`, `SDD_12` |
31
32
 
32
33
  For the full per-profile detail (XSD, constraints, capabilities), see [DOCUMENTATION.md](DOCUMENTATION.md#supported-profiles-and-schemas). Adding a new country is a single file in `lib/sepa_rator/profiles/` plus entries in `lib/sepa_rator/profiles/country_defaults.rb`.
33
34
 
@@ -2,12 +2,14 @@
2
2
 
3
3
  module SEPA
4
4
  class DebtorAccount < Account
5
- attr_accessor :initiating_party_identifier, :initiating_party_lei, :initiating_party_bic
5
+ attr_accessor :initiating_party_identifier, :initiating_party_scheme, :initiating_party_lei, :initiating_party_bic
6
6
 
7
7
  convert :initiating_party_identifier, to: :text
8
+ convert :initiating_party_scheme, to: :text
8
9
  # Max256Text (v13 GenericOrganisationIdentification3); stricter v03/v09
9
10
  # limits are enforced by XSD validation at output time.
10
11
  validates_length_of :initiating_party_identifier, within: 1..256, allow_nil: true
12
+ validates_length_of :initiating_party_scheme, within: 1..35, allow_nil: true
11
13
  validates_with LEIValidator, field_name: :initiating_party_lei, message: 'is invalid'
12
14
  validates_with BICValidator, field_name: :initiating_party_bic, message: 'is invalid'
13
15
 
@@ -15,7 +17,8 @@ module SEPA
15
17
  return unless initiating_party_identifier || initiating_party_bic || initiating_party_lei
16
18
 
17
19
  build_organisation_id(builder, initiating_party_identifier, profile,
18
- lei: initiating_party_lei, org_bic: initiating_party_bic)
20
+ lei: initiating_party_lei, org_bic: initiating_party_bic,
21
+ scheme: initiating_party_scheme)
19
22
  end
20
23
  end
21
24
  end
@@ -139,6 +139,26 @@ module SEPA
139
139
  profile: GB::SDD_08)
140
140
  R.set_country_default(family: :direct_debit, country: :gb, version: :v02,
141
141
  profile: GB::SDD_02)
142
+
143
+ # ── Netherlands → NL (Betaalvereniging) ──────────────────────
144
+
145
+ R.set_country_default(family: :credit_transfer, country: :nl, version: :latest,
146
+ profile: NL::SCT_13)
147
+ R.set_country_default(family: :credit_transfer, country: :nl, version: :v13,
148
+ profile: NL::SCT_13)
149
+ R.set_country_default(family: :credit_transfer, country: :nl, version: :v09,
150
+ profile: NL::SCT_09)
151
+ R.set_country_default(family: :credit_transfer, country: :nl, version: :v03,
152
+ profile: NL::SCT_03)
153
+
154
+ R.set_country_default(family: :direct_debit, country: :nl, version: :latest,
155
+ profile: NL::SDD_12)
156
+ R.set_country_default(family: :direct_debit, country: :nl, version: :v12,
157
+ profile: NL::SDD_12)
158
+ R.set_country_default(family: :direct_debit, country: :nl, version: :v08,
159
+ profile: NL::SDD_08)
160
+ R.set_country_default(family: :direct_debit, country: :nl, version: :v02,
161
+ profile: NL::SDD_02)
142
162
  end
143
163
  end
144
164
  end
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SEPA
4
+ module Profiles
5
+ # NL (Betaalvereniging / Dutch Payments Association) profiles.
6
+ # Dutch banks follow the EPC SEPA rulebook and add their own
7
+ # implementation guidelines on top — the Betaalvereniging NL IG C2B
8
+ # SCT/SDD 2023 v1.0 covers pain.001.001.09 and pain.008.001.08.
9
+ #
10
+ # NL profiles inherit everything from EPC and require postal addresses
11
+ # to be carried as structured fields (StrtNm, PstCd, TwnNm, …), enforced
12
+ # via `features.requires_structured_address`.
13
+ module NL
14
+ REQUIRES_STRUCTURED_ADDRESS = { requires_structured_address: true }.freeze
15
+
16
+ # ─── SEPA Credit Transfer ────────────────────────────────────────────
17
+
18
+ SCT_03 = ProfileRegistry.register(
19
+ EPC::SCT_03.with(id: 'nl.sct.03', features: REQUIRES_STRUCTURED_ADDRESS)
20
+ )
21
+
22
+ SCT_09 = ProfileRegistry.register(
23
+ EPC::SCT_09.with(id: 'nl.sct.09', features: REQUIRES_STRUCTURED_ADDRESS)
24
+ )
25
+
26
+ SCT_13 = ProfileRegistry.register(
27
+ EPC::SCT_13.with(id: 'nl.sct.13', features: REQUIRES_STRUCTURED_ADDRESS)
28
+ )
29
+
30
+ # ─── SEPA Direct Debit ───────────────────────────────────────────────
31
+
32
+ SDD_02 = ProfileRegistry.register(
33
+ EPC::SDD_02.with(id: 'nl.sdd.02', features: REQUIRES_STRUCTURED_ADDRESS)
34
+ )
35
+
36
+ SDD_08 = ProfileRegistry.register(
37
+ EPC::SDD_08.with(id: 'nl.sdd.08', features: REQUIRES_STRUCTURED_ADDRESS)
38
+ )
39
+
40
+ SDD_12 = ProfileRegistry.register(
41
+ EPC::SDD_12.with(id: 'nl.sdd.12', features: REQUIRES_STRUCTURED_ADDRESS)
42
+ )
43
+ end
44
+ end
45
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SEPA
4
- VERSION = '1.2.0'
4
+ VERSION = '1.3.1'
5
5
  end
data/lib/sepa_rator.rb CHANGED
@@ -72,6 +72,7 @@ require 'sepa_rator/profiles/dk'
72
72
  require 'sepa_rator/profiles/sps'
73
73
  require 'sepa_rator/profiles/gb'
74
74
  require 'sepa_rator/profiles/at'
75
+ require 'sepa_rator/profiles/nl'
75
76
 
76
77
  # Country defaults must load AFTER all variant profiles have been defined.
77
78
  require 'sepa_rator/profiles/country_defaults'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sepa_rator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Georg Leciejewski
@@ -148,6 +148,7 @@ files:
148
148
  - lib/sepa_rator/profiles/epc.rb
149
149
  - lib/sepa_rator/profiles/gb.rb
150
150
  - lib/sepa_rator/profiles/iso.rb
151
+ - lib/sepa_rator/profiles/nl.rb
151
152
  - lib/sepa_rator/profiles/sps.rb
152
153
  - lib/sepa_rator/transaction.rb
153
154
  - lib/sepa_rator/transaction/credit_transfer_transaction.rb