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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 245525f3efc297113fca60faf3bf2c6ead5fc5a5
4
- data.tar.gz: 3abc3c7567d78ab23be9e466a3c106a9f7a72cdd
3
+ metadata.gz: 37fcda1aff466ea92b52af39d74396b7fbed250a
4
+ data.tar.gz: 5043df18c256466473d81a35a9578deccbeffcc5
5
5
  SHA512:
6
- metadata.gz: c17cd284fb8974340179d021ae75975ca4e969c44939998541f2e1d384660908ac6f06120a8cf6ca2feed3dc2e5599d88b4bfaa51abe3cbad50a62323c15589d
7
- data.tar.gz: 5f2debbcc3d1973088ab5195c306d433a219c31ba979c51f7e40c170848fa0748ae5d8bef12416463518494e8e2cc8c47cd7a0dccc4688605e2638ddc8e54d81
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
- def self.transactionSigner(phoneNum, emailAddress, firstname, lastname)
47
- Signer.new(phoneNum, emailAddress, firstname, lastname)
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
- ContractSignatureRequest = Struct.new(
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, successUrl, failUrl, cancelUrl)
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 = ContractSignatureRequest.new(
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
@@ -1,3 +1,3 @@
1
1
  module Universign
2
- VERSION = '0.1.0'
2
+ VERSION = '0.2.0'
3
3
  end
data/universign.gemspec CHANGED
@@ -28,5 +28,4 @@ Gem::Specification.new do |spec|
28
28
  spec.add_development_dependency 'bundler', '~> 1.11'
29
29
  spec.add_development_dependency 'rake', '~> 10.0'
30
30
  spec.add_development_dependency 'rspec', '~> 3.0'
31
- spec.add_development_dependency 'pry'
32
31
  end
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.1.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: