Skip to content

Commit

Permalink
Release 22.10 (#47)
Browse files Browse the repository at this point in the history
Add bytearray type to make a difference between filename and image bytes in Python 2

Pdf417MacroTerminator enum added


Co-authored-by: Ivan Kamkin <234-Ivan.Kamkin@users.noreply.git.saltov.dynabic.com>
Co-authored-by: Denis Averin <denis.averin@aspose.com>
  • Loading branch information
3 people committed Oct 28, 2022
1 parent 04a9982 commit 654e6b4
Show file tree
Hide file tree
Showing 11 changed files with 154 additions and 8 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.9.0
- Package version: 22.10.0

## Demo applications

Expand Down Expand Up @@ -188,6 +188,7 @@ Class | Method | HTTP request | Description
- [PatchFormat](docs/PatchFormat.md)
- [Pdf417CompactionMode](docs/Pdf417CompactionMode.md)
- [Pdf417ErrorLevel](docs/Pdf417ErrorLevel.md)
- [Pdf417MacroTerminator](docs/Pdf417MacroTerminator.md)
- [Pdf417Params](docs/Pdf417Params.md)
- [PostalParams](docs/PostalParams.md)
- [PresetType](docs/PresetType.md)
Expand Down
1 change: 1 addition & 0 deletions aspose_barcode_cloud/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
from aspose_barcode_cloud.models.patch_format import PatchFormat
from aspose_barcode_cloud.models.pdf417_compaction_mode import Pdf417CompactionMode
from aspose_barcode_cloud.models.pdf417_error_level import Pdf417ErrorLevel
from aspose_barcode_cloud.models.pdf417_macro_terminator import Pdf417MacroTerminator
from aspose_barcode_cloud.models.pdf417_params import Pdf417Params
from aspose_barcode_cloud.models.postal_params import PostalParams
from aspose_barcode_cloud.models.preset_type import PresetType
Expand Down
6 changes: 3 additions & 3 deletions aspose_barcode_cloud/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.9.0",
"x-aspose-client-version": "22.10.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.9.0/python"
self.user_agent = "Aspose-Barcode-SDK/22.10.0/python"

def __del__(self):
self.rest_client.close()
Expand Down Expand Up @@ -207,7 +207,7 @@ def __call_api(
if _return_http_data_only:
return return_data
else:
return return_data, response_data.status, response_data.getheaders()
return (return_data, response_data.status, response_data.getheaders())

def sanitize_for_serialization(self, obj):
"""Builds a JSON POST object.
Expand Down
2 changes: 1 addition & 1 deletion aspose_barcode_cloud/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.9.0".format(env=sys.platform, pyversion=sys.version)
"SDK Package Version: 22.10.0".format(env=sys.platform, pyversion=sys.version)
)

@staticmethod
Expand Down
1 change: 1 addition & 0 deletions aspose_barcode_cloud/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
from aspose_barcode_cloud.models.patch_format import PatchFormat
from aspose_barcode_cloud.models.pdf417_compaction_mode import Pdf417CompactionMode
from aspose_barcode_cloud.models.pdf417_error_level import Pdf417ErrorLevel
from aspose_barcode_cloud.models.pdf417_macro_terminator import Pdf417MacroTerminator
from aspose_barcode_cloud.models.pdf417_params import Pdf417Params
from aspose_barcode_cloud.models.postal_params import PostalParams
from aspose_barcode_cloud.models.preset_type import PresetType
Expand Down
104 changes: 104 additions & 0 deletions aspose_barcode_cloud/models/pdf417_macro_terminator.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# 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 Pdf417MacroTerminator(object):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""

"""
allowed enum values
"""
AUTO = "Auto"
NONE = "None"
SET = "Set"

"""
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
"""Pdf417MacroTerminator - 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(Pdf417MacroTerminator, 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, Pdf417MacroTerminator):
return False

return self.__dict__ == other.__dict__

def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
29 changes: 29 additions & 0 deletions aspose_barcode_cloud/models/pdf417_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ class Pdf417Params(object):
"macro_addressee": "str",
"macro_eci_encoding": "ECIEncodings",
"code128_emulation": "Code128Emulation",
"pdf417_macro_terminator": "Pdf417MacroTerminator",
}

attribute_map = {
Expand All @@ -88,6 +89,7 @@ class Pdf417Params(object):
"macro_addressee": "MacroAddressee",
"macro_eci_encoding": "MacroECIEncoding",
"code128_emulation": "Code128Emulation",
"pdf417_macro_terminator": "Pdf417MacroTerminator",
}

def __init__(
Expand All @@ -112,6 +114,7 @@ def __init__(
macro_addressee=None,
macro_eci_encoding=None,
code128_emulation=None,
pdf417_macro_terminator=None,
): # noqa: E501
"""Pdf417Params - a model defined in Swagger""" # noqa: E501

Expand All @@ -135,6 +138,7 @@ def __init__(
self._macro_addressee = None
self._macro_eci_encoding = None
self._code128_emulation = None
self._pdf417_macro_terminator = None
self.discriminator = None

if aspect_ratio is not None:
Expand Down Expand Up @@ -177,6 +181,8 @@ def __init__(
self.macro_eci_encoding = macro_eci_encoding
if code128_emulation is not None:
self.code128_emulation = code128_emulation
if pdf417_macro_terminator is not None:
self.pdf417_macro_terminator = pdf417_macro_terminator

@property
def aspect_ratio(self):
Expand Down Expand Up @@ -638,6 +644,29 @@ def code128_emulation(self, code128_emulation):

self._code128_emulation = code128_emulation

@property
def pdf417_macro_terminator(self):
"""Gets the pdf417_macro_terminator of this Pdf417Params. # noqa: E501
Used to tell the encoder whether to add Macro PDF417 Terminator (codeword 922) to the segment. Applied only for Macro PDF417. # noqa: E501
:return: The pdf417_macro_terminator of this Pdf417Params. # noqa: E501
:rtype: Pdf417MacroTerminator
"""
return self._pdf417_macro_terminator

@pdf417_macro_terminator.setter
def pdf417_macro_terminator(self, pdf417_macro_terminator):
"""Sets the pdf417_macro_terminator of this Pdf417Params.
Used to tell the encoder whether to add Macro PDF417 Terminator (codeword 922) to the segment. Applied only for Macro PDF417. # noqa: E501
:param pdf417_macro_terminator: The pdf417_macro_terminator of this Pdf417Params. # noqa: E501
:type: Pdf417MacroTerminator
"""

self._pdf417_macro_terminator = pdf417_macro_terminator

def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
Expand Down
9 changes: 9 additions & 0 deletions docs/Pdf417MacroTerminator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Pdf417MacroTerminator

## 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)


1 change: 1 addition & 0 deletions docs/Pdf417Params.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Name | Type | Description | Notes
**macro_addressee** | **str** | Macro Pdf417 barcode addressee name | [optional]
**macro_eci_encoding** | [**ECIEncodings**](ECIEncodings.md) | Extended Channel Interpretation Identifiers. Applies for Macro PDF417 text fields. | [optional]
**code128_emulation** | [**Code128Emulation**](Code128Emulation.md) | Function codeword for Code 128 emulation. Applied for MicroPDF417 only. Ignored for PDF417 and MacroPDF417 barcodes. | [optional]
**pdf417_macro_terminator** | [**Pdf417MacroTerminator**](Pdf417MacroTerminator.md) | Used to tell the encoder whether to add Macro PDF417 Terminator (codeword 922) to the segment. Applied only for Macro PDF417. | [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)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from setuptools import setup, find_packages

NAME = "aspose-barcode-cloud"
VERSION = "22.9.0"
VERSION = "22.10.0"
# To install the library, run the following
#
# python setup.py install
Expand Down
4 changes: 2 additions & 2 deletions tests/test_headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.9.0/python", headers["User-Agent"])
self.assertEqual("Aspose-Barcode-SDK/22.10.0/python", headers["User-Agent"])
self.assertEqual("python sdk", headers["x-aspose-client"])
self.assertEqual("22.9.0", headers["x-aspose-client-version"])
self.assertEqual("22.10.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")
Expand Down

0 comments on commit 654e6b4

Please sign in to comment.