epics 2.3.0 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0235859714f452d06af25055ba018845fb391e71b95813951422d851b274974e'
4
- data.tar.gz: 699de0520f011d9755685e222e64a563ef8a7fac3558cc0520b156b0e5232bfd
3
+ metadata.gz: 8cb98bb83470739103b20941fc4a5f636f57752d90941aa0ba9ac9e7c111503f
4
+ data.tar.gz: 134ef14259b6e5728677f45dd21446fc642f8eca7c6641e7befd537936c406b6
5
5
  SHA512:
6
- metadata.gz: 8ed0c386749155a12c1b88d1b3fea266a9a2d99dad01fcbc8e5eecefa6af8a2dc0708b7ce9591b23a50d244451c05c456c31774690911dc0c96247a023a90aba
7
- data.tar.gz: f03bab54f984eaa5ee3515854753f78b2e9c4e5b5347f4c40b762c829e174edfe8139c6f7328d2d703be3864f81c4345d7fb954d3245136d4ab047363d2780b9
6
+ metadata.gz: 55ba0cecabed4d9397643b0fc7116c3675dc5bdc4d076e8599812338503061fb15521164b7ee02ce42cf7aa778fa3694c6ca0d0358dcbc2684cbffdfb9888374
7
+ data.tar.gz: 1df6989cdc96ee6e68069a34bdd6496e8a739b9665ab1c68f1533dd247664a67452e0157c3b1ea6eb84e66868e7e94094c344229b598a7de862d702e46b99e86
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ### Unreleased
2
2
 
3
+ ### 2.4.0
4
+
5
+ - [ENHANCEMENT] Adds XE2 and XE3 order type (CCT and CDD for swiss banks)
6
+
3
7
  ### 2.3.0
4
8
 
5
9
  - [ENHANCEMENT] Adds Z52, Z53, Z54 order type (C52, C53, C54 for swiss banks)
data/lib/epics/client.rb CHANGED
@@ -137,6 +137,14 @@ class Epics::Client
137
137
  upload(Epics::CDD, document)
138
138
  end
139
139
 
140
+ def XE2(document)
141
+ upload(Epics::XE2, document)
142
+ end
143
+
144
+ def XE3(document)
145
+ upload(Epics::XE3, document)
146
+ end
147
+
140
148
  def CDS(document)
141
149
  upload(Epics::CDS, document)
142
150
  end
data/lib/epics/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Epics
4
- VERSION = '2.3.0'
4
+ VERSION = '2.4.0'
5
5
  end
data/lib/epics/xe2.rb ADDED
@@ -0,0 +1,5 @@
1
+ class Epics::XE2 < Epics::CCT
2
+ def order_type
3
+ 'XE2'
4
+ end
5
+ end
data/lib/epics/xe3.rb ADDED
@@ -0,0 +1,5 @@
1
+ class Epics::XE3 < Epics::CDD
2
+ def order_type
3
+ 'XE3'
4
+ end
5
+ end
data/lib/epics.rb CHANGED
@@ -37,6 +37,8 @@ require "epics/cct"
37
37
  require "epics/ccs"
38
38
  require "epics/cdb"
39
39
  require "epics/cdd"
40
+ require "epics/xe2"
41
+ require "epics/xe3"
40
42
  require "epics/b2b"
41
43
  require "epics/xds"
42
44
  require "epics/cds"
@@ -0,0 +1,69 @@
1
+ <?xml version="1.0"?>
2
+ <Document xmlns="http://www.six-interbank-clearing.com/de/pain.001.001.03.ch.02.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.six-interbank-clearing.com/de/pain.001.001.03.ch.02.xsd pain.001.001.03.ch.02.xsd">
3
+ <CstmrCdtTrfInitn>
4
+ <GrpHdr>
5
+ <MsgId>SPS-KING/7c332aeb9ec40d29232691</MsgId>
6
+ <CreDtTm>2024-06-20T17:27:56+02:00</CreDtTm>
7
+ <NbOfTxs>1</NbOfTxs>
8
+ <CtrlSum>102.50</CtrlSum>
9
+ <InitgPty>
10
+ <Nm>Schuldner GmbH</Nm>
11
+ </InitgPty>
12
+ </GrpHdr>
13
+ <PmtInf>
14
+ <PmtInfId>SPS-KING/7c332aeb9ec40d29232691/1</PmtInfId>
15
+ <PmtMtd>TRF</PmtMtd>
16
+ <BtchBookg>false</BtchBookg>
17
+ <NbOfTxs>1</NbOfTxs>
18
+ <CtrlSum>102.50</CtrlSum>
19
+ <PmtTpInf>
20
+ <SvcLvl>
21
+ <Cd>SEPA</Cd>
22
+ </SvcLvl>
23
+ </PmtTpInf>
24
+ <ReqdExctnDt>1999-01-01</ReqdExctnDt>
25
+ <Dbtr>
26
+ <Nm>Schuldner GmbH</Nm>
27
+ </Dbtr>
28
+ <DbtrAcct>
29
+ <Id>
30
+ <IBAN>CH5481230000001998736</IBAN>
31
+ </Id>
32
+ </DbtrAcct>
33
+ <DbtrAgt>
34
+ <FinInstnId>
35
+ <BIC>RAIFCH22</BIC>
36
+ </FinInstnId>
37
+ </DbtrAgt>
38
+ <ChrgBr>SLEV</ChrgBr>
39
+ <CdtTrfTxInf>
40
+ <PmtId>
41
+ <EndToEndId>NOTPROVIDED</EndToEndId>
42
+ </PmtId>
43
+ <Amt>
44
+ <InstdAmt Ccy="CHR">102.50</InstdAmt>
45
+ </Amt>
46
+ <CdtrAgt>
47
+ <FinInstnId>
48
+ <BIC>CRESCHZZ80A</BIC>
49
+ </FinInstnId>
50
+ </CdtrAgt>
51
+ <Cdtr>
52
+ <Nm>Contoso AG</Nm>
53
+ <PstlAdr>
54
+ <StrtNm>Mustergasse</StrtNm>
55
+ <BldgNb>123a</BldgNb>
56
+ <PstCd>1234</PstCd>
57
+ <TwnNm>Musterstadt</TwnNm>
58
+ <Ctry>CH</Ctry>
59
+ </PstlAdr>
60
+ </Cdtr>
61
+ <CdtrAcct>
62
+ <Id>
63
+ <IBAN>CH9300762011623852957</IBAN>
64
+ </Id>
65
+ </CdtrAcct>
66
+ </CdtTrfTxInf>
67
+ </PmtInf>
68
+ </CstmrCdtTrfInitn>
69
+ </Document>
@@ -0,0 +1,104 @@
1
+ <?xml version="1.0"?>
2
+ <Document xmlns="http://www.six-interbank-clearing.com/de/pain.008.001.02.ch.03.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.six-interbank-clearing.com/de/pain.008.001.02.ch.03.xsd pain.008.001.02.ch.03.xsd">
3
+ <CstmrDrctDbtInitn>
4
+ <GrpHdr>
5
+ <MsgId>SPS-KING/c1e3bcc1a22c941e6c631b</MsgId>
6
+ <CreDtTm>2024-06-20T17:43:31+02:00</CreDtTm>
7
+ <NbOfTxs>1</NbOfTxs>
8
+ <CtrlSum>39.99</CtrlSum>
9
+ <InitgPty>
10
+ <Nm>Glaubiger GmbH</Nm>
11
+ <Id>
12
+ <OrgId>
13
+ <Othr>
14
+ <Id>ABC1W</Id>
15
+ </Othr>
16
+ </OrgId>
17
+ </Id>
18
+ </InitgPty>
19
+ </GrpHdr>
20
+ <PmtInf>
21
+ <PmtInfId>SPS-KING/c1e3bcc1a22c941e6c631b/1</PmtInfId>
22
+ <PmtMtd>DD</PmtMtd>
23
+ <PmtTpInf>
24
+ <SvcLvl>
25
+ <Prtry>CHTA</Prtry>
26
+ </SvcLvl>
27
+ <LclInstrm>
28
+ <Prtry>LSV+</Prtry>
29
+ </LclInstrm>
30
+ </PmtTpInf>
31
+ <ReqdColltnDt>1999-01-01</ReqdColltnDt>
32
+ <Cdtr>
33
+ <Nm>Glaubiger GmbH</Nm>
34
+ </Cdtr>
35
+ <CdtrAcct>
36
+ <Id>
37
+ <IBAN>CH7081232000001998736</IBAN>
38
+ </Id>
39
+ </CdtrAcct>
40
+ <CdtrAgt>
41
+ <FinInstnId>
42
+ <ClrSysMmbId>
43
+ <MmbId>81232</MmbId>
44
+ </ClrSysMmbId>
45
+ <Othr>
46
+ <Id>010001456</Id>
47
+ </Othr>
48
+ </FinInstnId>
49
+ </CdtrAgt>
50
+ <CdtrSchmeId>
51
+ <Id>
52
+ <PrvtId>
53
+ <Othr>
54
+ <Id>ABC1W</Id>
55
+ <SchmeNm>
56
+ <Prtry>CHLS</Prtry>
57
+ </SchmeNm>
58
+ </Othr>
59
+ </PrvtId>
60
+ </Id>
61
+ </CdtrSchmeId>
62
+ <DrctDbtTxInf>
63
+ <PmtId>
64
+ <InstrId>12345</InstrId>
65
+ <EndToEndId>XYZ/2013-08-ABO/6789</EndToEndId>
66
+ </PmtId>
67
+ <InstdAmt Ccy="CHF">39.99</InstdAmt>
68
+ <DbtrAgt>
69
+ <FinInstnId>
70
+ <ClrSysMmbId>
71
+ <MmbId>4835</MmbId>
72
+ </ClrSysMmbId>
73
+ </FinInstnId>
74
+ </DbtrAgt>
75
+ <Dbtr>
76
+ <Nm>Zahlemann Soehne GbR</Nm>
77
+ <PstlAdr>
78
+ <StrtNm>Mustergasse</StrtNm>
79
+ <PstCd>1234</PstCd>
80
+ <TwnNm>Musterstadt</TwnNm>
81
+ <Ctry>CH</Ctry>
82
+ </PstlAdr>
83
+ </Dbtr>
84
+ <DbtrAcct>
85
+ <Id>
86
+ <IBAN>CH9804835011062385295</IBAN>
87
+ </Id>
88
+ </DbtrAcct>
89
+ <RmtInf>
90
+ <Strd>
91
+ <CdtrRefInf>
92
+ <Tp>
93
+ <CdOrPrtry>
94
+ <Prtry>ESR</Prtry>
95
+ </CdOrPrtry>
96
+ </Tp>
97
+ <Ref>609323234234234353453423423</Ref>
98
+ </CdtrRefInf>
99
+ </Strd>
100
+ </RmtInf>
101
+ </DrctDbtTxInf>
102
+ </PmtInf>
103
+ </CstmrDrctDbtInitn>
104
+ </Document>
@@ -0,0 +1,17 @@
1
+ RSpec.describe Epics::XE2 do
2
+
3
+ let(:client) { Epics::Client.new( File.open(File.join( File.dirname(__FILE__), '..', 'fixtures', 'SIZBN001.key')), 'secret' , 'https://194.180.18.30/ebicsweb/ebicsweb', 'SIZBN001', 'EBIX', 'EBICS') }
4
+ let(:document) { File.read( File.join( File.dirname(__FILE__), '..', 'fixtures', 'xml', 'swiss_credit_transfer.xml') ) }
5
+ subject { described_class.new(client, document) }
6
+
7
+ describe '#to_xml' do
8
+ specify { expect(subject.to_xml).to be_a_valid_ebics_doc }
9
+ end
10
+
11
+ describe '#to_transfer_xml' do
12
+ before { subject.transaction_id = SecureRandom.hex(16) }
13
+
14
+ specify { expect(subject.to_transfer_xml).to be_a_valid_ebics_doc }
15
+ end
16
+
17
+ end
@@ -0,0 +1,17 @@
1
+ RSpec.describe Epics::XE3 do
2
+
3
+ let(:client) { Epics::Client.new( File.open(File.join( File.dirname(__FILE__), '..', 'fixtures', 'SIZBN001.key')), 'secret' , 'https://194.180.18.30/ebicsweb/ebicsweb', 'SIZBN001', 'EBIX', 'EBICS') }
4
+ let(:document) { File.read( File.join( File.dirname(__FILE__), '..', 'fixtures', 'xml', 'swiss_direct_debit.xml') ) }
5
+ subject { described_class.new(client, document) }
6
+
7
+ describe '#to_xml' do
8
+ specify { expect(subject.to_xml).to be_a_valid_ebics_doc }
9
+ end
10
+
11
+ describe '#to_transfer_xml' do
12
+ before { subject.transaction_id = SecureRandom.hex(16) }
13
+
14
+ specify { expect(subject.to_transfer_xml).to be_a_valid_ebics_doc }
15
+ end
16
+
17
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: epics
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lars Brillert
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-06-19 00:00:00.000000000 Z
11
+ date: 2024-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -215,6 +215,8 @@ files:
215
215
  - lib/epics/vmk.rb
216
216
  - lib/epics/xct.rb
217
217
  - lib/epics/xds.rb
218
+ - lib/epics/xe2.rb
219
+ - lib/epics/xe3.rb
218
220
  - lib/epics/z52.rb
219
221
  - lib/epics/z53.rb
220
222
  - lib/epics/z54.rb
@@ -255,6 +257,8 @@ files:
255
257
  - spec/fixtures/xml/signature_pub_key_order_data.xml
256
258
  - spec/fixtures/xml/sta_response.xml
257
259
  - spec/fixtures/xml/sta_response_continued.xml
260
+ - spec/fixtures/xml/swiss_credit_transfer.xml
261
+ - spec/fixtures/xml/swiss_direct_debit.xml
258
262
  - spec/fixtures/xml/upload_init_response.xml
259
263
  - spec/generic_upload_spec.rb
260
264
  - spec/hpb_spec.rb
@@ -285,6 +289,8 @@ files:
285
289
  - spec/orders/sta_spec.rb
286
290
  - spec/orders/vmk_spec.rb
287
291
  - spec/orders/xds_spec.rb
292
+ - spec/orders/xe2_spec.rb
293
+ - spec/orders/xe3_spec.rb
288
294
  - spec/orders/z52_spec.rb
289
295
  - spec/orders/z53_spec.rb
290
296
  - spec/orders/z54_spec.rb
@@ -368,6 +374,8 @@ test_files:
368
374
  - spec/fixtures/xml/signature_pub_key_order_data.xml
369
375
  - spec/fixtures/xml/sta_response.xml
370
376
  - spec/fixtures/xml/sta_response_continued.xml
377
+ - spec/fixtures/xml/swiss_credit_transfer.xml
378
+ - spec/fixtures/xml/swiss_direct_debit.xml
371
379
  - spec/fixtures/xml/upload_init_response.xml
372
380
  - spec/generic_upload_spec.rb
373
381
  - spec/hpb_spec.rb
@@ -398,6 +406,8 @@ test_files:
398
406
  - spec/orders/sta_spec.rb
399
407
  - spec/orders/vmk_spec.rb
400
408
  - spec/orders/xds_spec.rb
409
+ - spec/orders/xe2_spec.rb
410
+ - spec/orders/xe3_spec.rb
401
411
  - spec/orders/z52_spec.rb
402
412
  - spec/orders/z53_spec.rb
403
413
  - spec/orders/z54_spec.rb