epics 3.1.0 → 3.1.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 +4 -4
- data/CHANGELOG.md +17 -0
- data/README.md +8 -0
- data/lib/epics/factories/request_factory/v3.rb +4 -4
- data/lib/epics/version.rb +1 -1
- data/spec/orders/c54_spec.rb +1 -1
- data/spec/orders/camt_parity_spec.rb +1 -1
- data/spec/orders/z01_spec.rb +35 -1
- data/spec/orders/z54_spec.rb +12 -1
- data/spec/request_factory_spec.rb +5 -3
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1244d75749f35131c6465347282624de8d6e9aac0a17680406b41367de6d7a08
|
|
4
|
+
data.tar.gz: 0b73df848403b4a64e3234ecce08de2947db9a67f039123559f30d38b8016f2c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5d671d7af9d558bba0b49bc7ffe834c728fdd7994fb7f9df7c8545468555900985327f78537fd7f257ba4db6d3baaebb6c1eb945b57806132e90a984028b5b74
|
|
7
|
+
data.tar.gz: '0160786572359a27347987e80ef7aa41a0122c40da8815c17009af3dae37d2226f41514c8e8f07bb80acd7e4110fd3c79bb0f62cb38c9c16f328d6e6b0784554'
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
### 3.1.1
|
|
2
|
+
|
|
3
|
+
- [FIX] `C54` on H005 requested the BTF service `REP` instead of `STM`. The German
|
|
4
|
+
mapping is `STM | DE | camt.054 | ZIP`, and banks that follow it (e.g. GLS) rejected
|
|
5
|
+
the request with `EBICS_INVALID_ORDER_TYPE`
|
|
6
|
+
- [FIX] `Z54` on H005 requested `EOP | XQRR` instead of `REP | CH | camt.054`, and `Z01`
|
|
7
|
+
sent the service option `CH003GEN`, which the Swiss mapping doesn't define. Swiss banks
|
|
8
|
+
(e.g. the ZKB test platform) rejected both with `EBICS_INVALID_ORDER_TYPE`
|
|
9
|
+
- **Behaviour change:** `Z54` now returns all aggregate booking details. For the QR
|
|
10
|
+
reference payments only (ZQR), pass `service_option: 'XQRR'`
|
|
11
|
+
- Swiss banks also require the message version, e.g.
|
|
12
|
+
`e.Z54(from, to, scope: 'CH', msg_name_version: '08')`
|
|
13
|
+
- [ENHANCEMENT] `container_type: false` leaves the `Container` out of an H005 download
|
|
14
|
+
request, while `nil` keeps the order type's default (`ZIP`). The ZKB offers the pain.002
|
|
15
|
+
status report in version 10 only without a container:
|
|
16
|
+
`e.Z01(from, to, scope: 'CH', msg_name_version: '10', container_type: false)`
|
|
17
|
+
|
|
1
18
|
### 3.1.0
|
|
2
19
|
|
|
3
20
|
- [ENHANCEMENT] Verification of Payee (VoP) and the EDS (distributed electronic
|
data/README.md
CHANGED
|
@@ -301,6 +301,14 @@ e.C53(from, to, scope: 'CH', msg_name_version: '08', container_type: 'ZIP')
|
|
|
301
301
|
e.CCT(document, service_option: 'CH001COR')
|
|
302
302
|
```
|
|
303
303
|
|
|
304
|
+
Passing `nil` keeps the order type's default. To leave a parameter out of the request,
|
|
305
|
+
pass `false`. For example, the ZKB offers the pain.002 status report in version 10 only
|
|
306
|
+
without a container, while `Z01` requests `ZIP` by default:
|
|
307
|
+
|
|
308
|
+
```ruby
|
|
309
|
+
e.Z01(from, to, scope: 'CH', msg_name_version: '10', container_type: false)
|
|
310
|
+
```
|
|
311
|
+
|
|
304
312
|
The `Scope` parameter identifies whose rulebook applies — an ISO country code such as `CH`
|
|
305
313
|
or `DE`, `GLB` for SEPA/SWIFT/CGI, or `BIL` for bilaterally agreed rules. Swiss market
|
|
306
314
|
practice requires it to be supplied (guidelines §5.2).
|
|
@@ -109,7 +109,7 @@ class Epics::Factories::RequestFactory::V3 < Epics::Factories::RequestFactory::B
|
|
|
109
109
|
|
|
110
110
|
def create_c54(start_date, end_date, scope: nil, msg_name_version: nil, container_type: 'ZIP')
|
|
111
111
|
create_btd(
|
|
112
|
-
service_name: '
|
|
112
|
+
service_name: 'STM',
|
|
113
113
|
msg_name: 'camt.054',
|
|
114
114
|
scope: scope,
|
|
115
115
|
msg_name_version: msg_name_version,
|
|
@@ -164,10 +164,10 @@ class Epics::Factories::RequestFactory::V3 < Epics::Factories::RequestFactory::B
|
|
|
164
164
|
end_date: end_date
|
|
165
165
|
)
|
|
166
166
|
end
|
|
167
|
-
def create_z54(start_date, end_date, scope: nil, service_option:
|
|
167
|
+
def create_z54(start_date, end_date, scope: nil, service_option: nil,
|
|
168
168
|
msg_name_version: nil, container_type: 'ZIP')
|
|
169
169
|
create_btd(
|
|
170
|
-
service_name: '
|
|
170
|
+
service_name: 'REP',
|
|
171
171
|
msg_name: 'camt.054',
|
|
172
172
|
scope: scope,
|
|
173
173
|
service_option: service_option,
|
|
@@ -190,7 +190,7 @@ class Epics::Factories::RequestFactory::V3 < Epics::Factories::RequestFactory::B
|
|
|
190
190
|
end_date: end_date
|
|
191
191
|
)
|
|
192
192
|
end
|
|
193
|
-
def create_z01(start_date, end_date, scope: nil, service_option:
|
|
193
|
+
def create_z01(start_date, end_date, scope: nil, service_option: nil,
|
|
194
194
|
msg_name_version: nil, container_type: 'ZIP')
|
|
195
195
|
create_btd(
|
|
196
196
|
service_name: 'PSR',
|
data/lib/epics/version.rb
CHANGED
data/spec/orders/c54_spec.rb
CHANGED
|
@@ -18,7 +18,7 @@ RSpec.describe Epics::C54 do
|
|
|
18
18
|
let(:ns) { { 'e' => 'urn:org:ebics:H005' } }
|
|
19
19
|
|
|
20
20
|
include_examples 'a valid ebicsRequest H005 download with date range',
|
|
21
|
-
service_name: '
|
|
21
|
+
service_name: 'STM', msg_name: 'camt.054', from: '2014-09-01', to: '2014-09-30'
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
describe 'H004 request structure' do
|
|
@@ -10,7 +10,7 @@ RSpec.describe 'C52/C53/C54 parameter parity' do
|
|
|
10
10
|
# The three camt statement retrievals differ only in service name and message type.
|
|
11
11
|
types = { Epics::C52 => { service: 'STM', msg: 'camt.052' },
|
|
12
12
|
Epics::C53 => { service: 'EOP', msg: 'camt.053' },
|
|
13
|
-
Epics::C54 => { service: '
|
|
13
|
+
Epics::C54 => { service: 'STM', msg: 'camt.054' } }
|
|
14
14
|
|
|
15
15
|
def service(order, ns)
|
|
16
16
|
Nokogiri::XML(order.to_xml).at_xpath('//e:Service', ns)
|
data/spec/orders/z01_spec.rb
CHANGED
|
@@ -18,7 +18,41 @@ RSpec.describe Epics::Z01 do
|
|
|
18
18
|
let(:ns) { { 'e' => 'urn:org:ebics:H005' } }
|
|
19
19
|
|
|
20
20
|
include_examples 'a valid ebicsRequest H005 download with date range',
|
|
21
|
-
service_name: 'PSR', msg_name: 'pain.002',
|
|
21
|
+
service_name: 'PSR', msg_name: 'pain.002', from: '2014-09-01', to: '2014-09-30'
|
|
22
|
+
|
|
23
|
+
it 'has no ServiceOption' do
|
|
24
|
+
expect(xml.at_xpath('//e:BTDOrderParams/e:Service/e:ServiceOption', ns)).to be_nil
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
it 'requests a ZIP container by default' do
|
|
28
|
+
expect(xml.at_xpath('//e:BTDOrderParams/e:Service/e:Container/@containerType', ns).value).to eq('ZIP')
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
context 'with container_type: false (e.g. pain.002 v10 at the ZKB)' do
|
|
32
|
+
subject do
|
|
33
|
+
described_class.new(client, from: Date.parse('2014-09-01'), to: Date.parse('2014-09-30'),
|
|
34
|
+
scope: 'CH', msg_name_version: '10', container_type: false)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
include_examples 'a valid ebicsRequest H005 download with date range',
|
|
38
|
+
service_name: 'PSR', msg_name: 'pain.002', scope: 'CH', from: '2014-09-01', to: '2014-09-30'
|
|
39
|
+
|
|
40
|
+
it 'has no Container' do
|
|
41
|
+
expect(xml.at_xpath('//e:BTDOrderParams/e:Service/e:Container', ns)).to be_nil
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
it 'has MsgName version 10' do
|
|
45
|
+
expect(xml.at_xpath('//e:BTDOrderParams/e:Service/e:MsgName/@version', ns).value).to eq('10')
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
context 'with container_type: nil' do
|
|
50
|
+
subject { described_class.new(client, from: Date.parse('2014-09-01'), to: Date.parse('2014-09-30'), container_type: nil) }
|
|
51
|
+
|
|
52
|
+
it 'falls back to the ZIP container' do
|
|
53
|
+
expect(xml.at_xpath('//e:BTDOrderParams/e:Service/e:Container/@containerType', ns).value).to eq('ZIP')
|
|
54
|
+
end
|
|
55
|
+
end
|
|
22
56
|
end
|
|
23
57
|
|
|
24
58
|
describe 'H004 request structure' do
|
data/spec/orders/z54_spec.rb
CHANGED
|
@@ -18,7 +18,18 @@ RSpec.describe Epics::Z54 do
|
|
|
18
18
|
let(:ns) { { 'e' => 'urn:org:ebics:H005' } }
|
|
19
19
|
|
|
20
20
|
include_examples 'a valid ebicsRequest H005 download with date range',
|
|
21
|
-
service_name: '
|
|
21
|
+
service_name: 'REP', msg_name: 'camt.054', from: '2014-09-01', to: '2014-09-30'
|
|
22
|
+
|
|
23
|
+
it 'has no ServiceOption' do
|
|
24
|
+
expect(xml.at_xpath('//e:BTDOrderParams/e:Service/e:ServiceOption', ns)).to be_nil
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
context 'with service_option XQRR (ZQR, QR reference payments only)' do
|
|
28
|
+
subject { described_class.new(client, from: Date.parse('2014-09-01'), to: Date.parse('2014-09-30'), service_option: 'XQRR') }
|
|
29
|
+
|
|
30
|
+
include_examples 'a valid ebicsRequest H005 download with date range',
|
|
31
|
+
service_name: 'REP', msg_name: 'camt.054', service_option: 'XQRR', from: '2014-09-01', to: '2014-09-30'
|
|
32
|
+
end
|
|
22
33
|
end
|
|
23
34
|
|
|
24
35
|
describe 'H004 request structure' do
|
|
@@ -303,14 +303,14 @@ RSpec.describe 'RequestFactory' do
|
|
|
303
303
|
btd_downloads = {
|
|
304
304
|
'c52' => { service_name: 'STM', msg_name: 'camt.052' },
|
|
305
305
|
'c53' => { service_name: 'EOP', msg_name: 'camt.053', container_type: 'ZIP' },
|
|
306
|
-
'c54' => { service_name: '
|
|
306
|
+
'c54' => { service_name: 'STM', msg_name: 'camt.054', container_type: 'ZIP' },
|
|
307
307
|
'sta' => { service_name: 'EOP', msg_name: 'mt940' },
|
|
308
308
|
'vmk' => { service_name: 'STM', msg_name: 'mt942' },
|
|
309
309
|
'z52' => { service_name: 'STM', msg_name: 'camt.052', container_type: 'ZIP' },
|
|
310
310
|
'z53' => { service_name: 'EOP', msg_name: 'camt.053', container_type: 'ZIP' },
|
|
311
|
-
'z54' => { service_name: '
|
|
311
|
+
'z54' => { service_name: 'REP', msg_name: 'camt.054', container_type: 'ZIP' },
|
|
312
312
|
'xek' => { service_name: 'EOP', msg_name: 'pdf', container_type: 'ZIP' },
|
|
313
|
-
'z01' => { service_name: 'PSR', msg_name: 'pain.002',
|
|
313
|
+
'z01' => { service_name: 'PSR', msg_name: 'pain.002', container_type: 'ZIP' },
|
|
314
314
|
'bka' => { service_name: 'EOP', msg_name: 'camt.053', scope: 'DE' },
|
|
315
315
|
'c5n' => { service_name: 'STM', msg_name: 'camt.054', scope: 'DE', service_option: 'SCI' },
|
|
316
316
|
'cdz' => { service_name: 'REP', msg_name: 'pain.002', scope: 'DE', service_option: 'SDD' },
|
|
@@ -333,6 +333,8 @@ RSpec.describe 'RequestFactory' do
|
|
|
333
333
|
|
|
334
334
|
if expected[:service_option]
|
|
335
335
|
expect(xml.at('//BTDOrderParams/Service/ServiceOption').text).to eq(expected[:service_option])
|
|
336
|
+
else
|
|
337
|
+
expect(xml.at('//BTDOrderParams/Service/ServiceOption')).to be_nil
|
|
336
338
|
end
|
|
337
339
|
|
|
338
340
|
if expected[:container_type]
|