aspose_slides_cloud 23.6.0 → 23.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b1c1e1af4c71458529a07f4fc9b6fae823eff361ec3ffb0a154d11f43a0419a6
4
- data.tar.gz: 489f10d97840be220bf096e246747fce4e2a080a28b21c1c1b370d2095f07ef9
3
+ metadata.gz: b2f0e7c91523f8b7f2bc27e74d7635f76133d738ab3903809c32626ed9acf7c3
4
+ data.tar.gz: e11651c0270c55bbb7872908ef4795bad88db76489159f14b32f2e0318fcfc6f
5
5
  SHA512:
6
- metadata.gz: 622ceaec28bf5d62289105e0f9b2d55d4d411f6e3bfd4f2dfc42f446865b955e309166ab5c11f602ddb5f2891adbdd133aee07de752a89582afc512d978306f4
7
- data.tar.gz: 0eb8c52acc3e8300c3507bdecf939adcbdf7d292c55d1fc0fb123eb678eb267ae7a47c5672b33688dedfccc524f1a3fb78002862e65942e177195865252a9668
6
+ metadata.gz: faef55cb3e345d6d9f99e61f4d9e1adf8063b3e6eb1ee5f097b3934271310f032222ab935ad13751b7f19fb61c7b7e718c5ee938b6d8bfa471ee9c9011245908
7
+ data.tar.gz: 445d2f78ca1212c9cc35bdd95608a4d48488eebb27e241d848d31297ceadc14cb41ba1163d9e2a25077d89a5d7514bd9b1b707e948dca957690fb393e433ef86
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- aspose_slides_cloud (23.6.0)
4
+ aspose_slides_cloud (23.7.0)
5
5
  faraday (~> 1.0, >= 1.0.0)
6
6
  faraday-httpclient (~> 1.0, >= 1.0.0)
7
7
  httpclient (~> 2.2, >= 2.2.0)
@@ -50,7 +50,7 @@ GEM
50
50
  httpclient (2.8.3)
51
51
  json (2.6.3)
52
52
  multipart-post (2.3.0)
53
- public_suffix (5.0.1)
53
+ public_suffix (5.0.3)
54
54
  rake (12.3.3)
55
55
  rexml (3.2.5)
56
56
  rspec (3.12.0)
@@ -62,7 +62,7 @@ GEM
62
62
  rspec-expectations (3.12.3)
63
63
  diff-lcs (>= 1.2.0, < 2.0)
64
64
  rspec-support (~> 3.12.0)
65
- rspec-mocks (3.12.5)
65
+ rspec-mocks (3.12.6)
66
66
  diff-lcs (>= 1.2.0, < 2.0)
67
67
  rspec-support (~> 3.12.0)
68
68
  rspec-support (3.12.1)
data/README.md CHANGED
@@ -27,6 +27,12 @@ You may want to check out Aspose free [Powerpoint to PDF](https://products.aspos
27
27
  **Web:** HTML/HTML5
28
28
  **Other:** MPEG4, SWF (export whole presentations)
29
29
 
30
+ ## Enhancements in Version 23.7
31
+
32
+ * New methods **ReplaceTextFormatting** and **ReplaceTextFormatting** allow to replace text with formatting.
33
+ * Added **AfterAnimationType**, **Rewind** and **AfterAnimationColor** methods to **Effect** class.
34
+ * Added **TrimFromStart** and **TrimFromEnd** methods to **VideoFrame** class.
35
+
30
36
  ## Enhancements in Version 23.6
31
37
 
32
38
  * Added methods ho handle VBA methods: **GetVbaProject**, **GetVbaModule**, **CreateVbaModule**, **UpdateVbaModule** and **DeleteVbaModule**. Added model classes related to VBA: **VbaProject**, **VbaModule** and **VbaReference**.
@@ -14668,6 +14668,154 @@ module AsposeSlidesCloud
14668
14668
  :return_type => 'File')
14669
14669
  return data, status_code, headers
14670
14670
  end
14671
+ # Finds and replaces text in presentation with given format.
14672
+ # @param name Document name.
14673
+ # @param old_value Text value to be replaced.
14674
+ # @param new_value Text value to replace with.
14675
+ # @param portion_format Portion format.
14676
+ # @param with_masters Text replacement includes master slides.
14677
+ # @param password Document password.
14678
+ # @param folder Document folder.
14679
+ # @param storage Document storage.
14680
+ def replace_text_formatting(name, old_value, new_value, portion_format = nil, with_masters = nil, password = nil, folder = nil, storage = nil)
14681
+ data, _status_code, _headers = replace_text_formatting_with_http_info(name, old_value, new_value, portion_format, with_masters, password, folder, storage)
14682
+ data
14683
+ end
14684
+
14685
+ # Finds and replaces text in presentation with given format.
14686
+ # @param name Document name.
14687
+ # @param old_value Text value to be replaced.
14688
+ # @param new_value Text value to replace with.
14689
+ # @param portion_format Portion format.
14690
+ # @param with_masters Text replacement includes master slides.
14691
+ # @param password Document password.
14692
+ # @param folder Document folder.
14693
+ # @param storage Document storage.
14694
+ def replace_text_formatting_with_http_info(name, old_value, new_value, portion_format = nil, with_masters = nil, password = nil, folder = nil, storage = nil)
14695
+ if @api_client.config.debugging
14696
+ @api_client.config.logger.debug 'Calling API: SlidesApi.replace_text_formatting ...'
14697
+ end
14698
+
14699
+ # verify the required parameter 'name' is set
14700
+ if @api_client.config.client_side_validation && name.nil?
14701
+ fail ArgumentError, "Missing the required parameter 'name' when calling SlidesApi.replace_text_formatting"
14702
+ end
14703
+ # verify the required parameter 'old_value' is set
14704
+ if @api_client.config.client_side_validation && old_value.nil?
14705
+ fail ArgumentError, "Missing the required parameter 'old_value' when calling SlidesApi.replace_text_formatting"
14706
+ end
14707
+ # verify the required parameter 'new_value' is set
14708
+ if @api_client.config.client_side_validation && new_value.nil?
14709
+ fail ArgumentError, "Missing the required parameter 'new_value' when calling SlidesApi.replace_text_formatting"
14710
+ end
14711
+ # resource path
14712
+ local_var_path = '/slides/{name}/replaceTextFormatting'
14713
+ local_var_path = @api_client.replace_path_parameter(local_var_path, 'name', name)
14714
+
14715
+ # query parameters
14716
+ query_params = {}
14717
+ query_params[:'oldValue'] = @api_client.prepare_for_query(old_value) unless old_value.nil?
14718
+ query_params[:'newValue'] = @api_client.prepare_for_query(new_value) unless new_value.nil?
14719
+ query_params[:'withMasters'] = @api_client.prepare_for_query(with_masters) unless with_masters.nil?
14720
+ query_params[:'folder'] = @api_client.prepare_for_query(folder) unless folder.nil?
14721
+ query_params[:'storage'] = @api_client.prepare_for_query(storage) unless storage.nil?
14722
+
14723
+ # header parameters
14724
+ header_params = {}
14725
+ # HTTP header 'Accept' (if needed)
14726
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
14727
+ # HTTP header 'Content-Type'
14728
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
14729
+ header_params[:'password'] = password unless password.nil?
14730
+
14731
+ # http body (model)
14732
+ post_body = @api_client.object_to_http_body(portion_format)
14733
+
14734
+ # form parameters
14735
+ post_files = []
14736
+
14737
+ auth_names = ['JWT']
14738
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
14739
+ :header_params => header_params,
14740
+ :query_params => query_params,
14741
+ :body => post_body,
14742
+ :files => post_files,
14743
+ :auth_names => auth_names,
14744
+ :return_type => 'Document')
14745
+ return data, status_code, headers
14746
+ end
14747
+ # Finds and replaces text in presentation with given format.
14748
+ # @param document Document data.
14749
+ # @param old_value Text value to be replaced.
14750
+ # @param new_value Text value to replace with.
14751
+ # @param portion_format Portion format.
14752
+ # @param with_masters Text replacement includes master slides.
14753
+ # @param password Document password.
14754
+ def replace_text_formatting_online(document, old_value, new_value, portion_format = nil, with_masters = nil, password = nil)
14755
+ data, _status_code, _headers = replace_text_formatting_online_with_http_info(document, old_value, new_value, portion_format, with_masters, password)
14756
+ data
14757
+ end
14758
+
14759
+ # Finds and replaces text in presentation with given format.
14760
+ # @param document Document data.
14761
+ # @param old_value Text value to be replaced.
14762
+ # @param new_value Text value to replace with.
14763
+ # @param portion_format Portion format.
14764
+ # @param with_masters Text replacement includes master slides.
14765
+ # @param password Document password.
14766
+ def replace_text_formatting_online_with_http_info(document, old_value, new_value, portion_format = nil, with_masters = nil, password = nil)
14767
+ if @api_client.config.debugging
14768
+ @api_client.config.logger.debug 'Calling API: SlidesApi.replace_text_formatting_online ...'
14769
+ end
14770
+
14771
+ # verify the required parameter 'document' is set
14772
+ if @api_client.config.client_side_validation && document.nil?
14773
+ fail ArgumentError, "Missing the required parameter 'document' when calling SlidesApi.replace_text_formatting_online"
14774
+ end
14775
+ # verify the required parameter 'old_value' is set
14776
+ if @api_client.config.client_side_validation && old_value.nil?
14777
+ fail ArgumentError, "Missing the required parameter 'old_value' when calling SlidesApi.replace_text_formatting_online"
14778
+ end
14779
+ # verify the required parameter 'new_value' is set
14780
+ if @api_client.config.client_side_validation && new_value.nil?
14781
+ fail ArgumentError, "Missing the required parameter 'new_value' when calling SlidesApi.replace_text_formatting_online"
14782
+ end
14783
+ # resource path
14784
+ local_var_path = '/slides/replaceTextFormatting'
14785
+
14786
+ # query parameters
14787
+ query_params = {}
14788
+ query_params[:'oldValue'] = @api_client.prepare_for_query(old_value) unless old_value.nil?
14789
+ query_params[:'newValue'] = @api_client.prepare_for_query(new_value) unless new_value.nil?
14790
+ query_params[:'withMasters'] = @api_client.prepare_for_query(with_masters) unless with_masters.nil?
14791
+
14792
+ # header parameters
14793
+ header_params = {}
14794
+ # HTTP header 'Accept' (if needed)
14795
+ header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data'])
14796
+ # HTTP header 'Content-Type'
14797
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
14798
+ header_params[:'password'] = password unless password.nil?
14799
+
14800
+ # http body (model)
14801
+ post_body = @api_client.object_to_http_body(portion_format)
14802
+
14803
+ # form parameters
14804
+ post_files = []
14805
+ if document
14806
+ post_files = post_files.push(document)
14807
+ end
14808
+
14809
+ auth_names = ['JWT']
14810
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
14811
+ :header_params => header_params,
14812
+ :query_params => query_params,
14813
+ :body => post_body,
14814
+ :files => post_files,
14815
+ :auth_names => auth_names,
14816
+ :return_type => 'File')
14817
+ return data, status_code, headers
14818
+ end
14671
14819
  # Convert Mathematical Text to MathML Format and saves result to the storage
14672
14820
  # @param name Document name.
14673
14821
  # @param slide_index Slide index.
@@ -19270,7 +19418,7 @@ module AsposeSlidesCloud
19270
19418
  # @param password Document password.
19271
19419
  # @param folder Document folder.
19272
19420
  # @param storage Document storage.
19273
- def update_vba_module(name, module_index, module_dto = nil, password = nil, folder = nil, storage = nil)
19421
+ def update_vba_module(name, module_index, module_dto, password = nil, folder = nil, storage = nil)
19274
19422
  data, _status_code, _headers = update_vba_module_with_http_info(name, module_index, module_dto, password, folder, storage)
19275
19423
  data
19276
19424
  end
@@ -19282,7 +19430,7 @@ module AsposeSlidesCloud
19282
19430
  # @param password Document password.
19283
19431
  # @param folder Document folder.
19284
19432
  # @param storage Document storage.
19285
- def update_vba_module_with_http_info(name, module_index, module_dto = nil, password = nil, folder = nil, storage = nil)
19433
+ def update_vba_module_with_http_info(name, module_index, module_dto, password = nil, folder = nil, storage = nil)
19286
19434
  if @api_client.config.debugging
19287
19435
  @api_client.config.logger.debug 'Calling API: SlidesApi.update_vba_module ...'
19288
19436
  end
@@ -19295,6 +19443,10 @@ module AsposeSlidesCloud
19295
19443
  if @api_client.config.client_side_validation && module_index.nil?
19296
19444
  fail ArgumentError, "Missing the required parameter 'module_index' when calling SlidesApi.update_vba_module"
19297
19445
  end
19446
+ # verify the required parameter 'module_dto' is set
19447
+ if @api_client.config.client_side_validation && module_dto.nil?
19448
+ fail ArgumentError, "Missing the required parameter 'module_dto' when calling SlidesApi.update_vba_module"
19449
+ end
19298
19450
  # resource path
19299
19451
  local_var_path = '/slides/{name}/vbaProject/modules/{moduleIndex}'
19300
19452
  local_var_path = @api_client.replace_path_parameter(local_var_path, 'name', name)
@@ -79,6 +79,15 @@ module AsposeSlidesCloud
79
79
  # This attribute specifies if the animation effect stops the previous sound.
80
80
  attr_accessor :stop_previous_sound
81
81
 
82
+ # This attribute specifies if the effect will rewind when done playing.
83
+ attr_accessor :rewind
84
+
85
+ # Defined an after animation color for effect.
86
+ attr_accessor :after_animation_type
87
+
88
+ # Defined an after animation color for effect. Applied when the AfterAnimationType property is set to Color.
89
+ attr_accessor :after_animation_color
90
+
82
91
  # Attribute mapping from ruby-style variable name to JSON key.
83
92
  def self.attribute_map
84
93
  {
@@ -100,6 +109,9 @@ module AsposeSlidesCloud
100
109
  :'repeat_until_end_slide' => :'RepeatUntilEndSlide',
101
110
  :'repeat_until_next_click' => :'RepeatUntilNextClick',
102
111
  :'stop_previous_sound' => :'StopPreviousSound',
112
+ :'rewind' => :'Rewind',
113
+ :'after_animation_type' => :'AfterAnimationType',
114
+ :'after_animation_color' => :'AfterAnimationColor',
103
115
  }
104
116
  end
105
117
 
@@ -124,6 +136,9 @@ module AsposeSlidesCloud
124
136
  :'repeat_until_end_slide' => :'BOOLEAN',
125
137
  :'repeat_until_next_click' => :'BOOLEAN',
126
138
  :'stop_previous_sound' => :'BOOLEAN',
139
+ :'rewind' => :'BOOLEAN',
140
+ :'after_animation_type' => :'String',
141
+ :'after_animation_color' => :'String',
127
142
  }
128
143
  end
129
144
 
@@ -206,6 +221,18 @@ module AsposeSlidesCloud
206
221
  if attributes.has_key?(:'StopPreviousSound')
207
222
  self.stop_previous_sound = attributes[:'StopPreviousSound']
208
223
  end
224
+
225
+ if attributes.has_key?(:'Rewind')
226
+ self.rewind = attributes[:'Rewind']
227
+ end
228
+
229
+ if attributes.has_key?(:'AfterAnimationType')
230
+ self.after_animation_type = attributes[:'AfterAnimationType']
231
+ end
232
+
233
+ if attributes.has_key?(:'AfterAnimationColor')
234
+ self.after_animation_color = attributes[:'AfterAnimationColor']
235
+ end
209
236
  end
210
237
 
211
238
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -233,6 +260,8 @@ module AsposeSlidesCloud
233
260
  return false unless trigger_type_validator.valid?(@trigger_type)
234
261
  restart_validator = EnumAttributeValidator.new('String', ['Always', 'WhenNotActive', 'Never', 'NotDefined'])
235
262
  return false unless restart_validator.valid?(@restart)
263
+ after_animation_type_validator = EnumAttributeValidator.new('String', ['DoNotDim', 'Color', 'HideAfterAnimation', 'HideOnNextMouseClick'])
264
+ return false unless after_animation_type_validator.valid?(@after_animation_type)
236
265
  true
237
266
  end
238
267
 
@@ -286,6 +315,16 @@ module AsposeSlidesCloud
286
315
  @restart = restart
287
316
  end
288
317
 
318
+ # Custom attribute writer method checking allowed values (enum).
319
+ # @param [Object] after_animation_type Object to be assigned
320
+ def after_animation_type=(after_animation_type)
321
+ validator = EnumAttributeValidator.new('String', ['DoNotDim', 'Color', 'HideAfterAnimation', 'HideOnNextMouseClick'])
322
+ unless validator.valid?(after_animation_type)
323
+ fail ArgumentError, 'invalid value for "after_animation_type", must be one of #{validator.allowable_values}.'
324
+ end
325
+ @after_animation_type = after_animation_type
326
+ end
327
+
289
328
  # Checks equality by comparing each attribute.
290
329
  # @param [Object] Object to be compared
291
330
  def ==(o)
@@ -308,7 +347,10 @@ module AsposeSlidesCloud
308
347
  trigger_delay_time == o.trigger_delay_time &&
309
348
  repeat_until_end_slide == o.repeat_until_end_slide &&
310
349
  repeat_until_next_click == o.repeat_until_next_click &&
311
- stop_previous_sound == o.stop_previous_sound
350
+ stop_previous_sound == o.stop_previous_sound &&
351
+ rewind == o.rewind &&
352
+ after_animation_type == o.after_animation_type &&
353
+ after_animation_color == o.after_animation_color
312
354
  end
313
355
 
314
356
  # @see the `==` method
@@ -320,7 +362,7 @@ module AsposeSlidesCloud
320
362
  # Calculates hash code according to all attributes.
321
363
  # @return [Fixnum] Hash code
322
364
  def hash
323
- [type, subtype, preset_class_type, shape_index, paragraph_index, trigger_type, accelerate, auto_reverse, decelerate, duration, repeat_count, repeat_duration, restart, speed, trigger_delay_time, repeat_until_end_slide, repeat_until_next_click, stop_previous_sound].hash
365
+ [type, subtype, preset_class_type, shape_index, paragraph_index, trigger_type, accelerate, auto_reverse, decelerate, duration, repeat_count, repeat_duration, restart, speed, trigger_delay_time, repeat_until_end_slide, repeat_until_next_click, stop_previous_sound, rewind, after_animation_type, after_animation_color].hash
324
366
  end
325
367
  end
326
368
  end
@@ -49,6 +49,12 @@ module AsposeSlidesCloud
49
49
  # Picture fill format.
50
50
  attr_accessor :picture_fill_format
51
51
 
52
+ # Trim start [ms]
53
+ attr_accessor :trim_from_start
54
+
55
+ # Trim end [ms]
56
+ attr_accessor :trim_from_end
57
+
52
58
  # Attribute mapping from ruby-style variable name to JSON key.
53
59
  def self.attribute_map
54
60
  super.merge({
@@ -60,6 +66,8 @@ module AsposeSlidesCloud
60
66
  :'volume' => :'Volume',
61
67
  :'base64_data' => :'Base64Data',
62
68
  :'picture_fill_format' => :'PictureFillFormat',
69
+ :'trim_from_start' => :'TrimFromStart',
70
+ :'trim_from_end' => :'TrimFromEnd',
63
71
  })
64
72
  end
65
73
 
@@ -74,6 +82,8 @@ module AsposeSlidesCloud
74
82
  :'volume' => :'String',
75
83
  :'base64_data' => :'String',
76
84
  :'picture_fill_format' => :'PictureFill',
85
+ :'trim_from_start' => :'Float',
86
+ :'trim_from_end' => :'Float',
77
87
  })
78
88
  end
79
89
 
@@ -113,6 +123,14 @@ module AsposeSlidesCloud
113
123
  if attributes.has_key?(:'PictureFillFormat')
114
124
  self.picture_fill_format = attributes[:'PictureFillFormat']
115
125
  end
126
+
127
+ if attributes.has_key?(:'TrimFromStart')
128
+ self.trim_from_start = attributes[:'TrimFromStart']
129
+ end
130
+
131
+ if attributes.has_key?(:'TrimFromEnd')
132
+ self.trim_from_end = attributes[:'TrimFromEnd']
133
+ end
116
134
  self.type = 'VideoFrame'
117
135
  end
118
136
 
@@ -185,7 +203,9 @@ module AsposeSlidesCloud
185
203
  rewind_video == o.rewind_video &&
186
204
  volume == o.volume &&
187
205
  base64_data == o.base64_data &&
188
- picture_fill_format == o.picture_fill_format
206
+ picture_fill_format == o.picture_fill_format &&
207
+ trim_from_start == o.trim_from_start &&
208
+ trim_from_end == o.trim_from_end
189
209
  end
190
210
 
191
211
  # @see the `==` method
@@ -197,7 +217,7 @@ module AsposeSlidesCloud
197
217
  # Calculates hash code according to all attributes.
198
218
  # @return [Fixnum] Hash code
199
219
  def hash
200
- [self_uri, alternate_links, name, width, height, alternative_text, alternative_text_title, hidden, x, y, z_order_position, fill_format, effect_format, three_d_format, line_format, hyperlink_click, hyperlink_mouse_over, type, shape_type, full_screen_mode, hide_at_showing, play_loop_mode, play_mode, rewind_video, volume, base64_data, picture_fill_format].hash
220
+ [self_uri, alternate_links, name, width, height, alternative_text, alternative_text_title, hidden, x, y, z_order_position, fill_format, effect_format, three_d_format, line_format, hyperlink_click, hyperlink_mouse_over, type, shape_type, full_screen_mode, hide_at_showing, play_loop_mode, play_mode, rewind_video, volume, base64_data, picture_fill_format, trim_from_start, trim_from_end].hash
201
221
  end
202
222
  end
203
223
  end
@@ -21,5 +21,5 @@ SOFTWARE.
21
21
  =end
22
22
 
23
23
  module AsposeSlidesCloud
24
- VERSION = '23.6.0'
24
+ VERSION = '23.7.0'
25
25
  end
@@ -38744,6 +38744,427 @@ describe 'SlidesApi' do
38744
38744
  end
38745
38745
  end
38746
38746
 
38747
+ # unit tests for replace_text_formatting
38748
+ # Finds and replaces text in presentation with given format.
38749
+ # @param name Document name.
38750
+ # @param old_value Text value to be replaced.
38751
+ # @param new_value Text value to replace with.
38752
+ # @param [Hash] opts the optional parameters
38753
+ # @option opts [PortionFormat] :portion_format Portion format.
38754
+ # @option opts [BOOLEAN] :with_masters Text replacement includes master slides.
38755
+ # @option opts [String] :password Document password.
38756
+ # @option opts [String] :folder Document folder.
38757
+ # @option opts [String] :storage Document storage.
38758
+ # @return [Document]
38759
+ describe 'replace_text_formatting test' do
38760
+ it 'should work' do
38761
+ paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'ReplaceTextFormatting', 'String')
38762
+ paramold_value = AsposeSlidesCloud::SpecUtils.get_param_value('oldValue', 'ReplaceTextFormatting', 'String')
38763
+ paramnew_value = AsposeSlidesCloud::SpecUtils.get_param_value('newValue', 'ReplaceTextFormatting', 'String')
38764
+ paramportion_format = AsposeSlidesCloud::SpecUtils.get_param_value('portionFormat', 'ReplaceTextFormatting', 'PortionFormat')
38765
+ paramwith_masters = AsposeSlidesCloud::SpecUtils.get_param_value('withMasters', 'ReplaceTextFormatting', 'BOOLEAN')
38766
+ parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceTextFormatting', 'String')
38767
+ paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'ReplaceTextFormatting', 'String')
38768
+ paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'ReplaceTextFormatting', 'String')
38769
+ AsposeSlidesCloud::SpecUtils.initialize('ReplaceTextFormatting', nil, nil)
38770
+ o, c, _h = AsposeSlidesCloud::SpecUtils.api.replace_text_formatting_with_http_info(paramname, paramold_value, paramnew_value, paramportion_format, paramwith_masters, parampassword, paramfolder, paramstorage)
38771
+ code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormatting', nil, nil, nil)
38772
+ expect(c).to eq(code)
38773
+ expect(o).not_to be_nil
38774
+ end
38775
+
38776
+ it 'invalid name' do
38777
+ paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'ReplaceTextFormatting', 'String')
38778
+ paramold_value = AsposeSlidesCloud::SpecUtils.get_param_value('oldValue', 'ReplaceTextFormatting', 'String')
38779
+ paramnew_value = AsposeSlidesCloud::SpecUtils.get_param_value('newValue', 'ReplaceTextFormatting', 'String')
38780
+ paramportion_format = AsposeSlidesCloud::SpecUtils.get_param_value('portionFormat', 'ReplaceTextFormatting', 'PortionFormat')
38781
+ paramwith_masters = AsposeSlidesCloud::SpecUtils.get_param_value('withMasters', 'ReplaceTextFormatting', 'BOOLEAN')
38782
+ parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceTextFormatting', 'String')
38783
+ paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'ReplaceTextFormatting', 'String')
38784
+ paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'ReplaceTextFormatting', 'String')
38785
+ paramname = AsposeSlidesCloud::SpecUtils.invalidize_param_value('name', 'ReplaceTextFormatting', paramname, 'String')
38786
+ AsposeSlidesCloud::SpecUtils.initialize('ReplaceTextFormatting', 'name', paramname)
38787
+ begin
38788
+ AsposeSlidesCloud::SpecUtils.api.replace_text_formatting_with_http_info(paramname, paramold_value, paramnew_value, paramportion_format, paramwith_masters, parampassword, paramfolder, paramstorage)
38789
+ unless AsposeSlidesCloud::SpecUtils.no_exception?('ReplaceTextFormatting', 'name')
38790
+ fail "An exception expected"
38791
+ end
38792
+ rescue AsposeSlidesCloud::ApiError => e
38793
+ code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormatting', 'name', paramname, 'String')
38794
+ expect(e.code).to eq(code)
38795
+ expect(e.response_body).to include(message)
38796
+ rescue ArgumentError => e
38797
+ code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormatting', 'name', paramname, 'String')
38798
+ expect(400).to eq(code)
38799
+ expect(e.message).to include(message)
38800
+ end
38801
+ end
38802
+
38803
+ it 'invalid old_value' do
38804
+ paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'ReplaceTextFormatting', 'String')
38805
+ paramold_value = AsposeSlidesCloud::SpecUtils.get_param_value('oldValue', 'ReplaceTextFormatting', 'String')
38806
+ paramnew_value = AsposeSlidesCloud::SpecUtils.get_param_value('newValue', 'ReplaceTextFormatting', 'String')
38807
+ paramportion_format = AsposeSlidesCloud::SpecUtils.get_param_value('portionFormat', 'ReplaceTextFormatting', 'PortionFormat')
38808
+ paramwith_masters = AsposeSlidesCloud::SpecUtils.get_param_value('withMasters', 'ReplaceTextFormatting', 'BOOLEAN')
38809
+ parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceTextFormatting', 'String')
38810
+ paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'ReplaceTextFormatting', 'String')
38811
+ paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'ReplaceTextFormatting', 'String')
38812
+ paramold_value = AsposeSlidesCloud::SpecUtils.invalidize_param_value('oldValue', 'ReplaceTextFormatting', paramold_value, 'String')
38813
+ AsposeSlidesCloud::SpecUtils.initialize('ReplaceTextFormatting', 'oldValue', paramold_value)
38814
+ begin
38815
+ AsposeSlidesCloud::SpecUtils.api.replace_text_formatting_with_http_info(paramname, paramold_value, paramnew_value, paramportion_format, paramwith_masters, parampassword, paramfolder, paramstorage)
38816
+ unless AsposeSlidesCloud::SpecUtils.no_exception?('ReplaceTextFormatting', 'oldValue')
38817
+ fail "An exception expected"
38818
+ end
38819
+ rescue AsposeSlidesCloud::ApiError => e
38820
+ code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormatting', 'oldValue', paramold_value, 'String')
38821
+ expect(e.code).to eq(code)
38822
+ expect(e.response_body).to include(message)
38823
+ rescue ArgumentError => e
38824
+ code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormatting', 'oldValue', paramold_value, 'String')
38825
+ expect(400).to eq(code)
38826
+ expect(e.message).to include(message)
38827
+ end
38828
+ end
38829
+
38830
+ it 'invalid new_value' do
38831
+ paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'ReplaceTextFormatting', 'String')
38832
+ paramold_value = AsposeSlidesCloud::SpecUtils.get_param_value('oldValue', 'ReplaceTextFormatting', 'String')
38833
+ paramnew_value = AsposeSlidesCloud::SpecUtils.get_param_value('newValue', 'ReplaceTextFormatting', 'String')
38834
+ paramportion_format = AsposeSlidesCloud::SpecUtils.get_param_value('portionFormat', 'ReplaceTextFormatting', 'PortionFormat')
38835
+ paramwith_masters = AsposeSlidesCloud::SpecUtils.get_param_value('withMasters', 'ReplaceTextFormatting', 'BOOLEAN')
38836
+ parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceTextFormatting', 'String')
38837
+ paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'ReplaceTextFormatting', 'String')
38838
+ paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'ReplaceTextFormatting', 'String')
38839
+ paramnew_value = AsposeSlidesCloud::SpecUtils.invalidize_param_value('newValue', 'ReplaceTextFormatting', paramnew_value, 'String')
38840
+ AsposeSlidesCloud::SpecUtils.initialize('ReplaceTextFormatting', 'newValue', paramnew_value)
38841
+ begin
38842
+ AsposeSlidesCloud::SpecUtils.api.replace_text_formatting_with_http_info(paramname, paramold_value, paramnew_value, paramportion_format, paramwith_masters, parampassword, paramfolder, paramstorage)
38843
+ unless AsposeSlidesCloud::SpecUtils.no_exception?('ReplaceTextFormatting', 'newValue')
38844
+ fail "An exception expected"
38845
+ end
38846
+ rescue AsposeSlidesCloud::ApiError => e
38847
+ code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormatting', 'newValue', paramnew_value, 'String')
38848
+ expect(e.code).to eq(code)
38849
+ expect(e.response_body).to include(message)
38850
+ rescue ArgumentError => e
38851
+ code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormatting', 'newValue', paramnew_value, 'String')
38852
+ expect(400).to eq(code)
38853
+ expect(e.message).to include(message)
38854
+ end
38855
+ end
38856
+
38857
+ it 'invalid portion_format' do
38858
+ paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'ReplaceTextFormatting', 'String')
38859
+ paramold_value = AsposeSlidesCloud::SpecUtils.get_param_value('oldValue', 'ReplaceTextFormatting', 'String')
38860
+ paramnew_value = AsposeSlidesCloud::SpecUtils.get_param_value('newValue', 'ReplaceTextFormatting', 'String')
38861
+ paramportion_format = AsposeSlidesCloud::SpecUtils.get_param_value('portionFormat', 'ReplaceTextFormatting', 'PortionFormat')
38862
+ paramwith_masters = AsposeSlidesCloud::SpecUtils.get_param_value('withMasters', 'ReplaceTextFormatting', 'BOOLEAN')
38863
+ parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceTextFormatting', 'String')
38864
+ paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'ReplaceTextFormatting', 'String')
38865
+ paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'ReplaceTextFormatting', 'String')
38866
+ paramportion_format = AsposeSlidesCloud::SpecUtils.invalidize_param_value('portionFormat', 'ReplaceTextFormatting', paramportion_format, 'PortionFormat')
38867
+ AsposeSlidesCloud::SpecUtils.initialize('ReplaceTextFormatting', 'portionFormat', paramportion_format)
38868
+ begin
38869
+ AsposeSlidesCloud::SpecUtils.api.replace_text_formatting_with_http_info(paramname, paramold_value, paramnew_value, paramportion_format, paramwith_masters, parampassword, paramfolder, paramstorage)
38870
+ unless AsposeSlidesCloud::SpecUtils.no_exception?('ReplaceTextFormatting', 'portionFormat')
38871
+ fail "An exception expected"
38872
+ end
38873
+ rescue AsposeSlidesCloud::ApiError => e
38874
+ code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormatting', 'portionFormat', paramportion_format, 'PortionFormat')
38875
+ expect(e.code).to eq(code)
38876
+ expect(e.response_body).to include(message)
38877
+ rescue ArgumentError => e
38878
+ code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormatting', 'portionFormat', paramportion_format, 'PortionFormat')
38879
+ expect(400).to eq(code)
38880
+ expect(e.message).to include(message)
38881
+ end
38882
+ end
38883
+
38884
+ it 'invalid with_masters' do
38885
+ paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'ReplaceTextFormatting', 'String')
38886
+ paramold_value = AsposeSlidesCloud::SpecUtils.get_param_value('oldValue', 'ReplaceTextFormatting', 'String')
38887
+ paramnew_value = AsposeSlidesCloud::SpecUtils.get_param_value('newValue', 'ReplaceTextFormatting', 'String')
38888
+ paramportion_format = AsposeSlidesCloud::SpecUtils.get_param_value('portionFormat', 'ReplaceTextFormatting', 'PortionFormat')
38889
+ paramwith_masters = AsposeSlidesCloud::SpecUtils.get_param_value('withMasters', 'ReplaceTextFormatting', 'BOOLEAN')
38890
+ parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceTextFormatting', 'String')
38891
+ paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'ReplaceTextFormatting', 'String')
38892
+ paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'ReplaceTextFormatting', 'String')
38893
+ paramwith_masters = AsposeSlidesCloud::SpecUtils.invalidize_param_value('withMasters', 'ReplaceTextFormatting', paramwith_masters, 'BOOLEAN')
38894
+ AsposeSlidesCloud::SpecUtils.initialize('ReplaceTextFormatting', 'withMasters', paramwith_masters)
38895
+ begin
38896
+ AsposeSlidesCloud::SpecUtils.api.replace_text_formatting_with_http_info(paramname, paramold_value, paramnew_value, paramportion_format, paramwith_masters, parampassword, paramfolder, paramstorage)
38897
+ unless AsposeSlidesCloud::SpecUtils.no_exception?('ReplaceTextFormatting', 'withMasters')
38898
+ fail "An exception expected"
38899
+ end
38900
+ rescue AsposeSlidesCloud::ApiError => e
38901
+ code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormatting', 'withMasters', paramwith_masters, 'BOOLEAN')
38902
+ expect(e.code).to eq(code)
38903
+ expect(e.response_body).to include(message)
38904
+ rescue ArgumentError => e
38905
+ code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormatting', 'withMasters', paramwith_masters, 'BOOLEAN')
38906
+ expect(400).to eq(code)
38907
+ expect(e.message).to include(message)
38908
+ end
38909
+ end
38910
+
38911
+ it 'invalid password' do
38912
+ paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'ReplaceTextFormatting', 'String')
38913
+ paramold_value = AsposeSlidesCloud::SpecUtils.get_param_value('oldValue', 'ReplaceTextFormatting', 'String')
38914
+ paramnew_value = AsposeSlidesCloud::SpecUtils.get_param_value('newValue', 'ReplaceTextFormatting', 'String')
38915
+ paramportion_format = AsposeSlidesCloud::SpecUtils.get_param_value('portionFormat', 'ReplaceTextFormatting', 'PortionFormat')
38916
+ paramwith_masters = AsposeSlidesCloud::SpecUtils.get_param_value('withMasters', 'ReplaceTextFormatting', 'BOOLEAN')
38917
+ parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceTextFormatting', 'String')
38918
+ paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'ReplaceTextFormatting', 'String')
38919
+ paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'ReplaceTextFormatting', 'String')
38920
+ parampassword = AsposeSlidesCloud::SpecUtils.invalidize_param_value('password', 'ReplaceTextFormatting', parampassword, 'String')
38921
+ AsposeSlidesCloud::SpecUtils.initialize('ReplaceTextFormatting', 'password', parampassword)
38922
+ begin
38923
+ AsposeSlidesCloud::SpecUtils.api.replace_text_formatting_with_http_info(paramname, paramold_value, paramnew_value, paramportion_format, paramwith_masters, parampassword, paramfolder, paramstorage)
38924
+ unless AsposeSlidesCloud::SpecUtils.no_exception?('ReplaceTextFormatting', 'password')
38925
+ fail "An exception expected"
38926
+ end
38927
+ rescue AsposeSlidesCloud::ApiError => e
38928
+ code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormatting', 'password', parampassword, 'String')
38929
+ expect(e.code).to eq(code)
38930
+ expect(e.response_body).to include(message)
38931
+ rescue ArgumentError => e
38932
+ code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormatting', 'password', parampassword, 'String')
38933
+ expect(400).to eq(code)
38934
+ expect(e.message).to include(message)
38935
+ end
38936
+ end
38937
+
38938
+ it 'invalid folder' do
38939
+ paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'ReplaceTextFormatting', 'String')
38940
+ paramold_value = AsposeSlidesCloud::SpecUtils.get_param_value('oldValue', 'ReplaceTextFormatting', 'String')
38941
+ paramnew_value = AsposeSlidesCloud::SpecUtils.get_param_value('newValue', 'ReplaceTextFormatting', 'String')
38942
+ paramportion_format = AsposeSlidesCloud::SpecUtils.get_param_value('portionFormat', 'ReplaceTextFormatting', 'PortionFormat')
38943
+ paramwith_masters = AsposeSlidesCloud::SpecUtils.get_param_value('withMasters', 'ReplaceTextFormatting', 'BOOLEAN')
38944
+ parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceTextFormatting', 'String')
38945
+ paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'ReplaceTextFormatting', 'String')
38946
+ paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'ReplaceTextFormatting', 'String')
38947
+ paramfolder = AsposeSlidesCloud::SpecUtils.invalidize_param_value('folder', 'ReplaceTextFormatting', paramfolder, 'String')
38948
+ AsposeSlidesCloud::SpecUtils.initialize('ReplaceTextFormatting', 'folder', paramfolder)
38949
+ begin
38950
+ AsposeSlidesCloud::SpecUtils.api.replace_text_formatting_with_http_info(paramname, paramold_value, paramnew_value, paramportion_format, paramwith_masters, parampassword, paramfolder, paramstorage)
38951
+ unless AsposeSlidesCloud::SpecUtils.no_exception?('ReplaceTextFormatting', 'folder')
38952
+ fail "An exception expected"
38953
+ end
38954
+ rescue AsposeSlidesCloud::ApiError => e
38955
+ code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormatting', 'folder', paramfolder, 'String')
38956
+ expect(e.code).to eq(code)
38957
+ expect(e.response_body).to include(message)
38958
+ rescue ArgumentError => e
38959
+ code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormatting', 'folder', paramfolder, 'String')
38960
+ expect(400).to eq(code)
38961
+ expect(e.message).to include(message)
38962
+ end
38963
+ end
38964
+
38965
+ it 'invalid storage' do
38966
+ paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'ReplaceTextFormatting', 'String')
38967
+ paramold_value = AsposeSlidesCloud::SpecUtils.get_param_value('oldValue', 'ReplaceTextFormatting', 'String')
38968
+ paramnew_value = AsposeSlidesCloud::SpecUtils.get_param_value('newValue', 'ReplaceTextFormatting', 'String')
38969
+ paramportion_format = AsposeSlidesCloud::SpecUtils.get_param_value('portionFormat', 'ReplaceTextFormatting', 'PortionFormat')
38970
+ paramwith_masters = AsposeSlidesCloud::SpecUtils.get_param_value('withMasters', 'ReplaceTextFormatting', 'BOOLEAN')
38971
+ parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceTextFormatting', 'String')
38972
+ paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'ReplaceTextFormatting', 'String')
38973
+ paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'ReplaceTextFormatting', 'String')
38974
+ paramstorage = AsposeSlidesCloud::SpecUtils.invalidize_param_value('storage', 'ReplaceTextFormatting', paramstorage, 'String')
38975
+ AsposeSlidesCloud::SpecUtils.initialize('ReplaceTextFormatting', 'storage', paramstorage)
38976
+ begin
38977
+ AsposeSlidesCloud::SpecUtils.api.replace_text_formatting_with_http_info(paramname, paramold_value, paramnew_value, paramportion_format, paramwith_masters, parampassword, paramfolder, paramstorage)
38978
+ unless AsposeSlidesCloud::SpecUtils.no_exception?('ReplaceTextFormatting', 'storage')
38979
+ fail "An exception expected"
38980
+ end
38981
+ rescue AsposeSlidesCloud::ApiError => e
38982
+ code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormatting', 'storage', paramstorage, 'String')
38983
+ expect(e.code).to eq(code)
38984
+ expect(e.response_body).to include(message)
38985
+ rescue ArgumentError => e
38986
+ code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormatting', 'storage', paramstorage, 'String')
38987
+ expect(400).to eq(code)
38988
+ expect(e.message).to include(message)
38989
+ end
38990
+ end
38991
+ end
38992
+
38993
+ # unit tests for replace_text_formatting_online
38994
+ # Finds and replaces text in presentation with given format.
38995
+ # @param document Document data.
38996
+ # @param old_value Text value to be replaced.
38997
+ # @param new_value Text value to replace with.
38998
+ # @param [Hash] opts the optional parameters
38999
+ # @option opts [PortionFormat] :portion_format Portion format.
39000
+ # @option opts [BOOLEAN] :with_masters Text replacement includes master slides.
39001
+ # @option opts [String] :password Document password.
39002
+ # @return [File]
39003
+ describe 'replace_text_formatting_online test' do
39004
+ it 'should work' do
39005
+ paramdocument = AsposeSlidesCloud::SpecUtils.get_param_value('document', 'ReplaceTextFormattingOnline', 'File')
39006
+ paramold_value = AsposeSlidesCloud::SpecUtils.get_param_value('oldValue', 'ReplaceTextFormattingOnline', 'String')
39007
+ paramnew_value = AsposeSlidesCloud::SpecUtils.get_param_value('newValue', 'ReplaceTextFormattingOnline', 'String')
39008
+ paramportion_format = AsposeSlidesCloud::SpecUtils.get_param_value('portionFormat', 'ReplaceTextFormattingOnline', 'PortionFormat')
39009
+ paramwith_masters = AsposeSlidesCloud::SpecUtils.get_param_value('withMasters', 'ReplaceTextFormattingOnline', 'BOOLEAN')
39010
+ parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceTextFormattingOnline', 'String')
39011
+ AsposeSlidesCloud::SpecUtils.initialize('ReplaceTextFormattingOnline', nil, nil)
39012
+ o, c, _h = AsposeSlidesCloud::SpecUtils.api.replace_text_formatting_online_with_http_info(paramdocument, paramold_value, paramnew_value, paramportion_format, paramwith_masters, parampassword)
39013
+ code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormattingOnline', nil, nil, nil)
39014
+ expect(c).to eq(code)
39015
+ end
39016
+
39017
+ it 'invalid document' do
39018
+ paramdocument = AsposeSlidesCloud::SpecUtils.get_param_value('document', 'ReplaceTextFormattingOnline', 'File')
39019
+ paramold_value = AsposeSlidesCloud::SpecUtils.get_param_value('oldValue', 'ReplaceTextFormattingOnline', 'String')
39020
+ paramnew_value = AsposeSlidesCloud::SpecUtils.get_param_value('newValue', 'ReplaceTextFormattingOnline', 'String')
39021
+ paramportion_format = AsposeSlidesCloud::SpecUtils.get_param_value('portionFormat', 'ReplaceTextFormattingOnline', 'PortionFormat')
39022
+ paramwith_masters = AsposeSlidesCloud::SpecUtils.get_param_value('withMasters', 'ReplaceTextFormattingOnline', 'BOOLEAN')
39023
+ parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceTextFormattingOnline', 'String')
39024
+ paramdocument = AsposeSlidesCloud::SpecUtils.invalidize_param_value('document', 'ReplaceTextFormattingOnline', paramdocument, 'File')
39025
+ AsposeSlidesCloud::SpecUtils.initialize('ReplaceTextFormattingOnline', 'document', paramdocument)
39026
+ begin
39027
+ AsposeSlidesCloud::SpecUtils.api.replace_text_formatting_online_with_http_info(paramdocument, paramold_value, paramnew_value, paramportion_format, paramwith_masters, parampassword)
39028
+ unless AsposeSlidesCloud::SpecUtils.no_exception?('ReplaceTextFormattingOnline', 'document')
39029
+ fail "An exception expected"
39030
+ end
39031
+ rescue AsposeSlidesCloud::ApiError => e
39032
+ code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormattingOnline', 'document', paramdocument, 'File')
39033
+ expect(e.code).to eq(code)
39034
+ expect(e.response_body).to include(message)
39035
+ rescue ArgumentError => e
39036
+ code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormattingOnline', 'document', paramdocument, 'File')
39037
+ expect(400).to eq(code)
39038
+ expect(e.message).to include(message)
39039
+ end
39040
+ end
39041
+
39042
+ it 'invalid old_value' do
39043
+ paramdocument = AsposeSlidesCloud::SpecUtils.get_param_value('document', 'ReplaceTextFormattingOnline', 'File')
39044
+ paramold_value = AsposeSlidesCloud::SpecUtils.get_param_value('oldValue', 'ReplaceTextFormattingOnline', 'String')
39045
+ paramnew_value = AsposeSlidesCloud::SpecUtils.get_param_value('newValue', 'ReplaceTextFormattingOnline', 'String')
39046
+ paramportion_format = AsposeSlidesCloud::SpecUtils.get_param_value('portionFormat', 'ReplaceTextFormattingOnline', 'PortionFormat')
39047
+ paramwith_masters = AsposeSlidesCloud::SpecUtils.get_param_value('withMasters', 'ReplaceTextFormattingOnline', 'BOOLEAN')
39048
+ parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceTextFormattingOnline', 'String')
39049
+ paramold_value = AsposeSlidesCloud::SpecUtils.invalidize_param_value('oldValue', 'ReplaceTextFormattingOnline', paramold_value, 'String')
39050
+ AsposeSlidesCloud::SpecUtils.initialize('ReplaceTextFormattingOnline', 'oldValue', paramold_value)
39051
+ begin
39052
+ AsposeSlidesCloud::SpecUtils.api.replace_text_formatting_online_with_http_info(paramdocument, paramold_value, paramnew_value, paramportion_format, paramwith_masters, parampassword)
39053
+ unless AsposeSlidesCloud::SpecUtils.no_exception?('ReplaceTextFormattingOnline', 'oldValue')
39054
+ fail "An exception expected"
39055
+ end
39056
+ rescue AsposeSlidesCloud::ApiError => e
39057
+ code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormattingOnline', 'oldValue', paramold_value, 'String')
39058
+ expect(e.code).to eq(code)
39059
+ expect(e.response_body).to include(message)
39060
+ rescue ArgumentError => e
39061
+ code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormattingOnline', 'oldValue', paramold_value, 'String')
39062
+ expect(400).to eq(code)
39063
+ expect(e.message).to include(message)
39064
+ end
39065
+ end
39066
+
39067
+ it 'invalid new_value' do
39068
+ paramdocument = AsposeSlidesCloud::SpecUtils.get_param_value('document', 'ReplaceTextFormattingOnline', 'File')
39069
+ paramold_value = AsposeSlidesCloud::SpecUtils.get_param_value('oldValue', 'ReplaceTextFormattingOnline', 'String')
39070
+ paramnew_value = AsposeSlidesCloud::SpecUtils.get_param_value('newValue', 'ReplaceTextFormattingOnline', 'String')
39071
+ paramportion_format = AsposeSlidesCloud::SpecUtils.get_param_value('portionFormat', 'ReplaceTextFormattingOnline', 'PortionFormat')
39072
+ paramwith_masters = AsposeSlidesCloud::SpecUtils.get_param_value('withMasters', 'ReplaceTextFormattingOnline', 'BOOLEAN')
39073
+ parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceTextFormattingOnline', 'String')
39074
+ paramnew_value = AsposeSlidesCloud::SpecUtils.invalidize_param_value('newValue', 'ReplaceTextFormattingOnline', paramnew_value, 'String')
39075
+ AsposeSlidesCloud::SpecUtils.initialize('ReplaceTextFormattingOnline', 'newValue', paramnew_value)
39076
+ begin
39077
+ AsposeSlidesCloud::SpecUtils.api.replace_text_formatting_online_with_http_info(paramdocument, paramold_value, paramnew_value, paramportion_format, paramwith_masters, parampassword)
39078
+ unless AsposeSlidesCloud::SpecUtils.no_exception?('ReplaceTextFormattingOnline', 'newValue')
39079
+ fail "An exception expected"
39080
+ end
39081
+ rescue AsposeSlidesCloud::ApiError => e
39082
+ code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormattingOnline', 'newValue', paramnew_value, 'String')
39083
+ expect(e.code).to eq(code)
39084
+ expect(e.response_body).to include(message)
39085
+ rescue ArgumentError => e
39086
+ code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormattingOnline', 'newValue', paramnew_value, 'String')
39087
+ expect(400).to eq(code)
39088
+ expect(e.message).to include(message)
39089
+ end
39090
+ end
39091
+
39092
+ it 'invalid portion_format' do
39093
+ paramdocument = AsposeSlidesCloud::SpecUtils.get_param_value('document', 'ReplaceTextFormattingOnline', 'File')
39094
+ paramold_value = AsposeSlidesCloud::SpecUtils.get_param_value('oldValue', 'ReplaceTextFormattingOnline', 'String')
39095
+ paramnew_value = AsposeSlidesCloud::SpecUtils.get_param_value('newValue', 'ReplaceTextFormattingOnline', 'String')
39096
+ paramportion_format = AsposeSlidesCloud::SpecUtils.get_param_value('portionFormat', 'ReplaceTextFormattingOnline', 'PortionFormat')
39097
+ paramwith_masters = AsposeSlidesCloud::SpecUtils.get_param_value('withMasters', 'ReplaceTextFormattingOnline', 'BOOLEAN')
39098
+ parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceTextFormattingOnline', 'String')
39099
+ paramportion_format = AsposeSlidesCloud::SpecUtils.invalidize_param_value('portionFormat', 'ReplaceTextFormattingOnline', paramportion_format, 'PortionFormat')
39100
+ AsposeSlidesCloud::SpecUtils.initialize('ReplaceTextFormattingOnline', 'portionFormat', paramportion_format)
39101
+ begin
39102
+ AsposeSlidesCloud::SpecUtils.api.replace_text_formatting_online_with_http_info(paramdocument, paramold_value, paramnew_value, paramportion_format, paramwith_masters, parampassword)
39103
+ unless AsposeSlidesCloud::SpecUtils.no_exception?('ReplaceTextFormattingOnline', 'portionFormat')
39104
+ fail "An exception expected"
39105
+ end
39106
+ rescue AsposeSlidesCloud::ApiError => e
39107
+ code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormattingOnline', 'portionFormat', paramportion_format, 'PortionFormat')
39108
+ expect(e.code).to eq(code)
39109
+ expect(e.response_body).to include(message)
39110
+ rescue ArgumentError => e
39111
+ code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormattingOnline', 'portionFormat', paramportion_format, 'PortionFormat')
39112
+ expect(400).to eq(code)
39113
+ expect(e.message).to include(message)
39114
+ end
39115
+ end
39116
+
39117
+ it 'invalid with_masters' do
39118
+ paramdocument = AsposeSlidesCloud::SpecUtils.get_param_value('document', 'ReplaceTextFormattingOnline', 'File')
39119
+ paramold_value = AsposeSlidesCloud::SpecUtils.get_param_value('oldValue', 'ReplaceTextFormattingOnline', 'String')
39120
+ paramnew_value = AsposeSlidesCloud::SpecUtils.get_param_value('newValue', 'ReplaceTextFormattingOnline', 'String')
39121
+ paramportion_format = AsposeSlidesCloud::SpecUtils.get_param_value('portionFormat', 'ReplaceTextFormattingOnline', 'PortionFormat')
39122
+ paramwith_masters = AsposeSlidesCloud::SpecUtils.get_param_value('withMasters', 'ReplaceTextFormattingOnline', 'BOOLEAN')
39123
+ parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceTextFormattingOnline', 'String')
39124
+ paramwith_masters = AsposeSlidesCloud::SpecUtils.invalidize_param_value('withMasters', 'ReplaceTextFormattingOnline', paramwith_masters, 'BOOLEAN')
39125
+ AsposeSlidesCloud::SpecUtils.initialize('ReplaceTextFormattingOnline', 'withMasters', paramwith_masters)
39126
+ begin
39127
+ AsposeSlidesCloud::SpecUtils.api.replace_text_formatting_online_with_http_info(paramdocument, paramold_value, paramnew_value, paramportion_format, paramwith_masters, parampassword)
39128
+ unless AsposeSlidesCloud::SpecUtils.no_exception?('ReplaceTextFormattingOnline', 'withMasters')
39129
+ fail "An exception expected"
39130
+ end
39131
+ rescue AsposeSlidesCloud::ApiError => e
39132
+ code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormattingOnline', 'withMasters', paramwith_masters, 'BOOLEAN')
39133
+ expect(e.code).to eq(code)
39134
+ expect(e.response_body).to include(message)
39135
+ rescue ArgumentError => e
39136
+ code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormattingOnline', 'withMasters', paramwith_masters, 'BOOLEAN')
39137
+ expect(400).to eq(code)
39138
+ expect(e.message).to include(message)
39139
+ end
39140
+ end
39141
+
39142
+ it 'invalid password' do
39143
+ paramdocument = AsposeSlidesCloud::SpecUtils.get_param_value('document', 'ReplaceTextFormattingOnline', 'File')
39144
+ paramold_value = AsposeSlidesCloud::SpecUtils.get_param_value('oldValue', 'ReplaceTextFormattingOnline', 'String')
39145
+ paramnew_value = AsposeSlidesCloud::SpecUtils.get_param_value('newValue', 'ReplaceTextFormattingOnline', 'String')
39146
+ paramportion_format = AsposeSlidesCloud::SpecUtils.get_param_value('portionFormat', 'ReplaceTextFormattingOnline', 'PortionFormat')
39147
+ paramwith_masters = AsposeSlidesCloud::SpecUtils.get_param_value('withMasters', 'ReplaceTextFormattingOnline', 'BOOLEAN')
39148
+ parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceTextFormattingOnline', 'String')
39149
+ parampassword = AsposeSlidesCloud::SpecUtils.invalidize_param_value('password', 'ReplaceTextFormattingOnline', parampassword, 'String')
39150
+ AsposeSlidesCloud::SpecUtils.initialize('ReplaceTextFormattingOnline', 'password', parampassword)
39151
+ begin
39152
+ AsposeSlidesCloud::SpecUtils.api.replace_text_formatting_online_with_http_info(paramdocument, paramold_value, paramnew_value, paramportion_format, paramwith_masters, parampassword)
39153
+ unless AsposeSlidesCloud::SpecUtils.no_exception?('ReplaceTextFormattingOnline', 'password')
39154
+ fail "An exception expected"
39155
+ end
39156
+ rescue AsposeSlidesCloud::ApiError => e
39157
+ code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormattingOnline', 'password', parampassword, 'String')
39158
+ expect(e.code).to eq(code)
39159
+ expect(e.response_body).to include(message)
39160
+ rescue ArgumentError => e
39161
+ code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormattingOnline', 'password', parampassword, 'String')
39162
+ expect(400).to eq(code)
39163
+ expect(e.message).to include(message)
39164
+ end
39165
+ end
39166
+ end
39167
+
38747
39168
  # unit tests for save_portion_as_math_ml
38748
39169
  # Convert Mathematical Text to MathML Format and saves result to the storage
38749
39170
  # @param name Document name.
@@ -52600,8 +53021,8 @@ describe 'SlidesApi' do
52600
53021
  # Update VBA module.
52601
53022
  # @param name Document name.
52602
53023
  # @param module_index The index of the macros module to remove.
53024
+ # @param module_dto VBA module DTO.
52603
53025
  # @param [Hash] opts the optional parameters
52604
- # @option opts [VbaModule] :module_dto VBA module DTO.
52605
53026
  # @option opts [String] :password Document password.
52606
53027
  # @option opts [String] :folder Document folder.
52607
53028
  # @option opts [String] :storage Document storage.
@@ -71,6 +71,40 @@ describe 'UseCases' do
71
71
  AsposeSlidesCloud::SpecUtils.api.replace_slide_text_online(source, slide_index, old_value, new_value, true, password)
72
72
  end
73
73
 
74
+ it 'replace text formatting' do
75
+ folder_name = "TempSlidesSDK"
76
+ file_name = "test.pptx"
77
+ password = "password"
78
+ slide_index = 1
79
+ shape_index = 1
80
+ paragraph_index = 1
81
+ portion_index = 1
82
+ old_text = "banana"
83
+ new_text = "orange"
84
+ color = "#FFFFA500"
85
+
86
+ portion = AsposeSlidesCloud::Portion.new
87
+ portion.text = old_text
88
+
89
+ portion_format = AsposeSlidesCloud::PortionFormat.new
90
+ portion_format.font_color = color
91
+
92
+ AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
93
+ AsposeSlidesCloud::SpecUtils.api.create_portion(file_name, slide_index, shape_index, paragraph_index, portion, portion_index, password, folder_name)
94
+ AsposeSlidesCloud::SpecUtils.api.replace_text_formatting(file_name, old_text, new_text, portion_format, nil, password, folder_name)
95
+ updated_portion = AsposeSlidesCloud::SpecUtils.api.get_portion(file_name, slide_index, shape_index, paragraph_index, portion_index, password, folder_name)
96
+ expect(updated_portion.text).to eq(new_text)
97
+ expect(updated_portion.font_color).to eq(color)
98
+ end
99
+
100
+ it 'replace text formatting online' do
101
+ password = "password"
102
+ source = File.binread("TestData/test.pptx")
103
+ portion_format = AsposeSlidesCloud::PortionFormat.new
104
+ portion_format.font_color = "#FFFFA500"
105
+ AsposeSlidesCloud::SpecUtils.api.replace_text_formatting_online(source, "banana", "orange", portion_format, nil, password)
106
+ end
107
+
74
108
  it "highlight shape text" do
75
109
  folder_name = "TempSlidesSDK"
76
110
  file_name = "test.pptx"
data/testRules.json CHANGED
@@ -205,7 +205,6 @@
205
205
  { "Message": "Error processing presentation ", "Parameter": "Files" },
206
206
  { "Message": "Image expected", "Parameter": "Image" },
207
207
  { "Message": " required parameter", "Type": "model" },
208
- { "Message": " DTO expected", "Type": "VbaModule", "Method": "UpdateVbaModule" },
209
208
  { "Message": "Failed to load the presentation", "Parameter": "Request", "Method": "/Merge.*Online/" },
210
209
  { "Message": "Invalid Request", "Parameter": "VersionId" },
211
210
  { "Message": "AmazonS3 Storage exception", "Parameter": "VersionId", "Method": "ObjectExists" },
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aspose_slides_cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 23.6.0
4
+ version: 23.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Putrov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-30 00:00:00.000000000 Z
11
+ date: 2023-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday