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.
- checksums.yaml +4 -4
- data/README.md +39 -26
- data/docs/Annotation.md +1 -1
- data/docs/AnnotationInfo.md +2 -2
- data/docs/Attachment.md +1 -1
- data/docs/Bookmark.md +25 -0
- data/docs/{FileExistResponse.md → BookmarkResponse.md} +3 -3
- data/docs/Bookmarks.md +10 -0
- data/docs/{DiscUsageResponse.md → BookmarksResponse.md} +3 -3
- data/docs/CaretAnnotation.md +1 -1
- data/docs/CellRecognized.md +1 -1
- data/docs/CircleAnnotation.md +1 -1
- data/docs/CommonFigureAnnotation.md +1 -1
- data/docs/DiscUsage.md +3 -3
- data/docs/DocumentPrivilege.md +1 -1
- data/docs/DocumentProperty.md +1 -1
- data/docs/Error.md +12 -0
- data/docs/ErrorDetails.md +10 -0
- data/docs/Field.md +1 -1
- data/docs/Fields.md +1 -1
- data/docs/FileAttachmentAnnotation.md +1 -1
- data/docs/FileVersion.md +8 -8
- data/docs/FileVersions.md +9 -0
- data/docs/FilesList.md +9 -0
- data/docs/FilesUploadResult.md +10 -0
- data/docs/FreeTextAnnotation.md +2 -2
- data/docs/GraphInfo.md +2 -2
- data/docs/HighlightAnnotation.md +1 -1
- data/docs/Image.md +3 -3
- data/docs/ImageFooter.md +1 -1
- data/docs/ImageHeader.md +1 -1
- data/docs/ImageStamp.md +1 -1
- data/docs/InkAnnotation.md +1 -1
- data/docs/LineAnnotation.md +3 -3
- data/docs/LinkAnnotation.md +4 -4
- data/docs/MarkupAnnotation.md +1 -1
- data/docs/MovieAnnotation.md +1 -1
- data/docs/ObjectExist.md +10 -0
- data/docs/Page.md +1 -1
- data/docs/PageNumberStamp.md +1 -1
- data/docs/PdfApi.md +560 -328
- data/docs/PdfPageStamp.md +1 -1
- data/docs/PolyAnnotation.md +2 -2
- data/docs/PolyLineAnnotation.md +2 -2
- data/docs/PolygonAnnotation.md +2 -2
- data/docs/PopupAnnotation.md +1 -1
- data/docs/PopupAnnotationWithParent.md +1 -1
- data/docs/RedactionAnnotation.md +1 -1
- data/docs/ScreenAnnotation.md +1 -1
- data/docs/Signature.md +1 -1
- data/docs/SignatureVerifyResponse.md +1 -1
- data/docs/SoundAnnotation.md +2 -2
- data/docs/SplitResultDocument.md +1 -1
- data/docs/SquareAnnotation.md +1 -1
- data/docs/SquigglyAnnotation.md +1 -1
- data/docs/Stamp.md +2 -2
- data/docs/StampAnnotation.md +1 -1
- data/docs/StampBase.md +1 -1
- data/docs/StampInfo.md +1 -1
- data/docs/StorageExist.md +9 -0
- data/docs/StorageFile.md +13 -0
- data/docs/StrikeOutAnnotation.md +1 -1
- data/docs/Table.md +1 -1
- data/docs/TextAnnotation.md +1 -1
- data/docs/TextFooter.md +2 -2
- data/docs/TextHeader.md +2 -2
- data/docs/TextRect.md +3 -3
- data/docs/TextReplaceListRequest.md +1 -1
- data/docs/TextReplaceResponse.md +1 -1
- data/docs/TextStamp.md +2 -2
- data/docs/UnderlineAnnotation.md +1 -1
- data/docs/WordCountResponse.md +1 -1
- data/lib/aspose_pdf_cloud.rb +12 -8
- data/lib/aspose_pdf_cloud/api/pdf_api.rb +2521 -1650
- data/lib/aspose_pdf_cloud/api_client.rb +2 -54
- data/lib/aspose_pdf_cloud/configuration.rb +2 -5
- data/lib/aspose_pdf_cloud/models/annotation.rb +7 -4
- data/lib/aspose_pdf_cloud/models/annotation_info.rb +12 -4
- data/lib/aspose_pdf_cloud/models/annotations_info.rb +2 -4
- data/lib/aspose_pdf_cloud/models/annotations_info_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/aspose_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/attachment.rb +7 -4
- data/lib/aspose_pdf_cloud/models/attachment_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/attachments.rb +2 -4
- data/lib/aspose_pdf_cloud/models/attachments_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/{append_document.rb → bookmark.rb} +167 -42
- data/lib/aspose_pdf_cloud/models/{storage_exist_response.rb → bookmark_response.rb} +12 -13
- data/lib/aspose_pdf_cloud/models/{files_response.rb → bookmarks.rb} +22 -36
- data/lib/aspose_pdf_cloud/models/{disc_usage_response.rb → bookmarks_response.rb} +12 -13
- data/lib/aspose_pdf_cloud/models/border_info.rb +2 -4
- data/lib/aspose_pdf_cloud/models/caret_annotation.rb +7 -4
- data/lib/aspose_pdf_cloud/models/caret_annotation_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/caret_annotations.rb +2 -4
- data/lib/aspose_pdf_cloud/models/caret_annotations_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/cell.rb +2 -4
- data/lib/aspose_pdf_cloud/models/cell_recognized.rb +3 -5
- data/lib/aspose_pdf_cloud/models/circle_annotation.rb +7 -4
- data/lib/aspose_pdf_cloud/models/circle_annotation_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/circle_annotations.rb +2 -4
- data/lib/aspose_pdf_cloud/models/circle_annotations_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/color.rb +2 -4
- data/lib/aspose_pdf_cloud/models/common_figure_annotation.rb +7 -4
- data/lib/aspose_pdf_cloud/models/disc_usage.rb +5 -5
- data/lib/aspose_pdf_cloud/models/document.rb +2 -4
- data/lib/aspose_pdf_cloud/models/document_page_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/document_pages_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/document_privilege.rb +3 -5
- data/lib/aspose_pdf_cloud/models/document_properties.rb +2 -4
- data/lib/aspose_pdf_cloud/models/document_properties_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/document_property.rb +7 -4
- data/lib/aspose_pdf_cloud/models/document_property_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/document_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/{file_exist_response.rb → error.rb} +31 -27
- data/lib/aspose_pdf_cloud/models/error_details.rb +214 -0
- data/lib/aspose_pdf_cloud/models/field.rb +7 -4
- data/lib/aspose_pdf_cloud/models/field_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/fields.rb +7 -4
- data/lib/aspose_pdf_cloud/models/fields_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/file_attachment_annotation.rb +7 -4
- data/lib/aspose_pdf_cloud/models/file_attachment_annotation_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/file_attachment_annotations.rb +2 -4
- data/lib/aspose_pdf_cloud/models/file_attachment_annotations_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/file_version.rb +15 -5
- data/lib/aspose_pdf_cloud/models/file_versions.rb +201 -0
- data/lib/aspose_pdf_cloud/models/files_list.rb +201 -0
- data/lib/aspose_pdf_cloud/models/files_upload_result.rb +213 -0
- data/lib/aspose_pdf_cloud/models/free_text_annotation.rb +12 -4
- data/lib/aspose_pdf_cloud/models/free_text_annotation_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/free_text_annotations.rb +2 -4
- data/lib/aspose_pdf_cloud/models/free_text_annotations_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/graph_info.rb +4 -6
- data/lib/aspose_pdf_cloud/models/highlight_annotation.rb +7 -4
- data/lib/aspose_pdf_cloud/models/highlight_annotation_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/highlight_annotations.rb +2 -4
- data/lib/aspose_pdf_cloud/models/highlight_annotations_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/image.rb +17 -4
- data/lib/aspose_pdf_cloud/models/image_footer.rb +3 -5
- data/lib/aspose_pdf_cloud/models/image_header.rb +3 -5
- data/lib/aspose_pdf_cloud/models/image_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/image_stamp.rb +3 -5
- data/lib/aspose_pdf_cloud/models/image_template.rb +21 -4
- data/lib/aspose_pdf_cloud/models/image_templates_request.rb +2 -4
- data/lib/aspose_pdf_cloud/models/images.rb +2 -4
- data/lib/aspose_pdf_cloud/models/images_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/ink_annotation.rb +7 -4
- data/lib/aspose_pdf_cloud/models/ink_annotation_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/ink_annotations.rb +2 -4
- data/lib/aspose_pdf_cloud/models/ink_annotations_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/line_annotation.rb +17 -4
- data/lib/aspose_pdf_cloud/models/line_annotation_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/line_annotations.rb +2 -4
- data/lib/aspose_pdf_cloud/models/line_annotations_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/link.rb +2 -4
- data/lib/aspose_pdf_cloud/models/link_annotation.rb +41 -4
- data/lib/aspose_pdf_cloud/models/link_annotation_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/link_annotations.rb +2 -4
- data/lib/aspose_pdf_cloud/models/link_annotations_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/link_element.rb +2 -4
- data/lib/aspose_pdf_cloud/models/margin_info.rb +2 -4
- data/lib/aspose_pdf_cloud/models/markup_annotation.rb +7 -4
- data/lib/aspose_pdf_cloud/models/merge_documents.rb +2 -4
- data/lib/aspose_pdf_cloud/models/movie_annotation.rb +7 -4
- data/lib/aspose_pdf_cloud/models/movie_annotation_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/movie_annotations.rb +2 -4
- data/lib/aspose_pdf_cloud/models/movie_annotations_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/{file_exist.rb → object_exist.rb} +16 -16
- data/lib/aspose_pdf_cloud/models/optimize_options.rb +2 -4
- data/lib/aspose_pdf_cloud/models/page.rb +7 -4
- data/lib/aspose_pdf_cloud/models/page_number_stamp.rb +3 -5
- data/lib/aspose_pdf_cloud/models/page_word_count.rb +2 -4
- data/lib/aspose_pdf_cloud/models/pages.rb +2 -4
- data/lib/aspose_pdf_cloud/models/paragraph.rb +2 -4
- data/lib/aspose_pdf_cloud/models/pdf_page_stamp.rb +3 -5
- data/lib/aspose_pdf_cloud/models/point.rb +2 -4
- data/lib/aspose_pdf_cloud/models/poly_annotation.rb +12 -4
- data/lib/aspose_pdf_cloud/models/poly_line_annotation.rb +12 -4
- data/lib/aspose_pdf_cloud/models/poly_line_annotation_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/poly_line_annotations.rb +2 -4
- data/lib/aspose_pdf_cloud/models/poly_line_annotations_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/polygon_annotation.rb +12 -4
- data/lib/aspose_pdf_cloud/models/polygon_annotation_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/polygon_annotations.rb +2 -4
- data/lib/aspose_pdf_cloud/models/polygon_annotations_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/popup_annotation.rb +7 -4
- data/lib/aspose_pdf_cloud/models/popup_annotation_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/popup_annotation_with_parent.rb +7 -4
- data/lib/aspose_pdf_cloud/models/popup_annotations.rb +2 -4
- data/lib/aspose_pdf_cloud/models/popup_annotations_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/position.rb +2 -4
- data/lib/aspose_pdf_cloud/models/rectangle.rb +2 -4
- data/lib/aspose_pdf_cloud/models/redaction_annotation.rb +7 -4
- data/lib/aspose_pdf_cloud/models/redaction_annotation_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/redaction_annotations.rb +2 -4
- data/lib/aspose_pdf_cloud/models/redaction_annotations_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/row.rb +2 -4
- data/lib/aspose_pdf_cloud/models/row_recognized.rb +2 -4
- data/lib/aspose_pdf_cloud/models/screen_annotation.rb +7 -4
- data/lib/aspose_pdf_cloud/models/screen_annotation_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/screen_annotations.rb +2 -4
- data/lib/aspose_pdf_cloud/models/screen_annotations_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/segment.rb +21 -4
- data/lib/aspose_pdf_cloud/models/signature.rb +22 -5
- data/lib/aspose_pdf_cloud/models/signature_verify_response.rb +7 -4
- data/lib/aspose_pdf_cloud/models/sound_annotation.rb +31 -4
- data/lib/aspose_pdf_cloud/models/sound_annotation_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/sound_annotations.rb +2 -4
- data/lib/aspose_pdf_cloud/models/sound_annotations_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/split_result.rb +2 -4
- data/lib/aspose_pdf_cloud/models/split_result_document.rb +7 -4
- data/lib/aspose_pdf_cloud/models/split_result_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/square_annotation.rb +7 -4
- data/lib/aspose_pdf_cloud/models/square_annotation_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/square_annotations.rb +2 -4
- data/lib/aspose_pdf_cloud/models/square_annotations_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/squiggly_annotation.rb +7 -4
- data/lib/aspose_pdf_cloud/models/squiggly_annotation_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/squiggly_annotations.rb +2 -4
- data/lib/aspose_pdf_cloud/models/squiggly_annotations_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/stamp.rb +4 -6
- data/lib/aspose_pdf_cloud/models/stamp_annotation.rb +7 -4
- data/lib/aspose_pdf_cloud/models/stamp_annotation_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/stamp_annotations.rb +2 -4
- data/lib/aspose_pdf_cloud/models/stamp_annotations_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/stamp_base.rb +3 -5
- data/lib/aspose_pdf_cloud/models/stamp_info.rb +7 -4
- data/lib/aspose_pdf_cloud/models/stamps_info.rb +2 -4
- data/lib/aspose_pdf_cloud/models/stamps_info_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/storage_exist.rb +204 -0
- data/lib/aspose_pdf_cloud/models/{file.rb → storage_file.rb} +9 -6
- data/lib/aspose_pdf_cloud/models/strike_out_annotation.rb +7 -4
- data/lib/aspose_pdf_cloud/models/strike_out_annotation_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/strike_out_annotations.rb +2 -4
- data/lib/aspose_pdf_cloud/models/strike_out_annotations_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/table.rb +7 -4
- data/lib/aspose_pdf_cloud/models/table_recognized.rb +2 -4
- data/lib/aspose_pdf_cloud/models/table_recognized_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/tables_recognized.rb +2 -4
- data/lib/aspose_pdf_cloud/models/tables_recognized_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/text_annotation.rb +7 -4
- data/lib/aspose_pdf_cloud/models/text_annotation_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/text_annotations.rb +2 -4
- data/lib/aspose_pdf_cloud/models/text_annotations_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/text_footer.rb +4 -6
- data/lib/aspose_pdf_cloud/models/text_header.rb +4 -6
- data/lib/aspose_pdf_cloud/models/text_line.rb +2 -4
- data/lib/aspose_pdf_cloud/models/text_rect.rb +5 -7
- data/lib/aspose_pdf_cloud/models/text_rects.rb +2 -4
- data/lib/aspose_pdf_cloud/models/text_rects_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/text_replace.rb +40 -4
- data/lib/aspose_pdf_cloud/models/text_replace_list_request.rb +3 -4
- data/lib/aspose_pdf_cloud/models/text_replace_response.rb +7 -4
- data/lib/aspose_pdf_cloud/models/text_stamp.rb +4 -6
- data/lib/aspose_pdf_cloud/models/text_state.rb +2 -4
- data/lib/aspose_pdf_cloud/models/text_style.rb +2 -4
- data/lib/aspose_pdf_cloud/models/underline_annotation.rb +7 -4
- data/lib/aspose_pdf_cloud/models/underline_annotation_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/underline_annotations.rb +2 -4
- data/lib/aspose_pdf_cloud/models/underline_annotations_response.rb +2 -4
- data/lib/aspose_pdf_cloud/models/word_count.rb +2 -4
- data/lib/aspose_pdf_cloud/models/word_count_response.rb +3 -5
- data/lib/aspose_pdf_cloud/version.rb +1 -1
- data/test/pdf_tests.rb +175 -71
- data/test_data/sample.tex +105 -0
- metadata +27 -18
- data/docs/AppendDocument.md +0 -11
- data/docs/File.md +0 -13
- data/docs/FileExist.md +0 -10
- data/docs/FileVersionsResponse.md +0 -11
- data/docs/FilesResponse.md +0 -11
- data/docs/StorageExistResponse.md +0 -11
- 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 = "/
|
422
|
-
url = build_request_url(local_var_path).gsub('/
|
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, '/
|
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
|
-
'
|
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
|
-
|
235
|
-
Time.strptime(value, format).utc.to_datetime
|
239
|
+
DateTime.parse(value)
|
236
240
|
when :Date
|
237
|
-
|
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
|
-
|
245
|
-
Time.strptime(value, format).utc.to_datetime
|
254
|
+
DateTime.parse(value)
|
246
255
|
when :Date
|
247
|
-
|
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
|
-
|
135
|
-
Time.strptime(value, format).utc.to_datetime
|
134
|
+
DateTime.parse(value)
|
136
135
|
when :Date
|
137
|
-
|
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
|
-
|
146
|
-
Time.strptime(value, format).utc.to_datetime
|
145
|
+
DateTime.parse(value)
|
147
146
|
when :Date
|
148
|
-
|
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
|
-
|
136
|
-
Time.strptime(value, format).utc.to_datetime
|
135
|
+
DateTime.parse(value)
|
137
136
|
when :Date
|
138
|
-
|
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
|
-
|
193
|
-
Time.strptime(value, format).utc.to_datetime
|
197
|
+
DateTime.parse(value)
|
194
198
|
when :Date
|
195
|
-
|
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
|
-
|
146
|
-
Time.strptime(value, format).utc.to_datetime
|
145
|
+
DateTime.parse(value)
|
147
146
|
when :Date
|
148
|
-
|
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
|
-
|
135
|
-
Time.strptime(value, format).utc.to_datetime
|
134
|
+
DateTime.parse(value)
|
136
135
|
when :Date
|
137
|
-
|
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
|
-
|
146
|
-
Time.strptime(value, format).utc.to_datetime
|
145
|
+
DateTime.parse(value)
|
147
146
|
when :Date
|
148
|
-
|
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
|
-
#
|
27
|
-
class
|
28
|
-
#
|
29
|
-
attr_accessor :
|
26
|
+
# Provides link to bookmark.
|
27
|
+
class Bookmark
|
28
|
+
# Link to the document.
|
29
|
+
attr_accessor :links
|
30
30
|
|
31
|
-
#
|
32
|
-
attr_accessor :
|
31
|
+
# Get the Title;
|
32
|
+
attr_accessor :title
|
33
33
|
|
34
|
-
#
|
35
|
-
attr_accessor :
|
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
|
-
:'
|
42
|
-
:'
|
43
|
-
:'
|
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
|
-
:'
|
51
|
-
:'
|
52
|
-
:'
|
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?(:'
|
65
|
-
|
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?(:'
|
69
|
-
self.
|
140
|
+
if attributes.has_key?(:'Title')
|
141
|
+
self.title = attributes[:'Title']
|
70
142
|
end
|
71
143
|
|
72
|
-
if attributes.has_key?(:'
|
73
|
-
self.
|
144
|
+
if attributes.has_key?(:'Italic')
|
145
|
+
self.italic = attributes[:'Italic']
|
74
146
|
end
|
75
147
|
|
76
|
-
|
148
|
+
if attributes.has_key?(:'Bold')
|
149
|
+
self.bold = attributes[:'Bold']
|
150
|
+
end
|
77
151
|
|
78
|
-
|
79
|
-
|
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
|
87
|
-
|
156
|
+
if attributes.has_key?(:'Action')
|
157
|
+
self.action = attributes[:'Action']
|
88
158
|
end
|
89
159
|
|
90
|
-
if
|
91
|
-
|
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
|
-
|
112
|
-
|
113
|
-
|
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
|
-
[
|
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
|
-
|
156
|
-
Time.strptime(value, format).utc.to_datetime
|
282
|
+
DateTime.parse(value)
|
157
283
|
when :Date
|
158
|
-
|
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
|