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
  # Documents for merging.
@@ -123,9 +124,11 @@ module AsposePdfCloud
123
124
  def _deserialize(type, value)
124
125
  case type.to_sym
125
126
  when :DateTime
126
- DateTime.parse(value)
127
+ format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
128
+ Time.strptime(value, format).utc.to_datetime
127
129
  when :Date
128
- Date.parse(value)
130
+ format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
131
+ Time.strptime(value, format).utc.to_datetime.to_date
129
132
  when :String
130
133
  value.to_s
131
134
  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 Pdf optimize options.
@@ -211,9 +212,11 @@ module AsposePdfCloud
211
212
  def _deserialize(type, value)
212
213
  case type.to_sym
213
214
  when :DateTime
214
- DateTime.parse(value)
215
+ format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
216
+ Time.strptime(value, format).utc.to_datetime
215
217
  when :Date
216
- Date.parse(value)
218
+ format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
219
+ Time.strptime(value, format).utc.to_datetime.to_date
217
220
  when :String
218
221
  value.to_s
219
222
  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
  # Provides link to page.
@@ -146,9 +147,11 @@ module AsposePdfCloud
146
147
  def _deserialize(type, value)
147
148
  case type.to_sym
148
149
  when :DateTime
149
- DateTime.parse(value)
150
+ format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
151
+ Time.strptime(value, format).utc.to_datetime
150
152
  when :Date
151
- Date.parse(value)
153
+ format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
154
+ Time.strptime(value, format).utc.to_datetime.to_date
152
155
  when :String
153
156
  value.to_s
154
157
  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
  # Page words count.
@@ -136,9 +137,11 @@ module AsposePdfCloud
136
137
  def _deserialize(type, value)
137
138
  case type.to_sym
138
139
  when :DateTime
139
- DateTime.parse(value)
140
+ format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
141
+ Time.strptime(value, format).utc.to_datetime
140
142
  when :Date
141
- Date.parse(value)
143
+ format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
144
+ Time.strptime(value, format).utc.to_datetime.to_date
142
145
  when :String
143
146
  value.to_s
144
147
  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 pages.
@@ -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
  # Paragraph DTO for add text functionality.
@@ -221,9 +222,11 @@ module AsposePdfCloud
221
222
  def _deserialize(type, value)
222
223
  case type.to_sym
223
224
  when :DateTime
224
- DateTime.parse(value)
225
+ format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
226
+ Time.strptime(value, format).utc.to_datetime
225
227
  when :Date
226
- Date.parse(value)
228
+ format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
229
+ Time.strptime(value, format).utc.to_datetime.to_date
227
230
  when :String
228
231
  value.to_s
229
232
  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 PartsEmbeddingModes
@@ -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 PdfAType
@@ -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
  # Represent point with fractional coordinates.
@@ -136,9 +137,11 @@ module AsposePdfCloud
136
137
  def _deserialize(type, value)
137
138
  case type.to_sym
138
139
  when :DateTime
139
- DateTime.parse(value)
140
+ format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
141
+ Time.strptime(value, format).utc.to_datetime
140
142
  when :Date
141
- Date.parse(value)
143
+ format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
144
+ Time.strptime(value, format).utc.to_datetime.to_date
142
145
  when :String
143
146
  value.to_s
144
147
  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
  # Provides PolyAnnotation.
@@ -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
 
@@ -90,9 +91,6 @@ module AsposePdfCloud
90
91
  {
91
92
  :'links' => :'Links',
92
93
  :'contents' => :'Contents',
93
- :'creation_date' => :'CreationDate',
94
- :'subject' => :'Subject',
95
- :'title' => :'Title',
96
94
  :'modified' => :'Modified',
97
95
  :'id' => :'Id',
98
96
  :'flags' => :'Flags',
@@ -102,6 +100,9 @@ module AsposePdfCloud
102
100
  :'z_index' => :'ZIndex',
103
101
  :'horizontal_alignment' => :'HorizontalAlignment',
104
102
  :'vertical_alignment' => :'VerticalAlignment',
103
+ :'creation_date' => :'CreationDate',
104
+ :'subject' => :'Subject',
105
+ :'title' => :'Title',
105
106
  :'rich_text' => :'RichText',
106
107
  :'interior_color' => :'InteriorColor',
107
108
  :'starting_style' => :'StartingStyle',
@@ -116,9 +117,6 @@ module AsposePdfCloud
116
117
  {
117
118
  :'links' => :'Array<Link>',
118
119
  :'contents' => :'String',
119
- :'creation_date' => :'String',
120
- :'subject' => :'String',
121
- :'title' => :'String',
122
120
  :'modified' => :'String',
123
121
  :'id' => :'String',
124
122
  :'flags' => :'Array<AnnotationFlags>',
@@ -128,6 +126,9 @@ module AsposePdfCloud
128
126
  :'z_index' => :'Integer',
129
127
  :'horizontal_alignment' => :'HorizontalAlignment',
130
128
  :'vertical_alignment' => :'VerticalAlignment',
129
+ :'creation_date' => :'String',
130
+ :'subject' => :'String',
131
+ :'title' => :'String',
131
132
  :'rich_text' => :'String',
132
133
  :'interior_color' => :'Color',
133
134
  :'starting_style' => :'LineEnding',
@@ -155,18 +156,6 @@ module AsposePdfCloud
155
156
  self.contents = attributes[:'Contents']
156
157
  end
157
158
 
158
- if attributes.has_key?(:'CreationDate')
159
- self.creation_date = attributes[:'CreationDate']
160
- end
161
-
162
- if attributes.has_key?(:'Subject')
163
- self.subject = attributes[:'Subject']
164
- end
165
-
166
- if attributes.has_key?(:'Title')
167
- self.title = attributes[:'Title']
168
- end
169
-
170
159
  if attributes.has_key?(:'Modified')
171
160
  self.modified = attributes[:'Modified']
172
161
  end
@@ -205,6 +194,18 @@ module AsposePdfCloud
205
194
  self.vertical_alignment = attributes[:'VerticalAlignment']
206
195
  end
207
196
 
197
+ if attributes.has_key?(:'CreationDate')
198
+ self.creation_date = attributes[:'CreationDate']
199
+ end
200
+
201
+ if attributes.has_key?(:'Subject')
202
+ self.subject = attributes[:'Subject']
203
+ end
204
+
205
+ if attributes.has_key?(:'Title')
206
+ self.title = attributes[:'Title']
207
+ end
208
+
208
209
  if attributes.has_key?(:'RichText')
209
210
  self.rich_text = attributes[:'RichText']
210
211
  end
@@ -253,9 +254,6 @@ module AsposePdfCloud
253
254
  self.class == o.class &&
254
255
  links == o.links &&
255
256
  contents == o.contents &&
256
- creation_date == o.creation_date &&
257
- subject == o.subject &&
258
- title == o.title &&
259
257
  modified == o.modified &&
260
258
  id == o.id &&
261
259
  flags == o.flags &&
@@ -265,6 +263,9 @@ module AsposePdfCloud
265
263
  z_index == o.z_index &&
266
264
  horizontal_alignment == o.horizontal_alignment &&
267
265
  vertical_alignment == o.vertical_alignment &&
266
+ creation_date == o.creation_date &&
267
+ subject == o.subject &&
268
+ title == o.title &&
268
269
  rich_text == o.rich_text &&
269
270
  interior_color == o.interior_color &&
270
271
  starting_style == o.starting_style &&
@@ -282,7 +283,7 @@ module AsposePdfCloud
282
283
  # Calculates hash code according to all attributes.
283
284
  # @return [Fixnum] Hash code
284
285
  def hash
285
- [links, contents, creation_date, subject, title, modified, id, flags, name, rect, page_index, z_index, horizontal_alignment, vertical_alignment, rich_text, interior_color, starting_style, ending_style, intent, vertices].hash
286
+ [links, contents, modified, id, flags, name, rect, page_index, z_index, horizontal_alignment, vertical_alignment, creation_date, subject, title, rich_text, interior_color, starting_style, ending_style, intent, vertices].hash
286
287
  end
287
288
 
288
289
  # Builds the object from hash
@@ -312,9 +313,11 @@ module AsposePdfCloud
312
313
  def _deserialize(type, value)
313
314
  case type.to_sym
314
315
  when :DateTime
315
- DateTime.parse(value)
316
+ format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
317
+ Time.strptime(value, format).utc.to_datetime
316
318
  when :Date
317
- Date.parse(value)
319
+ format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
320
+ Time.strptime(value, format).utc.to_datetime.to_date
318
321
  when :String
319
322
  value.to_s
320
323
  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 PolyIntent
@@ -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 PolyLineAnnotation.
@@ -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
 
@@ -93,9 +94,6 @@ module AsposePdfCloud
93
94
  {
94
95
  :'links' => :'Links',
95
96
  :'contents' => :'Contents',
96
- :'creation_date' => :'CreationDate',
97
- :'subject' => :'Subject',
98
- :'title' => :'Title',
99
97
  :'modified' => :'Modified',
100
98
  :'id' => :'Id',
101
99
  :'flags' => :'Flags',
@@ -105,6 +103,9 @@ module AsposePdfCloud
105
103
  :'z_index' => :'ZIndex',
106
104
  :'horizontal_alignment' => :'HorizontalAlignment',
107
105
  :'vertical_alignment' => :'VerticalAlignment',
106
+ :'creation_date' => :'CreationDate',
107
+ :'subject' => :'Subject',
108
+ :'title' => :'Title',
108
109
  :'rich_text' => :'RichText',
109
110
  :'interior_color' => :'InteriorColor',
110
111
  :'starting_style' => :'StartingStyle',
@@ -120,9 +121,6 @@ module AsposePdfCloud
120
121
  {
121
122
  :'links' => :'Array<Link>',
122
123
  :'contents' => :'String',
123
- :'creation_date' => :'String',
124
- :'subject' => :'String',
125
- :'title' => :'String',
126
124
  :'modified' => :'String',
127
125
  :'id' => :'String',
128
126
  :'flags' => :'Array<AnnotationFlags>',
@@ -132,6 +130,9 @@ module AsposePdfCloud
132
130
  :'z_index' => :'Integer',
133
131
  :'horizontal_alignment' => :'HorizontalAlignment',
134
132
  :'vertical_alignment' => :'VerticalAlignment',
133
+ :'creation_date' => :'String',
134
+ :'subject' => :'String',
135
+ :'title' => :'String',
135
136
  :'rich_text' => :'String',
136
137
  :'interior_color' => :'Color',
137
138
  :'starting_style' => :'LineEnding',
@@ -160,18 +161,6 @@ module AsposePdfCloud
160
161
  self.contents = attributes[:'Contents']
161
162
  end
162
163
 
163
- if attributes.has_key?(:'CreationDate')
164
- self.creation_date = attributes[:'CreationDate']
165
- end
166
-
167
- if attributes.has_key?(:'Subject')
168
- self.subject = attributes[:'Subject']
169
- end
170
-
171
- if attributes.has_key?(:'Title')
172
- self.title = attributes[:'Title']
173
- end
174
-
175
164
  if attributes.has_key?(:'Modified')
176
165
  self.modified = attributes[:'Modified']
177
166
  end
@@ -210,6 +199,18 @@ module AsposePdfCloud
210
199
  self.vertical_alignment = attributes[:'VerticalAlignment']
211
200
  end
212
201
 
202
+ if attributes.has_key?(:'CreationDate')
203
+ self.creation_date = attributes[:'CreationDate']
204
+ end
205
+
206
+ if attributes.has_key?(:'Subject')
207
+ self.subject = attributes[:'Subject']
208
+ end
209
+
210
+ if attributes.has_key?(:'Title')
211
+ self.title = attributes[:'Title']
212
+ end
213
+
213
214
  if attributes.has_key?(:'RichText')
214
215
  self.rich_text = attributes[:'RichText']
215
216
  end
@@ -262,9 +263,6 @@ module AsposePdfCloud
262
263
  self.class == o.class &&
263
264
  links == o.links &&
264
265
  contents == o.contents &&
265
- creation_date == o.creation_date &&
266
- subject == o.subject &&
267
- title == o.title &&
268
266
  modified == o.modified &&
269
267
  id == o.id &&
270
268
  flags == o.flags &&
@@ -274,6 +272,9 @@ module AsposePdfCloud
274
272
  z_index == o.z_index &&
275
273
  horizontal_alignment == o.horizontal_alignment &&
276
274
  vertical_alignment == o.vertical_alignment &&
275
+ creation_date == o.creation_date &&
276
+ subject == o.subject &&
277
+ title == o.title &&
277
278
  rich_text == o.rich_text &&
278
279
  interior_color == o.interior_color &&
279
280
  starting_style == o.starting_style &&
@@ -292,7 +293,7 @@ module AsposePdfCloud
292
293
  # Calculates hash code according to all attributes.
293
294
  # @return [Fixnum] Hash code
294
295
  def hash
295
- [links, contents, creation_date, subject, title, modified, id, flags, name, rect, page_index, z_index, horizontal_alignment, vertical_alignment, rich_text, interior_color, starting_style, ending_style, intent, vertices, color].hash
296
+ [links, contents, modified, id, flags, name, rect, page_index, z_index, horizontal_alignment, vertical_alignment, creation_date, subject, title, rich_text, interior_color, starting_style, ending_style, intent, vertices, color].hash
296
297
  end
297
298
 
298
299
  # Builds the object from hash
@@ -322,9 +323,11 @@ module AsposePdfCloud
322
323
  def _deserialize(type, value)
323
324
  case type.to_sym
324
325
  when :DateTime
325
- DateTime.parse(value)
326
+ format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
327
+ Time.strptime(value, format).utc.to_datetime
326
328
  when :Date
327
- Date.parse(value)
329
+ format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
330
+ Time.strptime(value, format).utc.to_datetime.to_date
328
331
  when :String
329
332
  value.to_s
330
333
  when :Integer