epics 2.5.0 → 2.6.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: 7d2540241c26353b2e1134bfed820618ed1b8470790c66985cade8d306d49b3a
4
- data.tar.gz: 6ece5e86fc70adecc140b5ed64d9d0e47c2d3c86619d5b20e9fd615bc33ded65
3
+ metadata.gz: c51d24b50fdc5705acf921ecc331fbbc504be08c1615bb1e19e5586a808549cc
4
+ data.tar.gz: 7da71fe00c348df5e32774633d6b14d1f22df867d69830811c8ed1db8c26134e
5
5
  SHA512:
6
- metadata.gz: cead2ddb91fe295b3e6a7b25723d5eb6810f836c0e74cfb3f33e1717a9d023192d289706fb84ba01897a80a6c7420dca3ab767a5d5cdc897d74612b717e86199
7
- data.tar.gz: 57a8513a4d9b6a373d8158e231779566363966a8ac6cc058a8151c6b70d905719bee7c4fa139c46d450e724da8cd372d93e68b96f45b87d21a249dbfbacdb41a
6
+ metadata.gz: d28b7833d9b95b7c849918cbda0bb5edd8e8836688989e308ab7e90f0982b2f802604ac02acff0960a644db6b3941c32ce2b055c45d00678d5a8acb0778f430b
7
+ data.tar.gz: 52bf70e50a99e2844a2c62115b6b59b3455e5fbedfcc1f575033a702a5d2838ac05fbfacb6e0438f4fee13b76e6837b6682e0aca4bb9cf6978d6eb1660317174
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  ### Unreleased
2
2
 
3
+ ### 2.6.0
4
+
5
+ - [ENHANCEMENT] Adds CIP order type (instant transfers)
6
+ - [ENHANCEMENT] Added gem metadata (thanks to @Nymuxyzo)
7
+
3
8
  ### 2.5.0
4
9
 
5
10
  - [HOUSEKEEPING] Bump XML dependency requirements to more recent versions
@@ -7,7 +12,7 @@
7
12
  - [HOUSEKEEPING] Bump ruby required version from 2.7 to 3.1
8
13
  - [ENHANCEMENT] Request Header generation more generalized (thanks to @jplot)
9
14
  - [ENHANCEMENT] Multi language support for initialization letter (thanks to @jplot)
10
- - [ENHANVEMENT] Added support for WSS and C5N order types (thanks to @kostja93)
15
+ - [ENHANCEMENT] Added support for WSS and C5N order types (thanks to @kostja93)
11
16
 
12
17
  ### 2.4.0
13
18
 
data/epics.gemspec CHANGED
@@ -33,6 +33,10 @@ Gem::Specification.new do |spec|
33
33
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
34
34
  spec.require_paths = ['lib']
35
35
 
36
+ spec.metadata['changelog_uri'] = 'https://github.com/railslove/epics/blob/master/CHANGELOG.md'
37
+ spec.metadata['source_code_uri'] = 'https://github.com/railslove/epics'
38
+ spec.metadata['bug_tracker_uri'] = 'https://github.com/railslove/epics/issues'
39
+
36
40
  spec.post_install_message = "\n\e[32m" + ('*' * 60) + "\n\e[0m"
37
41
  spec.post_install_message += "Thanks for using Epics - your epic EBICS client!\n"
38
42
  spec.post_install_message += "Epics provides a full production-tested implementation of the Electronic Banking Internet Communication Standard.\n"
data/lib/epics/cip.rb ADDED
@@ -0,0 +1,13 @@
1
+ class Epics::CIP < Epics::GenericUploadRequest
2
+ def header
3
+ client.header_request.build(
4
+ nonce: nonce,
5
+ timestamp: timestamp,
6
+ order_type: 'CIP',
7
+ order_attribute: 'OZHNN',
8
+ order_params: {},
9
+ num_segments: 1,
10
+ mutable: { TransactionPhase: 'Initialisation' }
11
+ )
12
+ end
13
+ end
data/lib/epics/client.rb CHANGED
@@ -166,6 +166,10 @@ class Epics::Client
166
166
  upload(Epics::CCT, document)
167
167
  end
168
168
 
169
+ def CIP(document)
170
+ upload(Epics::CIP, document)
171
+ end
172
+
169
173
  def CCS(document)
170
174
  upload(Epics::CCS, document)
171
175
  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.5.0'
4
+ VERSION = '2.6.0'
5
5
  end
data/lib/epics.rb CHANGED
@@ -40,6 +40,7 @@ require "epics/hpd"
40
40
  require "epics/cd1"
41
41
  require "epics/cct"
42
42
  require "epics/ccs"
43
+ require "epics/cip"
43
44
  require "epics/cdb"
44
45
  require "epics/cdd"
45
46
  require "epics/xe2"
data/spec/client_spec.rb CHANGED
@@ -88,7 +88,7 @@ RSpec.describe Epics::Client do
88
88
  end
89
89
 
90
90
  it 'extracts the accessible order types of a subscriber' do
91
- expect(subject.order_types).to match_array(%w(PTK HPD HTD STA HVD HPB HAA HVT HVU HVZ INI SPR PUB HIA HCA HSA HVE HVS CCS CCT CD1 CDB CDD))
91
+ expect(subject.order_types).to match_array(%w(PTK HPD HTD STA HVD HPB HAA HVT HVU HVZ INI SPR PUB HIA HCA HSA HVE HVS CCS CCT CIP CD1 CDB CDD))
92
92
  end
93
93
  end
94
94
 
@@ -0,0 +1,86 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.09" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:iso:std:iso:20022:tech:xsd:pain.001.001.09 pain.001.001.09.xsd">
3
+ <CstmrCdtTrfInitn>
4
+ <GrpHdr>
5
+ <MsgId>Message-ID-0815</MsgId>
6
+ <CreDtTm>2022-09-15T09:31:39.000Z</CreDtTm>
7
+ <NbOfTxs>2</NbOfTxs>
8
+ <CtrlSum>1122.33</CtrlSum>
9
+ <InitgPty>
10
+ <Nm>Initiator Name</Nm>
11
+ </InitgPty>
12
+ </GrpHdr>
13
+ <PmtInf>
14
+ <PmtInfId>Payment-Information-ID-0815</PmtInfId>
15
+ <PmtMtd>TRF</PmtMtd>
16
+ <BtchBookg>true</BtchBookg>
17
+ <NbOfTxs>2</NbOfTxs>
18
+ <CtrlSum>1122.33</CtrlSum>
19
+ <PmtTpInf>
20
+ <SvcLvl>
21
+ <Cd>SEPA</Cd>
22
+ </SvcLvl>
23
+ <LclInstrm>
24
+ <Cd>INST</Cd>
25
+ </LclInstrm>
26
+ </PmtTpInf>
27
+ <ReqdExctnDt>
28
+ <DtTm>2022-09-16T10:00:00</DtTm>
29
+ </ReqdExctnDt>
30
+ <Dbtr>
31
+ <Nm>Herr Schnellzahler</Nm>
32
+ </Dbtr>
33
+ <DbtrAcct>
34
+ <Id>
35
+ <IBAN>DE89370400440532013000</IBAN>
36
+ </Id>
37
+ </DbtrAcct>
38
+ <DbtrAgt>
39
+ <FinInstnId>
40
+ <Othr>
41
+ <Id>NOTPROVIDED</Id>
42
+ </Othr>
43
+ </FinInstnId>
44
+ </DbtrAgt>
45
+ <ChrgBr>SLEV</ChrgBr>
46
+ <CdtTrfTxInf>
47
+ <PmtId>
48
+ <EndToEndId>OriginID1</EndToEndId>
49
+ </PmtId>
50
+ <Amt>
51
+ <InstdAmt Ccy="EUR">1022.00</InstdAmt>
52
+ </Amt>
53
+ <Cdtr>
54
+ <Nm>John Dough</Nm>
55
+ </Cdtr>
56
+ <CdtrAcct>
57
+ <Id>
58
+ <IBAN>AT611904300234573201</IBAN>
59
+ </Id>
60
+ </CdtrAcct>
61
+ <RmtInf>
62
+ <Ustrd>Unstructured Remittance Information</Ustrd>
63
+ </RmtInf>
64
+ </CdtTrfTxInf>
65
+ <CdtTrfTxInf>
66
+ <PmtId>
67
+ <EndToEndId>OriginID2</EndToEndId>
68
+ </PmtId>
69
+ <Amt>
70
+ <InstdAmt Ccy="EUR">100.33</InstdAmt>
71
+ </Amt>
72
+ <Cdtr>
73
+ <Nm>Cookie Cutter</Nm>
74
+ </Cdtr>
75
+ <CdtrAcct>
76
+ <Id>
77
+ <IBAN>AT611904300234573201</IBAN>
78
+ </Id>
79
+ </CdtrAcct>
80
+ <RmtInf>
81
+ <Ustrd>Unstructured Remittance Information</Ustrd>
82
+ </RmtInf>
83
+ </CdtTrfTxInf>
84
+ </PmtInf>
85
+ </CstmrCdtTrfInitn>
86
+ </Document>
@@ -127,6 +127,12 @@
127
127
  <Description>Credit Transfer Initiation</Description>
128
128
  <NumSigRequired>1</NumSigRequired>
129
129
  </OrderInfo>
130
+ <OrderInfo>
131
+ <OrderType>CIP</OrderType>
132
+ <TransferType>Upload</TransferType>
133
+ <Description>Instant Credit Transfer Initiation</Description>
134
+ <NumSigRequired>1</NumSigRequired>
135
+ </OrderInfo>
130
136
  <OrderInfo>
131
137
  <OrderType>CD1</OrderType>
132
138
  <TransferType>Upload</TransferType>
@@ -153,7 +159,7 @@
153
159
  <OrderTypes>PTK HPD HTD STA HVD HPB HAA HVT HVU HVZ</OrderTypes>
154
160
  </Permission>
155
161
  <Permission AuthorisationLevel="E">
156
- <OrderTypes>INI SPR PUB HIA HCA HSA HVE HVS CCS CCT CD1 CDB CDD</OrderTypes>
162
+ <OrderTypes>INI SPR PUB HIA HCA HSA HVE HVS CCS CCT CIP CD1 CDB CDD</OrderTypes>
157
163
  </Permission>
158
164
  </UserInfo>
159
165
  </HTDResponseOrderData>
@@ -0,0 +1,23 @@
1
+ RSpec.describe Epics::CIP 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', 'cip.xml') ) }
5
+ subject { described_class.new(client, document) }
6
+
7
+ describe 'order attributes' do
8
+ it { expect(subject.header.to_s).to include('<OrderAttribute>OZHNN</OrderAttribute>') }
9
+ it { expect(subject.header.to_s).to include('<OrderType>CIP</OrderType>') }
10
+ end
11
+
12
+ describe '#to_xml' do
13
+ specify { expect(subject.to_xml).to be_a_valid_ebics_doc }
14
+ end
15
+
16
+ describe '#to_transfer_xml' do
17
+ before { subject.transaction_id = SecureRandom.hex(16) }
18
+
19
+ specify { expect(subject.to_transfer_xml).to be_a_valid_ebics_doc }
20
+ end
21
+
22
+ end
23
+
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.5.0
4
+ version: 2.6.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-11-20 00:00:00.000000000 Z
11
+ date: 2024-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -206,6 +206,7 @@ files:
206
206
  - lib/epics/cdd.rb
207
207
  - lib/epics/cds.rb
208
208
  - lib/epics/cdz.rb
209
+ - lib/epics/cip.rb
209
210
  - lib/epics/client.rb
210
211
  - lib/epics/crz.rb
211
212
  - lib/epics/error.rb
@@ -258,6 +259,7 @@ files:
258
259
  - spec/fixtures/xml/cdb.xml
259
260
  - spec/fixtures/xml/cdb_init_response.xml
260
261
  - spec/fixtures/xml/cdb_transfer_response.xml
262
+ - spec/fixtures/xml/cip.xml
261
263
  - spec/fixtures/xml/ebics_business_nok.xml
262
264
  - spec/fixtures/xml/ebics_technical_nok.xml
263
265
  - spec/fixtures/xml/haa.xml
@@ -298,6 +300,7 @@ files:
298
300
  - spec/orders/cdb_spec.rb
299
301
  - spec/orders/cdd_spec.rb
300
302
  - spec/orders/cdz_spec.rb
303
+ - spec/orders/cip_spec.rb
301
304
  - spec/orders/crz_spec.rb
302
305
  - spec/orders/haa_spec.rb
303
306
  - spec/orders/hac_spec.rb
@@ -334,7 +337,10 @@ files:
334
337
  homepage: https://github.com/railslove/epics
335
338
  licenses:
336
339
  - LGPL-3.0
337
- metadata: {}
340
+ metadata:
341
+ changelog_uri: https://github.com/railslove/epics/blob/master/CHANGELOG.md
342
+ source_code_uri: https://github.com/railslove/epics
343
+ bug_tracker_uri: https://github.com/railslove/epics/issues
338
344
  post_install_message: "\n\e[32m************************************************************\n\e[0mThanks
339
345
  for using Epics - your epic EBICS client!\nEpics provides a full production-tested
340
346
  implementation of the Electronic Banking Internet Communication Standard.\nRailslove
@@ -356,7 +362,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
356
362
  - !ruby/object:Gem::Version
357
363
  version: '0'
358
364
  requirements: []
359
- rubygems_version: 3.5.23
365
+ rubygems_version: 3.5.19
360
366
  signing_key:
361
367
  specification_version: 4
362
368
  summary: a ruby implementation of the EBICS protocol
@@ -377,6 +383,7 @@ test_files:
377
383
  - spec/fixtures/xml/cdb.xml
378
384
  - spec/fixtures/xml/cdb_init_response.xml
379
385
  - spec/fixtures/xml/cdb_transfer_response.xml
386
+ - spec/fixtures/xml/cip.xml
380
387
  - spec/fixtures/xml/ebics_business_nok.xml
381
388
  - spec/fixtures/xml/ebics_technical_nok.xml
382
389
  - spec/fixtures/xml/haa.xml
@@ -417,6 +424,7 @@ test_files:
417
424
  - spec/orders/cdb_spec.rb
418
425
  - spec/orders/cdd_spec.rb
419
426
  - spec/orders/cdz_spec.rb
427
+ - spec/orders/cip_spec.rb
420
428
  - spec/orders/crz_spec.rb
421
429
  - spec/orders/haa_spec.rb
422
430
  - spec/orders/hac_spec.rb