diff --git a/docs/v1/accounting/index.html b/docs/v1/accounting/index.html index 459219a9..66072622 100644 --- a/docs/v1/accounting/index.html +++ b/docs/v1/accounting/index.html @@ -12293,7 +12293,7 @@ SDK: - VSN: 1.8.0 + VSN: 1.8.1 Methods createAccount diff --git a/setup.py b/setup.py index fff2549e..6ee59f09 100644 --- a/setup.py +++ b/setup.py @@ -48,5 +48,5 @@ def read_file(filename): keywords="xero python sdk API oAuth", name="xero_python", packages=find_packages(include=["xero_python", "xero_python.*"]), - version="1.8.0", + version="1.8.1", ) diff --git a/xero_python/__init__.py b/xero_python/__init__.py index 45088345..2a6b75a7 100644 --- a/xero_python/__init__.py +++ b/xero_python/__init__.py @@ -2,4 +2,4 @@ __author__ = """Xero Developer API""" __email__ = "api@xero.com" -__version__ = "1.8.0" +__version__ = "1.8.1" diff --git a/xero_python/api_client/deserializer.py b/xero_python/api_client/deserializer.py index e8f177a3..6a2e4b8e 100644 --- a/xero_python/api_client/deserializer.py +++ b/xero_python/api_client/deserializer.py @@ -22,7 +22,7 @@ ) MS_DATETIME_RE = re.compile(r"/Date\((?P-?\d+)(?P[+-]\d{2,4})?\)/$") - +DATE_WITH_NO_DAY_RE = re.compile("(\d\d\d\d)-(\d\d)") def deserialize_routing(data_type, data, model_finder): """Custom logic to find matching deserialize implementation and @@ -250,6 +250,8 @@ def deserialize_datetime_ms(data_type, data, model_finder): timestamp_ms = int(match.groupdict()["timestamp"]) timestamp_s = timestamp_ms / 1000 return datetime.datetime.fromtimestamp(timestamp_s, tz=tz_info) + elif DATE_WITH_NO_DAY_RE.match(str(data)): + return datetime.datetime.strptime(data + '-01', '%Y-%m-%d') else: raise ValueError("Invalid datetime value {!r}".format(data)) diff --git a/xero_python/docs/README.md b/xero_python/docs/README.md index a90307b4..8679dfa7 100644 --- a/xero_python/docs/README.md +++ b/xero_python/docs/README.md @@ -4,7 +4,7 @@ These endpoints are related to managing authentication tokens and identity for X The `xero_python` package is automatically generated by the [XeroAPI SDK 2.0 Codegen](https://github.com/xero-github/xeroapi-sdk-codegen) project: - API version: 2.13.4 -- Package version: 1.8.0 +- Package version: 1.8.1 - Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit [https://developer.xero.com](https://developer.xero.com)