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
@@ -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
|
@@ -167,11 +167,9 @@ module AsposePdfCloud
|
|
167
167
|
def _deserialize(type, value)
|
168
168
|
case type.to_sym
|
169
169
|
when :DateTime
|
170
|
-
|
171
|
-
Time.strptime(value, format).utc.to_datetime
|
170
|
+
DateTime.parse(value)
|
172
171
|
when :Date
|
173
|
-
|
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
|
-
|
295
|
-
Time.strptime(value, format).utc.to_datetime
|
299
|
+
DateTime.parse(value)
|
296
300
|
when :Date
|
297
|
-
|
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
|
-
|
139
|
-
Time.strptime(value, format).utc.to_datetime
|
140
|
+
DateTime.parse(value)
|
140
141
|
when :Date
|
141
|
-
|
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
|
-
|
143
|
-
Time.strptime(value, format).utc.to_datetime
|
142
|
+
DateTime.parse(value)
|
144
143
|
when :Date
|
145
|
-
|
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
|
-
|
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
|
@@ -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,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
|
-
|
221
|
-
Time.strptime(value, format).utc.to_datetime
|
220
|
+
DateTime.parse(value)
|
222
221
|
when :Date
|
223
|
-
|
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
|
-
|
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
|
@@ -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
|
-
|
153
|
-
Time.strptime(value, format).utc.to_datetime
|
157
|
+
DateTime.parse(value)
|
154
158
|
when :Date
|
155
|
-
|
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
|
-
|
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
|
@@ -154,11 +154,9 @@ module AsposePdfCloud
|
|
154
154
|
def _deserialize(type, value)
|
155
155
|
case type.to_sym
|
156
156
|
when :DateTime
|
157
|
-
|
158
|
-
Time.strptime(value, format).utc.to_datetime
|
157
|
+
DateTime.parse(value)
|
159
158
|
when :Date
|
160
|
-
|
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
|
28
|
-
#
|
26
|
+
# Error
|
27
|
+
class Error
|
28
|
+
# Code
|
29
29
|
attr_accessor :code
|
30
30
|
|
31
|
-
#
|
32
|
-
attr_accessor :
|
31
|
+
# Message
|
32
|
+
attr_accessor :message
|
33
|
+
|
34
|
+
# Description
|
35
|
+
attr_accessor :description
|
33
36
|
|
34
|
-
|
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
|
-
:'
|
42
|
-
:'
|
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' => :'
|
50
|
-
:'
|
51
|
-
:'
|
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?(:'
|
68
|
-
self.
|
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?(:'
|
72
|
-
self.
|
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
|
-
|
102
|
-
|
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,
|
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
|
-
|
145
|
-
Time.strptime(value, format).utc.to_datetime
|
150
|
+
DateTime.parse(value)
|
146
151
|
when :Date
|
147
|
-
|
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
|