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
@@ -46,7 +46,7 @@ module AsposePdfCloud
|
|
46
46
|
# Gets or sets right margin of stamp.
|
47
47
|
attr_accessor :right_margin
|
48
48
|
|
49
|
-
# Sets or gets the rotation of stamp content according
|
49
|
+
# Sets or gets the rotation of stamp content according Rotation values. Note. This property is for set angles which are multiples of 90 degrees (0, 90, 180, 270 degrees). To set arbitrary angle use RotateAngle property. If angle set by ArbitraryAngle is not multiple of 90 then Rotate property returns Rotation.None.
|
50
50
|
attr_accessor :rotate
|
51
51
|
|
52
52
|
# Gets or sets rotate angle of stamp in degrees. This property allows to set arbitrary rotate angle.
|
@@ -73,7 +73,7 @@ module AsposePdfCloud
|
|
73
73
|
# Gets or sets string value which is used as stamp on the page.
|
74
74
|
attr_accessor :value
|
75
75
|
|
76
|
-
# Gets text properties of the stamp. See
|
76
|
+
# Gets text properties of the stamp. See TextState for details.
|
77
77
|
attr_accessor :text_state
|
78
78
|
|
79
79
|
# Gets or sets the file name.
|
@@ -332,11 +332,9 @@ module AsposePdfCloud
|
|
332
332
|
def _deserialize(type, value)
|
333
333
|
case type.to_sym
|
334
334
|
when :DateTime
|
335
|
-
|
336
|
-
Time.strptime(value, format).utc.to_datetime
|
335
|
+
DateTime.parse(value)
|
337
336
|
when :Date
|
338
|
-
|
339
|
-
Time.strptime(value, format).utc.to_datetime.to_date
|
337
|
+
Date.parse(value)
|
340
338
|
when :String
|
341
339
|
value.to_s
|
342
340
|
when :Integer
|
@@ -227,12 +227,17 @@ module AsposePdfCloud
|
|
227
227
|
# @return Array for valid properies with the reasons
|
228
228
|
def list_invalid_properties
|
229
229
|
invalid_properties = Array.new
|
230
|
+
if @rect.nil?
|
231
|
+
invalid_properties.push("invalid value for 'rect', rect cannot be nil.")
|
232
|
+
end
|
233
|
+
|
230
234
|
return invalid_properties
|
231
235
|
end
|
232
236
|
|
233
237
|
# Check to see if the all the properties in the model are valid
|
234
238
|
# @return true if the model is valid
|
235
239
|
def valid?
|
240
|
+
return false if @rect.nil?
|
236
241
|
return true
|
237
242
|
end
|
238
243
|
|
@@ -301,11 +306,9 @@ module AsposePdfCloud
|
|
301
306
|
def _deserialize(type, value)
|
302
307
|
case type.to_sym
|
303
308
|
when :DateTime
|
304
|
-
|
305
|
-
Time.strptime(value, format).utc.to_datetime
|
309
|
+
DateTime.parse(value)
|
306
310
|
when :Date
|
307
|
-
|
308
|
-
Time.strptime(value, format).utc.to_datetime.to_date
|
311
|
+
Date.parse(value)
|
309
312
|
when :String
|
310
313
|
value.to_s
|
311
314
|
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
|
@@ -37,7 +37,7 @@ module AsposePdfCloud
|
|
37
37
|
# Gets or sets a value to indicate the stamp opacity. The value is from 0.0 to 1.0. By default the value is 1.0.
|
38
38
|
attr_accessor :opacity
|
39
39
|
|
40
|
-
# Sets or gets the rotation of stamp content according
|
40
|
+
# Sets or gets the rotation of stamp content according Rotation values. Note. This property is for set angles which are multiples of 90 degrees (0, 90, 180, 270 degrees). To set arbitrary angle use RotateAngle property. If angle set by ArbitraryAngle is not multiple of 90 then Rotate property returns Rotation.None.
|
41
41
|
attr_accessor :rotate
|
42
42
|
|
43
43
|
# Gets or sets rotate angle of stamp in degrees. This property allows to set arbitrary rotate angle.
|
@@ -199,11 +199,9 @@ module AsposePdfCloud
|
|
199
199
|
def _deserialize(type, value)
|
200
200
|
case type.to_sym
|
201
201
|
when :DateTime
|
202
|
-
|
203
|
-
Time.strptime(value, format).utc.to_datetime
|
202
|
+
DateTime.parse(value)
|
204
203
|
when :Date
|
205
|
-
|
206
|
-
Time.strptime(value, format).utc.to_datetime.to_date
|
204
|
+
Date.parse(value)
|
207
205
|
when :String
|
208
206
|
value.to_s
|
209
207
|
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 @stamp_type.nil?
|
130
|
+
invalid_properties.push("invalid value for 'stamp_type', stamp_type 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 @stamp_type.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
|
@@ -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
|
@@ -0,0 +1,204 @@
|
|
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
|
+
# Storage exists
|
27
|
+
class StorageExist
|
28
|
+
# Shows that the storage exists.
|
29
|
+
attr_accessor :exists
|
30
|
+
|
31
|
+
|
32
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
33
|
+
def self.attribute_map
|
34
|
+
{
|
35
|
+
:'exists' => :'Exists'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Attribute type mapping.
|
40
|
+
def self.swagger_types
|
41
|
+
{
|
42
|
+
:'exists' => :'BOOLEAN'
|
43
|
+
}
|
44
|
+
end
|
45
|
+
|
46
|
+
# Initializes the object
|
47
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
48
|
+
def initialize(attributes = {})
|
49
|
+
return unless attributes.is_a?(Hash)
|
50
|
+
|
51
|
+
# convert string to symbol for hash key
|
52
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
53
|
+
|
54
|
+
if attributes.has_key?(:'Exists')
|
55
|
+
self.exists = attributes[:'Exists']
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
59
|
+
|
60
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
61
|
+
# @return Array for valid properies with the reasons
|
62
|
+
def list_invalid_properties
|
63
|
+
invalid_properties = Array.new
|
64
|
+
if @exists.nil?
|
65
|
+
invalid_properties.push("invalid value for 'exists', exists cannot be nil.")
|
66
|
+
end
|
67
|
+
|
68
|
+
return invalid_properties
|
69
|
+
end
|
70
|
+
|
71
|
+
# Check to see if the all the properties in the model are valid
|
72
|
+
# @return true if the model is valid
|
73
|
+
def valid?
|
74
|
+
return false if @exists.nil?
|
75
|
+
return true
|
76
|
+
end
|
77
|
+
|
78
|
+
# Checks equality by comparing each attribute.
|
79
|
+
# @param [Object] Object to be compared
|
80
|
+
def ==(o)
|
81
|
+
return true if self.equal?(o)
|
82
|
+
self.class == o.class &&
|
83
|
+
exists == o.exists
|
84
|
+
end
|
85
|
+
|
86
|
+
# @see the `==` method
|
87
|
+
# @param [Object] Object to be compared
|
88
|
+
def eql?(o)
|
89
|
+
self == o
|
90
|
+
end
|
91
|
+
|
92
|
+
# Calculates hash code according to all attributes.
|
93
|
+
# @return [Fixnum] Hash code
|
94
|
+
def hash
|
95
|
+
[exists].hash
|
96
|
+
end
|
97
|
+
|
98
|
+
# Builds the object from hash
|
99
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
100
|
+
# @return [Object] Returns the model itself
|
101
|
+
def build_from_hash(attributes)
|
102
|
+
return nil unless attributes.is_a?(Hash)
|
103
|
+
self.class.swagger_types.each_pair do |key, type|
|
104
|
+
if type =~ /\AArray<(.*)>/i
|
105
|
+
# check to ensure the input is an array given that the the attribute
|
106
|
+
# is documented as an array but the input is not
|
107
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
108
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
109
|
+
end
|
110
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
111
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
112
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
113
|
+
end
|
114
|
+
|
115
|
+
self
|
116
|
+
end
|
117
|
+
|
118
|
+
# Deserializes the data based on type
|
119
|
+
# @param string type Data type
|
120
|
+
# @param string value Value to be deserialized
|
121
|
+
# @return [Object] Deserialized data
|
122
|
+
def _deserialize(type, value)
|
123
|
+
case type.to_sym
|
124
|
+
when :DateTime
|
125
|
+
DateTime.parse(value)
|
126
|
+
when :Date
|
127
|
+
Date.parse(value)
|
128
|
+
when :String
|
129
|
+
value.to_s
|
130
|
+
when :Integer
|
131
|
+
value.to_i
|
132
|
+
when :Float
|
133
|
+
value.to_f
|
134
|
+
when :BOOLEAN
|
135
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
136
|
+
true
|
137
|
+
else
|
138
|
+
false
|
139
|
+
end
|
140
|
+
when :Object
|
141
|
+
# generic object (usually a Hash), return directly
|
142
|
+
value
|
143
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
144
|
+
inner_type = Regexp.last_match[:inner_type]
|
145
|
+
value.map { |v| _deserialize(inner_type, v) }
|
146
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
147
|
+
k_type = Regexp.last_match[:k_type]
|
148
|
+
v_type = Regexp.last_match[:v_type]
|
149
|
+
{}.tap do |hash|
|
150
|
+
value.each do |k, v|
|
151
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
152
|
+
end
|
153
|
+
end
|
154
|
+
else # model
|
155
|
+
temp_model = AsposePdfCloud.const_get(type).new
|
156
|
+
temp_model.build_from_hash(value)
|
157
|
+
end
|
158
|
+
end
|
159
|
+
|
160
|
+
# Returns the string representation of the object
|
161
|
+
# @return [String] String presentation of the object
|
162
|
+
def to_s
|
163
|
+
to_hash.to_s
|
164
|
+
end
|
165
|
+
|
166
|
+
# to_body is an alias to to_hash (backward compatibility)
|
167
|
+
# @return [Hash] Returns the object in the form of hash
|
168
|
+
def to_body
|
169
|
+
to_hash
|
170
|
+
end
|
171
|
+
|
172
|
+
# Returns the object in the form of hash
|
173
|
+
# @return [Hash] Returns the object in the form of hash
|
174
|
+
def to_hash
|
175
|
+
hash = {}
|
176
|
+
self.class.attribute_map.each_pair do |attr, param|
|
177
|
+
value = self.send(attr)
|
178
|
+
next if value.nil?
|
179
|
+
hash[param] = _to_hash(value)
|
180
|
+
end
|
181
|
+
hash
|
182
|
+
end
|
183
|
+
|
184
|
+
# Outputs non-array value in the form of hash
|
185
|
+
# For object, use to_hash. Otherwise, just return the value
|
186
|
+
# @param [Object] value Any valid value
|
187
|
+
# @return [Hash] Returns the value in the form of hash
|
188
|
+
def _to_hash(value)
|
189
|
+
if value.is_a?(Array)
|
190
|
+
value.compact.map{ |v| _to_hash(v) }
|
191
|
+
elsif value.is_a?(Hash)
|
192
|
+
{}.tap do |hash|
|
193
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
194
|
+
end
|
195
|
+
elsif value.respond_to? :to_hash
|
196
|
+
value.to_hash
|
197
|
+
else
|
198
|
+
value
|
199
|
+
end
|
200
|
+
end
|
201
|
+
|
202
|
+
end
|
203
|
+
|
204
|
+
end
|
@@ -23,16 +23,21 @@ require 'date'
|
|
23
23
|
require 'time'
|
24
24
|
|
25
25
|
module AsposePdfCloud
|
26
|
-
#
|
27
|
-
class
|
26
|
+
# File or folder information
|
27
|
+
class StorageFile
|
28
|
+
# File or folder name.
|
28
29
|
attr_accessor :name
|
29
30
|
|
31
|
+
# True if it is a folder.
|
30
32
|
attr_accessor :is_folder
|
31
33
|
|
34
|
+
# File or folder last modified DateTime.
|
32
35
|
attr_accessor :modified_date
|
33
36
|
|
37
|
+
# File or folder size.
|
34
38
|
attr_accessor :size
|
35
39
|
|
40
|
+
# File or folder path.
|
36
41
|
attr_accessor :path
|
37
42
|
|
38
43
|
|
@@ -162,11 +167,9 @@ module AsposePdfCloud
|
|
162
167
|
def _deserialize(type, value)
|
163
168
|
case type.to_sym
|
164
169
|
when :DateTime
|
165
|
-
|
166
|
-
Time.strptime(value, format).utc.to_datetime
|
170
|
+
DateTime.parse(value)
|
167
171
|
when :Date
|
168
|
-
|
169
|
-
Time.strptime(value, format).utc.to_datetime.to_date
|
172
|
+
Date.parse(value)
|
170
173
|
when :String
|
171
174
|
value.to_s
|
172
175
|
when :Integer
|
@@ -211,12 +211,17 @@ module AsposePdfCloud
|
|
211
211
|
# @return Array for valid properies with the reasons
|
212
212
|
def list_invalid_properties
|
213
213
|
invalid_properties = Array.new
|
214
|
+
if @rect.nil?
|
215
|
+
invalid_properties.push("invalid value for 'rect', rect cannot be nil.")
|
216
|
+
end
|
217
|
+
|
214
218
|
return invalid_properties
|
215
219
|
end
|
216
220
|
|
217
221
|
# Check to see if the all the properties in the model are valid
|
218
222
|
# @return true if the model is valid
|
219
223
|
def valid?
|
224
|
+
return false if @rect.nil?
|
220
225
|
return true
|
221
226
|
end
|
222
227
|
|
@@ -283,11 +288,9 @@ module AsposePdfCloud
|
|
283
288
|
def _deserialize(type, value)
|
284
289
|
case type.to_sym
|
285
290
|
when :DateTime
|
286
|
-
|
287
|
-
Time.strptime(value, format).utc.to_datetime
|
291
|
+
DateTime.parse(value)
|
288
292
|
when :Date
|
289
|
-
|
290
|
-
Time.strptime(value, format).utc.to_datetime.to_date
|
293
|
+
Date.parse(value)
|
291
294
|
when :String
|
292
295
|
value.to_s
|
293
296
|
when :Integer
|