ruby_ufebs 0.2.6 → 0.2.7
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 +4 -4
- data/lib/ufebs/documents/package_response.rb +7 -43
- data/lib/ufebs/entities/initial_packet.rb +20 -0
- data/lib/ufebs/version.rb +1 -1
- data/lib/ufebs.rb +2 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cfda05f80c87fccdeb6bb3ef58fb6373d0fec16f
|
4
|
+
data.tar.gz: e4036b13cd0851a7e1cb6d2af85f75e3ce70b7b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 920239aaf564f57ca1e678fa6b2737718ce4cbd12ab8bd2e9766c1bd7f193027c48f90c580d799edf88e9191a78fa27b6da9ad8ede6d0ed99dd490203de9bc06
|
7
|
+
data.tar.gz: 0866099ff25bf804d0b16ce11d69ff2d56ad1b190d52c61f919c84fe5947775ed3b1812f0c2731282c302408dc8ea92e946cbccb4681fcb084bc70f19c5bf5bc
|
@@ -3,57 +3,21 @@ require_relative '../entities/session'
|
|
3
3
|
|
4
4
|
module Ufebs
|
5
5
|
module Documents
|
6
|
-
class
|
6
|
+
class PackageResponse
|
7
7
|
include HappyMapper
|
8
8
|
register_namespace 'ed', "urn:cbr-ru:ed:v2.0"
|
9
|
-
tag '
|
9
|
+
tag 'PacketESID'
|
10
10
|
namespace 'ed'
|
11
11
|
|
12
|
-
attribute :ed_date, String, tag: 'EDDate'
|
13
12
|
attribute :ed_author, String, tag: 'EDAuthor'
|
13
|
+
attribute :ed_creation_time, String, tag: 'EDCreationTime'
|
14
|
+
attribute :ed_date, String, tag: 'EDDate'
|
15
|
+
attribute :ed_no, String, tag: 'EDNo'
|
14
16
|
attribute :ed_receiver, String, tag: 'EDReceiver'
|
15
|
-
attribute :number, String, tag: 'EDNo'
|
16
|
-
attribute :quantity, String, tag: 'EDQuantity'
|
17
|
-
attribute :sum, String, tag: 'Sum'
|
18
|
-
attribute :system_code, String, tag: 'SystemCode'
|
19
17
|
|
20
|
-
has_many :
|
18
|
+
has_many :payment_responses, Ufebs::Documents::PaymentResponse
|
21
19
|
has_one :session, ::Ufebs::Entities::Session, tag: 'Session', state_when_nil: false
|
22
|
-
|
23
|
-
def initialize(payment_orders=[], params = {})
|
24
|
-
@payment_orders = payment_orders
|
25
|
-
@ed_date = Date.parse(params.fetch(:ed_date){Time.now}.to_s).strftime('%Y-%m-%d')
|
26
|
-
@ed_author = params[:ed_author]
|
27
|
-
@ed_receiver = params[:ed_receiver]
|
28
|
-
@number = params[:number]
|
29
|
-
@quantity = params[:quantity] || payment_orders.size
|
30
|
-
@sum = params[:sum]
|
31
|
-
@system_code = '01'
|
32
|
-
super()
|
33
|
-
end
|
34
|
-
|
35
|
-
def to_xml(encoding: 'UTF-8')
|
36
|
-
super(Nokogiri::XML::Builder.new(:encoding => encoding)).to_xml
|
37
|
-
end
|
20
|
+
has_one :initial_packet, ::Ufebs::Entities::InitialPacket, tag: 'InitialPacketED', state_when_nil: false
|
38
21
|
end
|
39
22
|
end
|
40
23
|
end
|
41
|
-
|
42
|
-
# <?xml version="1.0" encoding="WINDOWS-1251"?>
|
43
|
-
# <PacketESID xmlns="urn:cbr-ru:ed:v2.0" EDAuthor="4583001999" EDCreationTime="13:33:08" EDDate="2018-02-23" EDNo="1070230" EDReceiver="4525420000">
|
44
|
-
# <dsig:SigValue xmlns:dsig="urn:cbr-ru:dsig:v1.1">MIIBaQYJKoZIhvcNAQcCoIIBWjCCAVYCAQExDjAMBggqhQMHAQECAgUAMAsGCSqGSIb3DQEHATGCATIwggEuAgEBMGAwTDELMAkGA1UEBhMCUlUxCzAJBgNVBAgTAjAwMQ8wDQYDVQQHEwZSVEdTQlIxDTALBgNVBAoTBEdDS0kxEDAOBgNVBAMTB0FETUlOQ0ECEEBQFMCd4KlDNKW6RlhblsQwDAYIKoUDBwEBAgIFAKBpMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTE4MDIyNzEzMzIzMlowLwYJKoZIhvcNAQkEMSIEIPretuTeA+Uosyhj6ROUT66yYTuZF+aaXclhxXXKmPxdMAwGCCqFAwcBAQEBBQAEQD/Ah3zv5DZv13fsX1Pcqd3Z7YFls14j+4rnYkrRuU31oR1clc4YUG1Lg71Hrp7q/uErXapd33FrjKyxO7Dvfxo=</dsig:SigValue>
|
45
|
-
# <InitialPacketED EDAuthor="4525420000" EDDate="2018-02-23" EDNo="5"/>
|
46
|
-
# <Session>
|
47
|
-
# <SessionID>6</SessionID>
|
48
|
-
# </Session>
|
49
|
-
# <ED206 Acc="30101810945250000420" BICCorr="044525000" CorrAcc="40101810845250010102" DC="1" EDAuthor="4583001999" EDDate="2018-02-23" EDNo="1070231" EDReceiver="4525420000" Sum="381" SystemCode="01" TransDate="2018-02-23" TransTime="13:33:08">
|
50
|
-
# <AccDoc AccDocDate="2018-02-23" AccDocNo="441"/>
|
51
|
-
# <EDRefID EDAuthor="4525420000" EDDate="2018-02-23" EDNo="6"/>
|
52
|
-
# <ProcessingDetails CreditDate="2018-02-23" DebitDate="2018-02-23"/>
|
53
|
-
# </ED206>
|
54
|
-
# <ED206 Acc="30101810945250000420" BICCorr="044525000" CorrAcc="40101810045250010041" DC="1" EDAuthor="4583001999" EDDate="2018-02-23" EDNo="1070232" EDReceiver="4525420000" Sum="680700" SystemCode="01" TransDate="2018-02-23" TransTime="13:33:08">
|
55
|
-
# <AccDoc AccDocDate="2018-02-23" AccDocNo="459"/>
|
56
|
-
# <EDRefID EDAuthor="4525420000" EDDate="2018-02-23" EDNo="7"/>
|
57
|
-
# <ProcessingDetails CreditDate="2018-02-23" DebitDate="2018-02-23"/>
|
58
|
-
# </ED206>
|
59
|
-
# </PacketESID>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Ufebs
|
2
|
+
module Entities
|
3
|
+
class InitialPacket
|
4
|
+
include HappyMapper
|
5
|
+
register_namespace 'ed', 'urn:cbr-ru:ed:v2.0'
|
6
|
+
namespace 'ed'
|
7
|
+
tag 'InitialPacketED'
|
8
|
+
|
9
|
+
attribute :ed_no, String, tag: 'EDNo'
|
10
|
+
attribute :ed_date, String, tag: 'EDDate'
|
11
|
+
attribute :ed_author, String, tag: 'EDAuthor'
|
12
|
+
|
13
|
+
def initialize(params = {})
|
14
|
+
params.each do |key, value|
|
15
|
+
instance_variable_set("@#{key}".to_sym, value)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/lib/ufebs/version.rb
CHANGED
data/lib/ufebs.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_ufebs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Evgeniy Burdaev
|
@@ -435,6 +435,7 @@ files:
|
|
435
435
|
- lib/ufebs/entities/ed_field_list.rb
|
436
436
|
- lib/ufebs/entities/ed_reestr_info.rb
|
437
437
|
- lib/ufebs/entities/ed_ref_id.rb
|
438
|
+
- lib/ufebs/entities/initial_packet.rb
|
438
439
|
- lib/ufebs/entities/participant.rb
|
439
440
|
- lib/ufebs/entities/processing_details.rb
|
440
441
|
- lib/ufebs/entities/session.rb
|