@@ -2843,6 +2843,90 @@ def delete_office_math_object_online(request)
28432843 [data, status_code, headers]
28442844 end
28452845
2846+ # Removes all office math objects from the document.
2847+ # @param request DeleteOfficeMathObjectsRequest
2848+ # @return [nil]
2849+ def delete_office_math_objects(request)
2850+ begin
2851+ data, _status_code, _headers = delete_office_math_objects_with_http_info(request)
2852+ rescue ApiError => e
2853+ if e.code == 401
2854+ request_token
2855+ data, _status_code, _headers = delete_office_math_objects_with_http_info(request)
2856+ else
2857+ raise
2858+ end
2859+ end
2860+ nil
2861+ end
2862+
2863+ # Removes all office math objects from the document.
2864+ # @param request DeleteOfficeMathObjectsRequest
2865+ # @return [Array<(nil, Fixnum, Hash)>]
2866+ # nil, response status code and response headers
2867+ private def delete_office_math_objects_with_http_info(request)
2868+ raise ArgumentError, 'Incorrect request type' unless request.is_a? DeleteOfficeMathObjectsRequest
2869+
2870+ @api_client.config.logger.debug 'Calling API: WordsApi.delete_office_math_objects ...' if @api_client.config.debugging
2871+ request_data = request.create_http_request(@api_client)
2872+
2873+ data, status_code, headers = @api_client.call_api(
2874+ request_data[:'method'],
2875+ request_data[:'path'],
2876+ header_params: request_data[:'header_params'],
2877+ query_params: request_data[:'query_params'],
2878+ body: request_data[:'body'])
2879+ if @api_client.config.debugging
2880+ @api_client.config.logger.debug "API called:
2881+ WordsApi#delete_office_math_objects\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2882+ end
2883+
2884+ [data, status_code, headers]
2885+ end
2886+
2887+ # Removes all office math objects from the document.
2888+ # @param request DeleteOfficeMathObjectsOnlineRequest
2889+ # @return [FILES_COLLECTION]
2890+ def delete_office_math_objects_online(request)
2891+ begin
2892+ data, _status_code, _headers = delete_office_math_objects_online_with_http_info(request)
2893+ rescue ApiError => e
2894+ if e.code == 401
2895+ request_token
2896+ data, _status_code, _headers = delete_office_math_objects_online_with_http_info(request)
2897+ else
2898+ raise
2899+ end
2900+ end
2901+ data
2902+ end
2903+
2904+ # Removes all office math objects from the document.
2905+ # @param request DeleteOfficeMathObjectsOnlineRequest
2906+ # @return [Array<(FILES_COLLECTION, Fixnum, Hash)>]
2907+ # FILES_COLLECTION, response status code and response headers
2908+ private def delete_office_math_objects_online_with_http_info(request)
2909+ raise ArgumentError, 'Incorrect request type' unless request.is_a? DeleteOfficeMathObjectsOnlineRequest
2910+
2911+ @api_client.config.logger.debug 'Calling API: WordsApi.delete_office_math_objects_online ...' if @api_client.config.debugging
2912+ request_data = request.create_http_request(@api_client)
2913+
2914+ data, status_code, headers = @api_client.call_api(
2915+ request_data[:'method'],
2916+ request_data[:'path'],
2917+ header_params: request_data[:'header_params'],
2918+ query_params: request_data[:'query_params'],
2919+ body: request_data[:'body'],
2920+ return_type: 'FILES_COLLECTION')
2921+ if @api_client.config.debugging
2922+ @api_client.config.logger.debug "API called:
2923+ WordsApi#delete_office_math_objects_online\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2924+ end
2925+
2926+ # FILES_COLLECTION #
2927+ [data, status_code, headers]
2928+ end
2929+
28462930 # Removes a paragraph from the document node.
28472931 # @param request DeleteParagraphRequest
28482932 # @return [nil]
@@ -10449,10 +10533,53 @@ def insert_table_row_online(request)
1044910533 [mp_data, status_code, headers]
1045010534 end
1045110535
10536+ # Insert a watermark to the document.
10537+ # @param request InsertWatermarkRequest
10538+ # @return [DocumentResponse]
10539+ def insert_watermark(request)
10540+ begin
10541+ data, _status_code, _headers = insert_watermark_with_http_info(request)
10542+ rescue ApiError => e
10543+ if e.code == 401
10544+ request_token
10545+ data, _status_code, _headers = insert_watermark_with_http_info(request)
10546+ else
10547+ raise
10548+ end
10549+ end
10550+ data
10551+ end
10552+
10553+ # Insert a watermark to the document.
10554+ # @param request InsertWatermarkRequest
10555+ # @return [Array<(DocumentResponse, Fixnum, Hash)>]
10556+ # DocumentResponse, response status code and response headers
10557+ private def insert_watermark_with_http_info(request)
10558+ raise ArgumentError, 'Incorrect request type' unless request.is_a? InsertWatermarkRequest
10559+
10560+ @api_client.config.logger.debug 'Calling API: WordsApi.insert_watermark ...' if @api_client.config.debugging
10561+ request_data = request.create_http_request(@api_client)
10562+
10563+ data, status_code, headers = @api_client.call_api(
10564+ request_data[:'method'],
10565+ request_data[:'path'],
10566+ header_params: request_data[:'header_params'],
10567+ query_params: request_data[:'query_params'],
10568+ body: request_data[:'body'],
10569+ return_type: 'DocumentResponse')
10570+ if @api_client.config.debugging
10571+ @api_client.config.logger.debug "API called:
10572+ WordsApi#insert_watermark\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
10573+ end
10574+
10575+ [data, status_code, headers]
10576+ end
10577+
1045210578 # Inserts a new watermark image to the document.
1045310579 # @param request InsertWatermarkImageRequest
1045410580 # @return [DocumentResponse]
1045510581 def insert_watermark_image(request)
10582+ warn "This operation is deprecated and is used for backward compatibility only. Please use InsertWatermark instead."
1045610583 begin
1045710584 data, _status_code, _headers = insert_watermark_image_with_http_info(request)
1045810585 rescue ApiError => e
@@ -10495,6 +10622,7 @@ def insert_watermark_image(request)
1049510622 # @param request InsertWatermarkImageOnlineRequest
1049610623 # @return [InsertWatermarkImageOnlineResponse]
1049710624 def insert_watermark_image_online(request)
10625+ warn "This operation is deprecated and is used for backward compatibility only. Please use InsertWatermark instead."
1049810626 begin
1049910627 data, _status_code, _headers = insert_watermark_image_online_with_http_info(request)
1050010628 rescue ApiError => e
@@ -10537,10 +10665,57 @@ def insert_watermark_image_online(request)
1053710665 [mp_data, status_code, headers]
1053810666 end
1053910667
10668+ # Insert a watermark to the document.
10669+ # @param request InsertWatermarkOnlineRequest
10670+ # @return [InsertWatermarkOnlineResponse]
10671+ def insert_watermark_online(request)
10672+ begin
10673+ data, _status_code, _headers = insert_watermark_online_with_http_info(request)
10674+ rescue ApiError => e
10675+ if e.code == 401
10676+ request_token
10677+ data, _status_code, _headers = insert_watermark_online_with_http_info(request)
10678+ else
10679+ raise
10680+ end
10681+ end
10682+ data
10683+ end
10684+
10685+ # Insert a watermark to the document.
10686+ # @param request InsertWatermarkOnlineRequest
10687+ # @return [Array<(InsertWatermarkOnlineResponse, Fixnum, Hash)>]
10688+ # InsertWatermarkOnlineResponse, response status code and response headers
10689+ private def insert_watermark_online_with_http_info(request)
10690+ raise ArgumentError, 'Incorrect request type' unless request.is_a? InsertWatermarkOnlineRequest
10691+
10692+ @api_client.config.logger.debug 'Calling API: WordsApi.insert_watermark_online ...' if @api_client.config.debugging
10693+ request_data = request.create_http_request(@api_client)
10694+
10695+ data, status_code, headers = @api_client.call_api(
10696+ request_data[:'method'],
10697+ request_data[:'path'],
10698+ header_params: request_data[:'header_params'],
10699+ query_params: request_data[:'query_params'],
10700+ body: request_data[:'body'],
10701+ multipart_response: true,
10702+ return_type: 'InsertWatermarkOnlineResponse')
10703+ if @api_client.config.debugging
10704+ @api_client.config.logger.debug "API called:
10705+ WordsApi#insert_watermark_online\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
10706+ end
10707+
10708+ mp_data = InsertWatermarkOnlineResponse.new()
10709+ mp_data.model = @api_client.deserialize(data['Model'][:data], data['Model'][:headers], 'DocumentResponse')
10710+ mp_data.document = @api_client.parse_files_collection(data['Document'][:data], data['Document'][:headers])
10711+ [mp_data, status_code, headers]
10712+ end
10713+
1054010714 # Inserts a new watermark text to the document.
1054110715 # @param request InsertWatermarkTextRequest
1054210716 # @return [DocumentResponse]
1054310717 def insert_watermark_text(request)
10718+ warn "This operation is deprecated and is used for backward compatibility only. Please use InsertWatermark instead."
1054410719 begin
1054510720 data, _status_code, _headers = insert_watermark_text_with_http_info(request)
1054610721 rescue ApiError => e
@@ -10583,6 +10758,7 @@ def insert_watermark_text(request)
1058310758 # @param request InsertWatermarkTextOnlineRequest
1058410759 # @return [InsertWatermarkTextOnlineResponse]
1058510760 def insert_watermark_text_online(request)
10761+ warn "This operation is deprecated and is used for backward compatibility only. Please use InsertWatermark instead."
1058610762 begin
1058710763 data, _status_code, _headers = insert_watermark_text_online_with_http_info(request)
1058810764 rescue ApiError => e
@@ -10874,7 +11050,7 @@ def optimize_document_online(request)
1087411050 [data, status_code, headers]
1087511051 end
1087611052
10877- # Adds protection to the document .
11053+ # Changes the document protection. The previous protection will be overwritten if it exist .
1087811054 # @param request ProtectDocumentRequest
1087911055 # @return [ProtectionDataResponse]
1088011056 def protect_document(request)
@@ -10891,7 +11067,7 @@ def protect_document(request)
1089111067 data
1089211068 end
1089311069
10894- # Adds protection to the document .
11070+ # Changes the document protection. The previous protection will be overwritten if it exist .
1089511071 # @param request ProtectDocumentRequest
1089611072 # @return [Array<(ProtectionDataResponse, Fixnum, Hash)>]
1089711073 # ProtectionDataResponse, response status code and response headers
@@ -10916,7 +11092,7 @@ def protect_document(request)
1091611092 [data, status_code, headers]
1091711093 end
1091811094
10919- # Adds protection to the document .
11095+ # Changes the document protection. The previous protection will be overwritten if it exist .
1092011096 # @param request ProtectDocumentOnlineRequest
1092111097 # @return [ProtectDocumentOnlineResponse]
1092211098 def protect_document_online(request)
@@ -10933,7 +11109,7 @@ def protect_document_online(request)
1093311109 data
1093411110 end
1093511111
10936- # Adds protection to the document .
11112+ # Changes the document protection. The previous protection will be overwritten if it exist .
1093711113 # @param request ProtectDocumentOnlineRequest
1093811114 # @return [Array<(ProtectDocumentOnlineResponse, Fixnum, Hash)>]
1093911115 # ProtectDocumentOnlineResponse, response status code and response headers
0 commit comments