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 annotation.
@@ -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
 
@@ -72,9 +64,6 @@ module AsposePdfCloud
72
64
  {
73
65
  :'links' => :'Links',
74
66
  :'contents' => :'Contents',
75
- :'creation_date' => :'CreationDate',
76
- :'subject' => :'Subject',
77
- :'title' => :'Title',
78
67
  :'modified' => :'Modified',
79
68
  :'id' => :'Id',
80
69
  :'flags' => :'Flags',
@@ -92,9 +81,6 @@ module AsposePdfCloud
92
81
  {
93
82
  :'links' => :'Array<Link>',
94
83
  :'contents' => :'String',
95
- :'creation_date' => :'String',
96
- :'subject' => :'String',
97
- :'title' => :'String',
98
84
  :'modified' => :'String',
99
85
  :'id' => :'String',
100
86
  :'flags' => :'Array<AnnotationFlags>',
@@ -125,18 +111,6 @@ module AsposePdfCloud
125
111
  self.contents = attributes[:'Contents']
126
112
  end
127
113
 
128
- if attributes.has_key?(:'CreationDate')
129
- self.creation_date = attributes[:'CreationDate']
130
- end
131
-
132
- if attributes.has_key?(:'Subject')
133
- self.subject = attributes[:'Subject']
134
- end
135
-
136
- if attributes.has_key?(:'Title')
137
- self.title = attributes[:'Title']
138
- end
139
-
140
114
  if attributes.has_key?(:'Modified')
141
115
  self.modified = attributes[:'Modified']
142
116
  end
@@ -197,9 +171,6 @@ module AsposePdfCloud
197
171
  self.class == o.class &&
198
172
  links == o.links &&
199
173
  contents == o.contents &&
200
- creation_date == o.creation_date &&
201
- subject == o.subject &&
202
- title == o.title &&
203
174
  modified == o.modified &&
204
175
  id == o.id &&
205
176
  flags == o.flags &&
@@ -220,7 +191,7 @@ module AsposePdfCloud
220
191
  # Calculates hash code according to all attributes.
221
192
  # @return [Fixnum] Hash code
222
193
  def hash
223
- [links, contents, creation_date, subject, title, modified, id, flags, name, rect, page_index, z_index, horizontal_alignment, vertical_alignment].hash
194
+ [links, contents, modified, id, flags, name, rect, page_index, z_index, horizontal_alignment, vertical_alignment].hash
224
195
  end
225
196
 
226
197
  # Builds the object from hash
@@ -250,9 +221,11 @@ module AsposePdfCloud
250
221
  def _deserialize(type, value)
251
222
  case type.to_sym
252
223
  when :DateTime
253
- DateTime.parse(value)
224
+ format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
225
+ Time.strptime(value, format).utc.to_datetime
254
226
  when :Date
255
- Date.parse(value)
227
+ format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
228
+ Time.strptime(value, format).utc.to_datetime.to_date
256
229
  when :String
257
230
  value.to_s
258
231
  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 AnnotationFlags
@@ -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 annotation.
@@ -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
 
@@ -75,9 +67,6 @@ module AsposePdfCloud
75
67
  {
76
68
  :'links' => :'Links',
77
69
  :'contents' => :'Contents',
78
- :'creation_date' => :'CreationDate',
79
- :'subject' => :'Subject',
80
- :'title' => :'Title',
81
70
  :'modified' => :'Modified',
82
71
  :'id' => :'Id',
83
72
  :'flags' => :'Flags',
@@ -96,9 +85,6 @@ module AsposePdfCloud
96
85
  {
97
86
  :'links' => :'Array<Link>',
98
87
  :'contents' => :'String',
99
- :'creation_date' => :'String',
100
- :'subject' => :'String',
101
- :'title' => :'String',
102
88
  :'modified' => :'String',
103
89
  :'id' => :'String',
104
90
  :'flags' => :'Array<AnnotationFlags>',
@@ -130,18 +116,6 @@ module AsposePdfCloud
130
116
  self.contents = attributes[:'Contents']
131
117
  end
132
118
 
133
- if attributes.has_key?(:'CreationDate')
134
- self.creation_date = attributes[:'CreationDate']
135
- end
136
-
137
- if attributes.has_key?(:'Subject')
138
- self.subject = attributes[:'Subject']
139
- end
140
-
141
- if attributes.has_key?(:'Title')
142
- self.title = attributes[:'Title']
143
- end
144
-
145
119
  if attributes.has_key?(:'Modified')
146
120
  self.modified = attributes[:'Modified']
147
121
  end
@@ -206,9 +180,6 @@ module AsposePdfCloud
206
180
  self.class == o.class &&
207
181
  links == o.links &&
208
182
  contents == o.contents &&
209
- creation_date == o.creation_date &&
210
- subject == o.subject &&
211
- title == o.title &&
212
183
  modified == o.modified &&
213
184
  id == o.id &&
214
185
  flags == o.flags &&
@@ -230,7 +201,7 @@ module AsposePdfCloud
230
201
  # Calculates hash code according to all attributes.
231
202
  # @return [Fixnum] Hash code
232
203
  def hash
233
- [links, contents, creation_date, subject, title, modified, id, flags, name, rect, page_index, z_index, horizontal_alignment, vertical_alignment, annotation_type].hash
204
+ [links, contents, modified, id, flags, name, rect, page_index, z_index, horizontal_alignment, vertical_alignment, annotation_type].hash
234
205
  end
235
206
 
236
207
  # Builds the object from hash
@@ -260,9 +231,11 @@ module AsposePdfCloud
260
231
  def _deserialize(type, value)
261
232
  case type.to_sym
262
233
  when :DateTime
263
- DateTime.parse(value)
234
+ format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
235
+ Time.strptime(value, format).utc.to_datetime
264
236
  when :Date
265
- Date.parse(value)
237
+ format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
238
+ Time.strptime(value, format).utc.to_datetime.to_date
266
239
  when :String
267
240
  value.to_s
268
241
  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 AnnotationState
@@ -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 AnnotationType
@@ -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
  class AntialiasingProcessingType
@@ -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 for appendDocument service request building.
@@ -151,9 +152,11 @@ module AsposePdfCloud
151
152
  def _deserialize(type, value)
152
153
  case type.to_sym
153
154
  when :DateTime
154
- DateTime.parse(value)
155
+ format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
156
+ Time.strptime(value, format).utc.to_datetime
155
157
  when :Date
156
- Date.parse(value)
158
+ format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
159
+ Time.strptime(value, format).utc.to_datetime.to_date
157
160
  when :String
158
161
  value.to_s
159
162
  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
  # Base class for all responses.
@@ -131,9 +132,11 @@ module AsposePdfCloud
131
132
  def _deserialize(type, value)
132
133
  case type.to_sym
133
134
  when :DateTime
134
- DateTime.parse(value)
135
+ format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
136
+ Time.strptime(value, format).utc.to_datetime
135
137
  when :Date
136
- Date.parse(value)
138
+ format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
139
+ Time.strptime(value, format).utc.to_datetime.to_date
137
140
  when :String
138
141
  value.to_s
139
142
  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 attachment.
@@ -188,9 +189,11 @@ module AsposePdfCloud
188
189
  def _deserialize(type, value)
189
190
  case type.to_sym
190
191
  when :DateTime
191
- DateTime.parse(value)
192
+ format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
193
+ Time.strptime(value, format).utc.to_datetime
192
194
  when :Date
193
- Date.parse(value)
195
+ format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
196
+ Time.strptime(value, format).utc.to_datetime.to_date
194
197
  when :String
195
198
  value.to_s
196
199
  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 attachment.
@@ -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
@@ -0,0 +1,44 @@
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ Copyright (c) 2018 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
+ class CapStyle
27
+
28
+ RECTANGULAR = "Rectangular".freeze
29
+ ROUNDED = "Rounded".freeze
30
+
31
+ # Builds the enum from string
32
+ # @param [String] The enum value in the form of the string
33
+ # @return [String] The enum value
34
+ def build_from_hash(value)
35
+ # resolve issue with Concstant Name modification (ex: "FooName" to :FOO_NAME)
36
+ # consantValues = CapStyle.constants.select{|c| c.to_s == value}
37
+ constantValues = CapStyle.constants.select{ |const_name| CapStyle.const_get(const_name) == value}
38
+
39
+ raise "Invalid ENUM value #{value} for class #CapStyle" if constantValues.empty?
40
+ value
41
+ end
42
+ end
43
+
44
+ end
@@ -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 CaptionPosition