nuncium 0.13.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 +7 -0
- data/.gitignore +15 -0
- data/.overcommit.yml +49 -0
- data/.rspec +2 -0
- data/.rubocop.yml +26 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/DOCS.md +133 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +136 -0
- data/Guardfile +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +281 -0
- data/Rakefile +6 -0
- data/_config.yml +1 -0
- data/bin/console +7 -0
- data/lib/nuncium.rb +87 -0
- data/lib/nuncium/configuration.rb +82 -0
- data/lib/nuncium/data_box.rb +41 -0
- data/lib/nuncium/data_message.rb +136 -0
- data/lib/nuncium/request.rb +120 -0
- data/lib/nuncium/response.rb +18 -0
- data/lib/nuncium/responses/body.rb +19 -0
- data/lib/nuncium/responses/data_box.rb +14 -0
- data/lib/nuncium/responses/db/body.rb +9 -0
- data/lib/nuncium/responses/db/status.rb +13 -0
- data/lib/nuncium/responses/dm/body.rb +9 -0
- data/lib/nuncium/responses/dm/status.rb +13 -0
- data/lib/nuncium/responses/message.rb +21 -0
- data/lib/nuncium/responses/messages/attachment.rb +24 -0
- data/lib/nuncium/responses/messages/collection.rb +29 -0
- data/lib/nuncium/responses/messages/delivery_info.rb +23 -0
- data/lib/nuncium/responses/messages/envelope.rb +23 -0
- data/lib/nuncium/responses/messages/event.rb +14 -0
- data/lib/nuncium/responses/status.rb +19 -0
- data/lib/nuncium/utils/errors.rb +18 -0
- data/lib/nuncium/version.rb +3 -0
- data/lib/nuncium/web_services/db_access/.gitkeep +0 -0
- data/lib/nuncium/web_services/db_access/change_isds_password.rb +21 -0
- data/lib/nuncium/web_services/db_access/get_owner_info_from_login.rb +19 -0
- data/lib/nuncium/web_services/db_search/check_data_box.rb +17 -0
- data/lib/nuncium/web_services/db_search/d_t_info.rb +17 -0
- data/lib/nuncium/web_services/db_search/data_box_credit_info.rb +17 -0
- data/lib/nuncium/web_services/db_search/find_data_box.rb +25 -0
- data/lib/nuncium/web_services/db_search/find_personal_data_box.rb +22 -0
- data/lib/nuncium/web_services/db_search/get_data_box_activity_status.rb +17 -0
- data/lib/nuncium/web_services/db_search/get_data_box_list.rb +20 -0
- data/lib/nuncium/web_services/db_search/isds_search_2.rb +18 -0
- data/lib/nuncium/web_services/db_search/p_d_z_info.rb +17 -0
- data/lib/nuncium/web_services/db_search/p_d_z_send_info.rb +17 -0
- data/lib/nuncium/web_services/db_search/request.rb +19 -0
- data/lib/nuncium/web_services/db_search/response.rb +13 -0
- data/lib/nuncium/web_services/dm_info/confirm_delivery.rb +17 -0
- data/lib/nuncium/web_services/dm_info/erase_message.rb +17 -0
- data/lib/nuncium/web_services/dm_info/get_delivery_info.rb +25 -0
- data/lib/nuncium/web_services/dm_info/get_list_of_received_messages.rb +26 -0
- data/lib/nuncium/web_services/dm_info/get_list_of_sent_messages.rb +26 -0
- data/lib/nuncium/web_services/dm_info/get_message_author.rb +17 -0
- data/lib/nuncium/web_services/dm_info/get_message_state_changes.rb +17 -0
- data/lib/nuncium/web_services/dm_info/get_signed_delivery_info.rb +17 -0
- data/lib/nuncium/web_services/dm_info/mark_message_as_downloaded.rb +17 -0
- data/lib/nuncium/web_services/dm_info/message_envelope_download.rb +25 -0
- data/lib/nuncium/web_services/dm_info/request.rb +19 -0
- data/lib/nuncium/web_services/dm_info/response.rb +13 -0
- data/lib/nuncium/web_services/dm_info/verify_message.rb +17 -0
- data/lib/nuncium/web_services/dm_operations/authenticate_message.rb +17 -0
- data/lib/nuncium/web_services/dm_operations/create_message.rb +30 -0
- data/lib/nuncium/web_services/dm_operations/create_multiple_messages.rb +30 -0
- data/lib/nuncium/web_services/dm_operations/message_download.rb +25 -0
- data/lib/nuncium/web_services/dm_operations/ping.rb +15 -0
- data/lib/nuncium/web_services/dm_operations/request.rb +19 -0
- data/lib/nuncium/web_services/dm_operations/resign_isds_document.rb +17 -0
- data/lib/nuncium/web_services/dm_operations/response.rb +13 -0
- data/lib/nuncium/web_services/dm_operations/signed_message_download.rb +17 -0
- data/lib/nuncium/web_services/dm_operations/signed_sent_message_download.rb +17 -0
- data/nuncium.gemspec +47 -0
- data/wercker.yml +12 -0
- metadata +303 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module Nuncium
|
|
2
|
+
module WebServices
|
|
3
|
+
module DmInfo
|
|
4
|
+
class GetDeliveryInfo < ::Nuncium::WebServices::DmInfo::Request
|
|
5
|
+
ATTRS = [:dmID].freeze
|
|
6
|
+
|
|
7
|
+
attr_accessor(*ATTRS)
|
|
8
|
+
|
|
9
|
+
def body(xml)
|
|
10
|
+
xml[:v20].GetDeliveryInfo do
|
|
11
|
+
values(xml)
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def response_wrapper
|
|
16
|
+
::Nuncium::Responses::Messages::DeliveryInfo
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def call_reponse_wrapper(response)
|
|
20
|
+
response_wrapper.new(response).message
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
module Nuncium
|
|
2
|
+
module WebServices
|
|
3
|
+
module DmInfo
|
|
4
|
+
class GetListOfReceivedMessages < ::Nuncium::WebServices::DmInfo::Request
|
|
5
|
+
ATTRS = %i[dmFromTime dmToTime dmRecipientOrgUnitNum
|
|
6
|
+
dmStatusFilter dmOffset dmLimit].freeze
|
|
7
|
+
|
|
8
|
+
attr_accessor(*ATTRS)
|
|
9
|
+
|
|
10
|
+
def body(xml)
|
|
11
|
+
xml[:v20].GetListOfReceivedMessages do
|
|
12
|
+
values(xml)
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def response_wrapper
|
|
17
|
+
::Nuncium::Responses::Messages::Collection
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def call_reponse_wrapper(response)
|
|
21
|
+
response_wrapper.new(response)
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
module Nuncium
|
|
2
|
+
module WebServices
|
|
3
|
+
module DmInfo
|
|
4
|
+
class GetListOfSentMessages < ::Nuncium::WebServices::DmInfo::Request
|
|
5
|
+
ATTRS = %i[dmFromTime dmToTime dmSenderOrgUnitNum
|
|
6
|
+
dmStatusFilter dmOffset dmLimit].freeze
|
|
7
|
+
|
|
8
|
+
attr_accessor(*ATTRS)
|
|
9
|
+
|
|
10
|
+
def body(xml)
|
|
11
|
+
xml[:v20].GetListOfSentMessages do
|
|
12
|
+
values(xml)
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def response_wrapper
|
|
17
|
+
::Nuncium::Responses::Messages::Collection
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def call_reponse_wrapper(response)
|
|
21
|
+
response_wrapper.new(response)
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module Nuncium
|
|
2
|
+
module WebServices
|
|
3
|
+
module DmInfo
|
|
4
|
+
class GetMessageAuthor < ::Nuncium::WebServices::DmInfo::Request
|
|
5
|
+
ATTRS = [:dmID].freeze
|
|
6
|
+
|
|
7
|
+
attr_accessor(*ATTRS)
|
|
8
|
+
|
|
9
|
+
def body(xml)
|
|
10
|
+
xml[:v20].GetMessageAuthor do
|
|
11
|
+
values(xml)
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module Nuncium
|
|
2
|
+
module WebServices
|
|
3
|
+
module DmInfo
|
|
4
|
+
class GetMessageStateChanges < ::Nuncium::WebServices::DmInfo::Request
|
|
5
|
+
ATTRS = %i[dmFromTime dmToTime].freeze
|
|
6
|
+
|
|
7
|
+
attr_accessor(*ATTRS)
|
|
8
|
+
|
|
9
|
+
def body(xml)
|
|
10
|
+
xml[:v20].GetMessageStateChanges do
|
|
11
|
+
values(xml)
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module Nuncium
|
|
2
|
+
module WebServices
|
|
3
|
+
module DmInfo
|
|
4
|
+
class GetSignedDeliveryInfo < ::Nuncium::WebServices::DmInfo::Request
|
|
5
|
+
ATTRS = [:dmID].freeze
|
|
6
|
+
|
|
7
|
+
attr_accessor(*ATTRS)
|
|
8
|
+
|
|
9
|
+
def body(xml)
|
|
10
|
+
xml[:v20].GetSignedDeliveryInfo do
|
|
11
|
+
values(xml)
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module Nuncium
|
|
2
|
+
module WebServices
|
|
3
|
+
module DmInfo
|
|
4
|
+
class MarkMessageAsDownloaded < ::Nuncium::WebServices::DmInfo::Request
|
|
5
|
+
ATTRS = [:dmID].freeze
|
|
6
|
+
|
|
7
|
+
attr_accessor(*ATTRS)
|
|
8
|
+
|
|
9
|
+
def body(xml)
|
|
10
|
+
xml[:v20].MarkMessageAsDownloaded do
|
|
11
|
+
values(xml)
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module Nuncium
|
|
2
|
+
module WebServices
|
|
3
|
+
module DmInfo
|
|
4
|
+
class MessageEnvelopeDownload < ::Nuncium::WebServices::DmInfo::Request
|
|
5
|
+
ATTRS = [:dmID].freeze
|
|
6
|
+
|
|
7
|
+
attr_accessor(*ATTRS)
|
|
8
|
+
|
|
9
|
+
def body(xml)
|
|
10
|
+
xml[:v20].MessageEnvelopeDownload do
|
|
11
|
+
values(xml)
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def response_wrapper
|
|
16
|
+
::Nuncium::Responses::Messages::Envelope
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def call_reponse_wrapper(response)
|
|
20
|
+
response_wrapper.new(response).message
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module Nuncium
|
|
2
|
+
module WebServices
|
|
3
|
+
module DmInfo
|
|
4
|
+
class Request < ::Nuncium::Request
|
|
5
|
+
def response_wrapper
|
|
6
|
+
::Nuncium::WebServices::DmInfo::Response
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
def api_url
|
|
10
|
+
'/DS/dx'
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def xml_url
|
|
14
|
+
"https://isds.#{Nuncium.configuration.xml_url}/v20"
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module Nuncium
|
|
2
|
+
module WebServices
|
|
3
|
+
module DmInfo
|
|
4
|
+
class Response < ::Nuncium::Response
|
|
5
|
+
def initialize(response)
|
|
6
|
+
super
|
|
7
|
+
@status = ::Nuncium::Responses::Dm::Status.new(parsed_body)
|
|
8
|
+
@body = ::Nuncium::Responses::Dm::Body.new(parsed_body)
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module Nuncium
|
|
2
|
+
module WebServices
|
|
3
|
+
module DmInfo
|
|
4
|
+
class VerifyMessage < ::Nuncium::WebServices::DmInfo::Request
|
|
5
|
+
ATTRS = [:dmID].freeze
|
|
6
|
+
|
|
7
|
+
attr_accessor(*ATTRS)
|
|
8
|
+
|
|
9
|
+
def body(xml)
|
|
10
|
+
xml[:v20].VerifyMessage do
|
|
11
|
+
values(xml)
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module Nuncium
|
|
2
|
+
module WebServices
|
|
3
|
+
module DmOperations
|
|
4
|
+
class AuthenticateMessage < ::Nuncium::WebServices::DmOperations::Request
|
|
5
|
+
ATTRS = [:dmMessage].freeze
|
|
6
|
+
|
|
7
|
+
attr_accessor(*ATTRS)
|
|
8
|
+
|
|
9
|
+
def body(xml)
|
|
10
|
+
xml[:v20].AuthenticateMessage do
|
|
11
|
+
values(xml)
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
##
|
|
2
|
+
#
|
|
3
|
+
# TODO: parsing those files and so...
|
|
4
|
+
module Nuncium
|
|
5
|
+
module WebServices
|
|
6
|
+
module DmOperations
|
|
7
|
+
class CreateMessage < ::Nuncium::WebServices::DmOperations::Request
|
|
8
|
+
ATTRS = %i[dmSenderOrgUnit dmSenderOrgUnitNum dbIDRecipient
|
|
9
|
+
dmRecipientOrgUnit dmRecipientOrgUnitNum dmToHands
|
|
10
|
+
dmAnnotation dmRecipientRefNumber dmSenderRefNumber
|
|
11
|
+
dmRecipientIdent dmSenderIdent dmLegalTitleLaw
|
|
12
|
+
dmLegalTitleYear dmLegalTitleSect dmLegalTitlePar
|
|
13
|
+
dmLegalTitlePoint dmPersonalDelivery dmAllowSubstDelivery
|
|
14
|
+
dmOVM dmPublishOwnID].freeze
|
|
15
|
+
# + files:
|
|
16
|
+
# dmFiles: { dmFile: { dmEncodedContent: '', dmXMLContent: '' } }
|
|
17
|
+
|
|
18
|
+
attr_accessor(*ATTRS)
|
|
19
|
+
|
|
20
|
+
def body(xml)
|
|
21
|
+
xml[:v20].CreateMessage do
|
|
22
|
+
xml[:v20].dmEnvelope(dmType: 'WTF') do
|
|
23
|
+
values(xml)
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
##
|
|
2
|
+
#
|
|
3
|
+
# TODO: parsing those files and so...
|
|
4
|
+
module Nuncium
|
|
5
|
+
module WebServices
|
|
6
|
+
module DmOperations
|
|
7
|
+
class CreateMultipleMessages < ::Nuncium::WebServices::DmOperations::Request
|
|
8
|
+
ATTRS = %i[dmSenderOrgUnit dmSenderOrgUnitNum dbIDRecipient
|
|
9
|
+
dmRecipientOrgUnit dmRecipientOrgUnitNum dmToHands
|
|
10
|
+
dmAnnotation dmRecipientRefNumber dmSenderRefNumber
|
|
11
|
+
dmRecipientIdent dmSenderIdent dmLegalTitleLaw
|
|
12
|
+
dmLegalTitleYear dmLegalTitleSect dmLegalTitlePar
|
|
13
|
+
dmLegalTitlePoint dmPersonalDelivery dmAllowSubstDelivery
|
|
14
|
+
dmOVM dmPublishOwnID].freeze
|
|
15
|
+
# + files:
|
|
16
|
+
# dmFiles: { dmFile: { dmEncodedContent: '', dmXMLContent: '' } }
|
|
17
|
+
|
|
18
|
+
attr_accessor(*ATTRS)
|
|
19
|
+
|
|
20
|
+
def body(xml)
|
|
21
|
+
xml[:v20].CreateMultipleMessage do
|
|
22
|
+
xml[:v20].dmEnvelope(dmType: 'WTF') do
|
|
23
|
+
values(xml)
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module Nuncium
|
|
2
|
+
module WebServices
|
|
3
|
+
module DmOperations
|
|
4
|
+
class MessageDownload < ::Nuncium::WebServices::DmOperations::Request
|
|
5
|
+
ATTRS = [:dmID].freeze
|
|
6
|
+
|
|
7
|
+
attr_accessor(*ATTRS)
|
|
8
|
+
|
|
9
|
+
def body(xml)
|
|
10
|
+
xml[:v20].MessageDownload do
|
|
11
|
+
values(xml)
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def response_wrapper
|
|
16
|
+
::Nuncium::Responses::Message
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def call_reponse_wrapper(response)
|
|
20
|
+
response_wrapper.new(response).message
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module Nuncium
|
|
2
|
+
module WebServices
|
|
3
|
+
module DmOperations
|
|
4
|
+
class Request < ::Nuncium::Request
|
|
5
|
+
def response_wrapper
|
|
6
|
+
::Nuncium::WebServices::DmOperations::Response
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
def api_url
|
|
10
|
+
'/DS/dz'
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def xml_url
|
|
14
|
+
"https://isds.#{Nuncium.configuration.xml_url}/v20"
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module Nuncium
|
|
2
|
+
module WebServices
|
|
3
|
+
module DmOperations
|
|
4
|
+
class ResignIsdsDocument < ::Nuncium::WebServices::DmOperations::Request
|
|
5
|
+
ATTRS = [:dmDoc].freeze
|
|
6
|
+
|
|
7
|
+
attr_accessor(*ATTRS)
|
|
8
|
+
|
|
9
|
+
def body(xml)
|
|
10
|
+
xml[:v20].Re - signISDSDocument do
|
|
11
|
+
values(xml)
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module Nuncium
|
|
2
|
+
module WebServices
|
|
3
|
+
module DmOperations
|
|
4
|
+
class Response < ::Nuncium::Response
|
|
5
|
+
def initialize(response)
|
|
6
|
+
super
|
|
7
|
+
@status = ::Nuncium::Responses::Dm::Status.new(parsed_body)
|
|
8
|
+
@body = ::Nuncium::Responses::Dm::Body.new(parsed_body)
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module Nuncium
|
|
2
|
+
module WebServices
|
|
3
|
+
module DmOperations
|
|
4
|
+
class SignedMessageDownload < ::Nuncium::WebServices::DmOperations::Request
|
|
5
|
+
ATTRS = [:dmID].freeze
|
|
6
|
+
|
|
7
|
+
attr_accessor(*ATTRS)
|
|
8
|
+
|
|
9
|
+
def body(xml)
|
|
10
|
+
xml[:v20].SignedMessageDownload do
|
|
11
|
+
values(xml)
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module Nuncium
|
|
2
|
+
module WebServices
|
|
3
|
+
module DmOperations
|
|
4
|
+
class SignedSentMessageDownload < ::Nuncium::WebServices::DmOperations::Request
|
|
5
|
+
ATTRS = [:dmID].freeze
|
|
6
|
+
|
|
7
|
+
attr_accessor(*ATTRS)
|
|
8
|
+
|
|
9
|
+
def body(xml)
|
|
10
|
+
xml[:v20].SignedSentMessageDownload do
|
|
11
|
+
values(xml)
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|