aspose_cells_cloud 20.11 → 20.11.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (281) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +21 -0
  3. data/README.md +116 -0
  4. data/lib/aspose_cells_cloud.rb +296 -0
  5. data/lib/aspose_cells_cloud/api/cells_api.rb +19867 -0
  6. data/lib/aspose_cells_cloud/api_client.rb +493 -0
  7. data/lib/aspose_cells_cloud/api_error.rb +48 -0
  8. data/lib/aspose_cells_cloud/configuration.rb +178 -0
  9. data/lib/aspose_cells_cloud/models/above_average.rb +234 -0
  10. data/lib/aspose_cells_cloud/models/access_token_response.rb +261 -0
  11. data/lib/aspose_cells_cloud/models/area.rb +243 -0
  12. data/lib/aspose_cells_cloud/models/auto_filter.rb +227 -0
  13. data/lib/aspose_cells_cloud/models/auto_filter_response.rb +221 -0
  14. data/lib/aspose_cells_cloud/models/auto_fitter_options.rb +231 -0
  15. data/lib/aspose_cells_cloud/models/auto_shape.rb +504 -0
  16. data/lib/aspose_cells_cloud/models/auto_shape_response.rb +221 -0
  17. data/lib/aspose_cells_cloud/models/auto_shapes.rb +209 -0
  18. data/lib/aspose_cells_cloud/models/auto_shapes_response.rb +221 -0
  19. data/lib/aspose_cells_cloud/models/border.rb +216 -0
  20. data/lib/aspose_cells_cloud/models/calculation_options.rb +225 -0
  21. data/lib/aspose_cells_cloud/models/cell.rb +401 -0
  22. data/lib/aspose_cells_cloud/models/cell_area.rb +245 -0
  23. data/lib/aspose_cells_cloud/models/cell_response.rb +221 -0
  24. data/lib/aspose_cells_cloud/models/cell_value.rb +234 -0
  25. data/lib/aspose_cells_cloud/models/cells.rb +270 -0
  26. data/lib/aspose_cells_cloud/models/cells_cloud_file_info.rb +230 -0
  27. data/lib/aspose_cells_cloud/models/cells_cloud_response.rb +212 -0
  28. data/lib/aspose_cells_cloud/models/cells_color.rb +234 -0
  29. data/lib/aspose_cells_cloud/models/cells_document_properties.rb +209 -0
  30. data/lib/aspose_cells_cloud/models/cells_document_properties_response.rb +221 -0
  31. data/lib/aspose_cells_cloud/models/cells_document_property.rb +225 -0
  32. data/lib/aspose_cells_cloud/models/cells_document_property_response.rb +221 -0
  33. data/lib/aspose_cells_cloud/models/cells_error.rb +229 -0
  34. data/lib/aspose_cells_cloud/models/cells_object_operate_task_parameter.rb +216 -0
  35. data/lib/aspose_cells_cloud/models/cells_response.rb +221 -0
  36. data/lib/aspose_cells_cloud/models/chart.rb +626 -0
  37. data/lib/aspose_cells_cloud/models/chart_area.rb +317 -0
  38. data/lib/aspose_cells_cloud/models/chart_area_response.rb +221 -0
  39. data/lib/aspose_cells_cloud/models/chart_frame.rb +317 -0
  40. data/lib/aspose_cells_cloud/models/chart_operate_parameter.rb +279 -0
  41. data/lib/aspose_cells_cloud/models/charts.rb +209 -0
  42. data/lib/aspose_cells_cloud/models/charts_response.rb +221 -0
  43. data/lib/aspose_cells_cloud/models/color.rb +245 -0
  44. data/lib/aspose_cells_cloud/models/color_filter.rb +234 -0
  45. data/lib/aspose_cells_cloud/models/color_filter_request.rb +216 -0
  46. data/lib/aspose_cells_cloud/models/color_scale.rb +249 -0
  47. data/lib/aspose_cells_cloud/models/column.rb +243 -0
  48. data/lib/aspose_cells_cloud/models/column_response.rb +221 -0
  49. data/lib/aspose_cells_cloud/models/columns.rb +237 -0
  50. data/lib/aspose_cells_cloud/models/columns_response.rb +221 -0
  51. data/lib/aspose_cells_cloud/models/comment.rb +297 -0
  52. data/lib/aspose_cells_cloud/models/comment_response.rb +221 -0
  53. data/lib/aspose_cells_cloud/models/comments.rb +209 -0
  54. data/lib/aspose_cells_cloud/models/comments_response.rb +221 -0
  55. data/lib/aspose_cells_cloud/models/conditional_formatting.rb +218 -0
  56. data/lib/aspose_cells_cloud/models/conditional_formatting_icon.rb +235 -0
  57. data/lib/aspose_cells_cloud/models/conditional_formatting_response.rb +221 -0
  58. data/lib/aspose_cells_cloud/models/conditional_formatting_value.rb +219 -0
  59. data/lib/aspose_cells_cloud/models/conditional_formattings.rb +223 -0
  60. data/lib/aspose_cells_cloud/models/conditional_formattings_response.rb +221 -0
  61. data/lib/aspose_cells_cloud/models/convert_task_parameter.rb +216 -0
  62. data/lib/aspose_cells_cloud/models/copy_options.rb +248 -0
  63. data/lib/aspose_cells_cloud/models/create_pivot_table_request.rb +263 -0
  64. data/lib/aspose_cells_cloud/models/custom_filter.rb +207 -0
  65. data/lib/aspose_cells_cloud/models/custom_parser_config.rb +216 -0
  66. data/lib/aspose_cells_cloud/models/data_bar.rb +309 -0
  67. data/lib/aspose_cells_cloud/models/data_bar_border.rb +209 -0
  68. data/lib/aspose_cells_cloud/models/data_sorter.rb +227 -0
  69. data/lib/aspose_cells_cloud/models/dif_save_options.rb +265 -0
  70. data/lib/aspose_cells_cloud/models/disc_usage.rb +219 -0
  71. data/lib/aspose_cells_cloud/models/dynamic_filter.rb +216 -0
  72. data/lib/aspose_cells_cloud/models/error_details.rb +214 -0
  73. data/lib/aspose_cells_cloud/models/file_source.rb +207 -0
  74. data/lib/aspose_cells_cloud/models/file_version.rb +274 -0
  75. data/lib/aspose_cells_cloud/models/file_versions.rb +201 -0
  76. data/lib/aspose_cells_cloud/models/files_list.rb +201 -0
  77. data/lib/aspose_cells_cloud/models/files_upload_result.rb +213 -0
  78. data/lib/aspose_cells_cloud/models/fill_format.rb +259 -0
  79. data/lib/aspose_cells_cloud/models/fill_format_response.rb +221 -0
  80. data/lib/aspose_cells_cloud/models/filter_column.rb +277 -0
  81. data/lib/aspose_cells_cloud/models/font.rb +279 -0
  82. data/lib/aspose_cells_cloud/models/font_setting.rb +244 -0
  83. data/lib/aspose_cells_cloud/models/format_condition.rb +327 -0
  84. data/lib/aspose_cells_cloud/models/gradient_fill.rb +227 -0
  85. data/lib/aspose_cells_cloud/models/gradient_fill_stop.rb +226 -0
  86. data/lib/aspose_cells_cloud/models/horizontal_page_break.rb +231 -0
  87. data/lib/aspose_cells_cloud/models/horizontal_page_break_response.rb +221 -0
  88. data/lib/aspose_cells_cloud/models/horizontal_page_breaks.rb +209 -0
  89. data/lib/aspose_cells_cloud/models/horizontal_page_breaks_response.rb +221 -0
  90. data/lib/aspose_cells_cloud/models/html_save_options.rb +373 -0
  91. data/lib/aspose_cells_cloud/models/hyperlink.rb +234 -0
  92. data/lib/aspose_cells_cloud/models/hyperlink_response.rb +221 -0
  93. data/lib/aspose_cells_cloud/models/hyperlinks.rb +223 -0
  94. data/lib/aspose_cells_cloud/models/hyperlinks_response.rb +221 -0
  95. data/lib/aspose_cells_cloud/models/icon_filter.rb +212 -0
  96. data/lib/aspose_cells_cloud/models/icon_set.rb +253 -0
  97. data/lib/aspose_cells_cloud/models/image_save_options.rb +373 -0
  98. data/lib/aspose_cells_cloud/models/import_batch_data_option.rb +236 -0
  99. data/lib/aspose_cells_cloud/models/import_csv_data_option.rb +281 -0
  100. data/lib/aspose_cells_cloud/models/import_data_task_parameter.rb +216 -0
  101. data/lib/aspose_cells_cloud/models/import_double_array_option.rb +263 -0
  102. data/lib/aspose_cells_cloud/models/import_int_array_option.rb +263 -0
  103. data/lib/aspose_cells_cloud/models/import_option.rb +225 -0
  104. data/lib/aspose_cells_cloud/models/import_string_array_option.rb +263 -0
  105. data/lib/aspose_cells_cloud/models/legend.rb +335 -0
  106. data/lib/aspose_cells_cloud/models/legend_response.rb +221 -0
  107. data/lib/aspose_cells_cloud/models/line.rb +360 -0
  108. data/lib/aspose_cells_cloud/models/line_format.rb +358 -0
  109. data/lib/aspose_cells_cloud/models/line_response.rb +221 -0
  110. data/lib/aspose_cells_cloud/models/link.rb +225 -0
  111. data/lib/aspose_cells_cloud/models/link_element.rb +198 -0
  112. data/lib/aspose_cells_cloud/models/list_column.rb +209 -0
  113. data/lib/aspose_cells_cloud/models/list_object.rb +350 -0
  114. data/lib/aspose_cells_cloud/models/list_object_operate_parameter.rb +207 -0
  115. data/lib/aspose_cells_cloud/models/list_object_response.rb +221 -0
  116. data/lib/aspose_cells_cloud/models/list_objects.rb +209 -0
  117. data/lib/aspose_cells_cloud/models/list_objects_response.rb +221 -0
  118. data/lib/aspose_cells_cloud/models/m_html_save_options.rb +373 -0
  119. data/lib/aspose_cells_cloud/models/markdown_save_options.rb +292 -0
  120. data/lib/aspose_cells_cloud/models/merged_cell.rb +254 -0
  121. data/lib/aspose_cells_cloud/models/merged_cell_response.rb +221 -0
  122. data/lib/aspose_cells_cloud/models/merged_cells.rb +223 -0
  123. data/lib/aspose_cells_cloud/models/merged_cells_response.rb +221 -0
  124. data/lib/aspose_cells_cloud/models/multiple_filter.rb +189 -0
  125. data/lib/aspose_cells_cloud/models/multiple_filters.rb +209 -0
  126. data/lib/aspose_cells_cloud/models/name.rb +276 -0
  127. data/lib/aspose_cells_cloud/models/name_response.rb +221 -0
  128. data/lib/aspose_cells_cloud/models/names.rb +223 -0
  129. data/lib/aspose_cells_cloud/models/names_response.rb +221 -0
  130. data/lib/aspose_cells_cloud/models/negative_bar_format.rb +229 -0
  131. data/lib/aspose_cells_cloud/models/object_exist.rb +219 -0
  132. data/lib/aspose_cells_cloud/models/ods_save_options.rb +265 -0
  133. data/lib/aspose_cells_cloud/models/ole_object.rb +567 -0
  134. data/lib/aspose_cells_cloud/models/ole_object_response.rb +221 -0
  135. data/lib/aspose_cells_cloud/models/ole_objects.rb +209 -0
  136. data/lib/aspose_cells_cloud/models/ole_objects_response.rb +221 -0
  137. data/lib/aspose_cells_cloud/models/ooxml_save_options.rb +274 -0
  138. data/lib/aspose_cells_cloud/models/operate_object.rb +207 -0
  139. data/lib/aspose_cells_cloud/models/operate_object_position.rb +243 -0
  140. data/lib/aspose_cells_cloud/models/operate_parameter.rb +198 -0
  141. data/lib/aspose_cells_cloud/models/page_break_operate_parameter.rb +252 -0
  142. data/lib/aspose_cells_cloud/models/page_section.rb +259 -0
  143. data/lib/aspose_cells_cloud/models/page_sections_response.rb +223 -0
  144. data/lib/aspose_cells_cloud/models/page_setup.rb +542 -0
  145. data/lib/aspose_cells_cloud/models/page_setup_operate_parameter.rb +207 -0
  146. data/lib/aspose_cells_cloud/models/page_setup_response.rb +221 -0
  147. data/lib/aspose_cells_cloud/models/password_request.rb +198 -0
  148. data/lib/aspose_cells_cloud/models/paste_options.rb +225 -0
  149. data/lib/aspose_cells_cloud/models/pattern_fill.rb +252 -0
  150. data/lib/aspose_cells_cloud/models/pdf_save_options.rb +355 -0
  151. data/lib/aspose_cells_cloud/models/pdf_security_options.rb +283 -0
  152. data/lib/aspose_cells_cloud/models/pic_format_option.rb +243 -0
  153. data/lib/aspose_cells_cloud/models/picture.rb +558 -0
  154. data/lib/aspose_cells_cloud/models/picture_response.rb +221 -0
  155. data/lib/aspose_cells_cloud/models/pictures.rb +209 -0
  156. data/lib/aspose_cells_cloud/models/pictures_response.rb +221 -0
  157. data/lib/aspose_cells_cloud/models/pivot_field.rb +546 -0
  158. data/lib/aspose_cells_cloud/models/pivot_field_response.rb +221 -0
  159. data/lib/aspose_cells_cloud/models/pivot_filter.rb +279 -0
  160. data/lib/aspose_cells_cloud/models/pivot_filter_response.rb +221 -0
  161. data/lib/aspose_cells_cloud/models/pivot_filters_response.rb +223 -0
  162. data/lib/aspose_cells_cloud/models/pivot_item.rb +228 -0
  163. data/lib/aspose_cells_cloud/models/pivot_table.rb +824 -0
  164. data/lib/aspose_cells_cloud/models/pivot_table_field_request.rb +200 -0
  165. data/lib/aspose_cells_cloud/models/pivot_table_operate_parameter.rb +276 -0
  166. data/lib/aspose_cells_cloud/models/pivot_table_response.rb +221 -0
  167. data/lib/aspose_cells_cloud/models/pivot_tables.rb +209 -0
  168. data/lib/aspose_cells_cloud/models/pivot_tables_response.rb +221 -0
  169. data/lib/aspose_cells_cloud/models/protect_sheet_parameter.rb +335 -0
  170. data/lib/aspose_cells_cloud/models/range.rb +309 -0
  171. data/lib/aspose_cells_cloud/models/range_copy_request.rb +225 -0
  172. data/lib/aspose_cells_cloud/models/range_set_outline_border_request.rb +225 -0
  173. data/lib/aspose_cells_cloud/models/range_set_style_request.rb +207 -0
  174. data/lib/aspose_cells_cloud/models/range_value_response.rb +223 -0
  175. data/lib/aspose_cells_cloud/models/ranges.rb +200 -0
  176. data/lib/aspose_cells_cloud/models/ranges_response.rb +221 -0
  177. data/lib/aspose_cells_cloud/models/result_destination.rb +216 -0
  178. data/lib/aspose_cells_cloud/models/row.rb +261 -0
  179. data/lib/aspose_cells_cloud/models/row_response.rb +221 -0
  180. data/lib/aspose_cells_cloud/models/rows.rb +237 -0
  181. data/lib/aspose_cells_cloud/models/rows_response.rb +221 -0
  182. data/lib/aspose_cells_cloud/models/save_options.rb +265 -0
  183. data/lib/aspose_cells_cloud/models/save_response.rb +221 -0
  184. data/lib/aspose_cells_cloud/models/save_result.rb +200 -0
  185. data/lib/aspose_cells_cloud/models/save_result_task_parameter.rb +207 -0
  186. data/lib/aspose_cells_cloud/models/shadow_effect.rb +252 -0
  187. data/lib/aspose_cells_cloud/models/shape.rb +504 -0
  188. data/lib/aspose_cells_cloud/models/shape_operate_parameter.rb +207 -0
  189. data/lib/aspose_cells_cloud/models/shape_response.rb +221 -0
  190. data/lib/aspose_cells_cloud/models/shapes.rb +209 -0
  191. data/lib/aspose_cells_cloud/models/shapes_response.rb +221 -0
  192. data/lib/aspose_cells_cloud/models/single_value.rb +207 -0
  193. data/lib/aspose_cells_cloud/models/single_value_response.rb +221 -0
  194. data/lib/aspose_cells_cloud/models/smart_marker_task_parameter.rb +216 -0
  195. data/lib/aspose_cells_cloud/models/solid_fill.rb +216 -0
  196. data/lib/aspose_cells_cloud/models/sort_key.rb +221 -0
  197. data/lib/aspose_cells_cloud/models/sparkline.rb +226 -0
  198. data/lib/aspose_cells_cloud/models/sparkline_group.rb +434 -0
  199. data/lib/aspose_cells_cloud/models/sparkline_group_response.rb +221 -0
  200. data/lib/aspose_cells_cloud/models/sparkline_groups.rb +200 -0
  201. data/lib/aspose_cells_cloud/models/sparkline_groups_response.rb +221 -0
  202. data/lib/aspose_cells_cloud/models/split_result.rb +200 -0
  203. data/lib/aspose_cells_cloud/models/split_result_document.rb +212 -0
  204. data/lib/aspose_cells_cloud/models/split_result_response.rb +222 -0
  205. data/lib/aspose_cells_cloud/models/split_workbook_task_parameter.rb +243 -0
  206. data/lib/aspose_cells_cloud/models/spreadsheet_ml2003_save_options.rb +292 -0
  207. data/lib/aspose_cells_cloud/models/storage_exist.rb +204 -0
  208. data/lib/aspose_cells_cloud/models/storage_file.rb +249 -0
  209. data/lib/aspose_cells_cloud/models/style.rb +407 -0
  210. data/lib/aspose_cells_cloud/models/style_response.rb +221 -0
  211. data/lib/aspose_cells_cloud/models/svg_save_options.rb +274 -0
  212. data/lib/aspose_cells_cloud/models/task_data.rb +200 -0
  213. data/lib/aspose_cells_cloud/models/task_description.rb +207 -0
  214. data/lib/aspose_cells_cloud/models/task_parameter.rb +189 -0
  215. data/lib/aspose_cells_cloud/models/text_item.rb +207 -0
  216. data/lib/aspose_cells_cloud/models/text_items.rb +209 -0
  217. data/lib/aspose_cells_cloud/models/text_items_response.rb +221 -0
  218. data/lib/aspose_cells_cloud/models/text_options.rb +333 -0
  219. data/lib/aspose_cells_cloud/models/text_water_marker_request.rb +239 -0
  220. data/lib/aspose_cells_cloud/models/texture_fill.rb +243 -0
  221. data/lib/aspose_cells_cloud/models/theme_color.rb +207 -0
  222. data/lib/aspose_cells_cloud/models/tile_pic_option.rb +263 -0
  223. data/lib/aspose_cells_cloud/models/title.rb +380 -0
  224. data/lib/aspose_cells_cloud/models/title_response.rb +221 -0
  225. data/lib/aspose_cells_cloud/models/top10.rb +219 -0
  226. data/lib/aspose_cells_cloud/models/top10_filter.rb +240 -0
  227. data/lib/aspose_cells_cloud/models/txt_save_options.rb +301 -0
  228. data/lib/aspose_cells_cloud/models/validation.rb +360 -0
  229. data/lib/aspose_cells_cloud/models/validation_response.rb +221 -0
  230. data/lib/aspose_cells_cloud/models/validations.rb +223 -0
  231. data/lib/aspose_cells_cloud/models/validations_response.rb +221 -0
  232. data/lib/aspose_cells_cloud/models/value_type.rb +189 -0
  233. data/lib/aspose_cells_cloud/models/vertical_page_break.rb +231 -0
  234. data/lib/aspose_cells_cloud/models/vertical_page_break_response.rb +221 -0
  235. data/lib/aspose_cells_cloud/models/vertical_page_breaks.rb +209 -0
  236. data/lib/aspose_cells_cloud/models/vertical_page_breaks_response.rb +221 -0
  237. data/lib/aspose_cells_cloud/models/workbook.rb +290 -0
  238. data/lib/aspose_cells_cloud/models/workbook_encryption_request.rb +224 -0
  239. data/lib/aspose_cells_cloud/models/workbook_operate_parameter.rb +198 -0
  240. data/lib/aspose_cells_cloud/models/workbook_protection_request.rb +209 -0
  241. data/lib/aspose_cells_cloud/models/workbook_replace_response.rb +235 -0
  242. data/lib/aspose_cells_cloud/models/workbook_response.rb +221 -0
  243. data/lib/aspose_cells_cloud/models/workbook_settings.rb +626 -0
  244. data/lib/aspose_cells_cloud/models/workbook_settings_operate_parameter.rb +207 -0
  245. data/lib/aspose_cells_cloud/models/workbook_settings_response.rb +221 -0
  246. data/lib/aspose_cells_cloud/models/worksheet.rb +510 -0
  247. data/lib/aspose_cells_cloud/models/worksheet_moving_request.rb +209 -0
  248. data/lib/aspose_cells_cloud/models/worksheet_replace_response.rb +235 -0
  249. data/lib/aspose_cells_cloud/models/worksheet_response.rb +221 -0
  250. data/lib/aspose_cells_cloud/models/worksheets.rb +209 -0
  251. data/lib/aspose_cells_cloud/models/worksheets_response.rb +221 -0
  252. data/lib/aspose_cells_cloud/models/xls_save_options.rb +265 -0
  253. data/lib/aspose_cells_cloud/models/xlsb_save_options.rb +265 -0
  254. data/lib/aspose_cells_cloud/models/xps_save_options.rb +265 -0
  255. data/lib/aspose_cells_cloud/version.rb +25 -0
  256. data/spec/api/cells_api_spec.rb +1145 -0
  257. data/spec/api/cells_auto_filter_api_spec.rb +430 -0
  258. data/spec/api/cells_chart_area_api_spec.rb +92 -0
  259. data/spec/api/cells_charts_api_spec.rb +390 -0
  260. data/spec/api/cells_conditional_formattings_api_spec.rb +259 -0
  261. data/spec/api/cells_hypelinks_api_spec.rb +170 -0
  262. data/spec/api/cells_list_objects_api_spec.rb +245 -0
  263. data/spec/api/cells_ole_objects_api_spec.rb +177 -0
  264. data/spec/api/cells_page_breaks_api_spec.rb +269 -0
  265. data/spec/api/cells_page_setup_api_spec.rb +198 -0
  266. data/spec/api/cells_pictures_api_spec.rb +174 -0
  267. data/spec/api/cells_pivot_tables_api_spec.rb +525 -0
  268. data/spec/api/cells_properties_api_spec.rb +129 -0
  269. data/spec/api/cells_ranges_api_spec.rb +284 -0
  270. data/spec/api/cells_save_as_api_spec.rb +74 -0
  271. data/spec/api/cells_shapes_api_spec.rb +174 -0
  272. data/spec/api/cells_simple_spec.rb +44 -0
  273. data/spec/api/cells_sparkline_group_spec.rb +43 -0
  274. data/spec/api/cells_storage_api_spec.rb +69 -0
  275. data/spec/api/cells_storage_spec.rb +45 -0
  276. data/spec/api/cells_task_api_spec.rb +61 -0
  277. data/spec/api/cells_workbook_api_spec.rb +641 -0
  278. data/spec/api/cells_worksheet_validations_api_spec.rb +139 -0
  279. data/spec/api/cells_worksheets_api_spec.rb +843 -0
  280. data/spec/spec_helper.rb +132 -0
  281. metadata +282 -3
@@ -0,0 +1,174 @@
1
+ require 'spec_helper'
2
+ require 'json'
3
+
4
+ # Unit tests for AsposeCellsCloud::CellsPicturesApi
5
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
6
+ # Please update as you see appropriate
7
+ describe 'CellsPicturesApi' do
8
+ before do
9
+ @instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
10
+ $VERBOSE = nil
11
+ end
12
+
13
+ after do
14
+ # run after each test
15
+ end
16
+
17
+
18
+
19
+ # unit tests for cells_pictures_get_worksheet_picture
20
+ # GRead worksheet picture by number.
21
+ #
22
+ # @param name Document name.
23
+ # @param sheet_name Worksheet name.
24
+ # @param picture_index The picture index.
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [String] :format The exported object format.
27
+ # @option opts [String] :folder The document folder.
28
+ # @option opts [String] :storage storage name.
29
+ # @return [File]
30
+ describe 'cells_pictures_get_worksheet_picture test' do
31
+ it "should work" do
32
+ name = $BOOK1
33
+ sheet_name = $SHEET6
34
+ picture_index = 0
35
+ format = 'PNG'
36
+ folder = $TEMPFOLDER
37
+ result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
38
+ expect(result.uploaded.size).to be > 0
39
+ result = @instance.cells_pictures_get_worksheet_picture(name, sheet_name, picture_index, {:format=>format, :folder=>folder})
40
+ # expect(result.code).to eql(200)
41
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
42
+ end
43
+ end
44
+
45
+ # unit tests for cells_pictures_get_worksheet_pictures
46
+ # Read worksheet pictures.
47
+ #
48
+ # @param name Document name.
49
+ # @param sheet_name The worksheet name.
50
+ # @param [Hash] opts the optional parameters
51
+ # @option opts [String] :folder Document's folder.
52
+ # @option opts [String] :storage storage name.
53
+ # @return [PicturesResponse]
54
+ describe 'cells_pictures_get_worksheet_pictures test' do
55
+ it "should work" do
56
+ name = $BOOK1
57
+ sheet_name = $SHEET6
58
+ folder = $TEMPFOLDER
59
+ result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
60
+ expect(result.uploaded.size).to be > 0
61
+ result = @instance.cells_pictures_get_worksheet_pictures(name, sheet_name, { :folder=>folder})
62
+ expect(result.code).to eql(200)
63
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
64
+ end
65
+ end
66
+
67
+ # unit tests for cells_pictures_post_worksheet_picture
68
+ # Update worksheet picture by index.
69
+ #
70
+ # @param name Document name.
71
+ # @param sheet_name Worksheet name.
72
+ # @param picture_index The picture's index.
73
+ # @param [Hash] opts the optional parameters
74
+ # @option opts [Picture] :picture Picture object
75
+ # @option opts [String] :folder The document folder.
76
+ # @option opts [String] :storage storage name.
77
+ # @return [PictureResponse]
78
+ describe 'cells_pictures_post_worksheet_picture test' do
79
+ it "should work" do
80
+ name = $BOOK1
81
+ sheet_name = $SHEET6
82
+ picture_index = 0
83
+ picture = AsposeCellsCloud::Picture.new(:AlternativeText=>'AlternativeText')
84
+ folder = $TEMPFOLDER
85
+ result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
86
+ expect(result.uploaded.size).to be > 0
87
+ result = @instance.cells_pictures_post_worksheet_picture(name, sheet_name, picture_index, {:picture=>picture, :folder=>folder})
88
+ expect(result.code).to eql(200)
89
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
90
+ end
91
+ end
92
+
93
+ # unit tests for cells_pictures_put_worksheet_add_picture
94
+ # Add a new worksheet picture.
95
+ #
96
+ # @param name The workbook name.
97
+ # @param sheet_name The worsheet name.
98
+ # @param [Hash] opts the optional parameters
99
+ # @option opts [Picture] :picture Pictute object
100
+ # @option opts [Integer] :upper_left_row The image upper left row.
101
+ # @option opts [Integer] :upper_left_column The image upper left column.
102
+ # @option opts [Integer] :lower_right_row The image low right row.
103
+ # @option opts [Integer] :lower_right_column The image low right column.
104
+ # @option opts [String] :picture_path The picture path, if not provided the picture data is inspected in the request body.
105
+ # @option opts [String] :folder The workbook folder.
106
+ # @option opts [String] :storage storage name.
107
+ # @return [PicturesResponse]
108
+ describe 'cells_pictures_put_worksheet_add_picture test' do
109
+ it "should work" do
110
+ name = $BOOK1
111
+ sheet_name = $SHEET6
112
+ picture = nil
113
+ upper_left_row = 1
114
+ upper_left_column = 1
115
+ lower_right_row = 10
116
+ lower_right_column = 10
117
+ picture_path = 'WaterMark.png'
118
+ folder = $TEMPFOLDER
119
+ result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
120
+ result = @instance.upload_file( folder+"/"+picture_path, ::File.open(File.expand_path("data/"+picture_path),"r") {|io| io.read(io.size) })
121
+ expect(result.uploaded.size).to be > 0
122
+ result = @instance.cells_pictures_put_worksheet_add_picture(name, sheet_name, {:picture=>picture, :upper_left_row=>upper_left_row, :upper_left_column=>upper_left_column, :lower_right_row=>lower_right_row, :lower_right_column=>lower_right_column, :picture_path=>(folder+"/"+picture_path), :folder=>folder})
123
+ expect(result.code).to eql(200)
124
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
125
+ end
126
+ end
127
+
128
+ # unit tests for cells_pictures_delete_worksheet_picture
129
+ # Delete a picture object in worksheet
130
+ #
131
+ # @param name The workbook name.
132
+ # @param sheet_name The worsheet name.
133
+ # @param picture_index Picture index
134
+ # @param [Hash] opts the optional parameters
135
+ # @option opts [String] :folder The workbook folder.
136
+ # @option opts [String] :storage storage name.
137
+ # @return [CellsCloudResponse]
138
+ describe 'cells_pictures_delete_worksheet_picture test' do
139
+ it "should work" do
140
+ name = $BOOK1
141
+ sheet_name = $SHEET6
142
+ picture_index = 0
143
+ folder = $TEMPFOLDER
144
+ result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
145
+ expect(result.uploaded.size).to be > 0
146
+ result = @instance.cells_pictures_delete_worksheet_picture(name, sheet_name, picture_index, { :folder=>folder})
147
+ expect(result.code).to eql(200)
148
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
149
+ end
150
+ end
151
+
152
+ # unit tests for cells_pictures_delete_worksheet_pictures
153
+ # Delete all pictures in worksheet.
154
+ #
155
+ # @param name Document name.
156
+ # @param sheet_name Worksheet name.
157
+ # @param [Hash] opts the optional parameters
158
+ # @option opts [String] :folder The document folder.
159
+ # @option opts [String] :storage storage name.
160
+ # @return [CellsCloudResponse]
161
+ describe 'cells_pictures_delete_worksheet_pictures test' do
162
+ it "should work" do
163
+ name = $BOOK1
164
+ sheet_name = $SHEET6
165
+ folder = $TEMPFOLDER
166
+ result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
167
+ expect(result.uploaded.size).to be > 0
168
+ result = @instance.cells_pictures_delete_worksheet_pictures(name, sheet_name, { :folder=>folder})
169
+ expect(result.code).to eql(200)
170
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
171
+ end
172
+ end
173
+
174
+ end
@@ -0,0 +1,525 @@
1
+
2
+ require 'spec_helper'
3
+ require 'json'
4
+
5
+ # Unit tests for AsposeCellsCloud::CellsPivotTablesApi
6
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
7
+ # Please update as you see appropriate
8
+ describe 'CellsPivotTablesApi' do
9
+ before do
10
+ @instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
11
+ $VERBOSE = nil
12
+ end
13
+
14
+ after do
15
+ # run after each test
16
+ end
17
+
18
+
19
+ # unit tests for cells_pivot_tables_get_pivot_table_field
20
+ # Get pivot field into into pivot table
21
+ #
22
+ # @param name Document name.
23
+ # @param sheet_name The worksheet name.
24
+ # @param pivot_table_index Pivot table index
25
+ # @param pivot_field_index The field index in the base fields.
26
+ # @param pivot_field_type The fields area type.
27
+ # @param [Hash] opts the optional parameters
28
+ # @option opts [String] :folder Document's folder.
29
+ # @option opts [String] :storage storage name.
30
+ # @return [PivotFieldResponse]
31
+ describe 'cells_pivot_tables_get_pivot_table_field test' do
32
+ it "should work" do
33
+ name = $PivTestFile
34
+ sheet_name = $SHEET4
35
+ pivot_table_index = 0
36
+ pivot_field_index = 0
37
+ pivot_field_type = 'row'
38
+ folder = $TEMPFOLDER
39
+ result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
40
+ expect(result.uploaded.size).to be > 0
41
+ result = @instance.cells_pivot_tables_get_pivot_table_field(name, sheet_name, pivot_table_index, pivot_field_index, pivot_field_type, { :folder=>folder})
42
+ expect(result.code).to eql(200)
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ # unit tests for cells_pivot_tables_get_worksheet_pivot_table
48
+ # Get worksheet pivottable info by index.
49
+ #
50
+ # @param name Document name.
51
+ # @param sheet_name The worksheet name.
52
+ # @param pivottable_index
53
+ # @param [Hash] opts the optional parameters
54
+ # @option opts [String] :folder Document's folder.
55
+ # @option opts [String] :storage storage name.
56
+ # @return [PivotTableResponse]
57
+ describe 'cells_pivot_tables_get_worksheet_pivot_table test' do
58
+ it "should work" do
59
+ name = $PivTestFile
60
+ sheet_name = $SHEET4
61
+ pivottable_index = 0
62
+ folder = $TEMPFOLDER
63
+ result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
64
+ expect(result.uploaded.size).to be > 0
65
+ result = @instance.cells_pivot_tables_get_worksheet_pivot_table(name, sheet_name, pivottable_index, { :folder=>folder})
66
+ expect(result.code).to eql(200)
67
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
68
+ end
69
+ end
70
+
71
+ # unit tests for cells_pivot_tables_get_worksheet_pivot_table_filters
72
+ #
73
+ #
74
+ # @param name
75
+ # @param sheet_name
76
+ # @param pivot_table_index
77
+ # @param [Hash] opts the optional parameters
78
+ # @option opts [String] :folder
79
+ # @option opts [String] :storage storage name.
80
+ # @return [PivotFiltersResponse]
81
+ describe 'cells_pivot_tables_get_worksheet_pivot_table_filters test' do
82
+ it "should work" do
83
+ name = $PivTestFile
84
+ sheet_name = $SHEET4
85
+ pivot_table_index = 0
86
+ folder = $TEMPFOLDER
87
+ result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
88
+ expect(result.uploaded.size).to be > 0
89
+ result = @instance.cells_pivot_tables_get_worksheet_pivot_table_filters(name, sheet_name, pivot_table_index, { :folder=>folder})
90
+ expect(result.code).to eql(200)
91
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
92
+ end
93
+ end
94
+
95
+ # unit tests for cells_pivot_tables_get_worksheet_pivot_tables
96
+ # Get worksheet pivottables info.
97
+ #
98
+ # @param name Document name.
99
+ # @param sheet_name The worksheet name.
100
+ # @param [Hash] opts the optional parameters
101
+ # @option opts [String] :folder Document's folder.
102
+ # @option opts [String] :storage storage name.
103
+ # @return [PivotTablesResponse]
104
+ describe 'cells_pivot_tables_get_worksheet_pivot_tables test' do
105
+ it "should work" do
106
+ name = $PivTestFile
107
+ sheet_name = $SHEET4
108
+ folder = $TEMPFOLDER
109
+ result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
110
+ expect(result.uploaded.size).to be > 0
111
+ result = @instance.cells_pivot_tables_get_worksheet_pivot_tables(name, sheet_name, { :folder=>folder})
112
+ expect(result.code).to eql(200)
113
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
114
+ end
115
+ end
116
+
117
+ # unit tests for cells_pivot_tables_post_pivot_table_cell_style
118
+ # Update cell style for pivot table
119
+ #
120
+ # @param name Document name.
121
+ # @param sheet_name The worksheet name.
122
+ # @param pivot_table_index Pivot table index
123
+ # @param column
124
+ # @param row
125
+ # @param [Hash] opts the optional parameters
126
+ # @option opts [Style] :style Style dto in request body.
127
+ # @option opts [BOOLEAN] :need_re_calculate
128
+ # @option opts [String] :folder Document's folder.
129
+ # @option opts [String] :storage storage name.
130
+ # @return [CellsCloudResponse]
131
+ describe 'cells_pivot_tables_post_pivot_table_cell_style test' do
132
+ it "should work" do
133
+ name = $PivTestFile
134
+ sheet_name = $SHEET4
135
+ pivot_table_index = 0
136
+ column = 1
137
+ row = 1
138
+ style = AsposeCellsCloud::Style.new({:Custom=>'p'})
139
+ need_re_calculate = true
140
+ folder = $TEMPFOLDER
141
+ result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
142
+ expect(result.uploaded.size).to be > 0
143
+ result = @instance.cells_pivot_tables_post_pivot_table_cell_style(name, sheet_name, pivot_table_index, column, row, {:style=>style, :need_re_calculate=>need_re_calculate, :folder=>folder})
144
+ expect(result.code).to eql(200)
145
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
146
+ end
147
+ end
148
+
149
+ # unit tests for cells_pivot_tables_post_pivot_table_field_hide_item
150
+ #
151
+ #
152
+ # @param name
153
+ # @param sheet_name
154
+ # @param pivot_table_index
155
+ # @param pivot_field_type
156
+ # @param field_index
157
+ # @param item_index
158
+ # @param is_hide
159
+ # @param [Hash] opts the optional parameters
160
+ # @option opts [BOOLEAN] :need_re_calculate
161
+ # @option opts [String] :folder
162
+ # @option opts [String] :storage storage name.
163
+ # @return [CellsCloudResponse]
164
+ describe 'cells_pivot_tables_post_pivot_table_field_hide_item test' do
165
+ it "should work" do
166
+ name = $PivTestFile
167
+ sheet_name = $SHEET4
168
+ pivot_table_index = 0
169
+ pivot_field_type = 'Row'
170
+ field_index = 0
171
+ item_index = 1
172
+ is_hide = true
173
+ need_re_calculate = true
174
+ folder = $TEMPFOLDER
175
+ result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
176
+ expect(result.uploaded.size).to be > 0
177
+ result = @instance.cells_pivot_tables_post_pivot_table_field_hide_item(name, sheet_name, pivot_table_index, pivot_field_type, field_index, item_index, is_hide, { :need_re_calculate=>need_re_calculate,:folder=>folder})
178
+ expect(result.code).to eql(200)
179
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
180
+ end
181
+ end
182
+
183
+ # unit tests for cells_pivot_tables_post_pivot_table_field_move_to
184
+ #
185
+ #
186
+ # @param name
187
+ # @param sheet_name
188
+ # @param pivot_table_index
189
+ # @param field_index
190
+ # @param from
191
+ # @param to
192
+ # @param [Hash] opts the optional parameters
193
+ # @option opts [String] :folder
194
+ # @option opts [String] :storage storage name.
195
+ # @return [CellsCloudResponse]
196
+ describe 'cells_pivot_tables_post_pivot_table_field_move_to test' do
197
+ it "should work" do
198
+ name = $PivTestFile
199
+ sheet_name = $SHEET4
200
+ pivot_table_index = 0
201
+ field_index = 0
202
+ from = 'Row'
203
+ to = 'Column'
204
+ folder = $TEMPFOLDER
205
+ result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
206
+ expect(result.uploaded.size).to be > 0
207
+ result = @instance.cells_pivot_tables_post_pivot_table_field_move_to(name, sheet_name, pivot_table_index, field_index, from, to, { :folder=>folder})
208
+ expect(result.code).to eql(200)
209
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
210
+ end
211
+ end
212
+
213
+ describe 'cells_pivot_tables_post_pivot_table_update_pivot_fields test' do
214
+ it "should work" do
215
+ name = $PivTestFile
216
+ sheet_name = $SHEET4
217
+ pivot_table_index = 0
218
+ field_index = 0
219
+ folder = $TEMPFOLDER
220
+ result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
221
+ expect(result.uploaded.size).to be > 0
222
+ pivot_field = AsposeCellsCloud::PivotField.new({:Number=>5})
223
+ result = @instance.cells_pivot_tables_post_pivot_table_update_pivot_fields(name, sheet_name, pivot_table_index, "Data",pivot_field , { :folder=>folder})
224
+ expect(result.code).to eql(200)
225
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
226
+ end
227
+ end
228
+
229
+ describe 'cells_pivot_tables_post_pivot_table_update_pivot_field test' do
230
+ it "should work" do
231
+ name = $PivTestFile
232
+ sheet_name = $SHEET4
233
+ pivot_table_index = 0
234
+ field_index = 0
235
+ folder = $TEMPFOLDER
236
+ result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
237
+ expect(result.uploaded.size).to be > 0
238
+ pivot_field = AsposeCellsCloud::PivotField.new({:Number=>5})
239
+ result = @instance.cells_pivot_tables_post_pivot_table_update_pivot_field(name, sheet_name, pivot_table_index,0, "Data",pivot_field , { :folder=>folder})
240
+ expect(result.code).to eql(200)
241
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
242
+ end
243
+ end
244
+ # unit tests for cells_pivot_tables_post_pivot_table_style
245
+ # Update style for pivot table
246
+ #
247
+ # @param name Document name.
248
+ # @param sheet_name The worksheet name.
249
+ # @param pivot_table_index Pivot table index
250
+ # @param [Hash] opts the optional parameters
251
+ # @option opts [Style] :style Style dto in request body.
252
+ # @option opts [BOOLEAN] :need_re_calculate
253
+ # @option opts [String] :folder Document's folder.
254
+ # @option opts [String] :storage storage name.
255
+ # @return [CellsCloudResponse]
256
+ describe 'cells_pivot_tables_post_pivot_table_style test' do
257
+ it "should work" do
258
+ name = $PivTestFile
259
+ sheet_name = $SHEET4
260
+ pivot_table_index = 0
261
+ style = AsposeCellsCloud::Style.new({:Custom=>'p'})
262
+ need_re_calculate = true
263
+ folder = $TEMPFOLDER
264
+ result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
265
+ expect(result.uploaded.size).to be > 0
266
+ result = @instance.cells_pivot_tables_post_pivot_table_style(name, sheet_name, pivot_table_index, { :style=>style, :need_re_calculate=>need_re_calculate,:folder=>folder})
267
+ expect(result.code).to eql(200)
268
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
269
+ end
270
+ end
271
+
272
+ # unit tests for cells_pivot_tables_post_worksheet_pivot_table_calculate
273
+ # Calculates pivottable's data to cells.
274
+ #
275
+ # @param name Document name.
276
+ # @param sheet_name The worksheet name.
277
+ # @param pivot_table_index Pivot table index
278
+ # @param [Hash] opts the optional parameters
279
+ # @option opts [String] :folder Document's folder.
280
+ # @option opts [String] :storage storage name.
281
+ # @return [CellsCloudResponse]
282
+ describe 'cells_pivot_tables_post_worksheet_pivot_table_calculate test' do
283
+ it "should work" do
284
+ name = $PivTestFile
285
+ sheet_name = $SHEET4
286
+ pivot_table_index = 0
287
+ folder = $TEMPFOLDER
288
+ result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
289
+ expect(result.uploaded.size).to be > 0
290
+ result = @instance.cells_pivot_tables_post_worksheet_pivot_table_calculate(name, sheet_name, pivot_table_index, { :folder=>folder})
291
+ expect(result.code).to eql(200)
292
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
293
+ end
294
+ end
295
+
296
+ # unit tests for cells_pivot_tables_post_worksheet_pivot_table_move
297
+ #
298
+ #
299
+ # @param name
300
+ # @param sheet_name
301
+ # @param pivot_table_index
302
+ # @param [Hash] opts the optional parameters
303
+ # @option opts [Integer] :row
304
+ # @option opts [Integer] :column
305
+ # @option opts [String] :dest_cell_name
306
+ # @option opts [String] :folder
307
+ # @option opts [String] :storage storage name.
308
+ # @return [CellsCloudResponse]
309
+ describe 'cells_pivot_tables_post_worksheet_pivot_table_move test' do
310
+ it "should work" do
311
+ name = $PivTestFile
312
+ sheet_name = $SHEET4
313
+ pivot_table_index = 0
314
+ row = 1
315
+ column = 1
316
+ dest_cell_name = 'C10'
317
+ folder = $TEMPFOLDER
318
+ result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
319
+ expect(result.uploaded.size).to be > 0
320
+ result = @instance.cells_pivot_tables_post_worksheet_pivot_table_move(name, sheet_name, pivot_table_index, { :row=>row, :column=>column, :dest_cell_name=>dest_cell_name, :folder=>folder})
321
+ expect(result.code).to eql(200)
322
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
323
+ end
324
+ end
325
+
326
+ # unit tests for cells_pivot_tables_put_pivot_table_field
327
+ # Add pivot field into into pivot table
328
+ #
329
+ # @param name Document name.
330
+ # @param sheet_name The worksheet name.
331
+ # @param pivot_table_index Pivot table index
332
+ # @param pivot_field_type The fields area type.
333
+ # @param [Hash] opts the optional parameters
334
+ # @option opts [PivotTableFieldRequest] :request Dto that conrains field indexes
335
+ # @option opts [BOOLEAN] :need_re_calculate
336
+ # @option opts [String] :folder Document's folder.
337
+ # @option opts [String] :storage storage name.
338
+ # @return [CellsCloudResponse]
339
+ describe 'cells_pivot_tables_put_pivot_table_field test' do
340
+ it "should work" do
341
+ name = $PivTestFile
342
+ sheet_name = $SHEET4
343
+ pivot_table_index = 0
344
+ pivot_field_type = 'Row'
345
+ request = AsposeCellsCloud::PivotTableFieldRequest.new({:Data=>[1]})
346
+ need_re_calculate = nil
347
+ folder = $TEMPFOLDER
348
+ result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
349
+ expect(result.uploaded.size).to be > 0
350
+ result = @instance.cells_pivot_tables_put_pivot_table_field(name, sheet_name, pivot_table_index, pivot_field_type, {:request=>request, :need_re_calculate=>need_re_calculate, :folder=>folder})
351
+ expect(result.code).to eql(200)
352
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
353
+ end
354
+ end
355
+
356
+ # unit tests for cells_pivot_tables_put_worksheet_pivot_table
357
+ # Add a pivot table into worksheet.
358
+ #
359
+ # @param name Document name.
360
+ # @param sheet_name The worksheet name.
361
+ # @param [Hash] opts the optional parameters
362
+ # @option opts [CreatePivotTableRequest] :request CreatePivotTableRequest dto in request body.
363
+ # @option opts [String] :folder Document's folder.
364
+ # @option opts [String] :storage storage name.
365
+ # @option opts [String] :source_data The data for the new PivotTable cache.
366
+ # @option opts [String] :dest_cell_name The cell in the upper-left corner of the PivotTable report's destination range.
367
+ # @option opts [String] :table_name The name of the new PivotTable report.
368
+ # @option opts [BOOLEAN] :use_same_source Indicates whether using same data source when another existing pivot table has used this data source. If the property is true, it will save memory.
369
+ # @return [PivotTableResponse]
370
+ describe 'cells_pivot_tables_put_worksheet_pivot_table test' do
371
+ it "should work" do
372
+ name = $PivTestFile
373
+ sheet_name = $SHEET4
374
+ request = AsposeCellsCloud::CreatePivotTableRequest.new({:Name=>'TestPivot',:DestCellName=>'C1',:SourceData =>'Sheet1!C6:E13',:UseSameSource=>true})
375
+ folder = $TEMPFOLDER
376
+ result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
377
+ expect(result.uploaded.size).to be > 0
378
+ source_data = 'Sheet1!C6:E13'
379
+ dest_cell_name = 'C1'
380
+ table_name = 'TestPivot'
381
+ use_same_source = true
382
+ result = @instance.cells_pivot_tables_put_worksheet_pivot_table(name, sheet_name, { :folder=>folder, :source_data=>source_data, :dest_cell_name=>dest_cell_name, :table_name=>table_name, :use_same_source=>use_same_source})
383
+ expect(result.code).to eql(200)
384
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
385
+ end
386
+ end
387
+
388
+ # unit tests for cells_pivot_tables_put_worksheet_pivot_table_filter
389
+ # Add pivot filter for piovt table index
390
+ #
391
+ # @param name
392
+ # @param sheet_name
393
+ # @param pivot_table_index
394
+ # @param [Hash] opts the optional parameters
395
+ # @option opts [PivotFilter] :filter
396
+ # @option opts [BOOLEAN] :need_re_calculate
397
+ # @option opts [String] :folder
398
+ # @option opts [String] :storage storage name.
399
+ # @return [CellsCloudResponse]
400
+ describe 'cells_pivot_tables_put_worksheet_pivot_table_filter and cells_pivot_tables_get_worksheet_pivot_table_filter test' do
401
+ it "should work" do
402
+ name = $PivTestFile
403
+ sheet_name = $SHEET4
404
+ pivot_table_index = 0
405
+ top10Filter = AsposeCellsCloud::Top10Filter.new({:Items=>1 ,:IsTop=>true,:IsPercent=>false})
406
+ filterColumn = AsposeCellsCloud::FilterColumn.new({:FilterType=>'Top10',:FieldIndex=>0,:Top10Filter=>top10Filter})
407
+ autoFilter = AsposeCellsCloud::AutoFilter.new({:FilterColumns=>[filterColumn]})
408
+ filter = AsposeCellsCloud::PivotFilter.new({:FieldIndex=>1,:FilterType=>'Count',:AutoFilter=>autoFilter})
409
+ need_re_calculate = true
410
+ folder = $TEMPFOLDER
411
+ filter_index =0
412
+ field_index=0
413
+ result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
414
+ expect(result.uploaded.size).to be > 0
415
+ result = @instance.cells_pivot_tables_put_worksheet_pivot_table_filter(name, sheet_name, pivot_table_index, { :filter=>filter, :need_re_calculate=>need_re_calculate, :folder=>folder})
416
+ expect(result.code).to eql(200)
417
+ result = @instance.cells_pivot_tables_get_worksheet_pivot_table_filter(name, sheet_name, pivot_table_index, filter_index, { :folder=>folder})
418
+ expect(result.code).to eql(200)
419
+ result = @instance.cells_pivot_tables_delete_worksheet_pivot_table_filter(name, sheet_name, pivot_table_index, field_index, {:need_re_calculate=>need_re_calculate, :folder=>folder})
420
+ expect(result.code).to eql(200)
421
+ end
422
+ end
423
+
424
+ # unit tests for cells_pivot_tables_delete_pivot_table_field
425
+ # Delete pivot field into into pivot table
426
+ #
427
+ # @param name Document name.
428
+ # @param sheet_name The worksheet name.
429
+ # @param pivot_table_index Pivot table index
430
+ # @param pivot_field_type The fields area type.
431
+ # @param [Hash] opts the optional parameters
432
+ # @option opts [PivotTableFieldRequest] :request Dto that conrains field indexes
433
+ # @option opts [String] :folder Document's folder.
434
+ # @option opts [String] :storage storage name.
435
+ # @return [CellsCloudResponse]
436
+ describe 'cells_pivot_tables_delete_pivot_table_field test' do
437
+ it "should work" do
438
+ name = $PivTestFile
439
+ sheet_name = $SHEET4
440
+ pivot_table_index = 0
441
+ pivot_field_type = 'Row'
442
+ request = AsposeCellsCloud::PivotTableFieldRequest.new({:Data=>[1]})
443
+ folder = $TEMPFOLDER
444
+ result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
445
+ expect(result.uploaded.size).to be > 0
446
+ result = @instance.cells_pivot_tables_delete_pivot_table_field(name, sheet_name, pivot_table_index, pivot_field_type, { :request=>request,:folder=>folder})
447
+ expect(result.code).to eql(200)
448
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
449
+ end
450
+ end
451
+
452
+ # unit tests for cells_pivot_tables_delete_worksheet_pivot_table
453
+ # Delete worksheet pivot table by index
454
+ #
455
+ # @param name Document name.
456
+ # @param sheet_name The worksheet name.
457
+ # @param pivot_table_index Pivot table index
458
+ # @param [Hash] opts the optional parameters
459
+ # @option opts [String] :folder Document's folder.
460
+ # @option opts [String] :storage storage name.
461
+ # @return [CellsCloudResponse]
462
+ describe 'cells_pivot_tables_delete_worksheet_pivot_table test' do
463
+ it "should work" do
464
+ name = $PivTestFile
465
+ sheet_name = $SHEET4
466
+ pivot_table_index = 0
467
+ folder = $TEMPFOLDER
468
+ result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
469
+ expect(result.uploaded.size).to be > 0
470
+ result = @instance.cells_pivot_tables_delete_worksheet_pivot_table(name, sheet_name, pivot_table_index, { :folder=>folder})
471
+ expect(result.code).to eql(200)
472
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
473
+ end
474
+ end
475
+
476
+
477
+ # unit tests for cells_pivot_tables_delete_worksheet_pivot_table_filters
478
+ # delete all pivot filters for piovt table
479
+ #
480
+ # @param name
481
+ # @param sheet_name
482
+ # @param pivot_table_index
483
+ # @param [Hash] opts the optional parameters
484
+ # @option opts [BOOLEAN] :need_re_calculate
485
+ # @option opts [String] :folder
486
+ # @option opts [String] :storage storage name.
487
+ # @return [CellsCloudResponse]
488
+ describe 'cells_pivot_tables_delete_worksheet_pivot_table_filters test' do
489
+ it "should work" do
490
+ name = $PivTestFile
491
+ sheet_name = $SHEET4
492
+ pivot_table_index = 0
493
+ need_re_calculate = true
494
+ folder = $TEMPFOLDER
495
+ result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
496
+ expect(result.uploaded.size).to be > 0
497
+ result = @instance.cells_pivot_tables_delete_worksheet_pivot_table_filters(name, sheet_name, pivot_table_index, {:need_re_calculate=>need_re_calculate, :folder=>folder})
498
+ expect(result.code).to eql(200)
499
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
500
+ end
501
+ end
502
+
503
+ # unit tests for cells_pivot_tables_delete_worksheet_pivot_tables
504
+ # Delete worksheet pivot tables
505
+ #
506
+ # @param name Document name.
507
+ # @param sheet_name The worksheet name.
508
+ # @param [Hash] opts the optional parameters
509
+ # @option opts [String] :folder Document's folder.
510
+ # @option opts [String] :storage storage name.
511
+ # @return [CellsCloudResponse]
512
+ describe 'cells_pivot_tables_delete_worksheet_pivot_tables test' do
513
+ it "should work" do
514
+ name = $PivTestFile
515
+ sheet_name = $SHEET4
516
+ folder = $TEMPFOLDER
517
+ result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
518
+ expect(result.uploaded.size).to be > 0
519
+ result = @instance.cells_pivot_tables_delete_worksheet_pivot_tables(name, sheet_name, { :folder=>folder})
520
+ expect(result.code).to eql(200)
521
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
522
+ end
523
+ end
524
+
525
+ end