groupdocs_signature_cloud 20.7 → 22.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/lib/groupdocs_signature_cloud/api/file_api.rb +6 -6
  3. data/lib/groupdocs_signature_cloud/api/folder_api.rb +6 -6
  4. data/lib/groupdocs_signature_cloud/api/info_api.rb +2 -2
  5. data/lib/groupdocs_signature_cloud/api/license_api.rb +169 -0
  6. data/lib/groupdocs_signature_cloud/api/preview_api.rb +217 -0
  7. data/lib/groupdocs_signature_cloud/api/sign_api.rb +6 -6
  8. data/lib/groupdocs_signature_cloud/api/storage_api.rb +5 -5
  9. data/lib/groupdocs_signature_cloud/api_client.rb +1 -1
  10. data/lib/groupdocs_signature_cloud/api_error.rb +18 -5
  11. data/lib/groupdocs_signature_cloud/configuration.rb +1 -1
  12. data/lib/groupdocs_signature_cloud/models/barcode_signature.rb +21 -3
  13. data/lib/groupdocs_signature_cloud/models/barcode_type.rb +19 -1
  14. data/lib/groupdocs_signature_cloud/models/barcodes_result.rb +19 -1
  15. data/lib/groupdocs_signature_cloud/models/base_settings.rb +19 -1
  16. data/lib/groupdocs_signature_cloud/models/border_line.rb +19 -1
  17. data/lib/groupdocs_signature_cloud/models/brush.rb +19 -1
  18. data/lib/groupdocs_signature_cloud/models/checkbox_form_field_signature.rb +460 -0
  19. data/lib/groupdocs_signature_cloud/models/color.rb +38 -5
  20. data/lib/groupdocs_signature_cloud/models/combobox_form_field_signature.rb +467 -0
  21. data/lib/groupdocs_signature_cloud/models/consumption_result.rb +257 -0
  22. data/lib/groupdocs_signature_cloud/models/delete_options.rb +21 -3
  23. data/lib/groupdocs_signature_cloud/models/delete_result.rb +20 -2
  24. data/lib/groupdocs_signature_cloud/models/delete_settings.rb +19 -1
  25. data/lib/groupdocs_signature_cloud/models/digital_form_field_signature.rb +460 -0
  26. data/lib/groupdocs_signature_cloud/models/digital_signature.rb +35 -7
  27. data/lib/groupdocs_signature_cloud/models/digital_signature_appearance.rb +309 -0
  28. data/lib/groupdocs_signature_cloud/models/disc_usage.rb +19 -1
  29. data/lib/groupdocs_signature_cloud/models/error.rb +19 -1
  30. data/lib/groupdocs_signature_cloud/models/error_details.rb +19 -1
  31. data/lib/groupdocs_signature_cloud/models/file_info.rb +19 -1
  32. data/lib/groupdocs_signature_cloud/models/file_version.rb +19 -1
  33. data/lib/groupdocs_signature_cloud/models/file_versions.rb +19 -1
  34. data/lib/groupdocs_signature_cloud/models/files_list.rb +19 -1
  35. data/lib/groupdocs_signature_cloud/models/files_upload_result.rb +19 -1
  36. data/lib/groupdocs_signature_cloud/models/form_field_signature.rb +445 -0
  37. data/lib/groupdocs_signature_cloud/models/format.rb +19 -1
  38. data/lib/groupdocs_signature_cloud/models/formats_result.rb +19 -1
  39. data/lib/groupdocs_signature_cloud/models/image_appearance.rb +339 -0
  40. data/lib/groupdocs_signature_cloud/models/image_signature.rb +21 -3
  41. data/lib/groupdocs_signature_cloud/models/info_result.rb +36 -6
  42. data/lib/groupdocs_signature_cloud/models/info_settings.rb +38 -5
  43. data/lib/groupdocs_signature_cloud/models/linear_gradient_brush.rb +19 -1
  44. data/lib/groupdocs_signature_cloud/models/object_exist.rb +19 -1
  45. data/lib/groupdocs_signature_cloud/models/options_base.rb +21 -3
  46. data/lib/groupdocs_signature_cloud/models/padding.rb +19 -1
  47. data/lib/groupdocs_signature_cloud/models/page_info.rb +19 -1
  48. data/lib/groupdocs_signature_cloud/models/pages_setup.rb +19 -1
  49. data/lib/groupdocs_signature_cloud/models/pdf_digital_signature.rb +339 -0
  50. data/lib/groupdocs_signature_cloud/models/pdf_digital_signature_appearance.rb +359 -0
  51. data/lib/groupdocs_signature_cloud/models/pdf_text_annotation_appearance.rb +395 -0
  52. data/lib/groupdocs_signature_cloud/models/pdf_text_sticker_appearance.rb +355 -0
  53. data/lib/groupdocs_signature_cloud/models/preview_page.rb +277 -0
  54. data/lib/groupdocs_signature_cloud/models/preview_result.rb +279 -0
  55. data/lib/groupdocs_signature_cloud/models/preview_settings.rb +356 -0
  56. data/lib/groupdocs_signature_cloud/models/qr_code_signature.rb +21 -3
  57. data/lib/groupdocs_signature_cloud/models/qr_code_type.rb +19 -1
  58. data/lib/groupdocs_signature_cloud/models/qr_codes_result.rb +19 -1
  59. data/lib/groupdocs_signature_cloud/models/radial_gradient_brush.rb +19 -1
  60. data/lib/groupdocs_signature_cloud/models/radio_button_form_field_signature.rb +467 -0
  61. data/lib/groupdocs_signature_cloud/models/save_options.rb +19 -1
  62. data/lib/groupdocs_signature_cloud/models/search_barcode_options.rb +21 -3
  63. data/lib/groupdocs_signature_cloud/models/search_digital_options.rb +21 -3
  64. data/lib/groupdocs_signature_cloud/models/search_options.rb +21 -3
  65. data/lib/groupdocs_signature_cloud/models/search_qr_code_options.rb +21 -3
  66. data/lib/groupdocs_signature_cloud/models/search_result.rb +19 -1
  67. data/lib/groupdocs_signature_cloud/models/search_settings.rb +19 -1
  68. data/lib/groupdocs_signature_cloud/models/sign_barcode_options.rb +47 -4
  69. data/lib/groupdocs_signature_cloud/models/sign_digital_options.rb +32 -4
  70. data/lib/groupdocs_signature_cloud/models/sign_image_options.rb +32 -4
  71. data/lib/groupdocs_signature_cloud/models/sign_options.rb +35 -7
  72. data/lib/groupdocs_signature_cloud/models/sign_qr_code_options.rb +47 -4
  73. data/lib/groupdocs_signature_cloud/models/sign_result.rb +20 -2
  74. data/lib/groupdocs_signature_cloud/models/sign_settings.rb +19 -1
  75. data/lib/groupdocs_signature_cloud/models/sign_stamp_options.rb +32 -4
  76. data/lib/groupdocs_signature_cloud/models/sign_text_options.rb +50 -7
  77. data/lib/groupdocs_signature_cloud/models/signature.rb +21 -3
  78. data/lib/groupdocs_signature_cloud/models/signature_appearance.rb +279 -0
  79. data/lib/groupdocs_signature_cloud/models/signature_font.rb +19 -1
  80. data/lib/groupdocs_signature_cloud/models/solid_brush.rb +19 -1
  81. data/lib/groupdocs_signature_cloud/models/stamp_line.rb +19 -1
  82. data/lib/groupdocs_signature_cloud/models/storage_exist.rb +19 -1
  83. data/lib/groupdocs_signature_cloud/models/storage_file.rb +19 -1
  84. data/lib/groupdocs_signature_cloud/models/text_form_field_signature.rb +455 -0
  85. data/lib/groupdocs_signature_cloud/models/text_signature.rb +21 -3
  86. data/lib/groupdocs_signature_cloud/models/texture_brush.rb +19 -1
  87. data/lib/groupdocs_signature_cloud/models/time_stamp.rb +257 -0
  88. data/lib/groupdocs_signature_cloud/models/update_options.rb +21 -3
  89. data/lib/groupdocs_signature_cloud/models/update_result.rb +20 -2
  90. data/lib/groupdocs_signature_cloud/models/update_settings.rb +19 -1
  91. data/lib/groupdocs_signature_cloud/models/verify_barcode_options.rb +21 -3
  92. data/lib/groupdocs_signature_cloud/models/verify_digital_options.rb +21 -3
  93. data/lib/groupdocs_signature_cloud/models/verify_options.rb +21 -3
  94. data/lib/groupdocs_signature_cloud/models/verify_qr_code_options.rb +21 -3
  95. data/lib/groupdocs_signature_cloud/models/verify_result.rb +20 -2
  96. data/lib/groupdocs_signature_cloud/models/verify_settings.rb +19 -1
  97. data/lib/groupdocs_signature_cloud/models/verify_text_options.rb +21 -3
  98. data/lib/groupdocs_signature_cloud/version.rb +2 -2
  99. data/lib/groupdocs_signature_cloud.rb +21 -1
  100. metadata +26 -20
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
3
  # <copyright company="Aspose Pty Ltd" file="sign_options.rb">
4
- # Copyright (c) 2003-2020 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2022 Aspose Pty Ltd
5
5
  # </copyright>
6
6
  # <summary>
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -42,6 +42,9 @@ module GroupDocsSignatureCloud
42
42
 
43
43
  # Options to specify pages for processing
44
44
  attr_accessor :pages_setup
45
+
46
+ # Specifies Appearance with additional properties for this options instance
47
+ attr_accessor :appearance
45
48
  class EnumAttributeValidator
46
49
  attr_reader :datatype
47
50
  attr_reader :allowable_values
@@ -70,7 +73,8 @@ module GroupDocsSignatureCloud
70
73
  :'signature_type' => :'SignatureType',
71
74
  :'page' => :'Page',
72
75
  :'all_pages' => :'AllPages',
73
- :'pages_setup' => :'PagesSetup'
76
+ :'pages_setup' => :'PagesSetup',
77
+ :'appearance' => :'Appearance'
74
78
  }
75
79
  end
76
80
 
@@ -80,7 +84,8 @@ module GroupDocsSignatureCloud
80
84
  :'signature_type' => :'String',
81
85
  :'page' => :'Integer',
82
86
  :'all_pages' => :'BOOLEAN',
83
- :'pages_setup' => :'PagesSetup'
87
+ :'pages_setup' => :'PagesSetup',
88
+ :'appearance' => :'SignatureAppearance'
84
89
  }
85
90
  end
86
91
 
@@ -108,6 +113,10 @@ module GroupDocsSignatureCloud
108
113
  self.pages_setup = attributes[:'PagesSetup']
109
114
  end
110
115
 
116
+ if attributes.key?(:'Appearance')
117
+ self.appearance = attributes[:'Appearance']
118
+ end
119
+
111
120
  end
112
121
 
113
122
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -129,7 +138,7 @@ module GroupDocsSignatureCloud
129
138
  # @return true if the model is valid
130
139
  def valid?
131
140
  return false if @signature_type.nil?
132
- signature_type_validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp"])
141
+ signature_type_validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp", "FormField", "Metadata"])
133
142
  return false unless signature_type_validator.valid?(@signature_type)
134
143
  return false if @all_pages.nil?
135
144
  return true
@@ -138,7 +147,7 @@ module GroupDocsSignatureCloud
138
147
  # Custom attribute writer method checking allowed values (enum).
139
148
  # @param [Object] signature_type Object to be assigned
140
149
  def signature_type=(signature_type)
141
- validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp"])
150
+ validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp", "FormField", "Metadata"])
142
151
  if signature_type.to_i == 0
143
152
  unless validator.valid?(signature_type)
144
153
  raise ArgumentError, "invalid value for 'signature_type', must be one of #{validator.allowable_values}."
@@ -157,7 +166,8 @@ module GroupDocsSignatureCloud
157
166
  signature_type == other.signature_type &&
158
167
  page == other.page &&
159
168
  all_pages == other.all_pages &&
160
- pages_setup == other.pages_setup
169
+ pages_setup == other.pages_setup &&
170
+ appearance == other.appearance
161
171
  end
162
172
 
163
173
  # @see the `==` method
@@ -169,7 +179,7 @@ module GroupDocsSignatureCloud
169
179
  # Calculates hash code according to all attributes.
170
180
  # @return [Fixnum] Hash code
171
181
  def hash
172
- [signature_type, page, all_pages, pages_setup].hash
182
+ [signature_type, page, all_pages, pages_setup, appearance].hash
173
183
  end
174
184
 
175
185
  # Downcases first letter.
@@ -243,6 +253,24 @@ module GroupDocsSignatureCloud
243
253
  ttype = type
244
254
  if value.is_a?(Hash) and !value[:signatureType].nil?
245
255
  ttype = value[:signatureType] + 'Signature'
256
+ if value[:signatureType] == 'FormField' and !value[:type].nil?
257
+ type = value[:type]
258
+ if type == 'Checkbox'
259
+ ttype = 'CheckboxFormFieldSignature'
260
+ end
261
+ if type == 'Text'
262
+ ttype = 'TextFormFieldSignature'
263
+ end
264
+ if type == 'Combobox'
265
+ ttype = 'ComboboxFormFieldSignature'
266
+ end
267
+ if type == 'DigitalSignature'
268
+ ttype = 'DigitalFormFieldSignature'
269
+ end
270
+ if type == 'Radio'
271
+ ttype = 'RadioButtonFormFieldSignature'
272
+ end
273
+ end
246
274
  end
247
275
  temp_model = GroupDocsSignatureCloud.const_get(ttype).new
248
276
  temp_model.build_from_hash(value)
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
3
  # <copyright company="Aspose Pty Ltd" file="sign_qr_code_options.rb">
4
- # Copyright (c) 2003-2020 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2022 Aspose Pty Ltd
5
5
  # </copyright>
6
6
  # <summary>
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -43,6 +43,9 @@ module GroupDocsSignatureCloud
43
43
  # Options to specify pages for processing
44
44
  attr_accessor :pages_setup
45
45
 
46
+ # Specifies Appearance with additional properties for this options instance
47
+ attr_accessor :appearance
48
+
46
49
  # Left X position of Signature on Document Page in Measure values (pixels or percent see MeasureType LocationMeasureType property)
47
50
  attr_accessor :left
48
51
 
@@ -106,6 +109,9 @@ module GroupDocsSignatureCloud
106
109
  # Gets or sets the Z-order position of text signature. Determines the display order of overlapping signatures.
107
110
  attr_accessor :z_order
108
111
 
112
+ # Gets or sets the native attribute. If it is set document specific signatures could be used. Native text watermark for WordProcessing documents is different than regular, for example.
113
+ attr_accessor :native
114
+
109
115
  # Get or set QRCode type. Value should be one from supported QRCode types list
110
116
  attr_accessor :qr_code_type
111
117
 
@@ -149,6 +155,7 @@ module GroupDocsSignatureCloud
149
155
  :'page' => :'Page',
150
156
  :'all_pages' => :'AllPages',
151
157
  :'pages_setup' => :'PagesSetup',
158
+ :'appearance' => :'Appearance',
152
159
  :'left' => :'Left',
153
160
  :'top' => :'Top',
154
161
  :'width' => :'Width',
@@ -170,6 +177,7 @@ module GroupDocsSignatureCloud
170
177
  :'text_horizontal_alignment' => :'TextHorizontalAlignment',
171
178
  :'text_vertical_alignment' => :'TextVerticalAlignment',
172
179
  :'z_order' => :'ZOrder',
180
+ :'native' => :'Native',
173
181
  :'qr_code_type' => :'QRCodeType',
174
182
  :'transparency' => :'Transparency',
175
183
  :'code_text_alignment' => :'CodeTextAlignment',
@@ -185,6 +193,7 @@ module GroupDocsSignatureCloud
185
193
  :'page' => :'Integer',
186
194
  :'all_pages' => :'BOOLEAN',
187
195
  :'pages_setup' => :'PagesSetup',
196
+ :'appearance' => :'SignatureAppearance',
188
197
  :'left' => :'Integer',
189
198
  :'top' => :'Integer',
190
199
  :'width' => :'Integer',
@@ -206,6 +215,7 @@ module GroupDocsSignatureCloud
206
215
  :'text_horizontal_alignment' => :'String',
207
216
  :'text_vertical_alignment' => :'String',
208
217
  :'z_order' => :'Integer',
218
+ :'native' => :'BOOLEAN',
209
219
  :'qr_code_type' => :'String',
210
220
  :'transparency' => :'Float',
211
221
  :'code_text_alignment' => :'String',
@@ -238,6 +248,10 @@ module GroupDocsSignatureCloud
238
248
  self.pages_setup = attributes[:'PagesSetup']
239
249
  end
240
250
 
251
+ if attributes.key?(:'Appearance')
252
+ self.appearance = attributes[:'Appearance']
253
+ end
254
+
241
255
  if attributes.key?(:'Left')
242
256
  self.left = attributes[:'Left']
243
257
  end
@@ -322,6 +336,10 @@ module GroupDocsSignatureCloud
322
336
  self.z_order = attributes[:'ZOrder']
323
337
  end
324
338
 
339
+ if attributes.key?(:'Native')
340
+ self.native = attributes[:'Native']
341
+ end
342
+
325
343
  if attributes.key?(:'QRCodeType')
326
344
  self.qr_code_type = attributes[:'QRCodeType']
327
345
  end
@@ -412,6 +430,10 @@ module GroupDocsSignatureCloud
412
430
  invalid_properties.push("invalid value for 'z_order', z_order cannot be nil.")
413
431
  end
414
432
 
433
+ if @native.nil?
434
+ invalid_properties.push("invalid value for 'native', native cannot be nil.")
435
+ end
436
+
415
437
  if @transparency.nil?
416
438
  invalid_properties.push("invalid value for 'transparency', transparency cannot be nil.")
417
439
  end
@@ -427,7 +449,7 @@ module GroupDocsSignatureCloud
427
449
  # @return true if the model is valid
428
450
  def valid?
429
451
  return false if @signature_type.nil?
430
- signature_type_validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp"])
452
+ signature_type_validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp", "FormField", "Metadata"])
431
453
  return false unless signature_type_validator.valid?(@signature_type)
432
454
  return false if @all_pages.nil?
433
455
  return false if @left.nil?
@@ -460,6 +482,7 @@ module GroupDocsSignatureCloud
460
482
  text_vertical_alignment_validator = EnumAttributeValidator.new('String', ["Top", "Center", "Bottom"])
461
483
  return false unless text_vertical_alignment_validator.valid?(@text_vertical_alignment)
462
484
  return false if @z_order.nil?
485
+ return false if @native.nil?
463
486
  return false if @transparency.nil?
464
487
  return false if @code_text_alignment.nil?
465
488
  code_text_alignment_validator = EnumAttributeValidator.new('String', ["None", "Above", "Below", "Right"])
@@ -470,7 +493,7 @@ module GroupDocsSignatureCloud
470
493
  # Custom attribute writer method checking allowed values (enum).
471
494
  # @param [Object] signature_type Object to be assigned
472
495
  def signature_type=(signature_type)
473
- validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp"])
496
+ validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp", "FormField", "Metadata"])
474
497
  if signature_type.to_i == 0
475
498
  unless validator.valid?(signature_type)
476
499
  raise ArgumentError, "invalid value for 'signature_type', must be one of #{validator.allowable_values}."
@@ -616,6 +639,7 @@ module GroupDocsSignatureCloud
616
639
  page == other.page &&
617
640
  all_pages == other.all_pages &&
618
641
  pages_setup == other.pages_setup &&
642
+ appearance == other.appearance &&
619
643
  left == other.left &&
620
644
  top == other.top &&
621
645
  width == other.width &&
@@ -637,6 +661,7 @@ module GroupDocsSignatureCloud
637
661
  text_horizontal_alignment == other.text_horizontal_alignment &&
638
662
  text_vertical_alignment == other.text_vertical_alignment &&
639
663
  z_order == other.z_order &&
664
+ native == other.native &&
640
665
  qr_code_type == other.qr_code_type &&
641
666
  transparency == other.transparency &&
642
667
  code_text_alignment == other.code_text_alignment &&
@@ -653,7 +678,7 @@ module GroupDocsSignatureCloud
653
678
  # Calculates hash code according to all attributes.
654
679
  # @return [Fixnum] Hash code
655
680
  def hash
656
- [signature_type, page, all_pages, pages_setup, left, top, width, height, location_measure_type, size_measure_type, stretch, rotation_angle, horizontal_alignment, vertical_alignment, margin, margin_measure_type, text, font, fore_color, background_color, background_brush, border, text_horizontal_alignment, text_vertical_alignment, z_order, qr_code_type, transparency, code_text_alignment, inner_margins, logo_file_path].hash
681
+ [signature_type, page, all_pages, pages_setup, appearance, left, top, width, height, location_measure_type, size_measure_type, stretch, rotation_angle, horizontal_alignment, vertical_alignment, margin, margin_measure_type, text, font, fore_color, background_color, background_brush, border, text_horizontal_alignment, text_vertical_alignment, z_order, native, qr_code_type, transparency, code_text_alignment, inner_margins, logo_file_path].hash
657
682
  end
658
683
 
659
684
  # Downcases first letter.
@@ -727,6 +752,24 @@ module GroupDocsSignatureCloud
727
752
  ttype = type
728
753
  if value.is_a?(Hash) and !value[:signatureType].nil?
729
754
  ttype = value[:signatureType] + 'Signature'
755
+ if value[:signatureType] == 'FormField' and !value[:type].nil?
756
+ type = value[:type]
757
+ if type == 'Checkbox'
758
+ ttype = 'CheckboxFormFieldSignature'
759
+ end
760
+ if type == 'Text'
761
+ ttype = 'TextFormFieldSignature'
762
+ end
763
+ if type == 'Combobox'
764
+ ttype = 'ComboboxFormFieldSignature'
765
+ end
766
+ if type == 'DigitalSignature'
767
+ ttype = 'DigitalFormFieldSignature'
768
+ end
769
+ if type == 'Radio'
770
+ ttype = 'RadioButtonFormFieldSignature'
771
+ end
772
+ end
730
773
  end
731
774
  temp_model = GroupDocsSignatureCloud.const_get(ttype).new
732
775
  temp_model.build_from_hash(value)
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
3
  # <copyright company="Aspose Pty Ltd" file="sign_result.rb">
4
- # Copyright (c) 2003-2020 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2022 Aspose Pty Ltd
5
5
  # </copyright>
6
6
  # <summary>
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -31,7 +31,7 @@ module GroupDocsSignatureCloud
31
31
  # Sign result information
32
32
  class SignResult
33
33
 
34
- # Source document basic info
34
+ # Signed file info
35
35
  attr_accessor :file_info
36
36
 
37
37
  # Source document size in bytes
@@ -215,6 +215,24 @@ module GroupDocsSignatureCloud
215
215
  ttype = type
216
216
  if value.is_a?(Hash) and !value[:signatureType].nil?
217
217
  ttype = value[:signatureType] + 'Signature'
218
+ if value[:signatureType] == 'FormField' and !value[:type].nil?
219
+ type = value[:type]
220
+ if type == 'Checkbox'
221
+ ttype = 'CheckboxFormFieldSignature'
222
+ end
223
+ if type == 'Text'
224
+ ttype = 'TextFormFieldSignature'
225
+ end
226
+ if type == 'Combobox'
227
+ ttype = 'ComboboxFormFieldSignature'
228
+ end
229
+ if type == 'DigitalSignature'
230
+ ttype = 'DigitalFormFieldSignature'
231
+ end
232
+ if type == 'Radio'
233
+ ttype = 'RadioButtonFormFieldSignature'
234
+ end
235
+ end
218
236
  end
219
237
  temp_model = GroupDocsSignatureCloud.const_get(ttype).new
220
238
  temp_model.build_from_hash(value)
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
3
  # <copyright company="Aspose Pty Ltd" file="sign_settings.rb">
4
- # Copyright (c) 2003-2020 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2022 Aspose Pty Ltd
5
5
  # </copyright>
6
6
  # <summary>
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -188,6 +188,24 @@ module GroupDocsSignatureCloud
188
188
  ttype = type
189
189
  if value.is_a?(Hash) and !value[:signatureType].nil?
190
190
  ttype = value[:signatureType] + 'Signature'
191
+ if value[:signatureType] == 'FormField' and !value[:type].nil?
192
+ type = value[:type]
193
+ if type == 'Checkbox'
194
+ ttype = 'CheckboxFormFieldSignature'
195
+ end
196
+ if type == 'Text'
197
+ ttype = 'TextFormFieldSignature'
198
+ end
199
+ if type == 'Combobox'
200
+ ttype = 'ComboboxFormFieldSignature'
201
+ end
202
+ if type == 'DigitalSignature'
203
+ ttype = 'DigitalFormFieldSignature'
204
+ end
205
+ if type == 'Radio'
206
+ ttype = 'RadioButtonFormFieldSignature'
207
+ end
208
+ end
191
209
  end
192
210
  temp_model = GroupDocsSignatureCloud.const_get(ttype).new
193
211
  temp_model.build_from_hash(value)
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
3
  # <copyright company="Aspose Pty Ltd" file="sign_stamp_options.rb">
4
- # Copyright (c) 2003-2020 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2022 Aspose Pty Ltd
5
5
  # </copyright>
6
6
  # <summary>
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -43,6 +43,9 @@ module GroupDocsSignatureCloud
43
43
  # Options to specify pages for processing
44
44
  attr_accessor :pages_setup
45
45
 
46
+ # Specifies Appearance with additional properties for this options instance
47
+ attr_accessor :appearance
48
+
46
49
  # Gets or sets the signature image file name. This property is used only if ImageStream is not specified
47
50
  attr_accessor :image_file_path
48
51
 
@@ -131,6 +134,7 @@ module GroupDocsSignatureCloud
131
134
  :'page' => :'Page',
132
135
  :'all_pages' => :'AllPages',
133
136
  :'pages_setup' => :'PagesSetup',
137
+ :'appearance' => :'Appearance',
134
138
  :'image_file_path' => :'ImageFilePath',
135
139
  :'left' => :'Left',
136
140
  :'top' => :'Top',
@@ -161,6 +165,7 @@ module GroupDocsSignatureCloud
161
165
  :'page' => :'Integer',
162
166
  :'all_pages' => :'BOOLEAN',
163
167
  :'pages_setup' => :'PagesSetup',
168
+ :'appearance' => :'SignatureAppearance',
164
169
  :'image_file_path' => :'String',
165
170
  :'left' => :'Integer',
166
171
  :'top' => :'Integer',
@@ -208,6 +213,10 @@ module GroupDocsSignatureCloud
208
213
  self.pages_setup = attributes[:'PagesSetup']
209
214
  end
210
215
 
216
+ if attributes.key?(:'Appearance')
217
+ self.appearance = attributes[:'Appearance']
218
+ end
219
+
211
220
  if attributes.key?(:'ImageFilePath')
212
221
  self.image_file_path = attributes[:'ImageFilePath']
213
222
  end
@@ -365,7 +374,7 @@ module GroupDocsSignatureCloud
365
374
  # @return true if the model is valid
366
375
  def valid?
367
376
  return false if @signature_type.nil?
368
- signature_type_validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp"])
377
+ signature_type_validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp", "FormField", "Metadata"])
369
378
  return false unless signature_type_validator.valid?(@signature_type)
370
379
  return false if @all_pages.nil?
371
380
  return false if @left.nil?
@@ -401,7 +410,7 @@ module GroupDocsSignatureCloud
401
410
  # Custom attribute writer method checking allowed values (enum).
402
411
  # @param [Object] signature_type Object to be assigned
403
412
  def signature_type=(signature_type)
404
- validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp"])
413
+ validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp", "FormField", "Metadata"])
405
414
  if signature_type.to_i == 0
406
415
  unless validator.valid?(signature_type)
407
416
  raise ArgumentError, "invalid value for 'signature_type', must be one of #{validator.allowable_values}."
@@ -519,6 +528,7 @@ module GroupDocsSignatureCloud
519
528
  page == other.page &&
520
529
  all_pages == other.all_pages &&
521
530
  pages_setup == other.pages_setup &&
531
+ appearance == other.appearance &&
522
532
  image_file_path == other.image_file_path &&
523
533
  left == other.left &&
524
534
  top == other.top &&
@@ -550,7 +560,7 @@ module GroupDocsSignatureCloud
550
560
  # Calculates hash code according to all attributes.
551
561
  # @return [Fixnum] Hash code
552
562
  def hash
553
- [signature_type, page, all_pages, pages_setup, image_file_path, left, top, width, height, location_measure_type, size_measure_type, rotation_angle, horizontal_alignment, vertical_alignment, margin, margin_measure_type, transparency, border, outer_lines, inner_lines, background_color, background_brush, background_color_crop_type, background_image_crop_type].hash
563
+ [signature_type, page, all_pages, pages_setup, appearance, image_file_path, left, top, width, height, location_measure_type, size_measure_type, rotation_angle, horizontal_alignment, vertical_alignment, margin, margin_measure_type, transparency, border, outer_lines, inner_lines, background_color, background_brush, background_color_crop_type, background_image_crop_type].hash
554
564
  end
555
565
 
556
566
  # Downcases first letter.
@@ -624,6 +634,24 @@ module GroupDocsSignatureCloud
624
634
  ttype = type
625
635
  if value.is_a?(Hash) and !value[:signatureType].nil?
626
636
  ttype = value[:signatureType] + 'Signature'
637
+ if value[:signatureType] == 'FormField' and !value[:type].nil?
638
+ type = value[:type]
639
+ if type == 'Checkbox'
640
+ ttype = 'CheckboxFormFieldSignature'
641
+ end
642
+ if type == 'Text'
643
+ ttype = 'TextFormFieldSignature'
644
+ end
645
+ if type == 'Combobox'
646
+ ttype = 'ComboboxFormFieldSignature'
647
+ end
648
+ if type == 'DigitalSignature'
649
+ ttype = 'DigitalFormFieldSignature'
650
+ end
651
+ if type == 'Radio'
652
+ ttype = 'RadioButtonFormFieldSignature'
653
+ end
654
+ end
627
655
  end
628
656
  temp_model = GroupDocsSignatureCloud.const_get(ttype).new
629
657
  temp_model.build_from_hash(value)
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
3
  # <copyright company="Aspose Pty Ltd" file="sign_text_options.rb">
4
- # Copyright (c) 2003-2020 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2022 Aspose Pty Ltd
5
5
  # </copyright>
6
6
  # <summary>
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -43,6 +43,9 @@ module GroupDocsSignatureCloud
43
43
  # Options to specify pages for processing
44
44
  attr_accessor :pages_setup
45
45
 
46
+ # Specifies Appearance with additional properties for this options instance
47
+ attr_accessor :appearance
48
+
46
49
  # Left X position of Signature on Document Page in Measure values (pixels or percent see MeasureType LocationMeasureType property)
47
50
  attr_accessor :left
48
51
 
@@ -105,6 +108,9 @@ module GroupDocsSignatureCloud
105
108
 
106
109
  # Gets or sets the Z-order position of text signature. Determines the display order of overlapping signatures.
107
110
  attr_accessor :z_order
111
+
112
+ # Gets or sets the native attribute. If it is set document specific signatures could be used. Native text watermark for WordProcessing documents is different than regular, for example.
113
+ attr_accessor :native
108
114
  class EnumAttributeValidator
109
115
  attr_reader :datatype
110
116
  attr_reader :allowable_values
@@ -134,6 +140,7 @@ module GroupDocsSignatureCloud
134
140
  :'page' => :'Page',
135
141
  :'all_pages' => :'AllPages',
136
142
  :'pages_setup' => :'PagesSetup',
143
+ :'appearance' => :'Appearance',
137
144
  :'left' => :'Left',
138
145
  :'top' => :'Top',
139
146
  :'width' => :'Width',
@@ -154,7 +161,8 @@ module GroupDocsSignatureCloud
154
161
  :'border' => :'Border',
155
162
  :'text_horizontal_alignment' => :'TextHorizontalAlignment',
156
163
  :'text_vertical_alignment' => :'TextVerticalAlignment',
157
- :'z_order' => :'ZOrder'
164
+ :'z_order' => :'ZOrder',
165
+ :'native' => :'Native'
158
166
  }
159
167
  end
160
168
 
@@ -165,6 +173,7 @@ module GroupDocsSignatureCloud
165
173
  :'page' => :'Integer',
166
174
  :'all_pages' => :'BOOLEAN',
167
175
  :'pages_setup' => :'PagesSetup',
176
+ :'appearance' => :'SignatureAppearance',
168
177
  :'left' => :'Integer',
169
178
  :'top' => :'Integer',
170
179
  :'width' => :'Integer',
@@ -185,7 +194,8 @@ module GroupDocsSignatureCloud
185
194
  :'border' => :'BorderLine',
186
195
  :'text_horizontal_alignment' => :'String',
187
196
  :'text_vertical_alignment' => :'String',
188
- :'z_order' => :'Integer'
197
+ :'z_order' => :'Integer',
198
+ :'native' => :'BOOLEAN'
189
199
  }
190
200
  end
191
201
 
@@ -213,6 +223,10 @@ module GroupDocsSignatureCloud
213
223
  self.pages_setup = attributes[:'PagesSetup']
214
224
  end
215
225
 
226
+ if attributes.key?(:'Appearance')
227
+ self.appearance = attributes[:'Appearance']
228
+ end
229
+
216
230
  if attributes.key?(:'Left')
217
231
  self.left = attributes[:'Left']
218
232
  end
@@ -297,6 +311,10 @@ module GroupDocsSignatureCloud
297
311
  self.z_order = attributes[:'ZOrder']
298
312
  end
299
313
 
314
+ if attributes.key?(:'Native')
315
+ self.native = attributes[:'Native']
316
+ end
317
+
300
318
  end
301
319
 
302
320
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -367,6 +385,10 @@ module GroupDocsSignatureCloud
367
385
  invalid_properties.push("invalid value for 'z_order', z_order cannot be nil.")
368
386
  end
369
387
 
388
+ if @native.nil?
389
+ invalid_properties.push("invalid value for 'native', native cannot be nil.")
390
+ end
391
+
370
392
  return invalid_properties
371
393
  end
372
394
 
@@ -374,7 +396,7 @@ module GroupDocsSignatureCloud
374
396
  # @return true if the model is valid
375
397
  def valid?
376
398
  return false if @signature_type.nil?
377
- signature_type_validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp"])
399
+ signature_type_validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp", "FormField", "Metadata"])
378
400
  return false unless signature_type_validator.valid?(@signature_type)
379
401
  return false if @all_pages.nil?
380
402
  return false if @left.nil?
@@ -407,13 +429,14 @@ module GroupDocsSignatureCloud
407
429
  text_vertical_alignment_validator = EnumAttributeValidator.new('String', ["Top", "Center", "Bottom"])
408
430
  return false unless text_vertical_alignment_validator.valid?(@text_vertical_alignment)
409
431
  return false if @z_order.nil?
432
+ return false if @native.nil?
410
433
  return true
411
434
  end
412
435
 
413
436
  # Custom attribute writer method checking allowed values (enum).
414
437
  # @param [Object] signature_type Object to be assigned
415
438
  def signature_type=(signature_type)
416
- validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp"])
439
+ validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp", "FormField", "Metadata"])
417
440
  if signature_type.to_i == 0
418
441
  unless validator.valid?(signature_type)
419
442
  raise ArgumentError, "invalid value for 'signature_type', must be one of #{validator.allowable_values}."
@@ -545,6 +568,7 @@ module GroupDocsSignatureCloud
545
568
  page == other.page &&
546
569
  all_pages == other.all_pages &&
547
570
  pages_setup == other.pages_setup &&
571
+ appearance == other.appearance &&
548
572
  left == other.left &&
549
573
  top == other.top &&
550
574
  width == other.width &&
@@ -565,7 +589,8 @@ module GroupDocsSignatureCloud
565
589
  border == other.border &&
566
590
  text_horizontal_alignment == other.text_horizontal_alignment &&
567
591
  text_vertical_alignment == other.text_vertical_alignment &&
568
- z_order == other.z_order
592
+ z_order == other.z_order &&
593
+ native == other.native
569
594
  end
570
595
 
571
596
  # @see the `==` method
@@ -577,7 +602,7 @@ module GroupDocsSignatureCloud
577
602
  # Calculates hash code according to all attributes.
578
603
  # @return [Fixnum] Hash code
579
604
  def hash
580
- [signature_type, page, all_pages, pages_setup, left, top, width, height, location_measure_type, size_measure_type, stretch, rotation_angle, horizontal_alignment, vertical_alignment, margin, margin_measure_type, text, font, fore_color, background_color, background_brush, border, text_horizontal_alignment, text_vertical_alignment, z_order].hash
605
+ [signature_type, page, all_pages, pages_setup, appearance, left, top, width, height, location_measure_type, size_measure_type, stretch, rotation_angle, horizontal_alignment, vertical_alignment, margin, margin_measure_type, text, font, fore_color, background_color, background_brush, border, text_horizontal_alignment, text_vertical_alignment, z_order, native].hash
581
606
  end
582
607
 
583
608
  # Downcases first letter.
@@ -651,6 +676,24 @@ module GroupDocsSignatureCloud
651
676
  ttype = type
652
677
  if value.is_a?(Hash) and !value[:signatureType].nil?
653
678
  ttype = value[:signatureType] + 'Signature'
679
+ if value[:signatureType] == 'FormField' and !value[:type].nil?
680
+ type = value[:type]
681
+ if type == 'Checkbox'
682
+ ttype = 'CheckboxFormFieldSignature'
683
+ end
684
+ if type == 'Text'
685
+ ttype = 'TextFormFieldSignature'
686
+ end
687
+ if type == 'Combobox'
688
+ ttype = 'ComboboxFormFieldSignature'
689
+ end
690
+ if type == 'DigitalSignature'
691
+ ttype = 'DigitalFormFieldSignature'
692
+ end
693
+ if type == 'Radio'
694
+ ttype = 'RadioButtonFormFieldSignature'
695
+ end
696
+ end
654
697
  end
655
698
  temp_model = GroupDocsSignatureCloud.const_get(ttype).new
656
699
  temp_model.build_from_hash(value)