ruby_isds 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +13 -0
- data/.overcommit.yml +47 -0
- data/.rspec +2 -0
- data/.rubocop.yml +23 -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 +139 -0
- data/Guardfile +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +160 -0
- data/Rakefile +6 -0
- data/_config.yml +1 -0
- data/bin/console +7 -0
- data/lib/ruby_isds.rb +85 -0
- data/lib/ruby_isds/configuration.rb +51 -0
- data/lib/ruby_isds/data_box.rb +33 -0
- data/lib/ruby_isds/data_message.rb +129 -0
- data/lib/ruby_isds/request.rb +105 -0
- data/lib/ruby_isds/response.rb +17 -0
- data/lib/ruby_isds/responses/body.rb +19 -0
- data/lib/ruby_isds/responses/data_box.rb +14 -0
- data/lib/ruby_isds/responses/db/body.rb +9 -0
- data/lib/ruby_isds/responses/db/status.rb +13 -0
- data/lib/ruby_isds/responses/dm/body.rb +9 -0
- data/lib/ruby_isds/responses/dm/status.rb +13 -0
- data/lib/ruby_isds/responses/message.rb +21 -0
- data/lib/ruby_isds/responses/messages/attachment.rb +22 -0
- data/lib/ruby_isds/responses/messages/collection.rb +28 -0
- data/lib/ruby_isds/responses/messages/delivery_info.rb +23 -0
- data/lib/ruby_isds/responses/messages/envelope.rb +23 -0
- data/lib/ruby_isds/responses/messages/event.rb +14 -0
- data/lib/ruby_isds/responses/status.rb +19 -0
- data/lib/ruby_isds/utils/errors.rb +10 -0
- data/lib/ruby_isds/version.rb +3 -0
- data/lib/ruby_isds/web_services/db_access/.gitkeep +0 -0
- data/lib/ruby_isds/web_services/db_access/change_isds_password.rb +21 -0
- data/lib/ruby_isds/web_services/db_search/check_data_box.rb +17 -0
- data/lib/ruby_isds/web_services/db_search/d_t_info.rb +17 -0
- data/lib/ruby_isds/web_services/db_search/data_box_credit_info.rb +17 -0
- data/lib/ruby_isds/web_services/db_search/find_data_box.rb +25 -0
- data/lib/ruby_isds/web_services/db_search/find_personal_data_box.rb +22 -0
- data/lib/ruby_isds/web_services/db_search/get_data_box_activity_status.rb +17 -0
- data/lib/ruby_isds/web_services/db_search/get_data_box_list.rb +20 -0
- data/lib/ruby_isds/web_services/db_search/isds_search_2.rb +18 -0
- data/lib/ruby_isds/web_services/db_search/p_d_z_info.rb +17 -0
- data/lib/ruby_isds/web_services/db_search/p_d_z_send_info.rb +17 -0
- data/lib/ruby_isds/web_services/db_search/request.rb +19 -0
- data/lib/ruby_isds/web_services/db_search/response.rb +13 -0
- data/lib/ruby_isds/web_services/dm_info/confirm_delivery.rb +17 -0
- data/lib/ruby_isds/web_services/dm_info/erase_message.rb +17 -0
- data/lib/ruby_isds/web_services/dm_info/get_delivery_info.rb +25 -0
- data/lib/ruby_isds/web_services/dm_info/get_list_of_received_messages.rb +26 -0
- data/lib/ruby_isds/web_services/dm_info/get_list_of_sent_messages.rb +26 -0
- data/lib/ruby_isds/web_services/dm_info/get_message_author.rb +17 -0
- data/lib/ruby_isds/web_services/dm_info/get_message_state_changes.rb +17 -0
- data/lib/ruby_isds/web_services/dm_info/get_signed_delivery_info.rb +17 -0
- data/lib/ruby_isds/web_services/dm_info/mark_message_as_downloaded.rb +17 -0
- data/lib/ruby_isds/web_services/dm_info/message_envelope_download.rb +25 -0
- data/lib/ruby_isds/web_services/dm_info/request.rb +19 -0
- data/lib/ruby_isds/web_services/dm_info/response.rb +13 -0
- data/lib/ruby_isds/web_services/dm_info/verify_message.rb +17 -0
- data/lib/ruby_isds/web_services/dm_operations/authenticate_message.rb +17 -0
- data/lib/ruby_isds/web_services/dm_operations/create_message.rb +30 -0
- data/lib/ruby_isds/web_services/dm_operations/create_multiple_messages.rb +30 -0
- data/lib/ruby_isds/web_services/dm_operations/message_download.rb +25 -0
- data/lib/ruby_isds/web_services/dm_operations/ping.rb +15 -0
- data/lib/ruby_isds/web_services/dm_operations/request.rb +19 -0
- data/lib/ruby_isds/web_services/dm_operations/resign_isds_document.rb +17 -0
- data/lib/ruby_isds/web_services/dm_operations/response.rb +13 -0
- data/lib/ruby_isds/web_services/dm_operations/signed_message_download.rb +17 -0
- data/lib/ruby_isds/web_services/dm_operations/signed_sent_message_download.rb +17 -0
- data/ruby_isds.gemspec +47 -0
- data/wercker.yml +12 -0
- metadata +303 -0
@@ -0,0 +1,17 @@
|
|
1
|
+
module RubyIsds
|
2
|
+
module WebServices
|
3
|
+
module DbSearch
|
4
|
+
class DataBoxCreditInfo < ::RubyIsds::WebServices::DbSearch::Request
|
5
|
+
ATTRS = %i[dbID ciFromDate ciTodate].freeze
|
6
|
+
|
7
|
+
attr_accessor(*ATTRS)
|
8
|
+
|
9
|
+
def body(xml)
|
10
|
+
xml[:v20].DataBoxCreditInfo do
|
11
|
+
values(xml)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
##
|
2
|
+
# FIXME: Owner info not parsed correctly, just Hash of stuff
|
3
|
+
module RubyIsds
|
4
|
+
module WebServices
|
5
|
+
module DbSearch
|
6
|
+
class FindDataBox < ::RubyIsds::WebServices::DbSearch::Request
|
7
|
+
ATTRS = %i[dbID dbType ic pnFirstName pnMiddleName
|
8
|
+
pnLastName pnLastNameAtBirth firmName biDate biCity biCounty
|
9
|
+
biState adCity adStreet adNumberInStreet adNumberInMunicipality
|
10
|
+
adZipCode adState nationality email telNumber identifier
|
11
|
+
registryCode dbState dbEffectiveOVM dbOpenAddressing].freeze
|
12
|
+
|
13
|
+
attr_accessor(*ATTRS)
|
14
|
+
|
15
|
+
def body(xml)
|
16
|
+
xml[:v20].FindDataBox do
|
17
|
+
xml[:v20].dbOwnerInfo do
|
18
|
+
values(xml)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module RubyIsds
|
2
|
+
module WebServices
|
3
|
+
module DbSearch
|
4
|
+
class FindPersonalDataBox < ::RubyIsds::WebServices::DbSearch::Request
|
5
|
+
ATTRS = %i[dbID aifoIsds pnFirstName pnMiddleName pnLastName
|
6
|
+
biDate biCity biCounty biState adCode adCity adDistrict
|
7
|
+
adStreet adNumberInStreet adNumberInMunicipality
|
8
|
+
adNumberInMunicipality adZipCode adState nationality].freeze
|
9
|
+
|
10
|
+
attr_accessor(*ATTRS)
|
11
|
+
|
12
|
+
def body(xml)
|
13
|
+
xml[:v20].FindPersonalDataBox do
|
14
|
+
xml[:v20].dbOwnerInfo do
|
15
|
+
values(xml)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module RubyIsds
|
2
|
+
module WebServices
|
3
|
+
module DbSearch
|
4
|
+
class GetDataBoxActivityStatus < ::RubyIsds::WebServices::DbSearch::Request
|
5
|
+
ATTRS = %i[dbID baFrom baTo].freeze
|
6
|
+
|
7
|
+
attr_accessor(*ATTRS)
|
8
|
+
|
9
|
+
def body(xml)
|
10
|
+
xml[:v20].GetDataBoxActivityStatus do
|
11
|
+
values(xml)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
##
|
2
|
+
# I don't think this is ever going to work... that is what they provide thou...
|
3
|
+
#
|
4
|
+
module RubyIsds
|
5
|
+
module WebServices
|
6
|
+
module DbSearch
|
7
|
+
class GetDataBoxList < ::RubyIsds::WebServices::DbSearch::Request
|
8
|
+
ATTRS = [:dblType].freeze
|
9
|
+
|
10
|
+
attr_accessor(*ATTRS)
|
11
|
+
|
12
|
+
def body(xml)
|
13
|
+
xml[:v20].GetDataBoxList do
|
14
|
+
values(xml)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module RubyIsds
|
2
|
+
module WebServices
|
3
|
+
module DbSearch
|
4
|
+
class IsdsSearch2 < ::RubyIsds::WebServices::DbSearch::Request
|
5
|
+
ATTRS = %i[searchText searchType searchScope page pageSize
|
6
|
+
highlighting].freeze
|
7
|
+
|
8
|
+
attr_accessor(*ATTRS)
|
9
|
+
|
10
|
+
def body(xml)
|
11
|
+
xml[:v20].ISDSSearch2 do
|
12
|
+
values(xml)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module RubyIsds
|
2
|
+
module WebServices
|
3
|
+
module DbSearch
|
4
|
+
class PDZInfo < ::RubyIsds::WebServices::DbSearch::Request
|
5
|
+
ATTRS = [:PDZSender].freeze
|
6
|
+
|
7
|
+
attr_accessor(*ATTRS)
|
8
|
+
|
9
|
+
def body(xml)
|
10
|
+
xml[:v20].PDZInfo do
|
11
|
+
values(xml)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module RubyIsds
|
2
|
+
module WebServices
|
3
|
+
module DbSearch
|
4
|
+
class PDZSendInfo < ::RubyIsds::WebServices::DbSearch::Request
|
5
|
+
ATTRS = %i[dbId PDZType].freeze
|
6
|
+
|
7
|
+
attr_accessor(*ATTRS)
|
8
|
+
|
9
|
+
def body(xml)
|
10
|
+
xml[:v20].PDZSendInfo do
|
11
|
+
values(xml)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module RubyIsds
|
2
|
+
module WebServices
|
3
|
+
module DbSearch
|
4
|
+
class Request < ::RubyIsds::Request
|
5
|
+
def response_wrapper
|
6
|
+
::RubyIsds::WebServices::DbSearch::Response
|
7
|
+
end
|
8
|
+
|
9
|
+
def api_url
|
10
|
+
'/DS/df'
|
11
|
+
end
|
12
|
+
|
13
|
+
def xml_url
|
14
|
+
"http://isds.#{RubyIsds.configuration.xml_url}/v20"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module RubyIsds
|
2
|
+
module WebServices
|
3
|
+
module DbSearch
|
4
|
+
class Response < ::RubyIsds::Response
|
5
|
+
def initialize(response)
|
6
|
+
super
|
7
|
+
@status = ::RubyIsds::Responses::Db::Status.new(parsed_body)
|
8
|
+
@body = ::RubyIsds::Responses::Db::Body.new(parsed_body)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module RubyIsds
|
2
|
+
module WebServices
|
3
|
+
module DmInfo
|
4
|
+
class ConfirmDelivery < ::RubyIsds::WebServices::DmInfo::Request
|
5
|
+
ATTRS = [:dmID].freeze
|
6
|
+
|
7
|
+
attr_accessor(*ATTRS)
|
8
|
+
|
9
|
+
def body(xml)
|
10
|
+
xml[:v20].ConfirmDelivery do
|
11
|
+
values(xml)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module RubyIsds
|
2
|
+
module WebServices
|
3
|
+
module DmInfo
|
4
|
+
class EraseMessage < ::RubyIsds::WebServices::DmInfo::Request
|
5
|
+
ATTRS = %i[dmID dmIncoming].freeze
|
6
|
+
|
7
|
+
attr_accessor(*ATTRS)
|
8
|
+
|
9
|
+
def body(xml)
|
10
|
+
xml[:v20].EraseMessage do
|
11
|
+
values(xml)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module RubyIsds
|
2
|
+
module WebServices
|
3
|
+
module DmInfo
|
4
|
+
class GetDeliveryInfo < ::RubyIsds::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
|
+
::RubyIsds::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 RubyIsds
|
2
|
+
module WebServices
|
3
|
+
module DmInfo
|
4
|
+
class GetListOfReceivedMessages < ::RubyIsds::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
|
+
::RubyIsds::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 RubyIsds
|
2
|
+
module WebServices
|
3
|
+
module DmInfo
|
4
|
+
class GetListOfSentMessages < ::RubyIsds::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
|
+
::RubyIsds::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 RubyIsds
|
2
|
+
module WebServices
|
3
|
+
module DmInfo
|
4
|
+
class GetMessageAuthor < ::RubyIsds::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 RubyIsds
|
2
|
+
module WebServices
|
3
|
+
module DmInfo
|
4
|
+
class GetMessageStateChanges < ::RubyIsds::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 RubyIsds
|
2
|
+
module WebServices
|
3
|
+
module DmInfo
|
4
|
+
class GetSignedDeliveryInfo < ::RubyIsds::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 RubyIsds
|
2
|
+
module WebServices
|
3
|
+
module DmInfo
|
4
|
+
class MarkMessageAsDownloaded < ::RubyIsds::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 RubyIsds
|
2
|
+
module WebServices
|
3
|
+
module DmInfo
|
4
|
+
class MessageEnvelopeDownload < ::RubyIsds::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
|
+
::RubyIsds::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 RubyIsds
|
2
|
+
module WebServices
|
3
|
+
module DmInfo
|
4
|
+
class Request < ::RubyIsds::Request
|
5
|
+
def response_wrapper
|
6
|
+
::RubyIsds::WebServices::DmInfo::Response
|
7
|
+
end
|
8
|
+
|
9
|
+
def api_url
|
10
|
+
'/DS/dx'
|
11
|
+
end
|
12
|
+
|
13
|
+
def xml_url
|
14
|
+
"http://isds.#{RubyIsds.configuration.xml_url}/v20"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|