groupdocs_signature_cloud 18.8.1 → 19.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/groupdocs_signature_cloud.rb +99 -191
- data/lib/groupdocs_signature_cloud/api/file_api.rb +734 -0
- data/lib/groupdocs_signature_cloud/api/folder_api.rb +699 -0
- data/lib/groupdocs_signature_cloud/api/info_api.rb +364 -0
- data/lib/groupdocs_signature_cloud/api/sign_api.rb +411 -0
- data/lib/groupdocs_signature_cloud/api/storage_api.rb +544 -0
- data/lib/groupdocs_signature_cloud/api_client.rb +382 -380
- data/lib/groupdocs_signature_cloud/api_error.rb +58 -58
- data/lib/groupdocs_signature_cloud/configuration.rb +95 -110
- data/lib/groupdocs_signature_cloud/models/{digital_signature_data.rb → barcode_signature.rb} +312 -307
- data/lib/groupdocs_signature_cloud/models/barcode_type.rb +219 -230
- data/lib/groupdocs_signature_cloud/models/{barcode_collection.rb → barcodes_result.rb} +221 -232
- data/lib/groupdocs_signature_cloud/models/base_settings.rb +219 -0
- data/lib/groupdocs_signature_cloud/models/{border_line_data.rb → border_line.rb} +301 -312
- data/lib/groupdocs_signature_cloud/models/{brush_data.rb → brush.rb} +219 -230
- data/lib/groupdocs_signature_cloud/models/color.rb +219 -245
- data/lib/groupdocs_signature_cloud/models/{pdf_digital_signature_data.rb → digital_signature.rb} +363 -307
- data/lib/groupdocs_signature_cloud/models/disc_usage.rb +239 -0
- data/lib/groupdocs_signature_cloud/models/error.rb +249 -0
- data/lib/groupdocs_signature_cloud/models/error_details.rb +234 -0
- data/lib/groupdocs_signature_cloud/models/file_info.rb +249 -0
- data/lib/groupdocs_signature_cloud/models/{document_info.rb → file_version.rb} +294 -300
- data/lib/groupdocs_signature_cloud/models/file_versions.rb +221 -0
- data/lib/groupdocs_signature_cloud/models/files_list.rb +221 -0
- data/lib/groupdocs_signature_cloud/models/{base_signature_data.rb → files_upload_result.rb} +233 -230
- data/lib/groupdocs_signature_cloud/models/format.rb +229 -240
- data/lib/groupdocs_signature_cloud/models/{format_collection.rb → formats_result.rb} +221 -232
- data/lib/groupdocs_signature_cloud/models/{search_document_response.rb → info_result.rb} +339 -303
- data/lib/groupdocs_signature_cloud/models/info_settings.rb +219 -0
- data/lib/groupdocs_signature_cloud/models/{linear_gradient_brush_data.rb → linear_gradient_brush.rb} +254 -260
- data/lib/groupdocs_signature_cloud/models/object_exist.rb +239 -0
- data/lib/groupdocs_signature_cloud/models/options_base.rb +327 -0
- data/lib/groupdocs_signature_cloud/models/{padding_data.rb → padding.rb} +284 -295
- data/lib/groupdocs_signature_cloud/models/page_info.rb +294 -305
- data/lib/groupdocs_signature_cloud/models/{pages_setup_data.rb → pages_setup.rb} +281 -292
- data/lib/groupdocs_signature_cloud/models/{words_digital_signature_data.rb → qr_code_signature.rb} +312 -307
- data/lib/groupdocs_signature_cloud/models/qr_code_type.rb +219 -230
- data/lib/groupdocs_signature_cloud/models/{qr_code_collection.rb → qr_codes_result.rb} +221 -232
- data/lib/groupdocs_signature_cloud/models/{radial_gradient_brush_data.rb → radial_gradient_brush.rb} +239 -250
- data/lib/groupdocs_signature_cloud/models/save_options.rb +244 -0
- data/lib/groupdocs_signature_cloud/models/{search_barcode_options_data.rb → search_barcode_options.rb} +378 -332
- data/lib/groupdocs_signature_cloud/models/search_digital_options.rb +327 -0
- data/lib/groupdocs_signature_cloud/models/search_options.rb +327 -0
- data/lib/groupdocs_signature_cloud/models/{pdf_search_barcode_options_data.rb → search_qr_code_options.rb} +378 -332
- data/lib/groupdocs_signature_cloud/models/{sign_options_collection_data.rb → search_result.rb} +246 -232
- data/lib/groupdocs_signature_cloud/models/search_settings.rb +231 -0
- data/lib/groupdocs_signature_cloud/models/{images_sign_text_options_data.rb → sign_barcode_options.rb} +857 -706
- data/lib/groupdocs_signature_cloud/models/{sign_digital_options_data.rb → sign_digital_options.rb} +612 -516
- data/lib/groupdocs_signature_cloud/models/{sign_stamp_options_data.rb → sign_image_options.rb} +592 -592
- data/lib/groupdocs_signature_cloud/models/sign_options.rb +327 -0
- data/lib/groupdocs_signature_cloud/models/{words_sign_text_options_data.rb → sign_qr_code_options.rb} +872 -696
- data/lib/groupdocs_signature_cloud/models/sign_result.rb +244 -0
- data/lib/groupdocs_signature_cloud/models/sign_settings.rb +241 -0
- data/lib/groupdocs_signature_cloud/models/{slides_sign_stamp_options_data.rb → sign_stamp_options.rb} +698 -592
- data/lib/groupdocs_signature_cloud/models/{cells_sign_text_options_data.rb → sign_text_options.rb} +781 -736
- data/lib/groupdocs_signature_cloud/models/{signature_document_response.rb → signature.rb} +292 -290
- data/lib/groupdocs_signature_cloud/models/{signature_font_data.rb → signature_font.rb} +279 -290
- data/lib/groupdocs_signature_cloud/models/{solid_brush_data.rb → solid_brush.rb} +229 -240
- data/lib/groupdocs_signature_cloud/models/{stamp_line_data.rb → stamp_line.rb} +366 -377
- data/lib/groupdocs_signature_cloud/models/storage_exist.rb +224 -0
- data/lib/groupdocs_signature_cloud/models/{pdf_qr_code_signature_data.rb → storage_file.rb} +269 -250
- data/lib/groupdocs_signature_cloud/models/{texture_brush_data.rb → texture_brush.rb} +229 -240
- data/lib/groupdocs_signature_cloud/models/{verify_barcode_options_data.rb → verify_barcode_options.rb} +378 -342
- data/lib/groupdocs_signature_cloud/models/{cells_verify_digital_options_data.rb → verify_digital_options.rb} +407 -315
- data/lib/groupdocs_signature_cloud/models/{cells_digital_signature_data.rb → verify_options.rb} +327 -307
- data/lib/groupdocs_signature_cloud/models/{verify_qr_code_options_data.rb → verify_qr_code_options.rb} +378 -342
- data/lib/groupdocs_signature_cloud/models/verify_result.rb +249 -0
- data/lib/groupdocs_signature_cloud/models/verify_settings.rb +231 -0
- data/lib/groupdocs_signature_cloud/models/{cells_verify_barcode_options_data.rb → verify_text_options.rb} +368 -342
- data/lib/groupdocs_signature_cloud/version.rb +2 -2
- metadata +63 -171
- data/lib/groupdocs_signature_cloud/api/signature_api.rb +0 -2590
- data/lib/groupdocs_signature_cloud/models/barcode_signature_data.rb +0 -250
- data/lib/groupdocs_signature_cloud/models/cells_barcode_signature_data.rb +0 -250
- data/lib/groupdocs_signature_cloud/models/cells_qr_code_signature_data.rb +0 -250
- data/lib/groupdocs_signature_cloud/models/cells_search_barcode_options_data.rb +0 -332
- data/lib/groupdocs_signature_cloud/models/cells_search_digital_options_data.rb +0 -265
- data/lib/groupdocs_signature_cloud/models/cells_search_qr_code_options_data.rb +0 -332
- data/lib/groupdocs_signature_cloud/models/cells_sign_barcode_options_data.rb +0 -694
- data/lib/groupdocs_signature_cloud/models/cells_sign_digital_options_data.rb +0 -546
- data/lib/groupdocs_signature_cloud/models/cells_sign_image_options_data.rb +0 -526
- data/lib/groupdocs_signature_cloud/models/cells_sign_qr_code_options_data.rb +0 -704
- data/lib/groupdocs_signature_cloud/models/cells_sign_stamp_options_data.rb +0 -622
- data/lib/groupdocs_signature_cloud/models/cells_verify_qr_code_options_data.rb +0 -342
- data/lib/groupdocs_signature_cloud/models/cells_verify_text_options_data.rb +0 -285
- data/lib/groupdocs_signature_cloud/models/document_response.rb +0 -302
- data/lib/groupdocs_signature_cloud/models/images_barcode_signature_data.rb +0 -250
- data/lib/groupdocs_signature_cloud/models/images_qr_code_signature_data.rb +0 -250
- data/lib/groupdocs_signature_cloud/models/images_search_barcode_options_data.rb +0 -332
- data/lib/groupdocs_signature_cloud/models/images_search_qr_code_options_data.rb +0 -332
- data/lib/groupdocs_signature_cloud/models/images_sign_barcode_options_data.rb +0 -664
- data/lib/groupdocs_signature_cloud/models/images_sign_image_options_data.rb +0 -496
- data/lib/groupdocs_signature_cloud/models/images_sign_qr_code_options_data.rb +0 -674
- data/lib/groupdocs_signature_cloud/models/images_sign_stamp_options_data.rb +0 -592
- data/lib/groupdocs_signature_cloud/models/images_verify_barcode_options_data.rb +0 -342
- data/lib/groupdocs_signature_cloud/models/images_verify_qr_code_options_data.rb +0 -342
- data/lib/groupdocs_signature_cloud/models/pages_info.rb +0 -247
- data/lib/groupdocs_signature_cloud/models/pdf_barcode_signature_data.rb +0 -250
- data/lib/groupdocs_signature_cloud/models/pdf_search_digital_options_data.rb +0 -265
- data/lib/groupdocs_signature_cloud/models/pdf_search_qr_code_options_data.rb +0 -332
- data/lib/groupdocs_signature_cloud/models/pdf_sign_barcode_options_data.rb +0 -664
- data/lib/groupdocs_signature_cloud/models/pdf_sign_digital_options_data.rb +0 -556
- data/lib/groupdocs_signature_cloud/models/pdf_sign_image_options_data.rb +0 -496
- data/lib/groupdocs_signature_cloud/models/pdf_sign_qr_code_options_data.rb +0 -674
- data/lib/groupdocs_signature_cloud/models/pdf_sign_stamp_options_data.rb +0 -592
- data/lib/groupdocs_signature_cloud/models/pdf_sign_text_options_data.rb +0 -696
- data/lib/groupdocs_signature_cloud/models/pdf_verify_barcode_options_data.rb +0 -342
- data/lib/groupdocs_signature_cloud/models/pdf_verify_digital_options_data.rb +0 -315
- data/lib/groupdocs_signature_cloud/models/pdf_verify_qr_code_options_data.rb +0 -342
- data/lib/groupdocs_signature_cloud/models/pdf_verify_text_options_data.rb +0 -342
- data/lib/groupdocs_signature_cloud/models/qr_code_signature_data.rb +0 -250
- data/lib/groupdocs_signature_cloud/models/requests/get_document_info_from_url_request.rb +0 -55
- data/lib/groupdocs_signature_cloud/models/requests/get_document_info_request.rb +0 -59
- data/lib/groupdocs_signature_cloud/models/requests/post_barcode_from_url_request.rb +0 -59
- data/lib/groupdocs_signature_cloud/models/requests/post_barcode_request.rb +0 -63
- data/lib/groupdocs_signature_cloud/models/requests/post_collection_from_url_request.rb +0 -59
- data/lib/groupdocs_signature_cloud/models/requests/post_collection_request.rb +0 -63
- data/lib/groupdocs_signature_cloud/models/requests/post_digital_from_url_request.rb +0 -67
- data/lib/groupdocs_signature_cloud/models/requests/post_digital_request.rb +0 -71
- data/lib/groupdocs_signature_cloud/models/requests/post_image_from_url_request.rb +0 -63
- data/lib/groupdocs_signature_cloud/models/requests/post_image_request.rb +0 -67
- data/lib/groupdocs_signature_cloud/models/requests/post_qr_code_from_url_request.rb +0 -59
- data/lib/groupdocs_signature_cloud/models/requests/post_qr_code_request.rb +0 -63
- data/lib/groupdocs_signature_cloud/models/requests/post_search_barcode_from_url_request.rb +0 -59
- data/lib/groupdocs_signature_cloud/models/requests/post_search_barcode_request.rb +0 -63
- data/lib/groupdocs_signature_cloud/models/requests/post_search_collection_from_url_request.rb +0 -59
- data/lib/groupdocs_signature_cloud/models/requests/post_search_collection_request.rb +0 -63
- data/lib/groupdocs_signature_cloud/models/requests/post_search_digital_from_url_request.rb +0 -59
- data/lib/groupdocs_signature_cloud/models/requests/post_search_digital_request.rb +0 -63
- data/lib/groupdocs_signature_cloud/models/requests/post_search_qr_code_from_url_request.rb +0 -59
- data/lib/groupdocs_signature_cloud/models/requests/post_search_qr_code_request.rb +0 -63
- data/lib/groupdocs_signature_cloud/models/requests/post_stamp_from_url_request.rb +0 -59
- data/lib/groupdocs_signature_cloud/models/requests/post_stamp_request.rb +0 -63
- data/lib/groupdocs_signature_cloud/models/requests/post_text_from_url_request.rb +0 -59
- data/lib/groupdocs_signature_cloud/models/requests/post_text_request.rb +0 -63
- data/lib/groupdocs_signature_cloud/models/requests/post_verification_barcode_from_url_request.rb +0 -59
- data/lib/groupdocs_signature_cloud/models/requests/post_verification_barcode_request.rb +0 -63
- data/lib/groupdocs_signature_cloud/models/requests/post_verification_collection_from_url_request.rb +0 -59
- data/lib/groupdocs_signature_cloud/models/requests/post_verification_collection_request.rb +0 -63
- data/lib/groupdocs_signature_cloud/models/requests/post_verification_digital_from_url_request.rb +0 -63
- data/lib/groupdocs_signature_cloud/models/requests/post_verification_digital_request.rb +0 -67
- data/lib/groupdocs_signature_cloud/models/requests/post_verification_qr_code_from_url_request.rb +0 -59
- data/lib/groupdocs_signature_cloud/models/requests/post_verification_qr_code_request.rb +0 -63
- data/lib/groupdocs_signature_cloud/models/requests/post_verification_text_from_url_request.rb +0 -57
- data/lib/groupdocs_signature_cloud/models/requests/post_verification_text_request.rb +0 -63
- data/lib/groupdocs_signature_cloud/models/search_digital_options_data.rb +0 -265
- data/lib/groupdocs_signature_cloud/models/search_options_collection_data.rb +0 -232
- data/lib/groupdocs_signature_cloud/models/search_options_data.rb +0 -265
- data/lib/groupdocs_signature_cloud/models/search_qr_code_options_data.rb +0 -332
- data/lib/groupdocs_signature_cloud/models/sign_barcode_options_data.rb +0 -664
- data/lib/groupdocs_signature_cloud/models/sign_image_options_data.rb +0 -496
- data/lib/groupdocs_signature_cloud/models/sign_options_data.rb +0 -255
- data/lib/groupdocs_signature_cloud/models/sign_qr_code_options_data.rb +0 -674
- data/lib/groupdocs_signature_cloud/models/sign_text_options_data.rb +0 -562
- data/lib/groupdocs_signature_cloud/models/slides_barcode_signature_data.rb +0 -250
- data/lib/groupdocs_signature_cloud/models/slides_qr_code_signature_data.rb +0 -250
- data/lib/groupdocs_signature_cloud/models/slides_search_barcode_options_data.rb +0 -332
- data/lib/groupdocs_signature_cloud/models/slides_search_qr_code_options_data.rb +0 -332
- data/lib/groupdocs_signature_cloud/models/slides_sign_barcode_options_data.rb +0 -664
- data/lib/groupdocs_signature_cloud/models/slides_sign_image_options_data.rb +0 -496
- data/lib/groupdocs_signature_cloud/models/slides_sign_qr_code_options_data.rb +0 -674
- data/lib/groupdocs_signature_cloud/models/slides_sign_text_options_data.rb +0 -670
- data/lib/groupdocs_signature_cloud/models/slides_verify_barcode_options_data.rb +0 -342
- data/lib/groupdocs_signature_cloud/models/slides_verify_qr_code_options_data.rb +0 -342
- data/lib/groupdocs_signature_cloud/models/slides_verify_text_options_data.rb +0 -285
- data/lib/groupdocs_signature_cloud/models/verified_document_response.rb +0 -300
- data/lib/groupdocs_signature_cloud/models/verify_digital_options_data.rb +0 -285
- data/lib/groupdocs_signature_cloud/models/verify_options_collection_data.rb +0 -247
- data/lib/groupdocs_signature_cloud/models/verify_options_data.rb +0 -265
- data/lib/groupdocs_signature_cloud/models/verify_text_options_data.rb +0 -285
- data/lib/groupdocs_signature_cloud/models/words_barcode_signature_data.rb +0 -250
- data/lib/groupdocs_signature_cloud/models/words_qr_code_signature_data.rb +0 -250
- data/lib/groupdocs_signature_cloud/models/words_search_barcode_options_data.rb +0 -332
- data/lib/groupdocs_signature_cloud/models/words_search_digital_options_data.rb +0 -265
- data/lib/groupdocs_signature_cloud/models/words_search_qr_code_options_data.rb +0 -332
- data/lib/groupdocs_signature_cloud/models/words_sign_barcode_options_data.rb +0 -664
- data/lib/groupdocs_signature_cloud/models/words_sign_digital_options_data.rb +0 -516
- data/lib/groupdocs_signature_cloud/models/words_sign_image_options_data.rb +0 -496
- data/lib/groupdocs_signature_cloud/models/words_sign_qr_code_options_data.rb +0 -674
- data/lib/groupdocs_signature_cloud/models/words_sign_stamp_options_data.rb +0 -592
- data/lib/groupdocs_signature_cloud/models/words_verify_barcode_options_data.rb +0 -342
- data/lib/groupdocs_signature_cloud/models/words_verify_digital_options_data.rb +0 -315
- data/lib/groupdocs_signature_cloud/models/words_verify_qr_code_options_data.rb +0 -342
- data/lib/groupdocs_signature_cloud/models/words_verify_text_options_data.rb +0 -285
data/lib/groupdocs_signature_cloud/models/{sign_digital_options_data.rb → sign_digital_options.rb}
RENAMED
@@ -1,516 +1,612 @@
|
|
1
|
-
#
|
2
|
-
# --------------------------------------------------------------------------------------------------------------------
|
3
|
-
# <copyright company="Aspose Pty Ltd" file="
|
4
|
-
# Copyright (c) 2003-
|
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
|
-
# Represents the Digital
|
32
|
-
class
|
33
|
-
|
34
|
-
#
|
35
|
-
attr_accessor :
|
36
|
-
|
37
|
-
#
|
38
|
-
attr_accessor :
|
39
|
-
|
40
|
-
#
|
41
|
-
attr_accessor :
|
42
|
-
|
43
|
-
#
|
44
|
-
attr_accessor :
|
45
|
-
|
46
|
-
#
|
47
|
-
attr_accessor :
|
48
|
-
|
49
|
-
#
|
50
|
-
attr_accessor :
|
51
|
-
|
52
|
-
#
|
53
|
-
attr_accessor :
|
54
|
-
|
55
|
-
#
|
56
|
-
attr_accessor :
|
57
|
-
|
58
|
-
# Measure
|
59
|
-
attr_accessor :
|
60
|
-
|
61
|
-
# Measure
|
62
|
-
attr_accessor :
|
63
|
-
|
64
|
-
#
|
65
|
-
attr_accessor :
|
66
|
-
|
67
|
-
#
|
68
|
-
attr_accessor :
|
69
|
-
|
70
|
-
#
|
71
|
-
attr_accessor :
|
72
|
-
|
73
|
-
#
|
74
|
-
attr_accessor :
|
75
|
-
|
76
|
-
#
|
77
|
-
attr_accessor :
|
78
|
-
|
79
|
-
# Gets or sets the
|
80
|
-
attr_accessor :
|
81
|
-
|
82
|
-
#
|
83
|
-
attr_accessor :
|
84
|
-
|
85
|
-
# Gets or sets the
|
86
|
-
attr_accessor :
|
87
|
-
|
88
|
-
# Gets or sets the digital certificate
|
89
|
-
attr_accessor :
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
:'
|
119
|
-
:'
|
120
|
-
:'
|
121
|
-
:'
|
122
|
-
:'
|
123
|
-
:'
|
124
|
-
:'
|
125
|
-
:'
|
126
|
-
:'
|
127
|
-
:'
|
128
|
-
:'
|
129
|
-
:'
|
130
|
-
:'
|
131
|
-
:'
|
132
|
-
:'
|
133
|
-
:'
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
:'
|
145
|
-
:'
|
146
|
-
:'
|
147
|
-
:'
|
148
|
-
:'
|
149
|
-
:'
|
150
|
-
:'
|
151
|
-
:'
|
152
|
-
:'
|
153
|
-
:'
|
154
|
-
:'
|
155
|
-
:'
|
156
|
-
:'
|
157
|
-
:'
|
158
|
-
:'
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
self.
|
249
|
-
end
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
if
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
if
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
if
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
#
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
# @
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
#
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
#
|
498
|
-
# @param [
|
499
|
-
# @return [
|
500
|
-
def
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
1
|
+
#
|
2
|
+
# --------------------------------------------------------------------------------------------------------------------
|
3
|
+
# <copyright company="Aspose Pty Ltd" file="sign_digital_options.rb">
|
4
|
+
# Copyright (c) 2003-2019 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
|
+
# Represents the Digital sign options
|
32
|
+
class SignDigitalOptions
|
33
|
+
|
34
|
+
# Specifies the type of document to process
|
35
|
+
attr_accessor :document_type
|
36
|
+
|
37
|
+
# Specifies the signature type of processing
|
38
|
+
attr_accessor :signature_type
|
39
|
+
|
40
|
+
# Gets or sets a document page number for processing. Value is optional
|
41
|
+
attr_accessor :page
|
42
|
+
|
43
|
+
# Process all document pages. Type of processing depends on SignatureType For Images Document Type it can be used only for multi-frames images like .tiff
|
44
|
+
attr_accessor :all_pages
|
45
|
+
|
46
|
+
# Options to specify pages for processing
|
47
|
+
attr_accessor :pages_setup
|
48
|
+
|
49
|
+
# Gets or sets the signature image file name. This property is used only if ImageStream is not specified
|
50
|
+
attr_accessor :image_guid
|
51
|
+
|
52
|
+
# 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
|
+
attr_accessor :left
|
54
|
+
|
55
|
+
# Top Y Position of Signature on Document Page in Measure values (pixels or percent see MeasureType LocationMeasureType). (works if vertical alignment is not specified). For Spreadsheet documents this property is mutually exclusive with Row property. If Top property is set RowNumber will be reset to 0
|
56
|
+
attr_accessor :top
|
57
|
+
|
58
|
+
# Width of Signature on Document Page in Measure values (pixels or percent see MeasureType SizeMeasureType)
|
59
|
+
attr_accessor :width
|
60
|
+
|
61
|
+
# Height of Signature on Document Page in Measure values (pixels or percent see MeasureType SizeMeasureType)
|
62
|
+
attr_accessor :height
|
63
|
+
|
64
|
+
# Measure type (pixels or percent) for Left and Top properties
|
65
|
+
attr_accessor :location_measure_type
|
66
|
+
|
67
|
+
# Measure type (pixels or percent) for Width and Height properties
|
68
|
+
attr_accessor :size_measure_type
|
69
|
+
|
70
|
+
# Rotation angle of signature on document page (clockwise)
|
71
|
+
attr_accessor :rotation_angle
|
72
|
+
|
73
|
+
# Horizontal alignment of signature on document page
|
74
|
+
attr_accessor :horizontal_alignment
|
75
|
+
|
76
|
+
# Vertical alignment of signature on document page
|
77
|
+
attr_accessor :vertical_alignment
|
78
|
+
|
79
|
+
# Gets or sets the space between Sign and Document edges (works ONLY if horizontal or vertical alignment are specified)
|
80
|
+
attr_accessor :margin
|
81
|
+
|
82
|
+
# Gets or sets the measure type (pixels or percent) for Margin
|
83
|
+
attr_accessor :margin_measure_type
|
84
|
+
|
85
|
+
# Gets or sets the additional opacity for sign image (value from 0.0 (clear) through 1.0 (opaque)). By default the value is 1.0
|
86
|
+
attr_accessor :opacity
|
87
|
+
|
88
|
+
# Gets or sets the password of digital certificate
|
89
|
+
attr_accessor :password
|
90
|
+
|
91
|
+
# Gets or sets the digital certificate file GUID
|
92
|
+
attr_accessor :certificate_guid
|
93
|
+
class EnumAttributeValidator
|
94
|
+
attr_reader :datatype
|
95
|
+
attr_reader :allowable_values
|
96
|
+
|
97
|
+
def initialize(datatype, allowable_values)
|
98
|
+
@allowable_values = allowable_values.map do |value|
|
99
|
+
case datatype.to_s
|
100
|
+
when /Integer/i
|
101
|
+
value.to_i
|
102
|
+
when /Float/i
|
103
|
+
value.to_f
|
104
|
+
else
|
105
|
+
value
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
def valid?(value)
|
111
|
+
!value || allowable_values.include?(value)
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
116
|
+
def self.attribute_map
|
117
|
+
{
|
118
|
+
:'document_type' => :'DocumentType',
|
119
|
+
:'signature_type' => :'SignatureType',
|
120
|
+
:'page' => :'Page',
|
121
|
+
:'all_pages' => :'AllPages',
|
122
|
+
:'pages_setup' => :'PagesSetup',
|
123
|
+
:'image_guid' => :'ImageGuid',
|
124
|
+
:'left' => :'Left',
|
125
|
+
:'top' => :'Top',
|
126
|
+
:'width' => :'Width',
|
127
|
+
:'height' => :'Height',
|
128
|
+
:'location_measure_type' => :'LocationMeasureType',
|
129
|
+
:'size_measure_type' => :'SizeMeasureType',
|
130
|
+
:'rotation_angle' => :'RotationAngle',
|
131
|
+
:'horizontal_alignment' => :'HorizontalAlignment',
|
132
|
+
:'vertical_alignment' => :'VerticalAlignment',
|
133
|
+
:'margin' => :'Margin',
|
134
|
+
:'margin_measure_type' => :'MarginMeasureType',
|
135
|
+
:'opacity' => :'Opacity',
|
136
|
+
:'password' => :'Password',
|
137
|
+
:'certificate_guid' => :'CertificateGuid'
|
138
|
+
}
|
139
|
+
end
|
140
|
+
|
141
|
+
# Attribute type mapping.
|
142
|
+
def self.swagger_types
|
143
|
+
{
|
144
|
+
:'document_type' => :'String',
|
145
|
+
:'signature_type' => :'String',
|
146
|
+
:'page' => :'Integer',
|
147
|
+
:'all_pages' => :'BOOLEAN',
|
148
|
+
:'pages_setup' => :'PagesSetup',
|
149
|
+
:'image_guid' => :'String',
|
150
|
+
:'left' => :'Integer',
|
151
|
+
:'top' => :'Integer',
|
152
|
+
:'width' => :'Integer',
|
153
|
+
:'height' => :'Integer',
|
154
|
+
:'location_measure_type' => :'String',
|
155
|
+
:'size_measure_type' => :'String',
|
156
|
+
:'rotation_angle' => :'Integer',
|
157
|
+
:'horizontal_alignment' => :'String',
|
158
|
+
:'vertical_alignment' => :'String',
|
159
|
+
:'margin' => :'Padding',
|
160
|
+
:'margin_measure_type' => :'String',
|
161
|
+
:'opacity' => :'Float',
|
162
|
+
:'password' => :'String',
|
163
|
+
:'certificate_guid' => :'String'
|
164
|
+
}
|
165
|
+
end
|
166
|
+
|
167
|
+
# Initializes the object
|
168
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
169
|
+
def initialize(attributes = {})
|
170
|
+
return unless attributes.is_a?(Hash)
|
171
|
+
|
172
|
+
# convert string to symbol for hash key
|
173
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
174
|
+
|
175
|
+
if attributes.key?(:'DocumentType')
|
176
|
+
self.document_type = attributes[:'DocumentType']
|
177
|
+
end
|
178
|
+
|
179
|
+
if attributes.key?(:'SignatureType')
|
180
|
+
self.signature_type = attributes[:'SignatureType']
|
181
|
+
end
|
182
|
+
|
183
|
+
if attributes.key?(:'Page')
|
184
|
+
self.page = attributes[:'Page']
|
185
|
+
end
|
186
|
+
|
187
|
+
if attributes.key?(:'AllPages')
|
188
|
+
self.all_pages = attributes[:'AllPages']
|
189
|
+
end
|
190
|
+
|
191
|
+
if attributes.key?(:'PagesSetup')
|
192
|
+
self.pages_setup = attributes[:'PagesSetup']
|
193
|
+
end
|
194
|
+
|
195
|
+
if attributes.key?(:'ImageGuid')
|
196
|
+
self.image_guid = attributes[:'ImageGuid']
|
197
|
+
end
|
198
|
+
|
199
|
+
if attributes.key?(:'Left')
|
200
|
+
self.left = attributes[:'Left']
|
201
|
+
end
|
202
|
+
|
203
|
+
if attributes.key?(:'Top')
|
204
|
+
self.top = attributes[:'Top']
|
205
|
+
end
|
206
|
+
|
207
|
+
if attributes.key?(:'Width')
|
208
|
+
self.width = attributes[:'Width']
|
209
|
+
end
|
210
|
+
|
211
|
+
if attributes.key?(:'Height')
|
212
|
+
self.height = attributes[:'Height']
|
213
|
+
end
|
214
|
+
|
215
|
+
if attributes.key?(:'LocationMeasureType')
|
216
|
+
self.location_measure_type = attributes[:'LocationMeasureType']
|
217
|
+
end
|
218
|
+
|
219
|
+
if attributes.key?(:'SizeMeasureType')
|
220
|
+
self.size_measure_type = attributes[:'SizeMeasureType']
|
221
|
+
end
|
222
|
+
|
223
|
+
if attributes.key?(:'RotationAngle')
|
224
|
+
self.rotation_angle = attributes[:'RotationAngle']
|
225
|
+
end
|
226
|
+
|
227
|
+
if attributes.key?(:'HorizontalAlignment')
|
228
|
+
self.horizontal_alignment = attributes[:'HorizontalAlignment']
|
229
|
+
end
|
230
|
+
|
231
|
+
if attributes.key?(:'VerticalAlignment')
|
232
|
+
self.vertical_alignment = attributes[:'VerticalAlignment']
|
233
|
+
end
|
234
|
+
|
235
|
+
if attributes.key?(:'Margin')
|
236
|
+
self.margin = attributes[:'Margin']
|
237
|
+
end
|
238
|
+
|
239
|
+
if attributes.key?(:'MarginMeasureType')
|
240
|
+
self.margin_measure_type = attributes[:'MarginMeasureType']
|
241
|
+
end
|
242
|
+
|
243
|
+
if attributes.key?(:'Opacity')
|
244
|
+
self.opacity = attributes[:'Opacity']
|
245
|
+
end
|
246
|
+
|
247
|
+
if attributes.key?(:'Password')
|
248
|
+
self.password = attributes[:'Password']
|
249
|
+
end
|
250
|
+
|
251
|
+
if attributes.key?(:'CertificateGuid')
|
252
|
+
self.certificate_guid = attributes[:'CertificateGuid']
|
253
|
+
end
|
254
|
+
|
255
|
+
end
|
256
|
+
|
257
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
258
|
+
# @return Array for valid properies with the reasons
|
259
|
+
def list_invalid_properties
|
260
|
+
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
|
+
if @signature_type.nil?
|
266
|
+
invalid_properties.push("invalid value for 'signature_type', signature_type cannot be nil.")
|
267
|
+
end
|
268
|
+
|
269
|
+
if @all_pages.nil?
|
270
|
+
invalid_properties.push("invalid value for 'all_pages', all_pages cannot be nil.")
|
271
|
+
end
|
272
|
+
|
273
|
+
if @left.nil?
|
274
|
+
invalid_properties.push("invalid value for 'left', left cannot be nil.")
|
275
|
+
end
|
276
|
+
|
277
|
+
if @top.nil?
|
278
|
+
invalid_properties.push("invalid value for 'top', top cannot be nil.")
|
279
|
+
end
|
280
|
+
|
281
|
+
if @width.nil?
|
282
|
+
invalid_properties.push("invalid value for 'width', width cannot be nil.")
|
283
|
+
end
|
284
|
+
|
285
|
+
if @height.nil?
|
286
|
+
invalid_properties.push("invalid value for 'height', height cannot be nil.")
|
287
|
+
end
|
288
|
+
|
289
|
+
if @location_measure_type.nil?
|
290
|
+
invalid_properties.push("invalid value for 'location_measure_type', location_measure_type cannot be nil.")
|
291
|
+
end
|
292
|
+
|
293
|
+
if @size_measure_type.nil?
|
294
|
+
invalid_properties.push("invalid value for 'size_measure_type', size_measure_type cannot be nil.")
|
295
|
+
end
|
296
|
+
|
297
|
+
if @rotation_angle.nil?
|
298
|
+
invalid_properties.push("invalid value for 'rotation_angle', rotation_angle cannot be nil.")
|
299
|
+
end
|
300
|
+
|
301
|
+
if @horizontal_alignment.nil?
|
302
|
+
invalid_properties.push("invalid value for 'horizontal_alignment', horizontal_alignment cannot be nil.")
|
303
|
+
end
|
304
|
+
|
305
|
+
if @vertical_alignment.nil?
|
306
|
+
invalid_properties.push("invalid value for 'vertical_alignment', vertical_alignment cannot be nil.")
|
307
|
+
end
|
308
|
+
|
309
|
+
if @margin_measure_type.nil?
|
310
|
+
invalid_properties.push("invalid value for 'margin_measure_type', margin_measure_type cannot be nil.")
|
311
|
+
end
|
312
|
+
|
313
|
+
if @opacity.nil?
|
314
|
+
invalid_properties.push("invalid value for 'opacity', opacity cannot be nil.")
|
315
|
+
end
|
316
|
+
|
317
|
+
return invalid_properties
|
318
|
+
end
|
319
|
+
|
320
|
+
# Check to see if the all the properties in the model are valid
|
321
|
+
# @return true if the model is valid
|
322
|
+
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
|
+
return false if @signature_type.nil?
|
327
|
+
signature_type_validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp"])
|
328
|
+
return false unless signature_type_validator.valid?(@signature_type)
|
329
|
+
return false if @all_pages.nil?
|
330
|
+
return false if @left.nil?
|
331
|
+
return false if @top.nil?
|
332
|
+
return false if @width.nil?
|
333
|
+
return false if @height.nil?
|
334
|
+
return false if @location_measure_type.nil?
|
335
|
+
location_measure_type_validator = EnumAttributeValidator.new('String', ["Pixels", "Percents", "Millimeters"])
|
336
|
+
return false unless location_measure_type_validator.valid?(@location_measure_type)
|
337
|
+
return false if @size_measure_type.nil?
|
338
|
+
size_measure_type_validator = EnumAttributeValidator.new('String', ["Pixels", "Percents", "Millimeters"])
|
339
|
+
return false unless size_measure_type_validator.valid?(@size_measure_type)
|
340
|
+
return false if @rotation_angle.nil?
|
341
|
+
return false if @horizontal_alignment.nil?
|
342
|
+
horizontal_alignment_validator = EnumAttributeValidator.new('String', ["Default", "None", "Left", "Center", "Right"])
|
343
|
+
return false unless horizontal_alignment_validator.valid?(@horizontal_alignment)
|
344
|
+
return false if @vertical_alignment.nil?
|
345
|
+
vertical_alignment_validator = EnumAttributeValidator.new('String', ["Default", "None", "Top", "Center", "Bottom"])
|
346
|
+
return false unless vertical_alignment_validator.valid?(@vertical_alignment)
|
347
|
+
return false if @margin_measure_type.nil?
|
348
|
+
margin_measure_type_validator = EnumAttributeValidator.new('String', ["Pixels", "Percents", "Millimeters"])
|
349
|
+
return false unless margin_measure_type_validator.valid?(@margin_measure_type)
|
350
|
+
return false if @opacity.nil?
|
351
|
+
return true
|
352
|
+
end
|
353
|
+
|
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
|
+
# Custom attribute writer method checking allowed values (enum).
|
369
|
+
# @param [Object] signature_type Object to be assigned
|
370
|
+
def signature_type=(signature_type)
|
371
|
+
validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp"])
|
372
|
+
if signature_type.to_i == 0
|
373
|
+
unless validator.valid?(signature_type)
|
374
|
+
raise ArgumentError, "invalid value for 'signature_type', must be one of #{validator.allowable_values}."
|
375
|
+
end
|
376
|
+
@signature_type = signature_type
|
377
|
+
else
|
378
|
+
@signature_type = validator.allowable_values[signature_type.to_i]
|
379
|
+
end
|
380
|
+
end
|
381
|
+
|
382
|
+
# Custom attribute writer method checking allowed values (enum).
|
383
|
+
# @param [Object] location_measure_type Object to be assigned
|
384
|
+
def location_measure_type=(location_measure_type)
|
385
|
+
validator = EnumAttributeValidator.new('String', ["Pixels", "Percents", "Millimeters"])
|
386
|
+
if location_measure_type.to_i == 0
|
387
|
+
unless validator.valid?(location_measure_type)
|
388
|
+
raise ArgumentError, "invalid value for 'location_measure_type', must be one of #{validator.allowable_values}."
|
389
|
+
end
|
390
|
+
@location_measure_type = location_measure_type
|
391
|
+
else
|
392
|
+
@location_measure_type = validator.allowable_values[location_measure_type.to_i]
|
393
|
+
end
|
394
|
+
end
|
395
|
+
|
396
|
+
# Custom attribute writer method checking allowed values (enum).
|
397
|
+
# @param [Object] size_measure_type Object to be assigned
|
398
|
+
def size_measure_type=(size_measure_type)
|
399
|
+
validator = EnumAttributeValidator.new('String', ["Pixels", "Percents", "Millimeters"])
|
400
|
+
if size_measure_type.to_i == 0
|
401
|
+
unless validator.valid?(size_measure_type)
|
402
|
+
raise ArgumentError, "invalid value for 'size_measure_type', must be one of #{validator.allowable_values}."
|
403
|
+
end
|
404
|
+
@size_measure_type = size_measure_type
|
405
|
+
else
|
406
|
+
@size_measure_type = validator.allowable_values[size_measure_type.to_i]
|
407
|
+
end
|
408
|
+
end
|
409
|
+
|
410
|
+
# Custom attribute writer method checking allowed values (enum).
|
411
|
+
# @param [Object] horizontal_alignment Object to be assigned
|
412
|
+
def horizontal_alignment=(horizontal_alignment)
|
413
|
+
validator = EnumAttributeValidator.new('String', ["Default", "None", "Left", "Center", "Right"])
|
414
|
+
if horizontal_alignment.to_i == 0
|
415
|
+
unless validator.valid?(horizontal_alignment)
|
416
|
+
raise ArgumentError, "invalid value for 'horizontal_alignment', must be one of #{validator.allowable_values}."
|
417
|
+
end
|
418
|
+
@horizontal_alignment = horizontal_alignment
|
419
|
+
else
|
420
|
+
@horizontal_alignment = validator.allowable_values[horizontal_alignment.to_i]
|
421
|
+
end
|
422
|
+
end
|
423
|
+
|
424
|
+
# Custom attribute writer method checking allowed values (enum).
|
425
|
+
# @param [Object] vertical_alignment Object to be assigned
|
426
|
+
def vertical_alignment=(vertical_alignment)
|
427
|
+
validator = EnumAttributeValidator.new('String', ["Default", "None", "Top", "Center", "Bottom"])
|
428
|
+
if vertical_alignment.to_i == 0
|
429
|
+
unless validator.valid?(vertical_alignment)
|
430
|
+
raise ArgumentError, "invalid value for 'vertical_alignment', must be one of #{validator.allowable_values}."
|
431
|
+
end
|
432
|
+
@vertical_alignment = vertical_alignment
|
433
|
+
else
|
434
|
+
@vertical_alignment = validator.allowable_values[vertical_alignment.to_i]
|
435
|
+
end
|
436
|
+
end
|
437
|
+
|
438
|
+
# Custom attribute writer method checking allowed values (enum).
|
439
|
+
# @param [Object] margin_measure_type Object to be assigned
|
440
|
+
def margin_measure_type=(margin_measure_type)
|
441
|
+
validator = EnumAttributeValidator.new('String', ["Pixels", "Percents", "Millimeters"])
|
442
|
+
if margin_measure_type.to_i == 0
|
443
|
+
unless validator.valid?(margin_measure_type)
|
444
|
+
raise ArgumentError, "invalid value for 'margin_measure_type', must be one of #{validator.allowable_values}."
|
445
|
+
end
|
446
|
+
@margin_measure_type = margin_measure_type
|
447
|
+
else
|
448
|
+
@margin_measure_type = validator.allowable_values[margin_measure_type.to_i]
|
449
|
+
end
|
450
|
+
end
|
451
|
+
|
452
|
+
# Checks equality by comparing each attribute.
|
453
|
+
# @param [Object] Object to be compared
|
454
|
+
def ==(other)
|
455
|
+
return true if self.equal?(other)
|
456
|
+
self.class == other.class &&
|
457
|
+
document_type == other.document_type &&
|
458
|
+
signature_type == other.signature_type &&
|
459
|
+
page == other.page &&
|
460
|
+
all_pages == other.all_pages &&
|
461
|
+
pages_setup == other.pages_setup &&
|
462
|
+
image_guid == other.image_guid &&
|
463
|
+
left == other.left &&
|
464
|
+
top == other.top &&
|
465
|
+
width == other.width &&
|
466
|
+
height == other.height &&
|
467
|
+
location_measure_type == other.location_measure_type &&
|
468
|
+
size_measure_type == other.size_measure_type &&
|
469
|
+
rotation_angle == other.rotation_angle &&
|
470
|
+
horizontal_alignment == other.horizontal_alignment &&
|
471
|
+
vertical_alignment == other.vertical_alignment &&
|
472
|
+
margin == other.margin &&
|
473
|
+
margin_measure_type == other.margin_measure_type &&
|
474
|
+
opacity == other.opacity &&
|
475
|
+
password == other.password &&
|
476
|
+
certificate_guid == other.certificate_guid
|
477
|
+
end
|
478
|
+
|
479
|
+
# @see the `==` method
|
480
|
+
# @param [Object] Object to be compared
|
481
|
+
def eql?(other)
|
482
|
+
self == other
|
483
|
+
end
|
484
|
+
|
485
|
+
# Calculates hash code according to all attributes.
|
486
|
+
# @return [Fixnum] Hash code
|
487
|
+
def hash
|
488
|
+
[document_type, signature_type, page, all_pages, pages_setup, image_guid, left, top, width, height, location_measure_type, size_measure_type, rotation_angle, horizontal_alignment, vertical_alignment, margin, margin_measure_type, opacity, password, certificate_guid].hash
|
489
|
+
end
|
490
|
+
|
491
|
+
# Downcases first letter.
|
492
|
+
# @return downcased string
|
493
|
+
def uncap(str)
|
494
|
+
str[0, 1].downcase + str[1..-1]
|
495
|
+
end
|
496
|
+
|
497
|
+
# Builds the object from hash
|
498
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
499
|
+
# @return [Object] Returns the model itself
|
500
|
+
def build_from_hash(attributes)
|
501
|
+
return nil unless attributes.is_a?(Hash)
|
502
|
+
self.class.swagger_types.each_pair do |key, type|
|
503
|
+
pname = uncap(self.class.attribute_map[key]).intern
|
504
|
+
value = attributes[pname]
|
505
|
+
if type =~ /\AArray<(.*)>/i
|
506
|
+
# check to ensure the input is an array given that the the attribute
|
507
|
+
# is documented as an array but the input is not
|
508
|
+
if value.is_a?(Array)
|
509
|
+
self.send("#{key}=", value.map { |v| _deserialize($1, v) })
|
510
|
+
end
|
511
|
+
elsif !value.nil?
|
512
|
+
self.send("#{key}=", _deserialize(type, value))
|
513
|
+
end
|
514
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
515
|
+
end
|
516
|
+
|
517
|
+
self
|
518
|
+
end
|
519
|
+
|
520
|
+
# Deserializes the data based on type
|
521
|
+
# @param string type Data type
|
522
|
+
# @param string value Value to be deserialized
|
523
|
+
# @return [Object] Deserialized data
|
524
|
+
def _deserialize(type, value)
|
525
|
+
case type.to_sym
|
526
|
+
when :DateTime
|
527
|
+
Date.parse value
|
528
|
+
when :Date
|
529
|
+
Date.parse value
|
530
|
+
when :String
|
531
|
+
value.to_s
|
532
|
+
when :Integer
|
533
|
+
value.to_i
|
534
|
+
when :Float
|
535
|
+
value.to_f
|
536
|
+
when :BOOLEAN
|
537
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
538
|
+
true
|
539
|
+
else
|
540
|
+
false
|
541
|
+
end
|
542
|
+
when :Object
|
543
|
+
# generic object (usually a Hash), return directly
|
544
|
+
value
|
545
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
546
|
+
inner_type = Regexp.last_match[:inner_type]
|
547
|
+
value.map { |v| _deserialize(inner_type, v) }
|
548
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
549
|
+
k_type = Regexp.last_match[:k_type]
|
550
|
+
v_type = Regexp.last_match[:v_type]
|
551
|
+
{}.tap do |hash|
|
552
|
+
value.each do |k, v|
|
553
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
554
|
+
end
|
555
|
+
end
|
556
|
+
else
|
557
|
+
# model
|
558
|
+
# Signature type fix
|
559
|
+
ttype = type
|
560
|
+
if value.is_a?(Hash) and !value[:signatureType].nil?
|
561
|
+
ttype = value[:signatureType] + 'Signature'
|
562
|
+
end
|
563
|
+
temp_model = GroupDocsSignatureCloud.const_get(ttype).new
|
564
|
+
temp_model.build_from_hash(value)
|
565
|
+
end
|
566
|
+
end
|
567
|
+
|
568
|
+
# Returns the string representation of the object
|
569
|
+
# @return [String] String presentation of the object
|
570
|
+
def to_s
|
571
|
+
to_hash.to_s
|
572
|
+
end
|
573
|
+
|
574
|
+
# to_body is an alias to to_hash (backward compatibility)
|
575
|
+
# @return [Hash] Returns the object in the form of hash
|
576
|
+
def to_body
|
577
|
+
to_hash
|
578
|
+
end
|
579
|
+
|
580
|
+
# Returns the object in the form of hash
|
581
|
+
# @return [Hash] Returns the object in the form of hash
|
582
|
+
def to_hash
|
583
|
+
hash = {}
|
584
|
+
self.class.attribute_map.each_pair do |attr, param|
|
585
|
+
value = self.send(attr)
|
586
|
+
next if value.nil?
|
587
|
+
hash[param] = _to_hash(value)
|
588
|
+
end
|
589
|
+
hash
|
590
|
+
end
|
591
|
+
|
592
|
+
# Outputs non-array value in the form of hash
|
593
|
+
# For object, use to_hash. Otherwise, just return the value
|
594
|
+
# @param [Object] value Any valid value
|
595
|
+
# @return [Hash] Returns the value in the form of hash
|
596
|
+
def _to_hash(value)
|
597
|
+
if value.is_a?(Array)
|
598
|
+
value.compact.map { |v| _to_hash(v) }
|
599
|
+
elsif value.is_a?(Hash)
|
600
|
+
{}.tap do |hash|
|
601
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
602
|
+
end
|
603
|
+
elsif value.respond_to? :to_hash
|
604
|
+
value.to_hash
|
605
|
+
else
|
606
|
+
value
|
607
|
+
end
|
608
|
+
end
|
609
|
+
|
610
|
+
end
|
611
|
+
|
612
|
+
end
|