@@ -16351,6 +16351,99 @@ def post_document_page_number_stamps_with_http_info(name, stamp, opts = {})
1635116351 return data, status_code, headers
1635216352 end
1635316353
16354+ # Rotate PDF document.
16355+ #
16356+ # @param name The document name.
16357+ # @param rotation_angle Rotation Angle (CKW). Can be 90, 180, 270.
16358+ # @param pages Comma separated list of pages and page ranges. (Example: 1,3-5,8)
16359+ # @param [Hash] opts the optional parameters
16360+ # @option opts [String] :storage The document storage.
16361+ # @option opts [String] :folder The document folder.
16362+ # @option opts [String] :password Base64 encoded password.
16363+ # @return [AsposeResponse]
16364+ def post_document_pages_rotate(name, rotation_angle, pages, opts = {})
16365+ @api_client.request_token_if_needed
16366+ data, _status_code, _headers = post_document_pages_rotate_with_http_info(name, rotation_angle, pages, opts)
16367+ rescue ApiError => error
16368+ if error.code == 401
16369+ @api_client.request_token_if_needed
16370+ data, _status_code, _headers = post_document_pages_rotate_with_http_info(name, rotation_angle, pages, opts)
16371+ else
16372+ raise
16373+ end
16374+ return data
16375+ end
16376+
16377+ # Rotate PDF document.
16378+ #
16379+ # @param name The document name.
16380+ # @param rotation_angle Rotation Angle (CKW). Can be 90, 180, 270.
16381+ # @param pages Comma separated list of pages and page ranges. (Example: 1,3-5,8)
16382+ # @param [Hash] opts the optional parameters
16383+ # @option opts [String] :storage The document storage.
16384+ # @option opts [String] :folder The document folder.
16385+ # @option opts [String] :password Base64 encoded password.
16386+ # @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers
16387+ def post_document_pages_rotate_with_http_info(name, rotation_angle, pages, opts = {})
16388+ if @api_client.config.debugging
16389+ @api_client.config.logger.debug "Calling API: PdfApi.post_document_pages_rotate ..."
16390+ end
16391+ # verify the required parameter 'name' is set
16392+ if @api_client.config.client_side_validation && name.nil?
16393+ fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_document_pages_rotate"
16394+ end
16395+ # verify the required parameter 'rotation_angle' is set
16396+ if @api_client.config.client_side_validation && rotation_angle.nil?
16397+ fail ArgumentError, "Missing the required parameter 'rotation_angle' when calling PdfApi.post_document_pages_rotate"
16398+ end
16399+ # verify enum value
16400+ if @api_client.config.client_side_validation && !['None', 'on90', 'on180', 'on270'].include?(rotation_angle)
16401+ fail ArgumentError, "invalid value for 'rotation_angle', must be one of None, on90, on180, on270"
16402+ end
16403+ # verify the required parameter 'pages' is set
16404+ if @api_client.config.client_side_validation && pages.nil?
16405+ fail ArgumentError, "Missing the required parameter 'pages' when calling PdfApi.post_document_pages_rotate"
16406+ end
16407+ # resource path
16408+ local_var_path = "/pdf/{name}/rotate".sub('{' + 'name' + '}', name.to_s)
16409+
16410+ # query parameters
16411+ query_params = {}
16412+ query_params[:'rotationAngle'] = rotation_angle
16413+ query_params[:'pages'] = pages
16414+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
16415+ query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
16416+ query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?
16417+
16418+ # header parameters
16419+ header_params = {}
16420+ # HTTP header 'Accept' (if needed)
16421+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
16422+ # HTTP header 'Content-Type'
16423+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
16424+
16425+ # form parameters
16426+ form_params = {}
16427+ # Fix header in file
16428+ post_body = nil
16429+
16430+ # http body (model)
16431+ # Fix header in file
16432+ # post_body = nil
16433+ auth_names = ['JWT']
16434+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
16435+ :header_params => header_params,
16436+ :query_params => query_params,
16437+ :form_params => form_params,
16438+ :body => post_body,
16439+ :auth_names => auth_names,
16440+ :return_type => 'AsposeResponse')
16441+ if @api_client.config.debugging
16442+ @api_client.config.logger.debug "API called: PdfApi#post_document_pages_rotate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
16443+ end
16444+ return data, status_code, headers
16445+ end
16446+
1635416447 # Add document text footer.
1635516448 #
1635616449 # @param name The document name.
0 commit comments