groupdocs_signature_cloud 19.5 → 20.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/groupdocs_signature_cloud.rb +9 -1
- data/lib/groupdocs_signature_cloud/api/file_api.rb +7 -7
- data/lib/groupdocs_signature_cloud/api/folder_api.rb +7 -7
- data/lib/groupdocs_signature_cloud/api/info_api.rb +2 -2
- data/lib/groupdocs_signature_cloud/api/sign_api.rb +198 -4
- data/lib/groupdocs_signature_cloud/api/storage_api.rb +5 -5
- data/lib/groupdocs_signature_cloud/api_client.rb +1 -1
- data/lib/groupdocs_signature_cloud/api_error.rb +1 -1
- data/lib/groupdocs_signature_cloud/configuration.rb +1 -1
- data/lib/groupdocs_signature_cloud/models/barcode_signature.rb +140 -36
- data/lib/groupdocs_signature_cloud/models/barcode_type.rb +1 -1
- data/lib/groupdocs_signature_cloud/models/barcodes_result.rb +1 -1
- data/lib/groupdocs_signature_cloud/models/base_settings.rb +1 -1
- data/lib/groupdocs_signature_cloud/models/border_line.rb +22 -7
- data/lib/groupdocs_signature_cloud/models/brush.rb +1 -1
- data/lib/groupdocs_signature_cloud/models/color.rb +1 -1
- data/lib/groupdocs_signature_cloud/models/delete_options.rb +271 -0
- data/lib/groupdocs_signature_cloud/models/delete_result.rb +258 -0
- data/lib/groupdocs_signature_cloud/models/delete_settings.rb +231 -0
- data/lib/groupdocs_signature_cloud/models/digital_signature.rb +127 -64
- data/lib/groupdocs_signature_cloud/models/disc_usage.rb +1 -1
- data/lib/groupdocs_signature_cloud/models/error.rb +1 -1
- data/lib/groupdocs_signature_cloud/models/error_details.rb +1 -1
- data/lib/groupdocs_signature_cloud/models/file_info.rb +1 -1
- data/lib/groupdocs_signature_cloud/models/file_version.rb +1 -1
- data/lib/groupdocs_signature_cloud/models/file_versions.rb +1 -1
- data/lib/groupdocs_signature_cloud/models/files_list.rb +1 -1
- data/lib/groupdocs_signature_cloud/models/files_upload_result.rb +1 -1
- data/lib/groupdocs_signature_cloud/models/format.rb +1 -1
- data/lib/groupdocs_signature_cloud/models/formats_result.rb +1 -1
- data/lib/groupdocs_signature_cloud/models/image_signature.rb +411 -0
- data/lib/groupdocs_signature_cloud/models/info_result.rb +1 -1
- data/lib/groupdocs_signature_cloud/models/info_settings.rb +1 -1
- data/lib/groupdocs_signature_cloud/models/linear_gradient_brush.rb +1 -1
- data/lib/groupdocs_signature_cloud/models/object_exist.rb +1 -1
- data/lib/groupdocs_signature_cloud/models/options_base.rb +2 -33
- data/lib/groupdocs_signature_cloud/models/padding.rb +1 -1
- data/lib/groupdocs_signature_cloud/models/page_info.rb +1 -1
- data/lib/groupdocs_signature_cloud/models/pages_setup.rb +1 -1
- data/lib/groupdocs_signature_cloud/models/qr_code_signature.rb +140 -36
- data/lib/groupdocs_signature_cloud/models/qr_code_type.rb +1 -1
- data/lib/groupdocs_signature_cloud/models/qr_codes_result.rb +1 -1
- data/lib/groupdocs_signature_cloud/models/radial_gradient_brush.rb +1 -1
- data/lib/groupdocs_signature_cloud/models/save_options.rb +1 -1
- data/lib/groupdocs_signature_cloud/models/search_barcode_options.rb +2 -33
- data/lib/groupdocs_signature_cloud/models/search_digital_options.rb +2 -33
- data/lib/groupdocs_signature_cloud/models/search_options.rb +2 -33
- data/lib/groupdocs_signature_cloud/models/search_qr_code_options.rb +2 -33
- data/lib/groupdocs_signature_cloud/models/search_result.rb +1 -1
- data/lib/groupdocs_signature_cloud/models/search_settings.rb +1 -1
- data/lib/groupdocs_signature_cloud/models/sign_barcode_options.rb +33 -125
- data/lib/groupdocs_signature_cloud/models/sign_digital_options.rb +114 -59
- data/lib/groupdocs_signature_cloud/models/sign_image_options.rb +32 -53
- data/lib/groupdocs_signature_cloud/models/sign_options.rb +2 -33
- data/lib/groupdocs_signature_cloud/models/sign_qr_code_options.rb +42 -134
- data/lib/groupdocs_signature_cloud/models/sign_result.rb +29 -5
- data/lib/groupdocs_signature_cloud/models/sign_settings.rb +1 -1
- data/lib/groupdocs_signature_cloud/models/sign_stamp_options.rb +32 -53
- data/lib/groupdocs_signature_cloud/models/sign_text_options.rb +31 -108
- data/lib/groupdocs_signature_cloud/models/signature.rb +130 -36
- data/lib/groupdocs_signature_cloud/models/signature_font.rb +1 -1
- data/lib/groupdocs_signature_cloud/models/solid_brush.rb +1 -1
- data/lib/groupdocs_signature_cloud/models/stamp_line.rb +1 -1
- data/lib/groupdocs_signature_cloud/models/storage_exist.rb +1 -1
- data/lib/groupdocs_signature_cloud/models/storage_file.rb +1 -1
- data/lib/groupdocs_signature_cloud/models/text_signature.rb +406 -0
- data/lib/groupdocs_signature_cloud/models/texture_brush.rb +9 -9
- data/lib/groupdocs_signature_cloud/models/update_options.rb +356 -0
- data/lib/groupdocs_signature_cloud/models/update_result.rb +258 -0
- data/lib/groupdocs_signature_cloud/models/update_settings.rb +231 -0
- data/lib/groupdocs_signature_cloud/models/verify_barcode_options.rb +2 -33
- data/lib/groupdocs_signature_cloud/models/verify_digital_options.rb +8 -39
- data/lib/groupdocs_signature_cloud/models/verify_options.rb +2 -33
- data/lib/groupdocs_signature_cloud/models/verify_qr_code_options.rb +2 -33
- data/lib/groupdocs_signature_cloud/models/verify_result.rb +1 -1
- data/lib/groupdocs_signature_cloud/models/verify_settings.rb +1 -1
- data/lib/groupdocs_signature_cloud/models/verify_text_options.rb +2 -33
- data/lib/groupdocs_signature_cloud/version.rb +2 -2
- metadata +10 -2
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="sign_digital_options.rb">
|
4
|
-
# Copyright (c) 2003-
|
4
|
+
# Copyright (c) 2003-2020 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,9 +31,6 @@ module GroupDocsSignatureCloud
|
|
31
31
|
# Represents the Digital sign options
|
32
32
|
class SignDigitalOptions
|
33
33
|
|
34
|
-
# Specifies the type of document to process
|
35
|
-
attr_accessor :document_type
|
36
|
-
|
37
34
|
# Specifies the signature type of processing
|
38
35
|
attr_accessor :signature_type
|
39
36
|
|
@@ -47,7 +44,7 @@ module GroupDocsSignatureCloud
|
|
47
44
|
attr_accessor :pages_setup
|
48
45
|
|
49
46
|
# Gets or sets the signature image file name. This property is used only if ImageStream is not specified
|
50
|
-
attr_accessor :
|
47
|
+
attr_accessor :image_file_path
|
51
48
|
|
52
49
|
# Left X position of Signature on Document Page in Measure values (pixels or percent see MeasureType LocationMeasureType). (works if horizontal alignment is not specified). For Spreadsheet documents this property is mutually exclusive with Column property. If Left property is set ColumnNumber will be reset to 0
|
53
50
|
attr_accessor :left
|
@@ -82,14 +79,32 @@ module GroupDocsSignatureCloud
|
|
82
79
|
# Gets or sets the measure type (pixels or percent) for Margin
|
83
80
|
attr_accessor :margin_measure_type
|
84
81
|
|
85
|
-
# Gets or sets the
|
86
|
-
attr_accessor :
|
82
|
+
# Gets or sets the signature transparency(value from 0.0 (opaque) through 1.0 (clear)). Default value is 0 (opaque).
|
83
|
+
attr_accessor :transparency
|
84
|
+
|
85
|
+
# Gets or sets the signature border properties
|
86
|
+
attr_accessor :border
|
87
|
+
|
88
|
+
# Gets or sets the reason of signature.
|
89
|
+
attr_accessor :reason
|
90
|
+
|
91
|
+
# Gets or sets the signature contact.
|
92
|
+
attr_accessor :contact
|
93
|
+
|
94
|
+
# Gets or sets the signature location.
|
95
|
+
attr_accessor :location
|
96
|
+
|
97
|
+
# Gets or sets the visibility of signature.
|
98
|
+
attr_accessor :visible
|
87
99
|
|
88
100
|
# Gets or sets the password of digital certificate
|
89
101
|
attr_accessor :password
|
90
102
|
|
91
103
|
# Gets or sets the digital certificate file GUID
|
92
|
-
attr_accessor :
|
104
|
+
attr_accessor :certificate_file_path
|
105
|
+
|
106
|
+
# XAdES type GroupDocs.Signature.Options.DigitalSignOptions.XAdESType. Default value is None (XAdES is off). At this moment XAdES signature type is supported only for Spreadsheet documents.
|
107
|
+
attr_accessor :x_ad_es_type
|
93
108
|
class EnumAttributeValidator
|
94
109
|
attr_reader :datatype
|
95
110
|
attr_reader :allowable_values
|
@@ -115,12 +130,11 @@ module GroupDocsSignatureCloud
|
|
115
130
|
# Attribute mapping from ruby-style variable name to JSON key.
|
116
131
|
def self.attribute_map
|
117
132
|
{
|
118
|
-
:'document_type' => :'DocumentType',
|
119
133
|
:'signature_type' => :'SignatureType',
|
120
134
|
:'page' => :'Page',
|
121
135
|
:'all_pages' => :'AllPages',
|
122
136
|
:'pages_setup' => :'PagesSetup',
|
123
|
-
:'
|
137
|
+
:'image_file_path' => :'ImageFilePath',
|
124
138
|
:'left' => :'Left',
|
125
139
|
:'top' => :'Top',
|
126
140
|
:'width' => :'Width',
|
@@ -132,21 +146,26 @@ module GroupDocsSignatureCloud
|
|
132
146
|
:'vertical_alignment' => :'VerticalAlignment',
|
133
147
|
:'margin' => :'Margin',
|
134
148
|
:'margin_measure_type' => :'MarginMeasureType',
|
135
|
-
:'
|
149
|
+
:'transparency' => :'Transparency',
|
150
|
+
:'border' => :'Border',
|
151
|
+
:'reason' => :'Reason',
|
152
|
+
:'contact' => :'Contact',
|
153
|
+
:'location' => :'Location',
|
154
|
+
:'visible' => :'Visible',
|
136
155
|
:'password' => :'Password',
|
137
|
-
:'
|
156
|
+
:'certificate_file_path' => :'CertificateFilePath',
|
157
|
+
:'x_ad_es_type' => :'XAdESType'
|
138
158
|
}
|
139
159
|
end
|
140
160
|
|
141
161
|
# Attribute type mapping.
|
142
162
|
def self.swagger_types
|
143
163
|
{
|
144
|
-
:'document_type' => :'String',
|
145
164
|
:'signature_type' => :'String',
|
146
165
|
:'page' => :'Integer',
|
147
166
|
:'all_pages' => :'BOOLEAN',
|
148
167
|
:'pages_setup' => :'PagesSetup',
|
149
|
-
:'
|
168
|
+
:'image_file_path' => :'String',
|
150
169
|
:'left' => :'Integer',
|
151
170
|
:'top' => :'Integer',
|
152
171
|
:'width' => :'Integer',
|
@@ -158,9 +177,15 @@ module GroupDocsSignatureCloud
|
|
158
177
|
:'vertical_alignment' => :'String',
|
159
178
|
:'margin' => :'Padding',
|
160
179
|
:'margin_measure_type' => :'String',
|
161
|
-
:'
|
180
|
+
:'transparency' => :'Float',
|
181
|
+
:'border' => :'BorderLine',
|
182
|
+
:'reason' => :'String',
|
183
|
+
:'contact' => :'String',
|
184
|
+
:'location' => :'String',
|
185
|
+
:'visible' => :'BOOLEAN',
|
162
186
|
:'password' => :'String',
|
163
|
-
:'
|
187
|
+
:'certificate_file_path' => :'String',
|
188
|
+
:'x_ad_es_type' => :'String'
|
164
189
|
}
|
165
190
|
end
|
166
191
|
|
@@ -172,10 +197,6 @@ module GroupDocsSignatureCloud
|
|
172
197
|
# convert string to symbol for hash key
|
173
198
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
174
199
|
|
175
|
-
if attributes.key?(:'DocumentType')
|
176
|
-
self.document_type = attributes[:'DocumentType']
|
177
|
-
end
|
178
|
-
|
179
200
|
if attributes.key?(:'SignatureType')
|
180
201
|
self.signature_type = attributes[:'SignatureType']
|
181
202
|
end
|
@@ -192,8 +213,8 @@ module GroupDocsSignatureCloud
|
|
192
213
|
self.pages_setup = attributes[:'PagesSetup']
|
193
214
|
end
|
194
215
|
|
195
|
-
if attributes.key?(:'
|
196
|
-
self.
|
216
|
+
if attributes.key?(:'ImageFilePath')
|
217
|
+
self.image_file_path = attributes[:'ImageFilePath']
|
197
218
|
end
|
198
219
|
|
199
220
|
if attributes.key?(:'Left')
|
@@ -240,16 +261,40 @@ module GroupDocsSignatureCloud
|
|
240
261
|
self.margin_measure_type = attributes[:'MarginMeasureType']
|
241
262
|
end
|
242
263
|
|
243
|
-
if attributes.key?(:'
|
244
|
-
self.
|
264
|
+
if attributes.key?(:'Transparency')
|
265
|
+
self.transparency = attributes[:'Transparency']
|
266
|
+
end
|
267
|
+
|
268
|
+
if attributes.key?(:'Border')
|
269
|
+
self.border = attributes[:'Border']
|
270
|
+
end
|
271
|
+
|
272
|
+
if attributes.key?(:'Reason')
|
273
|
+
self.reason = attributes[:'Reason']
|
274
|
+
end
|
275
|
+
|
276
|
+
if attributes.key?(:'Contact')
|
277
|
+
self.contact = attributes[:'Contact']
|
278
|
+
end
|
279
|
+
|
280
|
+
if attributes.key?(:'Location')
|
281
|
+
self.location = attributes[:'Location']
|
282
|
+
end
|
283
|
+
|
284
|
+
if attributes.key?(:'Visible')
|
285
|
+
self.visible = attributes[:'Visible']
|
245
286
|
end
|
246
287
|
|
247
288
|
if attributes.key?(:'Password')
|
248
289
|
self.password = attributes[:'Password']
|
249
290
|
end
|
250
291
|
|
251
|
-
if attributes.key?(:'
|
252
|
-
self.
|
292
|
+
if attributes.key?(:'CertificateFilePath')
|
293
|
+
self.certificate_file_path = attributes[:'CertificateFilePath']
|
294
|
+
end
|
295
|
+
|
296
|
+
if attributes.key?(:'XAdESType')
|
297
|
+
self.x_ad_es_type = attributes[:'XAdESType']
|
253
298
|
end
|
254
299
|
|
255
300
|
end
|
@@ -258,10 +303,6 @@ module GroupDocsSignatureCloud
|
|
258
303
|
# @return Array for valid properies with the reasons
|
259
304
|
def list_invalid_properties
|
260
305
|
invalid_properties = []
|
261
|
-
if @document_type.nil?
|
262
|
-
invalid_properties.push("invalid value for 'document_type', document_type cannot be nil.")
|
263
|
-
end
|
264
|
-
|
265
306
|
if @signature_type.nil?
|
266
307
|
invalid_properties.push("invalid value for 'signature_type', signature_type cannot be nil.")
|
267
308
|
end
|
@@ -310,8 +351,16 @@ module GroupDocsSignatureCloud
|
|
310
351
|
invalid_properties.push("invalid value for 'margin_measure_type', margin_measure_type cannot be nil.")
|
311
352
|
end
|
312
353
|
|
313
|
-
if @
|
314
|
-
invalid_properties.push("invalid value for '
|
354
|
+
if @transparency.nil?
|
355
|
+
invalid_properties.push("invalid value for 'transparency', transparency cannot be nil.")
|
356
|
+
end
|
357
|
+
|
358
|
+
if @visible.nil?
|
359
|
+
invalid_properties.push("invalid value for 'visible', visible cannot be nil.")
|
360
|
+
end
|
361
|
+
|
362
|
+
if @x_ad_es_type.nil?
|
363
|
+
invalid_properties.push("invalid value for 'x_ad_es_type', x_ad_es_type cannot be nil.")
|
315
364
|
end
|
316
365
|
|
317
366
|
return invalid_properties
|
@@ -320,9 +369,6 @@ module GroupDocsSignatureCloud
|
|
320
369
|
# Check to see if the all the properties in the model are valid
|
321
370
|
# @return true if the model is valid
|
322
371
|
def valid?
|
323
|
-
return false if @document_type.nil?
|
324
|
-
document_type_validator = EnumAttributeValidator.new('String', ["Image", "Pdf", "Presentation", "Spreadsheet", "WordProcessing"])
|
325
|
-
return false unless document_type_validator.valid?(@document_type)
|
326
372
|
return false if @signature_type.nil?
|
327
373
|
signature_type_validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp"])
|
328
374
|
return false unless signature_type_validator.valid?(@signature_type)
|
@@ -339,32 +385,22 @@ module GroupDocsSignatureCloud
|
|
339
385
|
return false unless size_measure_type_validator.valid?(@size_measure_type)
|
340
386
|
return false if @rotation_angle.nil?
|
341
387
|
return false if @horizontal_alignment.nil?
|
342
|
-
horizontal_alignment_validator = EnumAttributeValidator.new('String', ["
|
388
|
+
horizontal_alignment_validator = EnumAttributeValidator.new('String', ["None", "Left", "Center", "Right"])
|
343
389
|
return false unless horizontal_alignment_validator.valid?(@horizontal_alignment)
|
344
390
|
return false if @vertical_alignment.nil?
|
345
|
-
vertical_alignment_validator = EnumAttributeValidator.new('String', ["
|
391
|
+
vertical_alignment_validator = EnumAttributeValidator.new('String', ["None", "Top", "Center", "Bottom"])
|
346
392
|
return false unless vertical_alignment_validator.valid?(@vertical_alignment)
|
347
393
|
return false if @margin_measure_type.nil?
|
348
394
|
margin_measure_type_validator = EnumAttributeValidator.new('String', ["Pixels", "Percents", "Millimeters"])
|
349
395
|
return false unless margin_measure_type_validator.valid?(@margin_measure_type)
|
350
|
-
return false if @
|
396
|
+
return false if @transparency.nil?
|
397
|
+
return false if @visible.nil?
|
398
|
+
return false if @x_ad_es_type.nil?
|
399
|
+
x_ad_es_type_validator = EnumAttributeValidator.new('String', ["None", "XAdES"])
|
400
|
+
return false unless x_ad_es_type_validator.valid?(@x_ad_es_type)
|
351
401
|
return true
|
352
402
|
end
|
353
403
|
|
354
|
-
# Custom attribute writer method checking allowed values (enum).
|
355
|
-
# @param [Object] document_type Object to be assigned
|
356
|
-
def document_type=(document_type)
|
357
|
-
validator = EnumAttributeValidator.new('String', ["Image", "Pdf", "Presentation", "Spreadsheet", "WordProcessing"])
|
358
|
-
if document_type.to_i == 0
|
359
|
-
unless validator.valid?(document_type)
|
360
|
-
raise ArgumentError, "invalid value for 'document_type', must be one of #{validator.allowable_values}."
|
361
|
-
end
|
362
|
-
@document_type = document_type
|
363
|
-
else
|
364
|
-
@document_type = validator.allowable_values[document_type.to_i]
|
365
|
-
end
|
366
|
-
end
|
367
|
-
|
368
404
|
# Custom attribute writer method checking allowed values (enum).
|
369
405
|
# @param [Object] signature_type Object to be assigned
|
370
406
|
def signature_type=(signature_type)
|
@@ -410,7 +446,7 @@ module GroupDocsSignatureCloud
|
|
410
446
|
# Custom attribute writer method checking allowed values (enum).
|
411
447
|
# @param [Object] horizontal_alignment Object to be assigned
|
412
448
|
def horizontal_alignment=(horizontal_alignment)
|
413
|
-
validator = EnumAttributeValidator.new('String', ["
|
449
|
+
validator = EnumAttributeValidator.new('String', ["None", "Left", "Center", "Right"])
|
414
450
|
if horizontal_alignment.to_i == 0
|
415
451
|
unless validator.valid?(horizontal_alignment)
|
416
452
|
raise ArgumentError, "invalid value for 'horizontal_alignment', must be one of #{validator.allowable_values}."
|
@@ -424,7 +460,7 @@ module GroupDocsSignatureCloud
|
|
424
460
|
# Custom attribute writer method checking allowed values (enum).
|
425
461
|
# @param [Object] vertical_alignment Object to be assigned
|
426
462
|
def vertical_alignment=(vertical_alignment)
|
427
|
-
validator = EnumAttributeValidator.new('String', ["
|
463
|
+
validator = EnumAttributeValidator.new('String', ["None", "Top", "Center", "Bottom"])
|
428
464
|
if vertical_alignment.to_i == 0
|
429
465
|
unless validator.valid?(vertical_alignment)
|
430
466
|
raise ArgumentError, "invalid value for 'vertical_alignment', must be one of #{validator.allowable_values}."
|
@@ -449,17 +485,30 @@ module GroupDocsSignatureCloud
|
|
449
485
|
end
|
450
486
|
end
|
451
487
|
|
488
|
+
# Custom attribute writer method checking allowed values (enum).
|
489
|
+
# @param [Object] x_ad_es_type Object to be assigned
|
490
|
+
def x_ad_es_type=(x_ad_es_type)
|
491
|
+
validator = EnumAttributeValidator.new('String', ["None", "XAdES"])
|
492
|
+
if x_ad_es_type.to_i == 0
|
493
|
+
unless validator.valid?(x_ad_es_type)
|
494
|
+
raise ArgumentError, "invalid value for 'x_ad_es_type', must be one of #{validator.allowable_values}."
|
495
|
+
end
|
496
|
+
@x_ad_es_type = x_ad_es_type
|
497
|
+
else
|
498
|
+
@x_ad_es_type = validator.allowable_values[x_ad_es_type.to_i]
|
499
|
+
end
|
500
|
+
end
|
501
|
+
|
452
502
|
# Checks equality by comparing each attribute.
|
453
503
|
# @param [Object] Object to be compared
|
454
504
|
def ==(other)
|
455
505
|
return true if self.equal?(other)
|
456
506
|
self.class == other.class &&
|
457
|
-
document_type == other.document_type &&
|
458
507
|
signature_type == other.signature_type &&
|
459
508
|
page == other.page &&
|
460
509
|
all_pages == other.all_pages &&
|
461
510
|
pages_setup == other.pages_setup &&
|
462
|
-
|
511
|
+
image_file_path == other.image_file_path &&
|
463
512
|
left == other.left &&
|
464
513
|
top == other.top &&
|
465
514
|
width == other.width &&
|
@@ -471,9 +520,15 @@ module GroupDocsSignatureCloud
|
|
471
520
|
vertical_alignment == other.vertical_alignment &&
|
472
521
|
margin == other.margin &&
|
473
522
|
margin_measure_type == other.margin_measure_type &&
|
474
|
-
|
523
|
+
transparency == other.transparency &&
|
524
|
+
border == other.border &&
|
525
|
+
reason == other.reason &&
|
526
|
+
contact == other.contact &&
|
527
|
+
location == other.location &&
|
528
|
+
visible == other.visible &&
|
475
529
|
password == other.password &&
|
476
|
-
|
530
|
+
certificate_file_path == other.certificate_file_path &&
|
531
|
+
x_ad_es_type == other.x_ad_es_type
|
477
532
|
end
|
478
533
|
|
479
534
|
# @see the `==` method
|
@@ -485,7 +540,7 @@ module GroupDocsSignatureCloud
|
|
485
540
|
# Calculates hash code according to all attributes.
|
486
541
|
# @return [Fixnum] Hash code
|
487
542
|
def hash
|
488
|
-
[
|
543
|
+
[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, reason, contact, location, visible, password, certificate_file_path, x_ad_es_type].hash
|
489
544
|
end
|
490
545
|
|
491
546
|
# Downcases first letter.
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="sign_image_options.rb">
|
4
|
-
# Copyright (c) 2003-
|
4
|
+
# Copyright (c) 2003-2020 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,9 +31,6 @@ module GroupDocsSignatureCloud
|
|
31
31
|
# Represents the Image sign options
|
32
32
|
class SignImageOptions
|
33
33
|
|
34
|
-
# Specifies the type of document to process
|
35
|
-
attr_accessor :document_type
|
36
|
-
|
37
34
|
# Specifies the signature type of processing
|
38
35
|
attr_accessor :signature_type
|
39
36
|
|
@@ -47,7 +44,7 @@ module GroupDocsSignatureCloud
|
|
47
44
|
attr_accessor :pages_setup
|
48
45
|
|
49
46
|
# Gets or sets the signature image file name. This property is used only if ImageStream is not specified
|
50
|
-
attr_accessor :
|
47
|
+
attr_accessor :image_file_path
|
51
48
|
|
52
49
|
# Left X position of Signature on Document Page in Measure values (pixels or percent see MeasureType LocationMeasureType). (works if horizontal alignment is not specified). For Spreadsheet documents this property is mutually exclusive with Column property. If Left property is set ColumnNumber will be reset to 0
|
53
50
|
attr_accessor :left
|
@@ -82,8 +79,11 @@ module GroupDocsSignatureCloud
|
|
82
79
|
# Gets or sets the measure type (pixels or percent) for Margin
|
83
80
|
attr_accessor :margin_measure_type
|
84
81
|
|
85
|
-
# Gets or sets the
|
86
|
-
attr_accessor :
|
82
|
+
# Gets or sets the signature transparency(value from 0.0 (opaque) through 1.0 (clear)). Default value is 0 (opaque).
|
83
|
+
attr_accessor :transparency
|
84
|
+
|
85
|
+
# Gets or sets the signature border properties
|
86
|
+
attr_accessor :border
|
87
87
|
class EnumAttributeValidator
|
88
88
|
attr_reader :datatype
|
89
89
|
attr_reader :allowable_values
|
@@ -109,12 +109,11 @@ module GroupDocsSignatureCloud
|
|
109
109
|
# Attribute mapping from ruby-style variable name to JSON key.
|
110
110
|
def self.attribute_map
|
111
111
|
{
|
112
|
-
:'document_type' => :'DocumentType',
|
113
112
|
:'signature_type' => :'SignatureType',
|
114
113
|
:'page' => :'Page',
|
115
114
|
:'all_pages' => :'AllPages',
|
116
115
|
:'pages_setup' => :'PagesSetup',
|
117
|
-
:'
|
116
|
+
:'image_file_path' => :'ImageFilePath',
|
118
117
|
:'left' => :'Left',
|
119
118
|
:'top' => :'Top',
|
120
119
|
:'width' => :'Width',
|
@@ -126,19 +125,19 @@ module GroupDocsSignatureCloud
|
|
126
125
|
:'vertical_alignment' => :'VerticalAlignment',
|
127
126
|
:'margin' => :'Margin',
|
128
127
|
:'margin_measure_type' => :'MarginMeasureType',
|
129
|
-
:'
|
128
|
+
:'transparency' => :'Transparency',
|
129
|
+
:'border' => :'Border'
|
130
130
|
}
|
131
131
|
end
|
132
132
|
|
133
133
|
# Attribute type mapping.
|
134
134
|
def self.swagger_types
|
135
135
|
{
|
136
|
-
:'document_type' => :'String',
|
137
136
|
:'signature_type' => :'String',
|
138
137
|
:'page' => :'Integer',
|
139
138
|
:'all_pages' => :'BOOLEAN',
|
140
139
|
:'pages_setup' => :'PagesSetup',
|
141
|
-
:'
|
140
|
+
:'image_file_path' => :'String',
|
142
141
|
:'left' => :'Integer',
|
143
142
|
:'top' => :'Integer',
|
144
143
|
:'width' => :'Integer',
|
@@ -150,7 +149,8 @@ module GroupDocsSignatureCloud
|
|
150
149
|
:'vertical_alignment' => :'String',
|
151
150
|
:'margin' => :'Padding',
|
152
151
|
:'margin_measure_type' => :'String',
|
153
|
-
:'
|
152
|
+
:'transparency' => :'Float',
|
153
|
+
:'border' => :'BorderLine'
|
154
154
|
}
|
155
155
|
end
|
156
156
|
|
@@ -162,10 +162,6 @@ module GroupDocsSignatureCloud
|
|
162
162
|
# convert string to symbol for hash key
|
163
163
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
164
164
|
|
165
|
-
if attributes.key?(:'DocumentType')
|
166
|
-
self.document_type = attributes[:'DocumentType']
|
167
|
-
end
|
168
|
-
|
169
165
|
if attributes.key?(:'SignatureType')
|
170
166
|
self.signature_type = attributes[:'SignatureType']
|
171
167
|
end
|
@@ -182,8 +178,8 @@ module GroupDocsSignatureCloud
|
|
182
178
|
self.pages_setup = attributes[:'PagesSetup']
|
183
179
|
end
|
184
180
|
|
185
|
-
if attributes.key?(:'
|
186
|
-
self.
|
181
|
+
if attributes.key?(:'ImageFilePath')
|
182
|
+
self.image_file_path = attributes[:'ImageFilePath']
|
187
183
|
end
|
188
184
|
|
189
185
|
if attributes.key?(:'Left')
|
@@ -230,8 +226,12 @@ module GroupDocsSignatureCloud
|
|
230
226
|
self.margin_measure_type = attributes[:'MarginMeasureType']
|
231
227
|
end
|
232
228
|
|
233
|
-
if attributes.key?(:'
|
234
|
-
self.
|
229
|
+
if attributes.key?(:'Transparency')
|
230
|
+
self.transparency = attributes[:'Transparency']
|
231
|
+
end
|
232
|
+
|
233
|
+
if attributes.key?(:'Border')
|
234
|
+
self.border = attributes[:'Border']
|
235
235
|
end
|
236
236
|
|
237
237
|
end
|
@@ -240,10 +240,6 @@ module GroupDocsSignatureCloud
|
|
240
240
|
# @return Array for valid properies with the reasons
|
241
241
|
def list_invalid_properties
|
242
242
|
invalid_properties = []
|
243
|
-
if @document_type.nil?
|
244
|
-
invalid_properties.push("invalid value for 'document_type', document_type cannot be nil.")
|
245
|
-
end
|
246
|
-
|
247
243
|
if @signature_type.nil?
|
248
244
|
invalid_properties.push("invalid value for 'signature_type', signature_type cannot be nil.")
|
249
245
|
end
|
@@ -292,8 +288,8 @@ module GroupDocsSignatureCloud
|
|
292
288
|
invalid_properties.push("invalid value for 'margin_measure_type', margin_measure_type cannot be nil.")
|
293
289
|
end
|
294
290
|
|
295
|
-
if @
|
296
|
-
invalid_properties.push("invalid value for '
|
291
|
+
if @transparency.nil?
|
292
|
+
invalid_properties.push("invalid value for 'transparency', transparency cannot be nil.")
|
297
293
|
end
|
298
294
|
|
299
295
|
return invalid_properties
|
@@ -302,9 +298,6 @@ module GroupDocsSignatureCloud
|
|
302
298
|
# Check to see if the all the properties in the model are valid
|
303
299
|
# @return true if the model is valid
|
304
300
|
def valid?
|
305
|
-
return false if @document_type.nil?
|
306
|
-
document_type_validator = EnumAttributeValidator.new('String', ["Image", "Pdf", "Presentation", "Spreadsheet", "WordProcessing"])
|
307
|
-
return false unless document_type_validator.valid?(@document_type)
|
308
301
|
return false if @signature_type.nil?
|
309
302
|
signature_type_validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp"])
|
310
303
|
return false unless signature_type_validator.valid?(@signature_type)
|
@@ -321,32 +314,18 @@ module GroupDocsSignatureCloud
|
|
321
314
|
return false unless size_measure_type_validator.valid?(@size_measure_type)
|
322
315
|
return false if @rotation_angle.nil?
|
323
316
|
return false if @horizontal_alignment.nil?
|
324
|
-
horizontal_alignment_validator = EnumAttributeValidator.new('String', ["
|
317
|
+
horizontal_alignment_validator = EnumAttributeValidator.new('String', ["None", "Left", "Center", "Right"])
|
325
318
|
return false unless horizontal_alignment_validator.valid?(@horizontal_alignment)
|
326
319
|
return false if @vertical_alignment.nil?
|
327
|
-
vertical_alignment_validator = EnumAttributeValidator.new('String', ["
|
320
|
+
vertical_alignment_validator = EnumAttributeValidator.new('String', ["None", "Top", "Center", "Bottom"])
|
328
321
|
return false unless vertical_alignment_validator.valid?(@vertical_alignment)
|
329
322
|
return false if @margin_measure_type.nil?
|
330
323
|
margin_measure_type_validator = EnumAttributeValidator.new('String', ["Pixels", "Percents", "Millimeters"])
|
331
324
|
return false unless margin_measure_type_validator.valid?(@margin_measure_type)
|
332
|
-
return false if @
|
325
|
+
return false if @transparency.nil?
|
333
326
|
return true
|
334
327
|
end
|
335
328
|
|
336
|
-
# Custom attribute writer method checking allowed values (enum).
|
337
|
-
# @param [Object] document_type Object to be assigned
|
338
|
-
def document_type=(document_type)
|
339
|
-
validator = EnumAttributeValidator.new('String', ["Image", "Pdf", "Presentation", "Spreadsheet", "WordProcessing"])
|
340
|
-
if document_type.to_i == 0
|
341
|
-
unless validator.valid?(document_type)
|
342
|
-
raise ArgumentError, "invalid value for 'document_type', must be one of #{validator.allowable_values}."
|
343
|
-
end
|
344
|
-
@document_type = document_type
|
345
|
-
else
|
346
|
-
@document_type = validator.allowable_values[document_type.to_i]
|
347
|
-
end
|
348
|
-
end
|
349
|
-
|
350
329
|
# Custom attribute writer method checking allowed values (enum).
|
351
330
|
# @param [Object] signature_type Object to be assigned
|
352
331
|
def signature_type=(signature_type)
|
@@ -392,7 +371,7 @@ module GroupDocsSignatureCloud
|
|
392
371
|
# Custom attribute writer method checking allowed values (enum).
|
393
372
|
# @param [Object] horizontal_alignment Object to be assigned
|
394
373
|
def horizontal_alignment=(horizontal_alignment)
|
395
|
-
validator = EnumAttributeValidator.new('String', ["
|
374
|
+
validator = EnumAttributeValidator.new('String', ["None", "Left", "Center", "Right"])
|
396
375
|
if horizontal_alignment.to_i == 0
|
397
376
|
unless validator.valid?(horizontal_alignment)
|
398
377
|
raise ArgumentError, "invalid value for 'horizontal_alignment', must be one of #{validator.allowable_values}."
|
@@ -406,7 +385,7 @@ module GroupDocsSignatureCloud
|
|
406
385
|
# Custom attribute writer method checking allowed values (enum).
|
407
386
|
# @param [Object] vertical_alignment Object to be assigned
|
408
387
|
def vertical_alignment=(vertical_alignment)
|
409
|
-
validator = EnumAttributeValidator.new('String', ["
|
388
|
+
validator = EnumAttributeValidator.new('String', ["None", "Top", "Center", "Bottom"])
|
410
389
|
if vertical_alignment.to_i == 0
|
411
390
|
unless validator.valid?(vertical_alignment)
|
412
391
|
raise ArgumentError, "invalid value for 'vertical_alignment', must be one of #{validator.allowable_values}."
|
@@ -436,12 +415,11 @@ module GroupDocsSignatureCloud
|
|
436
415
|
def ==(other)
|
437
416
|
return true if self.equal?(other)
|
438
417
|
self.class == other.class &&
|
439
|
-
document_type == other.document_type &&
|
440
418
|
signature_type == other.signature_type &&
|
441
419
|
page == other.page &&
|
442
420
|
all_pages == other.all_pages &&
|
443
421
|
pages_setup == other.pages_setup &&
|
444
|
-
|
422
|
+
image_file_path == other.image_file_path &&
|
445
423
|
left == other.left &&
|
446
424
|
top == other.top &&
|
447
425
|
width == other.width &&
|
@@ -453,7 +431,8 @@ module GroupDocsSignatureCloud
|
|
453
431
|
vertical_alignment == other.vertical_alignment &&
|
454
432
|
margin == other.margin &&
|
455
433
|
margin_measure_type == other.margin_measure_type &&
|
456
|
-
|
434
|
+
transparency == other.transparency &&
|
435
|
+
border == other.border
|
457
436
|
end
|
458
437
|
|
459
438
|
# @see the `==` method
|
@@ -465,7 +444,7 @@ module GroupDocsSignatureCloud
|
|
465
444
|
# Calculates hash code according to all attributes.
|
466
445
|
# @return [Fixnum] Hash code
|
467
446
|
def hash
|
468
|
-
[
|
447
|
+
[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].hash
|
469
448
|
end
|
470
449
|
|
471
450
|
# Downcases first letter.
|