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,6 +1,6 @@
|
|
1
1
|
# -----------------------------------------------------------------------------------
|
2
2
|
# <copyright company="Aspose Pty Ltd" file="api_client.rb">
|
3
|
-
# Copyright (c) 2003-
|
3
|
+
# Copyright (c) 2003-2020 Aspose Pty Ltd
|
4
4
|
# </copyright>
|
5
5
|
# <summary>
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# -----------------------------------------------------------------------------------
|
2
2
|
# <copyright company="Aspose Pty Ltd" file="api_error.rb">
|
3
|
-
# Copyright (c) 2003-
|
3
|
+
# Copyright (c) 2003-2020 Aspose Pty Ltd
|
4
4
|
# </copyright>
|
5
5
|
# <summary>
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# ------------------------------------------------------------------------------------
|
2
2
|
# <copyright company="Aspose Pty Ltd" file="configuration.rb">
|
3
|
-
# Copyright (c) 2003-
|
3
|
+
# Copyright (c) 2003-2020 Aspose Pty Ltd
|
4
4
|
# </copyright>
|
5
5
|
# <summary>
|
6
6
|
# 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="barcode_signature.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,17 +31,44 @@ module GroupDocsSignatureCloud
|
|
31
31
|
# Contains Barcode signature properties
|
32
32
|
class BarcodeSignature
|
33
33
|
|
34
|
-
# Specifies the type of document to process (Image, Pdf, Presentation, Spreadsheet, WordProcessing)
|
35
|
-
attr_accessor :document_type
|
36
|
-
|
37
34
|
# Specifies the signature type (Text, Image, Digital, Barcode, QRCode, Stamp)
|
38
35
|
attr_accessor :signature_type
|
39
36
|
|
37
|
+
# Specifies the page signature was found on
|
38
|
+
attr_accessor :page_number
|
39
|
+
|
40
|
+
# Unique signature identifier to modify signature in the document over Update or Delete methods. This property will be set automatically after Sign or Search method being called. If this property was saved before it can be set manually to manipulate the signature.
|
41
|
+
attr_accessor :signature_id
|
42
|
+
|
43
|
+
# Get or set flag to indicate if this component is Signature or document content. This property is being used with Update method to set element as signature (true) or document element (false).
|
44
|
+
attr_accessor :is_signature
|
45
|
+
|
46
|
+
# Get or set the signature creation date
|
47
|
+
attr_accessor :created_on
|
48
|
+
|
49
|
+
# Get or set the signature modification date
|
50
|
+
attr_accessor :modified_on
|
51
|
+
|
52
|
+
# Specifies top position of signature
|
53
|
+
attr_accessor :top
|
54
|
+
|
55
|
+
# Specifies left position of signature
|
56
|
+
attr_accessor :left
|
57
|
+
|
58
|
+
# Specifies width of signature
|
59
|
+
attr_accessor :width
|
60
|
+
|
61
|
+
# Specifies height of signature
|
62
|
+
attr_accessor :height
|
63
|
+
|
40
64
|
# Specifies the Barcode type
|
41
65
|
attr_accessor :barcode_type
|
42
66
|
|
43
67
|
# Specifies text of Bar-code
|
44
68
|
attr_accessor :text
|
69
|
+
|
70
|
+
# Specifies the format of Barcode signature image.
|
71
|
+
attr_accessor :format
|
45
72
|
class EnumAttributeValidator
|
46
73
|
attr_reader :datatype
|
47
74
|
attr_reader :allowable_values
|
@@ -67,20 +94,38 @@ module GroupDocsSignatureCloud
|
|
67
94
|
# Attribute mapping from ruby-style variable name to JSON key.
|
68
95
|
def self.attribute_map
|
69
96
|
{
|
70
|
-
:'document_type' => :'DocumentType',
|
71
97
|
:'signature_type' => :'SignatureType',
|
98
|
+
:'page_number' => :'PageNumber',
|
99
|
+
:'signature_id' => :'SignatureId',
|
100
|
+
:'is_signature' => :'IsSignature',
|
101
|
+
:'created_on' => :'CreatedOn',
|
102
|
+
:'modified_on' => :'ModifiedOn',
|
103
|
+
:'top' => :'Top',
|
104
|
+
:'left' => :'Left',
|
105
|
+
:'width' => :'Width',
|
106
|
+
:'height' => :'Height',
|
72
107
|
:'barcode_type' => :'BarcodeType',
|
73
|
-
:'text' => :'Text'
|
108
|
+
:'text' => :'Text',
|
109
|
+
:'format' => :'Format'
|
74
110
|
}
|
75
111
|
end
|
76
112
|
|
77
113
|
# Attribute type mapping.
|
78
114
|
def self.swagger_types
|
79
115
|
{
|
80
|
-
:'document_type' => :'String',
|
81
116
|
:'signature_type' => :'String',
|
117
|
+
:'page_number' => :'Integer',
|
118
|
+
:'signature_id' => :'String',
|
119
|
+
:'is_signature' => :'BOOLEAN',
|
120
|
+
:'created_on' => :'DateTime',
|
121
|
+
:'modified_on' => :'DateTime',
|
122
|
+
:'top' => :'Integer',
|
123
|
+
:'left' => :'Integer',
|
124
|
+
:'width' => :'Integer',
|
125
|
+
:'height' => :'Integer',
|
82
126
|
:'barcode_type' => :'String',
|
83
|
-
:'text' => :'String'
|
127
|
+
:'text' => :'String',
|
128
|
+
:'format' => :'String'
|
84
129
|
}
|
85
130
|
end
|
86
131
|
|
@@ -92,14 +137,46 @@ module GroupDocsSignatureCloud
|
|
92
137
|
# convert string to symbol for hash key
|
93
138
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
94
139
|
|
95
|
-
if attributes.key?(:'DocumentType')
|
96
|
-
self.document_type = attributes[:'DocumentType']
|
97
|
-
end
|
98
|
-
|
99
140
|
if attributes.key?(:'SignatureType')
|
100
141
|
self.signature_type = attributes[:'SignatureType']
|
101
142
|
end
|
102
143
|
|
144
|
+
if attributes.key?(:'PageNumber')
|
145
|
+
self.page_number = attributes[:'PageNumber']
|
146
|
+
end
|
147
|
+
|
148
|
+
if attributes.key?(:'SignatureId')
|
149
|
+
self.signature_id = attributes[:'SignatureId']
|
150
|
+
end
|
151
|
+
|
152
|
+
if attributes.key?(:'IsSignature')
|
153
|
+
self.is_signature = attributes[:'IsSignature']
|
154
|
+
end
|
155
|
+
|
156
|
+
if attributes.key?(:'CreatedOn')
|
157
|
+
self.created_on = attributes[:'CreatedOn']
|
158
|
+
end
|
159
|
+
|
160
|
+
if attributes.key?(:'ModifiedOn')
|
161
|
+
self.modified_on = attributes[:'ModifiedOn']
|
162
|
+
end
|
163
|
+
|
164
|
+
if attributes.key?(:'Top')
|
165
|
+
self.top = attributes[:'Top']
|
166
|
+
end
|
167
|
+
|
168
|
+
if attributes.key?(:'Left')
|
169
|
+
self.left = attributes[:'Left']
|
170
|
+
end
|
171
|
+
|
172
|
+
if attributes.key?(:'Width')
|
173
|
+
self.width = attributes[:'Width']
|
174
|
+
end
|
175
|
+
|
176
|
+
if attributes.key?(:'Height')
|
177
|
+
self.height = attributes[:'Height']
|
178
|
+
end
|
179
|
+
|
103
180
|
if attributes.key?(:'BarcodeType')
|
104
181
|
self.barcode_type = attributes[:'BarcodeType']
|
105
182
|
end
|
@@ -108,49 +185,67 @@ module GroupDocsSignatureCloud
|
|
108
185
|
self.text = attributes[:'Text']
|
109
186
|
end
|
110
187
|
|
188
|
+
if attributes.key?(:'Format')
|
189
|
+
self.format = attributes[:'Format']
|
190
|
+
end
|
191
|
+
|
111
192
|
end
|
112
193
|
|
113
194
|
# Show invalid properties with the reasons. Usually used together with valid?
|
114
195
|
# @return Array for valid properies with the reasons
|
115
196
|
def list_invalid_properties
|
116
197
|
invalid_properties = []
|
117
|
-
if @document_type.nil?
|
118
|
-
invalid_properties.push("invalid value for 'document_type', document_type cannot be nil.")
|
119
|
-
end
|
120
|
-
|
121
198
|
if @signature_type.nil?
|
122
199
|
invalid_properties.push("invalid value for 'signature_type', signature_type cannot be nil.")
|
123
200
|
end
|
124
201
|
|
202
|
+
if @is_signature.nil?
|
203
|
+
invalid_properties.push("invalid value for 'is_signature', is_signature cannot be nil.")
|
204
|
+
end
|
205
|
+
|
206
|
+
if @created_on.nil?
|
207
|
+
invalid_properties.push("invalid value for 'created_on', created_on cannot be nil.")
|
208
|
+
end
|
209
|
+
|
210
|
+
if @modified_on.nil?
|
211
|
+
invalid_properties.push("invalid value for 'modified_on', modified_on cannot be nil.")
|
212
|
+
end
|
213
|
+
|
214
|
+
if @top.nil?
|
215
|
+
invalid_properties.push("invalid value for 'top', top cannot be nil.")
|
216
|
+
end
|
217
|
+
|
218
|
+
if @left.nil?
|
219
|
+
invalid_properties.push("invalid value for 'left', left cannot be nil.")
|
220
|
+
end
|
221
|
+
|
222
|
+
if @width.nil?
|
223
|
+
invalid_properties.push("invalid value for 'width', width cannot be nil.")
|
224
|
+
end
|
225
|
+
|
226
|
+
if @height.nil?
|
227
|
+
invalid_properties.push("invalid value for 'height', height cannot be nil.")
|
228
|
+
end
|
229
|
+
|
125
230
|
return invalid_properties
|
126
231
|
end
|
127
232
|
|
128
233
|
# Check to see if the all the properties in the model are valid
|
129
234
|
# @return true if the model is valid
|
130
235
|
def valid?
|
131
|
-
return false if @document_type.nil?
|
132
|
-
document_type_validator = EnumAttributeValidator.new('String', ["Image", "Pdf", "Presentation", "Spreadsheet", "WordProcessing"])
|
133
|
-
return false unless document_type_validator.valid?(@document_type)
|
134
236
|
return false if @signature_type.nil?
|
135
237
|
signature_type_validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp"])
|
136
238
|
return false unless signature_type_validator.valid?(@signature_type)
|
239
|
+
return false if @is_signature.nil?
|
240
|
+
return false if @created_on.nil?
|
241
|
+
return false if @modified_on.nil?
|
242
|
+
return false if @top.nil?
|
243
|
+
return false if @left.nil?
|
244
|
+
return false if @width.nil?
|
245
|
+
return false if @height.nil?
|
137
246
|
return true
|
138
247
|
end
|
139
248
|
|
140
|
-
# Custom attribute writer method checking allowed values (enum).
|
141
|
-
# @param [Object] document_type Object to be assigned
|
142
|
-
def document_type=(document_type)
|
143
|
-
validator = EnumAttributeValidator.new('String', ["Image", "Pdf", "Presentation", "Spreadsheet", "WordProcessing"])
|
144
|
-
if document_type.to_i == 0
|
145
|
-
unless validator.valid?(document_type)
|
146
|
-
raise ArgumentError, "invalid value for 'document_type', must be one of #{validator.allowable_values}."
|
147
|
-
end
|
148
|
-
@document_type = document_type
|
149
|
-
else
|
150
|
-
@document_type = validator.allowable_values[document_type.to_i]
|
151
|
-
end
|
152
|
-
end
|
153
|
-
|
154
249
|
# Custom attribute writer method checking allowed values (enum).
|
155
250
|
# @param [Object] signature_type Object to be assigned
|
156
251
|
def signature_type=(signature_type)
|
@@ -170,10 +265,19 @@ module GroupDocsSignatureCloud
|
|
170
265
|
def ==(other)
|
171
266
|
return true if self.equal?(other)
|
172
267
|
self.class == other.class &&
|
173
|
-
document_type == other.document_type &&
|
174
268
|
signature_type == other.signature_type &&
|
269
|
+
page_number == other.page_number &&
|
270
|
+
signature_id == other.signature_id &&
|
271
|
+
is_signature == other.is_signature &&
|
272
|
+
created_on == other.created_on &&
|
273
|
+
modified_on == other.modified_on &&
|
274
|
+
top == other.top &&
|
275
|
+
left == other.left &&
|
276
|
+
width == other.width &&
|
277
|
+
height == other.height &&
|
175
278
|
barcode_type == other.barcode_type &&
|
176
|
-
text == other.text
|
279
|
+
text == other.text &&
|
280
|
+
format == other.format
|
177
281
|
end
|
178
282
|
|
179
283
|
# @see the `==` method
|
@@ -185,7 +289,7 @@ module GroupDocsSignatureCloud
|
|
185
289
|
# Calculates hash code according to all attributes.
|
186
290
|
# @return [Fixnum] Hash code
|
187
291
|
def hash
|
188
|
-
[
|
292
|
+
[signature_type, page_number, signature_id, is_signature, created_on, modified_on, top, left, width, height, barcode_type, text, format].hash
|
189
293
|
end
|
190
294
|
|
191
295
|
# Downcases first letter.
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="barcode_type.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="barcodes_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
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="base_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="border_line.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
|
@@ -42,6 +42,9 @@ module GroupDocsSignatureCloud
|
|
42
42
|
|
43
43
|
# Gets or sets the border color of signature
|
44
44
|
attr_accessor :color
|
45
|
+
|
46
|
+
# Gets or sets the border visibility
|
47
|
+
attr_accessor :visible
|
45
48
|
class EnumAttributeValidator
|
46
49
|
attr_reader :datatype
|
47
50
|
attr_reader :allowable_values
|
@@ -70,7 +73,8 @@ module GroupDocsSignatureCloud
|
|
70
73
|
:'style' => :'Style',
|
71
74
|
:'transparency' => :'Transparency',
|
72
75
|
:'weight' => :'Weight',
|
73
|
-
:'color' => :'Color'
|
76
|
+
:'color' => :'Color',
|
77
|
+
:'visible' => :'Visible'
|
74
78
|
}
|
75
79
|
end
|
76
80
|
|
@@ -80,7 +84,8 @@ module GroupDocsSignatureCloud
|
|
80
84
|
:'style' => :'String',
|
81
85
|
:'transparency' => :'Float',
|
82
86
|
:'weight' => :'Float',
|
83
|
-
:'color' => :'Color'
|
87
|
+
:'color' => :'Color',
|
88
|
+
:'visible' => :'BOOLEAN'
|
84
89
|
}
|
85
90
|
end
|
86
91
|
|
@@ -108,6 +113,10 @@ module GroupDocsSignatureCloud
|
|
108
113
|
self.color = attributes[:'Color']
|
109
114
|
end
|
110
115
|
|
116
|
+
if attributes.key?(:'Visible')
|
117
|
+
self.visible = attributes[:'Visible']
|
118
|
+
end
|
119
|
+
|
111
120
|
end
|
112
121
|
|
113
122
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -126,6 +135,10 @@ module GroupDocsSignatureCloud
|
|
126
135
|
invalid_properties.push("invalid value for 'weight', weight cannot be nil.")
|
127
136
|
end
|
128
137
|
|
138
|
+
if @visible.nil?
|
139
|
+
invalid_properties.push("invalid value for 'visible', visible cannot be nil.")
|
140
|
+
end
|
141
|
+
|
129
142
|
return invalid_properties
|
130
143
|
end
|
131
144
|
|
@@ -133,17 +146,18 @@ module GroupDocsSignatureCloud
|
|
133
146
|
# @return true if the model is valid
|
134
147
|
def valid?
|
135
148
|
return false if @style.nil?
|
136
|
-
style_validator = EnumAttributeValidator.new('String', ["
|
149
|
+
style_validator = EnumAttributeValidator.new('String', ["Solid", "ShortDash", "ShortDot", "ShortDashDot", "ShortDashDotDot", "Dot", "Dash", "LongDash", "DashDot", "LongDashDot", "LongDashDotDot", "RoundDot", "SquareDot", "DashDotDot", "DashLongDash", "DashLongDashDot"])
|
137
150
|
return false unless style_validator.valid?(@style)
|
138
151
|
return false if @transparency.nil?
|
139
152
|
return false if @weight.nil?
|
153
|
+
return false if @visible.nil?
|
140
154
|
return true
|
141
155
|
end
|
142
156
|
|
143
157
|
# Custom attribute writer method checking allowed values (enum).
|
144
158
|
# @param [Object] style Object to be assigned
|
145
159
|
def style=(style)
|
146
|
-
validator = EnumAttributeValidator.new('String', ["
|
160
|
+
validator = EnumAttributeValidator.new('String', ["Solid", "ShortDash", "ShortDot", "ShortDashDot", "ShortDashDotDot", "Dot", "Dash", "LongDash", "DashDot", "LongDashDot", "LongDashDotDot", "RoundDot", "SquareDot", "DashDotDot", "DashLongDash", "DashLongDashDot"])
|
147
161
|
if style.to_i == 0
|
148
162
|
unless validator.valid?(style)
|
149
163
|
raise ArgumentError, "invalid value for 'style', must be one of #{validator.allowable_values}."
|
@@ -162,7 +176,8 @@ module GroupDocsSignatureCloud
|
|
162
176
|
style == other.style &&
|
163
177
|
transparency == other.transparency &&
|
164
178
|
weight == other.weight &&
|
165
|
-
color == other.color
|
179
|
+
color == other.color &&
|
180
|
+
visible == other.visible
|
166
181
|
end
|
167
182
|
|
168
183
|
# @see the `==` method
|
@@ -174,7 +189,7 @@ module GroupDocsSignatureCloud
|
|
174
189
|
# Calculates hash code according to all attributes.
|
175
190
|
# @return [Fixnum] Hash code
|
176
191
|
def hash
|
177
|
-
[style, transparency, weight, color].hash
|
192
|
+
[style, transparency, weight, color, visible].hash
|
178
193
|
end
|
179
194
|
|
180
195
|
# Downcases first letter.
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="brush.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="color.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
|
@@ -0,0 +1,271 @@
|
|
1
|
+
#
|
2
|
+
# --------------------------------------------------------------------------------------------------------------------
|
3
|
+
# <copyright company="Aspose Pty Ltd" file="delete_options.rb">
|
4
|
+
# Copyright (c) 2003-2020 Aspose Pty Ltd
|
5
|
+
# </copyright>
|
6
|
+
# <summary>
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
# of this software and associated documentation files (the "Software"), to deal
|
9
|
+
# in the Software without restriction, including without limitation the rights
|
10
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
+
# copies of the Software, and to permit persons to whom the Software is
|
12
|
+
# furnished to do so, subject to the following conditions:
|
13
|
+
#
|
14
|
+
# The above copyright notice and this permission notice shall be included in all
|
15
|
+
# copies or substantial portions of the Software.
|
16
|
+
#
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
23
|
+
# SOFTWARE.
|
24
|
+
# </summary>
|
25
|
+
# --------------------------------------------------------------------------------------------------------------------
|
26
|
+
#
|
27
|
+
|
28
|
+
require 'date'
|
29
|
+
|
30
|
+
module GroupDocsSignatureCloud
|
31
|
+
# Base container class for delete signature options
|
32
|
+
class DeleteOptions
|
33
|
+
|
34
|
+
# Specifies the type of signature
|
35
|
+
attr_accessor :signature_type
|
36
|
+
|
37
|
+
# Unique signature identifier to modify signature in the document over Update or Delete methods. This property will be set automatically after Sign or Search method being called. If this property was saved before it can be set manually to manipulate the signature.
|
38
|
+
attr_accessor :signature_id
|
39
|
+
class EnumAttributeValidator
|
40
|
+
attr_reader :datatype
|
41
|
+
attr_reader :allowable_values
|
42
|
+
|
43
|
+
def initialize(datatype, allowable_values)
|
44
|
+
@allowable_values = allowable_values.map do |value|
|
45
|
+
case datatype.to_s
|
46
|
+
when /Integer/i
|
47
|
+
value.to_i
|
48
|
+
when /Float/i
|
49
|
+
value.to_f
|
50
|
+
else
|
51
|
+
value
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
def valid?(value)
|
57
|
+
!value || allowable_values.include?(value)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
62
|
+
def self.attribute_map
|
63
|
+
{
|
64
|
+
:'signature_type' => :'SignatureType',
|
65
|
+
:'signature_id' => :'SignatureId'
|
66
|
+
}
|
67
|
+
end
|
68
|
+
|
69
|
+
# Attribute type mapping.
|
70
|
+
def self.swagger_types
|
71
|
+
{
|
72
|
+
:'signature_type' => :'String',
|
73
|
+
:'signature_id' => :'String'
|
74
|
+
}
|
75
|
+
end
|
76
|
+
|
77
|
+
# Initializes the object
|
78
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
79
|
+
def initialize(attributes = {})
|
80
|
+
return unless attributes.is_a?(Hash)
|
81
|
+
|
82
|
+
# convert string to symbol for hash key
|
83
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
84
|
+
|
85
|
+
if attributes.key?(:'SignatureType')
|
86
|
+
self.signature_type = attributes[:'SignatureType']
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes.key?(:'SignatureId')
|
90
|
+
self.signature_id = attributes[:'SignatureId']
|
91
|
+
end
|
92
|
+
|
93
|
+
end
|
94
|
+
|
95
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
96
|
+
# @return Array for valid properies with the reasons
|
97
|
+
def list_invalid_properties
|
98
|
+
invalid_properties = []
|
99
|
+
if @signature_type.nil?
|
100
|
+
invalid_properties.push("invalid value for 'signature_type', signature_type cannot be nil.")
|
101
|
+
end
|
102
|
+
|
103
|
+
return invalid_properties
|
104
|
+
end
|
105
|
+
|
106
|
+
# Check to see if the all the properties in the model are valid
|
107
|
+
# @return true if the model is valid
|
108
|
+
def valid?
|
109
|
+
return false if @signature_type.nil?
|
110
|
+
signature_type_validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp"])
|
111
|
+
return false unless signature_type_validator.valid?(@signature_type)
|
112
|
+
return true
|
113
|
+
end
|
114
|
+
|
115
|
+
# Custom attribute writer method checking allowed values (enum).
|
116
|
+
# @param [Object] signature_type Object to be assigned
|
117
|
+
def signature_type=(signature_type)
|
118
|
+
validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp"])
|
119
|
+
if signature_type.to_i == 0
|
120
|
+
unless validator.valid?(signature_type)
|
121
|
+
raise ArgumentError, "invalid value for 'signature_type', must be one of #{validator.allowable_values}."
|
122
|
+
end
|
123
|
+
@signature_type = signature_type
|
124
|
+
else
|
125
|
+
@signature_type = validator.allowable_values[signature_type.to_i]
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
# Checks equality by comparing each attribute.
|
130
|
+
# @param [Object] Object to be compared
|
131
|
+
def ==(other)
|
132
|
+
return true if self.equal?(other)
|
133
|
+
self.class == other.class &&
|
134
|
+
signature_type == other.signature_type &&
|
135
|
+
signature_id == other.signature_id
|
136
|
+
end
|
137
|
+
|
138
|
+
# @see the `==` method
|
139
|
+
# @param [Object] Object to be compared
|
140
|
+
def eql?(other)
|
141
|
+
self == other
|
142
|
+
end
|
143
|
+
|
144
|
+
# Calculates hash code according to all attributes.
|
145
|
+
# @return [Fixnum] Hash code
|
146
|
+
def hash
|
147
|
+
[signature_type, signature_id].hash
|
148
|
+
end
|
149
|
+
|
150
|
+
# Downcases first letter.
|
151
|
+
# @return downcased string
|
152
|
+
def uncap(str)
|
153
|
+
str[0, 1].downcase + str[1..-1]
|
154
|
+
end
|
155
|
+
|
156
|
+
# Builds the object from hash
|
157
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
158
|
+
# @return [Object] Returns the model itself
|
159
|
+
def build_from_hash(attributes)
|
160
|
+
return nil unless attributes.is_a?(Hash)
|
161
|
+
self.class.swagger_types.each_pair do |key, type|
|
162
|
+
pname = uncap(self.class.attribute_map[key]).intern
|
163
|
+
value = attributes[pname]
|
164
|
+
if type =~ /\AArray<(.*)>/i
|
165
|
+
# check to ensure the input is an array given that the the attribute
|
166
|
+
# is documented as an array but the input is not
|
167
|
+
if value.is_a?(Array)
|
168
|
+
self.send("#{key}=", value.map { |v| _deserialize($1, v) })
|
169
|
+
end
|
170
|
+
elsif !value.nil?
|
171
|
+
self.send("#{key}=", _deserialize(type, value))
|
172
|
+
end
|
173
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
174
|
+
end
|
175
|
+
|
176
|
+
self
|
177
|
+
end
|
178
|
+
|
179
|
+
# Deserializes the data based on type
|
180
|
+
# @param string type Data type
|
181
|
+
# @param string value Value to be deserialized
|
182
|
+
# @return [Object] Deserialized data
|
183
|
+
def _deserialize(type, value)
|
184
|
+
case type.to_sym
|
185
|
+
when :DateTime
|
186
|
+
Date.parse value
|
187
|
+
when :Date
|
188
|
+
Date.parse value
|
189
|
+
when :String
|
190
|
+
value.to_s
|
191
|
+
when :Integer
|
192
|
+
value.to_i
|
193
|
+
when :Float
|
194
|
+
value.to_f
|
195
|
+
when :BOOLEAN
|
196
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
197
|
+
true
|
198
|
+
else
|
199
|
+
false
|
200
|
+
end
|
201
|
+
when :Object
|
202
|
+
# generic object (usually a Hash), return directly
|
203
|
+
value
|
204
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
205
|
+
inner_type = Regexp.last_match[:inner_type]
|
206
|
+
value.map { |v| _deserialize(inner_type, v) }
|
207
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
208
|
+
k_type = Regexp.last_match[:k_type]
|
209
|
+
v_type = Regexp.last_match[:v_type]
|
210
|
+
{}.tap do |hash|
|
211
|
+
value.each do |k, v|
|
212
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
213
|
+
end
|
214
|
+
end
|
215
|
+
else
|
216
|
+
# model
|
217
|
+
# Signature type fix
|
218
|
+
ttype = type
|
219
|
+
if value.is_a?(Hash) and !value[:signatureType].nil?
|
220
|
+
ttype = value[:signatureType] + 'Signature'
|
221
|
+
end
|
222
|
+
temp_model = GroupDocsSignatureCloud.const_get(ttype).new
|
223
|
+
temp_model.build_from_hash(value)
|
224
|
+
end
|
225
|
+
end
|
226
|
+
|
227
|
+
# Returns the string representation of the object
|
228
|
+
# @return [String] String presentation of the object
|
229
|
+
def to_s
|
230
|
+
to_hash.to_s
|
231
|
+
end
|
232
|
+
|
233
|
+
# to_body is an alias to to_hash (backward compatibility)
|
234
|
+
# @return [Hash] Returns the object in the form of hash
|
235
|
+
def to_body
|
236
|
+
to_hash
|
237
|
+
end
|
238
|
+
|
239
|
+
# Returns the object in the form of hash
|
240
|
+
# @return [Hash] Returns the object in the form of hash
|
241
|
+
def to_hash
|
242
|
+
hash = {}
|
243
|
+
self.class.attribute_map.each_pair do |attr, param|
|
244
|
+
value = self.send(attr)
|
245
|
+
next if value.nil?
|
246
|
+
hash[param] = _to_hash(value)
|
247
|
+
end
|
248
|
+
hash
|
249
|
+
end
|
250
|
+
|
251
|
+
# Outputs non-array value in the form of hash
|
252
|
+
# For object, use to_hash. Otherwise, just return the value
|
253
|
+
# @param [Object] value Any valid value
|
254
|
+
# @return [Hash] Returns the value in the form of hash
|
255
|
+
def _to_hash(value)
|
256
|
+
if value.is_a?(Array)
|
257
|
+
value.compact.map { |v| _to_hash(v) }
|
258
|
+
elsif value.is_a?(Hash)
|
259
|
+
{}.tap do |hash|
|
260
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
261
|
+
end
|
262
|
+
elsif value.respond_to? :to_hash
|
263
|
+
value.to_hash
|
264
|
+
else
|
265
|
+
value
|
266
|
+
end
|
267
|
+
end
|
268
|
+
|
269
|
+
end
|
270
|
+
|
271
|
+
end
|