epics 2.4.0 → 2.5.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 +9 -0
- data/epics.gemspec +5 -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/client.rb +36 -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 +7 -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/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/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 +35 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d2540241c26353b2e1134bfed820618ed1b8470790c66985cade8d306d49b3a
|
4
|
+
data.tar.gz: 6ece5e86fc70adecc140b5ed64d9d0e47c2d3c86619d5b20e9fd615bc33ded65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cead2ddb91fe295b3e6a7b25723d5eb6810f836c0e74cfb3f33e1717a9d023192d289706fb84ba01897a80a6c7420dca3ab767a5d5cdc897d74612b717e86199
|
7
|
+
data.tar.gz: 57a8513a4d9b6a373d8158e231779566363966a8ac6cc058a8151c6b70d905719bee7c4fa139c46d450e724da8cd372d93e68b96f45b87d21a249dbfbacdb41a
|
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,14 @@
|
|
1
1
|
### Unreleased
|
2
2
|
|
3
|
+
### 2.5.0
|
4
|
+
|
5
|
+
- [HOUSEKEEPING] Bump XML dependency requirements to more recent versions
|
6
|
+
- [HOUSEKEEPING] Bump bundler version to 2.5.19
|
7
|
+
- [HOUSEKEEPING] Bump ruby required version from 2.7 to 3.1
|
8
|
+
- [ENHANCEMENT] Request Header generation more generalized (thanks to @jplot)
|
9
|
+
- [ENHANCEMENT] Multi language support for initialization letter (thanks to @jplot)
|
10
|
+
- [ENHANVEMENT] Added support for WSS and C5N order types (thanks to @kostja93)
|
11
|
+
|
3
12
|
### 2.4.0
|
4
13
|
|
5
14
|
- [ENHANCEMENT] Adds XE2 and XE3 order type (CCT and CDD for swiss banks)
|
data/epics.gemspec
CHANGED
@@ -26,7 +26,7 @@ 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) }
|
@@ -41,11 +41,12 @@ Gem::Specification.new do |spec|
|
|
41
41
|
spec.post_install_message += "\e[32m" + ('*' * 60) + "\n\e[0m"
|
42
42
|
|
43
43
|
spec.add_dependency 'faraday', '>= 1.10.0'
|
44
|
-
spec.add_dependency '
|
44
|
+
spec.add_dependency 'i18n', '>= 1.1.0'
|
45
|
+
spec.add_dependency 'nokogiri', '>= 1.16.7'
|
45
46
|
spec.add_dependency 'rubyzip', '>= 2.3.2'
|
46
|
-
spec.add_dependency 'rexml', '>= 3.
|
47
|
+
spec.add_dependency 'rexml', '>= 3.3.7'
|
47
48
|
|
48
|
-
spec.add_development_dependency 'bundler', '>= 2.
|
49
|
+
spec.add_development_dependency 'bundler', '>= 2.5.19'
|
49
50
|
spec.add_development_dependency 'equivalent-xml'
|
50
51
|
spec.add_development_dependency 'pry'
|
51
52
|
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
|