aspose_pdf_cloud 25.8.0 → 25.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9477e9e7cac55f95802a02b87b4fa0e7557466a99311b04ccd71601e1b01f2d6
4
- data.tar.gz: 48b556fa6a38047afae63be8e280ab2ba7727764c2d7cd9e6660ce896d4966db
3
+ metadata.gz: fd91f3bdf709e6ebb899f991bfefcab6521fdd4b5865d0afa8e11c9c51655b2a
4
+ data.tar.gz: 8d019483a3cebd4f1ccd1210af2e2ea62de9c0086951f28e485ff2e31109397b
5
5
  SHA512:
6
- metadata.gz: 2692e9d0cf87ea18b73d6003e967346b54b809fc69274f371c9e69435d65c4d1ff7987a0cc45476017486adf2a2f0eb62e02b008bc4b1d7ee669fe7d00b4c1bf
7
- data.tar.gz: 474742964b082e2ef8e4939379e073654d3be80f3941c84c76670dd88aa7cf99f06ec00f1808bb7f6110707099bbc82726eeac48a200a93b608918a19a6ae0f0
6
+ metadata.gz: a7fc56bb180b2bace517001bbf63cf7ec1e13b953e46a3fd2d748fef5324f44fde971659783a3ee1ec835e17b1b1ae1592c54258c7e7c9bd5146efeeb352d2a9
7
+ data.tar.gz: 9b06ccd6284f575da9937c3c57ec1809c563c007c810b15f891fac1fa92112aa75d21c2039cfd96387a9a98c6aa3cc0159414f3f10a366e7d5dcda5a48143d74
@@ -25,11 +25,11 @@ module AsposePdfCloud
25
25
  class PdfApi
26
26
  attr_accessor :api_client
27
27
 
28
- def initialize(app_key, app_sid, host = "", self_host = false, api_client = ApiClient.default)
28
+ def initialize(client_secret, client_id, host = "", self_host = false, api_client = ApiClient.default)
29
29
  @api_client = api_client
30
30
  @api_client.config.self_host = self_host
31
- @api_client.config.app_key = app_key
32
- @api_client.config.app_sid = app_sid
31
+ @api_client.config.client_secret = client_secret
32
+ @api_client.config.client_id = client_id
33
33
  if host != ""
34
34
  if @api_client.config.self_host
35
35
  @api_client.config.self_host_url = host
@@ -16351,6 +16351,93 @@ module AsposePdfCloud
16351
16351
  return data, status_code, headers
16352
16352
  end
16353
16353
 
16354
+ # Crop PDF document pages.
16355
+ #
16356
+ # @param name The document name.
16357
+ # @param pages Comma separated list of pages and page ranges. (Example: 1,3-5,8)
16358
+ # @param rect Rectangle of document area.
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_crop(name, pages, rect, opts = {})
16365
+ @api_client.request_token_if_needed
16366
+ data, _status_code, _headers = post_document_pages_crop_with_http_info(name, pages, rect, 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_crop_with_http_info(name, pages, rect, opts)
16371
+ else
16372
+ raise
16373
+ end
16374
+ return data
16375
+ end
16376
+
16377
+ # Crop PDF document pages.
16378
+ #
16379
+ # @param name The document name.
16380
+ # @param pages Comma separated list of pages and page ranges. (Example: 1,3-5,8)
16381
+ # @param rect Rectangle of document area.
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_crop_with_http_info(name, pages, rect, opts = {})
16388
+ if @api_client.config.debugging
16389
+ @api_client.config.logger.debug "Calling API: PdfApi.post_document_pages_crop ..."
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_crop"
16394
+ end
16395
+ # verify the required parameter 'pages' is set
16396
+ if @api_client.config.client_side_validation && pages.nil?
16397
+ fail ArgumentError, "Missing the required parameter 'pages' when calling PdfApi.post_document_pages_crop"
16398
+ end
16399
+ # verify the required parameter 'rect' is set
16400
+ if @api_client.config.client_side_validation && rect.nil?
16401
+ fail ArgumentError, "Missing the required parameter 'rect' when calling PdfApi.post_document_pages_crop"
16402
+ end
16403
+ # resource path
16404
+ local_var_path = "/pdf/{name}/crop".sub('{' + 'name' + '}', name.to_s)
16405
+
16406
+ # query parameters
16407
+ query_params = {}
16408
+ query_params[:'pages'] = pages
16409
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
16410
+ query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
16411
+ query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?
16412
+
16413
+ # header parameters
16414
+ header_params = {}
16415
+ # HTTP header 'Accept' (if needed)
16416
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
16417
+ # HTTP header 'Content-Type'
16418
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
16419
+
16420
+ # form parameters
16421
+ form_params = {}
16422
+ # Fix header in file
16423
+ post_body = nil
16424
+
16425
+ # http body (model)
16426
+ post_body = @api_client.object_to_http_body(rect)
16427
+ auth_names = ['JWT']
16428
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
16429
+ :header_params => header_params,
16430
+ :query_params => query_params,
16431
+ :form_params => form_params,
16432
+ :body => post_body,
16433
+ :auth_names => auth_names,
16434
+ :return_type => 'AsposeResponse')
16435
+ if @api_client.config.debugging
16436
+ @api_client.config.logger.debug "API called: PdfApi#post_document_pages_crop\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
16437
+ end
16438
+ return data, status_code, headers
16439
+ end
16440
+
16354
16441
  # Rsize PDF document.
16355
16442
  #
16356
16443
  # @param name The document name.
@@ -439,8 +439,8 @@ module AsposePdfCloud
439
439
  # form parameters
440
440
  form_params = {}
441
441
  form_params["grant_type"] = 'client_credentials'
442
- form_params["client_id"] = @config.app_sid
443
- form_params["client_secret"] = @config.app_key
442
+ form_params["client_id"] = @config.client_id
443
+ form_params["client_secret"] = @config.client_secret
444
444
 
445
445
  body = {}
446
446
 
@@ -31,10 +31,10 @@ module AsposePdfCloud
31
31
  attr_accessor :self_host_url
32
32
 
33
33
  # App Key
34
- attr_accessor :app_key
34
+ attr_accessor :client_secret
35
35
 
36
36
  # App SID
37
- attr_accessor :app_sid
37
+ attr_accessor :client_id
38
38
 
39
39
  # Defines url scheme
40
40
  attr_accessor :scheme
@@ -20,5 +20,5 @@ SOFTWARE.
20
20
  =end
21
21
 
22
22
  module AsposePdfCloud
23
- VERSION = "25.8.0"
23
+ VERSION = "25.10.0"
24
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aspose_pdf_cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 25.8.0
4
+ version: 25.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aspose PDF Cloud
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-08-21 00:00:00.000000000 Z
11
+ date: 2025-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday