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
data/lib/epics/ptk.rb
CHANGED
@@ -1,46 +1,17 @@
|
|
1
1
|
class Epics::PTK < 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 'PTK'
|
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: 'PTK',
|
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
|
data/lib/epics/sta.rb
CHANGED
@@ -1,46 +1,17 @@
|
|
1
1
|
class Epics::STA < 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 'STA'
|
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: 'STA',
|
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
|
data/lib/epics/version.rb
CHANGED
data/lib/epics/vmk.rb
CHANGED
@@ -1,46 +1,17 @@
|
|
1
1
|
class Epics::VMK < 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 'VMK'
|
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: 'VMK',
|
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
|
data/lib/epics/wss.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
class Epics::WSS < Epics::GenericRequest
|
2
|
+
def header
|
3
|
+
client.header_request.build(
|
4
|
+
nonce: nonce,
|
5
|
+
timestamp: timestamp,
|
6
|
+
order_type: 'WSS',
|
7
|
+
order_attribute: 'DZHNN',
|
8
|
+
order_params: {},
|
9
|
+
mutable: { TransactionPhase: 'Initialisation' }
|
10
|
+
)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
data/lib/epics/xct.rb
CHANGED
@@ -1,30 +1,13 @@
|
|
1
1
|
class Epics::XCT < Epics::GenericUploadRequest
|
2
2
|
def header
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
xml.OrderDetails {
|
13
|
-
xml.OrderType 'XCT'
|
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: 'XCT',
|
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/xds.rb
CHANGED
@@ -1,5 +1,13 @@
|
|
1
|
-
class Epics::XDS < Epics::
|
2
|
-
def
|
3
|
-
|
1
|
+
class Epics::XDS < Epics::GenericUploadRequest
|
2
|
+
def header
|
3
|
+
client.header_request.build(
|
4
|
+
nonce: nonce,
|
5
|
+
timestamp: timestamp,
|
6
|
+
order_type: 'XDS',
|
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/xe2.rb
CHANGED
@@ -1,5 +1,13 @@
|
|
1
|
-
class Epics::XE2 < Epics::
|
2
|
-
def
|
3
|
-
|
1
|
+
class Epics::XE2 < Epics::GenericUploadRequest
|
2
|
+
def header
|
3
|
+
client.header_request.build(
|
4
|
+
nonce: nonce,
|
5
|
+
timestamp: timestamp,
|
6
|
+
order_type: 'XE2',
|
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/xe3.rb
CHANGED
@@ -1,5 +1,13 @@
|
|
1
|
-
class Epics::XE3 < Epics::
|
2
|
-
def
|
3
|
-
|
1
|
+
class Epics::XE3 < Epics::GenericUploadRequest
|
2
|
+
def header
|
3
|
+
client.header_request.build(
|
4
|
+
nonce: nonce,
|
5
|
+
timestamp: timestamp,
|
6
|
+
order_type: 'XE3',
|
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/z52.rb
CHANGED
@@ -1,42 +1,17 @@
|
|
1
1
|
class Epics::Z52 < 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 'Z52'
|
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: 'Z52',
|
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/z53.rb
CHANGED
@@ -1,42 +1,17 @@
|
|
1
1
|
class Epics::Z53 < 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 'Z53'
|
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: 'Z53',
|
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/z54.rb
CHANGED
@@ -1,42 +1,17 @@
|
|
1
1
|
class Epics::Z54 < 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 'Z54'
|
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: 'Z54',
|
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.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'openssl'
|
2
2
|
require 'base64'
|
3
3
|
require 'erb'
|
4
|
+
require 'i18n'
|
4
5
|
require 'json'
|
5
6
|
require 'zlib'
|
6
7
|
require 'zip'
|
@@ -12,10 +13,12 @@ require "epics/version"
|
|
12
13
|
require "epics/key"
|
13
14
|
require "epics/response"
|
14
15
|
require "epics/error"
|
16
|
+
require 'epics/letter_renderer'
|
15
17
|
require "epics/middleware/xmlsig"
|
16
18
|
require "epics/middleware/parse_ebics"
|
17
19
|
require "epics/generic_request"
|
18
20
|
require "epics/generic_upload_request"
|
21
|
+
require "epics/header_request"
|
19
22
|
require "epics/azv"
|
20
23
|
require "epics/hpb"
|
21
24
|
require "epics/hkd"
|
@@ -26,11 +29,13 @@ require "epics/vmk"
|
|
26
29
|
require "epics/c52"
|
27
30
|
require "epics/c53"
|
28
31
|
require "epics/c54"
|
32
|
+
require "epics/c5n"
|
29
33
|
require "epics/z52"
|
30
34
|
require "epics/z53"
|
31
35
|
require "epics/z54"
|
32
36
|
require "epics/ptk"
|
33
37
|
require "epics/hac"
|
38
|
+
require "epics/wss"
|
34
39
|
require "epics/hpd"
|
35
40
|
require "epics/cd1"
|
36
41
|
require "epics/cct"
|
@@ -51,6 +56,8 @@ require "epics/ini"
|
|
51
56
|
require "epics/signer"
|
52
57
|
require "epics/client"
|
53
58
|
|
59
|
+
I18n.load_path += Dir[File.join(File.dirname(__FILE__), 'letter/locales', '*.yml')]
|
60
|
+
|
54
61
|
module Epics
|
55
62
|
|
56
63
|
end
|