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.
Files changed (185) hide show
  1. checksums.yaml +5 -5
  2. data/lib/groupdocs_signature_cloud.rb +99 -191
  3. data/lib/groupdocs_signature_cloud/api/file_api.rb +734 -0
  4. data/lib/groupdocs_signature_cloud/api/folder_api.rb +699 -0
  5. data/lib/groupdocs_signature_cloud/api/info_api.rb +364 -0
  6. data/lib/groupdocs_signature_cloud/api/sign_api.rb +411 -0
  7. data/lib/groupdocs_signature_cloud/api/storage_api.rb +544 -0
  8. data/lib/groupdocs_signature_cloud/api_client.rb +382 -380
  9. data/lib/groupdocs_signature_cloud/api_error.rb +58 -58
  10. data/lib/groupdocs_signature_cloud/configuration.rb +95 -110
  11. data/lib/groupdocs_signature_cloud/models/{digital_signature_data.rb → barcode_signature.rb} +312 -307
  12. data/lib/groupdocs_signature_cloud/models/barcode_type.rb +219 -230
  13. data/lib/groupdocs_signature_cloud/models/{barcode_collection.rb → barcodes_result.rb} +221 -232
  14. data/lib/groupdocs_signature_cloud/models/base_settings.rb +219 -0
  15. data/lib/groupdocs_signature_cloud/models/{border_line_data.rb → border_line.rb} +301 -312
  16. data/lib/groupdocs_signature_cloud/models/{brush_data.rb → brush.rb} +219 -230
  17. data/lib/groupdocs_signature_cloud/models/color.rb +219 -245
  18. data/lib/groupdocs_signature_cloud/models/{pdf_digital_signature_data.rb → digital_signature.rb} +363 -307
  19. data/lib/groupdocs_signature_cloud/models/disc_usage.rb +239 -0
  20. data/lib/groupdocs_signature_cloud/models/error.rb +249 -0
  21. data/lib/groupdocs_signature_cloud/models/error_details.rb +234 -0
  22. data/lib/groupdocs_signature_cloud/models/file_info.rb +249 -0
  23. data/lib/groupdocs_signature_cloud/models/{document_info.rb → file_version.rb} +294 -300
  24. data/lib/groupdocs_signature_cloud/models/file_versions.rb +221 -0
  25. data/lib/groupdocs_signature_cloud/models/files_list.rb +221 -0
  26. data/lib/groupdocs_signature_cloud/models/{base_signature_data.rb → files_upload_result.rb} +233 -230
  27. data/lib/groupdocs_signature_cloud/models/format.rb +229 -240
  28. data/lib/groupdocs_signature_cloud/models/{format_collection.rb → formats_result.rb} +221 -232
  29. data/lib/groupdocs_signature_cloud/models/{search_document_response.rb → info_result.rb} +339 -303
  30. data/lib/groupdocs_signature_cloud/models/info_settings.rb +219 -0
  31. data/lib/groupdocs_signature_cloud/models/{linear_gradient_brush_data.rb → linear_gradient_brush.rb} +254 -260
  32. data/lib/groupdocs_signature_cloud/models/object_exist.rb +239 -0
  33. data/lib/groupdocs_signature_cloud/models/options_base.rb +327 -0
  34. data/lib/groupdocs_signature_cloud/models/{padding_data.rb → padding.rb} +284 -295
  35. data/lib/groupdocs_signature_cloud/models/page_info.rb +294 -305
  36. data/lib/groupdocs_signature_cloud/models/{pages_setup_data.rb → pages_setup.rb} +281 -292
  37. data/lib/groupdocs_signature_cloud/models/{words_digital_signature_data.rb → qr_code_signature.rb} +312 -307
  38. data/lib/groupdocs_signature_cloud/models/qr_code_type.rb +219 -230
  39. data/lib/groupdocs_signature_cloud/models/{qr_code_collection.rb → qr_codes_result.rb} +221 -232
  40. data/lib/groupdocs_signature_cloud/models/{radial_gradient_brush_data.rb → radial_gradient_brush.rb} +239 -250
  41. data/lib/groupdocs_signature_cloud/models/save_options.rb +244 -0
  42. data/lib/groupdocs_signature_cloud/models/{search_barcode_options_data.rb → search_barcode_options.rb} +378 -332
  43. data/lib/groupdocs_signature_cloud/models/search_digital_options.rb +327 -0
  44. data/lib/groupdocs_signature_cloud/models/search_options.rb +327 -0
  45. data/lib/groupdocs_signature_cloud/models/{pdf_search_barcode_options_data.rb → search_qr_code_options.rb} +378 -332
  46. data/lib/groupdocs_signature_cloud/models/{sign_options_collection_data.rb → search_result.rb} +246 -232
  47. data/lib/groupdocs_signature_cloud/models/search_settings.rb +231 -0
  48. data/lib/groupdocs_signature_cloud/models/{images_sign_text_options_data.rb → sign_barcode_options.rb} +857 -706
  49. data/lib/groupdocs_signature_cloud/models/{sign_digital_options_data.rb → sign_digital_options.rb} +612 -516
  50. data/lib/groupdocs_signature_cloud/models/{sign_stamp_options_data.rb → sign_image_options.rb} +592 -592
  51. data/lib/groupdocs_signature_cloud/models/sign_options.rb +327 -0
  52. data/lib/groupdocs_signature_cloud/models/{words_sign_text_options_data.rb → sign_qr_code_options.rb} +872 -696
  53. data/lib/groupdocs_signature_cloud/models/sign_result.rb +244 -0
  54. data/lib/groupdocs_signature_cloud/models/sign_settings.rb +241 -0
  55. data/lib/groupdocs_signature_cloud/models/{slides_sign_stamp_options_data.rb → sign_stamp_options.rb} +698 -592
  56. data/lib/groupdocs_signature_cloud/models/{cells_sign_text_options_data.rb → sign_text_options.rb} +781 -736
  57. data/lib/groupdocs_signature_cloud/models/{signature_document_response.rb → signature.rb} +292 -290
  58. data/lib/groupdocs_signature_cloud/models/{signature_font_data.rb → signature_font.rb} +279 -290
  59. data/lib/groupdocs_signature_cloud/models/{solid_brush_data.rb → solid_brush.rb} +229 -240
  60. data/lib/groupdocs_signature_cloud/models/{stamp_line_data.rb → stamp_line.rb} +366 -377
  61. data/lib/groupdocs_signature_cloud/models/storage_exist.rb +224 -0
  62. data/lib/groupdocs_signature_cloud/models/{pdf_qr_code_signature_data.rb → storage_file.rb} +269 -250
  63. data/lib/groupdocs_signature_cloud/models/{texture_brush_data.rb → texture_brush.rb} +229 -240
  64. data/lib/groupdocs_signature_cloud/models/{verify_barcode_options_data.rb → verify_barcode_options.rb} +378 -342
  65. data/lib/groupdocs_signature_cloud/models/{cells_verify_digital_options_data.rb → verify_digital_options.rb} +407 -315
  66. data/lib/groupdocs_signature_cloud/models/{cells_digital_signature_data.rb → verify_options.rb} +327 -307
  67. data/lib/groupdocs_signature_cloud/models/{verify_qr_code_options_data.rb → verify_qr_code_options.rb} +378 -342
  68. data/lib/groupdocs_signature_cloud/models/verify_result.rb +249 -0
  69. data/lib/groupdocs_signature_cloud/models/verify_settings.rb +231 -0
  70. data/lib/groupdocs_signature_cloud/models/{cells_verify_barcode_options_data.rb → verify_text_options.rb} +368 -342
  71. data/lib/groupdocs_signature_cloud/version.rb +2 -2
  72. metadata +63 -171
  73. data/lib/groupdocs_signature_cloud/api/signature_api.rb +0 -2590
  74. data/lib/groupdocs_signature_cloud/models/barcode_signature_data.rb +0 -250
  75. data/lib/groupdocs_signature_cloud/models/cells_barcode_signature_data.rb +0 -250
  76. data/lib/groupdocs_signature_cloud/models/cells_qr_code_signature_data.rb +0 -250
  77. data/lib/groupdocs_signature_cloud/models/cells_search_barcode_options_data.rb +0 -332
  78. data/lib/groupdocs_signature_cloud/models/cells_search_digital_options_data.rb +0 -265
  79. data/lib/groupdocs_signature_cloud/models/cells_search_qr_code_options_data.rb +0 -332
  80. data/lib/groupdocs_signature_cloud/models/cells_sign_barcode_options_data.rb +0 -694
  81. data/lib/groupdocs_signature_cloud/models/cells_sign_digital_options_data.rb +0 -546
  82. data/lib/groupdocs_signature_cloud/models/cells_sign_image_options_data.rb +0 -526
  83. data/lib/groupdocs_signature_cloud/models/cells_sign_qr_code_options_data.rb +0 -704
  84. data/lib/groupdocs_signature_cloud/models/cells_sign_stamp_options_data.rb +0 -622
  85. data/lib/groupdocs_signature_cloud/models/cells_verify_qr_code_options_data.rb +0 -342
  86. data/lib/groupdocs_signature_cloud/models/cells_verify_text_options_data.rb +0 -285
  87. data/lib/groupdocs_signature_cloud/models/document_response.rb +0 -302
  88. data/lib/groupdocs_signature_cloud/models/images_barcode_signature_data.rb +0 -250
  89. data/lib/groupdocs_signature_cloud/models/images_qr_code_signature_data.rb +0 -250
  90. data/lib/groupdocs_signature_cloud/models/images_search_barcode_options_data.rb +0 -332
  91. data/lib/groupdocs_signature_cloud/models/images_search_qr_code_options_data.rb +0 -332
  92. data/lib/groupdocs_signature_cloud/models/images_sign_barcode_options_data.rb +0 -664
  93. data/lib/groupdocs_signature_cloud/models/images_sign_image_options_data.rb +0 -496
  94. data/lib/groupdocs_signature_cloud/models/images_sign_qr_code_options_data.rb +0 -674
  95. data/lib/groupdocs_signature_cloud/models/images_sign_stamp_options_data.rb +0 -592
  96. data/lib/groupdocs_signature_cloud/models/images_verify_barcode_options_data.rb +0 -342
  97. data/lib/groupdocs_signature_cloud/models/images_verify_qr_code_options_data.rb +0 -342
  98. data/lib/groupdocs_signature_cloud/models/pages_info.rb +0 -247
  99. data/lib/groupdocs_signature_cloud/models/pdf_barcode_signature_data.rb +0 -250
  100. data/lib/groupdocs_signature_cloud/models/pdf_search_digital_options_data.rb +0 -265
  101. data/lib/groupdocs_signature_cloud/models/pdf_search_qr_code_options_data.rb +0 -332
  102. data/lib/groupdocs_signature_cloud/models/pdf_sign_barcode_options_data.rb +0 -664
  103. data/lib/groupdocs_signature_cloud/models/pdf_sign_digital_options_data.rb +0 -556
  104. data/lib/groupdocs_signature_cloud/models/pdf_sign_image_options_data.rb +0 -496
  105. data/lib/groupdocs_signature_cloud/models/pdf_sign_qr_code_options_data.rb +0 -674
  106. data/lib/groupdocs_signature_cloud/models/pdf_sign_stamp_options_data.rb +0 -592
  107. data/lib/groupdocs_signature_cloud/models/pdf_sign_text_options_data.rb +0 -696
  108. data/lib/groupdocs_signature_cloud/models/pdf_verify_barcode_options_data.rb +0 -342
  109. data/lib/groupdocs_signature_cloud/models/pdf_verify_digital_options_data.rb +0 -315
  110. data/lib/groupdocs_signature_cloud/models/pdf_verify_qr_code_options_data.rb +0 -342
  111. data/lib/groupdocs_signature_cloud/models/pdf_verify_text_options_data.rb +0 -342
  112. data/lib/groupdocs_signature_cloud/models/qr_code_signature_data.rb +0 -250
  113. data/lib/groupdocs_signature_cloud/models/requests/get_document_info_from_url_request.rb +0 -55
  114. data/lib/groupdocs_signature_cloud/models/requests/get_document_info_request.rb +0 -59
  115. data/lib/groupdocs_signature_cloud/models/requests/post_barcode_from_url_request.rb +0 -59
  116. data/lib/groupdocs_signature_cloud/models/requests/post_barcode_request.rb +0 -63
  117. data/lib/groupdocs_signature_cloud/models/requests/post_collection_from_url_request.rb +0 -59
  118. data/lib/groupdocs_signature_cloud/models/requests/post_collection_request.rb +0 -63
  119. data/lib/groupdocs_signature_cloud/models/requests/post_digital_from_url_request.rb +0 -67
  120. data/lib/groupdocs_signature_cloud/models/requests/post_digital_request.rb +0 -71
  121. data/lib/groupdocs_signature_cloud/models/requests/post_image_from_url_request.rb +0 -63
  122. data/lib/groupdocs_signature_cloud/models/requests/post_image_request.rb +0 -67
  123. data/lib/groupdocs_signature_cloud/models/requests/post_qr_code_from_url_request.rb +0 -59
  124. data/lib/groupdocs_signature_cloud/models/requests/post_qr_code_request.rb +0 -63
  125. data/lib/groupdocs_signature_cloud/models/requests/post_search_barcode_from_url_request.rb +0 -59
  126. data/lib/groupdocs_signature_cloud/models/requests/post_search_barcode_request.rb +0 -63
  127. data/lib/groupdocs_signature_cloud/models/requests/post_search_collection_from_url_request.rb +0 -59
  128. data/lib/groupdocs_signature_cloud/models/requests/post_search_collection_request.rb +0 -63
  129. data/lib/groupdocs_signature_cloud/models/requests/post_search_digital_from_url_request.rb +0 -59
  130. data/lib/groupdocs_signature_cloud/models/requests/post_search_digital_request.rb +0 -63
  131. data/lib/groupdocs_signature_cloud/models/requests/post_search_qr_code_from_url_request.rb +0 -59
  132. data/lib/groupdocs_signature_cloud/models/requests/post_search_qr_code_request.rb +0 -63
  133. data/lib/groupdocs_signature_cloud/models/requests/post_stamp_from_url_request.rb +0 -59
  134. data/lib/groupdocs_signature_cloud/models/requests/post_stamp_request.rb +0 -63
  135. data/lib/groupdocs_signature_cloud/models/requests/post_text_from_url_request.rb +0 -59
  136. data/lib/groupdocs_signature_cloud/models/requests/post_text_request.rb +0 -63
  137. data/lib/groupdocs_signature_cloud/models/requests/post_verification_barcode_from_url_request.rb +0 -59
  138. data/lib/groupdocs_signature_cloud/models/requests/post_verification_barcode_request.rb +0 -63
  139. data/lib/groupdocs_signature_cloud/models/requests/post_verification_collection_from_url_request.rb +0 -59
  140. data/lib/groupdocs_signature_cloud/models/requests/post_verification_collection_request.rb +0 -63
  141. data/lib/groupdocs_signature_cloud/models/requests/post_verification_digital_from_url_request.rb +0 -63
  142. data/lib/groupdocs_signature_cloud/models/requests/post_verification_digital_request.rb +0 -67
  143. data/lib/groupdocs_signature_cloud/models/requests/post_verification_qr_code_from_url_request.rb +0 -59
  144. data/lib/groupdocs_signature_cloud/models/requests/post_verification_qr_code_request.rb +0 -63
  145. data/lib/groupdocs_signature_cloud/models/requests/post_verification_text_from_url_request.rb +0 -57
  146. data/lib/groupdocs_signature_cloud/models/requests/post_verification_text_request.rb +0 -63
  147. data/lib/groupdocs_signature_cloud/models/search_digital_options_data.rb +0 -265
  148. data/lib/groupdocs_signature_cloud/models/search_options_collection_data.rb +0 -232
  149. data/lib/groupdocs_signature_cloud/models/search_options_data.rb +0 -265
  150. data/lib/groupdocs_signature_cloud/models/search_qr_code_options_data.rb +0 -332
  151. data/lib/groupdocs_signature_cloud/models/sign_barcode_options_data.rb +0 -664
  152. data/lib/groupdocs_signature_cloud/models/sign_image_options_data.rb +0 -496
  153. data/lib/groupdocs_signature_cloud/models/sign_options_data.rb +0 -255
  154. data/lib/groupdocs_signature_cloud/models/sign_qr_code_options_data.rb +0 -674
  155. data/lib/groupdocs_signature_cloud/models/sign_text_options_data.rb +0 -562
  156. data/lib/groupdocs_signature_cloud/models/slides_barcode_signature_data.rb +0 -250
  157. data/lib/groupdocs_signature_cloud/models/slides_qr_code_signature_data.rb +0 -250
  158. data/lib/groupdocs_signature_cloud/models/slides_search_barcode_options_data.rb +0 -332
  159. data/lib/groupdocs_signature_cloud/models/slides_search_qr_code_options_data.rb +0 -332
  160. data/lib/groupdocs_signature_cloud/models/slides_sign_barcode_options_data.rb +0 -664
  161. data/lib/groupdocs_signature_cloud/models/slides_sign_image_options_data.rb +0 -496
  162. data/lib/groupdocs_signature_cloud/models/slides_sign_qr_code_options_data.rb +0 -674
  163. data/lib/groupdocs_signature_cloud/models/slides_sign_text_options_data.rb +0 -670
  164. data/lib/groupdocs_signature_cloud/models/slides_verify_barcode_options_data.rb +0 -342
  165. data/lib/groupdocs_signature_cloud/models/slides_verify_qr_code_options_data.rb +0 -342
  166. data/lib/groupdocs_signature_cloud/models/slides_verify_text_options_data.rb +0 -285
  167. data/lib/groupdocs_signature_cloud/models/verified_document_response.rb +0 -300
  168. data/lib/groupdocs_signature_cloud/models/verify_digital_options_data.rb +0 -285
  169. data/lib/groupdocs_signature_cloud/models/verify_options_collection_data.rb +0 -247
  170. data/lib/groupdocs_signature_cloud/models/verify_options_data.rb +0 -265
  171. data/lib/groupdocs_signature_cloud/models/verify_text_options_data.rb +0 -285
  172. data/lib/groupdocs_signature_cloud/models/words_barcode_signature_data.rb +0 -250
  173. data/lib/groupdocs_signature_cloud/models/words_qr_code_signature_data.rb +0 -250
  174. data/lib/groupdocs_signature_cloud/models/words_search_barcode_options_data.rb +0 -332
  175. data/lib/groupdocs_signature_cloud/models/words_search_digital_options_data.rb +0 -265
  176. data/lib/groupdocs_signature_cloud/models/words_search_qr_code_options_data.rb +0 -332
  177. data/lib/groupdocs_signature_cloud/models/words_sign_barcode_options_data.rb +0 -664
  178. data/lib/groupdocs_signature_cloud/models/words_sign_digital_options_data.rb +0 -516
  179. data/lib/groupdocs_signature_cloud/models/words_sign_image_options_data.rb +0 -496
  180. data/lib/groupdocs_signature_cloud/models/words_sign_qr_code_options_data.rb +0 -674
  181. data/lib/groupdocs_signature_cloud/models/words_sign_stamp_options_data.rb +0 -592
  182. data/lib/groupdocs_signature_cloud/models/words_verify_barcode_options_data.rb +0 -342
  183. data/lib/groupdocs_signature_cloud/models/words_verify_digital_options_data.rb +0 -315
  184. data/lib/groupdocs_signature_cloud/models/words_verify_qr_code_options_data.rb +0 -342
  185. data/lib/groupdocs_signature_cloud/models/words_verify_text_options_data.rb +0 -285
@@ -1,342 +1,368 @@
1
- #
2
- # --------------------------------------------------------------------------------------------------------------------
3
- # <copyright company="Aspose Pty Ltd" file="cells_verify_barcode_options_data.rb">
4
- # Copyright (c) 2003-2018 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 Barcode Verify Options for Cells Documents.
32
- class CellsVerifyBarcodeOptionsData
33
-
34
- # Valid property flag
35
- attr_accessor :is_valid
36
-
37
- # Document Page Number to be verified. If property is not set - all Pages of Document will be verified for first occurrence.
38
- attr_accessor :document_page_number
39
-
40
- # Page Options to specify pages to be verified.
41
- attr_accessor :pages_setup
42
-
43
- # Internal property that specify the name of Options.
44
- attr_accessor :options_type
45
-
46
- # Specify Signature Text if it should be verified.
47
- attr_accessor :text
48
-
49
- # Flag to verify each Document Page.
50
- attr_accessor :verify_all_pages
51
-
52
- # Get or set Barcode Type Name verification.
53
- attr_accessor :barcode_type_name
54
-
55
- # Get or set Text Match Type verification.
56
- attr_accessor :match_type
57
- class EnumAttributeValidator
58
- attr_reader :datatype
59
- attr_reader :allowable_values
60
-
61
- def initialize(datatype, allowable_values)
62
- @allowable_values = allowable_values.map do |value|
63
- case datatype.to_s
64
- when /Integer/i
65
- value.to_i
66
- when /Float/i
67
- value.to_f
68
- else
69
- value
70
- end
71
- end
72
- end
73
-
74
- def valid?(value)
75
- !value || allowable_values.include?(value)
76
- end
77
- end
78
-
79
- # Attribute mapping from ruby-style variable name to JSON key.
80
- def self.attribute_map
81
- {
82
- :'is_valid' => :'IsValid',
83
- :'document_page_number' => :'DocumentPageNumber',
84
- :'pages_setup' => :'PagesSetup',
85
- :'options_type' => :'OptionsType',
86
- :'text' => :'Text',
87
- :'verify_all_pages' => :'VerifyAllPages',
88
- :'barcode_type_name' => :'BarcodeTypeName',
89
- :'match_type' => :'MatchType'
90
- }
91
- end
92
-
93
- # Attribute type mapping.
94
- def self.swagger_types
95
- {
96
- :'is_valid' => :'BOOLEAN',
97
- :'document_page_number' => :'Integer',
98
- :'pages_setup' => :'PagesSetupData',
99
- :'options_type' => :'String',
100
- :'text' => :'String',
101
- :'verify_all_pages' => :'BOOLEAN',
102
- :'barcode_type_name' => :'String',
103
- :'match_type' => :'String'
104
- }
105
- end
106
-
107
- # Initializes the object
108
- # @param [Hash] attributes Model attributes in the form of hash
109
- def initialize(attributes = {})
110
- return unless attributes.is_a?(Hash)
111
-
112
- # convert string to symbol for hash key
113
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
114
-
115
- if attributes.key?(:'IsValid')
116
- self.is_valid = attributes[:'IsValid']
117
- end
118
-
119
- if attributes.key?(:'DocumentPageNumber')
120
- self.document_page_number = attributes[:'DocumentPageNumber']
121
- end
122
-
123
- if attributes.key?(:'PagesSetup')
124
- self.pages_setup = attributes[:'PagesSetup']
125
- end
126
-
127
- if attributes.key?(:'OptionsType')
128
- self.options_type = attributes[:'OptionsType']
129
- end
130
-
131
- if attributes.key?(:'Text')
132
- self.text = attributes[:'Text']
133
- end
134
-
135
- if attributes.key?(:'VerifyAllPages')
136
- self.verify_all_pages = attributes[:'VerifyAllPages']
137
- end
138
-
139
- if attributes.key?(:'BarcodeTypeName')
140
- self.barcode_type_name = attributes[:'BarcodeTypeName']
141
- end
142
-
143
- if attributes.key?(:'MatchType')
144
- self.match_type = attributes[:'MatchType']
145
- end
146
-
147
-
148
- if !((defined? options_type) == nil)
149
- self.options_type = "CellsVerifyBarcodeOptionsData"
150
- end
151
-
152
- end
153
-
154
- # Show invalid properties with the reasons. Usually used together with valid?
155
- # @return Array for valid properies with the reasons
156
- def list_invalid_properties
157
- invalid_properties = []
158
- if @is_valid.nil?
159
- invalid_properties.push("invalid value for 'is_valid', is_valid cannot be nil.")
160
- end
161
-
162
- return invalid_properties
163
- end
164
-
165
- # Check to see if the all the properties in the model are valid
166
- # @return true if the model is valid
167
- def valid?
168
- return false if @is_valid.nil?
169
- match_type_validator = EnumAttributeValidator.new('String', ["Exact", "StartsWith", "EndsWith", "Contains"])
170
- return false unless match_type_validator.valid?(@match_type)
171
- return true
172
- end
173
-
174
- # Custom attribute writer method checking allowed values (enum).
175
- # @param [Object] match_type Object to be assigned
176
- def match_type=(match_type)
177
- validator = EnumAttributeValidator.new('String', ["Exact", "StartsWith", "EndsWith", "Contains"])
178
- if match_type.to_i == 0
179
- unless validator.valid?(match_type)
180
- raise ArgumentError, "invalid value for 'match_type', must be one of #{validator.allowable_values}."
181
- end
182
- @match_type = match_type
183
- else
184
- @match_type = validator.allowable_values[match_type.to_i]
185
- end
186
- end
187
-
188
- # Checks equality by comparing each attribute.
189
- # @param [Object] Object to be compared
190
- def ==(other)
191
- return true if self.equal?(other)
192
- self.class == other.class &&
193
- is_valid == other.is_valid &&
194
- document_page_number == other.document_page_number &&
195
- pages_setup == other.pages_setup &&
196
- options_type == other.options_type &&
197
- text == other.text &&
198
- verify_all_pages == other.verify_all_pages &&
199
- barcode_type_name == other.barcode_type_name &&
200
- match_type == other.match_type
201
- end
202
-
203
- # @see the `==` method
204
- # @param [Object] Object to be compared
205
- def eql?(other)
206
- self == other
207
- end
208
-
209
- # Calculates hash code according to all attributes.
210
- # @return [Fixnum] Hash code
211
- def hash
212
- [is_valid, document_page_number, pages_setup, options_type, text, verify_all_pages, barcode_type_name, match_type].hash
213
- end
214
-
215
- # Builds the object from hash
216
- # @param [Hash] attributes Model attributes in the form of hash
217
- # @return [Object] Returns the model itself
218
- def build_from_hash(attributes)
219
- return nil unless attributes.is_a?(Hash)
220
- self.class.swagger_types.each_pair do |key, type|
221
-
222
- attributeName = self.class.attribute_map[key]
223
- attributeNameLowerStr = attributeName.to_s
224
- attributeNameLowerStr[0] = attributeNameLowerStr[0].downcase
225
- attributeNameLower = attributeNameLowerStr.to_sym
226
- attributeNameLowerStr2 = attributeName.to_s
227
- attributeNameLowerStr2[0] = attributeNameLowerStr[0].downcase
228
- attributeNameLowerStr2[1] = attributeNameLowerStr[1].downcase
229
- attributeNameLower2 = attributeNameLowerStr2.to_sym
230
-
231
- if type =~ /\AArray<(.*)>/i
232
- # check to ensure the input is an array given that the the attribute
233
- # is documented as an array but the input is not
234
- if attributes[attributeName].is_a?(Array)
235
- self.send("#{key}=", attributes[attributeName].map { |v| _deserialize($1, v) })
236
- end
237
- if attributes[attributeNameLower].is_a?(Array)
238
- self.send("#{key}=", attributes[attributeNameLower].map { |v| _deserialize($1, v) })
239
- end
240
- if attributes[attributeNameLower2].is_a?(Array)
241
- self.send("#{key}=", attributes[attributeNameLower2].map { |v| _deserialize($1, v) })
242
- end
243
- elsif !attributes[attributeName].nil?
244
- self.send("#{key}=", _deserialize(type, attributes[attributeName]))
245
- elsif !attributes[attributeNameLower].nil?
246
- self.send("#{key}=", _deserialize(type, attributes[attributeNameLower]))
247
- elsif !attributes[attributeNameLower2].nil?
248
- self.send("#{key}=", _deserialize(type, attributes[attributeNameLower2]))
249
- end
250
- # or else data not found in attributes(hash), not an issue as the data can be optional
251
- end
252
- self
253
- end
254
-
255
- # Deserializes the data based on type
256
- # @param string type Data type
257
- # @param string value Value to be deserialized
258
- # @return [Object] Deserialized data
259
- def _deserialize(type, value)
260
- case type.to_sym
261
- when :DateTime
262
- Time.at(/\d/.match(value)[0].to_f).to_datetime
263
- when :Date
264
- Time.at(/\d/.match(value)[0].to_f).to_date
265
- when :String
266
- value.to_s
267
- when :Integer
268
- value.to_i
269
- when :Float
270
- value.to_f
271
- when :BOOLEAN
272
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
273
- true
274
- else
275
- false
276
- end
277
- when :Object
278
- # generic object (usually a Hash), return directly
279
- value
280
- when /\AArray<(?<inner_type>.+)>\z/
281
- inner_type = Regexp.last_match[:inner_type]
282
- value.map { |v| _deserialize(inner_type, v) }
283
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
284
- k_type = Regexp.last_match[:k_type]
285
- v_type = Regexp.last_match[:v_type]
286
- {}.tap do |hash|
287
- value.each do |k, v|
288
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
289
- end
290
- end
291
- else
292
- # model
293
- temp_model = GroupDocsSignatureCloud.const_get(type).new
294
- temp_model.build_from_hash(value)
295
- end
296
- end
297
-
298
- # Returns the string representation of the object
299
- # @return [String] String presentation of the object
300
- def to_s
301
- to_hash.to_s
302
- end
303
-
304
- # to_body is an alias to to_hash (backward compatibility)
305
- # @return [Hash] Returns the object in the form of hash
306
- def to_body
307
- to_hash
308
- end
309
-
310
- # Returns the object in the form of hash
311
- # @return [Hash] Returns the object in the form of hash
312
- def to_hash
313
- hash = {}
314
- self.class.attribute_map.each_pair do |attr, param|
315
- value = self.send(attr)
316
- next if value.nil?
317
- hash[param] = _to_hash(value)
318
- end
319
- hash
320
- end
321
-
322
- # Outputs non-array value in the form of hash
323
- # For object, use to_hash. Otherwise, just return the value
324
- # @param [Object] value Any valid value
325
- # @return [Hash] Returns the value in the form of hash
326
- def _to_hash(value)
327
- if value.is_a?(Array)
328
- value.compact.map { |v| _to_hash(v) }
329
- elsif value.is_a?(Hash)
330
- {}.tap do |hash|
331
- value.each { |k, v| hash[k] = _to_hash(v) }
332
- end
333
- elsif value.respond_to? :to_hash
334
- value.to_hash
335
- else
336
- value
337
- end
338
- end
339
-
340
- end
341
-
342
- end
1
+ #
2
+ # --------------------------------------------------------------------------------------------------------------------
3
+ # <copyright company="Aspose Pty Ltd" file="verify_text_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
+ # Keeps options to verify Text signature of document
32
+ class VerifyTextOptions
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
+ # Specify text of signature if it should be verified
50
+ attr_accessor :text
51
+
52
+ # Get or set text match type verification. It is used only when Text property is set
53
+ attr_accessor :match_type
54
+ class EnumAttributeValidator
55
+ attr_reader :datatype
56
+ attr_reader :allowable_values
57
+
58
+ def initialize(datatype, allowable_values)
59
+ @allowable_values = allowable_values.map do |value|
60
+ case datatype.to_s
61
+ when /Integer/i
62
+ value.to_i
63
+ when /Float/i
64
+ value.to_f
65
+ else
66
+ value
67
+ end
68
+ end
69
+ end
70
+
71
+ def valid?(value)
72
+ !value || allowable_values.include?(value)
73
+ end
74
+ end
75
+
76
+ # Attribute mapping from ruby-style variable name to JSON key.
77
+ def self.attribute_map
78
+ {
79
+ :'document_type' => :'DocumentType',
80
+ :'signature_type' => :'SignatureType',
81
+ :'page' => :'Page',
82
+ :'all_pages' => :'AllPages',
83
+ :'pages_setup' => :'PagesSetup',
84
+ :'text' => :'Text',
85
+ :'match_type' => :'MatchType'
86
+ }
87
+ end
88
+
89
+ # Attribute type mapping.
90
+ def self.swagger_types
91
+ {
92
+ :'document_type' => :'String',
93
+ :'signature_type' => :'String',
94
+ :'page' => :'Integer',
95
+ :'all_pages' => :'BOOLEAN',
96
+ :'pages_setup' => :'PagesSetup',
97
+ :'text' => :'String',
98
+ :'match_type' => :'String'
99
+ }
100
+ end
101
+
102
+ # Initializes the object
103
+ # @param [Hash] attributes Model attributes in the form of hash
104
+ def initialize(attributes = {})
105
+ return unless attributes.is_a?(Hash)
106
+
107
+ # convert string to symbol for hash key
108
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
109
+
110
+ if attributes.key?(:'DocumentType')
111
+ self.document_type = attributes[:'DocumentType']
112
+ end
113
+
114
+ if attributes.key?(:'SignatureType')
115
+ self.signature_type = attributes[:'SignatureType']
116
+ end
117
+
118
+ if attributes.key?(:'Page')
119
+ self.page = attributes[:'Page']
120
+ end
121
+
122
+ if attributes.key?(:'AllPages')
123
+ self.all_pages = attributes[:'AllPages']
124
+ end
125
+
126
+ if attributes.key?(:'PagesSetup')
127
+ self.pages_setup = attributes[:'PagesSetup']
128
+ end
129
+
130
+ if attributes.key?(:'Text')
131
+ self.text = attributes[:'Text']
132
+ end
133
+
134
+ if attributes.key?(:'MatchType')
135
+ self.match_type = attributes[:'MatchType']
136
+ end
137
+
138
+ end
139
+
140
+ # Show invalid properties with the reasons. Usually used together with valid?
141
+ # @return Array for valid properies with the reasons
142
+ def list_invalid_properties
143
+ invalid_properties = []
144
+ if @document_type.nil?
145
+ invalid_properties.push("invalid value for 'document_type', document_type cannot be nil.")
146
+ end
147
+
148
+ if @signature_type.nil?
149
+ invalid_properties.push("invalid value for 'signature_type', signature_type cannot be nil.")
150
+ end
151
+
152
+ if @all_pages.nil?
153
+ invalid_properties.push("invalid value for 'all_pages', all_pages cannot be nil.")
154
+ end
155
+
156
+ if @match_type.nil?
157
+ invalid_properties.push("invalid value for 'match_type', match_type cannot be nil.")
158
+ end
159
+
160
+ return invalid_properties
161
+ end
162
+
163
+ # Check to see if the all the properties in the model are valid
164
+ # @return true if the model is valid
165
+ def valid?
166
+ return false if @document_type.nil?
167
+ document_type_validator = EnumAttributeValidator.new('String', ["Image", "Pdf", "Presentation", "Spreadsheet", "WordProcessing"])
168
+ return false unless document_type_validator.valid?(@document_type)
169
+ return false if @signature_type.nil?
170
+ signature_type_validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp"])
171
+ return false unless signature_type_validator.valid?(@signature_type)
172
+ return false if @all_pages.nil?
173
+ return false if @match_type.nil?
174
+ match_type_validator = EnumAttributeValidator.new('String', ["Exact", "StartsWith", "EndsWith", "Contains"])
175
+ return false unless match_type_validator.valid?(@match_type)
176
+ return true
177
+ end
178
+
179
+ # Custom attribute writer method checking allowed values (enum).
180
+ # @param [Object] document_type Object to be assigned
181
+ def document_type=(document_type)
182
+ validator = EnumAttributeValidator.new('String', ["Image", "Pdf", "Presentation", "Spreadsheet", "WordProcessing"])
183
+ if document_type.to_i == 0
184
+ unless validator.valid?(document_type)
185
+ raise ArgumentError, "invalid value for 'document_type', must be one of #{validator.allowable_values}."
186
+ end
187
+ @document_type = document_type
188
+ else
189
+ @document_type = validator.allowable_values[document_type.to_i]
190
+ end
191
+ end
192
+
193
+ # Custom attribute writer method checking allowed values (enum).
194
+ # @param [Object] signature_type Object to be assigned
195
+ def signature_type=(signature_type)
196
+ validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp"])
197
+ if signature_type.to_i == 0
198
+ unless validator.valid?(signature_type)
199
+ raise ArgumentError, "invalid value for 'signature_type', must be one of #{validator.allowable_values}."
200
+ end
201
+ @signature_type = signature_type
202
+ else
203
+ @signature_type = validator.allowable_values[signature_type.to_i]
204
+ end
205
+ end
206
+
207
+ # Custom attribute writer method checking allowed values (enum).
208
+ # @param [Object] match_type Object to be assigned
209
+ def match_type=(match_type)
210
+ validator = EnumAttributeValidator.new('String', ["Exact", "StartsWith", "EndsWith", "Contains"])
211
+ if match_type.to_i == 0
212
+ unless validator.valid?(match_type)
213
+ raise ArgumentError, "invalid value for 'match_type', must be one of #{validator.allowable_values}."
214
+ end
215
+ @match_type = match_type
216
+ else
217
+ @match_type = validator.allowable_values[match_type.to_i]
218
+ end
219
+ end
220
+
221
+ # Checks equality by comparing each attribute.
222
+ # @param [Object] Object to be compared
223
+ def ==(other)
224
+ return true if self.equal?(other)
225
+ self.class == other.class &&
226
+ document_type == other.document_type &&
227
+ signature_type == other.signature_type &&
228
+ page == other.page &&
229
+ all_pages == other.all_pages &&
230
+ pages_setup == other.pages_setup &&
231
+ text == other.text &&
232
+ match_type == other.match_type
233
+ end
234
+
235
+ # @see the `==` method
236
+ # @param [Object] Object to be compared
237
+ def eql?(other)
238
+ self == other
239
+ end
240
+
241
+ # Calculates hash code according to all attributes.
242
+ # @return [Fixnum] Hash code
243
+ def hash
244
+ [document_type, signature_type, page, all_pages, pages_setup, text, match_type].hash
245
+ end
246
+
247
+ # Downcases first letter.
248
+ # @return downcased string
249
+ def uncap(str)
250
+ str[0, 1].downcase + str[1..-1]
251
+ end
252
+
253
+ # Builds the object from hash
254
+ # @param [Hash] attributes Model attributes in the form of hash
255
+ # @return [Object] Returns the model itself
256
+ def build_from_hash(attributes)
257
+ return nil unless attributes.is_a?(Hash)
258
+ self.class.swagger_types.each_pair do |key, type|
259
+ pname = uncap(self.class.attribute_map[key]).intern
260
+ value = attributes[pname]
261
+ if type =~ /\AArray<(.*)>/i
262
+ # check to ensure the input is an array given that the the attribute
263
+ # is documented as an array but the input is not
264
+ if value.is_a?(Array)
265
+ self.send("#{key}=", value.map { |v| _deserialize($1, v) })
266
+ end
267
+ elsif !value.nil?
268
+ self.send("#{key}=", _deserialize(type, value))
269
+ end
270
+ # or else data not found in attributes(hash), not an issue as the data can be optional
271
+ end
272
+
273
+ self
274
+ end
275
+
276
+ # Deserializes the data based on type
277
+ # @param string type Data type
278
+ # @param string value Value to be deserialized
279
+ # @return [Object] Deserialized data
280
+ def _deserialize(type, value)
281
+ case type.to_sym
282
+ when :DateTime
283
+ Date.parse value
284
+ when :Date
285
+ Date.parse value
286
+ when :String
287
+ value.to_s
288
+ when :Integer
289
+ value.to_i
290
+ when :Float
291
+ value.to_f
292
+ when :BOOLEAN
293
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
294
+ true
295
+ else
296
+ false
297
+ end
298
+ when :Object
299
+ # generic object (usually a Hash), return directly
300
+ value
301
+ when /\AArray<(?<inner_type>.+)>\z/
302
+ inner_type = Regexp.last_match[:inner_type]
303
+ value.map { |v| _deserialize(inner_type, v) }
304
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
305
+ k_type = Regexp.last_match[:k_type]
306
+ v_type = Regexp.last_match[:v_type]
307
+ {}.tap do |hash|
308
+ value.each do |k, v|
309
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
310
+ end
311
+ end
312
+ else
313
+ # model
314
+ # Signature type fix
315
+ ttype = type
316
+ if value.is_a?(Hash) and !value[:signatureType].nil?
317
+ ttype = value[:signatureType] + 'Signature'
318
+ end
319
+ temp_model = GroupDocsSignatureCloud.const_get(ttype).new
320
+ temp_model.build_from_hash(value)
321
+ end
322
+ end
323
+
324
+ # Returns the string representation of the object
325
+ # @return [String] String presentation of the object
326
+ def to_s
327
+ to_hash.to_s
328
+ end
329
+
330
+ # to_body is an alias to to_hash (backward compatibility)
331
+ # @return [Hash] Returns the object in the form of hash
332
+ def to_body
333
+ to_hash
334
+ end
335
+
336
+ # Returns the object in the form of hash
337
+ # @return [Hash] Returns the object in the form of hash
338
+ def to_hash
339
+ hash = {}
340
+ self.class.attribute_map.each_pair do |attr, param|
341
+ value = self.send(attr)
342
+ next if value.nil?
343
+ hash[param] = _to_hash(value)
344
+ end
345
+ hash
346
+ end
347
+
348
+ # Outputs non-array value in the form of hash
349
+ # For object, use to_hash. Otherwise, just return the value
350
+ # @param [Object] value Any valid value
351
+ # @return [Hash] Returns the value in the form of hash
352
+ def _to_hash(value)
353
+ if value.is_a?(Array)
354
+ value.compact.map { |v| _to_hash(v) }
355
+ elsif value.is_a?(Hash)
356
+ {}.tap do |hash|
357
+ value.each { |k, v| hash[k] = _to_hash(v) }
358
+ end
359
+ elsif value.respond_to? :to_hash
360
+ value.to_hash
361
+ else
362
+ value
363
+ end
364
+ end
365
+
366
+ end
367
+
368
+ end