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_result.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
|
@@ -40,12 +40,20 @@ module GroupDocsSignatureCloud
|
|
40
40
|
# ULR to retrieve signed file
|
41
41
|
attr_accessor :download_url
|
42
42
|
|
43
|
+
# List of newly created signatures
|
44
|
+
attr_accessor :succeeded
|
45
|
+
|
46
|
+
# List of signatures that were failed to create
|
47
|
+
attr_accessor :failed
|
48
|
+
|
43
49
|
# Attribute mapping from ruby-style variable name to JSON key.
|
44
50
|
def self.attribute_map
|
45
51
|
{
|
46
52
|
:'file_info' => :'FileInfo',
|
47
53
|
:'size' => :'Size',
|
48
|
-
:'download_url' => :'DownloadUrl'
|
54
|
+
:'download_url' => :'DownloadUrl',
|
55
|
+
:'succeeded' => :'Succeeded',
|
56
|
+
:'failed' => :'Failed'
|
49
57
|
}
|
50
58
|
end
|
51
59
|
|
@@ -54,7 +62,9 @@ module GroupDocsSignatureCloud
|
|
54
62
|
{
|
55
63
|
:'file_info' => :'FileInfo',
|
56
64
|
:'size' => :'Integer',
|
57
|
-
:'download_url' => :'String'
|
65
|
+
:'download_url' => :'String',
|
66
|
+
:'succeeded' => :'Array<Signature>',
|
67
|
+
:'failed' => :'Array<Signature>'
|
58
68
|
}
|
59
69
|
end
|
60
70
|
|
@@ -78,6 +88,18 @@ module GroupDocsSignatureCloud
|
|
78
88
|
self.download_url = attributes[:'DownloadUrl']
|
79
89
|
end
|
80
90
|
|
91
|
+
if attributes.key?(:'Succeeded')
|
92
|
+
if (value = attributes[:'Succeeded']).is_a?(Array)
|
93
|
+
self.succeeded = value
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
if attributes.key?(:'Failed')
|
98
|
+
if (value = attributes[:'Failed']).is_a?(Array)
|
99
|
+
self.failed = value
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
81
103
|
end
|
82
104
|
|
83
105
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -105,7 +127,9 @@ module GroupDocsSignatureCloud
|
|
105
127
|
self.class == other.class &&
|
106
128
|
file_info == other.file_info &&
|
107
129
|
size == other.size &&
|
108
|
-
download_url == other.download_url
|
130
|
+
download_url == other.download_url &&
|
131
|
+
succeeded == other.succeeded &&
|
132
|
+
failed == other.failed
|
109
133
|
end
|
110
134
|
|
111
135
|
# @see the `==` method
|
@@ -117,7 +141,7 @@ module GroupDocsSignatureCloud
|
|
117
141
|
# Calculates hash code according to all attributes.
|
118
142
|
# @return [Fixnum] Hash code
|
119
143
|
def hash
|
120
|
-
[file_info, size, download_url].hash
|
144
|
+
[file_info, size, download_url, succeeded, failed].hash
|
121
145
|
end
|
122
146
|
|
123
147
|
# Downcases first letter.
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="sign_settings.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
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="sign_stamp_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 Stamp signature options
|
32
32
|
class SignStampOptions
|
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
|
|
88
88
|
# List of Outer Lines rendered as concentric circles
|
89
89
|
attr_accessor :outer_lines
|
@@ -127,12 +127,11 @@ module GroupDocsSignatureCloud
|
|
127
127
|
# Attribute mapping from ruby-style variable name to JSON key.
|
128
128
|
def self.attribute_map
|
129
129
|
{
|
130
|
-
:'document_type' => :'DocumentType',
|
131
130
|
:'signature_type' => :'SignatureType',
|
132
131
|
:'page' => :'Page',
|
133
132
|
:'all_pages' => :'AllPages',
|
134
133
|
:'pages_setup' => :'PagesSetup',
|
135
|
-
:'
|
134
|
+
:'image_file_path' => :'ImageFilePath',
|
136
135
|
:'left' => :'Left',
|
137
136
|
:'top' => :'Top',
|
138
137
|
:'width' => :'Width',
|
@@ -144,7 +143,8 @@ module GroupDocsSignatureCloud
|
|
144
143
|
:'vertical_alignment' => :'VerticalAlignment',
|
145
144
|
:'margin' => :'Margin',
|
146
145
|
:'margin_measure_type' => :'MarginMeasureType',
|
147
|
-
:'
|
146
|
+
:'transparency' => :'Transparency',
|
147
|
+
:'border' => :'Border',
|
148
148
|
:'outer_lines' => :'OuterLines',
|
149
149
|
:'inner_lines' => :'InnerLines',
|
150
150
|
:'background_color' => :'BackgroundColor',
|
@@ -157,12 +157,11 @@ module GroupDocsSignatureCloud
|
|
157
157
|
# Attribute type mapping.
|
158
158
|
def self.swagger_types
|
159
159
|
{
|
160
|
-
:'document_type' => :'String',
|
161
160
|
:'signature_type' => :'String',
|
162
161
|
:'page' => :'Integer',
|
163
162
|
:'all_pages' => :'BOOLEAN',
|
164
163
|
:'pages_setup' => :'PagesSetup',
|
165
|
-
:'
|
164
|
+
:'image_file_path' => :'String',
|
166
165
|
:'left' => :'Integer',
|
167
166
|
:'top' => :'Integer',
|
168
167
|
:'width' => :'Integer',
|
@@ -174,7 +173,8 @@ module GroupDocsSignatureCloud
|
|
174
173
|
:'vertical_alignment' => :'String',
|
175
174
|
:'margin' => :'Padding',
|
176
175
|
:'margin_measure_type' => :'String',
|
177
|
-
:'
|
176
|
+
:'transparency' => :'Float',
|
177
|
+
:'border' => :'BorderLine',
|
178
178
|
:'outer_lines' => :'Array<StampLine>',
|
179
179
|
:'inner_lines' => :'Array<StampLine>',
|
180
180
|
:'background_color' => :'Color',
|
@@ -192,10 +192,6 @@ module GroupDocsSignatureCloud
|
|
192
192
|
# convert string to symbol for hash key
|
193
193
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
194
194
|
|
195
|
-
if attributes.key?(:'DocumentType')
|
196
|
-
self.document_type = attributes[:'DocumentType']
|
197
|
-
end
|
198
|
-
|
199
195
|
if attributes.key?(:'SignatureType')
|
200
196
|
self.signature_type = attributes[:'SignatureType']
|
201
197
|
end
|
@@ -212,8 +208,8 @@ module GroupDocsSignatureCloud
|
|
212
208
|
self.pages_setup = attributes[:'PagesSetup']
|
213
209
|
end
|
214
210
|
|
215
|
-
if attributes.key?(:'
|
216
|
-
self.
|
211
|
+
if attributes.key?(:'ImageFilePath')
|
212
|
+
self.image_file_path = attributes[:'ImageFilePath']
|
217
213
|
end
|
218
214
|
|
219
215
|
if attributes.key?(:'Left')
|
@@ -260,8 +256,12 @@ module GroupDocsSignatureCloud
|
|
260
256
|
self.margin_measure_type = attributes[:'MarginMeasureType']
|
261
257
|
end
|
262
258
|
|
263
|
-
if attributes.key?(:'
|
264
|
-
self.
|
259
|
+
if attributes.key?(:'Transparency')
|
260
|
+
self.transparency = attributes[:'Transparency']
|
261
|
+
end
|
262
|
+
|
263
|
+
if attributes.key?(:'Border')
|
264
|
+
self.border = attributes[:'Border']
|
265
265
|
end
|
266
266
|
|
267
267
|
if attributes.key?(:'OuterLines')
|
@@ -298,10 +298,6 @@ module GroupDocsSignatureCloud
|
|
298
298
|
# @return Array for valid properies with the reasons
|
299
299
|
def list_invalid_properties
|
300
300
|
invalid_properties = []
|
301
|
-
if @document_type.nil?
|
302
|
-
invalid_properties.push("invalid value for 'document_type', document_type cannot be nil.")
|
303
|
-
end
|
304
|
-
|
305
301
|
if @signature_type.nil?
|
306
302
|
invalid_properties.push("invalid value for 'signature_type', signature_type cannot be nil.")
|
307
303
|
end
|
@@ -350,8 +346,8 @@ module GroupDocsSignatureCloud
|
|
350
346
|
invalid_properties.push("invalid value for 'margin_measure_type', margin_measure_type cannot be nil.")
|
351
347
|
end
|
352
348
|
|
353
|
-
if @
|
354
|
-
invalid_properties.push("invalid value for '
|
349
|
+
if @transparency.nil?
|
350
|
+
invalid_properties.push("invalid value for 'transparency', transparency cannot be nil.")
|
355
351
|
end
|
356
352
|
|
357
353
|
if @background_color_crop_type.nil?
|
@@ -368,9 +364,6 @@ module GroupDocsSignatureCloud
|
|
368
364
|
# Check to see if the all the properties in the model are valid
|
369
365
|
# @return true if the model is valid
|
370
366
|
def valid?
|
371
|
-
return false if @document_type.nil?
|
372
|
-
document_type_validator = EnumAttributeValidator.new('String', ["Image", "Pdf", "Presentation", "Spreadsheet", "WordProcessing"])
|
373
|
-
return false unless document_type_validator.valid?(@document_type)
|
374
367
|
return false if @signature_type.nil?
|
375
368
|
signature_type_validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp"])
|
376
369
|
return false unless signature_type_validator.valid?(@signature_type)
|
@@ -387,15 +380,15 @@ module GroupDocsSignatureCloud
|
|
387
380
|
return false unless size_measure_type_validator.valid?(@size_measure_type)
|
388
381
|
return false if @rotation_angle.nil?
|
389
382
|
return false if @horizontal_alignment.nil?
|
390
|
-
horizontal_alignment_validator = EnumAttributeValidator.new('String', ["
|
383
|
+
horizontal_alignment_validator = EnumAttributeValidator.new('String', ["None", "Left", "Center", "Right"])
|
391
384
|
return false unless horizontal_alignment_validator.valid?(@horizontal_alignment)
|
392
385
|
return false if @vertical_alignment.nil?
|
393
|
-
vertical_alignment_validator = EnumAttributeValidator.new('String', ["
|
386
|
+
vertical_alignment_validator = EnumAttributeValidator.new('String', ["None", "Top", "Center", "Bottom"])
|
394
387
|
return false unless vertical_alignment_validator.valid?(@vertical_alignment)
|
395
388
|
return false if @margin_measure_type.nil?
|
396
389
|
margin_measure_type_validator = EnumAttributeValidator.new('String', ["Pixels", "Percents", "Millimeters"])
|
397
390
|
return false unless margin_measure_type_validator.valid?(@margin_measure_type)
|
398
|
-
return false if @
|
391
|
+
return false if @transparency.nil?
|
399
392
|
return false if @background_color_crop_type.nil?
|
400
393
|
background_color_crop_type_validator = EnumAttributeValidator.new('String', ["None", "OuterArea", "MiddleArea", "InnerArea"])
|
401
394
|
return false unless background_color_crop_type_validator.valid?(@background_color_crop_type)
|
@@ -405,20 +398,6 @@ module GroupDocsSignatureCloud
|
|
405
398
|
return true
|
406
399
|
end
|
407
400
|
|
408
|
-
# Custom attribute writer method checking allowed values (enum).
|
409
|
-
# @param [Object] document_type Object to be assigned
|
410
|
-
def document_type=(document_type)
|
411
|
-
validator = EnumAttributeValidator.new('String', ["Image", "Pdf", "Presentation", "Spreadsheet", "WordProcessing"])
|
412
|
-
if document_type.to_i == 0
|
413
|
-
unless validator.valid?(document_type)
|
414
|
-
raise ArgumentError, "invalid value for 'document_type', must be one of #{validator.allowable_values}."
|
415
|
-
end
|
416
|
-
@document_type = document_type
|
417
|
-
else
|
418
|
-
@document_type = validator.allowable_values[document_type.to_i]
|
419
|
-
end
|
420
|
-
end
|
421
|
-
|
422
401
|
# Custom attribute writer method checking allowed values (enum).
|
423
402
|
# @param [Object] signature_type Object to be assigned
|
424
403
|
def signature_type=(signature_type)
|
@@ -464,7 +443,7 @@ module GroupDocsSignatureCloud
|
|
464
443
|
# Custom attribute writer method checking allowed values (enum).
|
465
444
|
# @param [Object] horizontal_alignment Object to be assigned
|
466
445
|
def horizontal_alignment=(horizontal_alignment)
|
467
|
-
validator = EnumAttributeValidator.new('String', ["
|
446
|
+
validator = EnumAttributeValidator.new('String', ["None", "Left", "Center", "Right"])
|
468
447
|
if horizontal_alignment.to_i == 0
|
469
448
|
unless validator.valid?(horizontal_alignment)
|
470
449
|
raise ArgumentError, "invalid value for 'horizontal_alignment', must be one of #{validator.allowable_values}."
|
@@ -478,7 +457,7 @@ module GroupDocsSignatureCloud
|
|
478
457
|
# Custom attribute writer method checking allowed values (enum).
|
479
458
|
# @param [Object] vertical_alignment Object to be assigned
|
480
459
|
def vertical_alignment=(vertical_alignment)
|
481
|
-
validator = EnumAttributeValidator.new('String', ["
|
460
|
+
validator = EnumAttributeValidator.new('String', ["None", "Top", "Center", "Bottom"])
|
482
461
|
if vertical_alignment.to_i == 0
|
483
462
|
unless validator.valid?(vertical_alignment)
|
484
463
|
raise ArgumentError, "invalid value for 'vertical_alignment', must be one of #{validator.allowable_values}."
|
@@ -536,12 +515,11 @@ module GroupDocsSignatureCloud
|
|
536
515
|
def ==(other)
|
537
516
|
return true if self.equal?(other)
|
538
517
|
self.class == other.class &&
|
539
|
-
document_type == other.document_type &&
|
540
518
|
signature_type == other.signature_type &&
|
541
519
|
page == other.page &&
|
542
520
|
all_pages == other.all_pages &&
|
543
521
|
pages_setup == other.pages_setup &&
|
544
|
-
|
522
|
+
image_file_path == other.image_file_path &&
|
545
523
|
left == other.left &&
|
546
524
|
top == other.top &&
|
547
525
|
width == other.width &&
|
@@ -553,7 +531,8 @@ module GroupDocsSignatureCloud
|
|
553
531
|
vertical_alignment == other.vertical_alignment &&
|
554
532
|
margin == other.margin &&
|
555
533
|
margin_measure_type == other.margin_measure_type &&
|
556
|
-
|
534
|
+
transparency == other.transparency &&
|
535
|
+
border == other.border &&
|
557
536
|
outer_lines == other.outer_lines &&
|
558
537
|
inner_lines == other.inner_lines &&
|
559
538
|
background_color == other.background_color &&
|
@@ -571,7 +550,7 @@ module GroupDocsSignatureCloud
|
|
571
550
|
# Calculates hash code according to all attributes.
|
572
551
|
# @return [Fixnum] Hash code
|
573
552
|
def hash
|
574
|
-
[
|
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
|
575
554
|
end
|
576
555
|
|
577
556
|
# Downcases first letter.
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="sign_text_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
|
# Base container class for signature options data
|
32
32
|
class SignTextOptions
|
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
|
|
@@ -91,29 +88,23 @@ module GroupDocsSignatureCloud
|
|
91
88
|
# Gets or sets the fore color of signature
|
92
89
|
attr_accessor :fore_color
|
93
90
|
|
94
|
-
# Gets or sets the border color of signature
|
95
|
-
attr_accessor :border_color
|
96
|
-
|
97
91
|
# Gets or sets the background color of signature
|
98
92
|
attr_accessor :background_color
|
99
93
|
|
100
94
|
# Gets or sets the signature background brush. Value by default is null. If this property has a value it will be used instead BackgroundBrush property. For Spreadsheet documents TextStamp implementation RadialGradientBrush is not applicable, it is replaced by LinearGradientBrush. Spreadsheets, Images, Presentations It is not used for Watermark implementation. PDF For Stamp implementation LinearGradientBrush (ColorStart) and RadialGradientBrush (ColorInner) are used as SolidBrush. PDF It is not used for Annotation, Sticker, TextToFormField and Watermark implementations. Presentations For TextStamp implementation RadialGradientBrush is not applicable, it is replaced by LinearGradientBrush. Word Processing For TextStamp implementation LinearGradientBrush (ColorStart) and RadialGradientBrush (ColorInner) are used as SolidBrush. Word Processing It is not used for TextToFormField and Watermark implementations
|
101
95
|
attr_accessor :background_brush
|
102
96
|
|
103
|
-
# Gets or sets the signature border
|
104
|
-
attr_accessor :
|
105
|
-
|
106
|
-
# Gets or sets the signature border style It is not suitable for PDF
|
107
|
-
attr_accessor :border_dash_style
|
108
|
-
|
109
|
-
# Gets or sets the signature border transparency (value from 0.0 (opaque) through 1.0 (clear)) It is not suitable for PDF
|
110
|
-
attr_accessor :border_transparency
|
97
|
+
# Gets or sets the signature border properties
|
98
|
+
attr_accessor :border
|
111
99
|
|
112
100
|
# Horizontal alignment of text inside a signature
|
113
101
|
attr_accessor :text_horizontal_alignment
|
114
102
|
|
115
103
|
# Vertical alignment of text inside a signature
|
116
104
|
attr_accessor :text_vertical_alignment
|
105
|
+
|
106
|
+
# Gets or sets the Z-order position of text signature. Determines the display order of overlapping signatures.
|
107
|
+
attr_accessor :z_order
|
117
108
|
class EnumAttributeValidator
|
118
109
|
attr_reader :datatype
|
119
110
|
attr_reader :allowable_values
|
@@ -139,7 +130,6 @@ module GroupDocsSignatureCloud
|
|
139
130
|
# Attribute mapping from ruby-style variable name to JSON key.
|
140
131
|
def self.attribute_map
|
141
132
|
{
|
142
|
-
:'document_type' => :'DocumentType',
|
143
133
|
:'signature_type' => :'SignatureType',
|
144
134
|
:'page' => :'Page',
|
145
135
|
:'all_pages' => :'AllPages',
|
@@ -159,21 +149,18 @@ module GroupDocsSignatureCloud
|
|
159
149
|
:'text' => :'Text',
|
160
150
|
:'font' => :'Font',
|
161
151
|
:'fore_color' => :'ForeColor',
|
162
|
-
:'border_color' => :'BorderColor',
|
163
152
|
:'background_color' => :'BackgroundColor',
|
164
153
|
:'background_brush' => :'BackgroundBrush',
|
165
|
-
:'
|
166
|
-
:'border_dash_style' => :'BorderDashStyle',
|
167
|
-
:'border_transparency' => :'BorderTransparency',
|
154
|
+
:'border' => :'Border',
|
168
155
|
:'text_horizontal_alignment' => :'TextHorizontalAlignment',
|
169
|
-
:'text_vertical_alignment' => :'TextVerticalAlignment'
|
156
|
+
:'text_vertical_alignment' => :'TextVerticalAlignment',
|
157
|
+
:'z_order' => :'ZOrder'
|
170
158
|
}
|
171
159
|
end
|
172
160
|
|
173
161
|
# Attribute type mapping.
|
174
162
|
def self.swagger_types
|
175
163
|
{
|
176
|
-
:'document_type' => :'String',
|
177
164
|
:'signature_type' => :'String',
|
178
165
|
:'page' => :'Integer',
|
179
166
|
:'all_pages' => :'BOOLEAN',
|
@@ -193,14 +180,12 @@ module GroupDocsSignatureCloud
|
|
193
180
|
:'text' => :'String',
|
194
181
|
:'font' => :'SignatureFont',
|
195
182
|
:'fore_color' => :'Color',
|
196
|
-
:'border_color' => :'Color',
|
197
183
|
:'background_color' => :'Color',
|
198
184
|
:'background_brush' => :'Brush',
|
199
|
-
:'
|
200
|
-
:'border_dash_style' => :'String',
|
201
|
-
:'border_transparency' => :'Float',
|
185
|
+
:'border' => :'BorderLine',
|
202
186
|
:'text_horizontal_alignment' => :'String',
|
203
|
-
:'text_vertical_alignment' => :'String'
|
187
|
+
:'text_vertical_alignment' => :'String',
|
188
|
+
:'z_order' => :'Integer'
|
204
189
|
}
|
205
190
|
end
|
206
191
|
|
@@ -212,10 +197,6 @@ module GroupDocsSignatureCloud
|
|
212
197
|
# convert string to symbol for hash key
|
213
198
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
214
199
|
|
215
|
-
if attributes.key?(:'DocumentType')
|
216
|
-
self.document_type = attributes[:'DocumentType']
|
217
|
-
end
|
218
|
-
|
219
200
|
if attributes.key?(:'SignatureType')
|
220
201
|
self.signature_type = attributes[:'SignatureType']
|
221
202
|
end
|
@@ -292,10 +273,6 @@ module GroupDocsSignatureCloud
|
|
292
273
|
self.fore_color = attributes[:'ForeColor']
|
293
274
|
end
|
294
275
|
|
295
|
-
if attributes.key?(:'BorderColor')
|
296
|
-
self.border_color = attributes[:'BorderColor']
|
297
|
-
end
|
298
|
-
|
299
276
|
if attributes.key?(:'BackgroundColor')
|
300
277
|
self.background_color = attributes[:'BackgroundColor']
|
301
278
|
end
|
@@ -304,16 +281,8 @@ module GroupDocsSignatureCloud
|
|
304
281
|
self.background_brush = attributes[:'BackgroundBrush']
|
305
282
|
end
|
306
283
|
|
307
|
-
if attributes.key?(:'
|
308
|
-
self.
|
309
|
-
end
|
310
|
-
|
311
|
-
if attributes.key?(:'BorderDashStyle')
|
312
|
-
self.border_dash_style = attributes[:'BorderDashStyle']
|
313
|
-
end
|
314
|
-
|
315
|
-
if attributes.key?(:'BorderTransparency')
|
316
|
-
self.border_transparency = attributes[:'BorderTransparency']
|
284
|
+
if attributes.key?(:'Border')
|
285
|
+
self.border = attributes[:'Border']
|
317
286
|
end
|
318
287
|
|
319
288
|
if attributes.key?(:'TextHorizontalAlignment')
|
@@ -324,16 +293,16 @@ module GroupDocsSignatureCloud
|
|
324
293
|
self.text_vertical_alignment = attributes[:'TextVerticalAlignment']
|
325
294
|
end
|
326
295
|
|
296
|
+
if attributes.key?(:'ZOrder')
|
297
|
+
self.z_order = attributes[:'ZOrder']
|
298
|
+
end
|
299
|
+
|
327
300
|
end
|
328
301
|
|
329
302
|
# Show invalid properties with the reasons. Usually used together with valid?
|
330
303
|
# @return Array for valid properies with the reasons
|
331
304
|
def list_invalid_properties
|
332
305
|
invalid_properties = []
|
333
|
-
if @document_type.nil?
|
334
|
-
invalid_properties.push("invalid value for 'document_type', document_type cannot be nil.")
|
335
|
-
end
|
336
|
-
|
337
306
|
if @signature_type.nil?
|
338
307
|
invalid_properties.push("invalid value for 'signature_type', signature_type cannot be nil.")
|
339
308
|
end
|
@@ -386,18 +355,6 @@ module GroupDocsSignatureCloud
|
|
386
355
|
invalid_properties.push("invalid value for 'margin_measure_type', margin_measure_type cannot be nil.")
|
387
356
|
end
|
388
357
|
|
389
|
-
if @border_visiblity.nil?
|
390
|
-
invalid_properties.push("invalid value for 'border_visiblity', border_visiblity cannot be nil.")
|
391
|
-
end
|
392
|
-
|
393
|
-
if @border_dash_style.nil?
|
394
|
-
invalid_properties.push("invalid value for 'border_dash_style', border_dash_style cannot be nil.")
|
395
|
-
end
|
396
|
-
|
397
|
-
if @border_transparency.nil?
|
398
|
-
invalid_properties.push("invalid value for 'border_transparency', border_transparency cannot be nil.")
|
399
|
-
end
|
400
|
-
|
401
358
|
if @text_horizontal_alignment.nil?
|
402
359
|
invalid_properties.push("invalid value for 'text_horizontal_alignment', text_horizontal_alignment cannot be nil.")
|
403
360
|
end
|
@@ -406,15 +363,16 @@ module GroupDocsSignatureCloud
|
|
406
363
|
invalid_properties.push("invalid value for 'text_vertical_alignment', text_vertical_alignment cannot be nil.")
|
407
364
|
end
|
408
365
|
|
366
|
+
if @z_order.nil?
|
367
|
+
invalid_properties.push("invalid value for 'z_order', z_order cannot be nil.")
|
368
|
+
end
|
369
|
+
|
409
370
|
return invalid_properties
|
410
371
|
end
|
411
372
|
|
412
373
|
# Check to see if the all the properties in the model are valid
|
413
374
|
# @return true if the model is valid
|
414
375
|
def valid?
|
415
|
-
return false if @document_type.nil?
|
416
|
-
document_type_validator = EnumAttributeValidator.new('String', ["Image", "Pdf", "Presentation", "Spreadsheet", "WordProcessing"])
|
417
|
-
return false unless document_type_validator.valid?(@document_type)
|
418
376
|
return false if @signature_type.nil?
|
419
377
|
signature_type_validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp"])
|
420
378
|
return false unless signature_type_validator.valid?(@signature_type)
|
@@ -434,42 +392,24 @@ module GroupDocsSignatureCloud
|
|
434
392
|
return false unless stretch_validator.valid?(@stretch)
|
435
393
|
return false if @rotation_angle.nil?
|
436
394
|
return false if @horizontal_alignment.nil?
|
437
|
-
horizontal_alignment_validator = EnumAttributeValidator.new('String', ["
|
395
|
+
horizontal_alignment_validator = EnumAttributeValidator.new('String', ["None", "Left", "Center", "Right"])
|
438
396
|
return false unless horizontal_alignment_validator.valid?(@horizontal_alignment)
|
439
397
|
return false if @vertical_alignment.nil?
|
440
|
-
vertical_alignment_validator = EnumAttributeValidator.new('String', ["
|
398
|
+
vertical_alignment_validator = EnumAttributeValidator.new('String', ["None", "Top", "Center", "Bottom"])
|
441
399
|
return false unless vertical_alignment_validator.valid?(@vertical_alignment)
|
442
400
|
return false if @margin_measure_type.nil?
|
443
401
|
margin_measure_type_validator = EnumAttributeValidator.new('String', ["Pixels", "Percents", "Millimeters"])
|
444
402
|
return false unless margin_measure_type_validator.valid?(@margin_measure_type)
|
445
|
-
return false if @border_visiblity.nil?
|
446
|
-
return false if @border_dash_style.nil?
|
447
|
-
border_dash_style_validator = EnumAttributeValidator.new('String', ["Dash", "DashDot", "DashDotDot", "DashLongDash", "DashLongDashDot", "RoundDot", "Solid", "SquareDot"])
|
448
|
-
return false unless border_dash_style_validator.valid?(@border_dash_style)
|
449
|
-
return false if @border_transparency.nil?
|
450
403
|
return false if @text_horizontal_alignment.nil?
|
451
404
|
text_horizontal_alignment_validator = EnumAttributeValidator.new('String', ["Left", "Center", "Right"])
|
452
405
|
return false unless text_horizontal_alignment_validator.valid?(@text_horizontal_alignment)
|
453
406
|
return false if @text_vertical_alignment.nil?
|
454
407
|
text_vertical_alignment_validator = EnumAttributeValidator.new('String', ["Top", "Center", "Bottom"])
|
455
408
|
return false unless text_vertical_alignment_validator.valid?(@text_vertical_alignment)
|
409
|
+
return false if @z_order.nil?
|
456
410
|
return true
|
457
411
|
end
|
458
412
|
|
459
|
-
# Custom attribute writer method checking allowed values (enum).
|
460
|
-
# @param [Object] document_type Object to be assigned
|
461
|
-
def document_type=(document_type)
|
462
|
-
validator = EnumAttributeValidator.new('String', ["Image", "Pdf", "Presentation", "Spreadsheet", "WordProcessing"])
|
463
|
-
if document_type.to_i == 0
|
464
|
-
unless validator.valid?(document_type)
|
465
|
-
raise ArgumentError, "invalid value for 'document_type', must be one of #{validator.allowable_values}."
|
466
|
-
end
|
467
|
-
@document_type = document_type
|
468
|
-
else
|
469
|
-
@document_type = validator.allowable_values[document_type.to_i]
|
470
|
-
end
|
471
|
-
end
|
472
|
-
|
473
413
|
# Custom attribute writer method checking allowed values (enum).
|
474
414
|
# @param [Object] signature_type Object to be assigned
|
475
415
|
def signature_type=(signature_type)
|
@@ -529,7 +469,7 @@ module GroupDocsSignatureCloud
|
|
529
469
|
# Custom attribute writer method checking allowed values (enum).
|
530
470
|
# @param [Object] horizontal_alignment Object to be assigned
|
531
471
|
def horizontal_alignment=(horizontal_alignment)
|
532
|
-
validator = EnumAttributeValidator.new('String', ["
|
472
|
+
validator = EnumAttributeValidator.new('String', ["None", "Left", "Center", "Right"])
|
533
473
|
if horizontal_alignment.to_i == 0
|
534
474
|
unless validator.valid?(horizontal_alignment)
|
535
475
|
raise ArgumentError, "invalid value for 'horizontal_alignment', must be one of #{validator.allowable_values}."
|
@@ -543,7 +483,7 @@ module GroupDocsSignatureCloud
|
|
543
483
|
# Custom attribute writer method checking allowed values (enum).
|
544
484
|
# @param [Object] vertical_alignment Object to be assigned
|
545
485
|
def vertical_alignment=(vertical_alignment)
|
546
|
-
validator = EnumAttributeValidator.new('String', ["
|
486
|
+
validator = EnumAttributeValidator.new('String', ["None", "Top", "Center", "Bottom"])
|
547
487
|
if vertical_alignment.to_i == 0
|
548
488
|
unless validator.valid?(vertical_alignment)
|
549
489
|
raise ArgumentError, "invalid value for 'vertical_alignment', must be one of #{validator.allowable_values}."
|
@@ -568,20 +508,6 @@ module GroupDocsSignatureCloud
|
|
568
508
|
end
|
569
509
|
end
|
570
510
|
|
571
|
-
# Custom attribute writer method checking allowed values (enum).
|
572
|
-
# @param [Object] border_dash_style Object to be assigned
|
573
|
-
def border_dash_style=(border_dash_style)
|
574
|
-
validator = EnumAttributeValidator.new('String', ["Dash", "DashDot", "DashDotDot", "DashLongDash", "DashLongDashDot", "RoundDot", "Solid", "SquareDot"])
|
575
|
-
if border_dash_style.to_i == 0
|
576
|
-
unless validator.valid?(border_dash_style)
|
577
|
-
raise ArgumentError, "invalid value for 'border_dash_style', must be one of #{validator.allowable_values}."
|
578
|
-
end
|
579
|
-
@border_dash_style = border_dash_style
|
580
|
-
else
|
581
|
-
@border_dash_style = validator.allowable_values[border_dash_style.to_i]
|
582
|
-
end
|
583
|
-
end
|
584
|
-
|
585
511
|
# Custom attribute writer method checking allowed values (enum).
|
586
512
|
# @param [Object] text_horizontal_alignment Object to be assigned
|
587
513
|
def text_horizontal_alignment=(text_horizontal_alignment)
|
@@ -615,7 +541,6 @@ module GroupDocsSignatureCloud
|
|
615
541
|
def ==(other)
|
616
542
|
return true if self.equal?(other)
|
617
543
|
self.class == other.class &&
|
618
|
-
document_type == other.document_type &&
|
619
544
|
signature_type == other.signature_type &&
|
620
545
|
page == other.page &&
|
621
546
|
all_pages == other.all_pages &&
|
@@ -635,14 +560,12 @@ module GroupDocsSignatureCloud
|
|
635
560
|
text == other.text &&
|
636
561
|
font == other.font &&
|
637
562
|
fore_color == other.fore_color &&
|
638
|
-
border_color == other.border_color &&
|
639
563
|
background_color == other.background_color &&
|
640
564
|
background_brush == other.background_brush &&
|
641
|
-
|
642
|
-
border_dash_style == other.border_dash_style &&
|
643
|
-
border_transparency == other.border_transparency &&
|
565
|
+
border == other.border &&
|
644
566
|
text_horizontal_alignment == other.text_horizontal_alignment &&
|
645
|
-
text_vertical_alignment == other.text_vertical_alignment
|
567
|
+
text_vertical_alignment == other.text_vertical_alignment &&
|
568
|
+
z_order == other.z_order
|
646
569
|
end
|
647
570
|
|
648
571
|
# @see the `==` method
|
@@ -654,7 +577,7 @@ module GroupDocsSignatureCloud
|
|
654
577
|
# Calculates hash code according to all attributes.
|
655
578
|
# @return [Fixnum] Hash code
|
656
579
|
def hash
|
657
|
-
[
|
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
|
658
581
|
end
|
659
582
|
|
660
583
|
# Downcases first letter.
|