aspose_pdf_cloud 19.5.0 → 19.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
@@ -418,8 +418,8 @@ module AsposePdfCloud
418
418
  end
419
419
 
420
420
  # resource path
421
- local_var_path = "/oauth2/token"
422
- url = build_request_url(local_var_path).gsub('/v2.0', '')
421
+ local_var_path = "/connect/token"
422
+ url = build_request_url(local_var_path).gsub('/v3.0', '')
423
423
 
424
424
  # header parameters
425
425
  header_params = {}
@@ -464,58 +464,6 @@ module AsposePdfCloud
464
464
  data = JSON.parse("[#{response.body}]", :symbolize_names => true)[0]
465
465
 
466
466
  @config.access_token = data[:access_token]
467
- @config.refresh_token = data[:refresh_token]
468
- end
469
-
470
- # refresh OAuth tokens
471
- def refresh_token
472
- # resource path
473
- local_var_path = "/oauth2/token"
474
- url = build_request_url(local_var_path).gsub('/v2.0', '')
475
-
476
- # header parameters
477
- header_params = {}
478
- # HTTP header 'Content-Type'
479
- header_params['Content-Type'] = select_header_content_type(['application/x-www-form-urlencoded'])
480
-
481
- query_params = {}
482
- # form parameters
483
- form_params = {}
484
- form_params["grant_type"] = 'refresh_token'
485
- form_params["refresh_token"] = @config.refresh_token
486
-
487
- body = {}
488
-
489
-
490
- req_opts = {
491
- :headers => header_params,
492
- :params => query_params,
493
- :body => body
494
- }
495
-
496
-
497
- req_body = build_request_body(header_params, form_params, body)
498
- req_opts.update :body => req_body
499
-
500
- req_opts[:params] = query_params
501
-
502
-
503
- conn = Faraday.new url, {:params => query_params, :headers => header_params} do |f|
504
- f.request :multipart
505
- f.request :url_encoded
506
- f.adapter Faraday.default_adapter
507
- end
508
-
509
- if req_opts[:body] == {}
510
- req_opts[:body] = nil
511
- end
512
-
513
-
514
- response = conn.post url, form_params, req_opts[:body]
515
- data = JSON.parse("[#{response.body}]", :symbolize_names => true)[0]
516
-
517
- @config.access_token = data[:access_token]
518
- @config.refresh_token = data[:refresh_token]
519
467
  end
520
468
 
521
469
  # Adds OAuth2.0 token
@@ -39,9 +39,6 @@ module AsposePdfCloud
39
39
  # Defines the access token (Bearer) used with OAuth2.
40
40
  attr_accessor :access_token
41
41
 
42
- # Defines the refresh token (Bearer) used with OAuth2.
43
- attr_accessor :refresh_token
44
-
45
42
  # Set this to enable/disable debugging. When enabled (set to true), HTTP request/response
46
43
  # details will be logged with `logger.debug` (see the `logger` attribute).
47
44
  # Default to false.
@@ -155,14 +152,14 @@ module AsposePdfCloud
155
152
  end
156
153
 
157
154
  def base_url
158
- url = "#{scheme}://#{[host, '/v2.0'].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '')
155
+ url = "#{scheme}://#{[host, '/v3.0'].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '')
159
156
  URI.encode(url)
160
157
  end
161
158
 
162
159
  # Returns Auth Settings hash for api client.
163
160
  def auth_settings
164
161
  {
165
- 'oauth' =>
162
+ 'JWT' =>
166
163
  {
167
164
  type: 'oauth2',
168
165
  in: 'header',
@@ -164,12 +164,17 @@ module AsposePdfCloud
164
164
  # @return Array for valid properies with the reasons
165
165
  def list_invalid_properties
166
166
  invalid_properties = Array.new
167
+ if @rect.nil?
168
+ invalid_properties.push("invalid value for 'rect', rect cannot be nil.")
169
+ end
170
+
167
171
  return invalid_properties
168
172
  end
169
173
 
170
174
  # Check to see if the all the properties in the model are valid
171
175
  # @return true if the model is valid
172
176
  def valid?
177
+ return false if @rect.nil?
173
178
  return true
174
179
  end
175
180
 
@@ -231,11 +236,9 @@ module AsposePdfCloud
231
236
  def _deserialize(type, value)
232
237
  case type.to_sym
233
238
  when :DateTime
234
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
235
- Time.strptime(value, format).utc.to_datetime
239
+ DateTime.parse(value)
236
240
  when :Date
237
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
238
- Time.strptime(value, format).utc.to_datetime.to_date
241
+ Date.parse(value)
239
242
  when :String
240
243
  value.to_s
241
244
  when :Integer
@@ -173,12 +173,22 @@ module AsposePdfCloud
173
173
  # @return Array for valid properies with the reasons
174
174
  def list_invalid_properties
175
175
  invalid_properties = Array.new
176
+ if @rect.nil?
177
+ invalid_properties.push("invalid value for 'rect', rect cannot be nil.")
178
+ end
179
+
180
+ if @annotation_type.nil?
181
+ invalid_properties.push("invalid value for 'annotation_type', annotation_type cannot be nil.")
182
+ end
183
+
176
184
  return invalid_properties
177
185
  end
178
186
 
179
187
  # Check to see if the all the properties in the model are valid
180
188
  # @return true if the model is valid
181
189
  def valid?
190
+ return false if @rect.nil?
191
+ return false if @annotation_type.nil?
182
192
  return true
183
193
  end
184
194
 
@@ -241,11 +251,9 @@ module AsposePdfCloud
241
251
  def _deserialize(type, value)
242
252
  case type.to_sym
243
253
  when :DateTime
244
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
245
- Time.strptime(value, format).utc.to_datetime
254
+ DateTime.parse(value)
246
255
  when :Date
247
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
248
- Time.strptime(value, format).utc.to_datetime.to_date
256
+ Date.parse(value)
249
257
  when :String
250
258
  value.to_s
251
259
  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
@@ -132,11 +132,9 @@ module AsposePdfCloud
132
132
  def _deserialize(type, value)
133
133
  case type.to_sym
134
134
  when :DateTime
135
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
136
- Time.strptime(value, format).utc.to_datetime
135
+ DateTime.parse(value)
137
136
  when :Date
138
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
139
- Time.strptime(value, format).utc.to_datetime.to_date
137
+ Date.parse(value)
140
138
  when :String
141
139
  value.to_s
142
140
  when :Integer
@@ -126,12 +126,17 @@ module AsposePdfCloud
126
126
  # @return Array for valid properies with the reasons
127
127
  def list_invalid_properties
128
128
  invalid_properties = Array.new
129
+ if @size.nil?
130
+ invalid_properties.push("invalid value for 'size', size cannot be nil.")
131
+ end
132
+
129
133
  return invalid_properties
130
134
  end
131
135
 
132
136
  # Check to see if the all the properties in the model are valid
133
137
  # @return true if the model is valid
134
138
  def valid?
139
+ return false if @size.nil?
135
140
  return true
136
141
  end
137
142
 
@@ -189,11 +194,9 @@ module AsposePdfCloud
189
194
  def _deserialize(type, value)
190
195
  case type.to_sym
191
196
  when :DateTime
192
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
193
- Time.strptime(value, format).utc.to_datetime
197
+ DateTime.parse(value)
194
198
  when :Date
195
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
196
- Time.strptime(value, format).utc.to_datetime.to_date
199
+ Date.parse(value)
197
200
  when :String
198
201
  value.to_s
199
202
  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
@@ -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
@@ -23,33 +23,103 @@ require 'date'
23
23
  require 'time'
24
24
 
25
25
  module AsposePdfCloud
26
- # Class for appendDocument service request building.
27
- class AppendDocument
28
- # Document to append (server path).
29
- attr_accessor :document
26
+ # Provides link to bookmark.
27
+ class Bookmark
28
+ # Link to the document.
29
+ attr_accessor :links
30
30
 
31
- # Appending start page.
32
- attr_accessor :start_page
31
+ # Get the Title;
32
+ attr_accessor :title
33
33
 
34
- # Appending end page.
35
- attr_accessor :end_page
34
+ # Is bookmark italic.
35
+ attr_accessor :italic
36
+
37
+ # Is bookmark bold.
38
+ attr_accessor :bold
39
+
40
+ # Get the color
41
+ attr_accessor :color
42
+
43
+ # Gets or sets the action bound with the bookmark. If PageNumber is presented the action can not be specified. The action type includes: \"GoTo\", \"GoToR\", \"Launch\", \"Named\".
44
+ attr_accessor :action
45
+
46
+ # Gets or sets bookmark's hierarchy level.
47
+ attr_accessor :level
48
+
49
+ # Gets or sets bookmark's destination page. Required if action is set as string.Empty.
50
+ attr_accessor :destination
51
+
52
+ # Gets or sets the type of display bookmark's destination page.
53
+ attr_accessor :page_display
54
+
55
+ # Gets or sets the bottom coordinate of page display.
56
+ attr_accessor :page_display_bottom
57
+
58
+ # Gets or sets the left coordinate of page display.
59
+ attr_accessor :page_display_left
60
+
61
+ # Gets or sets the right coordinate of page display.
62
+ attr_accessor :page_display_right
63
+
64
+ # Gets or sets the top coordinate of page display.
65
+ attr_accessor :page_display_top
66
+
67
+ # Gets or sets the zoom factor of page display.
68
+ attr_accessor :page_display_zoom
69
+
70
+ # Gets or sets the number of bookmark's destination page.
71
+ attr_accessor :page_number
72
+
73
+ # Gets or sets the file (path) which is required for \"GoToR\" action of bookmark.
74
+ attr_accessor :remote_file
75
+
76
+ # The children bookmarks.
77
+ attr_accessor :bookmarks
36
78
 
37
79
 
38
80
  # Attribute mapping from ruby-style variable name to JSON key.
39
81
  def self.attribute_map
40
82
  {
41
- :'document' => :'Document',
42
- :'start_page' => :'StartPage',
43
- :'end_page' => :'EndPage'
83
+ :'links' => :'Links',
84
+ :'title' => :'Title',
85
+ :'italic' => :'Italic',
86
+ :'bold' => :'Bold',
87
+ :'color' => :'Color',
88
+ :'action' => :'Action',
89
+ :'level' => :'Level',
90
+ :'destination' => :'Destination',
91
+ :'page_display' => :'PageDisplay',
92
+ :'page_display_bottom' => :'PageDisplay_Bottom',
93
+ :'page_display_left' => :'PageDisplay_Left',
94
+ :'page_display_right' => :'PageDisplay_Right',
95
+ :'page_display_top' => :'PageDisplay_Top',
96
+ :'page_display_zoom' => :'PageDisplay_Zoom',
97
+ :'page_number' => :'PageNumber',
98
+ :'remote_file' => :'RemoteFile',
99
+ :'bookmarks' => :'Bookmarks'
44
100
  }
45
101
  end
46
102
 
47
103
  # Attribute type mapping.
48
104
  def self.swagger_types
49
105
  {
50
- :'document' => :'String',
51
- :'start_page' => :'Integer',
52
- :'end_page' => :'Integer'
106
+ :'links' => :'Array<Link>',
107
+ :'title' => :'String',
108
+ :'italic' => :'BOOLEAN',
109
+ :'bold' => :'BOOLEAN',
110
+ :'color' => :'Color',
111
+ :'action' => :'String',
112
+ :'level' => :'Integer',
113
+ :'destination' => :'String',
114
+ :'page_display' => :'String',
115
+ :'page_display_bottom' => :'Integer',
116
+ :'page_display_left' => :'Integer',
117
+ :'page_display_right' => :'Integer',
118
+ :'page_display_top' => :'Integer',
119
+ :'page_display_zoom' => :'Integer',
120
+ :'page_number' => :'Integer',
121
+ :'remote_file' => :'String',
122
+ :'bookmarks' => :'Bookmarks'
53
123
  }
54
124
  end
55
125
 
@@ -61,45 +131,88 @@ module AsposePdfCloud
61
131
  # convert string to symbol for hash key
62
132
  attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
63
133
 
64
- if attributes.has_key?(:'Document')
65
- self.document = attributes[:'Document']
134
+ if attributes.has_key?(:'Links')
135
+ if (value = attributes[:'Links']).is_a?(Array)
136
+ self.links = value
137
+ end
66
138
  end
67
139
 
68
- if attributes.has_key?(:'StartPage')
69
- self.start_page = attributes[:'StartPage']
140
+ if attributes.has_key?(:'Title')
141
+ self.title = attributes[:'Title']
70
142
  end
71
143
 
72
- if attributes.has_key?(:'EndPage')
73
- self.end_page = attributes[:'EndPage']
144
+ if attributes.has_key?(:'Italic')
145
+ self.italic = attributes[:'Italic']
74
146
  end
75
147
 
76
- end
148
+ if attributes.has_key?(:'Bold')
149
+ self.bold = attributes[:'Bold']
150
+ end
77
151
 
78
- # Show invalid properties with the reasons. Usually used together with valid?
79
- # @return Array for valid properies with the reasons
80
- def list_invalid_properties
81
- invalid_properties = Array.new
82
- if @document.nil?
83
- invalid_properties.push("invalid value for 'document', document cannot be nil.")
152
+ if attributes.has_key?(:'Color')
153
+ self.color = attributes[:'Color']
84
154
  end
85
155
 
86
- if @start_page.nil?
87
- invalid_properties.push("invalid value for 'start_page', start_page cannot be nil.")
156
+ if attributes.has_key?(:'Action')
157
+ self.action = attributes[:'Action']
88
158
  end
89
159
 
90
- if @end_page.nil?
91
- invalid_properties.push("invalid value for 'end_page', end_page cannot be nil.")
160
+ if attributes.has_key?(:'Level')
161
+ self.level = attributes[:'Level']
92
162
  end
93
163
 
164
+ if attributes.has_key?(:'Destination')
165
+ self.destination = attributes[:'Destination']
166
+ end
167
+
168
+ if attributes.has_key?(:'PageDisplay')
169
+ self.page_display = attributes[:'PageDisplay']
170
+ end
171
+
172
+ if attributes.has_key?(:'PageDisplay_Bottom')
173
+ self.page_display_bottom = attributes[:'PageDisplay_Bottom']
174
+ end
175
+
176
+ if attributes.has_key?(:'PageDisplay_Left')
177
+ self.page_display_left = attributes[:'PageDisplay_Left']
178
+ end
179
+
180
+ if attributes.has_key?(:'PageDisplay_Right')
181
+ self.page_display_right = attributes[:'PageDisplay_Right']
182
+ end
183
+
184
+ if attributes.has_key?(:'PageDisplay_Top')
185
+ self.page_display_top = attributes[:'PageDisplay_Top']
186
+ end
187
+
188
+ if attributes.has_key?(:'PageDisplay_Zoom')
189
+ self.page_display_zoom = attributes[:'PageDisplay_Zoom']
190
+ end
191
+
192
+ if attributes.has_key?(:'PageNumber')
193
+ self.page_number = attributes[:'PageNumber']
194
+ end
195
+
196
+ if attributes.has_key?(:'RemoteFile')
197
+ self.remote_file = attributes[:'RemoteFile']
198
+ end
199
+
200
+ if attributes.has_key?(:'Bookmarks')
201
+ self.bookmarks = attributes[:'Bookmarks']
202
+ end
203
+
204
+ end
205
+
206
+ # Show invalid properties with the reasons. Usually used together with valid?
207
+ # @return Array for valid properies with the reasons
208
+ def list_invalid_properties
209
+ invalid_properties = Array.new
94
210
  return invalid_properties
95
211
  end
96
212
 
97
213
  # Check to see if the all the properties in the model are valid
98
214
  # @return true if the model is valid
99
215
  def valid?
100
- return false if @document.nil?
101
- return false if @start_page.nil?
102
- return false if @end_page.nil?
103
216
  return true
104
217
  end
105
218
 
@@ -108,9 +221,23 @@ module AsposePdfCloud
108
221
  def ==(o)
109
222
  return true if self.equal?(o)
110
223
  self.class == o.class &&
111
- document == o.document &&
112
- start_page == o.start_page &&
113
- end_page == o.end_page
224
+ links == o.links &&
225
+ title == o.title &&
226
+ italic == o.italic &&
227
+ bold == o.bold &&
228
+ color == o.color &&
229
+ action == o.action &&
230
+ level == o.level &&
231
+ destination == o.destination &&
232
+ page_display == o.page_display &&
233
+ page_display_bottom == o.page_display_bottom &&
234
+ page_display_left == o.page_display_left &&
235
+ page_display_right == o.page_display_right &&
236
+ page_display_top == o.page_display_top &&
237
+ page_display_zoom == o.page_display_zoom &&
238
+ page_number == o.page_number &&
239
+ remote_file == o.remote_file &&
240
+ bookmarks == o.bookmarks
114
241
  end
115
242
 
116
243
  # @see the `==` method
@@ -122,7 +249,7 @@ module AsposePdfCloud
122
249
  # Calculates hash code according to all attributes.
123
250
  # @return [Fixnum] Hash code
124
251
  def hash
125
- [document, start_page, end_page].hash
252
+ [links, title, italic, bold, color, action, level, destination, page_display, page_display_bottom, page_display_left, page_display_right, page_display_top, page_display_zoom, page_number, remote_file, bookmarks].hash
126
253
  end
127
254
 
128
255
  # Builds the object from hash
@@ -152,11 +279,9 @@ module AsposePdfCloud
152
279
  def _deserialize(type, value)
153
280
  case type.to_sym
154
281
  when :DateTime
155
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
156
- Time.strptime(value, format).utc.to_datetime
282
+ DateTime.parse(value)
157
283
  when :Date
158
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
159
- Time.strptime(value, format).utc.to_datetime.to_date
284
+ Date.parse(value)
160
285
  when :String
161
286
  value.to_s
162
287
  when :Integer