universign 0.1.0 → 0.2.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 +4 -4
- data/lib/universign.rb +24 -14
- data/lib/universign/version.rb +1 -1
- data/universign.gemspec +0 -1
- metadata +1 -15
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 37fcda1aff466ea92b52af39d74396b7fbed250a
|
|
4
|
+
data.tar.gz: 5043df18c256466473d81a35a9578deccbeffcc5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 79116490f911fabbf5ece6549efdf1c203b3af42f943d39a4e4083700be8ef906ca8485f6f0d01994a10d5c9932461ad56f7c274b9a0620f17178b079d9714b6
|
|
7
|
+
data.tar.gz: b51c6c92cdba641ed41c703792b8a731069429268710e9493ec4b860d55b5829fd180ca9482af13a24c1fc0b255caaf524e1b92d3abede29d9b3aa1d2cbd2df2
|
data/lib/universign.rb
CHANGED
|
@@ -43,25 +43,30 @@ module Universign
|
|
|
43
43
|
|
|
44
44
|
end
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
Document = Struct.new(:content, :name)
|
|
47
|
+
Signer = Struct.new(
|
|
48
|
+
:phoneNum,
|
|
49
|
+
:emailAddress,
|
|
50
|
+
:firstname,
|
|
51
|
+
:lastname,
|
|
52
|
+
:successURL,
|
|
53
|
+
:failURL,
|
|
54
|
+
:cancelURL
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
def self.transactionSigner(phoneNum, emailAddress, firstname, lastname, successURL, failURL, cancelURL)
|
|
58
|
+
Signer.new(phoneNum, emailAddress, firstname, lastname, successURL, failURL, cancelURL)
|
|
48
59
|
end
|
|
49
60
|
|
|
50
61
|
def self.transactionDocument(content, name)
|
|
51
62
|
Document.new(XMLRPC::Base64.new(content), name)
|
|
52
63
|
end
|
|
53
64
|
|
|
54
|
-
Document = Struct.new(:content, :name)
|
|
55
|
-
Signer = Struct.new(:phoneNum, :emailAddress, :firstname, :lastname)
|
|
56
|
-
|
|
57
65
|
class Client < XMLRPC::Client
|
|
58
66
|
|
|
59
|
-
|
|
67
|
+
RequestTransaction = Struct.new(
|
|
60
68
|
:documents,
|
|
61
69
|
:signers,
|
|
62
|
-
:successUrl,
|
|
63
|
-
:failUrl,
|
|
64
|
-
:cancelUrl,
|
|
65
70
|
:handwrittenSignatureMode,
|
|
66
71
|
:profile,
|
|
67
72
|
:certificateType,
|
|
@@ -69,15 +74,12 @@ module Universign
|
|
|
69
74
|
)
|
|
70
75
|
|
|
71
76
|
# Request signature (Client side)
|
|
72
|
-
def requestTransaction(transactionSigners, transactionDocuments
|
|
77
|
+
def requestTransaction(transactionSigners, transactionDocuments)
|
|
73
78
|
transactionSigners = [transactionSigners] unless transactionSigners.is_a? Array
|
|
74
79
|
transactionDocuments = [transactionDocuments] unless transactionDocuments.is_a? Array
|
|
75
|
-
request =
|
|
80
|
+
request = RequestTransaction.new(
|
|
76
81
|
transactionDocuments,
|
|
77
82
|
transactionSigners,
|
|
78
|
-
successUrl,
|
|
79
|
-
failUrl,
|
|
80
|
-
cancelUrl,
|
|
81
83
|
0,
|
|
82
84
|
Universign.configuration.profile,
|
|
83
85
|
'simple',
|
|
@@ -86,6 +88,14 @@ module Universign
|
|
|
86
88
|
call('requester.requestTransaction', request)
|
|
87
89
|
end
|
|
88
90
|
|
|
91
|
+
def getTransactionInfo(transactionId)
|
|
92
|
+
call('requester.getTransactionInfo', transactionId)
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
def getDocuments(transactionId)
|
|
96
|
+
call('requester.getDocuments', transactionId)
|
|
97
|
+
end
|
|
98
|
+
|
|
89
99
|
def set_debug
|
|
90
100
|
@http.set_debug_output($stderr);
|
|
91
101
|
end
|
data/lib/universign/version.rb
CHANGED
data/universign.gemspec
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: universign
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Matthieu Foillard
|
|
@@ -52,20 +52,6 @@ dependencies:
|
|
|
52
52
|
- - "~>"
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
54
|
version: '3.0'
|
|
55
|
-
- !ruby/object:Gem::Dependency
|
|
56
|
-
name: pry
|
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
|
58
|
-
requirements:
|
|
59
|
-
- - ">="
|
|
60
|
-
- !ruby/object:Gem::Version
|
|
61
|
-
version: '0'
|
|
62
|
-
type: :development
|
|
63
|
-
prerelease: false
|
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
-
requirements:
|
|
66
|
-
- - ">="
|
|
67
|
-
- !ruby/object:Gem::Version
|
|
68
|
-
version: '0'
|
|
69
55
|
description: 'A ruby client for the Universign XML-RPC api. Note : VERY EXPERIMENTAL
|
|
70
56
|
AND INCOMPLETE'
|
|
71
57
|
email:
|