Skip to content

Commit 8fb3aa1

Browse files
committed
adds seat unit to product model
1 parent 497b28c commit 8fb3aa1

File tree

17 files changed

+61
-28
lines changed

17 files changed

+61
-28
lines changed

docs/v1/accounting/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5936,7 +5936,7 @@
59365936
<nav id="scrollingNav">
59375937
<ul class="sidenav nav nav-list">
59385938
<li class="nav-header" data-group="Accounting"><strong>SDK: </strong><span id='sdk-name'></span></li>
5939-
<li class="nav-header" data-group="Accounting"><strong>VSN: </strong>1.9.0b1</li>
5939+
<li class="nav-header" data-group="Accounting"><strong>VSN: </strong>1.9.0b2</li>
59405940
<li class="nav-header" data-group="Accounting"><a href="#api-Accounting">Methods</a></li>
59415941
<li data-group="Accounting" data-name="createAccount" class="">
59425942
<a href="#api-Accounting-createAccount">createAccount</a>

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,5 @@ def read_file(filename):
4848
keywords="xero python sdk API oAuth",
4949
name="xero_python",
5050
packages=find_packages(include=["xero_python", "xero_python.*"]),
51-
version="1.9.0b1",
51+
version="1.9.0b2",
5252
)

xero_python/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
__author__ = """Xero Developer API"""
44
__email__ = "[email protected]"
5-
__version__ = "1.9.0b1"
5+
__version__ = "1.9.0b2"

xero_python/accounting/api/accounting_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"""
1111

1212
"""
13-
OpenAPI spec version: 2.15.0
13+
OpenAPI spec version: 2.16.1
1414
"""
1515

1616
import importlib

xero_python/api_client/deserializer.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -211,16 +211,17 @@ def deserialize_datetime(data_type, data, model_finder):
211211
:return: deserialized datetime.datetime
212212
213213
"""
214-
try:
215-
dt = isoparse(data)
216-
except (ValueError, TypeError):
217-
raise ValueError("Invalid datetime value {!r}".format(data))
214+
if data is not None:
215+
try:
216+
dt = isoparse(data)
217+
except (ValueError, TypeError):
218+
raise ValueError("Invalid datetime value {!r}".format(data))
218219

219-
if not dt.tzinfo:
220-
# timezone naive datetime from Xero API response always in UTC
221-
dt = dt.replace(tzinfo=tz.UTC)
220+
if not dt.tzinfo:
221+
# timezone naive datetime from Xero API response always in UTC
222+
dt = dt.replace(tzinfo=tz.UTC)
222223

223-
return dt
224+
return dt
224225

225226

226227
@deserialize.register("datetime[ms-format]")

xero_python/appstore/api/app_store_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"""
1111

1212
"""
13-
OpenAPI spec version: 2.15.0
13+
OpenAPI spec version: 2.16.1
1414
"""
1515

1616
import importlib

xero_python/appstore/docs/Product.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
66
**id** | **str** | The unique identifier for the product | [optional]
77
**name** | **str** | The name of the product | [optional]
88
**type** | **str** | The pricing model of the product: * FIXED: Customers are charged a fixed amount for each billing period * PER_SEAT: Customers are charged based on the number of units they purchase | [optional]
9+
**seat_unit** | **str** | The unit of the per seat product. e.g. \&quot;user\&quot;, \&quot;organisation\&quot;, \&quot;SMS\&quot;, etc | [optional]
910

1011
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1112

xero_python/appstore/models/product.py

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,22 @@ class Product(BaseModel):
2929
attribute_map (dict): The key is attribute name
3030
and the value is json key in definition.
3131
"""
32-
openapi_types = {"id": "str", "name": "str", "type": "str"}
32+
openapi_types = {"id": "str", "name": "str", "type": "str", "seat_unit": "str"}
3333

34-
attribute_map = {"id": "id", "name": "name", "type": "type"}
34+
attribute_map = {
35+
"id": "id",
36+
"name": "name",
37+
"type": "type",
38+
"seat_unit": "seatUnit",
39+
}
3540

36-
def __init__(self, id=None, name=None, type=None): # noqa: E501
41+
def __init__(self, id=None, name=None, type=None, seat_unit=None): # noqa: E501
3742
"""Product - a model defined in OpenAPI""" # noqa: E501
3843

3944
self._id = None
4045
self._name = None
4146
self._type = None
47+
self._seat_unit = None
4248
self.discriminator = None
4349

4450
if id is not None:
@@ -47,6 +53,8 @@ def __init__(self, id=None, name=None, type=None): # noqa: E501
4753
self.name = name
4854
if type is not None:
4955
self.type = type
56+
if seat_unit is not None:
57+
self.seat_unit = seat_unit
5058

5159
@property
5260
def id(self):
@@ -125,3 +133,26 @@ def type(self, type):
125133
)
126134

127135
self._type = type
136+
137+
@property
138+
def seat_unit(self):
139+
"""Gets the seat_unit of this Product. # noqa: E501
140+
141+
The unit of the per seat product. e.g. \"user\", \"organisation\", \"SMS\", etc # noqa: E501
142+
143+
:return: The seat_unit of this Product. # noqa: E501
144+
:rtype: str
145+
"""
146+
return self._seat_unit
147+
148+
@seat_unit.setter
149+
def seat_unit(self, seat_unit):
150+
"""Sets the seat_unit of this Product.
151+
152+
The unit of the per seat product. e.g. \"user\", \"organisation\", \"SMS\", etc # noqa: E501
153+
154+
:param seat_unit: The seat_unit of this Product. # noqa: E501
155+
:type: str
156+
"""
157+
158+
self._seat_unit = seat_unit

xero_python/assets/api/asset_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"""
1111

1212
"""
13-
OpenAPI spec version: 2.15.0
13+
OpenAPI spec version: 2.16.1
1414
"""
1515

1616
import importlib

xero_python/docs/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ These endpoints are related to managing authentication tokens and identity for X
33

44
The `xero_python` package is automatically generated by the [XeroAPI SDK 2.0 Codegen](https://github.com/xero-github/xeroapi-sdk-codegen) project:
55

6-
- API version: 2.15.0
7-
- Package version: 1.9.0b1
6+
- API version: 2.16.1
7+
- Package version: 1.9.0b2
88
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
99
For more information, please visit [https://developer.xero.com](https://developer.xero.com)
1010

0 commit comments

Comments
 (0)