docusign_click 1.0.0.beta
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +6 -0
- data/Gemfile +7 -0
- data/Gemfile.lock +69 -0
- data/LICENSE +21 -0
- data/README.md +80 -0
- data/Rakefile +8 -0
- data/docusign_click-1.0.0.pre.alpha.gem +0 -0
- data/docusign_click-1.0.0.rc1.gem +0 -0
- data/docusign_click.gemspec +45 -0
- data/git_push.sh +55 -0
- data/lib/.DS_Store +0 -0
- data/lib/docusign_click.rb +62 -0
- data/lib/docusign_click/.DS_Store +0 -0
- data/lib/docusign_click/api/.DS_Store +0 -0
- data/lib/docusign_click/api/accounts_api.rb +1377 -0
- data/lib/docusign_click/client/.DS_Store +0 -0
- data/lib/docusign_click/client/api_client.rb +590 -0
- data/lib/docusign_click/client/api_error.rb +37 -0
- data/lib/docusign_click/client/auth/oauth.rb +1061 -0
- data/lib/docusign_click/configuration.rb +202 -0
- data/lib/docusign_click/models/clickwrap_agreements_response.rb +226 -0
- data/lib/docusign_click/models/clickwrap_delete_response.rb +224 -0
- data/lib/docusign_click/models/clickwrap_request.rb +294 -0
- data/lib/docusign_click/models/clickwrap_scheduled_reacceptance.rb +204 -0
- data/lib/docusign_click/models/clickwrap_transfer_request.rb +194 -0
- data/lib/docusign_click/models/clickwrap_version.rb +283 -0
- data/lib/docusign_click/models/clickwrap_version_delete_response.rb +303 -0
- data/lib/docusign_click/models/clickwrap_version_response.rb +334 -0
- data/lib/docusign_click/models/clickwrap_version_summary_response.rb +313 -0
- data/lib/docusign_click/models/clickwrap_versions_delete_response.rb +206 -0
- data/lib/docusign_click/models/clickwrap_versions_paged_response.rb +246 -0
- data/lib/docusign_click/models/clickwrap_versions_response.rb +216 -0
- data/lib/docusign_click/models/clickwraps_delete_response.rb +186 -0
- data/lib/docusign_click/models/conversion_document.rb +204 -0
- data/lib/docusign_click/models/display_settings.rb +356 -0
- data/lib/docusign_click/models/document.rb +224 -0
- data/lib/docusign_click/models/document_conversion_request.rb +186 -0
- data/lib/docusign_click/models/document_conversion_response.rb +186 -0
- data/lib/docusign_click/models/error_details.rb +194 -0
- data/lib/docusign_click/models/html_result.rb +194 -0
- data/lib/docusign_click/models/recipient_copy_request.rb +184 -0
- data/lib/docusign_click/models/service_information.rb +238 -0
- data/lib/docusign_click/models/service_version.rb +194 -0
- data/lib/docusign_click/models/update_agreement_request.rb +194 -0
- data/lib/docusign_click/models/user_agreement_request.rb +204 -0
- data/lib/docusign_click/models/user_agreement_response.rb +335 -0
- data/lib/docusign_click/version.rb +14 -0
- data/tests/Gemfile +5 -0
- data/tests/Gemfile.lock +42 -0
- data/tests/docs/Test.pdf +0 -0
- data/tests/docs/private.pem +27 -0
- data/tests/spec/unit_tests_using_jwt_spec.rb +126 -0
- metadata +297 -0
@@ -0,0 +1,246 @@
|
|
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
|
+
|
14
|
+
module DocuSign_Click
|
15
|
+
class ClickwrapVersionsPagedResponse
|
16
|
+
#
|
17
|
+
attr_accessor :account_id
|
18
|
+
|
19
|
+
#
|
20
|
+
attr_accessor :clickwrap_id
|
21
|
+
|
22
|
+
#
|
23
|
+
attr_accessor :clickwrap_name
|
24
|
+
|
25
|
+
#
|
26
|
+
attr_accessor :minimum_pages_remaining
|
27
|
+
|
28
|
+
#
|
29
|
+
attr_accessor :page
|
30
|
+
|
31
|
+
#
|
32
|
+
attr_accessor :page_size
|
33
|
+
|
34
|
+
#
|
35
|
+
attr_accessor :versions
|
36
|
+
|
37
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
38
|
+
def self.attribute_map
|
39
|
+
{
|
40
|
+
:'account_id' => :'accountId',
|
41
|
+
:'clickwrap_id' => :'clickwrapId',
|
42
|
+
:'clickwrap_name' => :'clickwrapName',
|
43
|
+
:'minimum_pages_remaining' => :'minimumPagesRemaining',
|
44
|
+
:'page' => :'page',
|
45
|
+
:'page_size' => :'pageSize',
|
46
|
+
:'versions' => :'versions'
|
47
|
+
}
|
48
|
+
end
|
49
|
+
|
50
|
+
# Attribute type mapping.
|
51
|
+
def self.swagger_types
|
52
|
+
{
|
53
|
+
:'account_id' => :'String',
|
54
|
+
:'clickwrap_id' => :'String',
|
55
|
+
:'clickwrap_name' => :'String',
|
56
|
+
:'minimum_pages_remaining' => :'Integer',
|
57
|
+
:'page' => :'Integer',
|
58
|
+
:'page_size' => :'Integer',
|
59
|
+
:'versions' => :'Array<ClickwrapVersion>'
|
60
|
+
}
|
61
|
+
end
|
62
|
+
|
63
|
+
# Initializes the object
|
64
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
65
|
+
def initialize(attributes = {})
|
66
|
+
return unless attributes.is_a?(Hash)
|
67
|
+
|
68
|
+
# convert string to symbol for hash key
|
69
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
70
|
+
|
71
|
+
if attributes.has_key?(:'accountId')
|
72
|
+
self.account_id = attributes[:'accountId']
|
73
|
+
end
|
74
|
+
|
75
|
+
if attributes.has_key?(:'clickwrapId')
|
76
|
+
self.clickwrap_id = attributes[:'clickwrapId']
|
77
|
+
end
|
78
|
+
|
79
|
+
if attributes.has_key?(:'clickwrapName')
|
80
|
+
self.clickwrap_name = attributes[:'clickwrapName']
|
81
|
+
end
|
82
|
+
|
83
|
+
if attributes.has_key?(:'minimumPagesRemaining')
|
84
|
+
self.minimum_pages_remaining = attributes[:'minimumPagesRemaining']
|
85
|
+
end
|
86
|
+
|
87
|
+
if attributes.has_key?(:'page')
|
88
|
+
self.page = attributes[:'page']
|
89
|
+
end
|
90
|
+
|
91
|
+
if attributes.has_key?(:'pageSize')
|
92
|
+
self.page_size = attributes[:'pageSize']
|
93
|
+
end
|
94
|
+
|
95
|
+
if attributes.has_key?(:'versions')
|
96
|
+
if (value = attributes[:'versions']).is_a?(Array)
|
97
|
+
self.versions = value
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
103
|
+
# @return Array for valid properties with the reasons
|
104
|
+
def list_invalid_properties
|
105
|
+
invalid_properties = Array.new
|
106
|
+
invalid_properties
|
107
|
+
end
|
108
|
+
|
109
|
+
# Check to see if the all the properties in the model are valid
|
110
|
+
# @return true if the model is valid
|
111
|
+
def valid?
|
112
|
+
true
|
113
|
+
end
|
114
|
+
|
115
|
+
# Checks equality by comparing each attribute.
|
116
|
+
# @param [Object] Object to be compared
|
117
|
+
def ==(o)
|
118
|
+
return true if self.equal?(o)
|
119
|
+
self.class == o.class &&
|
120
|
+
account_id == o.account_id &&
|
121
|
+
clickwrap_id == o.clickwrap_id &&
|
122
|
+
clickwrap_name == o.clickwrap_name &&
|
123
|
+
minimum_pages_remaining == o.minimum_pages_remaining &&
|
124
|
+
page == o.page &&
|
125
|
+
page_size == o.page_size &&
|
126
|
+
versions == o.versions
|
127
|
+
end
|
128
|
+
|
129
|
+
# @see the `==` method
|
130
|
+
# @param [Object] Object to be compared
|
131
|
+
def eql?(o)
|
132
|
+
self == o
|
133
|
+
end
|
134
|
+
|
135
|
+
# Calculates hash code according to all attributes.
|
136
|
+
# @return [Fixnum] Hash code
|
137
|
+
def hash
|
138
|
+
[account_id, clickwrap_id, clickwrap_name, minimum_pages_remaining, page, page_size, versions].hash
|
139
|
+
end
|
140
|
+
|
141
|
+
# Builds the object from hash
|
142
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
143
|
+
# @return [Object] Returns the model itself
|
144
|
+
def build_from_hash(attributes)
|
145
|
+
return nil unless attributes.is_a?(Hash)
|
146
|
+
self.class.swagger_types.each_pair do |key, type|
|
147
|
+
if type =~ /\AArray<(.*)>/i
|
148
|
+
# check to ensure the input is an array given that the attribute
|
149
|
+
# is documented as an array but the input is not
|
150
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
151
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
152
|
+
end
|
153
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
154
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
155
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
156
|
+
end
|
157
|
+
|
158
|
+
self
|
159
|
+
end
|
160
|
+
|
161
|
+
# Deserializes the data based on type
|
162
|
+
# @param string type Data type
|
163
|
+
# @param string value Value to be deserialized
|
164
|
+
# @return [Object] Deserialized data
|
165
|
+
def _deserialize(type, value)
|
166
|
+
case type.to_sym
|
167
|
+
when :DateTime
|
168
|
+
DateTime.parse(value)
|
169
|
+
when :Date
|
170
|
+
Date.parse(value)
|
171
|
+
when :String
|
172
|
+
value.to_s
|
173
|
+
when :Integer
|
174
|
+
value.to_i
|
175
|
+
when :Float
|
176
|
+
value.to_f
|
177
|
+
when :BOOLEAN
|
178
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
179
|
+
true
|
180
|
+
else
|
181
|
+
false
|
182
|
+
end
|
183
|
+
when :Object
|
184
|
+
# generic object (usually a Hash), return directly
|
185
|
+
value
|
186
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
187
|
+
inner_type = Regexp.last_match[:inner_type]
|
188
|
+
value.map { |v| _deserialize(inner_type, v) }
|
189
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
190
|
+
k_type = Regexp.last_match[:k_type]
|
191
|
+
v_type = Regexp.last_match[:v_type]
|
192
|
+
{}.tap do |hash|
|
193
|
+
value.each do |k, v|
|
194
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
195
|
+
end
|
196
|
+
end
|
197
|
+
else # model
|
198
|
+
temp_model = DocuSign_Click.const_get(type).new
|
199
|
+
temp_model.build_from_hash(value)
|
200
|
+
end
|
201
|
+
end
|
202
|
+
|
203
|
+
# Returns the string representation of the object
|
204
|
+
# @return [String] String presentation of the object
|
205
|
+
def to_s
|
206
|
+
to_hash.to_s
|
207
|
+
end
|
208
|
+
|
209
|
+
# to_body is an alias to to_hash (backward compatibility)
|
210
|
+
# @return [Hash] Returns the object in the form of hash
|
211
|
+
def to_body
|
212
|
+
to_hash
|
213
|
+
end
|
214
|
+
|
215
|
+
# Returns the object in the form of hash
|
216
|
+
# @return [Hash] Returns the object in the form of hash
|
217
|
+
def to_hash
|
218
|
+
hash = {}
|
219
|
+
self.class.attribute_map.each_pair do |attr, param|
|
220
|
+
value = self.send(attr)
|
221
|
+
next if value.nil?
|
222
|
+
hash[param] = _to_hash(value)
|
223
|
+
end
|
224
|
+
hash
|
225
|
+
end
|
226
|
+
|
227
|
+
# Outputs non-array value in the form of hash
|
228
|
+
# For object, use to_hash. Otherwise, just return the value
|
229
|
+
# @param [Object] value Any valid value
|
230
|
+
# @return [Hash] Returns the value in the form of hash
|
231
|
+
def _to_hash(value)
|
232
|
+
if value.is_a?(Array)
|
233
|
+
value.compact.map { |v| _to_hash(v) }
|
234
|
+
elsif value.is_a?(Hash)
|
235
|
+
{}.tap do |hash|
|
236
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
237
|
+
end
|
238
|
+
elsif value.respond_to? :to_hash
|
239
|
+
value.to_hash
|
240
|
+
else
|
241
|
+
value
|
242
|
+
end
|
243
|
+
end
|
244
|
+
|
245
|
+
end
|
246
|
+
end
|
@@ -0,0 +1,216 @@
|
|
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
|
+
|
14
|
+
module DocuSign_Click
|
15
|
+
class ClickwrapVersionsResponse
|
16
|
+
#
|
17
|
+
attr_accessor :clickwraps
|
18
|
+
|
19
|
+
#
|
20
|
+
attr_accessor :minimum_pages_remaining
|
21
|
+
|
22
|
+
#
|
23
|
+
attr_accessor :page
|
24
|
+
|
25
|
+
#
|
26
|
+
attr_accessor :page_size
|
27
|
+
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
29
|
+
def self.attribute_map
|
30
|
+
{
|
31
|
+
:'clickwraps' => :'clickwraps',
|
32
|
+
:'minimum_pages_remaining' => :'minimumPagesRemaining',
|
33
|
+
:'page' => :'page',
|
34
|
+
:'page_size' => :'pageSize'
|
35
|
+
}
|
36
|
+
end
|
37
|
+
|
38
|
+
# Attribute type mapping.
|
39
|
+
def self.swagger_types
|
40
|
+
{
|
41
|
+
:'clickwraps' => :'Array<ClickwrapVersionSummaryResponse>',
|
42
|
+
:'minimum_pages_remaining' => :'Integer',
|
43
|
+
:'page' => :'Integer',
|
44
|
+
:'page_size' => :'Integer'
|
45
|
+
}
|
46
|
+
end
|
47
|
+
|
48
|
+
# Initializes the object
|
49
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
50
|
+
def initialize(attributes = {})
|
51
|
+
return unless attributes.is_a?(Hash)
|
52
|
+
|
53
|
+
# convert string to symbol for hash key
|
54
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
55
|
+
|
56
|
+
if attributes.has_key?(:'clickwraps')
|
57
|
+
if (value = attributes[:'clickwraps']).is_a?(Array)
|
58
|
+
self.clickwraps = value
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
if attributes.has_key?(:'minimumPagesRemaining')
|
63
|
+
self.minimum_pages_remaining = attributes[:'minimumPagesRemaining']
|
64
|
+
end
|
65
|
+
|
66
|
+
if attributes.has_key?(:'page')
|
67
|
+
self.page = attributes[:'page']
|
68
|
+
end
|
69
|
+
|
70
|
+
if attributes.has_key?(:'pageSize')
|
71
|
+
self.page_size = attributes[:'pageSize']
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
76
|
+
# @return Array for valid properties with the reasons
|
77
|
+
def list_invalid_properties
|
78
|
+
invalid_properties = Array.new
|
79
|
+
invalid_properties
|
80
|
+
end
|
81
|
+
|
82
|
+
# Check to see if the all the properties in the model are valid
|
83
|
+
# @return true if the model is valid
|
84
|
+
def valid?
|
85
|
+
true
|
86
|
+
end
|
87
|
+
|
88
|
+
# Checks equality by comparing each attribute.
|
89
|
+
# @param [Object] Object to be compared
|
90
|
+
def ==(o)
|
91
|
+
return true if self.equal?(o)
|
92
|
+
self.class == o.class &&
|
93
|
+
clickwraps == o.clickwraps &&
|
94
|
+
minimum_pages_remaining == o.minimum_pages_remaining &&
|
95
|
+
page == o.page &&
|
96
|
+
page_size == o.page_size
|
97
|
+
end
|
98
|
+
|
99
|
+
# @see the `==` method
|
100
|
+
# @param [Object] Object to be compared
|
101
|
+
def eql?(o)
|
102
|
+
self == o
|
103
|
+
end
|
104
|
+
|
105
|
+
# Calculates hash code according to all attributes.
|
106
|
+
# @return [Fixnum] Hash code
|
107
|
+
def hash
|
108
|
+
[clickwraps, minimum_pages_remaining, page, page_size].hash
|
109
|
+
end
|
110
|
+
|
111
|
+
# Builds the object from hash
|
112
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
113
|
+
# @return [Object] Returns the model itself
|
114
|
+
def build_from_hash(attributes)
|
115
|
+
return nil unless attributes.is_a?(Hash)
|
116
|
+
self.class.swagger_types.each_pair do |key, type|
|
117
|
+
if type =~ /\AArray<(.*)>/i
|
118
|
+
# check to ensure the input is an array given that the attribute
|
119
|
+
# is documented as an array but the input is not
|
120
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
121
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
122
|
+
end
|
123
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
124
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
125
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
126
|
+
end
|
127
|
+
|
128
|
+
self
|
129
|
+
end
|
130
|
+
|
131
|
+
# Deserializes the data based on type
|
132
|
+
# @param string type Data type
|
133
|
+
# @param string value Value to be deserialized
|
134
|
+
# @return [Object] Deserialized data
|
135
|
+
def _deserialize(type, value)
|
136
|
+
case type.to_sym
|
137
|
+
when :DateTime
|
138
|
+
DateTime.parse(value)
|
139
|
+
when :Date
|
140
|
+
Date.parse(value)
|
141
|
+
when :String
|
142
|
+
value.to_s
|
143
|
+
when :Integer
|
144
|
+
value.to_i
|
145
|
+
when :Float
|
146
|
+
value.to_f
|
147
|
+
when :BOOLEAN
|
148
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
149
|
+
true
|
150
|
+
else
|
151
|
+
false
|
152
|
+
end
|
153
|
+
when :Object
|
154
|
+
# generic object (usually a Hash), return directly
|
155
|
+
value
|
156
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
157
|
+
inner_type = Regexp.last_match[:inner_type]
|
158
|
+
value.map { |v| _deserialize(inner_type, v) }
|
159
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
160
|
+
k_type = Regexp.last_match[:k_type]
|
161
|
+
v_type = Regexp.last_match[:v_type]
|
162
|
+
{}.tap do |hash|
|
163
|
+
value.each do |k, v|
|
164
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
165
|
+
end
|
166
|
+
end
|
167
|
+
else # model
|
168
|
+
temp_model = DocuSign_Click.const_get(type).new
|
169
|
+
temp_model.build_from_hash(value)
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
# Returns the string representation of the object
|
174
|
+
# @return [String] String presentation of the object
|
175
|
+
def to_s
|
176
|
+
to_hash.to_s
|
177
|
+
end
|
178
|
+
|
179
|
+
# to_body is an alias to to_hash (backward compatibility)
|
180
|
+
# @return [Hash] Returns the object in the form of hash
|
181
|
+
def to_body
|
182
|
+
to_hash
|
183
|
+
end
|
184
|
+
|
185
|
+
# Returns the object in the form of hash
|
186
|
+
# @return [Hash] Returns the object in the form of hash
|
187
|
+
def to_hash
|
188
|
+
hash = {}
|
189
|
+
self.class.attribute_map.each_pair do |attr, param|
|
190
|
+
value = self.send(attr)
|
191
|
+
next if value.nil?
|
192
|
+
hash[param] = _to_hash(value)
|
193
|
+
end
|
194
|
+
hash
|
195
|
+
end
|
196
|
+
|
197
|
+
# Outputs non-array value in the form of hash
|
198
|
+
# For object, use to_hash. Otherwise, just return the value
|
199
|
+
# @param [Object] value Any valid value
|
200
|
+
# @return [Hash] Returns the value in the form of hash
|
201
|
+
def _to_hash(value)
|
202
|
+
if value.is_a?(Array)
|
203
|
+
value.compact.map { |v| _to_hash(v) }
|
204
|
+
elsif value.is_a?(Hash)
|
205
|
+
{}.tap do |hash|
|
206
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
207
|
+
end
|
208
|
+
elsif value.respond_to? :to_hash
|
209
|
+
value.to_hash
|
210
|
+
else
|
211
|
+
value
|
212
|
+
end
|
213
|
+
end
|
214
|
+
|
215
|
+
end
|
216
|
+
end
|