epics 2.10.0 → 2.11.0

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: 33e735bd9012ec4df1bc24d5f1621345adfa6aeba90dbf5c3adcc9be9673c696
4
- data.tar.gz: f8c5b93115aeb9b60d3be9cbcd36251b6046f5093ed92482c2b4b1d8d4555e90
3
+ metadata.gz: 1a9354e4e83108afe41607057bd8ce1fcba27fc03476a521269911f1f1fea57f
4
+ data.tar.gz: 82333eed938cdb0a31fcb54b206a6c5653eef950ee7b120f9487de012e4b22f0
5
5
  SHA512:
6
- metadata.gz: 6021ed35c892dc544032a95e89ef5a8361f27ea022a5a2776dfea3adea1e7ebbbb2642e145a0c4efb01157c228953c171a511747d21087e520a1b59411f82f81
7
- data.tar.gz: 71ef90f98028d9e4bff31aa077d52fdbd7cadc12e8126792f7e71bb6e00b4b409a1ad9e36b54e2e345115e602734a7ddaaa26f3b214e54503055929a5600f114
6
+ metadata.gz: 9d74d5100f8698e179df3d9b7eb3f3b3154d64313b975e6645b99ebdfd389e6b1695021640f39b753c685d47055216bf2ecda404c01b1c32f049f16b4caae769
7
+ data.tar.gz: 3d79c5800b76e7dfbe259e27e8ae1d1f14a77dc99a5b676603bd184a3cff5d3780682f13b14c796a0f92182805cec119ddf4dd585977b4b81f2c0195df00cd2d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ### Unreleased
2
2
 
3
+ ### 2.11.0
4
+
5
+ - [ENHANCEMENT] Added FUL order type (thanks to @scollon-pl)
6
+
3
7
  ### 2.10.0
4
8
 
5
9
  - [ENHANCEMENT] Added X.509 certificates support for INI and HIA (thanks to @vnoviskyi)
data/README.md CHANGED
@@ -10,7 +10,7 @@ It supports EBICS 2.5.
10
10
 
11
11
  The client supports the complete initialization process comprising INI, HIA and HPB including the
12
12
  INI letter generation. It offers support for the most common download and upload order types
13
- (STA HAA HTD HPD PTK HAC HKD BKA C52 C53 C54 CD1 CDB CDD CCT VMK FDL).
13
+ (STA HAA HTD HPD PTK HAC HKD BKA C52 C53 C54 CD1 CDB CDD CCT VMK FDL FUL).
14
14
 
15
15
  ## Installation
16
16
 
data/lib/epics/client.rb CHANGED
@@ -193,6 +193,10 @@ class Epics::Client
193
193
  upload(Epics::XCT, document)
194
194
  end
195
195
 
196
+ def FUL(document)
197
+ upload(Epics::FUL, document)
198
+ end
199
+
196
200
  def STA(from = nil, to = nil)
197
201
  download(Epics::STA, from: from, to: to)
198
202
  end
data/lib/epics/ful.rb ADDED
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Epics::FUL < Epics::GenericUploadRequest
4
+ def header
5
+ ful_order_params = Hash.new.tap do |params|
6
+ params[:FileFormat] = options[:file_format]
7
+ end
8
+
9
+ client.header_request.build(
10
+ nonce: nonce,
11
+ timestamp: timestamp,
12
+ order_type: 'FUL',
13
+ order_attribute: 'DZHNN',
14
+ custom_order_params: { FULOrderParams: ful_order_params },
15
+ mutable: { TransactionPhase: 'Initialisation' }
16
+ )
17
+ end
18
+ 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.10.0'
4
+ VERSION = '2.11.0'
5
5
  end
data/lib/epics.rb CHANGED
@@ -26,6 +26,7 @@ require "epics/htd"
26
26
  require "epics/haa"
27
27
  require "epics/sta"
28
28
  require "epics/fdl"
29
+ require "epics/ful"
29
30
  require "epics/vmk"
30
31
  require "epics/bka"
31
32
  require "epics/c52"
@@ -0,0 +1,22 @@
1
+ RSpec.describe Epics::FUL do
2
+ 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') }
3
+ let(:document) { File.read( File.join( File.dirname(__FILE__), '..', 'fixtures', 'xml', 'cd1.xml') ) }
4
+
5
+ subject { described_class.new(client, document, file_format: 'pain.001.001.02') }
6
+
7
+ describe 'order attributes' do
8
+ it { expect(subject.header.to_s).to include('<OrderAttribute>DZHNN</OrderAttribute>') }
9
+ it { expect(subject.header.to_s).to include('<OrderType>FUL</OrderType>') }
10
+ it { expect(subject.header.to_s).to include('<FileFormat>pain.001.001.02</FileFormat>') }
11
+ end
12
+
13
+ describe '#to_xml' do
14
+ specify { expect(subject.to_xml).to be_a_valid_ebics_doc }
15
+ end
16
+
17
+ describe '#to_transfer_xml' do
18
+ before { subject.transaction_id = SecureRandom.hex(16) }
19
+
20
+ specify { expect(subject.to_transfer_xml).to be_a_valid_ebics_doc }
21
+ end
22
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: epics
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.10.0
4
+ version: 2.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lars Brillert
@@ -243,6 +243,7 @@ files:
243
243
  - lib/epics/crz.rb
244
244
  - lib/epics/error.rb
245
245
  - lib/epics/fdl.rb
246
+ - lib/epics/ful.rb
246
247
  - lib/epics/generic_request.rb
247
248
  - lib/epics/generic_upload_request.rb
248
249
  - lib/epics/haa.rb
@@ -341,6 +342,7 @@ files:
341
342
  - spec/orders/cip_spec.rb
342
343
  - spec/orders/crz_spec.rb
343
344
  - spec/orders/fdl_spec.rb
345
+ - spec/orders/ful_spec.rb
344
346
  - spec/orders/haa_spec.rb
345
347
  - spec/orders/hac_spec.rb
346
348
  - spec/orders/hev_spec.rb
@@ -405,7 +407,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
405
407
  - !ruby/object:Gem::Version
406
408
  version: '0'
407
409
  requirements: []
408
- rubygems_version: 3.6.8
410
+ rubygems_version: 3.7.1
409
411
  specification_version: 4
410
412
  summary: a ruby implementation of the EBICS protocol
411
413
  test_files:
@@ -470,6 +472,7 @@ test_files:
470
472
  - spec/orders/cip_spec.rb
471
473
  - spec/orders/crz_spec.rb
472
474
  - spec/orders/fdl_spec.rb
475
+ - spec/orders/ful_spec.rb
473
476
  - spec/orders/haa_spec.rb
474
477
  - spec/orders/hac_spec.rb
475
478
  - spec/orders/hev_spec.rb