groupdocs 1.5.7 → 1.5.8

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.
Files changed (177) hide show
  1. data/CHANGELOG.md +51 -0
  2. data/examples/api-samples/Gemfile +1 -1
  3. data/examples/api-samples/Gemfile.lock +43 -0
  4. data/examples/api-samples/public/docs/{sample2.html → sample01.html} +39 -19
  5. data/examples/api-samples/public/docs/{sample3.html → sample02.html} +28 -22
  6. data/examples/api-samples/public/docs/sample03.html +285 -0
  7. data/examples/api-samples/public/docs/{sample4.html → sample04.html} +30 -36
  8. data/examples/api-samples/public/docs/{sample5.html → sample05.html} +68 -31
  9. data/examples/api-samples/public/docs/sample06.html +299 -0
  10. data/examples/api-samples/public/docs/{sample7.html → sample07.html} +53 -18
  11. data/examples/api-samples/public/docs/{sample8.html → sample08.html} +64 -41
  12. data/examples/api-samples/public/docs/sample09.html +260 -0
  13. data/examples/api-samples/public/docs/sample10.html +67 -28
  14. data/examples/api-samples/public/docs/sample11.html +171 -55
  15. data/examples/api-samples/public/docs/sample12.html +53 -17
  16. data/examples/api-samples/public/docs/sample13.html +52 -16
  17. data/examples/api-samples/public/docs/sample14.html +51 -8
  18. data/examples/api-samples/public/docs/sample15.html +46 -10
  19. data/examples/api-samples/public/docs/sample16.html +81 -7
  20. data/examples/api-samples/public/docs/sample17.html +103 -15
  21. data/examples/api-samples/public/docs/sample18.html +117 -41
  22. data/examples/api-samples/public/docs/sample19.html +410 -36
  23. data/examples/api-samples/public/docs/sample20.html +46 -10
  24. data/examples/api-samples/public/docs/sample21.html +504 -45
  25. data/examples/api-samples/public/docs/sample22.html +166 -28
  26. data/examples/api-samples/public/docs/sample23.html +61 -25
  27. data/examples/api-samples/public/docs/sample24.html +100 -12
  28. data/examples/api-samples/public/docs/sample25.html +123 -49
  29. data/examples/api-samples/public/docs/sample26.html +41 -8
  30. data/examples/api-samples/public/docs/sample27.html +125 -50
  31. data/examples/api-samples/public/docs/sample28.html +27 -9
  32. data/examples/api-samples/public/docs/sample29.html +10 -10
  33. data/examples/api-samples/public/docs/sample30.html +70 -14
  34. data/examples/api-samples/public/docs/sample31.html +108 -67
  35. data/examples/api-samples/public/docs/sample32.html +71 -99
  36. data/examples/api-samples/public/docs/sample33.html +107 -32
  37. data/examples/api-samples/public/docs/{sample1.html → sample34.html} +58 -18
  38. data/examples/api-samples/public/docs/sample35.html +666 -0
  39. data/examples/api-samples/public/docs/{sample6.html → sample36.html} +56 -37
  40. data/examples/api-samples/public/docs/sample37.html +815 -0
  41. data/examples/api-samples/public/docs/sample38.html +508 -0
  42. data/examples/api-samples/public/docs/sample39.html +921 -0
  43. data/examples/api-samples/public/docs/sample40.html +510 -0
  44. data/examples/api-samples/public/docs/sample41.html +452 -0
  45. data/examples/api-samples/public/docs/sample42.html +311 -0
  46. data/examples/api-samples/public/templates/test_all_fields2.pdf +0 -0
  47. data/examples/api-samples/samples/sample01.rb +37 -0
  48. data/examples/api-samples/samples/sample02.rb +41 -0
  49. data/examples/api-samples/samples/sample03.rb +73 -0
  50. data/examples/api-samples/samples/sample04.rb +47 -0
  51. data/examples/api-samples/samples/{sample5.rb → sample05.rb} +26 -14
  52. data/examples/api-samples/samples/sample06.rb +80 -0
  53. data/examples/api-samples/samples/sample07.rb +52 -0
  54. data/examples/api-samples/samples/sample08.rb +69 -0
  55. data/examples/api-samples/samples/sample09.rb +83 -0
  56. data/examples/api-samples/samples/sample10.rb +29 -15
  57. data/examples/api-samples/samples/sample11.rb +89 -37
  58. data/examples/api-samples/samples/sample12.rb +22 -11
  59. data/examples/api-samples/samples/sample13.rb +22 -10
  60. data/examples/api-samples/samples/sample14.rb +23 -5
  61. data/examples/api-samples/samples/sample15.rb +18 -7
  62. data/examples/api-samples/samples/sample16.rb +28 -4
  63. data/examples/api-samples/samples/sample17.rb +31 -5
  64. data/examples/api-samples/samples/sample18.rb +36 -8
  65. data/examples/api-samples/samples/sample19.rb +138 -18
  66. data/examples/api-samples/samples/sample20.rb +14 -3
  67. data/examples/api-samples/samples/sample21.rb +162 -23
  68. data/examples/api-samples/samples/sample22.rb +73 -22
  69. data/examples/api-samples/samples/sample23.rb +17 -6
  70. data/examples/api-samples/samples/sample24.rb +34 -7
  71. data/examples/api-samples/samples/sample25.rb +37 -12
  72. data/examples/api-samples/samples/sample26.rb +12 -5
  73. data/examples/api-samples/samples/sample27.rb +38 -12
  74. data/examples/api-samples/samples/sample28.rb +25 -6
  75. data/examples/api-samples/samples/sample29.rb +12 -12
  76. data/examples/api-samples/samples/sample30.rb +27 -15
  77. data/examples/api-samples/samples/sample31.rb +44 -33
  78. data/examples/api-samples/samples/sample32.rb +43 -41
  79. data/examples/api-samples/samples/sample33.rb +42 -14
  80. data/examples/api-samples/samples/sample34.rb +40 -0
  81. data/examples/api-samples/samples/sample35.rb +224 -0
  82. data/examples/api-samples/samples/sample36.rb +58 -0
  83. data/examples/api-samples/samples/sample37.rb +229 -0
  84. data/examples/api-samples/samples/sample38.rb +128 -0
  85. data/examples/api-samples/samples/sample39.rb +252 -0
  86. data/examples/api-samples/samples/sample40.rb +164 -0
  87. data/examples/api-samples/samples/sample41.rb +118 -0
  88. data/examples/api-samples/samples/sample42.rb +97 -0
  89. data/examples/api-samples/views/_others_samples.haml +25 -11
  90. data/examples/api-samples/views/index.haml +23 -11
  91. data/examples/api-samples/views/popup.haml +32 -0
  92. data/examples/api-samples/views/{sample1.haml → sample01.haml} +12 -7
  93. data/examples/api-samples/views/{sample2.haml → sample02.haml} +20 -15
  94. data/examples/api-samples/views/sample03.haml +83 -0
  95. data/examples/api-samples/views/sample04.haml +49 -0
  96. data/examples/api-samples/views/{sample5.haml → sample05.haml} +19 -14
  97. data/examples/api-samples/views/sample06.haml +53 -0
  98. data/examples/api-samples/views/sample07.haml +47 -0
  99. data/examples/api-samples/views/{sample8.haml → sample08.haml} +17 -12
  100. data/examples/api-samples/views/{sample9.haml → sample09.haml} +19 -4
  101. data/examples/api-samples/views/sample10.haml +18 -13
  102. data/examples/api-samples/views/sample11.haml +48 -19
  103. data/examples/api-samples/views/sample12.haml +26 -21
  104. data/examples/api-samples/views/sample13.haml +18 -12
  105. data/examples/api-samples/views/sample14.haml +21 -15
  106. data/examples/api-samples/views/sample15.haml +16 -9
  107. data/examples/api-samples/views/sample16.haml +18 -5
  108. data/examples/api-samples/views/sample17.haml +14 -9
  109. data/examples/api-samples/views/sample18.haml +13 -7
  110. data/examples/api-samples/views/sample19.haml +37 -8
  111. data/examples/api-samples/views/sample20.haml +13 -8
  112. data/examples/api-samples/views/sample21.haml +71 -13
  113. data/examples/api-samples/views/sample22.haml +53 -16
  114. data/examples/api-samples/views/sample23.haml +9 -4
  115. data/examples/api-samples/views/sample24.haml +9 -4
  116. data/examples/api-samples/views/sample25.haml +18 -13
  117. data/examples/api-samples/views/sample26.haml +8 -3
  118. data/examples/api-samples/views/sample27.haml +20 -14
  119. data/examples/api-samples/views/sample28.haml +16 -10
  120. data/examples/api-samples/views/sample29.haml +4 -4
  121. data/examples/api-samples/views/sample30.haml +16 -10
  122. data/examples/api-samples/views/sample31.haml +39 -32
  123. data/examples/api-samples/views/sample32.haml +25 -36
  124. data/examples/api-samples/views/sample33.haml +14 -17
  125. data/examples/api-samples/views/sample34.haml +48 -0
  126. data/examples/api-samples/views/sample35.haml +95 -0
  127. data/examples/api-samples/views/sample36.haml +64 -0
  128. data/examples/api-samples/views/sample37.haml +124 -0
  129. data/examples/api-samples/views/sample38.haml +115 -0
  130. data/examples/api-samples/views/sample39.haml +236 -0
  131. data/examples/api-samples/views/sample40.haml +95 -0
  132. data/examples/api-samples/views/{sample4.haml → sample41.haml} +90 -72
  133. data/examples/api-samples/views/sample42.haml +59 -0
  134. data/lib/groupdocs/api/helpers/rest_helper.rb +13 -1
  135. data/lib/groupdocs/datasource.rb +2 -1
  136. data/lib/groupdocs/document.rb +101 -13
  137. data/lib/groupdocs/document/annotation.rb +28 -13
  138. data/lib/groupdocs/document/annotation/marker.rb +18 -0
  139. data/lib/groupdocs/document/annotation/reply.rb +9 -2
  140. data/lib/groupdocs/document/field.rb +5 -1
  141. data/lib/groupdocs/job.rb +12 -2
  142. data/lib/groupdocs/questionnaire.rb +174 -4
  143. data/lib/groupdocs/questionnaire/collector.rb +21 -0
  144. data/lib/groupdocs/questionnaire/question.rb +19 -0
  145. data/lib/groupdocs/questionnaire/question/answer.rb +5 -0
  146. data/lib/groupdocs/questionnaire/question/conditions.rb +20 -0
  147. data/lib/groupdocs/signature.rb +36 -308
  148. data/lib/groupdocs/signature/envelope.rb +146 -4
  149. data/lib/groupdocs/signature/field.rb +20 -1
  150. data/lib/groupdocs/signature/field/location.rb +18 -7
  151. data/lib/groupdocs/signature/form.rb +199 -10
  152. data/lib/groupdocs/signature/shared/document_methods.rb +38 -0
  153. data/lib/groupdocs/signature/shared/entity_methods.rb +0 -1
  154. data/lib/groupdocs/signature/shared/field_methods.rb +13 -38
  155. data/lib/groupdocs/signature/shared/recipient_methods.rb +8 -0
  156. data/lib/groupdocs/signature/template.rb +3 -1
  157. data/lib/groupdocs/storage.rb +4 -1
  158. data/lib/groupdocs/storage/file.rb +18 -1
  159. data/lib/groupdocs/subscription.rb +8 -3
  160. data/lib/groupdocs/user.rb +8 -0
  161. data/lib/groupdocs/version.rb +1 -1
  162. data/spec/groupdocs/document/annotation_spec.rb +1 -14
  163. data/spec/groupdocs/subscription_spec.rb +2 -2
  164. metadata +86 -32
  165. checksums.yaml +0 -15
  166. data/examples/api-samples/public/docs/sample9.html +0 -200
  167. data/examples/api-samples/samples/sample1.rb +0 -25
  168. data/examples/api-samples/samples/sample2.rb +0 -29
  169. data/examples/api-samples/samples/sample3.rb +0 -33
  170. data/examples/api-samples/samples/sample4.rb +0 -51
  171. data/examples/api-samples/samples/sample6.rb +0 -49
  172. data/examples/api-samples/samples/sample7.rb +0 -42
  173. data/examples/api-samples/samples/sample8.rb +0 -61
  174. data/examples/api-samples/samples/sample9.rb +0 -48
  175. data/examples/api-samples/views/sample3.haml +0 -44
  176. data/examples/api-samples/views/sample6.haml +0 -49
  177. data/examples/api-samples/views/sample7.haml +0 -42
@@ -9,10 +9,14 @@ module GroupDocs
9
9
  attr_accessor :type
10
10
  # @attr [GroupDocs::Document::Rectangle] rect
11
11
  attr_accessor :rect
12
- # @attr [String] maxlength
12
+ # @attr [Int] maxlength
13
13
  attr_accessor :maxlength
14
14
  # @attr [Boolean] mandatory
15
15
  attr_accessor :mandatory
16
+ # @attr [String] fieldtype
17
+ attr_accessor :fieldtype
18
+ # @attr [Array] acceptableValues
19
+ attr_accessor :acceptableValues
16
20
 
17
21
  #
18
22
  # Coverts passed hash to GroupDocs::Document::Rectangle object.
data/lib/groupdocs/job.rb CHANGED
@@ -13,6 +13,11 @@ module GroupDocs
13
13
  :print => 128,
14
14
  :compare => 256,
15
15
  :import_annotations => 512,
16
+ # add in release 1.5.8
17
+ :split => 1024,
18
+ :view => 2048,
19
+ :index => 4096,
20
+ :number_lines => 8192
16
21
  }
17
22
 
18
23
  extend Api::Helpers::ByteFlag
@@ -22,8 +27,13 @@ module GroupDocs
22
27
  # Returns array of jobs.
23
28
  #
24
29
  # @param [Hash] options Hash of options
25
- # @option options [Integer] :page Page to start with
26
- # @option options [Integer] :count How many items to list
30
+ # @option options [String] :page Page Index
31
+ # @option options [String] :date Data
32
+ # @option options [String] :count How many items to list
33
+ # @option options [String] :statusIds Comma separated status identifiers
34
+ # @option options [String] :actions Actions
35
+ # @option options [String] :excluded_actions Excluded actions
36
+ # @option options [String] :jobName Foltred job name
27
37
  # @param [Hash] access Access credentials
28
38
  # @option access [String] :client_id
29
39
  # @option access [String] :private_key
@@ -87,6 +87,23 @@ module GroupDocs
87
87
  # @attr [Array<String>] document_ids
88
88
  attr_accessor :document_ids
89
89
 
90
+ # added in release 1.5.8
91
+ #
92
+ # @attr [Array<String>] formats
93
+ attr_accessor :formats
94
+ # @attr [String] folder
95
+ attr_accessor :folder
96
+ # @attr [String] emails
97
+ attr_accessor :emails
98
+ # @attr [String] output_format
99
+ attr_accessor :output_format
100
+ # @attr [Boolean] open_on_completion
101
+ attr_accessor :open_on_completion
102
+ # @atrr [Integer] allowed_operations
103
+ attr_accessor :allowed_operations
104
+
105
+
106
+
90
107
  # Human-readable accessors
91
108
  alias_accessor :description, :descr
92
109
 
@@ -134,6 +151,19 @@ module GroupDocs
134
151
  #
135
152
  # Creates questionnaire.
136
153
  #
154
+ # @example
155
+ #
156
+ # questionnaire = GroupDocs::Questionnaire.new()
157
+ # pages = GroupDocs::Questionnaire::Page.new()
158
+ # questions = GroupDocs::Questionnaire::Question.new()
159
+ # answer = GroupDocs::Questionnaire::Question::Answer.new()
160
+ # questions.answers = [answer]
161
+ # conditions = GroupDocs::Questionnaire::Question::Conditions.new()
162
+ # questions.conditions = [conditions]
163
+ # pages.questions = [questions]
164
+ # questionnaire.pages = [pages]
165
+ # questionnaire.create!
166
+ #
137
167
  # @param [Hash] access Access credentials
138
168
  # @option access [String] :client_id
139
169
  # @option access [String] :private_key
@@ -225,7 +255,10 @@ module GroupDocs
225
255
  end
226
256
  end
227
257
 
228
- #
258
+ #
259
+ # Changed in release 1.5.8
260
+ #
261
+ #
229
262
  # Returns an array of questionnaire collectors.
230
263
  #
231
264
  #
@@ -243,7 +276,7 @@ module GroupDocs
243
276
  request[:method] = :GET
244
277
  request[:path] = "/merge/{{client_id}}/questionnaires/#{guid}/collectors"
245
278
  end
246
- api = add_params(options)
279
+ api.add_params(options)
247
280
  json = api.execute!
248
281
 
249
282
  json[:collectors].map do |collector|
@@ -318,7 +351,9 @@ module GroupDocs
318
351
  end
319
352
  end
320
353
 
321
- #
354
+ #
355
+ # Changed in release 1.5.8
356
+ #
322
357
  # Copy file to given path.
323
358
  #
324
359
  # @param [String] path (required)
@@ -340,11 +375,146 @@ module GroupDocs
340
375
  request[:headers] = { :'Groupdocs-Copy' => id }
341
376
  request[:path] = "/merge/{{client_id}}/files/#{path}"
342
377
  end
343
- api = add_params(:mode => mode)
378
+ api.add_params(:mode => mode)
344
379
  json = api.execute!
345
380
 
346
381
  json[:templates]
347
382
  end
348
383
 
384
+
385
+ #
386
+ # Added in release 1.5.8
387
+ #
388
+ # Get associated document by questionnaire
389
+ #
390
+ # @param [Hash] access Access credentials
391
+ # @option access [String] :client_id
392
+ # @option access [String] :private_key
393
+ #
394
+ def get_document!(access = {})
395
+ Api::Request.new do |request|
396
+ request[:access] = access
397
+ request[:method] = :GET
398
+ request[:path] = "/merge/{{client_id}}/questionnaires/#{id}/document"
399
+ end.execute!
400
+ end
401
+
402
+ #
403
+ # Added in release 1.5.8
404
+ #
405
+ # Returns an array of questionnaires by name.
406
+ #
407
+ # @param [Hash] options Hash of options
408
+ # @option options [String] :name Questionnaire name
409
+ # @option options [Symbol] :status Filter questionnaires by status
410
+ # @option options [Integer] :page_number Page to start with
411
+ # @option options [Integer] :page_size How many items to list
412
+ # @option options [String] :orderBy Order by column (optional)
413
+ # @option options [Bool] :isAscending Order by ascending or descending (optional)
414
+ # @param [Hash] access Access credentials
415
+ # @option access [String] :client_id
416
+ # @option access [String] :private_key
417
+ # @return [Array<GroupDocs::Questionnaire>]
418
+ #
419
+ def self.get_by_name!(options = {}, access = {})
420
+ if options[:status]
421
+ # TODO find better way to parse status
422
+ options[:status] = new.send(:parse_status, options[:status])
423
+ end
424
+
425
+ api = Api::Request.new do |request|
426
+ request[:access] = access
427
+ request[:method] = :GET
428
+ request[:path] = '/merge/{{client_id}}/questionnaires/filter'
429
+ end
430
+
431
+ api.add_params(options)
432
+ json = api.execute!
433
+
434
+ json[:questionnaires].map do |questionnaire|
435
+ new(questionnaire)
436
+ end
437
+ end
438
+
439
+ #
440
+ # Added in release 1.5.8
441
+ #
442
+ # Delete list of questionnaires by GUIDs.
443
+ #
444
+ # @param [Hash] access Access credentials
445
+ # @option guids [Array<String>] List of Questionnaires Guid
446
+ # @option access [String] :client_id
447
+ # @option access [String] :private_key
448
+ #
449
+ def delete_list!(guids, access = {})
450
+ api = Api::Request.new do |request|
451
+ request[:access] = access
452
+ request[:method] = :DELETE
453
+ request[:path] = "/merge/{{client_id}}/questionnaires/list"
454
+ request[:request_body] = guids
455
+ end
456
+
457
+ api.execute!
458
+ end
459
+
460
+ #
461
+ # Added in release 1.5.8
462
+ #
463
+ # Removes questionnaire collector.
464
+ #
465
+ # @param [Hash] access Access credentials
466
+ # @option collectors [Array<String>] List of Collectors Guid
467
+ # @option access [String] :client_id
468
+ # @option access [String] :private_key
469
+ #
470
+ def delete_collectors_list!(collectors, access = {})
471
+ Api::Request.new do |request|
472
+ request[:access] = access
473
+ request[:method] = :DELETE
474
+ request[:path] = "/merge/{{client_id}}/questionnaires/collectors/list"
475
+ request[:request_body] = collectors
476
+ end.execute!
477
+ end
478
+
479
+ #
480
+ # Added in release 1.5.8
481
+ #
482
+ # Removes questionnaire execution.
483
+ #
484
+ # @param [Hash] access Access credentials
485
+ # @option executions [Array<String>] List of Executions Guid
486
+ # @option access [String] :client_id
487
+ # @option access [String] :private_key
488
+ #
489
+ def delete_executions_list!(executions, access = {})
490
+ Api::Request.new do |request|
491
+ request[:access] = access
492
+ request[:method] = :DELETE
493
+ request[:path] = "/merge/{{client_id}}/questionnaires/executions/list"
494
+ request[:request_body] = executions
495
+ end.execute!
496
+ end
497
+
498
+ #
499
+ # Added in release 1.5.8
500
+ #
501
+ # Delete list of datasource fields.
502
+ #
503
+ # @param [Hash] access Access credentials
504
+ # @option datasource [Array<String>] List of Datasources Guid
505
+ # @option access [String] :client_id
506
+ # @option access [String] :private_key
507
+ #
508
+ def delete_datasources_list!(datasources, access = {})
509
+ Api::Request.new do |request|
510
+ request[:access] = access
511
+ request[:method] = :DELETE
512
+ request[:path] = "/merge/{{client_id}}datasources/list"
513
+ request[:request_body] = datasources
514
+ end.execute!
515
+ end
516
+
517
+
518
+
349
519
  end # Questionnaire
350
520
  end # GroupDocs
@@ -258,5 +258,26 @@ module GroupDocs
258
258
  Job.new(:id => json[:job_id])
259
259
  end
260
260
 
261
+
262
+ #
263
+ # Added in release 1.5.8
264
+ #
265
+ # Get questionnaire by collector guid
266
+ #
267
+ # @param [Hash] access Access credentials
268
+ # @option access [String] :client_id
269
+ # @option access [String] :private_key
270
+ #
271
+ def get_questionnaire!(access = {})
272
+ api = Api::Request.new do |request|
273
+ request[:access] = access
274
+ request[:method] = :GET
275
+ request[:path] = "/merge/{{client_id}}/questionnaires/collector/#{guid}"
276
+ end
277
+ json = api.execute!
278
+ Questionnaire.new(json[:questionnaire])
279
+
280
+ end
281
+
261
282
  end # Questionnaire::Collector
262
283
  end # GroupDocs
@@ -2,6 +2,7 @@ module GroupDocs
2
2
  class Questionnaire::Question < Api::Entity
3
3
 
4
4
  require 'groupdocs/questionnaire/question/answer'
5
+ require 'groupdocs/questionnaire/question/conditions'
5
6
 
6
7
  TYPES = %w(GenericText MultipleChoice)
7
8
 
@@ -18,9 +19,27 @@ module GroupDocs
18
19
  # @attr [Array<Hash>] answers
19
20
  attr_accessor :answers
20
21
 
22
+ #
23
+ # added in release 1.5.8
24
+ #
25
+ # @attr [Boolean] disabled
26
+ attr_accessor :disabled
27
+ # @attr [Integer] max_length
28
+ attr_accessor :max_length
29
+ # @attr [GroupDocs::Document::Rectangle] rect
30
+ attr_accessor :rect
31
+ # @attr [Array<String>] acceptableValues
32
+ attr_accessor :acceptableValues
33
+ # @attr [Array<GroupDocs::Questionnaire::Question::Conditions>] conditions
34
+ attr_accessor :conditions
35
+
36
+
21
37
  # Human-readable accessors
22
38
  alias_accessor :default_answer, :def_answer
23
39
 
40
+ # added in release 1.5.8
41
+ alias_accessor :acceptable_values, :acceptableValues
42
+
24
43
  #
25
44
  # Converts each answer to GroupDocs::Questionnaire::Question::Answer object.
26
45
  #
@@ -6,5 +6,10 @@ module GroupDocs
6
6
  # @attr [String] value
7
7
  attr_accessor :value
8
8
 
9
+ # added in release 1.5.8
10
+ # @attr [Integer] ordinal
11
+ attr_accessor :ordinal
12
+
13
+
9
14
  end # Questionnaire::Question::Answer
10
15
  end # GroupDocs
@@ -0,0 +1,20 @@
1
+ # added in release 1.5.8
2
+
3
+ module GroupDocs
4
+ class Questionnaire::Question::Conditions < Api::Entity
5
+
6
+ # @attr [String] fieldId
7
+ attr_accessor :fieldId
8
+ # @attr [String] answerId
9
+ attr_accessor :answerId
10
+ # @attr [Integer] pageId
11
+ attr_accessor :pageId
12
+ # @attr [String] action
13
+ attr_accessor :action
14
+ # @attr [String] operator
15
+ attr_accessor :operator
16
+ # @attr [String] operatorComparer
17
+ attr_accessor :operatorComparer
18
+
19
+ end # Questionnaire::Question::Conditions
20
+ end # GroupDocs
@@ -34,326 +34,30 @@ module GroupDocs
34
34
  end
35
35
 
36
36
 
37
+ # Get signature fields.
37
38
  #
38
- # Fill in envelope field.
39
- #
40
- # @param [String] envelope Envelope GUID
41
- # @param [String] document Document GUID
42
- # @param [String] recipient Recipient GUID
43
- # @param [String] field Field GUID
44
- # @param [Hash] post_data Data to be placed in field
45
- # @param [Hash] access Access credentials
46
- # @option access [String] :client_id
47
- # @option access [String] :private_key
48
- # @return [Array]
49
- #
50
- def fill_envelope!(envelope, document, recipient, field, post_data, access = {})
51
- json = Api::Request.new do |request|
52
- request[:access] = access
53
- request[:method] = :PUT
54
- request[:path] = "/signature/public/envelopes/#{envelope.guid}/documents/#{document.guid}/recipient/#{recipient.guid}/field/#{field.guid}"
55
- request[:request_body] = post_data
56
- end.execute!
57
-
58
- json[:field]
59
- end
60
-
61
- #
62
- # Sing envelope
63
- #
64
- # @param [String] envelope Envelope GUID
65
- # @param [String] recipient Recipient GUID
66
39
  # @param [Hash] access Access credentials
67
40
  # @option access [String] :client_id
68
41
  # @option access [String] :private_key
69
- # @return [Array]
70
- #
71
- def sign_envelope!(envelope, recipient, access = {})
72
- Api::Request.new do |request|
73
- request[:access] = access
74
- request[:method] = :PUT
75
- request[:path] = "/signature/public/envelopes/#{envelope.guid}/recipient/#{recipient.id}/sign"
76
- end.execute!
77
- end
78
-
79
- #
80
- # Sing envelope
81
- #
82
- # @param [String] envelope Envelope GUID
83
- # @param [Hash] access Access credentials
84
- # @option access [String] :client_id
85
- # @option access [String] :private_key
86
- # @return [Array]
42
+ # @return [Array<GroupDocs::Signature>]
87
43
  #
88
- def recipient!(envelope, access = {})
44
+ def self.get_list!( access = {})
89
45
  json = Api::Request.new do |request|
90
46
  request[:access] = access
91
47
  request[:method] = :GET
92
- request[:path] = "/signature/public/envelopes/#{envelope.guid}/recipient/"
48
+ request[:path] = '/signature/{{client_id}}/fields'
93
49
  end.execute!
94
50
 
95
- json[:recipient]
51
+ json[:fields]
96
52
  end
97
53
 
98
- #
99
- # Get signature field for document in envelope per recipient.
100
- #
101
- # @param [String] envelope Envelope GUID
102
- # @param [Hash] options
103
- # @option options [String] :document Document GUID
104
- # @option options [String] :recipient Recipient GUID
105
- # @param [Hash] access Access credentials
106
- # @option access [String] :client_id
107
- # @option access [String] :private_key
108
- # @return [Array]
109
- #
110
- def field_envelope_recipient!(envelope, options = {}, access = {})
111
- api = Api::Request.new do |request|
112
- request[:access] = access
113
- request[:method] = :GET
114
- request[:path] = "/signature/public/envelopes/#{envelope.guid}/fields"
115
- end
116
- api.add_params(options)
117
- json = api.execute!
118
54
 
119
- json[:field]
120
- end
121
55
 
122
56
  #
123
- # Get signed envelope field data.
57
+ # Changed in release 1.5.8
124
58
  #
125
- # @param [String] envelope Envelope GUID
126
- # @param [String] recipient Recipient GUID
127
- # @param [String] field Field GUID
128
- # @param [Hash] access Access credentials
129
- # @option access [String] :client_id
130
- # @option access [String] :private_key
131
- # @return [Array]
132
- #
133
- def field_envelope_date!(envelope, recipient, field,access = {})
134
- Api::Request.new do |request|
135
- request[:access] = access
136
- request[:method] = :GET
137
- request[:path] = "/signature/public/envelopes/#{envelope.guid}/fields/recipient/#{recipient.id}/field/#{field.id}"
138
- end.execute!
139
-
140
- end
141
-
142
59
  #
143
- # Get signature envelope.
144
- #
145
- # @param [String] envelope Envelope GUID
146
- # @param [String] recipient Recipient GUID
147
- # @param [Hash] access Access credentials
148
- # @option access [String] :client_id
149
- # @option access [String] :private_key
150
- # @return [Array]
151
- #
152
- def get_sign_envelope!(envelope, recipient, access = {})
153
- json = Api::Request.new do |request|
154
- request[:access] = access
155
- request[:method] = :GET
156
- request[:path] = "/signature/public/envelopes/#{envelope.guid}/recipient/#{recipient.id}"
157
- end.execute!
158
-
159
- json[:envelope]
160
- end
161
-
162
- #
163
- # Get signature envelope.
164
- #
165
- # @param [String] envelope Envelope GUID
166
- # @param [String] recipient Recipient GUID
167
- # @param [Hash] access Access credentials
168
- # @option access [String] :client_id
169
- # @option access [String] :private_key
170
- # @return [Array]
171
- #
172
- def get_signed_documents!(envelope, recipient, access = {})
173
- json = Api::Request.new do |request|
174
- request[:access] = access
175
- request[:method] = :GET
176
- request[:path] = "/signature/public/envelopes/#{envelope.guid}/recipient/#{recipient.id}/documents/get"
177
- end.execute!
178
- end
179
-
180
- #
181
- # Get signature envelope.
182
- #
183
- # @param [String] form Form GUID
184
- # @param [Hash] access Access credentials
185
- # @option access [String] :client_id
186
- # @option access [String] :private_key
187
- # @return [Array]
188
- #
189
- def fill_signature_form!(form, access = {})
190
- json = Api::Request.new do |request|
191
- request[:access] = access
192
- request[:method] = :GET
193
- request[:path] = "/signature/public/forms/#{form.id}/fill"
194
- end.execute!
195
-
196
- json[:participant]
197
- end
198
-
199
- #
200
- # Fill form field.
201
- #
202
- # @param [String] form Form GUID
203
- # @param [String] document Document GUID
204
- # @param [String] participant Participant GUID
205
- # @param [String] field Field GUID
206
- # @param [String] authentication Authentication signature
207
- # @param [Hash] access Access credentials
208
- # @option access [String] :client_id
209
- # @option access [String] :private_key
210
- # @return [Array]
211
- #
212
- def fill_form_field!(form, document, participant, field, authentication, access = {})
213
- api = Api::Request.new do |request|
214
- request[:access] = access
215
- request[:method] = :PUT
216
- request[:path] = "/signature/public/forms/#{form.id}/documents/#{document.guid}/participant/#{participant.id}/field/#{field.id}"
217
- end
218
- api.add_params(:participantAuthSignature => authentication)
219
- json = api.execute!
220
-
221
- json[:field]
222
- end
223
-
224
- #
225
- # Sign form.
226
- #
227
- # @param [String] form Form GUID
228
- # @param [String] participant Participant GUID
229
- # @param [String] authentication Authentication signature
230
- # @param [Hash] access Access credentials
231
- # @option access [String] :client_id
232
- # @option access [String] :private_key
233
- # @return [Array]
234
- #
235
- def sign_form!(form, participant, authentication, access = {})
236
- api = Api::Request.new do |request|
237
- request[:access] = access
238
- request[:method] = :PUT
239
- request[:path] = "/signature/public/forms/#{form}/participant/#{participant}/sign"
240
- end
241
- api.add_params(:participantAuthSignature => authentication)
242
- json = api.execute!
243
-
244
- json[:field]
245
- end
246
-
247
- #
248
- # Get form fields for document in form per participant
249
- #
250
- # @param [String] form Form GUID
251
- # @param [Hash] options
252
- # @option [String] document Document GUID
253
- # @option [String] participant Participant GUID
254
- # @param [Hash] access Access credentials
255
- # @option access [String] :client_id
256
- # @option access [String] :private_key
257
- # @return [Array]
258
- #
259
- def get_sign_form!(form, options = {}, access = {})
260
- api = Api::Request.new do |request|
261
- request[:access] = access
262
- request[:method] = :GET
263
- request[:path] = "/signature/public/forms/#{form.id}/fields"
264
- end
265
- api.add_params(options)
266
- json = api.execute!
267
-
268
- json[:field]
269
- end
270
-
271
- #
272
- # Get signed form documents.
273
- #
274
- # @param [String] form Form GUID
275
- # @param [String] participant Participant GUID
276
- # @param [Hash] access Access credentials
277
- # @option access [String] :client_id
278
- # @option access [String] :private_key
279
- # @return [Array]
280
- #
281
- def get_signed_documents_form!(path, name, form, participant, access = {})
282
- response = Api::Request.new do |request|
283
- request[:access] = access
284
- request[:method] = :GET
285
- request[:path] = "/signature/public/forms/#{form.id}/participant/#{participant.id}/documents/get"
286
- end.execute!
287
-
288
- filepath = "#{path}/#{name}."
289
- Object::File.open(filepath, 'wb') do |file|
290
- file.write(response)
291
- end
292
-
293
- filepath
294
- end
295
-
296
- #
297
- # Get signature form participant.
298
- #
299
- # @param [String] form Form GUID
300
- # @param [String] participant Participant GUID
301
- # @param [Hash] access Access credentials
302
- # @option access [String] :client_id
303
- # @option access [String] :private_key
304
- # @return [Array]
305
- #
306
- def get_sign_form_participant!(form, participant, access = {})
307
- json = Api::Request.new do |request|
308
- request[:access] = access
309
- request[:method] = :GET
310
- request[:path] = "/signature/public/forms/#{form}/participant/#{participant}"
311
- end.execute!
312
-
313
- json[:participant]
314
- end
315
-
316
- #
317
- # Sign document
318
- #
319
- # @param [String] document Document GUID
320
- # @param [Hash] settings Settings of the signing document
321
- # @param [Hash] access Access credentials
322
- # @option access [String] :client_id
323
- # @option access [String] :private_key
324
- # @return [Array]
325
- #
326
- def sign_document!(document, settings = {}, access = {})
327
- json = Api::Request.new do |request|
328
- request[:access] = access
329
- request[:method] = :POST
330
- request[:path] = "/signature/public/documents/#{document.guid}/sign"
331
- request[:request_body] = settings
332
- end.execute!
333
-
334
- json[:jobId]
335
- end
336
-
337
- #
338
- # Get document fields
339
- #
340
- # @param [String] document Document GUID
341
- # @param [Hash] settings Settings of the signing document
342
- # @param [Hash] access Access credentials
343
- # @option access [String] :client_id
344
- # @option access [String] :private_key
345
- # @return [Array]
346
- #
347
- def self.get_document_fields!(document, access = {})
348
- Api::Request.new do |request|
349
- request[:access] = access
350
- request[:method] = :GET
351
- request[:path] = "/signature/public/documents/#{document}/fields"
352
- end.execute!
353
- end
354
-
355
- #
356
- # Verify to document
60
+ # Verify to document
357
61
  #
358
62
  # @param [String] path Path to document GUID
359
63
  # @param [Hash] settings Settings of the signing document
@@ -362,29 +66,38 @@ module GroupDocs
362
66
  # @option access [String] :private_key
363
67
  # @return [Array]
364
68
  #
365
- def self.verify!(path, access = {})
69
+ def self.verify!(filepath, access = {})
366
70
  Api::Request.new do |request|
367
71
  request[:access] = access
368
72
  request[:method] = :POST
369
73
  request[:path] = "/signature/public/verify"
370
- request[:request_body] = path
74
+ request[:request_body] = Object::File.new(filepath, 'rb')
371
75
  end.execute!
372
76
  end
373
77
 
78
+
79
+
80
+ #
81
+ # Changed in release 1.5.8
374
82
  #
375
- # Sign document
83
+ #
84
+ # Sign document
376
85
  #
377
86
  # @param [String] job Job GUID
87
+ # @param [Hash] options
88
+ # @option [Boolean] :public
378
89
  # @param [Hash] access Access credentials
379
90
  # @option access [String] :client_id
380
91
  # @option access [String] :private_key
381
92
  # @return [Array]
382
93
  #
383
- def self.sign_document_status!(job, access = {})
94
+ def self.sign_document_status!(job, options = {}, access = {})
95
+
96
+ client_id = !!options[:public] ? 'public' : '{{client_id}}'
384
97
  json = Api::Request.new do |request|
385
98
  request[:access] = access
386
99
  request[:method] = :GET
387
- request[:path] = "/signature/public/documents/#{job}/status"
100
+ request[:path] = "/signature/#{client_id}/documents/#{job}/status"
388
101
  end.execute!
389
102
 
390
103
  Storage::File.new(:guid => json[:documents][0][:documentId])
@@ -392,6 +105,8 @@ module GroupDocs
392
105
 
393
106
 
394
107
 
108
+ #
109
+ # This method deleted from GroupDocs API
395
110
  #
396
111
  # Returns a list of all signatures for recipient.
397
112
  #
@@ -418,6 +133,7 @@ module GroupDocs
418
133
  end
419
134
  end
420
135
 
136
+
421
137
  # @attr [String] id
422
138
  attr_accessor :id
423
139
  # @attr [String] userGuid
@@ -471,6 +187,7 @@ module GroupDocs
471
187
  alias_accessor :initials_data, :initialsData
472
188
  alias_accessor :created_time_stamp, :createdTimeStamp
473
189
 
190
+
474
191
  #
475
192
  # Creates signature.
476
193
  #
@@ -498,6 +215,9 @@ module GroupDocs
498
215
  self.id = json[:signature][:id]
499
216
  end
500
217
 
218
+
219
+ #
220
+ # This method deleted from GroupDocs API
501
221
  #
502
222
  # Creates signature for recipient.
503
223
  #
@@ -523,6 +243,7 @@ module GroupDocs
523
243
  self.id = json[:signature][:id]
524
244
  end
525
245
 
246
+
526
247
  #
527
248
  # Deletes signature.
528
249
  #
@@ -538,6 +259,9 @@ module GroupDocs
538
259
  end.execute!
539
260
  end
540
261
 
262
+
263
+ #
264
+ # This method deleted from GroupDocs API
541
265
  #
542
266
  # Returns signature data.
543
267
  #
@@ -553,6 +277,10 @@ module GroupDocs
553
277
  end.execute!
554
278
  end
555
279
 
280
+
281
+
282
+ #
283
+ # This method deleted from GroupDocs API
556
284
  #
557
285
  # Returns initials data.
558
286
  #