docusign 0.6.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,2 +1,3 @@
1
1
  .DS_Store
2
- *.gem
2
+ *.gem
3
+ docusign.gemspec
data/Rakefile CHANGED
@@ -44,15 +44,16 @@ end
44
44
 
45
45
  namespace :docusign do
46
46
  namespace :services do
47
- desc "Generate SOAP stubs for Salesforce API"
47
+ desc "Generate SOAP stubs for Docusign API"
48
48
  task :generate do
49
49
  wsdl_path = File.expand_path(File.dirname(__FILE__) + "/lib/DocuSign3.0.10API.wsdl")
50
50
  wsdl2ruby('docusign', 'Docusign', "file://#{wsdl_path}")
51
51
  end
52
52
 
53
+ desc "Generate SOAP stubs for Docusign Credential API"
53
54
  task :generate_credential_api do
54
55
  wsdl_path = File.expand_path(File.dirname(__FILE__) + "/lib/Credential.wsdl")
55
- wsdl2ruby('docusign_credential', 'Docusign::Credential', "file://#{wsdl_path}")
56
+ wsdl2ruby('docusign/credential', 'Docusign::Credential', "file://#{wsdl_path}")
56
57
  end
57
58
  end
58
59
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.0
1
+ 0.7.1
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{docusign}
8
- s.version = "0.6.0"
8
+ s.version = "0.7.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Leigh Caplan"]
12
- s.date = %q{2010-04-13}
12
+ s.date = %q{2010-04-25}
13
13
  s.default_executable = %q{docusign}
14
14
  s.description = %q{A library for working with the Docusign API and associated objects.
15
15
  Provides SOAP4R-generated proxy classes, and extends many useful classes
@@ -1,5 +1,5 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
- <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://www.docusign.net/API/Credential" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://www.docusign.net/API/Credential" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
2
+ <wsdl:definitions xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://www.docusign.net/API/Credential" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://www.docusign.net/API/Credential" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
3
3
  <wsdl:types>
4
4
  <s:schema elementFormDefault="qualified" targetNamespace="http://www.docusign.net/API/Credential">
5
5
  <s:element name="Ping">
@@ -78,6 +78,24 @@
78
78
  </s:sequence>
79
79
  </s:complexType>
80
80
  </s:element>
81
+ <s:element name="RequestSenderToken">
82
+ <s:complexType>
83
+ <s:sequence>
84
+ <s:element minOccurs="0" maxOccurs="1" name="Email" type="s:string" />
85
+ <s:element minOccurs="0" maxOccurs="1" name="Password" type="s:string" />
86
+ <s:element minOccurs="0" maxOccurs="1" name="AccountID" type="s:string" />
87
+ <s:element minOccurs="0" maxOccurs="1" name="EnvelopeID" type="s:string" />
88
+ <s:element minOccurs="0" maxOccurs="1" name="ReturnURL" type="s:string" />
89
+ </s:sequence>
90
+ </s:complexType>
91
+ </s:element>
92
+ <s:element name="RequestSenderTokenResponse">
93
+ <s:complexType>
94
+ <s:sequence>
95
+ <s:element minOccurs="0" maxOccurs="1" name="RequestSenderTokenResult" type="s:string" />
96
+ </s:sequence>
97
+ </s:complexType>
98
+ </s:element>
81
99
  </s:schema>
82
100
  </wsdl:types>
83
101
  <wsdl:message name="PingSoapIn">
@@ -98,6 +116,12 @@
98
116
  <wsdl:message name="GetAuthenticationTokenSoapOut">
99
117
  <wsdl:part name="parameters" element="tns:GetAuthenticationTokenResponse" />
100
118
  </wsdl:message>
119
+ <wsdl:message name="RequestSenderTokenSoapIn">
120
+ <wsdl:part name="parameters" element="tns:RequestSenderToken" />
121
+ </wsdl:message>
122
+ <wsdl:message name="RequestSenderTokenSoapOut">
123
+ <wsdl:part name="parameters" element="tns:RequestSenderTokenResponse" />
124
+ </wsdl:message>
101
125
  <wsdl:portType name="CredentialSoap">
102
126
  <wsdl:operation name="Ping">
103
127
  <wsdl:input message="tns:PingSoapIn" />
@@ -111,6 +135,10 @@
111
135
  <wsdl:input message="tns:GetAuthenticationTokenSoapIn" />
112
136
  <wsdl:output message="tns:GetAuthenticationTokenSoapOut" />
113
137
  </wsdl:operation>
138
+ <wsdl:operation name="RequestSenderToken">
139
+ <wsdl:input message="tns:RequestSenderTokenSoapIn" />
140
+ <wsdl:output message="tns:RequestSenderTokenSoapOut" />
141
+ </wsdl:operation>
114
142
  </wsdl:portType>
115
143
  <wsdl:binding name="CredentialSoap" type="tns:CredentialSoap">
116
144
  <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
@@ -141,6 +169,15 @@
141
169
  <soap:body use="literal" />
142
170
  </wsdl:output>
143
171
  </wsdl:operation>
172
+ <wsdl:operation name="RequestSenderToken">
173
+ <soap:operation soapAction="http://www.docusign.net/API/Credential/RequestSenderToken" style="document" />
174
+ <wsdl:input>
175
+ <soap:body use="literal" />
176
+ </wsdl:input>
177
+ <wsdl:output>
178
+ <soap:body use="literal" />
179
+ </wsdl:output>
180
+ </wsdl:operation>
144
181
  </wsdl:binding>
145
182
  <wsdl:binding name="CredentialSoap12" type="tns:CredentialSoap">
146
183
  <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
@@ -171,6 +208,15 @@
171
208
  <soap12:body use="literal" />
172
209
  </wsdl:output>
173
210
  </wsdl:operation>
211
+ <wsdl:operation name="RequestSenderToken">
212
+ <soap12:operation soapAction="http://www.docusign.net/API/Credential/RequestSenderToken" style="document" />
213
+ <wsdl:input>
214
+ <soap12:body use="literal" />
215
+ </wsdl:input>
216
+ <wsdl:output>
217
+ <soap12:body use="literal" />
218
+ </wsdl:output>
219
+ </wsdl:operation>
174
220
  </wsdl:binding>
175
221
  <wsdl:service name="Credential">
176
222
  <wsdl:port name="CredentialSoap" binding="tns:CredentialSoap">
@@ -90,10 +90,6 @@ class LoginResponse
90
90
  @authenticationMessage = authenticationMessage
91
91
  @accounts = accounts
92
92
  end
93
-
94
- def success?
95
- @success
96
- end
97
93
  end
98
94
 
99
95
  attr_accessor :loginResult
@@ -132,5 +128,37 @@ class GetAuthenticationTokenResponse
132
128
  end
133
129
  end
134
130
 
131
+ # {http://www.docusign.net/API/Credential}RequestSenderToken
132
+ # email - SOAP::SOAPString
133
+ # password - SOAP::SOAPString
134
+ # accountID - SOAP::SOAPString
135
+ # envelopeID - SOAP::SOAPString
136
+ # returnURL - SOAP::SOAPString
137
+ class RequestSenderToken
138
+ attr_accessor :email
139
+ attr_accessor :password
140
+ attr_accessor :accountID
141
+ attr_accessor :envelopeID
142
+ attr_accessor :returnURL
143
+
144
+ def initialize(email = nil, password = nil, accountID = nil, envelopeID = nil, returnURL = nil)
145
+ @email = email
146
+ @password = password
147
+ @accountID = accountID
148
+ @envelopeID = envelopeID
149
+ @returnURL = returnURL
150
+ end
151
+ end
152
+
153
+ # {http://www.docusign.net/API/Credential}RequestSenderTokenResponse
154
+ # requestSenderTokenResult - SOAP::SOAPString
155
+ class RequestSenderTokenResponse
156
+ attr_accessor :requestSenderTokenResult
157
+
158
+ def initialize(requestSenderTokenResult = nil)
159
+ @requestSenderTokenResult = requestSenderTokenResult
160
+ end
161
+ end
162
+
135
163
 
136
164
  end; end
@@ -1,3 +1,5 @@
1
+ require 'docusign/credential.rb'
2
+ require 'docusign/credentialMappingRegistry.rb'
1
3
  require 'soap/rpc/driver'
2
4
 
3
5
  module Docusign::Credential
@@ -29,6 +31,14 @@ class CredentialSoap < ::SOAP::RPC::Driver
29
31
  { :request_style => :document, :request_use => :literal,
30
32
  :response_style => :document, :response_use => :literal,
31
33
  :faults => {} }
34
+ ],
35
+ [ "http://www.docusign.net/API/Credential/RequestSenderToken",
36
+ "requestSenderToken",
37
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "http://www.docusign.net/API/Credential", "RequestSenderToken"]],
38
+ ["out", "parameters", ["::SOAP::SOAPElement", "http://www.docusign.net/API/Credential", "RequestSenderTokenResponse"]] ],
39
+ { :request_style => :document, :request_use => :literal,
40
+ :response_style => :document, :response_use => :literal,
41
+ :faults => {} }
32
42
  ]
33
43
  ]
34
44
 
@@ -1,3 +1,4 @@
1
+ require 'docusign/credential.rb'
1
2
  require 'soap/mapping'
2
3
 
3
4
  module Docusign; module Credential
@@ -123,6 +124,26 @@ module DefaultMappingRegistry
123
124
  ["getAuthenticationTokenResult", ["SOAP::SOAPString", XSD::QName.new(NsCredential, "GetAuthenticationTokenResult")], [0, 1]]
124
125
  ]
125
126
  )
127
+
128
+ LiteralRegistry.register(
129
+ :class => Docusign::Credential::RequestSenderToken,
130
+ :schema_name => XSD::QName.new(NsCredential, "RequestSenderToken"),
131
+ :schema_element => [
132
+ ["email", ["SOAP::SOAPString", XSD::QName.new(NsCredential, "Email")], [0, 1]],
133
+ ["password", ["SOAP::SOAPString", XSD::QName.new(NsCredential, "Password")], [0, 1]],
134
+ ["accountID", ["SOAP::SOAPString", XSD::QName.new(NsCredential, "AccountID")], [0, 1]],
135
+ ["envelopeID", ["SOAP::SOAPString", XSD::QName.new(NsCredential, "EnvelopeID")], [0, 1]],
136
+ ["returnURL", ["SOAP::SOAPString", XSD::QName.new(NsCredential, "ReturnURL")], [0, 1]]
137
+ ]
138
+ )
139
+
140
+ LiteralRegistry.register(
141
+ :class => Docusign::Credential::RequestSenderTokenResponse,
142
+ :schema_name => XSD::QName.new(NsCredential, "RequestSenderTokenResponse"),
143
+ :schema_element => [
144
+ ["requestSenderTokenResult", ["SOAP::SOAPString", XSD::QName.new(NsCredential, "RequestSenderTokenResult")], [0, 1]]
145
+ ]
146
+ )
126
147
  end
127
148
 
128
149
  end; end
@@ -52,6 +52,24 @@ module AutoCamelize
52
52
  end
53
53
  end
54
54
 
55
+ module AutoQuery
56
+ def method_missing(method_name, *args, &block)
57
+ string_name = method_name.to_s
58
+
59
+ if (string_name =~ /\?$/) && respond_to?(string_name.gsub(/\?/, ''))
60
+ self.class.class_eval %Q{
61
+ def #{string_name}(*args, &block)
62
+ !! (send "#{string_name.gsub(/\?/, '')}", *args, &block)
63
+ end
64
+ }
65
+
66
+ send method_name, *args, &block
67
+ else
68
+ super
69
+ end
70
+ end
71
+ end
72
+
55
73
  constants = Docusign.constants
56
74
 
57
75
  # Recursively collect nested credential constants
@@ -60,7 +78,9 @@ constants = constants.map { |c| Docusign.const_get(c) } + Docusign::Credential.c
60
78
  constants.each do |constant|
61
79
  if constant.is_a? Class
62
80
  constant.send :include, AutoCamelize
81
+ constant.send :include, AutoQuery
63
82
  constant.extend AutoCamelize
83
+ constant.extend AutoQuery
64
84
 
65
85
  # Map iD to id, to avoid confusion
66
86
  constant.class_eval do
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 6
8
- - 0
9
- version: 0.6.0
7
+ - 7
8
+ - 1
9
+ version: 0.7.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Leigh Caplan
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-04-13 00:00:00 -07:00
17
+ date: 2010-04-25 00:00:00 -07:00
18
18
  default_executable: docusign
19
19
  dependencies: []
20
20