aspose_pdf_cloud 18.10.0 → 18.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (218) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +75 -6
  3. data/docs/Annotation.md +0 -3
  4. data/docs/AnnotationInfo.md +0 -3
  5. data/docs/CapStyle.md +11 -0
  6. data/docs/CaretAnnotation.md +26 -0
  7. data/docs/CaretAnnotationResponse.md +11 -0
  8. data/docs/CaretAnnotations.md +10 -0
  9. data/docs/CaretAnnotationsResponse.md +11 -0
  10. data/docs/CaretSymbol.md +11 -0
  11. data/docs/CircleAnnotation.md +3 -3
  12. data/docs/CommonFigureAnnotation.md +3 -3
  13. data/docs/File.md +13 -0
  14. data/docs/FilesResponse.md +11 -0
  15. data/docs/FreeTextAnnotation.md +3 -3
  16. data/docs/HighlightAnnotation.md +25 -0
  17. data/docs/HighlightAnnotationResponse.md +11 -0
  18. data/docs/HighlightAnnotations.md +10 -0
  19. data/docs/HighlightAnnotationsResponse.md +11 -0
  20. data/docs/InkAnnotation.md +26 -0
  21. data/docs/InkAnnotationResponse.md +11 -0
  22. data/docs/InkAnnotations.md +10 -0
  23. data/docs/InkAnnotationsResponse.md +11 -0
  24. data/docs/LineAnnotation.md +3 -3
  25. data/docs/MarkupAnnotation.md +3 -3
  26. data/docs/PdfApi.md +1036 -69
  27. data/docs/PolyAnnotation.md +3 -3
  28. data/docs/PolyLineAnnotation.md +3 -3
  29. data/docs/PolygonAnnotation.md +3 -3
  30. data/docs/PopupAnnotation.md +21 -0
  31. data/docs/PopupAnnotationResponse.md +11 -0
  32. data/docs/PopupAnnotationWithParent.md +22 -0
  33. data/docs/PopupAnnotations.md +10 -0
  34. data/docs/PopupAnnotationsResponse.md +11 -0
  35. data/docs/SquareAnnotation.md +3 -3
  36. data/docs/SquigglyAnnotation.md +25 -0
  37. data/docs/SquigglyAnnotationResponse.md +11 -0
  38. data/docs/SquigglyAnnotations.md +10 -0
  39. data/docs/SquigglyAnnotationsResponse.md +11 -0
  40. data/docs/StrikeOutAnnotation.md +25 -0
  41. data/docs/StrikeOutAnnotationResponse.md +11 -0
  42. data/docs/StrikeOutAnnotations.md +10 -0
  43. data/docs/StrikeOutAnnotationsResponse.md +11 -0
  44. data/docs/TextAnnotation.md +3 -3
  45. data/docs/UnderlineAnnotation.md +25 -0
  46. data/docs/UnderlineAnnotationResponse.md +11 -0
  47. data/docs/UnderlineAnnotations.md +10 -0
  48. data/docs/UnderlineAnnotationsResponse.md +11 -0
  49. data/lib/aspose_pdf_cloud.rb +33 -0
  50. data/lib/aspose_pdf_cloud/api/pdf_api.rb +4978 -2084
  51. data/lib/aspose_pdf_cloud/models/annotation.rb +6 -33
  52. data/lib/aspose_pdf_cloud/models/annotation_flags.rb +1 -0
  53. data/lib/aspose_pdf_cloud/models/annotation_info.rb +6 -33
  54. data/lib/aspose_pdf_cloud/models/annotation_state.rb +1 -0
  55. data/lib/aspose_pdf_cloud/models/annotation_type.rb +1 -0
  56. data/lib/aspose_pdf_cloud/models/annotations_info.rb +5 -2
  57. data/lib/aspose_pdf_cloud/models/annotations_info_response.rb +5 -2
  58. data/lib/aspose_pdf_cloud/models/antialiasing_processing_type.rb +1 -0
  59. data/lib/aspose_pdf_cloud/models/append_document.rb +5 -2
  60. data/lib/aspose_pdf_cloud/models/aspose_response.rb +5 -2
  61. data/lib/aspose_pdf_cloud/models/attachment.rb +5 -2
  62. data/lib/aspose_pdf_cloud/models/attachment_response.rb +5 -2
  63. data/lib/aspose_pdf_cloud/models/attachments.rb +5 -2
  64. data/lib/aspose_pdf_cloud/models/attachments_response.rb +5 -2
  65. data/lib/aspose_pdf_cloud/models/cap_style.rb +44 -0
  66. data/lib/aspose_pdf_cloud/models/caption_position.rb +1 -0
  67. data/lib/aspose_pdf_cloud/models/caret_annotation.rb +375 -0
  68. data/lib/aspose_pdf_cloud/models/caret_annotation_response.rb +225 -0
  69. data/lib/aspose_pdf_cloud/models/caret_annotations.rb +214 -0
  70. data/lib/aspose_pdf_cloud/models/caret_annotations_response.rb +225 -0
  71. data/lib/aspose_pdf_cloud/models/caret_symbol.rb +44 -0
  72. data/lib/aspose_pdf_cloud/models/circle_annotation.rb +36 -33
  73. data/lib/aspose_pdf_cloud/models/circle_annotation_response.rb +5 -2
  74. data/lib/aspose_pdf_cloud/models/circle_annotations.rb +5 -2
  75. data/lib/aspose_pdf_cloud/models/circle_annotations_response.rb +5 -2
  76. data/lib/aspose_pdf_cloud/models/color.rb +5 -2
  77. data/lib/aspose_pdf_cloud/models/color_depth.rb +1 -0
  78. data/lib/aspose_pdf_cloud/models/common_figure_annotation.rb +36 -33
  79. data/lib/aspose_pdf_cloud/models/compression_type.rb +1 -0
  80. data/lib/aspose_pdf_cloud/models/doc_format.rb +1 -0
  81. data/lib/aspose_pdf_cloud/models/doc_recognition_mode.rb +1 -0
  82. data/lib/aspose_pdf_cloud/models/document.rb +5 -2
  83. data/lib/aspose_pdf_cloud/models/document_page_response.rb +5 -2
  84. data/lib/aspose_pdf_cloud/models/document_pages_response.rb +5 -2
  85. data/lib/aspose_pdf_cloud/models/document_privilege.rb +5 -2
  86. data/lib/aspose_pdf_cloud/models/document_properties.rb +5 -2
  87. data/lib/aspose_pdf_cloud/models/document_properties_response.rb +5 -2
  88. data/lib/aspose_pdf_cloud/models/document_property.rb +5 -2
  89. data/lib/aspose_pdf_cloud/models/document_property_response.rb +5 -2
  90. data/lib/aspose_pdf_cloud/models/document_response.rb +5 -2
  91. data/lib/aspose_pdf_cloud/models/epub_recognition_mode.rb +1 -0
  92. data/lib/aspose_pdf_cloud/models/field.rb +5 -2
  93. data/lib/aspose_pdf_cloud/models/field_response.rb +5 -2
  94. data/lib/aspose_pdf_cloud/models/field_type.rb +1 -0
  95. data/lib/aspose_pdf_cloud/models/fields.rb +5 -2
  96. data/lib/aspose_pdf_cloud/models/fields_response.rb +5 -2
  97. data/lib/aspose_pdf_cloud/models/file.rb +246 -0
  98. data/lib/aspose_pdf_cloud/models/files_response.rb +227 -0
  99. data/lib/aspose_pdf_cloud/models/font_encoding_rules.rb +1 -0
  100. data/lib/aspose_pdf_cloud/models/font_saving_modes.rb +1 -0
  101. data/lib/aspose_pdf_cloud/models/font_styles.rb +1 -0
  102. data/lib/aspose_pdf_cloud/models/free_text_annotation.rb +36 -33
  103. data/lib/aspose_pdf_cloud/models/free_text_annotation_response.rb +5 -2
  104. data/lib/aspose_pdf_cloud/models/free_text_annotations.rb +5 -2
  105. data/lib/aspose_pdf_cloud/models/free_text_annotations_response.rb +5 -2
  106. data/lib/aspose_pdf_cloud/models/free_text_intent.rb +1 -0
  107. data/lib/aspose_pdf_cloud/models/highlight_annotation.rb +367 -0
  108. data/lib/aspose_pdf_cloud/models/highlight_annotation_response.rb +225 -0
  109. data/lib/aspose_pdf_cloud/models/highlight_annotations.rb +214 -0
  110. data/lib/aspose_pdf_cloud/models/highlight_annotations_response.rb +225 -0
  111. data/lib/aspose_pdf_cloud/models/horizontal_alignment.rb +1 -0
  112. data/lib/aspose_pdf_cloud/models/html_document_type.rb +1 -0
  113. data/lib/aspose_pdf_cloud/models/html_markup_generation_modes.rb +1 -0
  114. data/lib/aspose_pdf_cloud/models/image.rb +5 -2
  115. data/lib/aspose_pdf_cloud/models/image_response.rb +5 -2
  116. data/lib/aspose_pdf_cloud/models/image_src_type.rb +1 -0
  117. data/lib/aspose_pdf_cloud/models/image_template.rb +5 -2
  118. data/lib/aspose_pdf_cloud/models/image_templates_request.rb +5 -2
  119. data/lib/aspose_pdf_cloud/models/images.rb +5 -2
  120. data/lib/aspose_pdf_cloud/models/images_response.rb +5 -2
  121. data/lib/aspose_pdf_cloud/models/ink_annotation.rb +377 -0
  122. data/lib/aspose_pdf_cloud/models/ink_annotation_response.rb +225 -0
  123. data/lib/aspose_pdf_cloud/models/ink_annotations.rb +214 -0
  124. data/lib/aspose_pdf_cloud/models/ink_annotations_response.rb +225 -0
  125. data/lib/aspose_pdf_cloud/models/justification.rb +1 -0
  126. data/lib/aspose_pdf_cloud/models/letters_positioning_methods.rb +1 -0
  127. data/lib/aspose_pdf_cloud/models/line_annotation.rb +36 -33
  128. data/lib/aspose_pdf_cloud/models/line_annotation_response.rb +5 -2
  129. data/lib/aspose_pdf_cloud/models/line_annotations.rb +5 -2
  130. data/lib/aspose_pdf_cloud/models/line_annotations_response.rb +5 -2
  131. data/lib/aspose_pdf_cloud/models/line_ending.rb +1 -0
  132. data/lib/aspose_pdf_cloud/models/line_intent.rb +1 -0
  133. data/lib/aspose_pdf_cloud/models/line_spacing.rb +1 -0
  134. data/lib/aspose_pdf_cloud/models/link.rb +5 -2
  135. data/lib/aspose_pdf_cloud/models/link_action_type.rb +1 -0
  136. data/lib/aspose_pdf_cloud/models/link_annotation.rb +5 -2
  137. data/lib/aspose_pdf_cloud/models/link_annotation_response.rb +5 -2
  138. data/lib/aspose_pdf_cloud/models/link_annotations.rb +5 -2
  139. data/lib/aspose_pdf_cloud/models/link_annotations_response.rb +5 -2
  140. data/lib/aspose_pdf_cloud/models/link_element.rb +5 -2
  141. data/lib/aspose_pdf_cloud/models/link_highlighting_mode.rb +1 -0
  142. data/lib/aspose_pdf_cloud/models/margin_info.rb +5 -2
  143. data/lib/aspose_pdf_cloud/models/markup_annotation.rb +36 -33
  144. data/lib/aspose_pdf_cloud/models/merge_documents.rb +5 -2
  145. data/lib/aspose_pdf_cloud/models/optimize_options.rb +5 -2
  146. data/lib/aspose_pdf_cloud/models/page.rb +5 -2
  147. data/lib/aspose_pdf_cloud/models/page_word_count.rb +5 -2
  148. data/lib/aspose_pdf_cloud/models/pages.rb +5 -2
  149. data/lib/aspose_pdf_cloud/models/paragraph.rb +5 -2
  150. data/lib/aspose_pdf_cloud/models/parts_embedding_modes.rb +1 -0
  151. data/lib/aspose_pdf_cloud/models/pdf_a_type.rb +1 -0
  152. data/lib/aspose_pdf_cloud/models/point.rb +5 -2
  153. data/lib/aspose_pdf_cloud/models/poly_annotation.rb +36 -33
  154. data/lib/aspose_pdf_cloud/models/poly_intent.rb +1 -0
  155. data/lib/aspose_pdf_cloud/models/poly_line_annotation.rb +36 -33
  156. data/lib/aspose_pdf_cloud/models/poly_line_annotation_response.rb +5 -2
  157. data/lib/aspose_pdf_cloud/models/poly_line_annotations.rb +5 -2
  158. data/lib/aspose_pdf_cloud/models/poly_line_annotations_response.rb +5 -2
  159. data/lib/aspose_pdf_cloud/models/polygon_annotation.rb +36 -33
  160. data/lib/aspose_pdf_cloud/models/polygon_annotation_response.rb +5 -2
  161. data/lib/aspose_pdf_cloud/models/polygon_annotations.rb +5 -2
  162. data/lib/aspose_pdf_cloud/models/polygon_annotations_response.rb +5 -2
  163. data/lib/aspose_pdf_cloud/models/popup_annotation.rb +325 -0
  164. data/lib/aspose_pdf_cloud/models/popup_annotation_response.rb +225 -0
  165. data/lib/aspose_pdf_cloud/models/popup_annotation_with_parent.rb +335 -0
  166. data/lib/aspose_pdf_cloud/models/popup_annotations.rb +214 -0
  167. data/lib/aspose_pdf_cloud/models/popup_annotations_response.rb +225 -0
  168. data/lib/aspose_pdf_cloud/models/raster_images_saving_modes.rb +1 -0
  169. data/lib/aspose_pdf_cloud/models/rectangle_pdf.rb +5 -2
  170. data/lib/aspose_pdf_cloud/models/rotation.rb +1 -0
  171. data/lib/aspose_pdf_cloud/models/segment.rb +5 -2
  172. data/lib/aspose_pdf_cloud/models/shape_type.rb +1 -0
  173. data/lib/aspose_pdf_cloud/models/signature.rb +5 -2
  174. data/lib/aspose_pdf_cloud/models/signature_type.rb +1 -0
  175. data/lib/aspose_pdf_cloud/models/signature_verify_response.rb +5 -2
  176. data/lib/aspose_pdf_cloud/models/split_result.rb +5 -2
  177. data/lib/aspose_pdf_cloud/models/split_result_document.rb +5 -2
  178. data/lib/aspose_pdf_cloud/models/split_result_response.rb +5 -2
  179. data/lib/aspose_pdf_cloud/models/square_annotation.rb +36 -33
  180. data/lib/aspose_pdf_cloud/models/square_annotation_response.rb +5 -2
  181. data/lib/aspose_pdf_cloud/models/square_annotations.rb +5 -2
  182. data/lib/aspose_pdf_cloud/models/square_annotations_response.rb +5 -2
  183. data/lib/aspose_pdf_cloud/models/squiggly_annotation.rb +367 -0
  184. data/lib/aspose_pdf_cloud/models/squiggly_annotation_response.rb +225 -0
  185. data/lib/aspose_pdf_cloud/models/squiggly_annotations.rb +214 -0
  186. data/lib/aspose_pdf_cloud/models/squiggly_annotations_response.rb +225 -0
  187. data/lib/aspose_pdf_cloud/models/stamp.rb +5 -2
  188. data/lib/aspose_pdf_cloud/models/stamp_type.rb +1 -0
  189. data/lib/aspose_pdf_cloud/models/strike_out_annotation.rb +367 -0
  190. data/lib/aspose_pdf_cloud/models/strike_out_annotation_response.rb +225 -0
  191. data/lib/aspose_pdf_cloud/models/strike_out_annotations.rb +214 -0
  192. data/lib/aspose_pdf_cloud/models/strike_out_annotations_response.rb +225 -0
  193. data/lib/aspose_pdf_cloud/models/text_annotation.rb +36 -33
  194. data/lib/aspose_pdf_cloud/models/text_annotation_response.rb +5 -2
  195. data/lib/aspose_pdf_cloud/models/text_annotations.rb +5 -2
  196. data/lib/aspose_pdf_cloud/models/text_annotations_response.rb +5 -2
  197. data/lib/aspose_pdf_cloud/models/text_horizontal_alignment.rb +1 -0
  198. data/lib/aspose_pdf_cloud/models/text_icon.rb +1 -0
  199. data/lib/aspose_pdf_cloud/models/text_line.rb +5 -2
  200. data/lib/aspose_pdf_cloud/models/text_rect.rb +5 -2
  201. data/lib/aspose_pdf_cloud/models/text_rects.rb +5 -2
  202. data/lib/aspose_pdf_cloud/models/text_rects_response.rb +5 -2
  203. data/lib/aspose_pdf_cloud/models/text_replace.rb +5 -2
  204. data/lib/aspose_pdf_cloud/models/text_replace_list_request.rb +5 -2
  205. data/lib/aspose_pdf_cloud/models/text_replace_response.rb +5 -2
  206. data/lib/aspose_pdf_cloud/models/text_state.rb +5 -2
  207. data/lib/aspose_pdf_cloud/models/text_style.rb +5 -2
  208. data/lib/aspose_pdf_cloud/models/underline_annotation.rb +367 -0
  209. data/lib/aspose_pdf_cloud/models/underline_annotation_response.rb +225 -0
  210. data/lib/aspose_pdf_cloud/models/underline_annotations.rb +214 -0
  211. data/lib/aspose_pdf_cloud/models/underline_annotations_response.rb +225 -0
  212. data/lib/aspose_pdf_cloud/models/vertical_alignment.rb +1 -0
  213. data/lib/aspose_pdf_cloud/models/word_count.rb +5 -2
  214. data/lib/aspose_pdf_cloud/models/word_count_response.rb +5 -2
  215. data/lib/aspose_pdf_cloud/models/wrap_mode.rb +1 -0
  216. data/lib/aspose_pdf_cloud/version.rb +1 -1
  217. data/test/pdf_tests.rb +757 -21
  218. metadata +68 -2
@@ -20,6 +20,7 @@ SOFTWARE.
20
20
  =end
21
21
 
22
22
  require 'date'
23
+ require 'time'
23
24
 
24
25
  module AsposePdfCloud
25
26
  # Provides CircleAnnotation.
@@ -30,15 +31,6 @@ module AsposePdfCloud
30
31
  # Get the annotation content.
31
32
  attr_accessor :contents
32
33
 
33
- # The date and time when the annotation was created.
34
- attr_accessor :creation_date
35
-
36
- # Get the annotation subject.
37
- attr_accessor :subject
38
-
39
- # Get the annotation title.
40
- attr_accessor :title
41
-
42
34
  # The date and time when the annotation was last modified.
43
35
  attr_accessor :modified
44
36
 
@@ -66,6 +58,15 @@ module AsposePdfCloud
66
58
  # Gets VerticalAlignment of the annotation.
67
59
  attr_accessor :vertical_alignment
68
60
 
61
+ # The date and time when the annotation was created.
62
+ attr_accessor :creation_date
63
+
64
+ # Get the annotation subject.
65
+ attr_accessor :subject
66
+
67
+ # Get the annotation title.
68
+ attr_accessor :title
69
+
69
70
  # Get the annotation RichText.
70
71
  attr_accessor :rich_text
71
72
 
@@ -84,9 +85,6 @@ module AsposePdfCloud
84
85
  {
85
86
  :'links' => :'Links',
86
87
  :'contents' => :'Contents',
87
- :'creation_date' => :'CreationDate',
88
- :'subject' => :'Subject',
89
- :'title' => :'Title',
90
88
  :'modified' => :'Modified',
91
89
  :'id' => :'Id',
92
90
  :'flags' => :'Flags',
@@ -96,6 +94,9 @@ module AsposePdfCloud
96
94
  :'z_index' => :'ZIndex',
97
95
  :'horizontal_alignment' => :'HorizontalAlignment',
98
96
  :'vertical_alignment' => :'VerticalAlignment',
97
+ :'creation_date' => :'CreationDate',
98
+ :'subject' => :'Subject',
99
+ :'title' => :'Title',
99
100
  :'rich_text' => :'RichText',
100
101
  :'interior_color' => :'InteriorColor',
101
102
  :'frame' => :'Frame',
@@ -108,9 +109,6 @@ module AsposePdfCloud
108
109
  {
109
110
  :'links' => :'Array<Link>',
110
111
  :'contents' => :'String',
111
- :'creation_date' => :'String',
112
- :'subject' => :'String',
113
- :'title' => :'String',
114
112
  :'modified' => :'String',
115
113
  :'id' => :'String',
116
114
  :'flags' => :'Array<AnnotationFlags>',
@@ -120,6 +118,9 @@ module AsposePdfCloud
120
118
  :'z_index' => :'Integer',
121
119
  :'horizontal_alignment' => :'HorizontalAlignment',
122
120
  :'vertical_alignment' => :'VerticalAlignment',
121
+ :'creation_date' => :'String',
122
+ :'subject' => :'String',
123
+ :'title' => :'String',
123
124
  :'rich_text' => :'String',
124
125
  :'interior_color' => :'Color',
125
126
  :'frame' => :'RectanglePdf',
@@ -145,18 +146,6 @@ module AsposePdfCloud
145
146
  self.contents = attributes[:'Contents']
146
147
  end
147
148
 
148
- if attributes.has_key?(:'CreationDate')
149
- self.creation_date = attributes[:'CreationDate']
150
- end
151
-
152
- if attributes.has_key?(:'Subject')
153
- self.subject = attributes[:'Subject']
154
- end
155
-
156
- if attributes.has_key?(:'Title')
157
- self.title = attributes[:'Title']
158
- end
159
-
160
149
  if attributes.has_key?(:'Modified')
161
150
  self.modified = attributes[:'Modified']
162
151
  end
@@ -195,6 +184,18 @@ module AsposePdfCloud
195
184
  self.vertical_alignment = attributes[:'VerticalAlignment']
196
185
  end
197
186
 
187
+ if attributes.has_key?(:'CreationDate')
188
+ self.creation_date = attributes[:'CreationDate']
189
+ end
190
+
191
+ if attributes.has_key?(:'Subject')
192
+ self.subject = attributes[:'Subject']
193
+ end
194
+
195
+ if attributes.has_key?(:'Title')
196
+ self.title = attributes[:'Title']
197
+ end
198
+
198
199
  if attributes.has_key?(:'RichText')
199
200
  self.rich_text = attributes[:'RichText']
200
201
  end
@@ -233,9 +234,6 @@ module AsposePdfCloud
233
234
  self.class == o.class &&
234
235
  links == o.links &&
235
236
  contents == o.contents &&
236
- creation_date == o.creation_date &&
237
- subject == o.subject &&
238
- title == o.title &&
239
237
  modified == o.modified &&
240
238
  id == o.id &&
241
239
  flags == o.flags &&
@@ -245,6 +243,9 @@ module AsposePdfCloud
245
243
  z_index == o.z_index &&
246
244
  horizontal_alignment == o.horizontal_alignment &&
247
245
  vertical_alignment == o.vertical_alignment &&
246
+ creation_date == o.creation_date &&
247
+ subject == o.subject &&
248
+ title == o.title &&
248
249
  rich_text == o.rich_text &&
249
250
  interior_color == o.interior_color &&
250
251
  frame == o.frame &&
@@ -260,7 +261,7 @@ module AsposePdfCloud
260
261
  # Calculates hash code according to all attributes.
261
262
  # @return [Fixnum] Hash code
262
263
  def hash
263
- [links, contents, creation_date, subject, title, modified, id, flags, name, rect, page_index, z_index, horizontal_alignment, vertical_alignment, rich_text, interior_color, frame, color].hash
264
+ [links, contents, modified, id, flags, name, rect, page_index, z_index, horizontal_alignment, vertical_alignment, creation_date, subject, title, rich_text, interior_color, frame, color].hash
264
265
  end
265
266
 
266
267
  # Builds the object from hash
@@ -290,9 +291,11 @@ module AsposePdfCloud
290
291
  def _deserialize(type, value)
291
292
  case type.to_sym
292
293
  when :DateTime
293
- DateTime.parse(value)
294
+ format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
295
+ Time.strptime(value, format).utc.to_datetime
294
296
  when :Date
295
- Date.parse(value)
297
+ format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
298
+ Time.strptime(value, format).utc.to_datetime.to_date
296
299
  when :String
297
300
  value.to_s
298
301
  when :Integer
@@ -20,6 +20,7 @@ SOFTWARE.
20
20
  =end
21
21
 
22
22
  require 'date'
23
+ require 'time'
23
24
 
24
25
  module AsposePdfCloud
25
26
 
@@ -140,9 +141,11 @@ module AsposePdfCloud
140
141
  def _deserialize(type, value)
141
142
  case type.to_sym
142
143
  when :DateTime
143
- DateTime.parse(value)
144
+ format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
145
+ Time.strptime(value, format).utc.to_datetime
144
146
  when :Date
145
- Date.parse(value)
147
+ format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
148
+ Time.strptime(value, format).utc.to_datetime.to_date
146
149
  when :String
147
150
  value.to_s
148
151
  when :Integer
@@ -20,6 +20,7 @@ SOFTWARE.
20
20
  =end
21
21
 
22
22
  require 'date'
23
+ require 'time'
23
24
 
24
25
  module AsposePdfCloud
25
26
  # List of annotations.
@@ -129,9 +130,11 @@ module AsposePdfCloud
129
130
  def _deserialize(type, value)
130
131
  case type.to_sym
131
132
  when :DateTime
132
- DateTime.parse(value)
133
+ format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
134
+ Time.strptime(value, format).utc.to_datetime
133
135
  when :Date
134
- Date.parse(value)
136
+ format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
137
+ Time.strptime(value, format).utc.to_datetime.to_date
135
138
  when :String
136
139
  value.to_s
137
140
  when :Integer
@@ -20,6 +20,7 @@ SOFTWARE.
20
20
  =end
21
21
 
22
22
  require 'date'
23
+ require 'time'
23
24
 
24
25
  module AsposePdfCloud
25
26
 
@@ -140,9 +141,11 @@ module AsposePdfCloud
140
141
  def _deserialize(type, value)
141
142
  case type.to_sym
142
143
  when :DateTime
143
- DateTime.parse(value)
144
+ format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
145
+ Time.strptime(value, format).utc.to_datetime
144
146
  when :Date
145
- Date.parse(value)
147
+ format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
148
+ Time.strptime(value, format).utc.to_datetime.to_date
146
149
  when :String
147
150
  value.to_s
148
151
  when :Integer
@@ -20,6 +20,7 @@ SOFTWARE.
20
20
  =end
21
21
 
22
22
  require 'date'
23
+ require 'time'
23
24
 
24
25
  module AsposePdfCloud
25
26
  # Represents color DTO.
@@ -162,9 +163,11 @@ module AsposePdfCloud
162
163
  def _deserialize(type, value)
163
164
  case type.to_sym
164
165
  when :DateTime
165
- DateTime.parse(value)
166
+ format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
167
+ Time.strptime(value, format).utc.to_datetime
166
168
  when :Date
167
- Date.parse(value)
169
+ format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
170
+ Time.strptime(value, format).utc.to_datetime.to_date
168
171
  when :String
169
172
  value.to_s
170
173
  when :Integer
@@ -20,6 +20,7 @@ SOFTWARE.
20
20
  =end
21
21
 
22
22
  require 'date'
23
+ require 'time'
23
24
 
24
25
  module AsposePdfCloud
25
26
  class ColorDepth
@@ -20,6 +20,7 @@ SOFTWARE.
20
20
  =end
21
21
 
22
22
  require 'date'
23
+ require 'time'
23
24
 
24
25
  module AsposePdfCloud
25
26
  # Provides CommonFigureAnnotation.
@@ -30,15 +31,6 @@ module AsposePdfCloud
30
31
  # Get the annotation content.
31
32
  attr_accessor :contents
32
33
 
33
- # The date and time when the annotation was created.
34
- attr_accessor :creation_date
35
-
36
- # Get the annotation subject.
37
- attr_accessor :subject
38
-
39
- # Get the annotation title.
40
- attr_accessor :title
41
-
42
34
  # The date and time when the annotation was last modified.
43
35
  attr_accessor :modified
44
36
 
@@ -66,6 +58,15 @@ module AsposePdfCloud
66
58
  # Gets VerticalAlignment of the annotation.
67
59
  attr_accessor :vertical_alignment
68
60
 
61
+ # The date and time when the annotation was created.
62
+ attr_accessor :creation_date
63
+
64
+ # Get the annotation subject.
65
+ attr_accessor :subject
66
+
67
+ # Get the annotation title.
68
+ attr_accessor :title
69
+
69
70
  # Get the annotation RichText.
70
71
  attr_accessor :rich_text
71
72
 
@@ -81,9 +82,6 @@ module AsposePdfCloud
81
82
  {
82
83
  :'links' => :'Links',
83
84
  :'contents' => :'Contents',
84
- :'creation_date' => :'CreationDate',
85
- :'subject' => :'Subject',
86
- :'title' => :'Title',
87
85
  :'modified' => :'Modified',
88
86
  :'id' => :'Id',
89
87
  :'flags' => :'Flags',
@@ -93,6 +91,9 @@ module AsposePdfCloud
93
91
  :'z_index' => :'ZIndex',
94
92
  :'horizontal_alignment' => :'HorizontalAlignment',
95
93
  :'vertical_alignment' => :'VerticalAlignment',
94
+ :'creation_date' => :'CreationDate',
95
+ :'subject' => :'Subject',
96
+ :'title' => :'Title',
96
97
  :'rich_text' => :'RichText',
97
98
  :'interior_color' => :'InteriorColor',
98
99
  :'frame' => :'Frame'
@@ -104,9 +105,6 @@ module AsposePdfCloud
104
105
  {
105
106
  :'links' => :'Array<Link>',
106
107
  :'contents' => :'String',
107
- :'creation_date' => :'String',
108
- :'subject' => :'String',
109
- :'title' => :'String',
110
108
  :'modified' => :'String',
111
109
  :'id' => :'String',
112
110
  :'flags' => :'Array<AnnotationFlags>',
@@ -116,6 +114,9 @@ module AsposePdfCloud
116
114
  :'z_index' => :'Integer',
117
115
  :'horizontal_alignment' => :'HorizontalAlignment',
118
116
  :'vertical_alignment' => :'VerticalAlignment',
117
+ :'creation_date' => :'String',
118
+ :'subject' => :'String',
119
+ :'title' => :'String',
119
120
  :'rich_text' => :'String',
120
121
  :'interior_color' => :'Color',
121
122
  :'frame' => :'RectanglePdf'
@@ -140,18 +141,6 @@ module AsposePdfCloud
140
141
  self.contents = attributes[:'Contents']
141
142
  end
142
143
 
143
- if attributes.has_key?(:'CreationDate')
144
- self.creation_date = attributes[:'CreationDate']
145
- end
146
-
147
- if attributes.has_key?(:'Subject')
148
- self.subject = attributes[:'Subject']
149
- end
150
-
151
- if attributes.has_key?(:'Title')
152
- self.title = attributes[:'Title']
153
- end
154
-
155
144
  if attributes.has_key?(:'Modified')
156
145
  self.modified = attributes[:'Modified']
157
146
  end
@@ -190,6 +179,18 @@ module AsposePdfCloud
190
179
  self.vertical_alignment = attributes[:'VerticalAlignment']
191
180
  end
192
181
 
182
+ if attributes.has_key?(:'CreationDate')
183
+ self.creation_date = attributes[:'CreationDate']
184
+ end
185
+
186
+ if attributes.has_key?(:'Subject')
187
+ self.subject = attributes[:'Subject']
188
+ end
189
+
190
+ if attributes.has_key?(:'Title')
191
+ self.title = attributes[:'Title']
192
+ end
193
+
193
194
  if attributes.has_key?(:'RichText')
194
195
  self.rich_text = attributes[:'RichText']
195
196
  end
@@ -224,9 +225,6 @@ module AsposePdfCloud
224
225
  self.class == o.class &&
225
226
  links == o.links &&
226
227
  contents == o.contents &&
227
- creation_date == o.creation_date &&
228
- subject == o.subject &&
229
- title == o.title &&
230
228
  modified == o.modified &&
231
229
  id == o.id &&
232
230
  flags == o.flags &&
@@ -236,6 +234,9 @@ module AsposePdfCloud
236
234
  z_index == o.z_index &&
237
235
  horizontal_alignment == o.horizontal_alignment &&
238
236
  vertical_alignment == o.vertical_alignment &&
237
+ creation_date == o.creation_date &&
238
+ subject == o.subject &&
239
+ title == o.title &&
239
240
  rich_text == o.rich_text &&
240
241
  interior_color == o.interior_color &&
241
242
  frame == o.frame
@@ -250,7 +251,7 @@ module AsposePdfCloud
250
251
  # Calculates hash code according to all attributes.
251
252
  # @return [Fixnum] Hash code
252
253
  def hash
253
- [links, contents, creation_date, subject, title, modified, id, flags, name, rect, page_index, z_index, horizontal_alignment, vertical_alignment, rich_text, interior_color, frame].hash
254
+ [links, contents, modified, id, flags, name, rect, page_index, z_index, horizontal_alignment, vertical_alignment, creation_date, subject, title, rich_text, interior_color, frame].hash
254
255
  end
255
256
 
256
257
  # Builds the object from hash
@@ -280,9 +281,11 @@ module AsposePdfCloud
280
281
  def _deserialize(type, value)
281
282
  case type.to_sym
282
283
  when :DateTime
283
- DateTime.parse(value)
284
+ format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
285
+ Time.strptime(value, format).utc.to_datetime
284
286
  when :Date
285
- Date.parse(value)
287
+ format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
288
+ Time.strptime(value, format).utc.to_datetime.to_date
286
289
  when :String
287
290
  value.to_s
288
291
  when :Integer
@@ -20,6 +20,7 @@ SOFTWARE.
20
20
  =end
21
21
 
22
22
  require 'date'
23
+ require 'time'
23
24
 
24
25
  module AsposePdfCloud
25
26
  class CompressionType
@@ -20,6 +20,7 @@ SOFTWARE.
20
20
  =end
21
21
 
22
22
  require 'date'
23
+ require 'time'
23
24
 
24
25
  module AsposePdfCloud
25
26
  class DocFormat
@@ -20,6 +20,7 @@ SOFTWARE.
20
20
  =end
21
21
 
22
22
  require 'date'
23
+ require 'time'
23
24
 
24
25
  module AsposePdfCloud
25
26
  class DocRecognitionMode
@@ -20,6 +20,7 @@ SOFTWARE.
20
20
  =end
21
21
 
22
22
  require 'date'
23
+ require 'time'
23
24
 
24
25
  module AsposePdfCloud
25
26
  # Represents document DTO.
@@ -138,9 +139,11 @@ module AsposePdfCloud
138
139
  def _deserialize(type, value)
139
140
  case type.to_sym
140
141
  when :DateTime
141
- DateTime.parse(value)
142
+ format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
143
+ Time.strptime(value, format).utc.to_datetime
142
144
  when :Date
143
- Date.parse(value)
145
+ format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
146
+ Time.strptime(value, format).utc.to_datetime.to_date
144
147
  when :String
145
148
  value.to_s
146
149
  when :Integer