groupdocs_parser_cloud 22.3 → 23.7

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 (68) hide show
  1. checksums.yaml +4 -4
  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 +101 -4
  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 +2 -1
  9. data/lib/groupdocs_parser_cloud/api_error.rb +1 -1
  10. data/lib/groupdocs_parser_cloud/configuration.rb +1 -1
  11. data/lib/groupdocs_parser_cloud/models/barcode.rb +234 -0
  12. data/lib/groupdocs_parser_cloud/models/barcode_page.rb +214 -0
  13. data/lib/groupdocs_parser_cloud/models/barcodes_options.rb +254 -0
  14. data/lib/groupdocs_parser_cloud/models/barcodes_result.rb +216 -0
  15. data/lib/groupdocs_parser_cloud/models/container_item.rb +1 -1
  16. data/lib/groupdocs_parser_cloud/models/container_item_info.rb +1 -1
  17. data/lib/groupdocs_parser_cloud/models/container_options.rb +1 -1
  18. data/lib/groupdocs_parser_cloud/models/container_result.rb +1 -1
  19. data/lib/groupdocs_parser_cloud/models/coordinates.rb +1 -1
  20. data/lib/groupdocs_parser_cloud/models/create_template_options.rb +1 -1
  21. data/lib/groupdocs_parser_cloud/models/detector_parameters.rb +1 -1
  22. data/lib/groupdocs_parser_cloud/models/disc_usage.rb +1 -1
  23. data/lib/groupdocs_parser_cloud/models/error.rb +1 -1
  24. data/lib/groupdocs_parser_cloud/models/error_details.rb +1 -1
  25. data/lib/groupdocs_parser_cloud/models/field.rb +1 -1
  26. data/lib/groupdocs_parser_cloud/models/field_data.rb +1 -1
  27. data/lib/groupdocs_parser_cloud/models/field_position.rb +1 -1
  28. data/lib/groupdocs_parser_cloud/models/file_info.rb +1 -1
  29. data/lib/groupdocs_parser_cloud/models/file_type.rb +1 -1
  30. data/lib/groupdocs_parser_cloud/models/file_version.rb +1 -1
  31. data/lib/groupdocs_parser_cloud/models/file_versions.rb +1 -1
  32. data/lib/groupdocs_parser_cloud/models/files_list.rb +1 -1
  33. data/lib/groupdocs_parser_cloud/models/files_upload_result.rb +1 -1
  34. data/lib/groupdocs_parser_cloud/models/format.rb +1 -1
  35. data/lib/groupdocs_parser_cloud/models/formats_result.rb +1 -1
  36. data/lib/groupdocs_parser_cloud/models/formatted_text_options.rb +1 -1
  37. data/lib/groupdocs_parser_cloud/models/image.rb +1 -1
  38. data/lib/groupdocs_parser_cloud/models/image_page.rb +1 -1
  39. data/lib/groupdocs_parser_cloud/models/images_options.rb +1 -1
  40. data/lib/groupdocs_parser_cloud/models/images_result.rb +1 -1
  41. data/lib/groupdocs_parser_cloud/models/info_options.rb +1 -1
  42. data/lib/groupdocs_parser_cloud/models/info_result.rb +1 -1
  43. data/lib/groupdocs_parser_cloud/models/object_exist.rb +1 -1
  44. data/lib/groupdocs_parser_cloud/models/page.rb +1 -1
  45. data/lib/groupdocs_parser_cloud/models/page_area.rb +1 -1
  46. data/lib/groupdocs_parser_cloud/models/page_table_area.rb +1 -1
  47. data/lib/groupdocs_parser_cloud/models/page_table_area_cell.rb +1 -1
  48. data/lib/groupdocs_parser_cloud/models/page_text_area.rb +1 -1
  49. data/lib/groupdocs_parser_cloud/models/parse_options.rb +1 -1
  50. data/lib/groupdocs_parser_cloud/models/parse_result.rb +1 -1
  51. data/lib/groupdocs_parser_cloud/models/parser_options.rb +1 -1
  52. data/lib/groupdocs_parser_cloud/models/point.rb +1 -1
  53. data/lib/groupdocs_parser_cloud/models/rectangle.rb +1 -1
  54. data/lib/groupdocs_parser_cloud/models/size.rb +1 -1
  55. data/lib/groupdocs_parser_cloud/models/storage_exist.rb +1 -1
  56. data/lib/groupdocs_parser_cloud/models/storage_file.rb +1 -1
  57. data/lib/groupdocs_parser_cloud/models/table.rb +1 -1
  58. data/lib/groupdocs_parser_cloud/models/table_layout.rb +1 -1
  59. data/lib/groupdocs_parser_cloud/models/template.rb +1 -1
  60. data/lib/groupdocs_parser_cloud/models/template_options.rb +1 -1
  61. data/lib/groupdocs_parser_cloud/models/template_result.rb +1 -1
  62. data/lib/groupdocs_parser_cloud/models/text_options.rb +1 -1
  63. data/lib/groupdocs_parser_cloud/models/text_page.rb +1 -1
  64. data/lib/groupdocs_parser_cloud/models/text_result.rb +1 -1
  65. data/lib/groupdocs_parser_cloud/models/text_style.rb +1 -1
  66. data/lib/groupdocs_parser_cloud/version.rb +2 -2
  67. data/lib/groupdocs_parser_cloud.rb +5 -1
  68. metadata +10 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f3b0d6c17f54f7bf85dde3e6d07cf60964681e45
4
- data.tar.gz: 5ea1b60d17f0f093d4f2e23d74a9fdd26e350b57
3
+ metadata.gz: '080566bc66919fde8673d6013053b639894462e4'
4
+ data.tar.gz: 6b41d09476256e1bb8958a930710b43495db1402
5
5
  SHA512:
6
- metadata.gz: 24564174c96cc53a78ecf0dcfcf215324d8790afc1181dcd90ec636d6fdeea2ec3f00f4abda1b1dd1da14c1cc3d23504bc0ba90d930f76e8d9cc58ff8d57ba9d
7
- data.tar.gz: 7ea449bf14d4479c339065d7df8f7c536c88b7520cde8af912f0210cc7aa4718d8995d69ba9bb594ebc5e9878f3e09ebc0949990d61842bdaf64129b37f45f31
6
+ metadata.gz: 19b5d279bb0b7728c1ad261b36f80c8a3dc2207ef8a4e9f479dce8634ba5c4cb0e5d60e97a5a4190719c94d9d9ff8f01824f1da596a096cb622168b51a092d9f
7
+ data.tar.gz: 067f6e3bcba059e3a7e94145d6f5c974ffc8b005957ceb2b09e32180ce9d21cc3a8591cfd5ab639aa68a31d804d9570ac930129ca4b3e65dff7f165363fc4fef
@@ -1,6 +1,6 @@
1
1
  # -----------------------------------------------------------------------------------
2
2
  # <copyright company="Aspose Pty Ltd" file="file.rb">
3
- # Copyright (c) 2003-2019 Aspose Pty Ltd
3
+ # Copyright (c) 2003-2023 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-2019 Aspose Pty Ltd
452
+ # Copyright (c) 2003-2023 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-2019 Aspose Pty Ltd
513
+ # Copyright (c) 2003-2023 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-2019 Aspose Pty Ltd
566
+ # Copyright (c) 2003-2023 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-2019 Aspose Pty Ltd
619
+ # Copyright (c) 2003-2023 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-2019 Aspose Pty Ltd
680
+ # Copyright (c) 2003-2023 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-2019 Aspose Pty Ltd
3
+ # Copyright (c) 2003-2023 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-2019 Aspose Pty Ltd
433
+ # Copyright (c) 2003-2023 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-2019 Aspose Pty Ltd
490
+ # Copyright (c) 2003-2023 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-2019 Aspose Pty Ltd
539
+ # Copyright (c) 2003-2023 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-2019 Aspose Pty Ltd
592
+ # Copyright (c) 2003-2023 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-2019 Aspose Pty Ltd
641
+ # Copyright (c) 2003-2023 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-2019 Aspose Pty Ltd
3
+ # Copyright (c) 2003-2023 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-2019 Aspose Pty Ltd
277
+ # Copyright (c) 2003-2023 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-2019 Aspose Pty Ltd
322
+ # Copyright (c) 2003-2023 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-2019 Aspose Pty Ltd
3
+ # Copyright (c) 2003-2023 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 barcodes from document.
68
+ #
69
+ # @param request barcodes_request
70
+ # @return [BarcodesResult]
71
+ def barcodes(request)
72
+ data, _status_code, _headers = barcodes_with_http_info(request)
73
+ data
74
+ end
75
+
76
+ # Extract barcodes from document.
77
+ #
78
+ # @param request barcodes_request
79
+ # @return [Array<(BarcodesResult, Fixnum, Hash)>]
80
+ # BarcodesResult data, response status code and response headers
81
+ def barcodes_with_http_info(request)
82
+ raise ArgumentError, 'Incorrect request type' unless request.is_a? BarcodesRequest
83
+
84
+ @api_client.config.logger.debug 'Calling API: ParseApi.barcodes ...' if @api_client.config.debugging
85
+ # verify the required parameter 'options' is set
86
+ raise ArgumentError, 'Missing the required parameter options when calling ParseApi.barcodes' if @api_client.config.client_side_validation && request.options.nil?
87
+ # resource path
88
+ local_var_path = '/parser/barcodes'
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: 'BarcodesResult')
112
+ if @api_client.config.debugging
113
+ @api_client.config.logger.debug "API called:
114
+ ParseApi#barcodes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
115
+ end
116
+ [data, status_code, headers]
117
+ end
118
+
67
119
  # Extract images from document.
68
120
  #
69
121
  # @param request images_request
@@ -273,11 +325,56 @@ module GroupDocsParserCloud
273
325
  end
274
326
  end
275
327
  end
328
+ end
329
+ #
330
+ # --------------------------------------------------------------------------------------------------------------------
331
+ # <copyright company="Aspose Pty Ltd" file="barcodes_request.rb">
332
+ # Copyright (c) 2003-2023 Aspose Pty Ltd
333
+ # </copyright>
334
+ # <summary>
335
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
336
+ # of this software and associated documentation files (the "Software"), to deal
337
+ # in the Software without restriction, including without limitation the rights
338
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
339
+ # copies of the Software, and to permit persons to whom the Software is
340
+ # furnished to do so, subject to the following conditions:
341
+ #
342
+ # The above copyright notice and this permission notice shall be included in all
343
+ # copies or substantial portions of the Software.
344
+ #
345
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
346
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
347
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
348
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
349
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
350
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
351
+ # SOFTWARE.
352
+ # </summary>
353
+ # --------------------------------------------------------------------------------------------------------------------
354
+ #
355
+
356
+ module GroupDocsParserCloud
357
+
358
+ #
359
+ # Request model for barcodes operation.
360
+ #
361
+ class BarcodesRequest
362
+
363
+ # Extract barcode options.
364
+ attr_accessor :options
365
+
366
+ #
367
+ # Initializes a new instance.
368
+ # @param options Extract barcode options.
369
+ def initialize(options)
370
+ self.options = options
371
+ end
372
+ end
276
373
  end
277
374
  #
278
375
  # --------------------------------------------------------------------------------------------------------------------
279
376
  # <copyright company="Aspose Pty Ltd" file="images_request.rb">
280
- # Copyright (c) 2003-2019 Aspose Pty Ltd
377
+ # Copyright (c) 2003-2023 Aspose Pty Ltd
281
378
  # </copyright>
282
379
  # <summary>
283
380
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -322,7 +419,7 @@ end
322
419
  #
323
420
  # --------------------------------------------------------------------------------------------------------------------
324
421
  # <copyright company="Aspose Pty Ltd" file="parse_request.rb">
325
- # Copyright (c) 2003-2019 Aspose Pty Ltd
422
+ # Copyright (c) 2003-2023 Aspose Pty Ltd
326
423
  # </copyright>
327
424
  # <summary>
328
425
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -367,7 +464,7 @@ end
367
464
  #
368
465
  # --------------------------------------------------------------------------------------------------------------------
369
466
  # <copyright company="Aspose Pty Ltd" file="text_request.rb">
370
- # Copyright (c) 2003-2019 Aspose Pty Ltd
467
+ # Copyright (c) 2003-2023 Aspose Pty Ltd
371
468
  # </copyright>
372
469
  # <summary>
373
470
  # 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-2019 Aspose Pty Ltd
3
+ # Copyright (c) 2003-2023 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-2019 Aspose Pty Ltd
353
+ # Copyright (c) 2003-2023 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-2019 Aspose Pty Ltd
398
+ # Copyright (c) 2003-2023 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-2019 Aspose Pty Ltd
447
+ # Copyright (c) 2003-2023 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-2019 Aspose Pty Ltd
500
+ # Copyright (c) 2003-2023 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-2019 Aspose Pty Ltd
3
+ # Copyright (c) 2003-2023 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-2019 Aspose Pty Ltd
279
+ # Copyright (c) 2003-2023 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-2019 Aspose Pty Ltd
324
+ # Copyright (c) 2003-2023 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-2019 Aspose Pty Ltd
369
+ # Copyright (c) 2003-2023 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-2019 Aspose Pty Ltd
3
+ # Copyright (c) 2003-2023 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,6 +28,7 @@ require 'json'
28
28
  require 'logger'
29
29
  require 'tempfile'
30
30
  require 'faraday'
31
+ require 'mimemagic'
31
32
  require 'addressable'
32
33
  require_relative 'version'
33
34
  require_relative 'api_error'
@@ -1,6 +1,6 @@
1
1
  # -----------------------------------------------------------------------------------
2
2
  # <copyright company="Aspose Pty Ltd" file="api_error.rb">
3
- # Copyright (c) 2003-2019 Aspose Pty Ltd
3
+ # Copyright (c) 2003-2023 Aspose Pty Ltd
4
4
  # </copyright>
5
5
  # <summary>
6
6
  # 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="configuration.rb">
3
- # Copyright (c) 2003-2019 Aspose Pty Ltd
3
+ # Copyright (c) 2003-2023 Aspose Pty Ltd
4
4
  # </copyright>
5
5
  # <summary>
6
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -0,0 +1,234 @@
1
+ #
2
+ # --------------------------------------------------------------------------------------------------------------------
3
+ # <copyright company="Aspose Pty Ltd" file="barcode.rb">
4
+ # Copyright (c) 2003-2023 Aspose Pty Ltd
5
+ # </copyright>
6
+ # <summary>
7
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ # of this software and associated documentation files (the "Software"), to deal
9
+ # in the Software without restriction, including without limitation the rights
10
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ # copies of the Software, and to permit persons to whom the Software is
12
+ # furnished to do so, subject to the following conditions:
13
+ #
14
+ # The above copyright notice and this permission notice shall be included in all
15
+ # copies or substantial portions of the Software.
16
+ #
17
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ # SOFTWARE.
24
+ # </summary>
25
+ # --------------------------------------------------------------------------------------------------------------------
26
+ #
27
+
28
+ require 'date'
29
+
30
+ module GroupDocsParserCloud
31
+ # Represents an barcode.
32
+ class Barcode
33
+
34
+ # Gets the name of the barcode type.
35
+ attr_accessor :code_type_name
36
+
37
+ # Gets the barcode value.
38
+ attr_accessor :value
39
+
40
+ # Gets or sets the barcode download URL.
41
+ attr_accessor :download_url
42
+
43
+ # Attribute mapping from ruby-style variable name to JSON key.
44
+ def self.attribute_map
45
+ {
46
+ :'code_type_name' => :'CodeTypeName',
47
+ :'value' => :'Value',
48
+ :'download_url' => :'DownloadUrl'
49
+ }
50
+ end
51
+
52
+ # Attribute type mapping.
53
+ def self.swagger_types
54
+ {
55
+ :'code_type_name' => :'String',
56
+ :'value' => :'String',
57
+ :'download_url' => :'String'
58
+ }
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ return unless attributes.is_a?(Hash)
65
+
66
+ # convert string to symbol for hash key
67
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
68
+
69
+ if attributes.key?(:'CodeTypeName')
70
+ self.code_type_name = attributes[:'CodeTypeName']
71
+ end
72
+
73
+ if attributes.key?(:'Value')
74
+ self.value = attributes[:'Value']
75
+ end
76
+
77
+ if attributes.key?(:'DownloadUrl')
78
+ self.download_url = attributes[:'DownloadUrl']
79
+ end
80
+
81
+ end
82
+
83
+ # Show invalid properties with the reasons. Usually used together with valid?
84
+ # @return Array for valid properies with the reasons
85
+ def list_invalid_properties
86
+ invalid_properties = []
87
+ return invalid_properties
88
+ end
89
+
90
+ # Check to see if the all the properties in the model are valid
91
+ # @return true if the model is valid
92
+ def valid?
93
+ return true
94
+ end
95
+
96
+ # Checks equality by comparing each attribute.
97
+ # @param [Object] Object to be compared
98
+ def ==(other)
99
+ return true if self.equal?(other)
100
+ self.class == other.class &&
101
+ code_type_name == other.code_type_name &&
102
+ value == other.value &&
103
+ download_url == other.download_url
104
+ end
105
+
106
+ # @see the `==` method
107
+ # @param [Object] Object to be compared
108
+ def eql?(other)
109
+ self == other
110
+ end
111
+
112
+ # Calculates hash code according to all attributes.
113
+ # @return [Fixnum] Hash code
114
+ def hash
115
+ [code_type_name, value, download_url].hash
116
+ end
117
+
118
+ # Downcases first letter.
119
+ # @return downcased string
120
+ def uncap(str)
121
+ str[0, 1].downcase + str[1..-1]
122
+ end
123
+
124
+ # Builds the object from hash
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ # @return [Object] Returns the model itself
127
+ def build_from_hash(attributes)
128
+ return nil unless attributes.is_a?(Hash)
129
+ self.class.swagger_types.each_pair do |key, type|
130
+ pname = uncap(self.class.attribute_map[key]).intern
131
+ value = attributes[pname]
132
+ if type =~ /\AArray<(.*)>/i
133
+ # check to ensure the input is an array given that the the attribute
134
+ # is documented as an array but the input is not
135
+ if value.is_a?(Array)
136
+ self.send("#{key}=", value.map { |v| _deserialize($1, v) })
137
+ end
138
+ elsif !value.nil?
139
+ self.send("#{key}=", _deserialize(type, value))
140
+ end
141
+ # or else data not found in attributes(hash), not an issue as the data can be optional
142
+ end
143
+
144
+ self
145
+ end
146
+
147
+ # Deserializes the data based on type
148
+ # @param string type Data type
149
+ # @param string value Value to be deserialized
150
+ # @return [Object] Deserialized data
151
+ def _deserialize(type, value)
152
+ case type.to_sym
153
+ when :DateTime
154
+ Date.parse value
155
+ when :Date
156
+ Date.parse value
157
+ when :String
158
+ value.to_s
159
+ when :Integer
160
+ value.to_i
161
+ when :Float
162
+ value.to_f
163
+ when :BOOLEAN
164
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
165
+ true
166
+ else
167
+ false
168
+ end
169
+ when :Object
170
+ # generic object (usually a Hash), return directly
171
+ value
172
+ when /\AArray<(?<inner_type>.+)>\z/
173
+ inner_type = Regexp.last_match[:inner_type]
174
+ value.map { |v| _deserialize(inner_type, v) }
175
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
176
+ k_type = Regexp.last_match[:k_type]
177
+ v_type = Regexp.last_match[:v_type]
178
+ {}.tap do |hash|
179
+ value.each do |k, v|
180
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
181
+ end
182
+ end
183
+ else
184
+ # model
185
+ temp_model = GroupDocsParserCloud.const_get(type).new
186
+ temp_model.build_from_hash(value)
187
+ end
188
+ end
189
+
190
+ # Returns the string representation of the object
191
+ # @return [String] String presentation of the object
192
+ def to_s
193
+ to_hash.to_s
194
+ end
195
+
196
+ # to_body is an alias to to_hash (backward compatibility)
197
+ # @return [Hash] Returns the object in the form of hash
198
+ def to_body
199
+ to_hash
200
+ end
201
+
202
+ # Returns the object in the form of hash
203
+ # @return [Hash] Returns the object in the form of hash
204
+ def to_hash
205
+ hash = {}
206
+ self.class.attribute_map.each_pair do |attr, param|
207
+ value = self.send(attr)
208
+ next if value.nil?
209
+ hash[param] = _to_hash(value)
210
+ end
211
+ hash
212
+ end
213
+
214
+ # Outputs non-array value in the form of hash
215
+ # For object, use to_hash. Otherwise, just return the value
216
+ # @param [Object] value Any valid value
217
+ # @return [Hash] Returns the value in the form of hash
218
+ def _to_hash(value)
219
+ if value.is_a?(Array)
220
+ value.compact.map { |v| _to_hash(v) }
221
+ elsif value.is_a?(Hash)
222
+ {}.tap do |hash|
223
+ value.each { |k, v| hash[k] = _to_hash(v) }
224
+ end
225
+ elsif value.respond_to? :to_hash
226
+ value.to_hash
227
+ else
228
+ value
229
+ end
230
+ end
231
+
232
+ end
233
+
234
+ end