groupdocs_parser_cloud 23.7 → 26.2

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.
Files changed (69) hide show
  1. checksums.yaml +5 -5
  2. data/lib/groupdocs_parser_cloud/api/file_api.rb +6 -6
  3. data/lib/groupdocs_parser_cloud/api/folder_api.rb +6 -6
  4. data/lib/groupdocs_parser_cloud/api/info_api.rb +3 -3
  5. data/lib/groupdocs_parser_cloud/api/parse_api.rb +102 -5
  6. data/lib/groupdocs_parser_cloud/api/storage_api.rb +5 -5
  7. data/lib/groupdocs_parser_cloud/api/template_api.rb +4 -4
  8. data/lib/groupdocs_parser_cloud/api_client.rb +4 -5
  9. data/lib/groupdocs_parser_cloud/{api_error.rb → api_client_error.rb} +22 -17
  10. data/lib/groupdocs_parser_cloud/configuration.rb +1 -1
  11. data/lib/groupdocs_parser_cloud/models/ai_parse_options.rb +234 -0
  12. data/lib/groupdocs_parser_cloud/models/barcode.rb +22 -2
  13. data/lib/groupdocs_parser_cloud/models/barcode_page.rb +22 -7
  14. data/lib/groupdocs_parser_cloud/models/barcodes_options.rb +1 -1
  15. data/lib/groupdocs_parser_cloud/models/barcodes_result.rb +2 -2
  16. data/lib/groupdocs_parser_cloud/models/container_item.rb +1 -1
  17. data/lib/groupdocs_parser_cloud/models/container_item_info.rb +1 -1
  18. data/lib/groupdocs_parser_cloud/models/container_options.rb +1 -1
  19. data/lib/groupdocs_parser_cloud/models/container_result.rb +1 -1
  20. data/lib/groupdocs_parser_cloud/models/coordinates.rb +1 -1
  21. data/lib/groupdocs_parser_cloud/models/create_template_options.rb +1 -1
  22. data/lib/groupdocs_parser_cloud/models/detector_parameters.rb +1 -1
  23. data/lib/groupdocs_parser_cloud/models/disc_usage.rb +1 -1
  24. data/lib/groupdocs_parser_cloud/models/error.rb +1 -1
  25. data/lib/groupdocs_parser_cloud/models/error_details.rb +1 -1
  26. data/lib/groupdocs_parser_cloud/models/field.rb +1 -1
  27. data/lib/groupdocs_parser_cloud/models/field_data.rb +1 -1
  28. data/lib/groupdocs_parser_cloud/models/field_position.rb +1 -1
  29. data/lib/groupdocs_parser_cloud/models/file_info.rb +1 -1
  30. data/lib/groupdocs_parser_cloud/models/file_type.rb +1 -1
  31. data/lib/groupdocs_parser_cloud/models/file_version.rb +1 -1
  32. data/lib/groupdocs_parser_cloud/models/file_versions.rb +1 -1
  33. data/lib/groupdocs_parser_cloud/models/files_list.rb +1 -1
  34. data/lib/groupdocs_parser_cloud/models/files_upload_result.rb +1 -1
  35. data/lib/groupdocs_parser_cloud/models/format.rb +1 -1
  36. data/lib/groupdocs_parser_cloud/models/formats_result.rb +1 -1
  37. data/lib/groupdocs_parser_cloud/models/formatted_text_options.rb +1 -1
  38. data/lib/groupdocs_parser_cloud/models/image.rb +1 -1
  39. data/lib/groupdocs_parser_cloud/models/image_page.rb +1 -1
  40. data/lib/groupdocs_parser_cloud/models/images_options.rb +1 -1
  41. data/lib/groupdocs_parser_cloud/models/images_result.rb +1 -1
  42. data/lib/groupdocs_parser_cloud/models/info_options.rb +1 -1
  43. data/lib/groupdocs_parser_cloud/models/info_result.rb +1 -1
  44. data/lib/groupdocs_parser_cloud/models/object_exist.rb +1 -1
  45. data/lib/groupdocs_parser_cloud/models/page.rb +1 -1
  46. data/lib/groupdocs_parser_cloud/models/page_area.rb +1 -1
  47. data/lib/groupdocs_parser_cloud/models/page_table_area.rb +1 -1
  48. data/lib/groupdocs_parser_cloud/models/page_table_area_cell.rb +1 -1
  49. data/lib/groupdocs_parser_cloud/models/page_text_area.rb +1 -1
  50. data/lib/groupdocs_parser_cloud/models/parse_options.rb +1 -1
  51. data/lib/groupdocs_parser_cloud/models/parse_result.rb +1 -1
  52. data/lib/groupdocs_parser_cloud/models/parser_options.rb +1 -1
  53. data/lib/groupdocs_parser_cloud/models/point.rb +1 -1
  54. data/lib/groupdocs_parser_cloud/models/rectangle.rb +1 -1
  55. data/lib/groupdocs_parser_cloud/models/size.rb +1 -1
  56. data/lib/groupdocs_parser_cloud/models/storage_exist.rb +1 -1
  57. data/lib/groupdocs_parser_cloud/models/storage_file.rb +1 -1
  58. data/lib/groupdocs_parser_cloud/models/table.rb +1 -1
  59. data/lib/groupdocs_parser_cloud/models/table_layout.rb +1 -1
  60. data/lib/groupdocs_parser_cloud/models/template.rb +1 -1
  61. data/lib/groupdocs_parser_cloud/models/template_options.rb +1 -1
  62. data/lib/groupdocs_parser_cloud/models/template_result.rb +1 -1
  63. data/lib/groupdocs_parser_cloud/models/text_options.rb +1 -1
  64. data/lib/groupdocs_parser_cloud/models/text_page.rb +1 -1
  65. data/lib/groupdocs_parser_cloud/models/text_result.rb +1 -1
  66. data/lib/groupdocs_parser_cloud/models/text_style.rb +1 -1
  67. data/lib/groupdocs_parser_cloud/version.rb +2 -2
  68. data/lib/groupdocs_parser_cloud.rb +3 -2
  69. metadata +8 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: '080566bc66919fde8673d6013053b639894462e4'
4
- data.tar.gz: 6b41d09476256e1bb8958a930710b43495db1402
2
+ SHA256:
3
+ metadata.gz: 856a641eae07783d2bd97174a432a136072a5209a42affb76d346d93f820a23b
4
+ data.tar.gz: 2725b9500137ad261c9555bd608271a2dd9d3976dc10aa650ffeec45353b637a
5
5
  SHA512:
6
- metadata.gz: 19b5d279bb0b7728c1ad261b36f80c8a3dc2207ef8a4e9f479dce8634ba5c4cb0e5d60e97a5a4190719c94d9d9ff8f01824f1da596a096cb622168b51a092d9f
7
- data.tar.gz: 067f6e3bcba059e3a7e94145d6f5c974ffc8b005957ceb2b09e32180ce9d21cc3a8591cfd5ab639aa68a31d804d9570ac930129ca4b3e65dff7f165363fc4fef
6
+ metadata.gz: 3231f7582d524cbc9db7dcf71f590fffc88b91761bae43310b6eab70db5e530689c473972ec81488fd98f4223bcf825720d8fc9bdc120144998d971021da2606
7
+ data.tar.gz: aa796005c033ae7d5801625f984e9a8b884602ce65f08db08cc8cc37068747d576c1fa6c685acb9e2f9fcd911983a55df867b0d1fafc6f94a29832a96fde6393
@@ -1,6 +1,6 @@
1
1
  # -----------------------------------------------------------------------------------
2
2
  # <copyright company="Aspose Pty Ltd" file="file.rb">
3
- # Copyright (c) 2003-2023 Aspose Pty Ltd
3
+ # Copyright (c) Aspose Pty Ltd
4
4
  # </copyright>
5
5
  # <summary>
6
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -449,7 +449,7 @@ end
449
449
  #
450
450
  # --------------------------------------------------------------------------------------------------------------------
451
451
  # <copyright company="Aspose Pty Ltd" file="copy_file_request.rb">
452
- # Copyright (c) 2003-2023 Aspose Pty Ltd
452
+ # Copyright (c) Aspose Pty Ltd
453
453
  # </copyright>
454
454
  # <summary>
455
455
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -510,7 +510,7 @@ end
510
510
  #
511
511
  # --------------------------------------------------------------------------------------------------------------------
512
512
  # <copyright company="Aspose Pty Ltd" file="delete_file_request.rb">
513
- # Copyright (c) 2003-2023 Aspose Pty Ltd
513
+ # Copyright (c) Aspose Pty Ltd
514
514
  # </copyright>
515
515
  # <summary>
516
516
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -563,7 +563,7 @@ end
563
563
  #
564
564
  # --------------------------------------------------------------------------------------------------------------------
565
565
  # <copyright company="Aspose Pty Ltd" file="download_file_request.rb">
566
- # Copyright (c) 2003-2023 Aspose Pty Ltd
566
+ # Copyright (c) Aspose Pty Ltd
567
567
  # </copyright>
568
568
  # <summary>
569
569
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -616,7 +616,7 @@ end
616
616
  #
617
617
  # --------------------------------------------------------------------------------------------------------------------
618
618
  # <copyright company="Aspose Pty Ltd" file="move_file_request.rb">
619
- # Copyright (c) 2003-2023 Aspose Pty Ltd
619
+ # Copyright (c) Aspose Pty Ltd
620
620
  # </copyright>
621
621
  # <summary>
622
622
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -677,7 +677,7 @@ end
677
677
  #
678
678
  # --------------------------------------------------------------------------------------------------------------------
679
679
  # <copyright company="Aspose Pty Ltd" file="upload_file_request.rb">
680
- # Copyright (c) 2003-2023 Aspose Pty Ltd
680
+ # Copyright (c) Aspose Pty Ltd
681
681
  # </copyright>
682
682
  # <summary>
683
683
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,6 +1,6 @@
1
1
  # -----------------------------------------------------------------------------------
2
2
  # <copyright company="Aspose Pty Ltd" file="folder.rb">
3
- # Copyright (c) 2003-2023 Aspose Pty Ltd
3
+ # Copyright (c) Aspose Pty Ltd
4
4
  # </copyright>
5
5
  # <summary>
6
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -430,7 +430,7 @@ end
430
430
  #
431
431
  # --------------------------------------------------------------------------------------------------------------------
432
432
  # <copyright company="Aspose Pty Ltd" file="copy_folder_request.rb">
433
- # Copyright (c) 2003-2023 Aspose Pty Ltd
433
+ # Copyright (c) Aspose Pty Ltd
434
434
  # </copyright>
435
435
  # <summary>
436
436
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -487,7 +487,7 @@ end
487
487
  #
488
488
  # --------------------------------------------------------------------------------------------------------------------
489
489
  # <copyright company="Aspose Pty Ltd" file="create_folder_request.rb">
490
- # Copyright (c) 2003-2023 Aspose Pty Ltd
490
+ # Copyright (c) Aspose Pty Ltd
491
491
  # </copyright>
492
492
  # <summary>
493
493
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -536,7 +536,7 @@ end
536
536
  #
537
537
  # --------------------------------------------------------------------------------------------------------------------
538
538
  # <copyright company="Aspose Pty Ltd" file="delete_folder_request.rb">
539
- # Copyright (c) 2003-2023 Aspose Pty Ltd
539
+ # Copyright (c) Aspose Pty Ltd
540
540
  # </copyright>
541
541
  # <summary>
542
542
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -589,7 +589,7 @@ end
589
589
  #
590
590
  # --------------------------------------------------------------------------------------------------------------------
591
591
  # <copyright company="Aspose Pty Ltd" file="get_files_list_request.rb">
592
- # Copyright (c) 2003-2023 Aspose Pty Ltd
592
+ # Copyright (c) Aspose Pty Ltd
593
593
  # </copyright>
594
594
  # <summary>
595
595
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -638,7 +638,7 @@ end
638
638
  #
639
639
  # --------------------------------------------------------------------------------------------------------------------
640
640
  # <copyright company="Aspose Pty Ltd" file="move_folder_request.rb">
641
- # Copyright (c) 2003-2023 Aspose Pty Ltd
641
+ # Copyright (c) Aspose Pty Ltd
642
642
  # </copyright>
643
643
  # <summary>
644
644
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,6 +1,6 @@
1
1
  # -----------------------------------------------------------------------------------
2
2
  # <copyright company="Aspose Pty Ltd" file="info.rb">
3
- # Copyright (c) 2003-2023 Aspose Pty Ltd
3
+ # Copyright (c) Aspose Pty Ltd
4
4
  # </copyright>
5
5
  # <summary>
6
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -274,7 +274,7 @@ end
274
274
  #
275
275
  # --------------------------------------------------------------------------------------------------------------------
276
276
  # <copyright company="Aspose Pty Ltd" file="container_request.rb">
277
- # Copyright (c) 2003-2023 Aspose Pty Ltd
277
+ # Copyright (c) Aspose Pty Ltd
278
278
  # </copyright>
279
279
  # <summary>
280
280
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -319,7 +319,7 @@ end
319
319
  #
320
320
  # --------------------------------------------------------------------------------------------------------------------
321
321
  # <copyright company="Aspose Pty Ltd" file="get_info_request.rb">
322
- # Copyright (c) 2003-2023 Aspose Pty Ltd
322
+ # Copyright (c) Aspose Pty Ltd
323
323
  # </copyright>
324
324
  # <summary>
325
325
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,6 +1,6 @@
1
1
  # -----------------------------------------------------------------------------------
2
2
  # <copyright company="Aspose Pty Ltd" file="parse.rb">
3
- # Copyright (c) 2003-2023 Aspose Pty Ltd
3
+ # Copyright (c) Aspose Pty Ltd
4
4
  # </copyright>
5
5
  # <summary>
6
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -64,6 +64,58 @@ module GroupDocsParserCloud
64
64
  return new(config)
65
65
  end
66
66
 
67
+ # Extract document data using AI and given template.
68
+ #
69
+ # @param request a_i_parse_request
70
+ # @return [Object]
71
+ def a_i_parse(request)
72
+ data, _status_code, _headers = a_i_parse_with_http_info(request)
73
+ data
74
+ end
75
+
76
+ # Extract document data using AI and given template.
77
+ #
78
+ # @param request a_i_parse_request
79
+ # @return [Array<(Object, Fixnum, Hash)>]
80
+ # Object data, response status code and response headers
81
+ def a_i_parse_with_http_info(request)
82
+ raise ArgumentError, 'Incorrect request type' unless request.is_a? AIParseRequest
83
+
84
+ @api_client.config.logger.debug 'Calling API: ParseApi.a_i_parse ...' if @api_client.config.debugging
85
+ # verify the required parameter 'options' is set
86
+ raise ArgumentError, 'Missing the required parameter options when calling ParseApi.a_i_parse' if @api_client.config.client_side_validation && request.options.nil?
87
+ # resource path
88
+ local_var_path = '/parser/aiparse'
89
+
90
+ # query parameters
91
+ query_params = {}
92
+
93
+ # header parameters
94
+ header_params = {}
95
+ # HTTP header 'Accept' (if needed)
96
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
97
+ # HTTP header 'Content-Type'
98
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
99
+
100
+ # form parameters
101
+ form_params = {}
102
+
103
+ # http body (model)
104
+ post_body = @api_client.object_to_http_body(request.options)
105
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
106
+ header_params: header_params,
107
+ query_params: query_params,
108
+ form_params: form_params,
109
+ body: post_body,
110
+ access_token: get_access_token,
111
+ return_type: 'Object')
112
+ if @api_client.config.debugging
113
+ @api_client.config.logger.debug "API called:
114
+ ParseApi#a_i_parse\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
115
+ end
116
+ [data, status_code, headers]
117
+ end
118
+
67
119
  # Extract barcodes from document.
68
120
  #
69
121
  # @param request barcodes_request
@@ -325,11 +377,56 @@ module GroupDocsParserCloud
325
377
  end
326
378
  end
327
379
  end
380
+ end
381
+ #
382
+ # --------------------------------------------------------------------------------------------------------------------
383
+ # <copyright company="Aspose Pty Ltd" file="a_i_parse_request.rb">
384
+ # Copyright (c) Aspose Pty Ltd
385
+ # </copyright>
386
+ # <summary>
387
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
388
+ # of this software and associated documentation files (the "Software"), to deal
389
+ # in the Software without restriction, including without limitation the rights
390
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
391
+ # copies of the Software, and to permit persons to whom the Software is
392
+ # furnished to do so, subject to the following conditions:
393
+ #
394
+ # The above copyright notice and this permission notice shall be included in all
395
+ # copies or substantial portions of the Software.
396
+ #
397
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
398
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
399
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
400
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
401
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
402
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
403
+ # SOFTWARE.
404
+ # </summary>
405
+ # --------------------------------------------------------------------------------------------------------------------
406
+ #
407
+
408
+ module GroupDocsParserCloud
409
+
410
+ #
411
+ # Request model for a_i_parse operation.
412
+ #
413
+ class AIParseRequest
414
+
415
+ # Parse options.
416
+ attr_accessor :options
417
+
418
+ #
419
+ # Initializes a new instance.
420
+ # @param options Parse options.
421
+ def initialize(options)
422
+ self.options = options
423
+ end
424
+ end
328
425
  end
329
426
  #
330
427
  # --------------------------------------------------------------------------------------------------------------------
331
428
  # <copyright company="Aspose Pty Ltd" file="barcodes_request.rb">
332
- # Copyright (c) 2003-2023 Aspose Pty Ltd
429
+ # Copyright (c) Aspose Pty Ltd
333
430
  # </copyright>
334
431
  # <summary>
335
432
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -374,7 +471,7 @@ end
374
471
  #
375
472
  # --------------------------------------------------------------------------------------------------------------------
376
473
  # <copyright company="Aspose Pty Ltd" file="images_request.rb">
377
- # Copyright (c) 2003-2023 Aspose Pty Ltd
474
+ # Copyright (c) Aspose Pty Ltd
378
475
  # </copyright>
379
476
  # <summary>
380
477
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -419,7 +516,7 @@ end
419
516
  #
420
517
  # --------------------------------------------------------------------------------------------------------------------
421
518
  # <copyright company="Aspose Pty Ltd" file="parse_request.rb">
422
- # Copyright (c) 2003-2023 Aspose Pty Ltd
519
+ # Copyright (c) Aspose Pty Ltd
423
520
  # </copyright>
424
521
  # <summary>
425
522
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -464,7 +561,7 @@ end
464
561
  #
465
562
  # --------------------------------------------------------------------------------------------------------------------
466
563
  # <copyright company="Aspose Pty Ltd" file="text_request.rb">
467
- # Copyright (c) 2003-2023 Aspose Pty Ltd
564
+ # Copyright (c) Aspose Pty Ltd
468
565
  # </copyright>
469
566
  # <summary>
470
567
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,6 +1,6 @@
1
1
  # -----------------------------------------------------------------------------------
2
2
  # <copyright company="Aspose Pty Ltd" file="storage.rb">
3
- # Copyright (c) 2003-2023 Aspose Pty Ltd
3
+ # Copyright (c) Aspose Pty Ltd
4
4
  # </copyright>
5
5
  # <summary>
6
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -350,7 +350,7 @@ end
350
350
  #
351
351
  # --------------------------------------------------------------------------------------------------------------------
352
352
  # <copyright company="Aspose Pty Ltd" file="get_disc_usage_request.rb">
353
- # Copyright (c) 2003-2023 Aspose Pty Ltd
353
+ # Copyright (c) Aspose Pty Ltd
354
354
  # </copyright>
355
355
  # <summary>
356
356
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -395,7 +395,7 @@ end
395
395
  #
396
396
  # --------------------------------------------------------------------------------------------------------------------
397
397
  # <copyright company="Aspose Pty Ltd" file="get_file_versions_request.rb">
398
- # Copyright (c) 2003-2023 Aspose Pty Ltd
398
+ # Copyright (c) Aspose Pty Ltd
399
399
  # </copyright>
400
400
  # <summary>
401
401
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -444,7 +444,7 @@ end
444
444
  #
445
445
  # --------------------------------------------------------------------------------------------------------------------
446
446
  # <copyright company="Aspose Pty Ltd" file="object_exists_request.rb">
447
- # Copyright (c) 2003-2023 Aspose Pty Ltd
447
+ # Copyright (c) Aspose Pty Ltd
448
448
  # </copyright>
449
449
  # <summary>
450
450
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -497,7 +497,7 @@ end
497
497
  #
498
498
  # --------------------------------------------------------------------------------------------------------------------
499
499
  # <copyright company="Aspose Pty Ltd" file="storage_exists_request.rb">
500
- # Copyright (c) 2003-2023 Aspose Pty Ltd
500
+ # Copyright (c) Aspose Pty Ltd
501
501
  # </copyright>
502
502
  # <summary>
503
503
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,6 +1,6 @@
1
1
  # -----------------------------------------------------------------------------------
2
2
  # <copyright company="Aspose Pty Ltd" file="template.rb">
3
- # Copyright (c) 2003-2023 Aspose Pty Ltd
3
+ # Copyright (c) Aspose Pty Ltd
4
4
  # </copyright>
5
5
  # <summary>
6
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -276,7 +276,7 @@ end
276
276
  #
277
277
  # --------------------------------------------------------------------------------------------------------------------
278
278
  # <copyright company="Aspose Pty Ltd" file="create_template_request.rb">
279
- # Copyright (c) 2003-2023 Aspose Pty Ltd
279
+ # Copyright (c) Aspose Pty Ltd
280
280
  # </copyright>
281
281
  # <summary>
282
282
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -321,7 +321,7 @@ end
321
321
  #
322
322
  # --------------------------------------------------------------------------------------------------------------------
323
323
  # <copyright company="Aspose Pty Ltd" file="delete_template_request.rb">
324
- # Copyright (c) 2003-2023 Aspose Pty Ltd
324
+ # Copyright (c) Aspose Pty Ltd
325
325
  # </copyright>
326
326
  # <summary>
327
327
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -366,7 +366,7 @@ end
366
366
  #
367
367
  # --------------------------------------------------------------------------------------------------------------------
368
368
  # <copyright company="Aspose Pty Ltd" file="get_template_request.rb">
369
- # Copyright (c) 2003-2023 Aspose Pty Ltd
369
+ # Copyright (c) Aspose Pty Ltd
370
370
  # </copyright>
371
371
  # <summary>
372
372
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,6 +1,6 @@
1
1
  # -----------------------------------------------------------------------------------
2
2
  # <copyright company="Aspose Pty Ltd" file="api_client.rb">
3
- # Copyright (c) 2003-2023 Aspose Pty Ltd
3
+ # Copyright (c) Aspose Pty Ltd
4
4
  # </copyright>
5
5
  # <summary>
6
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -28,10 +28,9 @@ require 'json'
28
28
  require 'logger'
29
29
  require 'tempfile'
30
30
  require 'faraday'
31
- require 'mimemagic'
32
31
  require 'addressable'
33
32
  require_relative 'version'
34
- require_relative 'api_error'
33
+ require_relative 'api_client_error'
35
34
 
36
35
  module GroupDocsParserCloud
37
36
  #
@@ -69,7 +68,7 @@ module GroupDocsParserCloud
69
68
  end
70
69
 
71
70
  unless response.success?
72
- raise ApiError.new(:code => response.status, :response_body => response.body)
71
+ raise ApiClientError.new(:code => response.status, :response_body => response.body)
73
72
  end
74
73
 
75
74
  data = deserialize(response, opts[:return_type]) if opts[:return_type]
@@ -281,7 +280,7 @@ module GroupDocsParserCloud
281
280
  form_params.each do |key, value|
282
281
  case value
283
282
  when ::File
284
- data[key] = Faraday::UploadIO.new(value.path, MimeMagic.by_magic(value).to_s, key)
283
+ data[key] = Faraday::UploadIO.new(value.path, "application/octet-stream", key)
285
284
  when ::Array, nil
286
285
  data[key] = value
287
286
  else
@@ -1,6 +1,6 @@
1
1
  # -----------------------------------------------------------------------------------
2
2
  # <copyright company="Aspose Pty Ltd" file="api_error.rb">
3
- # Copyright (c) 2003-2023 Aspose Pty Ltd
3
+ # Copyright (c) Aspose Pty Ltd
4
4
  # </copyright>
5
5
  # <summary>
6
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -25,33 +25,38 @@
25
25
 
26
26
  module GroupDocsParserCloud
27
27
  #
28
- # ApiError class for error handling
28
+ # ApiClientError class for error handling
29
29
  #
30
- class ApiError < StandardError
30
+ class ApiClientError < StandardError
31
31
  attr_reader :code
32
32
  attr_reader :message
33
33
 
34
34
  # Usage examples:
35
- # ApiError.new
36
- # ApiError.new(:code => 500, :response_body => "")
35
+ # ApiClientError.new
36
+ # ApiClientError.new(:code => 500, :response_body => "")
37
37
  def initialize(arg = nil)
38
38
  if arg.is_a? Hash
39
39
 
40
- if arg.key?(:response_body)
40
+ if arg.key?(:response_body) then
41
41
  data = JSON.parse(arg[:response_body], :symbolize_names => true)
42
- if !data.nil?
43
- if !data[:error].nil?
44
- if data[:error].is_a? String
45
- @message = data[:error]
46
- elsif !data[:error][:message].nil?
47
- @message = data[:error][:message]
42
+ if !data.nil? then
43
+ if !data[:error].nil? then
44
+ error = data[:error]
45
+ if error.kind_of?(String) then
46
+ @message = error
47
+ else
48
+ @message = error[:message]
48
49
  end
49
- elsif !data[:Error].nil? && !data[:Error][:Message].nil?
50
- @message = data[:Error][:Message]
51
- elsif !data[:message].nil?
52
- @message = data[:message]
50
+ else
51
+ message = data[:message]
52
+ if !message.nil? && message.kind_of?(String) then
53
+ @message = message
54
+ @code = data[:code]
55
+ else
56
+ @message = data
57
+ end
53
58
  end
54
- end
59
+ end
55
60
  end
56
61
 
57
62
  if arg.key?(:arg) then
@@ -1,6 +1,6 @@
1
1
  # ------------------------------------------------------------------------------------
2
2
  # <copyright company="Aspose Pty Ltd" file="configuration.rb">
3
- # Copyright (c) 2003-2023 Aspose Pty Ltd
3
+ # Copyright (c) Aspose Pty Ltd
4
4
  # </copyright>
5
5
  # <summary>
6
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy