Skip to content

Commit 66856a7

Browse files
authored
Merge pull request #79 from XeroAPI/xero-python-1.13.0
generates xero-python-1.13.0 from OAS 2.18.0
2 parents 53a028c + b6077cb commit 66856a7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+2814
-22
lines changed

docs/v1/accounting/index.html

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3535,6 +3535,9 @@
35353535
"format" : "double",
35363536
"x-is-money" : true
35373537
},
3538+
"Item" : {
3539+
"$ref" : "#/components/schemas/LineItemItem"
3540+
},
35383541
"LineAmount" : {
35393542
"type" : "number",
35403543
"description" : "If you wish to omit either of the <Quantity> or <UnitAmount> you can provide a LineAmount and Xero will calculate the missing amount for you. The line amount reflects the discounted price if a DiscountRate has been used . i.e LineAmount = Quantity * Unit Amount * ((100 – DiscountRate)/100)",
@@ -3571,6 +3574,27 @@
35713574
"externalDocs" : {
35723575
"url" : "https://developer.xero.com/documentation/api/invoices#post"
35733576
}
3577+
};
3578+
defs["LineItemItem"] = {
3579+
"title" : "",
3580+
"properties" : {
3581+
"Code" : {
3582+
"maxLength" : 30,
3583+
"type" : "string",
3584+
"description" : "User defined item code (max length = 30)"
3585+
},
3586+
"Name" : {
3587+
"maxLength" : 50,
3588+
"type" : "string",
3589+
"description" : "The name of the item (max length = 50)"
3590+
},
3591+
"ItemID" : {
3592+
"type" : "string",
3593+
"description" : "The Xero identifier for an Item",
3594+
"format" : "uuid"
3595+
}
3596+
},
3597+
"description" : ""
35743598
};
35753599
defs["LineItemTracking"] = {
35763600
"title" : "",
@@ -5976,7 +6000,7 @@
59766000
<nav id="scrollingNav">
59776001
<ul class="sidenav nav nav-list">
59786002
<li class="nav-header" data-group="Accounting"><strong>SDK: </strong><span id='sdk-name'></span></li>
5979-
<li class="nav-header" data-group="Accounting"><strong>VSN: </strong>1.12.0</li>
6003+
<li class="nav-header" data-group="Accounting"><strong>VSN: </strong>1.13.0</li>
59806004
<li class="nav-header" data-group="Accounting"><a href="#api-Accounting">Methods</a></li>
59816005
<li data-group="Accounting" data-name="createAccount" class="">
59826006
<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.12.0",
51+
version="1.13.0",
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.12.0"
5+
__version__ = "1.13.0"

xero_python/accounting/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@
9191
from xero_python.accounting.models.journals import Journals
9292
from xero_python.accounting.models.line_amount_types import LineAmountTypes
9393
from xero_python.accounting.models.line_item import LineItem
94+
from xero_python.accounting.models.line_item_item import LineItemItem
9495
from xero_python.accounting.models.line_item_tracking import LineItemTracking
9596
from xero_python.accounting.models.linked_transaction import LinkedTransaction
9697
from xero_python.accounting.models.linked_transactions import LinkedTransactions

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.17.4
13+
OpenAPI spec version: 2.19.1
1414
"""
1515

1616
import importlib

xero_python/accounting/docs/LineItem.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Name | Type | Description | Notes
1212
**account_id** | **str** | The associated account ID related to this line item | [optional]
1313
**tax_type** | **str** | The tax type from TaxRates | [optional]
1414
**tax_amount** | **float** | The tax amount is auto calculated as a percentage of the line amount (see below) based on the tax rate. This value can be overriden if the calculated &lt;TaxAmount&gt; is not correct. | [optional]
15+
**item** | [**LineItemItem**](LineItemItem.md) | | [optional]
1516
**line_amount** | **float** | If you wish to omit either of the &lt;Quantity&gt; or &lt;UnitAmount&gt; you can provide a LineAmount and Xero will calculate the missing amount for you. The line amount reflects the discounted price if a DiscountRate has been used . i.e LineAmount &#x3D; Quantity * Unit Amount * ((100 – DiscountRate)/100) | [optional]
1617
**tracking** | [**list[LineItemTracking]**](LineItemTracking.md) | Optional Tracking Category – see Tracking. Any LineItem can have a maximum of 2 &lt;TrackingCategory&gt; elements. | [optional]
1718
**discount_rate** | **float** | Percentage discount being applied to a line item (only supported on ACCREC invoices – ACC PAY invoices and credit notes in Xero do not support discounts | [optional]
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# LineItemItem
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**code** | **str** | User defined item code (max length &#x3D; 30) | [optional]
7+
**name** | **str** | The name of the item (max length &#x3D; 50) | [optional]
8+
**item_id** | **str** | The Xero identifier for an Item | [optional]
9+
10+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11+
12+

xero_python/accounting/models/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
from xero_python.accounting.models.journals import Journals
8787
from xero_python.accounting.models.line_amount_types import LineAmountTypes
8888
from xero_python.accounting.models.line_item import LineItem
89+
from xero_python.accounting.models.line_item_item import LineItemItem
8990
from xero_python.accounting.models.line_item_tracking import LineItemTracking
9091
from xero_python.accounting.models.linked_transaction import LinkedTransaction
9192
from xero_python.accounting.models.linked_transactions import LinkedTransactions

xero_python/accounting/models/line_item.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ class LineItem(BaseModel):
3939
"account_id": "str",
4040
"tax_type": "str",
4141
"tax_amount": "float",
42+
"item": "LineItemItem",
4243
"line_amount": "float",
4344
"tracking": "list[LineItemTracking]",
4445
"discount_rate": "float",
@@ -56,6 +57,7 @@ class LineItem(BaseModel):
5657
"account_id": "AccountID",
5758
"tax_type": "TaxType",
5859
"tax_amount": "TaxAmount",
60+
"item": "Item",
5961
"line_amount": "LineAmount",
6062
"tracking": "Tracking",
6163
"discount_rate": "DiscountRate",
@@ -74,6 +76,7 @@ def __init__(
7476
account_id=None,
7577
tax_type=None,
7678
tax_amount=None,
79+
item=None,
7780
line_amount=None,
7881
tracking=None,
7982
discount_rate=None,
@@ -91,6 +94,7 @@ def __init__(
9194
self._account_id = None
9295
self._tax_type = None
9396
self._tax_amount = None
97+
self._item = None
9498
self._line_amount = None
9599
self._tracking = None
96100
self._discount_rate = None
@@ -116,6 +120,8 @@ def __init__(
116120
self.tax_type = tax_type
117121
if tax_amount is not None:
118122
self.tax_amount = tax_amount
123+
if item is not None:
124+
self.item = item
119125
if line_amount is not None:
120126
self.line_amount = line_amount
121127
if tracking is not None:
@@ -334,6 +340,27 @@ def tax_amount(self, tax_amount):
334340

335341
self._tax_amount = tax_amount
336342

343+
@property
344+
def item(self):
345+
"""Gets the item of this LineItem. # noqa: E501
346+
347+
348+
:return: The item of this LineItem. # noqa: E501
349+
:rtype: LineItemItem
350+
"""
351+
return self._item
352+
353+
@item.setter
354+
def item(self, item):
355+
"""Sets the item of this LineItem.
356+
357+
358+
:param item: The item of this LineItem. # noqa: E501
359+
:type: LineItemItem
360+
"""
361+
362+
self._item = item
363+
337364
@property
338365
def line_amount(self):
339366
"""Gets the line_amount of this LineItem. # noqa: E501
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
# coding: utf-8
2+
3+
"""
4+
Xero Accounting API
5+
6+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
7+
8+
9+
Generated by: https://openapi-generator.tech
10+
"""
11+
12+
13+
import re # noqa: F401
14+
15+
from xero_python.models import BaseModel
16+
17+
18+
class LineItemItem(BaseModel):
19+
"""NOTE: This class is auto generated by OpenAPI Generator.
20+
Ref: https://openapi-generator.tech
21+
22+
Do not edit the class manually.
23+
"""
24+
25+
"""
26+
Attributes:
27+
openapi_types (dict): The key is attribute name
28+
and the value is attribute type.
29+
attribute_map (dict): The key is attribute name
30+
and the value is json key in definition.
31+
"""
32+
openapi_types = {"code": "str", "name": "str", "item_id": "str"}
33+
34+
attribute_map = {"code": "Code", "name": "Name", "item_id": "ItemID"}
35+
36+
def __init__(self, code=None, name=None, item_id=None): # noqa: E501
37+
"""LineItemItem - a model defined in OpenAPI""" # noqa: E501
38+
39+
self._code = None
40+
self._name = None
41+
self._item_id = None
42+
self.discriminator = None
43+
44+
if code is not None:
45+
self.code = code
46+
if name is not None:
47+
self.name = name
48+
if item_id is not None:
49+
self.item_id = item_id
50+
51+
@property
52+
def code(self):
53+
"""Gets the code of this LineItemItem. # noqa: E501
54+
55+
User defined item code (max length = 30) # noqa: E501
56+
57+
:return: The code of this LineItemItem. # noqa: E501
58+
:rtype: str
59+
"""
60+
return self._code
61+
62+
@code.setter
63+
def code(self, code):
64+
"""Sets the code of this LineItemItem.
65+
66+
User defined item code (max length = 30) # noqa: E501
67+
68+
:param code: The code of this LineItemItem. # noqa: E501
69+
:type: str
70+
"""
71+
if code is not None and len(code) > 30:
72+
raise ValueError(
73+
"Invalid value for `code`, " "length must be less than or equal to `30`"
74+
) # noqa: E501
75+
76+
self._code = code
77+
78+
@property
79+
def name(self):
80+
"""Gets the name of this LineItemItem. # noqa: E501
81+
82+
The name of the item (max length = 50) # noqa: E501
83+
84+
:return: The name of this LineItemItem. # noqa: E501
85+
:rtype: str
86+
"""
87+
return self._name
88+
89+
@name.setter
90+
def name(self, name):
91+
"""Sets the name of this LineItemItem.
92+
93+
The name of the item (max length = 50) # noqa: E501
94+
95+
:param name: The name of this LineItemItem. # noqa: E501
96+
:type: str
97+
"""
98+
if name is not None and len(name) > 50:
99+
raise ValueError(
100+
"Invalid value for `name`, " "length must be less than or equal to `50`"
101+
) # noqa: E501
102+
103+
self._name = name
104+
105+
@property
106+
def item_id(self):
107+
"""Gets the item_id of this LineItemItem. # noqa: E501
108+
109+
The Xero identifier for an Item # noqa: E501
110+
111+
:return: The item_id of this LineItemItem. # noqa: E501
112+
:rtype: str
113+
"""
114+
return self._item_id
115+
116+
@item_id.setter
117+
def item_id(self, item_id):
118+
"""Sets the item_id of this LineItemItem.
119+
120+
The Xero identifier for an Item # noqa: E501
121+
122+
:param item_id: The item_id of this LineItemItem. # noqa: E501
123+
:type: str
124+
"""
125+
126+
self._item_id = item_id

0 commit comments

Comments
 (0)