epics 2.4.0 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.semaphore/semaphore.yml +3 -12
- data/CHANGELOG.md +14 -0
- data/epics.gemspec +9 -4
- data/lib/epics/azv.rb +9 -26
- data/lib/epics/b2b.rb +11 -3
- data/lib/epics/c2s.rb +11 -7
- data/lib/epics/c52.rb +12 -37
- data/lib/epics/c53.rb +12 -37
- data/lib/epics/c54.rb +12 -37
- data/lib/epics/c5n.rb +17 -0
- data/lib/epics/ccs.rb +11 -7
- data/lib/epics/cct.rb +9 -34
- data/lib/epics/cd1.rb +9 -26
- data/lib/epics/cdb.rb +9 -34
- data/lib/epics/cdd.rb +9 -34
- data/lib/epics/cds.rb +11 -7
- data/lib/epics/cdz.rb +12 -41
- data/lib/epics/cip.rb +13 -0
- data/lib/epics/client.rb +40 -19
- data/lib/epics/crz.rb +12 -41
- data/lib/epics/generic_request.rb +8 -3
- data/lib/epics/generic_upload_request.rb +2 -2
- data/lib/epics/haa.rb +8 -25
- data/lib/epics/hac.rb +12 -41
- data/lib/epics/header_request.rb +60 -0
- data/lib/epics/hia.rb +6 -16
- data/lib/epics/hkd.rb +8 -25
- data/lib/epics/hpb.rb +8 -18
- data/lib/epics/hpd.rb +8 -25
- data/lib/epics/htd.rb +8 -25
- data/lib/epics/ini.rb +6 -16
- data/lib/epics/letter_renderer.rb +22 -0
- data/lib/epics/ptk.rb +12 -41
- data/lib/epics/sta.rb +12 -41
- data/lib/epics/version.rb +1 -1
- data/lib/epics/vmk.rb +12 -41
- data/lib/epics/wss.rb +13 -0
- data/lib/epics/xct.rb +9 -26
- data/lib/epics/xds.rb +11 -3
- data/lib/epics/xe2.rb +11 -3
- data/lib/epics/xe3.rb +11 -3
- data/lib/epics/z52.rb +12 -37
- data/lib/epics/z53.rb +12 -37
- data/lib/epics/z54.rb +12 -37
- data/lib/epics.rb +8 -0
- data/lib/letter/ini.erb +260 -150
- data/lib/letter/locales/de.yml +19 -0
- data/lib/letter/locales/en.yml +19 -0
- data/lib/letter/locales/fr.yml +19 -0
- data/spec/client_spec.rb +1 -1
- data/spec/fixtures/xml/cip.xml +86 -0
- data/spec/fixtures/xml/htd_order_data.xml +7 -1
- data/spec/hpb_spec.rb +4 -4
- data/spec/orders/c52_spec.rb +1 -1
- data/spec/orders/c53_spec.rb +1 -1
- data/spec/orders/c54_spec.rb +1 -1
- data/spec/orders/c5n_spec.rb +9 -0
- data/spec/orders/cdz_spec.rb +1 -1
- data/spec/orders/cip_spec.rb +23 -0
- data/spec/orders/crz_spec.rb +1 -1
- data/spec/orders/hac_spec.rb +1 -1
- data/spec/orders/ptk_spec.rb +1 -1
- data/spec/orders/sta_spec.rb +1 -1
- data/spec/orders/vmk_spec.rb +1 -1
- data/spec/orders/wss_spec.rb +9 -0
- data/spec/orders/z52_spec.rb +1 -1
- data/spec/orders/z53_spec.rb +1 -1
- data/spec/orders/z54_spec.rb +1 -1
- metadata +44 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c51d24b50fdc5705acf921ecc331fbbc504be08c1615bb1e19e5586a808549cc
|
4
|
+
data.tar.gz: 7da71fe00c348df5e32774633d6b14d1f22df867d69830811c8ed1db8c26134e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d28b7833d9b95b7c849918cbda0bb5edd8e8836688989e308ab7e90f0982b2f802604ac02acff0960a644db6b3941c32ce2b055c45d00678d5a8acb0778f430b
|
7
|
+
data.tar.gz: 52bf70e50a99e2844a2c62115b6b59b3455e5fbedfcc1f575033a702a5d2838ac05fbfacb6e0438f4fee13b76e6837b6682e0aca4bb9cf6978d6eb1660317174
|
data/.semaphore/semaphore.yml
CHANGED
@@ -16,21 +16,12 @@ blocks:
|
|
16
16
|
- name: Spec versions
|
17
17
|
task:
|
18
18
|
jobs:
|
19
|
-
- name: "3.0"
|
20
|
-
commands:
|
21
|
-
- checkout
|
22
|
-
- sem-version ruby 3.0
|
23
|
-
- cache restore
|
24
|
-
- gem install bundler:2.4.22
|
25
|
-
- bundle install
|
26
|
-
- cache store
|
27
|
-
- bundle exec rspec
|
28
19
|
- name: "3.1"
|
29
20
|
commands:
|
30
21
|
- checkout
|
31
22
|
- sem-version ruby 3.1
|
32
23
|
- cache restore
|
33
|
-
- gem install bundler:2.
|
24
|
+
- gem install bundler:2.5.19
|
34
25
|
- bundle install
|
35
26
|
- cache store
|
36
27
|
- bundle exec rspec
|
@@ -39,7 +30,7 @@ blocks:
|
|
39
30
|
- checkout
|
40
31
|
- sem-version ruby 3.2
|
41
32
|
- cache restore
|
42
|
-
- gem install bundler:2.
|
33
|
+
- gem install bundler:2.5.19
|
43
34
|
- bundle install
|
44
35
|
- cache store
|
45
36
|
- bundle exec rspec
|
@@ -48,7 +39,7 @@ blocks:
|
|
48
39
|
- checkout
|
49
40
|
- sem-version ruby 3.3
|
50
41
|
- cache restore
|
51
|
-
- gem install bundler:2.
|
42
|
+
- gem install bundler:2.5.19
|
52
43
|
- bundle install
|
53
44
|
- cache store
|
54
45
|
- bundle exec rspec
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
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
|
+
|
8
|
+
### 2.5.0
|
9
|
+
|
10
|
+
- [HOUSEKEEPING] Bump XML dependency requirements to more recent versions
|
11
|
+
- [HOUSEKEEPING] Bump bundler version to 2.5.19
|
12
|
+
- [HOUSEKEEPING] Bump ruby required version from 2.7 to 3.1
|
13
|
+
- [ENHANCEMENT] Request Header generation more generalized (thanks to @jplot)
|
14
|
+
- [ENHANCEMENT] Multi language support for initialization letter (thanks to @jplot)
|
15
|
+
- [ENHANCEMENT] Added support for WSS and C5N order types (thanks to @kostja93)
|
16
|
+
|
3
17
|
### 2.4.0
|
4
18
|
|
5
19
|
- [ENHANCEMENT] Adds XE2 and XE3 order type (CCT and CDD for swiss banks)
|
data/epics.gemspec
CHANGED
@@ -26,13 +26,17 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.homepage = 'https://github.com/railslove/epics'
|
27
27
|
spec.license = 'LGPL-3.0'
|
28
28
|
|
29
|
-
spec.required_ruby_version = '>=
|
29
|
+
spec.required_ruby_version = '>= 3.1'
|
30
30
|
|
31
31
|
spec.files = `git ls-files -z`.split("\x0")
|
32
32
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
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"
|
@@ -41,11 +45,12 @@ Gem::Specification.new do |spec|
|
|
41
45
|
spec.post_install_message += "\e[32m" + ('*' * 60) + "\n\e[0m"
|
42
46
|
|
43
47
|
spec.add_dependency 'faraday', '>= 1.10.0'
|
44
|
-
spec.add_dependency '
|
48
|
+
spec.add_dependency 'i18n', '>= 1.1.0'
|
49
|
+
spec.add_dependency 'nokogiri', '>= 1.16.7'
|
45
50
|
spec.add_dependency 'rubyzip', '>= 2.3.2'
|
46
|
-
spec.add_dependency 'rexml', '>= 3.
|
51
|
+
spec.add_dependency 'rexml', '>= 3.3.7'
|
47
52
|
|
48
|
-
spec.add_development_dependency 'bundler', '>= 2.
|
53
|
+
spec.add_development_dependency 'bundler', '>= 2.5.19'
|
49
54
|
spec.add_development_dependency 'equivalent-xml'
|
50
55
|
spec.add_development_dependency 'pry'
|
51
56
|
spec.add_development_dependency 'rake', '~> 13.0'
|
data/lib/epics/azv.rb
CHANGED
@@ -1,30 +1,13 @@
|
|
1
1
|
class Epics::AZV < Epics::GenericUploadRequest
|
2
2
|
def header
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
xml.OrderDetails {
|
13
|
-
xml.OrderType 'CD1'
|
14
|
-
xml.OrderAttribute 'OZHNN'
|
15
|
-
xml.StandardOrderParams
|
16
|
-
}
|
17
|
-
xml.BankPubKeyDigests {
|
18
|
-
xml.Authentication(client.bank_x.public_digest, Version: 'X002', Algorithm: "http://www.w3.org/2001/04/xmlenc#sha256")
|
19
|
-
xml.Encryption(client.bank_e.public_digest, Version: 'E002', Algorithm: "http://www.w3.org/2001/04/xmlenc#sha256" )
|
20
|
-
}
|
21
|
-
xml.SecurityMedium '0000'
|
22
|
-
xml.NumSegments 1
|
23
|
-
}
|
24
|
-
xml.mutable {
|
25
|
-
xml.TransactionPhase 'Initialisation'
|
26
|
-
}
|
27
|
-
}
|
28
|
-
end.doc.root
|
3
|
+
client.header_request.build(
|
4
|
+
nonce: nonce,
|
5
|
+
timestamp: timestamp,
|
6
|
+
order_type: 'CD1',
|
7
|
+
order_attribute: 'OZHNN',
|
8
|
+
order_params: {},
|
9
|
+
num_segments: 1,
|
10
|
+
mutable: { TransactionPhase: 'Initialisation' }
|
11
|
+
)
|
29
12
|
end
|
30
13
|
end
|
data/lib/epics/b2b.rb
CHANGED
@@ -1,5 +1,13 @@
|
|
1
|
-
class Epics::B2B < Epics::
|
2
|
-
def
|
3
|
-
|
1
|
+
class Epics::B2B < Epics::GenericUploadRequest
|
2
|
+
def header
|
3
|
+
client.header_request.build(
|
4
|
+
nonce: nonce,
|
5
|
+
timestamp: timestamp,
|
6
|
+
order_type: 'B2B',
|
7
|
+
order_attribute: 'OZHNN',
|
8
|
+
order_params: {},
|
9
|
+
num_segments: 1,
|
10
|
+
mutable: { TransactionPhase: 'Initialisation' }
|
11
|
+
)
|
4
12
|
end
|
5
13
|
end
|
data/lib/epics/c2s.rb
CHANGED
@@ -1,9 +1,13 @@
|
|
1
|
-
class Epics::C2S < Epics::
|
2
|
-
def
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
1
|
+
class Epics::C2S < Epics::GenericUploadRequest
|
2
|
+
def header
|
3
|
+
client.header_request.build(
|
4
|
+
nonce: nonce,
|
5
|
+
timestamp: timestamp,
|
6
|
+
order_type: 'C2S',
|
7
|
+
order_attribute: 'DZHNN',
|
8
|
+
order_params: {},
|
9
|
+
num_segments: 1,
|
10
|
+
mutable: { TransactionPhase: 'Initialisation' }
|
11
|
+
)
|
8
12
|
end
|
9
13
|
end
|
data/lib/epics/c52.rb
CHANGED
@@ -1,42 +1,17 @@
|
|
1
1
|
class Epics::C52 < Epics::GenericRequest
|
2
|
-
attr_accessor :from, :to
|
3
|
-
|
4
|
-
def initialize(client, from, to)
|
5
|
-
super(client)
|
6
|
-
self.from = from
|
7
|
-
self.to = to
|
8
|
-
end
|
9
|
-
|
10
2
|
def header
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
xml.OrderDetails {
|
21
|
-
xml.OrderType 'C52'
|
22
|
-
xml.OrderAttribute 'DZHNN'
|
23
|
-
xml.StandardOrderParams {
|
24
|
-
xml.DateRange {
|
25
|
-
xml.Start from
|
26
|
-
xml.End to
|
27
|
-
}
|
28
|
-
}
|
29
|
-
}
|
30
|
-
xml.BankPubKeyDigests {
|
31
|
-
xml.Authentication(client.bank_x.public_digest, Version: 'X002', Algorithm: "http://www.w3.org/2001/04/xmlenc#sha256")
|
32
|
-
xml.Encryption(client.bank_e.public_digest, Version: 'E002', Algorithm: "http://www.w3.org/2001/04/xmlenc#sha256" )
|
33
|
-
}
|
34
|
-
xml.SecurityMedium '0000'
|
35
|
-
}
|
36
|
-
xml.mutable {
|
37
|
-
xml.TransactionPhase 'Initialisation'
|
3
|
+
client.header_request.build(
|
4
|
+
nonce: nonce,
|
5
|
+
timestamp: timestamp,
|
6
|
+
order_type: 'C52',
|
7
|
+
order_attribute: 'DZHNN',
|
8
|
+
order_params: {
|
9
|
+
DateRange: {
|
10
|
+
Start: options[:from],
|
11
|
+
End: options[:to]
|
38
12
|
}
|
39
|
-
}
|
40
|
-
|
13
|
+
},
|
14
|
+
mutable: { TransactionPhase: 'Initialisation' }
|
15
|
+
)
|
41
16
|
end
|
42
17
|
end
|
data/lib/epics/c53.rb
CHANGED
@@ -1,42 +1,17 @@
|
|
1
1
|
class Epics::C53 < Epics::GenericRequest
|
2
|
-
attr_accessor :from, :to
|
3
|
-
|
4
|
-
def initialize(client, from, to)
|
5
|
-
super(client)
|
6
|
-
self.from = from
|
7
|
-
self.to = to
|
8
|
-
end
|
9
|
-
|
10
2
|
def header
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
xml.OrderDetails {
|
21
|
-
xml.OrderType 'C53'
|
22
|
-
xml.OrderAttribute 'DZHNN'
|
23
|
-
xml.StandardOrderParams {
|
24
|
-
xml.DateRange {
|
25
|
-
xml.Start from
|
26
|
-
xml.End to
|
27
|
-
}
|
28
|
-
}
|
29
|
-
}
|
30
|
-
xml.BankPubKeyDigests {
|
31
|
-
xml.Authentication(client.bank_x.public_digest, Version: 'X002', Algorithm: "http://www.w3.org/2001/04/xmlenc#sha256")
|
32
|
-
xml.Encryption(client.bank_e.public_digest, Version: 'E002', Algorithm: "http://www.w3.org/2001/04/xmlenc#sha256" )
|
33
|
-
}
|
34
|
-
xml.SecurityMedium '0000'
|
35
|
-
}
|
36
|
-
xml.mutable {
|
37
|
-
xml.TransactionPhase 'Initialisation'
|
3
|
+
client.header_request.build(
|
4
|
+
nonce: nonce,
|
5
|
+
timestamp: timestamp,
|
6
|
+
order_type: 'C53',
|
7
|
+
order_attribute: 'DZHNN',
|
8
|
+
order_params: {
|
9
|
+
DateRange: {
|
10
|
+
Start: options[:from],
|
11
|
+
End: options[:to]
|
38
12
|
}
|
39
|
-
}
|
40
|
-
|
13
|
+
},
|
14
|
+
mutable: { TransactionPhase: 'Initialisation' }
|
15
|
+
)
|
41
16
|
end
|
42
17
|
end
|
data/lib/epics/c54.rb
CHANGED
@@ -1,42 +1,17 @@
|
|
1
1
|
class Epics::C54 < Epics::GenericRequest
|
2
|
-
attr_accessor :from, :to
|
3
|
-
|
4
|
-
def initialize(client, from, to)
|
5
|
-
super(client)
|
6
|
-
self.from = from
|
7
|
-
self.to = to
|
8
|
-
end
|
9
|
-
|
10
2
|
def header
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
xml.OrderDetails {
|
21
|
-
xml.OrderType 'C54'
|
22
|
-
xml.OrderAttribute 'DZHNN'
|
23
|
-
xml.StandardOrderParams {
|
24
|
-
xml.DateRange {
|
25
|
-
xml.Start from
|
26
|
-
xml.End to
|
27
|
-
}
|
28
|
-
}
|
29
|
-
}
|
30
|
-
xml.BankPubKeyDigests {
|
31
|
-
xml.Authentication(client.bank_x.public_digest, Version: 'X002', Algorithm: "http://www.w3.org/2001/04/xmlenc#sha256")
|
32
|
-
xml.Encryption(client.bank_e.public_digest, Version: 'E002', Algorithm: "http://www.w3.org/2001/04/xmlenc#sha256" )
|
33
|
-
}
|
34
|
-
xml.SecurityMedium '0000'
|
35
|
-
}
|
36
|
-
xml.mutable {
|
37
|
-
xml.TransactionPhase 'Initialisation'
|
3
|
+
client.header_request.build(
|
4
|
+
nonce: nonce,
|
5
|
+
timestamp: timestamp,
|
6
|
+
order_type: 'C54',
|
7
|
+
order_attribute: 'DZHNN',
|
8
|
+
order_params: {
|
9
|
+
DateRange: {
|
10
|
+
Start: options[:from],
|
11
|
+
End: options[:to]
|
38
12
|
}
|
39
|
-
}
|
40
|
-
|
13
|
+
},
|
14
|
+
mutable: { TransactionPhase: 'Initialisation' }
|
15
|
+
)
|
41
16
|
end
|
42
17
|
end
|
data/lib/epics/c5n.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
class Epics::C5N < Epics::GenericRequest
|
2
|
+
def header
|
3
|
+
client.header_request.build(
|
4
|
+
nonce: nonce,
|
5
|
+
timestamp: timestamp,
|
6
|
+
order_type: 'C5N',
|
7
|
+
order_attribute: 'DZHNN',
|
8
|
+
order_params: {
|
9
|
+
DateRange: {
|
10
|
+
Start: options[:from],
|
11
|
+
End: options[:to]
|
12
|
+
}
|
13
|
+
},
|
14
|
+
mutable: { TransactionPhase: 'Initialisation' }
|
15
|
+
)
|
16
|
+
end
|
17
|
+
end
|
data/lib/epics/ccs.rb
CHANGED
@@ -1,9 +1,13 @@
|
|
1
|
-
class Epics::CCS < Epics::
|
2
|
-
def
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
1
|
+
class Epics::CCS < Epics::GenericUploadRequest
|
2
|
+
def header
|
3
|
+
client.header_request.build(
|
4
|
+
nonce: nonce,
|
5
|
+
timestamp: timestamp,
|
6
|
+
order_type: 'CCS',
|
7
|
+
order_attribute: 'DZHNN',
|
8
|
+
order_params: {},
|
9
|
+
num_segments: 1,
|
10
|
+
mutable: { TransactionPhase: 'Initialisation' }
|
11
|
+
)
|
8
12
|
end
|
9
13
|
end
|
data/lib/epics/cct.rb
CHANGED
@@ -1,38 +1,13 @@
|
|
1
1
|
class Epics::CCT < Epics::GenericUploadRequest
|
2
|
-
def order_attribute
|
3
|
-
'OZHNN'
|
4
|
-
end
|
5
|
-
|
6
|
-
def order_type
|
7
|
-
'CCT'
|
8
|
-
end
|
9
|
-
|
10
2
|
def header
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
xml.OrderDetails {
|
21
|
-
xml.OrderType order_type
|
22
|
-
xml.OrderAttribute order_attribute
|
23
|
-
xml.StandardOrderParams
|
24
|
-
}
|
25
|
-
xml.BankPubKeyDigests {
|
26
|
-
xml.Authentication(client.bank_x.public_digest, Version: 'X002', Algorithm: "http://www.w3.org/2001/04/xmlenc#sha256")
|
27
|
-
xml.Encryption(client.bank_e.public_digest, Version: 'E002', Algorithm: "http://www.w3.org/2001/04/xmlenc#sha256" )
|
28
|
-
}
|
29
|
-
xml.SecurityMedium '0000'
|
30
|
-
xml.NumSegments 1
|
31
|
-
}
|
32
|
-
xml.mutable {
|
33
|
-
xml.TransactionPhase 'Initialisation'
|
34
|
-
}
|
35
|
-
}
|
36
|
-
end.doc.root
|
3
|
+
client.header_request.build(
|
4
|
+
nonce: nonce,
|
5
|
+
timestamp: timestamp,
|
6
|
+
order_type: 'CCT',
|
7
|
+
order_attribute: 'OZHNN',
|
8
|
+
order_params: {},
|
9
|
+
num_segments: 1,
|
10
|
+
mutable: { TransactionPhase: 'Initialisation' }
|
11
|
+
)
|
37
12
|
end
|
38
13
|
end
|
data/lib/epics/cd1.rb
CHANGED
@@ -1,30 +1,13 @@
|
|
1
1
|
class Epics::CD1 < Epics::GenericUploadRequest
|
2
2
|
def header
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
xml.OrderDetails {
|
13
|
-
xml.OrderType 'CD1'
|
14
|
-
xml.OrderAttribute 'OZHNN'
|
15
|
-
xml.StandardOrderParams
|
16
|
-
}
|
17
|
-
xml.BankPubKeyDigests {
|
18
|
-
xml.Authentication(client.bank_x.public_digest, Version: 'X002', Algorithm: "http://www.w3.org/2001/04/xmlenc#sha256")
|
19
|
-
xml.Encryption(client.bank_e.public_digest, Version: 'E002', Algorithm: "http://www.w3.org/2001/04/xmlenc#sha256" )
|
20
|
-
}
|
21
|
-
xml.SecurityMedium '0000'
|
22
|
-
xml.NumSegments 1
|
23
|
-
}
|
24
|
-
xml.mutable {
|
25
|
-
xml.TransactionPhase 'Initialisation'
|
26
|
-
}
|
27
|
-
}
|
28
|
-
end.doc.root
|
3
|
+
client.header_request.build(
|
4
|
+
nonce: nonce,
|
5
|
+
timestamp: timestamp,
|
6
|
+
order_type: 'CD1',
|
7
|
+
order_attribute: 'OZHNN',
|
8
|
+
order_params: {},
|
9
|
+
num_segments: 1,
|
10
|
+
mutable: { TransactionPhase: 'Initialisation' }
|
11
|
+
)
|
29
12
|
end
|
30
13
|
end
|
data/lib/epics/cdb.rb
CHANGED
@@ -1,38 +1,13 @@
|
|
1
1
|
class Epics::CDB < Epics::GenericUploadRequest
|
2
|
-
def order_attribute
|
3
|
-
'OZHNN'
|
4
|
-
end
|
5
|
-
|
6
|
-
def order_type
|
7
|
-
'CDB'
|
8
|
-
end
|
9
|
-
|
10
2
|
def header
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
xml.OrderDetails {
|
21
|
-
xml.OrderType order_type
|
22
|
-
xml.OrderAttribute order_attribute
|
23
|
-
xml.StandardOrderParams
|
24
|
-
}
|
25
|
-
xml.BankPubKeyDigests {
|
26
|
-
xml.Authentication(client.bank_x.public_digest, Version: 'X002', Algorithm: "http://www.w3.org/2001/04/xmlenc#sha256")
|
27
|
-
xml.Encryption(client.bank_e.public_digest, Version: 'E002', Algorithm: "http://www.w3.org/2001/04/xmlenc#sha256" )
|
28
|
-
}
|
29
|
-
xml.SecurityMedium '0000'
|
30
|
-
xml.NumSegments 1
|
31
|
-
}
|
32
|
-
xml.mutable {
|
33
|
-
xml.TransactionPhase 'Initialisation'
|
34
|
-
}
|
35
|
-
}
|
36
|
-
end.doc.root
|
3
|
+
client.header_request.build(
|
4
|
+
nonce: nonce,
|
5
|
+
timestamp: timestamp,
|
6
|
+
order_type: 'CDB',
|
7
|
+
order_attribute: 'OZHNN',
|
8
|
+
order_params: {},
|
9
|
+
num_segments: 1,
|
10
|
+
mutable: { TransactionPhase: 'Initialisation' }
|
11
|
+
)
|
37
12
|
end
|
38
13
|
end
|
data/lib/epics/cdd.rb
CHANGED
@@ -1,38 +1,13 @@
|
|
1
1
|
class Epics::CDD < Epics::GenericUploadRequest
|
2
|
-
def order_attribute
|
3
|
-
'OZHNN'
|
4
|
-
end
|
5
|
-
|
6
|
-
def order_type
|
7
|
-
'CDD'
|
8
|
-
end
|
9
|
-
|
10
2
|
def header
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
xml.OrderDetails {
|
21
|
-
xml.OrderType order_type
|
22
|
-
xml.OrderAttribute order_attribute
|
23
|
-
xml.StandardOrderParams ''
|
24
|
-
}
|
25
|
-
xml.BankPubKeyDigests {
|
26
|
-
xml.Authentication(client.bank_x.public_digest, Version: 'X002', Algorithm: "http://www.w3.org/2001/04/xmlenc#sha256")
|
27
|
-
xml.Encryption(client.bank_e.public_digest, Version: 'E002', Algorithm: "http://www.w3.org/2001/04/xmlenc#sha256" )
|
28
|
-
}
|
29
|
-
xml.SecurityMedium '0000'
|
30
|
-
xml.NumSegments 1
|
31
|
-
}
|
32
|
-
xml.mutable {
|
33
|
-
xml.TransactionPhase 'Initialisation'
|
34
|
-
}
|
35
|
-
}
|
36
|
-
end.doc.root
|
3
|
+
client.header_request.build(
|
4
|
+
nonce: nonce,
|
5
|
+
timestamp: timestamp,
|
6
|
+
order_type: 'CDD',
|
7
|
+
order_attribute: 'OZHNN',
|
8
|
+
order_params: {},
|
9
|
+
num_segments: 1,
|
10
|
+
mutable: { TransactionPhase: 'Initialisation' }
|
11
|
+
)
|
37
12
|
end
|
38
13
|
end
|
data/lib/epics/cds.rb
CHANGED
@@ -1,9 +1,13 @@
|
|
1
|
-
class Epics::CDS < Epics::
|
2
|
-
def
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
1
|
+
class Epics::CDS < Epics::GenericUploadRequest
|
2
|
+
def header
|
3
|
+
client.header_request.build(
|
4
|
+
nonce: nonce,
|
5
|
+
timestamp: timestamp,
|
6
|
+
order_type: 'CDS',
|
7
|
+
order_attribute: 'DZHNN',
|
8
|
+
order_params: {},
|
9
|
+
num_segments: 1,
|
10
|
+
mutable: { TransactionPhase: 'Initialisation' }
|
11
|
+
)
|
8
12
|
end
|
9
13
|
end
|
data/lib/epics/cdz.rb
CHANGED
@@ -1,46 +1,17 @@
|
|
1
1
|
class Epics::CDZ < Epics::GenericRequest
|
2
|
-
attr_accessor :from, :to
|
3
|
-
|
4
|
-
def initialize(client, from = nil, to = nil)
|
5
|
-
super(client)
|
6
|
-
self.from = from
|
7
|
-
self.to = to
|
8
|
-
end
|
9
|
-
|
10
2
|
def header
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
xml.OrderDetails {
|
21
|
-
xml.OrderType 'CDZ'
|
22
|
-
xml.OrderAttribute 'DZHNN'
|
23
|
-
if !!from && !!to
|
24
|
-
xml.StandardOrderParams {
|
25
|
-
xml.DateRange {
|
26
|
-
xml.Start from
|
27
|
-
xml.End to
|
28
|
-
}
|
29
|
-
}
|
30
|
-
else
|
31
|
-
xml.StandardOrderParams
|
32
|
-
end
|
33
|
-
}
|
34
|
-
xml.BankPubKeyDigests {
|
35
|
-
xml.Authentication(client.bank_x.public_digest, Version: 'X002', Algorithm: "http://www.w3.org/2001/04/xmlenc#sha256")
|
36
|
-
xml.Encryption(client.bank_e.public_digest, Version: 'E002', Algorithm: "http://www.w3.org/2001/04/xmlenc#sha256" )
|
37
|
-
}
|
38
|
-
xml.SecurityMedium '0000'
|
39
|
-
}
|
40
|
-
xml.mutable {
|
41
|
-
xml.TransactionPhase 'Initialisation'
|
3
|
+
client.header_request.build(
|
4
|
+
nonce: nonce,
|
5
|
+
timestamp: timestamp,
|
6
|
+
order_type: 'CDZ',
|
7
|
+
order_attribute: 'DZHNN',
|
8
|
+
order_params: !!options[:from] && !!options[:to] ? {
|
9
|
+
DateRange: {
|
10
|
+
Start: options[:from],
|
11
|
+
End: options[:to]
|
42
12
|
}
|
43
|
-
}
|
44
|
-
|
13
|
+
} : {},
|
14
|
+
mutable: { TransactionPhase: 'Initialisation' }
|
15
|
+
)
|
45
16
|
end
|
46
17
|
end
|