docusign_click 1.1.0.rc1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/docusign_click/api_client.rb +382 -0
- data/lib/docusign_click/api_error.rb +37 -0
- data/lib/docusign_click/client/api_client.rb +1 -1
- data/lib/docusign_click/models/user_agreement_request.rb +1 -10
- data/lib/docusign_click/models/user_agreement_response.rb +1 -10
- data/lib/docusign_click/version.rb +1 -1
- data/lib/docusign_click.rb +0 -1
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 54c3a561390af917e9e249c8ae658624f5841b2e7c1b20a7142eeed58ef5c351
|
4
|
+
data.tar.gz: 304e3dab2fdf316a5d1ff663cd4923f466feba8897ea1f38ec6d258bdab08b2e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e414962999263a2b9d368fe76f203661e9d23147bd2d6ea074e7693da29de86f6d5717ea293725d615d2913e246dc6d0b06c230b9e23e7a3ccf5d9d858c3ec24
|
7
|
+
data.tar.gz: acfd800a7e9acd04e44a43f44559980dc79d9fec52ee3c7d1145b0f7acdcb6925f5768d22374bce7e45797c2a7a54b7401259096dee8e7d81ef5426af6f00f37
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
# DocuSign Click Ruby Client Changelog
|
2
2
|
See [DocuSign Support Center](https://support.docusign.com/en/releasenotes/) for Product Release Notes.
|
3
3
|
|
4
|
+
## [1.1.0] - Click API v1-21.4.01 - 2021-12-09
|
5
|
+
### Changed
|
6
|
+
- Added support for version v1-21.4.01 of the DocuSign Click API.
|
7
|
+
- Updated the SDK release version.
|
8
|
+
|
9
|
+
|
4
10
|
## [1.1.0.rc1] - Click API v1-21.4.00 - 2021-11-19
|
5
11
|
### Changed
|
6
12
|
- Added support for version v1-21.4.00 of the DocuSign Click API.
|
@@ -0,0 +1,382 @@
|
|
1
|
+
=begin
|
2
|
+
#DocuSign Click API
|
3
|
+
|
4
|
+
#DocuSign Click lets you capture consent to standard agreement terms with a single click: terms and conditions, terms of service, terms of use, privacy policies, and more. The Click API lets you include this customizable clickwrap solution in your DocuSign integrations.
|
5
|
+
|
6
|
+
OpenAPI spec version: v1
|
7
|
+
Contact: devcenter@docusign.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
=end
|
11
|
+
|
12
|
+
require 'date'
|
13
|
+
require 'json'
|
14
|
+
require 'logger'
|
15
|
+
require 'tempfile'
|
16
|
+
require 'typhoeus'
|
17
|
+
require 'uri'
|
18
|
+
require 'jwt'
|
19
|
+
require 'addressable/uri'
|
20
|
+
|
21
|
+
module DocuSign_Click
|
22
|
+
class ApiClient
|
23
|
+
# The Configuration object holding settings to be used in the API client.
|
24
|
+
attr_accessor :config
|
25
|
+
|
26
|
+
# Defines the headers to be used in HTTP requests of all API calls by default.
|
27
|
+
#
|
28
|
+
# @return [Hash]
|
29
|
+
attr_accessor :default_headers
|
30
|
+
|
31
|
+
# Initializes the ApiClient
|
32
|
+
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
|
33
|
+
def initialize(config = Configuration.default)
|
34
|
+
@config = config
|
35
|
+
@user_agent = "Swagger-Codegen/1.1.0/ruby"
|
36
|
+
@default_headers = {
|
37
|
+
'Content-Type' => "application/json",
|
38
|
+
'User-Agent' => @user_agent
|
39
|
+
}
|
40
|
+
end
|
41
|
+
|
42
|
+
def self.default
|
43
|
+
@@default ||= ApiClient.new
|
44
|
+
end
|
45
|
+
|
46
|
+
# Call an API with given options.
|
47
|
+
#
|
48
|
+
# @return [Array<(Object, Fixnum, Hash)>] an array of 3 elements:
|
49
|
+
# the data deserialized from response body (could be nil), response status code and response headers.
|
50
|
+
def call_api(http_method, path, opts = {})
|
51
|
+
request = build_request(http_method, path, opts)
|
52
|
+
response = request.run
|
53
|
+
|
54
|
+
if @config.debugging
|
55
|
+
@config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n"
|
56
|
+
end
|
57
|
+
|
58
|
+
unless response.success?
|
59
|
+
if response.timed_out?
|
60
|
+
fail ApiError.new('Connection timed out')
|
61
|
+
elsif response.code == 0
|
62
|
+
# Errors from libcurl will be made visible here
|
63
|
+
fail ApiError.new(:code => 0,
|
64
|
+
:message => response.return_message)
|
65
|
+
else
|
66
|
+
fail ApiError.new(:code => response.code,
|
67
|
+
:response_headers => response.headers,
|
68
|
+
:response_body => response.body),
|
69
|
+
response.status_message
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
if opts[:return_type]
|
74
|
+
data = deserialize(response, opts[:return_type])
|
75
|
+
else
|
76
|
+
data = nil
|
77
|
+
end
|
78
|
+
return data, response.code, response.headers
|
79
|
+
end
|
80
|
+
|
81
|
+
# Builds the HTTP request
|
82
|
+
#
|
83
|
+
# @param [String] http_method HTTP method/verb (e.g. POST)
|
84
|
+
# @param [String] path URL path (e.g. /account/new)
|
85
|
+
# @option opts [Hash] :header_params Header parameters
|
86
|
+
# @option opts [Hash] :query_params Query parameters
|
87
|
+
# @option opts [Hash] :form_params Query parameters
|
88
|
+
# @option opts [Object] :body HTTP body (JSON/XML)
|
89
|
+
# @return [Typhoeus::Request] A Typhoeus Request
|
90
|
+
def build_request(http_method, path, opts = {})
|
91
|
+
url = build_request_url(path)
|
92
|
+
http_method = http_method.to_sym.downcase
|
93
|
+
|
94
|
+
header_params = @default_headers.merge(opts[:header_params] || {})
|
95
|
+
|
96
|
+
# Add SDK default header
|
97
|
+
header_params.store("X-DocuSign-SDK", "Ruby")
|
98
|
+
|
99
|
+
query_params = opts[:query_params] || {}
|
100
|
+
form_params = opts[:form_params] || {}
|
101
|
+
|
102
|
+
update_params_for_auth! header_params, query_params, opts[:auth_names]
|
103
|
+
|
104
|
+
# set ssl_verifyhosts option based on @config.verify_ssl_host (true/false)
|
105
|
+
_verify_ssl_host = @config.verify_ssl_host ? 2 : 0
|
106
|
+
|
107
|
+
req_opts = {
|
108
|
+
:method => http_method,
|
109
|
+
:headers => header_params,
|
110
|
+
:params => query_params,
|
111
|
+
:params_encoding => @config.params_encoding,
|
112
|
+
:timeout => @config.timeout,
|
113
|
+
:ssl_verifypeer => @config.verify_ssl,
|
114
|
+
:ssl_verifyhost => _verify_ssl_host,
|
115
|
+
:sslcert => @config.cert_file,
|
116
|
+
:sslkey => @config.key_file,
|
117
|
+
:verbose => @config.debugging
|
118
|
+
}
|
119
|
+
|
120
|
+
# set custom cert, if provided
|
121
|
+
req_opts[:cainfo] = @config.ssl_ca_cert if @config.ssl_ca_cert
|
122
|
+
|
123
|
+
if [:post, :patch, :put, :delete].include?(http_method)
|
124
|
+
req_body = build_request_body(header_params, form_params, opts[:body])
|
125
|
+
req_opts.update :body => req_body
|
126
|
+
if @config.debugging
|
127
|
+
@config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n"
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
Typhoeus::Request.new(url, req_opts)
|
132
|
+
end
|
133
|
+
|
134
|
+
# Check if the given MIME is a JSON MIME.
|
135
|
+
# JSON MIME examples:
|
136
|
+
# application/json
|
137
|
+
# application/json; charset=UTF8
|
138
|
+
# APPLICATION/JSON
|
139
|
+
# */*
|
140
|
+
# @param [String] mime MIME
|
141
|
+
# @return [Boolean] True if the MIME is application/json
|
142
|
+
def json_mime?(mime)
|
143
|
+
(mime == "*/*") || !(mime =~ /\Aapplication\/json(;.*)?\z/i).nil?
|
144
|
+
end
|
145
|
+
|
146
|
+
# Deserialize the response to the given return type.
|
147
|
+
#
|
148
|
+
# @param [Response] response HTTP response
|
149
|
+
# @param [String] return_type some examples: "User", "Array[User]", "Hash[String,Integer]"
|
150
|
+
def deserialize(response, return_type)
|
151
|
+
body = response.body
|
152
|
+
return nil if body.nil? || body.empty?
|
153
|
+
|
154
|
+
# return response body directly for String return type
|
155
|
+
return body if return_type == 'String'
|
156
|
+
|
157
|
+
# handle file downloading - save response body into a tmp file and return the File instance
|
158
|
+
return download_file(response) if return_type == 'File'
|
159
|
+
|
160
|
+
# ensuring a default content type
|
161
|
+
content_type = response.headers['Content-Type'] || 'application/json'
|
162
|
+
|
163
|
+
fail "Content-Type is not supported: #{content_type}" unless json_mime?(content_type)
|
164
|
+
|
165
|
+
begin
|
166
|
+
data = JSON.parse("[#{body}]", :symbolize_names => true)[0]
|
167
|
+
rescue JSON::ParserError => e
|
168
|
+
if %w(String Date DateTime).include?(return_type)
|
169
|
+
data = body
|
170
|
+
else
|
171
|
+
raise e
|
172
|
+
end
|
173
|
+
end
|
174
|
+
|
175
|
+
convert_to_type data, return_type
|
176
|
+
end
|
177
|
+
|
178
|
+
# Convert data to the given return type.
|
179
|
+
# @param [Object] data Data to be converted
|
180
|
+
# @param [String] return_type Return type
|
181
|
+
# @return [Mixed] Data in a particular type
|
182
|
+
def convert_to_type(data, return_type)
|
183
|
+
return nil if data.nil?
|
184
|
+
case return_type
|
185
|
+
when 'String'
|
186
|
+
data.to_s
|
187
|
+
when 'Integer'
|
188
|
+
data.to_i
|
189
|
+
when 'Float'
|
190
|
+
data.to_f
|
191
|
+
when 'BOOLEAN'
|
192
|
+
data == true
|
193
|
+
when 'DateTime'
|
194
|
+
# parse date time (expecting ISO 8601 format)
|
195
|
+
DateTime.parse data
|
196
|
+
when 'Date'
|
197
|
+
# parse date time (expecting ISO 8601 format)
|
198
|
+
Date.parse data
|
199
|
+
when 'Object'
|
200
|
+
# generic object (usually a Hash), return directly
|
201
|
+
data
|
202
|
+
when /\AArray<(.+)>\z/
|
203
|
+
# e.g. Array<Pet>
|
204
|
+
sub_type = $1
|
205
|
+
data.map {|item| convert_to_type(item, sub_type) }
|
206
|
+
when /\AHash\<String, (.+)\>\z/
|
207
|
+
# e.g. Hash<String, Integer>
|
208
|
+
sub_type = $1
|
209
|
+
{}.tap do |hash|
|
210
|
+
data.each {|k, v| hash[k] = convert_to_type(v, sub_type) }
|
211
|
+
end
|
212
|
+
else
|
213
|
+
# models, e.g. Pet
|
214
|
+
DocuSign_Click.const_get(return_type).new.tap do |model|
|
215
|
+
model.build_from_hash data
|
216
|
+
end
|
217
|
+
end
|
218
|
+
end
|
219
|
+
|
220
|
+
# Save response body into a file in (the defined) temporary folder, using the filename
|
221
|
+
# from the "Content-Disposition" header if provided, otherwise a random filename.
|
222
|
+
#
|
223
|
+
# @see Configuration#temp_folder_path
|
224
|
+
# @return [Tempfile] the file downloaded
|
225
|
+
def download_file(response)
|
226
|
+
content_disposition = response.headers['Content-Disposition']
|
227
|
+
if content_disposition and content_disposition =~ /filename=/i
|
228
|
+
filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1]
|
229
|
+
prefix = sanitize_filename(filename)
|
230
|
+
else
|
231
|
+
prefix = 'download-'
|
232
|
+
end
|
233
|
+
prefix = prefix + '-' unless prefix.end_with?('-')
|
234
|
+
|
235
|
+
tempfile = nil
|
236
|
+
encoding = response.body.encoding
|
237
|
+
Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding) do |file|
|
238
|
+
file.write(response.body)
|
239
|
+
tempfile = file
|
240
|
+
end
|
241
|
+
@config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
|
242
|
+
"with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
|
243
|
+
"will be deleted automatically with GC. It's also recommended to delete the temp file "\
|
244
|
+
"explicitly with `tempfile.delete`"
|
245
|
+
tempfile
|
246
|
+
end
|
247
|
+
|
248
|
+
# Sanitize filename by removing path.
|
249
|
+
# e.g. ../../sun.gif becomes sun.gif
|
250
|
+
#
|
251
|
+
# @param [String] filename the filename to be sanitized
|
252
|
+
# @return [String] the sanitized filename
|
253
|
+
def sanitize_filename(filename)
|
254
|
+
filename.gsub(/.*[\/\\]/, '')
|
255
|
+
end
|
256
|
+
|
257
|
+
def build_request_url(path)
|
258
|
+
# Add leading and trailing slashes to path
|
259
|
+
path = "/#{path}".gsub(/\/+/, '/')
|
260
|
+
Addressable::URI.encode(@config.base_url + path)
|
261
|
+
end
|
262
|
+
|
263
|
+
# Builds the HTTP request body
|
264
|
+
#
|
265
|
+
# @param [Hash] header_params Header parameters
|
266
|
+
# @param [Hash] form_params Query parameters
|
267
|
+
# @param [Object] body HTTP body (JSON/XML)
|
268
|
+
# @return [String] HTTP body data in the form of string
|
269
|
+
def build_request_body(header_params, form_params, body)
|
270
|
+
# http form
|
271
|
+
if header_params['Content-Type'] == 'application/x-www-form-urlencoded' ||
|
272
|
+
header_params['Content-Type'] == 'multipart/form-data'
|
273
|
+
data = {}
|
274
|
+
form_params.each do |key, value|
|
275
|
+
case value
|
276
|
+
when File, Array, nil
|
277
|
+
# let typhoeus handle File, Array and nil parameters
|
278
|
+
data[key] = value
|
279
|
+
else
|
280
|
+
data[key] = value.to_s
|
281
|
+
end
|
282
|
+
end
|
283
|
+
elsif body
|
284
|
+
data = body.is_a?(String) ? body : body.to_json
|
285
|
+
else
|
286
|
+
data = nil
|
287
|
+
end
|
288
|
+
data
|
289
|
+
end
|
290
|
+
|
291
|
+
# Update hearder and query params based on authentication settings.
|
292
|
+
#
|
293
|
+
# @param [Hash] header_params Header parameters
|
294
|
+
# @param [Hash] query_params Query parameters
|
295
|
+
# @param [String] auth_names Authentication scheme name
|
296
|
+
def update_params_for_auth!(header_params, query_params, auth_names)
|
297
|
+
Array(auth_names).each do |auth_name|
|
298
|
+
auth_setting = @config.auth_settings[auth_name]
|
299
|
+
next unless auth_setting
|
300
|
+
case auth_setting[:in]
|
301
|
+
when 'header' then header_params[auth_setting[:key]] = auth_setting[:value]
|
302
|
+
when 'query' then query_params[auth_setting[:key]] = auth_setting[:value]
|
303
|
+
else fail ArgumentError, 'Authentication token must be in `query` of `header`'
|
304
|
+
end
|
305
|
+
end
|
306
|
+
end
|
307
|
+
|
308
|
+
# Sets user agent in HTTP header
|
309
|
+
#
|
310
|
+
# @param [String] user_agent User agent (e.g. swagger-codegen/ruby/1.0.0)
|
311
|
+
def user_agent=(user_agent)
|
312
|
+
@user_agent = user_agent
|
313
|
+
@default_headers['User-Agent'] = @user_agent
|
314
|
+
end
|
315
|
+
|
316
|
+
# Return Accept header based on an array of accepts provided.
|
317
|
+
# @param [Array] accepts array for Accept
|
318
|
+
# @return [String] the Accept header (e.g. application/json)
|
319
|
+
def select_header_accept(accepts)
|
320
|
+
return nil if accepts.nil? || accepts.empty?
|
321
|
+
# use JSON when present, otherwise use all of the provided
|
322
|
+
json_accept = accepts.find { |s| json_mime?(s) }
|
323
|
+
return json_accept || accepts.join(',')
|
324
|
+
end
|
325
|
+
|
326
|
+
# Return Content-Type header based on an array of content types provided.
|
327
|
+
# @param [Array] content_types array for Content-Type
|
328
|
+
# @return [String] the Content-Type header (e.g. application/json)
|
329
|
+
def select_header_content_type(content_types)
|
330
|
+
# use application/json by default
|
331
|
+
return 'application/json' if content_types.nil? || content_types.empty?
|
332
|
+
# use JSON when present, otherwise use the first one
|
333
|
+
json_content_type = content_types.find { |s| json_mime?(s) }
|
334
|
+
return json_content_type || content_types.first
|
335
|
+
end
|
336
|
+
|
337
|
+
# Convert object (array, hash, object, etc) to JSON string.
|
338
|
+
# @param [Object] model object to be converted into JSON string
|
339
|
+
# @return [String] JSON string representation of the object
|
340
|
+
def object_to_http_body(model)
|
341
|
+
return model if model.nil? || model.is_a?(String)
|
342
|
+
local_body = nil
|
343
|
+
if model.is_a?(Array)
|
344
|
+
local_body = model.map{|m| object_to_hash(m) }
|
345
|
+
else
|
346
|
+
local_body = object_to_hash(model)
|
347
|
+
end
|
348
|
+
local_body.to_json
|
349
|
+
end
|
350
|
+
|
351
|
+
# Convert object(non-array) to hash.
|
352
|
+
# @param [Object] obj object to be converted into JSON string
|
353
|
+
# @return [String] JSON string representation of the object
|
354
|
+
def object_to_hash(obj)
|
355
|
+
if obj.respond_to?(:to_hash)
|
356
|
+
obj.to_hash
|
357
|
+
else
|
358
|
+
obj
|
359
|
+
end
|
360
|
+
end
|
361
|
+
|
362
|
+
# Build parameter value according to the given collection format.
|
363
|
+
# @param [String] collection_format one of :csv, :ssv, :tsv, :pipes and :multi
|
364
|
+
def build_collection_param(param, collection_format)
|
365
|
+
case collection_format
|
366
|
+
when :csv
|
367
|
+
param.join(',')
|
368
|
+
when :ssv
|
369
|
+
param.join(' ')
|
370
|
+
when :tsv
|
371
|
+
param.join("\t")
|
372
|
+
when :pipes
|
373
|
+
param.join('|')
|
374
|
+
when :multi
|
375
|
+
# return the array directly as typhoeus will handle it as expected
|
376
|
+
param
|
377
|
+
else
|
378
|
+
fail "unknown collection format: #{collection_format.inspect}"
|
379
|
+
end
|
380
|
+
end
|
381
|
+
end
|
382
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
=begin
|
2
|
+
#DocuSign Click API
|
3
|
+
|
4
|
+
#DocuSign Click lets you capture consent to standard agreement terms with a single click: terms and conditions, terms of service, terms of use, privacy policies, and more. The Click API lets you include this customizable clickwrap solution in your DocuSign integrations.
|
5
|
+
|
6
|
+
OpenAPI spec version: v1
|
7
|
+
Contact: devcenter@docusign.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
=end
|
11
|
+
|
12
|
+
module DocuSign_Click
|
13
|
+
class ApiError < StandardError
|
14
|
+
attr_reader :code, :response_headers, :response_body
|
15
|
+
|
16
|
+
# Usage examples:
|
17
|
+
# ApiError.new
|
18
|
+
# ApiError.new("message")
|
19
|
+
# ApiError.new(:code => 500, :response_headers => {}, :response_body => "")
|
20
|
+
# ApiError.new(:code => 404, :message => "Not Found")
|
21
|
+
def initialize(arg = nil)
|
22
|
+
if arg.is_a? Hash
|
23
|
+
if arg.key?(:message) || arg.key?('message')
|
24
|
+
super(arg[:message] || arg['message'])
|
25
|
+
else
|
26
|
+
super arg
|
27
|
+
end
|
28
|
+
|
29
|
+
arg.each do |k, v|
|
30
|
+
instance_variable_set "@#{k}", v
|
31
|
+
end
|
32
|
+
else
|
33
|
+
super arg
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -35,7 +35,7 @@ module DocuSign_Click
|
|
35
35
|
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
|
36
36
|
def initialize(config = Configuration.default)
|
37
37
|
@config = config
|
38
|
-
@user_agent = "Swagger-Codegen/1.1.0
|
38
|
+
@user_agent = "Swagger-Codegen/1.1.0/ruby"
|
39
39
|
@default_headers = {
|
40
40
|
'Content-Type' => "application/json",
|
41
41
|
'User-Agent' => @user_agent
|
@@ -16,8 +16,6 @@ module DocuSign_Click
|
|
16
16
|
#
|
17
17
|
attr_accessor :client_user_id
|
18
18
|
|
19
|
-
attr_accessor :document_data
|
20
|
-
|
21
19
|
#
|
22
20
|
attr_accessor :metadata
|
23
21
|
|
@@ -25,7 +23,6 @@ module DocuSign_Click
|
|
25
23
|
def self.attribute_map
|
26
24
|
{
|
27
25
|
:'client_user_id' => :'clientUserId',
|
28
|
-
:'document_data' => :'documentData',
|
29
26
|
:'metadata' => :'metadata'
|
30
27
|
}
|
31
28
|
end
|
@@ -34,7 +31,6 @@ module DocuSign_Click
|
|
34
31
|
def self.swagger_types
|
35
32
|
{
|
36
33
|
:'client_user_id' => :'String',
|
37
|
-
:'document_data' => :'DocumentData',
|
38
34
|
:'metadata' => :'String'
|
39
35
|
}
|
40
36
|
end
|
@@ -51,10 +47,6 @@ module DocuSign_Click
|
|
51
47
|
self.client_user_id = attributes[:'clientUserId']
|
52
48
|
end
|
53
49
|
|
54
|
-
if attributes.has_key?(:'documentData')
|
55
|
-
self.document_data = attributes[:'documentData']
|
56
|
-
end
|
57
|
-
|
58
50
|
if attributes.has_key?(:'metadata')
|
59
51
|
self.metadata = attributes[:'metadata']
|
60
52
|
end
|
@@ -79,7 +71,6 @@ module DocuSign_Click
|
|
79
71
|
return true if self.equal?(o)
|
80
72
|
self.class == o.class &&
|
81
73
|
client_user_id == o.client_user_id &&
|
82
|
-
document_data == o.document_data &&
|
83
74
|
metadata == o.metadata
|
84
75
|
end
|
85
76
|
|
@@ -92,7 +83,7 @@ module DocuSign_Click
|
|
92
83
|
# Calculates hash code according to all attributes.
|
93
84
|
# @return [Fixnum] Hash code
|
94
85
|
def hash
|
95
|
-
[client_user_id,
|
86
|
+
[client_user_id, metadata].hash
|
96
87
|
end
|
97
88
|
|
98
89
|
# Builds the object from hash
|
@@ -40,8 +40,6 @@ module DocuSign_Click
|
|
40
40
|
#
|
41
41
|
attr_accessor :declined_on
|
42
42
|
|
43
|
-
attr_accessor :document_data
|
44
|
-
|
45
43
|
#
|
46
44
|
attr_accessor :documents
|
47
45
|
|
@@ -74,7 +72,6 @@ module DocuSign_Click
|
|
74
72
|
:'consumer_disclosure_html' => :'consumerDisclosureHtml',
|
75
73
|
:'created_on' => :'createdOn',
|
76
74
|
:'declined_on' => :'declinedOn',
|
77
|
-
:'document_data' => :'documentData',
|
78
75
|
:'documents' => :'documents',
|
79
76
|
:'metadata' => :'metadata',
|
80
77
|
:'settings' => :'settings',
|
@@ -97,7 +94,6 @@ module DocuSign_Click
|
|
97
94
|
:'consumer_disclosure_html' => :'String',
|
98
95
|
:'created_on' => :'Object',
|
99
96
|
:'declined_on' => :'Object',
|
100
|
-
:'document_data' => :'DocumentData',
|
101
97
|
:'documents' => :'Array<Document>',
|
102
98
|
:'metadata' => :'String',
|
103
99
|
:'settings' => :'DisplaySettings',
|
@@ -152,10 +148,6 @@ module DocuSign_Click
|
|
152
148
|
self.declined_on = attributes[:'declinedOn']
|
153
149
|
end
|
154
150
|
|
155
|
-
if attributes.has_key?(:'documentData')
|
156
|
-
self.document_data = attributes[:'documentData']
|
157
|
-
end
|
158
|
-
|
159
151
|
if attributes.has_key?(:'documents')
|
160
152
|
if (value = attributes[:'documents']).is_a?(Array)
|
161
153
|
self.documents = value
|
@@ -214,7 +206,6 @@ module DocuSign_Click
|
|
214
206
|
consumer_disclosure_html == o.consumer_disclosure_html &&
|
215
207
|
created_on == o.created_on &&
|
216
208
|
declined_on == o.declined_on &&
|
217
|
-
document_data == o.document_data &&
|
218
209
|
documents == o.documents &&
|
219
210
|
metadata == o.metadata &&
|
220
211
|
settings == o.settings &&
|
@@ -233,7 +224,7 @@ module DocuSign_Click
|
|
233
224
|
# Calculates hash code according to all attributes.
|
234
225
|
# @return [Fixnum] Hash code
|
235
226
|
def hash
|
236
|
-
[account_id, agreed_on, agreement_id, agreement_url, clickwrap_id, client_user_id, consumer_disclosure_html, created_on, declined_on,
|
227
|
+
[account_id, agreed_on, agreement_id, agreement_url, clickwrap_id, client_user_id, consumer_disclosure_html, created_on, declined_on, documents, metadata, settings, status, version, version_id, version_number].hash
|
237
228
|
end
|
238
229
|
|
239
230
|
# Builds the object from hash
|
data/lib/docusign_click.rb
CHANGED
@@ -34,7 +34,6 @@ require 'docusign_click/models/clickwrap_versions_response'
|
|
34
34
|
require 'docusign_click/models/clickwraps_delete_response'
|
35
35
|
require 'docusign_click/models/display_settings'
|
36
36
|
require 'docusign_click/models/document'
|
37
|
-
require 'docusign_click/models/document_data'
|
38
37
|
require 'docusign_click/models/error_details'
|
39
38
|
require 'docusign_click/models/service_information'
|
40
39
|
require 'docusign_click/models/service_version'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docusign_click
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DocuSign
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|
@@ -288,6 +288,8 @@ files:
|
|
288
288
|
- git_push.sh
|
289
289
|
- lib/docusign_click.rb
|
290
290
|
- lib/docusign_click/api/accounts_api.rb
|
291
|
+
- lib/docusign_click/api_client.rb
|
292
|
+
- lib/docusign_click/api_error.rb
|
291
293
|
- lib/docusign_click/client/api_client.rb
|
292
294
|
- lib/docusign_click/client/api_error.rb
|
293
295
|
- lib/docusign_click/client/auth/oauth.rb
|
@@ -339,9 +341,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
339
341
|
version: '1.9'
|
340
342
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
341
343
|
requirements:
|
342
|
-
- - "
|
344
|
+
- - ">="
|
343
345
|
- !ruby/object:Gem::Version
|
344
|
-
version:
|
346
|
+
version: '0'
|
345
347
|
requirements: []
|
346
348
|
rubyforge_project:
|
347
349
|
rubygems_version: 2.7.6
|