groupdocs 1.6.0 → 1.7.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.
- data/CHANGELOG.md +34 -0
- data/LICENSE.txt +21 -0
- data/README.md +3 -0
- data/examples/api-samples/public/docs/sample01.html +23 -23
- data/examples/api-samples/public/docs/sample02.html +27 -27
- data/examples/api-samples/public/docs/sample03.html +81 -69
- data/examples/api-samples/public/docs/sample04.html +29 -29
- data/examples/api-samples/public/docs/sample05.html +48 -48
- data/examples/api-samples/public/docs/sample06.html +47 -46
- data/examples/api-samples/public/docs/sample07.html +35 -35
- data/examples/api-samples/public/docs/sample08.html +45 -45
- data/examples/api-samples/public/docs/sample09.html +57 -57
- data/examples/api-samples/public/docs/sample10.html +41 -41
- data/examples/api-samples/public/docs/sample11.html +96 -118
- data/examples/api-samples/public/docs/sample12.html +29 -50
- data/examples/api-samples/public/docs/sample13.html +36 -44
- data/examples/api-samples/public/docs/sample14.html +29 -29
- data/examples/api-samples/public/docs/sample15.html +24 -24
- data/examples/api-samples/public/docs/sample16.html +32 -32
- data/examples/api-samples/public/docs/sample17.html +38 -38
- data/examples/api-samples/public/docs/sample18.html +105 -101
- data/examples/api-samples/public/docs/sample19.html +101 -101
- data/examples/api-samples/public/docs/sample20.html +42 -42
- data/examples/api-samples/public/docs/sample21.html +109 -109
- data/examples/api-samples/public/docs/sample22.html +56 -56
- data/examples/api-samples/public/docs/sample23.html +39 -39
- data/examples/api-samples/public/docs/sample24.html +36 -36
- data/examples/api-samples/public/docs/sample25.html +67 -67
- data/examples/api-samples/public/docs/sample26.html +23 -23
- data/examples/api-samples/public/docs/sample27.html +72 -72
- data/examples/api-samples/public/docs/sample28.html +46 -45
- data/examples/api-samples/public/docs/sample29.html +30 -30
- data/examples/api-samples/public/docs/sample30.html +30 -30
- data/examples/api-samples/public/docs/sample31.html +114 -114
- data/examples/api-samples/public/docs/sample32.html +96 -96
- data/examples/api-samples/public/docs/sample33.html +56 -56
- data/examples/api-samples/public/docs/sample34.html +27 -27
- data/examples/api-samples/public/docs/sample35.html +134 -135
- data/examples/api-samples/public/docs/sample36.html +32 -32
- data/examples/api-samples/public/docs/sample37.html +103 -103
- data/examples/api-samples/public/docs/sample38.html +76 -76
- data/examples/api-samples/public/docs/sample39.html +136 -136
- data/examples/api-samples/public/docs/sample40.html +104 -104
- data/examples/api-samples/public/docs/sample41.html +137 -137
- data/examples/api-samples/public/docs/sample42.html +61 -61
- data/examples/api-samples/public/docs/sample43.html +72 -72
- data/examples/api-samples/public/docs/sample44.html +751 -0
- data/examples/api-samples/public/docs/sample45.html +236 -0
- data/examples/api-samples/public/templates/merge_field3_doc.docx +0 -0
- data/examples/api-samples/samples/sample01.rb +2 -2
- data/examples/api-samples/samples/sample02.rb +2 -2
- data/examples/api-samples/samples/sample03.rb +2 -2
- data/examples/api-samples/samples/sample04.rb +2 -2
- data/examples/api-samples/samples/sample05.rb +2 -2
- data/examples/api-samples/samples/sample06.rb +2 -2
- data/examples/api-samples/samples/sample07.rb +2 -2
- data/examples/api-samples/samples/sample08.rb +2 -2
- data/examples/api-samples/samples/sample09.rb +2 -2
- data/examples/api-samples/samples/sample10.rb +2 -2
- data/examples/api-samples/samples/sample11.rb +2 -2
- data/examples/api-samples/samples/sample12.rb +2 -2
- data/examples/api-samples/samples/sample13.rb +2 -2
- data/examples/api-samples/samples/sample14.rb +2 -2
- data/examples/api-samples/samples/sample15.rb +2 -2
- data/examples/api-samples/samples/sample16.rb +2 -2
- data/examples/api-samples/samples/sample17.rb +2 -2
- data/examples/api-samples/samples/sample18.rb +2 -2
- data/examples/api-samples/samples/sample19.rb +2 -2
- data/examples/api-samples/samples/sample20.rb +2 -2
- data/examples/api-samples/samples/sample21.rb +2 -2
- data/examples/api-samples/samples/sample22.rb +2 -2
- data/examples/api-samples/samples/sample23.rb +2 -2
- data/examples/api-samples/samples/sample24.rb +2 -2
- data/examples/api-samples/samples/sample25.rb +2 -2
- data/examples/api-samples/samples/sample26.rb +2 -2
- data/examples/api-samples/samples/sample27.rb +2 -2
- data/examples/api-samples/samples/sample28.rb +2 -2
- data/examples/api-samples/samples/sample29.rb +2 -2
- data/examples/api-samples/samples/sample30.rb +2 -2
- data/examples/api-samples/samples/sample31.rb +2 -2
- data/examples/api-samples/samples/sample32.rb +2 -2
- data/examples/api-samples/samples/sample33.rb +2 -2
- data/examples/api-samples/samples/sample34.rb +2 -2
- data/examples/api-samples/samples/sample35.rb +4 -4
- data/examples/api-samples/samples/sample36.rb +2 -2
- data/examples/api-samples/samples/sample37.rb +2 -2
- data/examples/api-samples/samples/sample38.rb +2 -2
- data/examples/api-samples/samples/sample39.rb +2 -2
- data/examples/api-samples/samples/sample40.rb +2 -2
- data/examples/api-samples/samples/sample41.rb +2 -2
- data/examples/api-samples/samples/sample42.rb +2 -2
- data/examples/api-samples/samples/sample43.rb +2 -2
- data/examples/api-samples/samples/sample44.rb +188 -0
- data/examples/api-samples/samples/sample45.rb +74 -0
- data/examples/api-samples/views/_others_samples.haml +47 -43
- data/examples/api-samples/views/index.haml +55 -44
- data/examples/api-samples/views/layout.haml +1 -6
- data/examples/api-samples/views/sample01.haml +62 -57
- data/examples/api-samples/views/sample02.haml +52 -46
- data/examples/api-samples/views/sample03.haml +78 -73
- data/examples/api-samples/views/sample04.haml +51 -45
- data/examples/api-samples/views/sample05.haml +77 -71
- data/examples/api-samples/views/sample06.haml +58 -52
- data/examples/api-samples/views/sample07.haml +51 -45
- data/examples/api-samples/views/sample08.haml +90 -84
- data/examples/api-samples/views/sample09.haml +86 -80
- data/examples/api-samples/views/sample10.haml +83 -77
- data/examples/api-samples/views/sample11.haml +124 -120
- data/examples/api-samples/views/sample12.haml +65 -59
- data/examples/api-samples/views/sample13.haml +62 -56
- data/examples/api-samples/views/sample14.haml +57 -51
- data/examples/api-samples/views/sample15.haml +49 -43
- data/examples/api-samples/views/sample16.haml +49 -43
- data/examples/api-samples/views/sample17.haml +53 -47
- data/examples/api-samples/views/sample18.haml +140 -134
- data/examples/api-samples/views/sample19.haml +87 -81
- data/examples/api-samples/views/sample20.haml +53 -47
- data/examples/api-samples/views/sample21.haml +115 -111
- data/examples/api-samples/views/sample22.haml +94 -88
- data/examples/api-samples/views/sample23.haml +83 -78
- data/examples/api-samples/views/sample24.haml +54 -48
- data/examples/api-samples/views/sample25.haml +89 -83
- data/examples/api-samples/views/sample26.haml +62 -57
- data/examples/api-samples/views/sample27.haml +114 -109
- data/examples/api-samples/views/sample28.haml +55 -49
- data/examples/api-samples/views/sample29.haml +67 -69
- data/examples/api-samples/views/sample30.haml +54 -48
- data/examples/api-samples/views/sample31.haml +106 -100
- data/examples/api-samples/views/sample32.haml +90 -84
- data/examples/api-samples/views/sample33.haml +60 -54
- data/examples/api-samples/views/sample34.haml +51 -46
- data/examples/api-samples/views/sample35.haml +84 -78
- data/examples/api-samples/views/sample36.haml +63 -58
- data/examples/api-samples/views/sample37.haml +122 -116
- data/examples/api-samples/views/sample38.haml +104 -98
- data/examples/api-samples/views/sample39.haml +6 -2
- data/examples/api-samples/views/sample40.haml +94 -89
- data/examples/api-samples/views/sample41.haml +127 -123
- data/examples/api-samples/views/sample42.haml +60 -54
- data/examples/api-samples/views/sample43.haml +81 -77
- data/examples/api-samples/views/sample44.haml +85 -0
- data/examples/api-samples/views/sample45.haml +85 -0
- data/groupdocs.gemspec +2 -0
- data/lib/groupdocs/datasource/field.rb +9 -0
- data/lib/groupdocs/document.rb +66 -4
- data/lib/groupdocs/document/annotation.rb +11 -6
- data/lib/groupdocs/document/editor.rb +53 -0
- data/lib/groupdocs/document/field.rb +16 -0
- data/lib/groupdocs/document/style.rb +30 -0
- data/lib/groupdocs/job.rb +24 -0
- data/lib/groupdocs/questionnaire.rb +2 -0
- data/lib/groupdocs/questionnaire/collector.rb +52 -0
- data/lib/groupdocs/questionnaire/collector_style.rb +54 -0
- data/lib/groupdocs/questionnaire/question.rb +9 -0
- data/lib/groupdocs/questionnaire/style/base_font.rb +17 -0
- data/lib/groupdocs/questionnaire/style/question_title.rb +17 -0
- data/lib/groupdocs/questionnaire/style/title.rb +17 -0
- data/lib/groupdocs/signature/envelope.rb +43 -8
- data/lib/groupdocs/signature/form.rb +113 -12
- data/lib/groupdocs/signature/recipient.rb +38 -3
- data/lib/groupdocs/signature/shared/field_methods.rb +4 -2
- data/lib/groupdocs/signature/template.rb +20 -1
- data/lib/groupdocs/storage/file.rb +3 -2
- data/lib/groupdocs/user.rb +148 -0
- data/lib/groupdocs/version.rb +1 -1
- data/spec/groupdocs/api/helpers/access_rights_helper_spec.rb +5 -5
- data/spec/groupdocs/document/annotation_spec.rb +1 -1
- data/spec/groupdocs/signature/envelope_spec.rb +1 -1
- data/spec/groupdocs/user_spec.rb +4 -4
- data/spec/support/shared_examples/signature/shared/field_methods.rb +5 -4
- metadata +18 -3
@@ -33,6 +33,15 @@ module GroupDocs
|
|
33
33
|
# @attr [Array<GroupDocs::Questionnaire::Question::Conditions>] conditions
|
34
34
|
attr_accessor :conditions
|
35
35
|
|
36
|
+
# added in release 1.7.0
|
37
|
+
#
|
38
|
+
# @attr [String] regionName
|
39
|
+
attr_accessor :regionName
|
40
|
+
## @attr [String] hint
|
41
|
+
attr_accessor :hint
|
42
|
+
# @attr [Array<String>] dimension
|
43
|
+
attr_accessor :dimension
|
44
|
+
|
36
45
|
|
37
46
|
# Human-readable accessors
|
38
47
|
alias_accessor :default_answer, :def_answer
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# added in release 1.7.0
|
2
|
+
module GroupDocs
|
3
|
+
class Questionnaire::QuestionnaireCollectorStyle::BaseFont < Api::Entity
|
4
|
+
|
5
|
+
# @attr [String] fontFamily
|
6
|
+
attr_accessor :fontFamily
|
7
|
+
# @attr [Int] fontSize
|
8
|
+
attr_accessor :fontSize
|
9
|
+
# @attr [String] color
|
10
|
+
attr_accessor :color
|
11
|
+
# @attr [Boolean] isBold
|
12
|
+
attr_accessor :isBold
|
13
|
+
# @attr [Boolean] isBold
|
14
|
+
attr_accessor :isItalic
|
15
|
+
|
16
|
+
end # Questionnaire::QuestionnaireCollectorStyle::BaseFont
|
17
|
+
end # GroupDocs
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# added in release 1.7.0
|
2
|
+
module GroupDocs
|
3
|
+
class Questionnaire::QuestionnaireCollectorStyle::QuestionTitle < Api::Entity
|
4
|
+
|
5
|
+
# @attr [String] fontFamily
|
6
|
+
attr_accessor :fontFamily
|
7
|
+
# @attr [Int] fontSize
|
8
|
+
attr_accessor :fontSize
|
9
|
+
# @attr [String] color
|
10
|
+
attr_accessor :color
|
11
|
+
# @attr [Boolean] isBold
|
12
|
+
attr_accessor :isBold
|
13
|
+
# @attr [Boolean] isBold
|
14
|
+
attr_accessor :isItalic
|
15
|
+
|
16
|
+
end # Questionnaire::QuestionnaireCollectorStyle::QuestionTitle
|
17
|
+
end # GroupDocs
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# added in release 1.7.0
|
2
|
+
module GroupDocs
|
3
|
+
class Questionnaire::QuestionnaireCollectorStyle::Title < Api::Entity
|
4
|
+
|
5
|
+
# @attr [String] fontFamily
|
6
|
+
attr_accessor :fontFamily
|
7
|
+
# @attr [Int] fontSize
|
8
|
+
attr_accessor :fontSize
|
9
|
+
# @attr [String] color
|
10
|
+
attr_accessor :color
|
11
|
+
# @attr [Boolean] isBold
|
12
|
+
attr_accessor :isBold
|
13
|
+
# @attr [Boolean] isBold
|
14
|
+
attr_accessor :isItalic
|
15
|
+
|
16
|
+
end # Questionnaire::QuestionnaireCollectorStyle::Title
|
17
|
+
end # GroupDocs
|
@@ -23,17 +23,21 @@ module GroupDocs
|
|
23
23
|
include Signature::RecipientMethods
|
24
24
|
extend Signature::ResourceMethods
|
25
25
|
|
26
|
+
#
|
27
|
+
# Changed in release 1.7.0
|
28
|
+
#
|
26
29
|
#
|
27
30
|
# Returns a list of all envelopes.
|
28
31
|
#
|
29
32
|
# @param [Hash] options Hash of options
|
30
33
|
# @option options [Integer] :page Page to start with
|
31
34
|
# @option options [Integer] :records How many items to list
|
32
|
-
# @option options [Integer] :status_id Filter by status identifier
|
33
|
-
# @option options [String] :document Filter by document GUID
|
34
|
-
# @option options [String] :recipient Filter by recipient email
|
35
|
-
# @option options [String] :date Filter by date
|
36
|
-
# @option options [String] :name Filter by name
|
35
|
+
# @option options [Integer] :status_id Filter envelopes by status identifier
|
36
|
+
# @option options [String] :document Filter envelopes by document GUID
|
37
|
+
# @option options [String] :recipient Filter envelopes by recipient email
|
38
|
+
# @option options [String] :date Filter envelopes by date
|
39
|
+
# @option options [String] :name Filter envelopes by name
|
40
|
+
# @option options [String] :tag Filter envelopes by tag
|
37
41
|
# @param [Hash] access Access credentials
|
38
42
|
# @option access [String] :client_id
|
39
43
|
# @option access [String] :private_key
|
@@ -92,8 +96,33 @@ module GroupDocs
|
|
92
96
|
attr_accessor :envelopeExpireTime
|
93
97
|
# @attr [Boolean] isDemo
|
94
98
|
attr_accessor :isDemo
|
95
|
-
|
96
|
-
|
99
|
+
|
100
|
+
# added in release 1.7.0
|
101
|
+
# @attr [String] updatedDateTime
|
102
|
+
attr_accessor :updatedDateTime
|
103
|
+
# @attr [Boolean] attachSignedDocument
|
104
|
+
attr_accessor :attachSignedDocument
|
105
|
+
# @attr [Boolean] includeViewLink
|
106
|
+
attr_accessor :includeViewLink
|
107
|
+
# @attr [Boolean] canBeCommented
|
108
|
+
attr_accessor :canBeCommented
|
109
|
+
# @attr [Boolean] inPersonSign
|
110
|
+
attr_accessor :inPersonSign
|
111
|
+
# @attr [String] ownerName
|
112
|
+
attr_accessor :ownerName
|
113
|
+
# @attr [Boolean] enableTypedSignature
|
114
|
+
attr_accessor :enableTypedSignature
|
115
|
+
# @attr [Boolean] enableUploadedSignature
|
116
|
+
attr_accessor :enableUploadedSignature
|
117
|
+
# @attr [Boolean] requireUserAuthForSign
|
118
|
+
attr_accessor :requireUserAuthForSign
|
119
|
+
# @attr [Boolean] requestUserAuthByPhoto
|
120
|
+
attr_accessor :requestUserAuthByPhoto
|
121
|
+
# @attr [Boolean] showRecipientCommentInSignedDocument
|
122
|
+
attr_accessor :showRecipientCommentInSignedDocument
|
123
|
+
# @attr [String] tags
|
124
|
+
attr_accessor :tags
|
125
|
+
|
97
126
|
|
98
127
|
# Human-readable accessors
|
99
128
|
alias_accessor :creation_date_time, :creationDateTime
|
@@ -290,10 +319,15 @@ module GroupDocs
|
|
290
319
|
Signature::Field.new(json[:field])
|
291
320
|
end
|
292
321
|
|
322
|
+
#
|
323
|
+
# Changed in release 1.7.0
|
293
324
|
#
|
294
325
|
# Signs envelope.
|
295
326
|
#
|
296
327
|
# @param [GroupDocs::Signature::Recipient] recipient
|
328
|
+
# @param [Hash] settings
|
329
|
+
# @option settings [String] :authData (required)
|
330
|
+
# @option settings [String] :comment (required)
|
297
331
|
# @param [Hash] options
|
298
332
|
# @option options [Boolean] :public Defaults to false
|
299
333
|
# @param [Hash] access Access credentials
|
@@ -301,7 +335,7 @@ module GroupDocs
|
|
301
335
|
# @option access [String] :private_key
|
302
336
|
# @raise [ArgumentError] if recipient is not GroupDocs::Signature::Recipient
|
303
337
|
#
|
304
|
-
def sign!(recipient, options = {}, access = {})
|
338
|
+
def sign!(recipient, settings = {}, options = {}, access = {})
|
305
339
|
recipient.is_a?(GroupDocs::Signature::Recipient) or raise ArgumentError,
|
306
340
|
"Recipient should be GroupDocs::Signature::Recipient object, received: #{recipient.inspect}"
|
307
341
|
|
@@ -310,6 +344,7 @@ module GroupDocs
|
|
310
344
|
request[:access] = access
|
311
345
|
request[:method] = :PUT
|
312
346
|
request[:path] = "/signature/#{client_id}/envelopes/#{id}/recipient/#{recipient.id}/sign"
|
347
|
+
request[:request_body] = settings
|
313
348
|
end.execute!
|
314
349
|
end
|
315
350
|
|
@@ -23,10 +23,11 @@ module GroupDocs
|
|
23
23
|
# @param [Hash] options Hash of options
|
24
24
|
# @option options [Integer] :page Page to start with
|
25
25
|
# @option options [Integer] :records How many items to list
|
26
|
-
# @option options [Integer] :status_id Filter by status identifier
|
27
|
-
# @option options [String] :document Filter by document GUID
|
28
|
-
# @option options [String] :date Filter by date
|
29
|
-
# @option options [String] :name Filter by name
|
26
|
+
# @option options [Integer] :status_id Filter forms by status identifier
|
27
|
+
# @option options [String] :document Filter forms by document GUID
|
28
|
+
# @option options [String] :date Filter forms by date
|
29
|
+
# @option options [String] :name Filter forms by name
|
30
|
+
# @option options [String] :tag Filter forms by tag
|
30
31
|
# @param [Hash] access Access credentials
|
31
32
|
# @option access [String] :client_id
|
32
33
|
# @option access [String] :private_key
|
@@ -265,7 +266,7 @@ module GroupDocs
|
|
265
266
|
end
|
266
267
|
|
267
268
|
#
|
268
|
-
# Changed in release 1.
|
269
|
+
# Changed in release 1.7.0
|
269
270
|
#
|
270
271
|
# Returns an array of fields for document per participant.
|
271
272
|
#
|
@@ -277,14 +278,12 @@ module GroupDocs
|
|
277
278
|
# @option access [String] :private_key
|
278
279
|
# @raise [ArgumentError] if document is not GroupDocs::Document
|
279
280
|
#
|
280
|
-
def fields!(
|
281
|
-
document.is_a?(GroupDocs::Document) or raise ArgumentError,
|
282
|
-
"Document should be GroupDocs::Document object, received: #{document.inspect}"
|
281
|
+
def fields!(options = {}, access = {})
|
283
282
|
|
284
283
|
api = Api::Request.new do |request|
|
285
284
|
request[:access] = access
|
286
285
|
request[:method] = :GET
|
287
|
-
request[:path] = "/signature/{{client_id}}/forms/#{id}/
|
286
|
+
request[:path] = "/signature/{{client_id}}/forms/#{id}/fields"
|
288
287
|
end
|
289
288
|
api.add_params(options)
|
290
289
|
json = api.execute!
|
@@ -294,6 +293,7 @@ module GroupDocs
|
|
294
293
|
end
|
295
294
|
end
|
296
295
|
|
296
|
+
|
297
297
|
#
|
298
298
|
# Adds field for document.
|
299
299
|
#
|
@@ -536,11 +536,14 @@ module GroupDocs
|
|
536
536
|
end
|
537
537
|
|
538
538
|
#
|
539
|
-
# Changed in release 1.
|
539
|
+
# Changed in release 1.7.0
|
540
540
|
#
|
541
541
|
# Public sign form.
|
542
542
|
#
|
543
|
-
# @param [
|
543
|
+
# @param [Hash] settings
|
544
|
+
# @option settings [String] :authData (required)
|
545
|
+
# @option settings [String] :comment (required)
|
546
|
+
# @param [String] filepath Path to file to be uploaded
|
544
547
|
# @param [String] participant Participant GUID
|
545
548
|
# @param [String] authentication Authentication signature
|
546
549
|
# @param [String] participant_name Participant Name
|
@@ -549,11 +552,14 @@ module GroupDocs
|
|
549
552
|
# @option access [String] :private_key
|
550
553
|
# @return [Array]
|
551
554
|
#
|
552
|
-
def sign!( participant, authentication, participant_name, access = {})
|
555
|
+
def sign!( filepath, participant, authentication, participant_name, settings = {}, access = {})
|
553
556
|
api = Api::Request.new do |request|
|
554
557
|
request[:access] = access
|
555
558
|
request[:method] = :PUT
|
556
559
|
request[:path] = "/signature/public/forms/#{id}/participant/#{participant}/sign"
|
560
|
+
request[:request_body] = Object::File.new(filepath, 'rb')
|
561
|
+
request[:request_body] = settings
|
562
|
+
|
557
563
|
end
|
558
564
|
api.add_params(:participantAuthSignature => authentication, :name => participant_name)
|
559
565
|
api.execute!
|
@@ -643,5 +649,100 @@ module GroupDocs
|
|
643
649
|
filepath
|
644
650
|
end
|
645
651
|
|
652
|
+
#
|
653
|
+
# Added in release 1.7.0
|
654
|
+
#
|
655
|
+
# Update Form Participant.
|
656
|
+
#
|
657
|
+
# @param [String] form Form GUID
|
658
|
+
# @param [String] participant Participant GUID
|
659
|
+
# @param [String] authentication Authentication signature
|
660
|
+
# @param [String] participant_name Participant Name
|
661
|
+
# @param [Hash] access Access credentials
|
662
|
+
# @option access [String] :client_id
|
663
|
+
# @option access [String] :private_key
|
664
|
+
# @return [Array]
|
665
|
+
#
|
666
|
+
def update_partipicant!(participant, email, access = {})
|
667
|
+
api = Api::Request.new do |request|
|
668
|
+
request[:access] = access
|
669
|
+
request[:method] = :PUT
|
670
|
+
request[:path] = "/signature/public/forms/#{id}/participant/#{participant}"
|
671
|
+
end
|
672
|
+
api.add_params(:email => email)
|
673
|
+
api.execute!
|
674
|
+
end
|
675
|
+
|
676
|
+
#
|
677
|
+
# Added in release 1.7.0
|
678
|
+
#
|
679
|
+
# Validate Particpiant Identity.
|
680
|
+
#
|
681
|
+
# @param [String] participant Participant GUID
|
682
|
+
# @param [String] code Code to be validated
|
683
|
+
# @param [Hash] access Access credentials
|
684
|
+
# @option access [String] :client_id
|
685
|
+
# @option access [String] :private_key
|
686
|
+
# @return [Array]
|
687
|
+
#
|
688
|
+
def validate_partipicant!(participant, code, access = {})
|
689
|
+
Api::Request.new do |request|
|
690
|
+
request[:access] = access
|
691
|
+
request[:method] = :GET
|
692
|
+
request[:path] = "/signature/public/forms/#{id}/participant/#{participant}/validationCode/#{code}"
|
693
|
+
end.execute!
|
694
|
+
end
|
695
|
+
|
696
|
+
#
|
697
|
+
# Added in release 1.7.0
|
698
|
+
#
|
699
|
+
# Get form fields for document in form per participant.
|
700
|
+
#
|
701
|
+
# @param [GroupDocs::Document] document
|
702
|
+
# @param [Hash] options
|
703
|
+
# @option options [String] :field Field GUID
|
704
|
+
# @param [Hash] access Access credentials
|
705
|
+
# @option access [String] :client_id
|
706
|
+
# @option access [String] :private_key
|
707
|
+
# @raise [ArgumentError] if document is not GroupDocs::Document
|
708
|
+
#
|
709
|
+
def document_fields!(document, options = {}, access = {})
|
710
|
+
document.is_a?(GroupDocs::Document) or raise ArgumentError,
|
711
|
+
"Document should be GroupDocs::Document object, received: #{document.inspect}"
|
712
|
+
|
713
|
+
api = Api::Request.new do |request|
|
714
|
+
request[:access] = access
|
715
|
+
request[:method] = :GET
|
716
|
+
request[:path] = "/signature/{{client_id}}/forms/#{id}/documents/#{document.file.guid}/fields"
|
717
|
+
end
|
718
|
+
api.add_params(options)
|
719
|
+
json = api.execute!
|
720
|
+
|
721
|
+
json[:fields].map do |field|
|
722
|
+
Signature::Field.new(field)
|
723
|
+
end
|
724
|
+
end
|
725
|
+
|
726
|
+
#
|
727
|
+
# Changed in release 1.7.0
|
728
|
+
#
|
729
|
+
# Get form audit logs
|
730
|
+
#
|
731
|
+
# @param [Hash] options
|
732
|
+
# @option options [String] :field Field GUID
|
733
|
+
# @param [Hash] access Access credentials
|
734
|
+
# @option access [String] :client_id
|
735
|
+
# @option access [String] :private_key
|
736
|
+
# @raise [ArgumentError] if document is not GroupDocs::Document
|
737
|
+
#
|
738
|
+
def get_logs!(access = {})
|
739
|
+
|
740
|
+
Api::Request.new do |request|
|
741
|
+
request[:access] = access
|
742
|
+
request[:method] = :GET
|
743
|
+
request[:path] = "/signature/{{client_id}}/forms/#{id}/logs"
|
744
|
+
end.execute!
|
745
|
+
end
|
746
|
+
|
646
747
|
end # Signature::Form
|
647
748
|
end # GroupDocs
|
@@ -27,10 +27,45 @@ module GroupDocs
|
|
27
27
|
# @attr [Symbol] status
|
28
28
|
attr_accessor :status
|
29
29
|
|
30
|
+
# added in release 1.7.0
|
31
|
+
|
32
|
+
# @attr [String] userGuid
|
33
|
+
attr_accessor :userGuid
|
34
|
+
# @attr [String] statusMessage
|
35
|
+
attr_accessor :statusMessage
|
36
|
+
# @attr [String] statusDateTime
|
37
|
+
attr_accessor :statusDateTime
|
38
|
+
# @attr [Double] delegatedRecipientId
|
39
|
+
attr_accessor :delegatedRecipientId
|
40
|
+
# @attr [String] signatureFingerprint
|
41
|
+
attr_accessor :signatureFingerprint
|
42
|
+
# @attr [String] signatureHost
|
43
|
+
attr_accessor :signatureHost
|
44
|
+
# @attr [String] signatureLocation
|
45
|
+
attr_accessor :signatureLocation
|
46
|
+
# @attr [String] signatureBrowser
|
47
|
+
attr_accessor :signatureBrowser
|
48
|
+
# @attr [String] embedUrl
|
49
|
+
attr_accessor :embedUrl
|
50
|
+
# @attr [String] comment
|
51
|
+
attr_accessor :comment
|
52
|
+
|
30
53
|
# Human-readable accessors
|
31
|
-
alias_accessor :first_name,
|
32
|
-
alias_accessor :last_name,
|
33
|
-
alias_accessor :role_id,
|
54
|
+
alias_accessor :first_name, :firstName
|
55
|
+
alias_accessor :last_name, :lastName
|
56
|
+
alias_accessor :role_id, :roleId
|
57
|
+
|
58
|
+
# added in release 1.7.0
|
59
|
+
alias_accessor :user_guid, :userGuid
|
60
|
+
alias_accessor :status_message, :statusMessage
|
61
|
+
alias_accessor :status_date_time, :statusDateTime
|
62
|
+
alias_accessor :delegated_recipient_id, :delegatedRecipientId
|
63
|
+
alias_accessor :signature_fingerprint, :signatureFingerprint
|
64
|
+
alias_accessor :signature_host, :signatureHost
|
65
|
+
alias_accessor :signature_location, :signatureLocation
|
66
|
+
alias_accessor :signature_browser, :signatureBrowser
|
67
|
+
alias_accessor :embed_url, :embedUrl
|
68
|
+
|
34
69
|
|
35
70
|
#
|
36
71
|
# Converts status to human-readable format.
|
@@ -142,11 +142,13 @@ module GroupDocs
|
|
142
142
|
# @raise [ArgumentError] if field is not GroupDocs::Signature::Field
|
143
143
|
# @raise [ArgumentError] if document is not GroupDocs::Document
|
144
144
|
#
|
145
|
-
def modify_field!(field, document, access = {})
|
145
|
+
def modify_field!(field, document, recipient, access = {})
|
146
146
|
field.is_a?(GroupDocs::Signature::Field) or raise ArgumentError,
|
147
147
|
"Field should be GroupDocs::Signature::Field object, received: #{field.inspect}"
|
148
148
|
document.is_a?(GroupDocs::Document) or raise ArgumentError,
|
149
149
|
"Document should be GroupDocs::Document object, received: #{document.inspect}"
|
150
|
+
recipient.is_a?(GroupDocs::Signature::Recipient) or raise ArgumentError,
|
151
|
+
"Recipient should be GroupDocs::Signature::Recipient object, received: #{recipient.inspect}"
|
150
152
|
|
151
153
|
# prepare payload
|
152
154
|
payload = field.to_hash # field itself
|
@@ -156,7 +158,7 @@ module GroupDocs
|
|
156
158
|
Api::Request.new do |request|
|
157
159
|
request[:access] = access
|
158
160
|
request[:method] = :PUT
|
159
|
-
request[:path] = "/signature/{{client_id}}/#{class_name.pluralize}/#{id}/documents/#{document.file.guid}/field/#{field.id}"
|
161
|
+
request[:path] = "/signature/{{client_id}}/#{class_name.pluralize}/#{id}/documents/#{document.file.guid}/recipientGuid/#{recipient.id}field/#{field.id}"
|
160
162
|
request[:request_body] = payload
|
161
163
|
end.execute!
|
162
164
|
end
|
@@ -9,11 +9,18 @@ module GroupDocs
|
|
9
9
|
extend Signature::ResourceMethods
|
10
10
|
|
11
11
|
#
|
12
|
-
#
|
12
|
+
# Changed in release 1.7.0
|
13
|
+
#
|
14
|
+
#
|
15
|
+
# Returns a list of all templates.
|
13
16
|
#
|
14
17
|
# @param [Hash] options Hash of options
|
15
18
|
# @option options [Integer] :page Page to start with
|
16
19
|
# @option options [Integer] :records How many items to list
|
20
|
+
# @option options [String] :documentGuid Fitler templates by document originalMD5
|
21
|
+
# @option options [String] :recipientName Filter templates by recipient nickname
|
22
|
+
# @option options [String] :name Filter templates by signatureTemplate name
|
23
|
+
# @option options [String] :tag Filter templates by tag
|
17
24
|
# @param [Hash] access Access credentials
|
18
25
|
# @option access [String] :client_id
|
19
26
|
# @option access [String] :private_key
|
@@ -36,6 +43,16 @@ module GroupDocs
|
|
36
43
|
# @attr [Integer] templateExpireTime
|
37
44
|
attr_accessor :templateExpireTime
|
38
45
|
|
46
|
+
#added in release 1.7.0
|
47
|
+
# @attr [Double] fieldsCount
|
48
|
+
attr_accessor :fieldsCount
|
49
|
+
# @attr [Boolean] enableTypedSignature
|
50
|
+
attr_accessor :enableTypedSignature
|
51
|
+
# @attr [Boolean] enableUploadedSignature
|
52
|
+
attr_accessor :enableUploadedSignature
|
53
|
+
# @attr [String] tags
|
54
|
+
attr_accessor :tags
|
55
|
+
|
39
56
|
# Human-readable accessors
|
40
57
|
alias_accessor :template_expire_time, :templateExpireTime
|
41
58
|
|
@@ -101,5 +118,7 @@ module GroupDocs
|
|
101
118
|
api.execute!
|
102
119
|
end
|
103
120
|
|
121
|
+
|
122
|
+
|
104
123
|
end # Signature::Template
|
105
124
|
end # GroupDocs
|