aspose_pdf_cloud 19.5.0 → 19.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (271) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +39 -26
  3. data/docs/Annotation.md +1 -1
  4. data/docs/AnnotationInfo.md +2 -2
  5. data/docs/Attachment.md +1 -1
  6. data/docs/Bookmark.md +25 -0
  7. data/docs/{FileExistResponse.md → BookmarkResponse.md} +3 -3
  8. data/docs/Bookmarks.md +10 -0
  9. data/docs/{DiscUsageResponse.md → BookmarksResponse.md} +3 -3
  10. data/docs/CaretAnnotation.md +1 -1
  11. data/docs/CellRecognized.md +1 -1
  12. data/docs/CircleAnnotation.md +1 -1
  13. data/docs/CommonFigureAnnotation.md +1 -1
  14. data/docs/DiscUsage.md +3 -3
  15. data/docs/DocumentPrivilege.md +1 -1
  16. data/docs/DocumentProperty.md +1 -1
  17. data/docs/Error.md +12 -0
  18. data/docs/ErrorDetails.md +10 -0
  19. data/docs/Field.md +1 -1
  20. data/docs/Fields.md +1 -1
  21. data/docs/FileAttachmentAnnotation.md +1 -1
  22. data/docs/FileVersion.md +8 -8
  23. data/docs/FileVersions.md +9 -0
  24. data/docs/FilesList.md +9 -0
  25. data/docs/FilesUploadResult.md +10 -0
  26. data/docs/FreeTextAnnotation.md +2 -2
  27. data/docs/GraphInfo.md +2 -2
  28. data/docs/HighlightAnnotation.md +1 -1
  29. data/docs/Image.md +3 -3
  30. data/docs/ImageFooter.md +1 -1
  31. data/docs/ImageHeader.md +1 -1
  32. data/docs/ImageStamp.md +1 -1
  33. data/docs/InkAnnotation.md +1 -1
  34. data/docs/LineAnnotation.md +3 -3
  35. data/docs/LinkAnnotation.md +4 -4
  36. data/docs/MarkupAnnotation.md +1 -1
  37. data/docs/MovieAnnotation.md +1 -1
  38. data/docs/ObjectExist.md +10 -0
  39. data/docs/Page.md +1 -1
  40. data/docs/PageNumberStamp.md +1 -1
  41. data/docs/PdfApi.md +560 -328
  42. data/docs/PdfPageStamp.md +1 -1
  43. data/docs/PolyAnnotation.md +2 -2
  44. data/docs/PolyLineAnnotation.md +2 -2
  45. data/docs/PolygonAnnotation.md +2 -2
  46. data/docs/PopupAnnotation.md +1 -1
  47. data/docs/PopupAnnotationWithParent.md +1 -1
  48. data/docs/RedactionAnnotation.md +1 -1
  49. data/docs/ScreenAnnotation.md +1 -1
  50. data/docs/Signature.md +1 -1
  51. data/docs/SignatureVerifyResponse.md +1 -1
  52. data/docs/SoundAnnotation.md +2 -2
  53. data/docs/SplitResultDocument.md +1 -1
  54. data/docs/SquareAnnotation.md +1 -1
  55. data/docs/SquigglyAnnotation.md +1 -1
  56. data/docs/Stamp.md +2 -2
  57. data/docs/StampAnnotation.md +1 -1
  58. data/docs/StampBase.md +1 -1
  59. data/docs/StampInfo.md +1 -1
  60. data/docs/StorageExist.md +9 -0
  61. data/docs/StorageFile.md +13 -0
  62. data/docs/StrikeOutAnnotation.md +1 -1
  63. data/docs/Table.md +1 -1
  64. data/docs/TextAnnotation.md +1 -1
  65. data/docs/TextFooter.md +2 -2
  66. data/docs/TextHeader.md +2 -2
  67. data/docs/TextRect.md +3 -3
  68. data/docs/TextReplaceListRequest.md +1 -1
  69. data/docs/TextReplaceResponse.md +1 -1
  70. data/docs/TextStamp.md +2 -2
  71. data/docs/UnderlineAnnotation.md +1 -1
  72. data/docs/WordCountResponse.md +1 -1
  73. data/lib/aspose_pdf_cloud.rb +12 -8
  74. data/lib/aspose_pdf_cloud/api/pdf_api.rb +2521 -1650
  75. data/lib/aspose_pdf_cloud/api_client.rb +2 -54
  76. data/lib/aspose_pdf_cloud/configuration.rb +2 -5
  77. data/lib/aspose_pdf_cloud/models/annotation.rb +7 -4
  78. data/lib/aspose_pdf_cloud/models/annotation_info.rb +12 -4
  79. data/lib/aspose_pdf_cloud/models/annotations_info.rb +2 -4
  80. data/lib/aspose_pdf_cloud/models/annotations_info_response.rb +2 -4
  81. data/lib/aspose_pdf_cloud/models/aspose_response.rb +2 -4
  82. data/lib/aspose_pdf_cloud/models/attachment.rb +7 -4
  83. data/lib/aspose_pdf_cloud/models/attachment_response.rb +2 -4
  84. data/lib/aspose_pdf_cloud/models/attachments.rb +2 -4
  85. data/lib/aspose_pdf_cloud/models/attachments_response.rb +2 -4
  86. data/lib/aspose_pdf_cloud/models/{append_document.rb → bookmark.rb} +167 -42
  87. data/lib/aspose_pdf_cloud/models/{storage_exist_response.rb → bookmark_response.rb} +12 -13
  88. data/lib/aspose_pdf_cloud/models/{files_response.rb → bookmarks.rb} +22 -36
  89. data/lib/aspose_pdf_cloud/models/{disc_usage_response.rb → bookmarks_response.rb} +12 -13
  90. data/lib/aspose_pdf_cloud/models/border_info.rb +2 -4
  91. data/lib/aspose_pdf_cloud/models/caret_annotation.rb +7 -4
  92. data/lib/aspose_pdf_cloud/models/caret_annotation_response.rb +2 -4
  93. data/lib/aspose_pdf_cloud/models/caret_annotations.rb +2 -4
  94. data/lib/aspose_pdf_cloud/models/caret_annotations_response.rb +2 -4
  95. data/lib/aspose_pdf_cloud/models/cell.rb +2 -4
  96. data/lib/aspose_pdf_cloud/models/cell_recognized.rb +3 -5
  97. data/lib/aspose_pdf_cloud/models/circle_annotation.rb +7 -4
  98. data/lib/aspose_pdf_cloud/models/circle_annotation_response.rb +2 -4
  99. data/lib/aspose_pdf_cloud/models/circle_annotations.rb +2 -4
  100. data/lib/aspose_pdf_cloud/models/circle_annotations_response.rb +2 -4
  101. data/lib/aspose_pdf_cloud/models/color.rb +2 -4
  102. data/lib/aspose_pdf_cloud/models/common_figure_annotation.rb +7 -4
  103. data/lib/aspose_pdf_cloud/models/disc_usage.rb +5 -5
  104. data/lib/aspose_pdf_cloud/models/document.rb +2 -4
  105. data/lib/aspose_pdf_cloud/models/document_page_response.rb +2 -4
  106. data/lib/aspose_pdf_cloud/models/document_pages_response.rb +2 -4
  107. data/lib/aspose_pdf_cloud/models/document_privilege.rb +3 -5
  108. data/lib/aspose_pdf_cloud/models/document_properties.rb +2 -4
  109. data/lib/aspose_pdf_cloud/models/document_properties_response.rb +2 -4
  110. data/lib/aspose_pdf_cloud/models/document_property.rb +7 -4
  111. data/lib/aspose_pdf_cloud/models/document_property_response.rb +2 -4
  112. data/lib/aspose_pdf_cloud/models/document_response.rb +2 -4
  113. data/lib/aspose_pdf_cloud/models/{file_exist_response.rb → error.rb} +31 -27
  114. data/lib/aspose_pdf_cloud/models/error_details.rb +214 -0
  115. data/lib/aspose_pdf_cloud/models/field.rb +7 -4
  116. data/lib/aspose_pdf_cloud/models/field_response.rb +2 -4
  117. data/lib/aspose_pdf_cloud/models/fields.rb +7 -4
  118. data/lib/aspose_pdf_cloud/models/fields_response.rb +2 -4
  119. data/lib/aspose_pdf_cloud/models/file_attachment_annotation.rb +7 -4
  120. data/lib/aspose_pdf_cloud/models/file_attachment_annotation_response.rb +2 -4
  121. data/lib/aspose_pdf_cloud/models/file_attachment_annotations.rb +2 -4
  122. data/lib/aspose_pdf_cloud/models/file_attachment_annotations_response.rb +2 -4
  123. data/lib/aspose_pdf_cloud/models/file_version.rb +15 -5
  124. data/lib/aspose_pdf_cloud/models/file_versions.rb +201 -0
  125. data/lib/aspose_pdf_cloud/models/files_list.rb +201 -0
  126. data/lib/aspose_pdf_cloud/models/files_upload_result.rb +213 -0
  127. data/lib/aspose_pdf_cloud/models/free_text_annotation.rb +12 -4
  128. data/lib/aspose_pdf_cloud/models/free_text_annotation_response.rb +2 -4
  129. data/lib/aspose_pdf_cloud/models/free_text_annotations.rb +2 -4
  130. data/lib/aspose_pdf_cloud/models/free_text_annotations_response.rb +2 -4
  131. data/lib/aspose_pdf_cloud/models/graph_info.rb +4 -6
  132. data/lib/aspose_pdf_cloud/models/highlight_annotation.rb +7 -4
  133. data/lib/aspose_pdf_cloud/models/highlight_annotation_response.rb +2 -4
  134. data/lib/aspose_pdf_cloud/models/highlight_annotations.rb +2 -4
  135. data/lib/aspose_pdf_cloud/models/highlight_annotations_response.rb +2 -4
  136. data/lib/aspose_pdf_cloud/models/image.rb +17 -4
  137. data/lib/aspose_pdf_cloud/models/image_footer.rb +3 -5
  138. data/lib/aspose_pdf_cloud/models/image_header.rb +3 -5
  139. data/lib/aspose_pdf_cloud/models/image_response.rb +2 -4
  140. data/lib/aspose_pdf_cloud/models/image_stamp.rb +3 -5
  141. data/lib/aspose_pdf_cloud/models/image_template.rb +21 -4
  142. data/lib/aspose_pdf_cloud/models/image_templates_request.rb +2 -4
  143. data/lib/aspose_pdf_cloud/models/images.rb +2 -4
  144. data/lib/aspose_pdf_cloud/models/images_response.rb +2 -4
  145. data/lib/aspose_pdf_cloud/models/ink_annotation.rb +7 -4
  146. data/lib/aspose_pdf_cloud/models/ink_annotation_response.rb +2 -4
  147. data/lib/aspose_pdf_cloud/models/ink_annotations.rb +2 -4
  148. data/lib/aspose_pdf_cloud/models/ink_annotations_response.rb +2 -4
  149. data/lib/aspose_pdf_cloud/models/line_annotation.rb +17 -4
  150. data/lib/aspose_pdf_cloud/models/line_annotation_response.rb +2 -4
  151. data/lib/aspose_pdf_cloud/models/line_annotations.rb +2 -4
  152. data/lib/aspose_pdf_cloud/models/line_annotations_response.rb +2 -4
  153. data/lib/aspose_pdf_cloud/models/link.rb +2 -4
  154. data/lib/aspose_pdf_cloud/models/link_annotation.rb +41 -4
  155. data/lib/aspose_pdf_cloud/models/link_annotation_response.rb +2 -4
  156. data/lib/aspose_pdf_cloud/models/link_annotations.rb +2 -4
  157. data/lib/aspose_pdf_cloud/models/link_annotations_response.rb +2 -4
  158. data/lib/aspose_pdf_cloud/models/link_element.rb +2 -4
  159. data/lib/aspose_pdf_cloud/models/margin_info.rb +2 -4
  160. data/lib/aspose_pdf_cloud/models/markup_annotation.rb +7 -4
  161. data/lib/aspose_pdf_cloud/models/merge_documents.rb +2 -4
  162. data/lib/aspose_pdf_cloud/models/movie_annotation.rb +7 -4
  163. data/lib/aspose_pdf_cloud/models/movie_annotation_response.rb +2 -4
  164. data/lib/aspose_pdf_cloud/models/movie_annotations.rb +2 -4
  165. data/lib/aspose_pdf_cloud/models/movie_annotations_response.rb +2 -4
  166. data/lib/aspose_pdf_cloud/models/{file_exist.rb → object_exist.rb} +16 -16
  167. data/lib/aspose_pdf_cloud/models/optimize_options.rb +2 -4
  168. data/lib/aspose_pdf_cloud/models/page.rb +7 -4
  169. data/lib/aspose_pdf_cloud/models/page_number_stamp.rb +3 -5
  170. data/lib/aspose_pdf_cloud/models/page_word_count.rb +2 -4
  171. data/lib/aspose_pdf_cloud/models/pages.rb +2 -4
  172. data/lib/aspose_pdf_cloud/models/paragraph.rb +2 -4
  173. data/lib/aspose_pdf_cloud/models/pdf_page_stamp.rb +3 -5
  174. data/lib/aspose_pdf_cloud/models/point.rb +2 -4
  175. data/lib/aspose_pdf_cloud/models/poly_annotation.rb +12 -4
  176. data/lib/aspose_pdf_cloud/models/poly_line_annotation.rb +12 -4
  177. data/lib/aspose_pdf_cloud/models/poly_line_annotation_response.rb +2 -4
  178. data/lib/aspose_pdf_cloud/models/poly_line_annotations.rb +2 -4
  179. data/lib/aspose_pdf_cloud/models/poly_line_annotations_response.rb +2 -4
  180. data/lib/aspose_pdf_cloud/models/polygon_annotation.rb +12 -4
  181. data/lib/aspose_pdf_cloud/models/polygon_annotation_response.rb +2 -4
  182. data/lib/aspose_pdf_cloud/models/polygon_annotations.rb +2 -4
  183. data/lib/aspose_pdf_cloud/models/polygon_annotations_response.rb +2 -4
  184. data/lib/aspose_pdf_cloud/models/popup_annotation.rb +7 -4
  185. data/lib/aspose_pdf_cloud/models/popup_annotation_response.rb +2 -4
  186. data/lib/aspose_pdf_cloud/models/popup_annotation_with_parent.rb +7 -4
  187. data/lib/aspose_pdf_cloud/models/popup_annotations.rb +2 -4
  188. data/lib/aspose_pdf_cloud/models/popup_annotations_response.rb +2 -4
  189. data/lib/aspose_pdf_cloud/models/position.rb +2 -4
  190. data/lib/aspose_pdf_cloud/models/rectangle.rb +2 -4
  191. data/lib/aspose_pdf_cloud/models/redaction_annotation.rb +7 -4
  192. data/lib/aspose_pdf_cloud/models/redaction_annotation_response.rb +2 -4
  193. data/lib/aspose_pdf_cloud/models/redaction_annotations.rb +2 -4
  194. data/lib/aspose_pdf_cloud/models/redaction_annotations_response.rb +2 -4
  195. data/lib/aspose_pdf_cloud/models/row.rb +2 -4
  196. data/lib/aspose_pdf_cloud/models/row_recognized.rb +2 -4
  197. data/lib/aspose_pdf_cloud/models/screen_annotation.rb +7 -4
  198. data/lib/aspose_pdf_cloud/models/screen_annotation_response.rb +2 -4
  199. data/lib/aspose_pdf_cloud/models/screen_annotations.rb +2 -4
  200. data/lib/aspose_pdf_cloud/models/screen_annotations_response.rb +2 -4
  201. data/lib/aspose_pdf_cloud/models/segment.rb +21 -4
  202. data/lib/aspose_pdf_cloud/models/signature.rb +22 -5
  203. data/lib/aspose_pdf_cloud/models/signature_verify_response.rb +7 -4
  204. data/lib/aspose_pdf_cloud/models/sound_annotation.rb +31 -4
  205. data/lib/aspose_pdf_cloud/models/sound_annotation_response.rb +2 -4
  206. data/lib/aspose_pdf_cloud/models/sound_annotations.rb +2 -4
  207. data/lib/aspose_pdf_cloud/models/sound_annotations_response.rb +2 -4
  208. data/lib/aspose_pdf_cloud/models/split_result.rb +2 -4
  209. data/lib/aspose_pdf_cloud/models/split_result_document.rb +7 -4
  210. data/lib/aspose_pdf_cloud/models/split_result_response.rb +2 -4
  211. data/lib/aspose_pdf_cloud/models/square_annotation.rb +7 -4
  212. data/lib/aspose_pdf_cloud/models/square_annotation_response.rb +2 -4
  213. data/lib/aspose_pdf_cloud/models/square_annotations.rb +2 -4
  214. data/lib/aspose_pdf_cloud/models/square_annotations_response.rb +2 -4
  215. data/lib/aspose_pdf_cloud/models/squiggly_annotation.rb +7 -4
  216. data/lib/aspose_pdf_cloud/models/squiggly_annotation_response.rb +2 -4
  217. data/lib/aspose_pdf_cloud/models/squiggly_annotations.rb +2 -4
  218. data/lib/aspose_pdf_cloud/models/squiggly_annotations_response.rb +2 -4
  219. data/lib/aspose_pdf_cloud/models/stamp.rb +4 -6
  220. data/lib/aspose_pdf_cloud/models/stamp_annotation.rb +7 -4
  221. data/lib/aspose_pdf_cloud/models/stamp_annotation_response.rb +2 -4
  222. data/lib/aspose_pdf_cloud/models/stamp_annotations.rb +2 -4
  223. data/lib/aspose_pdf_cloud/models/stamp_annotations_response.rb +2 -4
  224. data/lib/aspose_pdf_cloud/models/stamp_base.rb +3 -5
  225. data/lib/aspose_pdf_cloud/models/stamp_info.rb +7 -4
  226. data/lib/aspose_pdf_cloud/models/stamps_info.rb +2 -4
  227. data/lib/aspose_pdf_cloud/models/stamps_info_response.rb +2 -4
  228. data/lib/aspose_pdf_cloud/models/storage_exist.rb +204 -0
  229. data/lib/aspose_pdf_cloud/models/{file.rb → storage_file.rb} +9 -6
  230. data/lib/aspose_pdf_cloud/models/strike_out_annotation.rb +7 -4
  231. data/lib/aspose_pdf_cloud/models/strike_out_annotation_response.rb +2 -4
  232. data/lib/aspose_pdf_cloud/models/strike_out_annotations.rb +2 -4
  233. data/lib/aspose_pdf_cloud/models/strike_out_annotations_response.rb +2 -4
  234. data/lib/aspose_pdf_cloud/models/table.rb +7 -4
  235. data/lib/aspose_pdf_cloud/models/table_recognized.rb +2 -4
  236. data/lib/aspose_pdf_cloud/models/table_recognized_response.rb +2 -4
  237. data/lib/aspose_pdf_cloud/models/tables_recognized.rb +2 -4
  238. data/lib/aspose_pdf_cloud/models/tables_recognized_response.rb +2 -4
  239. data/lib/aspose_pdf_cloud/models/text_annotation.rb +7 -4
  240. data/lib/aspose_pdf_cloud/models/text_annotation_response.rb +2 -4
  241. data/lib/aspose_pdf_cloud/models/text_annotations.rb +2 -4
  242. data/lib/aspose_pdf_cloud/models/text_annotations_response.rb +2 -4
  243. data/lib/aspose_pdf_cloud/models/text_footer.rb +4 -6
  244. data/lib/aspose_pdf_cloud/models/text_header.rb +4 -6
  245. data/lib/aspose_pdf_cloud/models/text_line.rb +2 -4
  246. data/lib/aspose_pdf_cloud/models/text_rect.rb +5 -7
  247. data/lib/aspose_pdf_cloud/models/text_rects.rb +2 -4
  248. data/lib/aspose_pdf_cloud/models/text_rects_response.rb +2 -4
  249. data/lib/aspose_pdf_cloud/models/text_replace.rb +40 -4
  250. data/lib/aspose_pdf_cloud/models/text_replace_list_request.rb +3 -4
  251. data/lib/aspose_pdf_cloud/models/text_replace_response.rb +7 -4
  252. data/lib/aspose_pdf_cloud/models/text_stamp.rb +4 -6
  253. data/lib/aspose_pdf_cloud/models/text_state.rb +2 -4
  254. data/lib/aspose_pdf_cloud/models/text_style.rb +2 -4
  255. data/lib/aspose_pdf_cloud/models/underline_annotation.rb +7 -4
  256. data/lib/aspose_pdf_cloud/models/underline_annotation_response.rb +2 -4
  257. data/lib/aspose_pdf_cloud/models/underline_annotations.rb +2 -4
  258. data/lib/aspose_pdf_cloud/models/underline_annotations_response.rb +2 -4
  259. data/lib/aspose_pdf_cloud/models/word_count.rb +2 -4
  260. data/lib/aspose_pdf_cloud/models/word_count_response.rb +3 -5
  261. data/lib/aspose_pdf_cloud/version.rb +1 -1
  262. data/test/pdf_tests.rb +175 -71
  263. data/test_data/sample.tex +105 -0
  264. metadata +27 -18
  265. data/docs/AppendDocument.md +0 -11
  266. data/docs/File.md +0 -13
  267. data/docs/FileExist.md +0 -10
  268. data/docs/FileVersionsResponse.md +0 -11
  269. data/docs/FilesResponse.md +0 -11
  270. data/docs/StorageExistResponse.md +0 -11
  271. data/lib/aspose_pdf_cloud/models/file_versions_response.rb +0 -227
@@ -131,11 +131,9 @@ module AsposePdfCloud
131
131
  def _deserialize(type, value)
132
132
  case type.to_sym
133
133
  when :DateTime
134
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
135
- Time.strptime(value, format).utc.to_datetime
134
+ DateTime.parse(value)
136
135
  when :Date
137
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
138
- Time.strptime(value, format).utc.to_datetime.to_date
136
+ Date.parse(value)
139
137
  when :String
140
138
  value.to_s
141
139
  when :Integer
@@ -142,11 +142,9 @@ module AsposePdfCloud
142
142
  def _deserialize(type, value)
143
143
  case type.to_sym
144
144
  when :DateTime
145
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
146
- Time.strptime(value, format).utc.to_datetime
145
+ DateTime.parse(value)
147
146
  when :Date
148
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
149
- Time.strptime(value, format).utc.to_datetime.to_date
147
+ Date.parse(value)
150
148
  when :String
151
149
  value.to_s
152
150
  when :Integer
@@ -167,11 +167,9 @@ module AsposePdfCloud
167
167
  def _deserialize(type, value)
168
168
  case type.to_sym
169
169
  when :DateTime
170
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
171
- Time.strptime(value, format).utc.to_datetime
170
+ DateTime.parse(value)
172
171
  when :Date
173
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
174
- Time.strptime(value, format).utc.to_datetime.to_date
172
+ Date.parse(value)
175
173
  when :String
176
174
  value.to_s
177
175
  when :Integer
@@ -218,12 +218,17 @@ module AsposePdfCloud
218
218
  # @return Array for valid properies with the reasons
219
219
  def list_invalid_properties
220
220
  invalid_properties = Array.new
221
+ if @rect.nil?
222
+ invalid_properties.push("invalid value for 'rect', rect cannot be nil.")
223
+ end
224
+
221
225
  return invalid_properties
222
226
  end
223
227
 
224
228
  # Check to see if the all the properties in the model are valid
225
229
  # @return true if the model is valid
226
230
  def valid?
231
+ return false if @rect.nil?
227
232
  return true
228
233
  end
229
234
 
@@ -291,11 +296,9 @@ module AsposePdfCloud
291
296
  def _deserialize(type, value)
292
297
  case type.to_sym
293
298
  when :DateTime
294
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
295
- Time.strptime(value, format).utc.to_datetime
299
+ DateTime.parse(value)
296
300
  when :Date
297
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
298
- Time.strptime(value, format).utc.to_datetime.to_date
301
+ Date.parse(value)
299
302
  when :String
300
303
  value.to_s
301
304
  when :Integer
@@ -23,10 +23,12 @@ require 'date'
23
23
  require 'time'
24
24
 
25
25
  module AsposePdfCloud
26
-
26
+ # Class for disc space information.
27
27
  class DiscUsage
28
+ # Application used disc space.
28
29
  attr_accessor :used_size
29
30
 
31
+ # Total disc space.
30
32
  attr_accessor :total_size
31
33
 
32
34
 
@@ -135,11 +137,9 @@ module AsposePdfCloud
135
137
  def _deserialize(type, value)
136
138
  case type.to_sym
137
139
  when :DateTime
138
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
139
- Time.strptime(value, format).utc.to_datetime
140
+ DateTime.parse(value)
140
141
  when :Date
141
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
142
- Time.strptime(value, format).utc.to_datetime.to_date
142
+ Date.parse(value)
143
143
  when :String
144
144
  value.to_s
145
145
  when :Integer
@@ -139,11 +139,9 @@ module AsposePdfCloud
139
139
  def _deserialize(type, value)
140
140
  case type.to_sym
141
141
  when :DateTime
142
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
143
- Time.strptime(value, format).utc.to_datetime
142
+ DateTime.parse(value)
144
143
  when :Date
145
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
146
- Time.strptime(value, format).utc.to_datetime.to_date
144
+ Date.parse(value)
147
145
  when :String
148
146
  value.to_s
149
147
  when :Integer
@@ -142,11 +142,9 @@ module AsposePdfCloud
142
142
  def _deserialize(type, value)
143
143
  case type.to_sym
144
144
  when :DateTime
145
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
146
- Time.strptime(value, format).utc.to_datetime
145
+ DateTime.parse(value)
147
146
  when :Date
148
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
149
- Time.strptime(value, format).utc.to_datetime.to_date
147
+ Date.parse(value)
150
148
  when :String
151
149
  value.to_s
152
150
  when :Integer
@@ -142,11 +142,9 @@ module AsposePdfCloud
142
142
  def _deserialize(type, value)
143
143
  case type.to_sym
144
144
  when :DateTime
145
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
146
- Time.strptime(value, format).utc.to_datetime
145
+ DateTime.parse(value)
147
146
  when :Date
148
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
149
- Time.strptime(value, format).utc.to_datetime.to_date
147
+ Date.parse(value)
150
148
  when :String
151
149
  value.to_s
152
150
  when :Integer
@@ -23,7 +23,7 @@ require 'date'
23
23
  require 'time'
24
24
 
25
25
  module AsposePdfCloud
26
- # Represents the privileges for accessing Pdf file./>.
26
+ # Represents the privileges for accessing Pdf file./>.
27
27
  class DocumentPrivilege
28
28
  # Sets the permission which allow print or not. true is allow and false or not set is forbidden.
29
29
  attr_accessor :allow_print
@@ -217,11 +217,9 @@ module AsposePdfCloud
217
217
  def _deserialize(type, value)
218
218
  case type.to_sym
219
219
  when :DateTime
220
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
221
- Time.strptime(value, format).utc.to_datetime
220
+ DateTime.parse(value)
222
221
  when :Date
223
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
224
- Time.strptime(value, format).utc.to_datetime.to_date
222
+ Date.parse(value)
225
223
  when :String
226
224
  value.to_s
227
225
  when :Integer
@@ -131,11 +131,9 @@ module AsposePdfCloud
131
131
  def _deserialize(type, value)
132
132
  case type.to_sym
133
133
  when :DateTime
134
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
135
- Time.strptime(value, format).utc.to_datetime
134
+ DateTime.parse(value)
136
135
  when :Date
137
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
138
- Time.strptime(value, format).utc.to_datetime.to_date
136
+ Date.parse(value)
139
137
  when :String
140
138
  value.to_s
141
139
  when :Integer
@@ -142,11 +142,9 @@ module AsposePdfCloud
142
142
  def _deserialize(type, value)
143
143
  case type.to_sym
144
144
  when :DateTime
145
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
146
- Time.strptime(value, format).utc.to_datetime
145
+ DateTime.parse(value)
147
146
  when :Date
148
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
149
- Time.strptime(value, format).utc.to_datetime.to_date
147
+ Date.parse(value)
150
148
  when :String
151
149
  value.to_s
152
150
  when :Integer
@@ -90,12 +90,17 @@ module AsposePdfCloud
90
90
  # @return Array for valid properies with the reasons
91
91
  def list_invalid_properties
92
92
  invalid_properties = Array.new
93
+ if @built_in.nil?
94
+ invalid_properties.push("invalid value for 'built_in', built_in cannot be nil.")
95
+ end
96
+
93
97
  return invalid_properties
94
98
  end
95
99
 
96
100
  # Check to see if the all the properties in the model are valid
97
101
  # @return true if the model is valid
98
102
  def valid?
103
+ return false if @built_in.nil?
99
104
  return true
100
105
  end
101
106
 
@@ -149,11 +154,9 @@ module AsposePdfCloud
149
154
  def _deserialize(type, value)
150
155
  case type.to_sym
151
156
  when :DateTime
152
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
153
- Time.strptime(value, format).utc.to_datetime
157
+ DateTime.parse(value)
154
158
  when :Date
155
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
156
- Time.strptime(value, format).utc.to_datetime.to_date
159
+ Date.parse(value)
157
160
  when :String
158
161
  value.to_s
159
162
  when :Integer
@@ -142,11 +142,9 @@ module AsposePdfCloud
142
142
  def _deserialize(type, value)
143
143
  case type.to_sym
144
144
  when :DateTime
145
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
146
- Time.strptime(value, format).utc.to_datetime
145
+ DateTime.parse(value)
147
146
  when :Date
148
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
149
- Time.strptime(value, format).utc.to_datetime.to_date
147
+ Date.parse(value)
150
148
  when :String
151
149
  value.to_s
152
150
  when :Integer
@@ -154,11 +154,9 @@ module AsposePdfCloud
154
154
  def _deserialize(type, value)
155
155
  case type.to_sym
156
156
  when :DateTime
157
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
158
- Time.strptime(value, format).utc.to_datetime
157
+ DateTime.parse(value)
159
158
  when :Date
160
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
161
- Time.strptime(value, format).utc.to_datetime.to_date
159
+ Date.parse(value)
162
160
  when :String
163
161
  value.to_s
164
162
  when :Integer
@@ -23,32 +23,38 @@ require 'date'
23
23
  require 'time'
24
24
 
25
25
  module AsposePdfCloud
26
-
27
- class FileExistResponse
28
- # Response status code.
26
+ # Error
27
+ class Error
28
+ # Code
29
29
  attr_accessor :code
30
30
 
31
- # Response status.
32
- attr_accessor :status
31
+ # Message
32
+ attr_accessor :message
33
+
34
+ # Description
35
+ attr_accessor :description
33
36
 
34
- attr_accessor :file_exist
37
+ # Inner Error
38
+ attr_accessor :inner_error
35
39
 
36
40
 
37
41
  # Attribute mapping from ruby-style variable name to JSON key.
38
42
  def self.attribute_map
39
43
  {
40
44
  :'code' => :'Code',
41
- :'status' => :'Status',
42
- :'file_exist' => :'FileExist'
45
+ :'message' => :'Message',
46
+ :'description' => :'Description',
47
+ :'inner_error' => :'InnerError'
43
48
  }
44
49
  end
45
50
 
46
51
  # Attribute type mapping.
47
52
  def self.swagger_types
48
53
  {
49
- :'code' => :'Integer',
50
- :'status' => :'String',
51
- :'file_exist' => :'FileExist'
54
+ :'code' => :'String',
55
+ :'message' => :'String',
56
+ :'description' => :'String',
57
+ :'inner_error' => :'ErrorDetails'
52
58
  }
53
59
  end
54
60
 
@@ -64,12 +70,16 @@ module AsposePdfCloud
64
70
  self.code = attributes[:'Code']
65
71
  end
66
72
 
67
- if attributes.has_key?(:'Status')
68
- self.status = attributes[:'Status']
73
+ if attributes.has_key?(:'Message')
74
+ self.message = attributes[:'Message']
75
+ end
76
+
77
+ if attributes.has_key?(:'Description')
78
+ self.description = attributes[:'Description']
69
79
  end
70
80
 
71
- if attributes.has_key?(:'FileExist')
72
- self.file_exist = attributes[:'FileExist']
81
+ if attributes.has_key?(:'InnerError')
82
+ self.inner_error = attributes[:'InnerError']
73
83
  end
74
84
 
75
85
  end
@@ -78,17 +88,12 @@ module AsposePdfCloud
78
88
  # @return Array for valid properies with the reasons
79
89
  def list_invalid_properties
80
90
  invalid_properties = Array.new
81
- if @code.nil?
82
- invalid_properties.push("invalid value for 'code', code cannot be nil.")
83
- end
84
-
85
91
  return invalid_properties
86
92
  end
87
93
 
88
94
  # Check to see if the all the properties in the model are valid
89
95
  # @return true if the model is valid
90
96
  def valid?
91
- return false if @code.nil?
92
97
  return true
93
98
  end
94
99
 
@@ -98,8 +103,9 @@ module AsposePdfCloud
98
103
  return true if self.equal?(o)
99
104
  self.class == o.class &&
100
105
  code == o.code &&
101
- status == o.status &&
102
- file_exist == o.file_exist
106
+ message == o.message &&
107
+ description == o.description &&
108
+ inner_error == o.inner_error
103
109
  end
104
110
 
105
111
  # @see the `==` method
@@ -111,7 +117,7 @@ module AsposePdfCloud
111
117
  # Calculates hash code according to all attributes.
112
118
  # @return [Fixnum] Hash code
113
119
  def hash
114
- [code, status, file_exist].hash
120
+ [code, message, description, inner_error].hash
115
121
  end
116
122
 
117
123
  # Builds the object from hash
@@ -141,11 +147,9 @@ module AsposePdfCloud
141
147
  def _deserialize(type, value)
142
148
  case type.to_sym
143
149
  when :DateTime
144
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
145
- Time.strptime(value, format).utc.to_datetime
150
+ DateTime.parse(value)
146
151
  when :Date
147
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
148
- Time.strptime(value, format).utc.to_datetime.to_date
152
+ Date.parse(value)
149
153
  when :String
150
154
  value.to_s
151
155
  when :Integer
@@ -0,0 +1,214 @@
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ Copyright (c) 2019 Aspose.PDF Cloud
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is
9
+ furnished to do so, subject to the following conditions:
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18
+ SOFTWARE.
19
+ --------------------------------------------------------------------------------------------------------------------
20
+ =end
21
+
22
+ require 'date'
23
+ require 'time'
24
+
25
+ module AsposePdfCloud
26
+ # The error details
27
+ class ErrorDetails
28
+ # The request id
29
+ attr_accessor :request_id
30
+
31
+ # Date
32
+ attr_accessor :date
33
+
34
+
35
+ # Attribute mapping from ruby-style variable name to JSON key.
36
+ def self.attribute_map
37
+ {
38
+ :'request_id' => :'RequestId',
39
+ :'date' => :'Date'
40
+ }
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.swagger_types
45
+ {
46
+ :'request_id' => :'String',
47
+ :'date' => :'DateTime'
48
+ }
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ return unless attributes.is_a?(Hash)
55
+
56
+ # convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
58
+
59
+ if attributes.has_key?(:'RequestId')
60
+ self.request_id = attributes[:'RequestId']
61
+ end
62
+
63
+ if attributes.has_key?(:'Date')
64
+ self.date = attributes[:'Date']
65
+ end
66
+
67
+ end
68
+
69
+ # Show invalid properties with the reasons. Usually used together with valid?
70
+ # @return Array for valid properies with the reasons
71
+ def list_invalid_properties
72
+ invalid_properties = Array.new
73
+ if @date.nil?
74
+ invalid_properties.push("invalid value for 'date', date cannot be nil.")
75
+ end
76
+
77
+ return invalid_properties
78
+ end
79
+
80
+ # Check to see if the all the properties in the model are valid
81
+ # @return true if the model is valid
82
+ def valid?
83
+ return false if @date.nil?
84
+ return true
85
+ end
86
+
87
+ # Checks equality by comparing each attribute.
88
+ # @param [Object] Object to be compared
89
+ def ==(o)
90
+ return true if self.equal?(o)
91
+ self.class == o.class &&
92
+ request_id == o.request_id &&
93
+ date == o.date
94
+ end
95
+
96
+ # @see the `==` method
97
+ # @param [Object] Object to be compared
98
+ def eql?(o)
99
+ self == o
100
+ end
101
+
102
+ # Calculates hash code according to all attributes.
103
+ # @return [Fixnum] Hash code
104
+ def hash
105
+ [request_id, date].hash
106
+ end
107
+
108
+ # Builds the object from hash
109
+ # @param [Hash] attributes Model attributes in the form of hash
110
+ # @return [Object] Returns the model itself
111
+ def build_from_hash(attributes)
112
+ return nil unless attributes.is_a?(Hash)
113
+ self.class.swagger_types.each_pair do |key, type|
114
+ if type =~ /\AArray<(.*)>/i
115
+ # check to ensure the input is an array given that the the attribute
116
+ # is documented as an array but the input is not
117
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
118
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
119
+ end
120
+ elsif !attributes[self.class.attribute_map[key]].nil?
121
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
122
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
123
+ end
124
+
125
+ self
126
+ end
127
+
128
+ # Deserializes the data based on type
129
+ # @param string type Data type
130
+ # @param string value Value to be deserialized
131
+ # @return [Object] Deserialized data
132
+ def _deserialize(type, value)
133
+ case type.to_sym
134
+ when :DateTime
135
+ DateTime.parse(value)
136
+ when :Date
137
+ Date.parse(value)
138
+ when :String
139
+ value.to_s
140
+ when :Integer
141
+ value.to_i
142
+ when :Float
143
+ value.to_f
144
+ when :BOOLEAN
145
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
146
+ true
147
+ else
148
+ false
149
+ end
150
+ when :Object
151
+ # generic object (usually a Hash), return directly
152
+ value
153
+ when /\AArray<(?<inner_type>.+)>\z/
154
+ inner_type = Regexp.last_match[:inner_type]
155
+ value.map { |v| _deserialize(inner_type, v) }
156
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
157
+ k_type = Regexp.last_match[:k_type]
158
+ v_type = Regexp.last_match[:v_type]
159
+ {}.tap do |hash|
160
+ value.each do |k, v|
161
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
162
+ end
163
+ end
164
+ else # model
165
+ temp_model = AsposePdfCloud.const_get(type).new
166
+ temp_model.build_from_hash(value)
167
+ end
168
+ end
169
+
170
+ # Returns the string representation of the object
171
+ # @return [String] String presentation of the object
172
+ def to_s
173
+ to_hash.to_s
174
+ end
175
+
176
+ # to_body is an alias to to_hash (backward compatibility)
177
+ # @return [Hash] Returns the object in the form of hash
178
+ def to_body
179
+ to_hash
180
+ end
181
+
182
+ # Returns the object in the form of hash
183
+ # @return [Hash] Returns the object in the form of hash
184
+ def to_hash
185
+ hash = {}
186
+ self.class.attribute_map.each_pair do |attr, param|
187
+ value = self.send(attr)
188
+ next if value.nil?
189
+ hash[param] = _to_hash(value)
190
+ end
191
+ hash
192
+ end
193
+
194
+ # Outputs non-array value in the form of hash
195
+ # For object, use to_hash. Otherwise, just return the value
196
+ # @param [Object] value Any valid value
197
+ # @return [Hash] Returns the value in the form of hash
198
+ def _to_hash(value)
199
+ if value.is_a?(Array)
200
+ value.compact.map{ |v| _to_hash(v) }
201
+ elsif value.is_a?(Hash)
202
+ {}.tap do |hash|
203
+ value.each { |k, v| hash[k] = _to_hash(v) }
204
+ end
205
+ elsif value.respond_to? :to_hash
206
+ value.to_hash
207
+ else
208
+ value
209
+ end
210
+ end
211
+
212
+ end
213
+
214
+ end