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,377 +1,366 @@
1
- #
2
- # --------------------------------------------------------------------------------------------------------------------
3
- # <copyright company="Aspose Pty Ltd" file="stamp_line_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
- # Specify Stamp line properties.
32
- class StampLineData
33
-
34
- # Gets or sets the line height on Stamp.
35
- attr_accessor :height
36
-
37
- # Gets or sets the background color of signature.
38
- attr_accessor :background_color
39
-
40
- # Gets or sets the text of stamp line.
41
- attr_accessor :text
42
-
43
- # Get or set Font of Stamp Line text.
44
- attr_accessor :font
45
-
46
- # Gets or sets the text color of signature.
47
- attr_accessor :text_color
48
-
49
- # Gets or sets the bottom intent of text.
50
- attr_accessor :text_bottom_intent
51
-
52
- # Gets or sets text repeat type.
53
- attr_accessor :text_repeat_type
54
-
55
- # Setup Outer Border.
56
- attr_accessor :outer_border
57
-
58
- # Setup Internal Border.
59
- attr_accessor :inner_border
60
-
61
- # Get and set visibility of Stamp Line.
62
- attr_accessor :visible
63
- class EnumAttributeValidator
64
- attr_reader :datatype
65
- attr_reader :allowable_values
66
-
67
- def initialize(datatype, allowable_values)
68
- @allowable_values = allowable_values.map do |value|
69
- case datatype.to_s
70
- when /Integer/i
71
- value.to_i
72
- when /Float/i
73
- value.to_f
74
- else
75
- value
76
- end
77
- end
78
- end
79
-
80
- def valid?(value)
81
- !value || allowable_values.include?(value)
82
- end
83
- end
84
-
85
- # Attribute mapping from ruby-style variable name to JSON key.
86
- def self.attribute_map
87
- {
88
- :'height' => :'Height',
89
- :'background_color' => :'BackgroundColor',
90
- :'text' => :'Text',
91
- :'font' => :'Font',
92
- :'text_color' => :'TextColor',
93
- :'text_bottom_intent' => :'TextBottomIntent',
94
- :'text_repeat_type' => :'TextRepeatType',
95
- :'outer_border' => :'OuterBorder',
96
- :'inner_border' => :'InnerBorder',
97
- :'visible' => :'Visible'
98
- }
99
- end
100
-
101
- # Attribute type mapping.
102
- def self.swagger_types
103
- {
104
- :'height' => :'Integer',
105
- :'background_color' => :'Color',
106
- :'text' => :'String',
107
- :'font' => :'SignatureFontData',
108
- :'text_color' => :'Color',
109
- :'text_bottom_intent' => :'Integer',
110
- :'text_repeat_type' => :'String',
111
- :'outer_border' => :'BorderLineData',
112
- :'inner_border' => :'BorderLineData',
113
- :'visible' => :'BOOLEAN'
114
- }
115
- end
116
-
117
- # Initializes the object
118
- # @param [Hash] attributes Model attributes in the form of hash
119
- def initialize(attributes = {})
120
- return unless attributes.is_a?(Hash)
121
-
122
- # convert string to symbol for hash key
123
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
124
-
125
- if attributes.key?(:'Height')
126
- self.height = attributes[:'Height']
127
- end
128
-
129
- if attributes.key?(:'BackgroundColor')
130
- self.background_color = attributes[:'BackgroundColor']
131
- end
132
-
133
- if attributes.key?(:'Text')
134
- self.text = attributes[:'Text']
135
- end
136
-
137
- if attributes.key?(:'Font')
138
- self.font = attributes[:'Font']
139
- end
140
-
141
- if attributes.key?(:'TextColor')
142
- self.text_color = attributes[:'TextColor']
143
- end
144
-
145
- if attributes.key?(:'TextBottomIntent')
146
- self.text_bottom_intent = attributes[:'TextBottomIntent']
147
- end
148
-
149
- if attributes.key?(:'TextRepeatType')
150
- self.text_repeat_type = attributes[:'TextRepeatType']
151
- end
152
-
153
- if attributes.key?(:'OuterBorder')
154
- self.outer_border = attributes[:'OuterBorder']
155
- end
156
-
157
- if attributes.key?(:'InnerBorder')
158
- self.inner_border = attributes[:'InnerBorder']
159
- end
160
-
161
- if attributes.key?(:'Visible')
162
- self.visible = attributes[:'Visible']
163
- end
164
-
165
-
166
- if !((defined? options_type) == nil)
167
- self.options_type = "StampLineData"
168
- end
169
-
170
- end
171
-
172
- # Show invalid properties with the reasons. Usually used together with valid?
173
- # @return Array for valid properies with the reasons
174
- def list_invalid_properties
175
- invalid_properties = []
176
- if @height.nil?
177
- invalid_properties.push("invalid value for 'height', height cannot be nil.")
178
- end
179
-
180
- if @text_bottom_intent.nil?
181
- invalid_properties.push("invalid value for 'text_bottom_intent', text_bottom_intent cannot be nil.")
182
- end
183
-
184
- if @text_repeat_type.nil?
185
- invalid_properties.push("invalid value for 'text_repeat_type', text_repeat_type cannot be nil.")
186
- end
187
-
188
- if @visible.nil?
189
- invalid_properties.push("invalid value for 'visible', visible cannot be nil.")
190
- end
191
-
192
- return invalid_properties
193
- end
194
-
195
- # Check to see if the all the properties in the model are valid
196
- # @return true if the model is valid
197
- def valid?
198
- return false if @height.nil?
199
- return false if @text_bottom_intent.nil?
200
- return false if @text_repeat_type.nil?
201
- text_repeat_type_validator = EnumAttributeValidator.new('String', ["None", "FullTextRepeat", "RepeatWithTruncation"])
202
- return false unless text_repeat_type_validator.valid?(@text_repeat_type)
203
- return false if @visible.nil?
204
- return true
205
- end
206
-
207
- # Custom attribute writer method checking allowed values (enum).
208
- # @param [Object] text_repeat_type Object to be assigned
209
- def text_repeat_type=(text_repeat_type)
210
- validator = EnumAttributeValidator.new('String', ["None", "FullTextRepeat", "RepeatWithTruncation"])
211
- if text_repeat_type.to_i == 0
212
- unless validator.valid?(text_repeat_type)
213
- raise ArgumentError, "invalid value for 'text_repeat_type', must be one of #{validator.allowable_values}."
214
- end
215
- @text_repeat_type = text_repeat_type
216
- else
217
- @text_repeat_type = validator.allowable_values[text_repeat_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
- height == other.height &&
227
- background_color == other.background_color &&
228
- text == other.text &&
229
- font == other.font &&
230
- text_color == other.text_color &&
231
- text_bottom_intent == other.text_bottom_intent &&
232
- text_repeat_type == other.text_repeat_type &&
233
- outer_border == other.outer_border &&
234
- inner_border == other.inner_border &&
235
- visible == other.visible
236
- end
237
-
238
- # @see the `==` method
239
- # @param [Object] Object to be compared
240
- def eql?(other)
241
- self == other
242
- end
243
-
244
- # Calculates hash code according to all attributes.
245
- # @return [Fixnum] Hash code
246
- def hash
247
- [height, background_color, text, font, text_color, text_bottom_intent, text_repeat_type, outer_border, inner_border, visible].hash
248
- end
249
-
250
- # Builds the object from hash
251
- # @param [Hash] attributes Model attributes in the form of hash
252
- # @return [Object] Returns the model itself
253
- def build_from_hash(attributes)
254
- return nil unless attributes.is_a?(Hash)
255
- self.class.swagger_types.each_pair do |key, type|
256
-
257
- attributeName = self.class.attribute_map[key]
258
- attributeNameLowerStr = attributeName.to_s
259
- attributeNameLowerStr[0] = attributeNameLowerStr[0].downcase
260
- attributeNameLower = attributeNameLowerStr.to_sym
261
- attributeNameLowerStr2 = attributeName.to_s
262
- attributeNameLowerStr2[0] = attributeNameLowerStr[0].downcase
263
- attributeNameLowerStr2[1] = attributeNameLowerStr[1].downcase
264
- attributeNameLower2 = attributeNameLowerStr2.to_sym
265
-
266
- if type =~ /\AArray<(.*)>/i
267
- # check to ensure the input is an array given that the the attribute
268
- # is documented as an array but the input is not
269
- if attributes[attributeName].is_a?(Array)
270
- self.send("#{key}=", attributes[attributeName].map { |v| _deserialize($1, v) })
271
- end
272
- if attributes[attributeNameLower].is_a?(Array)
273
- self.send("#{key}=", attributes[attributeNameLower].map { |v| _deserialize($1, v) })
274
- end
275
- if attributes[attributeNameLower2].is_a?(Array)
276
- self.send("#{key}=", attributes[attributeNameLower2].map { |v| _deserialize($1, v) })
277
- end
278
- elsif !attributes[attributeName].nil?
279
- self.send("#{key}=", _deserialize(type, attributes[attributeName]))
280
- elsif !attributes[attributeNameLower].nil?
281
- self.send("#{key}=", _deserialize(type, attributes[attributeNameLower]))
282
- elsif !attributes[attributeNameLower2].nil?
283
- self.send("#{key}=", _deserialize(type, attributes[attributeNameLower2]))
284
- end
285
- # or else data not found in attributes(hash), not an issue as the data can be optional
286
- end
287
- self
288
- end
289
-
290
- # Deserializes the data based on type
291
- # @param string type Data type
292
- # @param string value Value to be deserialized
293
- # @return [Object] Deserialized data
294
- def _deserialize(type, value)
295
- case type.to_sym
296
- when :DateTime
297
- Time.at(/\d/.match(value)[0].to_f).to_datetime
298
- when :Date
299
- Time.at(/\d/.match(value)[0].to_f).to_date
300
- when :String
301
- value.to_s
302
- when :Integer
303
- value.to_i
304
- when :Float
305
- value.to_f
306
- when :BOOLEAN
307
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
308
- true
309
- else
310
- false
311
- end
312
- when :Object
313
- # generic object (usually a Hash), return directly
314
- value
315
- when /\AArray<(?<inner_type>.+)>\z/
316
- inner_type = Regexp.last_match[:inner_type]
317
- value.map { |v| _deserialize(inner_type, v) }
318
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
319
- k_type = Regexp.last_match[:k_type]
320
- v_type = Regexp.last_match[:v_type]
321
- {}.tap do |hash|
322
- value.each do |k, v|
323
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
324
- end
325
- end
326
- else
327
- # model
328
- temp_model = GroupDocsSignatureCloud.const_get(type).new
329
- temp_model.build_from_hash(value)
330
- end
331
- end
332
-
333
- # Returns the string representation of the object
334
- # @return [String] String presentation of the object
335
- def to_s
336
- to_hash.to_s
337
- end
338
-
339
- # to_body is an alias to to_hash (backward compatibility)
340
- # @return [Hash] Returns the object in the form of hash
341
- def to_body
342
- to_hash
343
- end
344
-
345
- # Returns the object in the form of hash
346
- # @return [Hash] Returns the object in the form of hash
347
- def to_hash
348
- hash = {}
349
- self.class.attribute_map.each_pair do |attr, param|
350
- value = self.send(attr)
351
- next if value.nil?
352
- hash[param] = _to_hash(value)
353
- end
354
- hash
355
- end
356
-
357
- # Outputs non-array value in the form of hash
358
- # For object, use to_hash. Otherwise, just return the value
359
- # @param [Object] value Any valid value
360
- # @return [Hash] Returns the value in the form of hash
361
- def _to_hash(value)
362
- if value.is_a?(Array)
363
- value.compact.map { |v| _to_hash(v) }
364
- elsif value.is_a?(Hash)
365
- {}.tap do |hash|
366
- value.each { |k, v| hash[k] = _to_hash(v) }
367
- end
368
- elsif value.respond_to? :to_hash
369
- value.to_hash
370
- else
371
- value
372
- end
373
- end
374
-
375
- end
376
-
377
- end
1
+ #
2
+ # --------------------------------------------------------------------------------------------------------------------
3
+ # <copyright company="Aspose Pty Ltd" file="stamp_line.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
+ # Specify Stamp line properties
32
+ class StampLine
33
+
34
+ # Gets or sets the line height on Stamp
35
+ attr_accessor :height
36
+
37
+ # Gets or sets the background color of signature
38
+ attr_accessor :background_color
39
+
40
+ # Gets or sets the text of stamp line
41
+ attr_accessor :text
42
+
43
+ # Get or set Font of Stamp Line text
44
+ attr_accessor :font
45
+
46
+ # Gets or sets the text color of signature
47
+ attr_accessor :text_color
48
+
49
+ # Gets or sets the bottom intent of text
50
+ attr_accessor :text_bottom_intent
51
+
52
+ # Gets or sets text repeat type
53
+ attr_accessor :text_repeat_type
54
+
55
+ # Setup Outer Border
56
+ attr_accessor :outer_border
57
+
58
+ # Setup Internal Border
59
+ attr_accessor :inner_border
60
+
61
+ # Get and set visibility of Stamp Line
62
+ attr_accessor :visible
63
+ class EnumAttributeValidator
64
+ attr_reader :datatype
65
+ attr_reader :allowable_values
66
+
67
+ def initialize(datatype, allowable_values)
68
+ @allowable_values = allowable_values.map do |value|
69
+ case datatype.to_s
70
+ when /Integer/i
71
+ value.to_i
72
+ when /Float/i
73
+ value.to_f
74
+ else
75
+ value
76
+ end
77
+ end
78
+ end
79
+
80
+ def valid?(value)
81
+ !value || allowable_values.include?(value)
82
+ end
83
+ end
84
+
85
+ # Attribute mapping from ruby-style variable name to JSON key.
86
+ def self.attribute_map
87
+ {
88
+ :'height' => :'Height',
89
+ :'background_color' => :'BackgroundColor',
90
+ :'text' => :'Text',
91
+ :'font' => :'Font',
92
+ :'text_color' => :'TextColor',
93
+ :'text_bottom_intent' => :'TextBottomIntent',
94
+ :'text_repeat_type' => :'TextRepeatType',
95
+ :'outer_border' => :'OuterBorder',
96
+ :'inner_border' => :'InnerBorder',
97
+ :'visible' => :'Visible'
98
+ }
99
+ end
100
+
101
+ # Attribute type mapping.
102
+ def self.swagger_types
103
+ {
104
+ :'height' => :'Integer',
105
+ :'background_color' => :'Color',
106
+ :'text' => :'String',
107
+ :'font' => :'SignatureFont',
108
+ :'text_color' => :'Color',
109
+ :'text_bottom_intent' => :'Integer',
110
+ :'text_repeat_type' => :'String',
111
+ :'outer_border' => :'BorderLine',
112
+ :'inner_border' => :'BorderLine',
113
+ :'visible' => :'BOOLEAN'
114
+ }
115
+ end
116
+
117
+ # Initializes the object
118
+ # @param [Hash] attributes Model attributes in the form of hash
119
+ def initialize(attributes = {})
120
+ return unless attributes.is_a?(Hash)
121
+
122
+ # convert string to symbol for hash key
123
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
124
+
125
+ if attributes.key?(:'Height')
126
+ self.height = attributes[:'Height']
127
+ end
128
+
129
+ if attributes.key?(:'BackgroundColor')
130
+ self.background_color = attributes[:'BackgroundColor']
131
+ end
132
+
133
+ if attributes.key?(:'Text')
134
+ self.text = attributes[:'Text']
135
+ end
136
+
137
+ if attributes.key?(:'Font')
138
+ self.font = attributes[:'Font']
139
+ end
140
+
141
+ if attributes.key?(:'TextColor')
142
+ self.text_color = attributes[:'TextColor']
143
+ end
144
+
145
+ if attributes.key?(:'TextBottomIntent')
146
+ self.text_bottom_intent = attributes[:'TextBottomIntent']
147
+ end
148
+
149
+ if attributes.key?(:'TextRepeatType')
150
+ self.text_repeat_type = attributes[:'TextRepeatType']
151
+ end
152
+
153
+ if attributes.key?(:'OuterBorder')
154
+ self.outer_border = attributes[:'OuterBorder']
155
+ end
156
+
157
+ if attributes.key?(:'InnerBorder')
158
+ self.inner_border = attributes[:'InnerBorder']
159
+ end
160
+
161
+ if attributes.key?(:'Visible')
162
+ self.visible = attributes[:'Visible']
163
+ end
164
+
165
+ end
166
+
167
+ # Show invalid properties with the reasons. Usually used together with valid?
168
+ # @return Array for valid properies with the reasons
169
+ def list_invalid_properties
170
+ invalid_properties = []
171
+ if @height.nil?
172
+ invalid_properties.push("invalid value for 'height', height cannot be nil.")
173
+ end
174
+
175
+ if @text_bottom_intent.nil?
176
+ invalid_properties.push("invalid value for 'text_bottom_intent', text_bottom_intent cannot be nil.")
177
+ end
178
+
179
+ if @text_repeat_type.nil?
180
+ invalid_properties.push("invalid value for 'text_repeat_type', text_repeat_type cannot be nil.")
181
+ end
182
+
183
+ if @visible.nil?
184
+ invalid_properties.push("invalid value for 'visible', visible cannot be nil.")
185
+ end
186
+
187
+ return invalid_properties
188
+ end
189
+
190
+ # Check to see if the all the properties in the model are valid
191
+ # @return true if the model is valid
192
+ def valid?
193
+ return false if @height.nil?
194
+ return false if @text_bottom_intent.nil?
195
+ return false if @text_repeat_type.nil?
196
+ text_repeat_type_validator = EnumAttributeValidator.new('String', ["None", "FullTextRepeat", "RepeatWithTruncation"])
197
+ return false unless text_repeat_type_validator.valid?(@text_repeat_type)
198
+ return false if @visible.nil?
199
+ return true
200
+ end
201
+
202
+ # Custom attribute writer method checking allowed values (enum).
203
+ # @param [Object] text_repeat_type Object to be assigned
204
+ def text_repeat_type=(text_repeat_type)
205
+ validator = EnumAttributeValidator.new('String', ["None", "FullTextRepeat", "RepeatWithTruncation"])
206
+ if text_repeat_type.to_i == 0
207
+ unless validator.valid?(text_repeat_type)
208
+ raise ArgumentError, "invalid value for 'text_repeat_type', must be one of #{validator.allowable_values}."
209
+ end
210
+ @text_repeat_type = text_repeat_type
211
+ else
212
+ @text_repeat_type = validator.allowable_values[text_repeat_type.to_i]
213
+ end
214
+ end
215
+
216
+ # Checks equality by comparing each attribute.
217
+ # @param [Object] Object to be compared
218
+ def ==(other)
219
+ return true if self.equal?(other)
220
+ self.class == other.class &&
221
+ height == other.height &&
222
+ background_color == other.background_color &&
223
+ text == other.text &&
224
+ font == other.font &&
225
+ text_color == other.text_color &&
226
+ text_bottom_intent == other.text_bottom_intent &&
227
+ text_repeat_type == other.text_repeat_type &&
228
+ outer_border == other.outer_border &&
229
+ inner_border == other.inner_border &&
230
+ visible == other.visible
231
+ end
232
+
233
+ # @see the `==` method
234
+ # @param [Object] Object to be compared
235
+ def eql?(other)
236
+ self == other
237
+ end
238
+
239
+ # Calculates hash code according to all attributes.
240
+ # @return [Fixnum] Hash code
241
+ def hash
242
+ [height, background_color, text, font, text_color, text_bottom_intent, text_repeat_type, outer_border, inner_border, visible].hash
243
+ end
244
+
245
+ # Downcases first letter.
246
+ # @return downcased string
247
+ def uncap(str)
248
+ str[0, 1].downcase + str[1..-1]
249
+ end
250
+
251
+ # Builds the object from hash
252
+ # @param [Hash] attributes Model attributes in the form of hash
253
+ # @return [Object] Returns the model itself
254
+ def build_from_hash(attributes)
255
+ return nil unless attributes.is_a?(Hash)
256
+ self.class.swagger_types.each_pair do |key, type|
257
+ pname = uncap(self.class.attribute_map[key]).intern
258
+ value = attributes[pname]
259
+ if type =~ /\AArray<(.*)>/i
260
+ # check to ensure the input is an array given that the the attribute
261
+ # is documented as an array but the input is not
262
+ if value.is_a?(Array)
263
+ self.send("#{key}=", value.map { |v| _deserialize($1, v) })
264
+ end
265
+ elsif !value.nil?
266
+ self.send("#{key}=", _deserialize(type, value))
267
+ end
268
+ # or else data not found in attributes(hash), not an issue as the data can be optional
269
+ end
270
+
271
+ self
272
+ end
273
+
274
+ # Deserializes the data based on type
275
+ # @param string type Data type
276
+ # @param string value Value to be deserialized
277
+ # @return [Object] Deserialized data
278
+ def _deserialize(type, value)
279
+ case type.to_sym
280
+ when :DateTime
281
+ Date.parse value
282
+ when :Date
283
+ Date.parse value
284
+ when :String
285
+ value.to_s
286
+ when :Integer
287
+ value.to_i
288
+ when :Float
289
+ value.to_f
290
+ when :BOOLEAN
291
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
292
+ true
293
+ else
294
+ false
295
+ end
296
+ when :Object
297
+ # generic object (usually a Hash), return directly
298
+ value
299
+ when /\AArray<(?<inner_type>.+)>\z/
300
+ inner_type = Regexp.last_match[:inner_type]
301
+ value.map { |v| _deserialize(inner_type, v) }
302
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
303
+ k_type = Regexp.last_match[:k_type]
304
+ v_type = Regexp.last_match[:v_type]
305
+ {}.tap do |hash|
306
+ value.each do |k, v|
307
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
308
+ end
309
+ end
310
+ else
311
+ # model
312
+ # Signature type fix
313
+ ttype = type
314
+ if value.is_a?(Hash) and !value[:signatureType].nil?
315
+ ttype = value[:signatureType] + 'Signature'
316
+ end
317
+ temp_model = GroupDocsSignatureCloud.const_get(ttype).new
318
+ temp_model.build_from_hash(value)
319
+ end
320
+ end
321
+
322
+ # Returns the string representation of the object
323
+ # @return [String] String presentation of the object
324
+ def to_s
325
+ to_hash.to_s
326
+ end
327
+
328
+ # to_body is an alias to to_hash (backward compatibility)
329
+ # @return [Hash] Returns the object in the form of hash
330
+ def to_body
331
+ to_hash
332
+ end
333
+
334
+ # Returns the object in the form of hash
335
+ # @return [Hash] Returns the object in the form of hash
336
+ def to_hash
337
+ hash = {}
338
+ self.class.attribute_map.each_pair do |attr, param|
339
+ value = self.send(attr)
340
+ next if value.nil?
341
+ hash[param] = _to_hash(value)
342
+ end
343
+ hash
344
+ end
345
+
346
+ # Outputs non-array value in the form of hash
347
+ # For object, use to_hash. Otherwise, just return the value
348
+ # @param [Object] value Any valid value
349
+ # @return [Hash] Returns the value in the form of hash
350
+ def _to_hash(value)
351
+ if value.is_a?(Array)
352
+ value.compact.map { |v| _to_hash(v) }
353
+ elsif value.is_a?(Hash)
354
+ {}.tap do |hash|
355
+ value.each { |k, v| hash[k] = _to_hash(v) }
356
+ end
357
+ elsif value.respond_to? :to_hash
358
+ value.to_hash
359
+ else
360
+ value
361
+ end
362
+ end
363
+
364
+ end
365
+
366
+ end