diff --git a/.github/workflows/python-latest.yml b/.github/workflows/python-latest.yml index 01be9d1..9b13a45 100644 --- a/.github/workflows/python-latest.yml +++ b/.github/workflows/python-latest.yml @@ -9,7 +9,7 @@ on: jobs: # Define the job to run before your matrix job get-python-versions: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 outputs: python-matrix: ${{ steps.get-python-versions-action.outputs.latest-python-versions }} steps: diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 10acbdf..f16f71e 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -12,7 +12,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 strategy: matrix: # see https://www.python.org/downloads/ diff --git a/README.md b/README.md index db10df8..f26b927 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![PyPI](https://img.shields.io/pypi/v/aspose-barcode-cloud)](https://pypi.org/project/aspose-barcode-cloud/) - API version: 3.0 -- Package version: 22.10.0 +- Package version: 22.11.0 ## Demo applications @@ -181,6 +181,7 @@ Class | Method | HTTP request | Description - [ITF14BorderType](docs/ITF14BorderType.md) - [ITFParams](docs/ITFParams.md) - [MacroCharacter](docs/MacroCharacter.md) +- [MaxiCodeMode](docs/MaxiCodeMode.md) - [MaxiCodeParams](docs/MaxiCodeParams.md) - [ObjectExist](docs/ObjectExist.md) - [Padding](docs/Padding.md) diff --git a/aspose_barcode_cloud/__init__.py b/aspose_barcode_cloud/__init__.py index 04a2000..22be4ce 100644 --- a/aspose_barcode_cloud/__init__.py +++ b/aspose_barcode_cloud/__init__.py @@ -86,6 +86,7 @@ from aspose_barcode_cloud.models.itf14_border_type import ITF14BorderType from aspose_barcode_cloud.models.itf_params import ITFParams from aspose_barcode_cloud.models.macro_character import MacroCharacter +from aspose_barcode_cloud.models.maxi_code_mode import MaxiCodeMode from aspose_barcode_cloud.models.maxi_code_params import MaxiCodeParams from aspose_barcode_cloud.models.object_exist import ObjectExist from aspose_barcode_cloud.models.padding import Padding diff --git a/aspose_barcode_cloud/api_client.py b/aspose_barcode_cloud/api_client.py index 9dbf026..65cfce8 100644 --- a/aspose_barcode_cloud/api_client.py +++ b/aspose_barcode_cloud/api_client.py @@ -91,13 +91,13 @@ def __init__(self, configuration=None, header_name=None, header_value=None, cook self.rest_client = RESTClientObject(configuration) self.default_headers = { "x-aspose-client": "python sdk", - "x-aspose-client-version": "22.10.0", + "x-aspose-client-version": "22.11.0", } if header_name is not None: self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = "Aspose-Barcode-SDK/22.10.0/python" + self.user_agent = "Aspose-Barcode-SDK/22.11.0/python" def __del__(self): self.rest_client.close() diff --git a/aspose_barcode_cloud/configuration.py b/aspose_barcode_cloud/configuration.py index ee69a90..7651eba 100644 --- a/aspose_barcode_cloud/configuration.py +++ b/aspose_barcode_cloud/configuration.py @@ -286,7 +286,7 @@ def to_debug_report(self): "OS: {env}\n" "Python Version: {pyversion}\n" "Version of the API: 3.0\n" - "SDK Package Version: 22.10.0".format(env=sys.platform, pyversion=sys.version) + "SDK Package Version: 22.11.0".format(env=sys.platform, pyversion=sys.version) ) @staticmethod diff --git a/aspose_barcode_cloud/models/__init__.py b/aspose_barcode_cloud/models/__init__.py index 93764f0..3bdf9a0 100644 --- a/aspose_barcode_cloud/models/__init__.py +++ b/aspose_barcode_cloud/models/__init__.py @@ -73,6 +73,7 @@ from aspose_barcode_cloud.models.itf14_border_type import ITF14BorderType from aspose_barcode_cloud.models.itf_params import ITFParams from aspose_barcode_cloud.models.macro_character import MacroCharacter +from aspose_barcode_cloud.models.maxi_code_mode import MaxiCodeMode from aspose_barcode_cloud.models.maxi_code_params import MaxiCodeParams from aspose_barcode_cloud.models.object_exist import ObjectExist from aspose_barcode_cloud.models.padding import Padding diff --git a/aspose_barcode_cloud/models/maxi_code_mode.py b/aspose_barcode_cloud/models/maxi_code_mode.py new file mode 100644 index 0000000..511b8f6 --- /dev/null +++ b/aspose_barcode_cloud/models/maxi_code_mode.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + + Copyright (c) 2022 Aspose.BarCode for Cloud + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + +""" + + +import pprint +import re # noqa: F401 + +import six + + +class MaxiCodeMode(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + MODE2 = "Mode2" + MODE3 = "Mode3" + MODE4 = "Mode4" + MODE5 = "Mode5" + MODE6 = "Mode6" + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {} + + attribute_map = {} + + def __init__(self): # noqa: E501 + """MaxiCodeMode - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(MaxiCodeMode, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MaxiCodeMode): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/aspose_barcode_cloud/models/maxi_code_params.py b/aspose_barcode_cloud/models/maxi_code_params.py index 80de2f2..822d6d7 100644 --- a/aspose_barcode_cloud/models/maxi_code_params.py +++ b/aspose_barcode_cloud/models/maxi_code_params.py @@ -44,21 +44,21 @@ class MaxiCodeParams(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"aspect_ratio": "float", "encode_mode": "int"} + swagger_types = {"aspect_ratio": "float", "mode": "MaxiCodeMode"} - attribute_map = {"aspect_ratio": "AspectRatio", "encode_mode": "EncodeMode"} + attribute_map = {"aspect_ratio": "AspectRatio", "mode": "Mode"} - def __init__(self, aspect_ratio=None, encode_mode=None): # noqa: E501 + def __init__(self, aspect_ratio=None, mode=None): # noqa: E501 """MaxiCodeParams - a model defined in Swagger""" # noqa: E501 self._aspect_ratio = None - self._encode_mode = None + self._mode = None self.discriminator = None if aspect_ratio is not None: self.aspect_ratio = aspect_ratio - if encode_mode is not None: - self.encode_mode = encode_mode + if mode is not None: + self.mode = mode @property def aspect_ratio(self): @@ -84,27 +84,27 @@ def aspect_ratio(self, aspect_ratio): self._aspect_ratio = aspect_ratio @property - def encode_mode(self): - """Gets the encode_mode of this MaxiCodeParams. # noqa: E501 + def mode(self): + """Gets the mode of this MaxiCodeParams. # noqa: E501 - MaxiCode encode mode. # noqa: E501 + Encoding mode for MaxiCode barcodes. # noqa: E501 - :return: The encode_mode of this MaxiCodeParams. # noqa: E501 - :rtype: int + :return: The mode of this MaxiCodeParams. # noqa: E501 + :rtype: MaxiCodeMode """ - return self._encode_mode + return self._mode - @encode_mode.setter - def encode_mode(self, encode_mode): - """Sets the encode_mode of this MaxiCodeParams. + @mode.setter + def mode(self, mode): + """Sets the mode of this MaxiCodeParams. - MaxiCode encode mode. # noqa: E501 + Encoding mode for MaxiCode barcodes. # noqa: E501 - :param encode_mode: The encode_mode of this MaxiCodeParams. # noqa: E501 - :type: int + :param mode: The mode of this MaxiCodeParams. # noqa: E501 + :type: MaxiCodeMode """ - self._encode_mode = encode_mode + self._mode = mode def to_dict(self): """Returns the model properties as a dict""" diff --git a/docs/MaxiCodeMode.md b/docs/MaxiCodeMode.md new file mode 100644 index 0000000..6667d2f --- /dev/null +++ b/docs/MaxiCodeMode.md @@ -0,0 +1,9 @@ +# MaxiCodeMode + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MaxiCodeParams.md b/docs/MaxiCodeParams.md index 426d6a8..9ebb588 100644 --- a/docs/MaxiCodeParams.md +++ b/docs/MaxiCodeParams.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **aspect_ratio** | **float** | Height/Width ratio of 2D BarCode module. | [optional] -**encode_mode** | **int** | MaxiCode encode mode. | [optional] +**mode** | [**MaxiCodeMode**](MaxiCodeMode.md) | Encoding mode for MaxiCode barcodes. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/setup.py b/setup.py index 1400f8c..4594b1d 100644 --- a/setup.py +++ b/setup.py @@ -29,7 +29,7 @@ from setuptools import setup, find_packages NAME = "aspose-barcode-cloud" -VERSION = "22.10.0" +VERSION = "22.11.0" # To install the library, run the following # # python setup.py install diff --git a/tests/test_headers.py b/tests/test_headers.py index 94849dd..298e47d 100644 --- a/tests/test_headers.py +++ b/tests/test_headers.py @@ -24,9 +24,9 @@ def test_default_headers(self): self.assertEqual(1, self.rest_client_mock.GET.call_count) headers = self.rest_client_mock.GET.call_args[1]["headers"] - self.assertEqual("Aspose-Barcode-SDK/22.10.0/python", headers["User-Agent"]) + self.assertEqual("Aspose-Barcode-SDK/22.11.0/python", headers["User-Agent"]) self.assertEqual("python sdk", headers["x-aspose-client"]) - self.assertEqual("22.10.0", headers["x-aspose-client-version"]) + self.assertEqual("22.11.0", headers["x-aspose-client-version"]) def test_header_override(self): api_client = ApiClient(self.local_config, header_name="x-aspose-client", header_value="some custom sdk") diff --git a/tox.ini b/tox.ini index 03f4e75..f783f6c 100644 --- a/tox.ini +++ b/tox.ini @@ -11,3 +11,4 @@ deps=-r{toxinidir}/requirements.txt commands= make clean-pyc make test + \ No newline at end of file