Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion docs/v1/accounting/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3535,6 +3535,9 @@
"format" : "double",
"x-is-money" : true
},
"Item" : {
"$ref" : "#/components/schemas/LineItemItem"
},
"LineAmount" : {
"type" : "number",
"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)",
Expand Down Expand Up @@ -3571,6 +3574,27 @@
"externalDocs" : {
"url" : "https://developer.xero.com/documentation/api/invoices#post"
}
};
defs["LineItemItem"] = {
"title" : "",
"properties" : {
"Code" : {
"maxLength" : 30,
"type" : "string",
"description" : "User defined item code (max length = 30)"
},
"Name" : {
"maxLength" : 50,
"type" : "string",
"description" : "The name of the item (max length = 50)"
},
"ItemID" : {
"type" : "string",
"description" : "The Xero identifier for an Item",
"format" : "uuid"
}
},
"description" : ""
};
defs["LineItemTracking"] = {
"title" : "",
Expand Down Expand Up @@ -5976,7 +6000,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="Accounting"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="Accounting"><strong>VSN: </strong>1.12.0</li>
<li class="nav-header" data-group="Accounting"><strong>VSN: </strong>1.13.0</li>
<li class="nav-header" data-group="Accounting"><a href="#api-Accounting">Methods</a></li>
<li data-group="Accounting" data-name="createAccount" class="">
<a href="#api-Accounting-createAccount">createAccount</a>
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.12.0",
version="1.13.0",
)
2 changes: 1 addition & 1 deletion xero_python/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

__author__ = """Xero Developer API"""
__email__ = "api@xero.com"
__version__ = "1.12.0"
__version__ = "1.13.0"
1 change: 1 addition & 0 deletions xero_python/accounting/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
from xero_python.accounting.models.journals import Journals
from xero_python.accounting.models.line_amount_types import LineAmountTypes
from xero_python.accounting.models.line_item import LineItem
from xero_python.accounting.models.line_item_item import LineItemItem
from xero_python.accounting.models.line_item_tracking import LineItemTracking
from xero_python.accounting.models.linked_transaction import LinkedTransaction
from xero_python.accounting.models.linked_transactions import LinkedTransactions
Expand Down
2 changes: 1 addition & 1 deletion xero_python/accounting/api/accounting_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"""

"""
OpenAPI spec version: 2.17.4
OpenAPI spec version: 2.19.1
"""

import importlib
Expand Down
1 change: 1 addition & 0 deletions xero_python/accounting/docs/LineItem.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Name | Type | Description | Notes
**account_id** | **str** | The associated account ID related to this line item | [optional]
**tax_type** | **str** | The tax type from TaxRates | [optional]
**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]
**item** | [**LineItemItem**](LineItemItem.md) | | [optional]
**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]
**tracking** | [**list[LineItemTracking]**](LineItemTracking.md) | Optional Tracking Category – see Tracking. Any LineItem can have a maximum of 2 &lt;TrackingCategory&gt; elements. | [optional]
**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]
Expand Down
12 changes: 12 additions & 0 deletions xero_python/accounting/docs/LineItemItem.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# LineItemItem

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**code** | **str** | User defined item code (max length &#x3D; 30) | [optional]
**name** | **str** | The name of the item (max length &#x3D; 50) | [optional]
**item_id** | **str** | The Xero identifier for an Item | [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)


1 change: 1 addition & 0 deletions xero_python/accounting/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
from xero_python.accounting.models.journals import Journals
from xero_python.accounting.models.line_amount_types import LineAmountTypes
from xero_python.accounting.models.line_item import LineItem
from xero_python.accounting.models.line_item_item import LineItemItem
from xero_python.accounting.models.line_item_tracking import LineItemTracking
from xero_python.accounting.models.linked_transaction import LinkedTransaction
from xero_python.accounting.models.linked_transactions import LinkedTransactions
Expand Down
27 changes: 27 additions & 0 deletions xero_python/accounting/models/line_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class LineItem(BaseModel):
"account_id": "str",
"tax_type": "str",
"tax_amount": "float",
"item": "LineItemItem",
"line_amount": "float",
"tracking": "list[LineItemTracking]",
"discount_rate": "float",
Expand All @@ -56,6 +57,7 @@ class LineItem(BaseModel):
"account_id": "AccountID",
"tax_type": "TaxType",
"tax_amount": "TaxAmount",
"item": "Item",
"line_amount": "LineAmount",
"tracking": "Tracking",
"discount_rate": "DiscountRate",
Expand All @@ -74,6 +76,7 @@ def __init__(
account_id=None,
tax_type=None,
tax_amount=None,
item=None,
line_amount=None,
tracking=None,
discount_rate=None,
Expand All @@ -91,6 +94,7 @@ def __init__(
self._account_id = None
self._tax_type = None
self._tax_amount = None
self._item = None
self._line_amount = None
self._tracking = None
self._discount_rate = None
Expand All @@ -116,6 +120,8 @@ def __init__(
self.tax_type = tax_type
if tax_amount is not None:
self.tax_amount = tax_amount
if item is not None:
self.item = item
if line_amount is not None:
self.line_amount = line_amount
if tracking is not None:
Expand Down Expand Up @@ -334,6 +340,27 @@ def tax_amount(self, tax_amount):

self._tax_amount = tax_amount

@property
def item(self):
"""Gets the item of this LineItem. # noqa: E501


:return: The item of this LineItem. # noqa: E501
:rtype: LineItemItem
"""
return self._item

@item.setter
def item(self, item):
"""Sets the item of this LineItem.


:param item: The item of this LineItem. # noqa: E501
:type: LineItemItem
"""

self._item = item

@property
def line_amount(self):
"""Gets the line_amount of this LineItem. # noqa: E501
Expand Down
126 changes: 126 additions & 0 deletions xero_python/accounting/models/line_item_item.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# coding: utf-8

"""
Xero Accounting API

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501

Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""


import re # noqa: F401

from xero_python.models import BaseModel


class LineItemItem(BaseModel):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech

Do not edit the class manually.
"""

"""
Attributes:
openapi_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.
"""
openapi_types = {"code": "str", "name": "str", "item_id": "str"}

attribute_map = {"code": "Code", "name": "Name", "item_id": "ItemID"}

def __init__(self, code=None, name=None, item_id=None): # noqa: E501
"""LineItemItem - a model defined in OpenAPI""" # noqa: E501

self._code = None
self._name = None
self._item_id = None
self.discriminator = None

if code is not None:
self.code = code
if name is not None:
self.name = name
if item_id is not None:
self.item_id = item_id

@property
def code(self):
"""Gets the code of this LineItemItem. # noqa: E501

User defined item code (max length = 30) # noqa: E501

:return: The code of this LineItemItem. # noqa: E501
:rtype: str
"""
return self._code

@code.setter
def code(self, code):
"""Sets the code of this LineItemItem.

User defined item code (max length = 30) # noqa: E501

:param code: The code of this LineItemItem. # noqa: E501
:type: str
"""
if code is not None and len(code) > 30:
raise ValueError(
"Invalid value for `code`, " "length must be less than or equal to `30`"
) # noqa: E501

self._code = code

@property
def name(self):
"""Gets the name of this LineItemItem. # noqa: E501

The name of the item (max length = 50) # noqa: E501

:return: The name of this LineItemItem. # noqa: E501
:rtype: str
"""
return self._name

@name.setter
def name(self, name):
"""Sets the name of this LineItemItem.

The name of the item (max length = 50) # noqa: E501

:param name: The name of this LineItemItem. # noqa: E501
:type: str
"""
if name is not None and len(name) > 50:
raise ValueError(
"Invalid value for `name`, " "length must be less than or equal to `50`"
) # noqa: E501

self._name = name

@property
def item_id(self):
"""Gets the item_id of this LineItemItem. # noqa: E501

The Xero identifier for an Item # noqa: E501

:return: The item_id of this LineItemItem. # noqa: E501
:rtype: str
"""
return self._item_id

@item_id.setter
def item_id(self, item_id):
"""Sets the item_id of this LineItemItem.

The Xero identifier for an Item # noqa: E501

:param item_id: The item_id of this LineItemItem. # noqa: E501
:type: str
"""

self._item_id = item_id
2 changes: 1 addition & 1 deletion xero_python/appstore/api/app_store_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"""

"""
OpenAPI spec version: 2.17.4
OpenAPI spec version: 2.19.1
"""

import importlib
Expand Down
2 changes: 1 addition & 1 deletion xero_python/assets/api/asset_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"""

"""
OpenAPI spec version: 2.17.4
OpenAPI spec version: 2.19.1
"""

import importlib
Expand Down
4 changes: 2 additions & 2 deletions xero_python/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ 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.17.4
- Package version: 1.12.0
- API version: 2.19.1
- Package version: 1.13.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
For more information, please visit [https://developer.xero.com](https://developer.xero.com)

Expand Down
2 changes: 1 addition & 1 deletion xero_python/file/api/files_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"""

"""
OpenAPI spec version: 2.17.4
OpenAPI spec version: 2.19.1
"""

import importlib
Expand Down
13 changes: 13 additions & 0 deletions xero_python/finance/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@
BalanceSheetAccountType,
)
from xero_python.finance.models.balance_sheet_response import BalanceSheetResponse
from xero_python.finance.models.bank_statement_accounting_response import (
BankStatementAccountingResponse,
)
from xero_python.finance.models.bank_statement_response import BankStatementResponse
from xero_python.finance.models.bank_transaction_response import BankTransactionResponse
from xero_python.finance.models.cash_account_response import CashAccountResponse
from xero_python.finance.models.cash_balance import CashBalance
from xero_python.finance.models.cash_validation_response import CashValidationResponse
Expand All @@ -38,8 +42,10 @@
from xero_python.finance.models.cashflow_response import CashflowResponse
from xero_python.finance.models.cashflow_type import CashflowType
from xero_python.finance.models.contact_detail import ContactDetail
from xero_python.finance.models.contact_response import ContactResponse
from xero_python.finance.models.contact_total_detail import ContactTotalDetail
from xero_python.finance.models.contact_total_other import ContactTotalOther
from xero_python.finance.models.credit_note_response import CreditNoteResponse
from xero_python.finance.models.current_statement_response import (
CurrentStatementResponse,
)
Expand All @@ -48,13 +54,18 @@
from xero_python.finance.models.income_by_contact_response import (
IncomeByContactResponse,
)
from xero_python.finance.models.invoice_response import InvoiceResponse
from xero_python.finance.models.line_item_response import LineItemResponse
from xero_python.finance.models.lock_history_model import LockHistoryModel
from xero_python.finance.models.lock_history_response import LockHistoryResponse
from xero_python.finance.models.manual_journal_total import ManualJournalTotal
from xero_python.finance.models.overpayment_response import OverpaymentResponse
from xero_python.finance.models.payment_response import PaymentResponse
from xero_python.finance.models.pnl_account import PnlAccount
from xero_python.finance.models.pnl_account_class import PnlAccountClass
from xero_python.finance.models.pnl_account_type import PnlAccountType
from xero_python.finance.models.practice_response import PracticeResponse
from xero_python.finance.models.prepayment_response import PrepaymentResponse
from xero_python.finance.models.problem import Problem
from xero_python.finance.models.problem_type import ProblemType
from xero_python.finance.models.profit_and_loss_response import ProfitAndLossResponse
Expand All @@ -63,7 +74,9 @@
from xero_python.finance.models.statement_balance_response import (
StatementBalanceResponse,
)
from xero_python.finance.models.statement_line_response import StatementLineResponse
from xero_python.finance.models.statement_lines_response import StatementLinesResponse
from xero_python.finance.models.statement_response import StatementResponse
from xero_python.finance.models.total_detail import TotalDetail
from xero_python.finance.models.total_other import TotalOther
from xero_python.finance.models.trial_balance_account import TrialBalanceAccount
Expand Down
Loading