createAccount
@@ -12350,6 +12362,7 @@ Usage and SDK Samples
xero_tenant_id = 'YOUR_XERO_TENANT_ID'
summarize_errors = 'True'
idempotency_key = 'KEY_VALUE'
+ allow_backorders = 'true'
date_value = dateutil.parser.parse('2020-10-10T00:00:00Z')
due_date_value = dateutil.parser.parse('2020-10-28T00:00:00Z')
@@ -12386,7 +12399,7 @@ Usage and SDK Samples
invoices = [invoice])
try:
- api_response = api_instance.create_invoices(xero_tenant_id, invoices, summarize_errors, unitdp, idempotency_key)
+ api_response = api_instance.create_invoices(xero_tenant_id, invoices, summarize_errors, unitdp, idempotency_key, allow_backorders)
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createInvoices: %s\n" % e)
@@ -12552,6 +12565,26 @@ Parameters
+
+
+ allowBackorders
+
+
+
+
+
+
+
+ Boolean
+
+
+
+Allows an invoice to be created even when one or more line items contain tracked inventory where the invoice quantity would cause the available quantity to go negative
+
+
+
+
+
@@ -22217,9 +22250,10 @@ Usage and SDK Samples
if_modified_since = dateutil.parser.parse("2020-02-06T12:17:43.202-08:00")
where = 'Status=="AUTHORISED"'
order = 'Type ASC'
+ references = ["Ref1", "Ref2"]
try:
- api_response = api_instance.get_bank_transactions(xero_tenant_id, if_modified_since, where, order, page, unitdp, pageSize)
+ api_response = api_instance.get_bank_transactions(xero_tenant_id, if_modified_since, where, order, page, unitdp, pageSize, references)
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getBankTransactions: %s\n" % e)
@@ -22397,6 +22431,26 @@ Parameters
+
+
+ References
+
+
+
+
+
+
+
+ array[String]
+
+
+
+Filter by a comma-separated list of References
+
+
+
+
+
@@ -33260,9 +33314,10 @@ Usage and SDK Samples
where = 'Status=="AUTHORISED"'
order = 'Reference ASC'
invoice_numbers = ["INV-001", "INV-002"]
+ references = ["Ref1", "Ref2"]
try:
- api_response = api_instance.get_prepayments(xero_tenant_id, if_modified_since, where, order, page, unitdp, pageSize, invoice_numbers)
+ api_response = api_instance.get_prepayments(xero_tenant_id, if_modified_since, where, order, page, unitdp, pageSize, invoice_numbers, references)
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getPrepayments: %s\n" % e)
@@ -33394,7 +33449,7 @@ Parameters
-e.g. page=1 – Up to 100 prepayments will be returned in a single API call with line items shown for each overpayment
+e.g. page=1 – Up to 100 prepayments will be returned in a single API call with line items shown for each prepayment
@@ -33460,6 +33515,26 @@ Parameters
+
+
+ References
+
+
+
+
+
+
+
+ array[String]
+
+
+
+Filter by a comma-separated list of References
+
+
+
+
+
@@ -43119,6 +43194,7 @@ Usage and SDK Samples
xero_tenant_id = 'YOUR_XERO_TENANT_ID'
invoice_id = '00000000-0000-0000-0000-000000000000'
idempotency_key = 'KEY_VALUE'
+ allow_backorders = 'true'
invoice = Invoice(
reference = "I am Iron man")
@@ -43127,7 +43203,7 @@ Usage and SDK Samples
invoices = [invoice])
try:
- api_response = api_instance.update_invoice(xero_tenant_id, invoice_id, invoices, unitdp, idempotency_key)
+ api_response = api_instance.update_invoice(xero_tenant_id, invoice_id, invoices, unitdp, idempotency_key, allow_backorders)
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->updateInvoice: %s\n" % e)
@@ -43294,6 +43370,26 @@ Parameters
+
+
+ allowBackorders
+
+
+
+
+
+
+
+ Boolean
+
+
+
+Allows an invoice to be created even when one or more line items contain tracked inventory where the invoice quantity would cause the available quantity to go negative
+
+
+
+
+
@@ -45063,6 +45159,7 @@ Usage and SDK Samples
xero_tenant_id = 'YOUR_XERO_TENANT_ID'
summarize_errors = 'True'
idempotency_key = 'KEY_VALUE'
+ allow_backorders = 'true'
date_value = dateutil.parser.parse('2020-10-10T00:00:00Z')
due_date_value = dateutil.parser.parse('2020-10-28T00:00:00Z')
@@ -45091,7 +45188,7 @@ Usage and SDK Samples
invoices = [invoice])
try:
- api_response = api_instance.update_or_create_invoices(xero_tenant_id, invoices, summarize_errors, unitdp, idempotency_key)
+ api_response = api_instance.update_or_create_invoices(xero_tenant_id, invoices, summarize_errors, unitdp, idempotency_key, allow_backorders)
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->updateOrCreateInvoices: %s\n" % e)
@@ -45256,6 +45353,26 @@ Parameters
+
+
+ allowBackorders
+
+
+
+
+
+
+
+ Boolean
+
+
+
+Allows an invoice to be created even when one or more line items contain tracked inventory where the invoice quantity would cause the available quantity to go negative
+
+
+
+
+
diff --git a/docs/v1/appstore/index.html b/docs/v1/appstore/index.html
index 70abb2d1..2cc515de 100644
--- a/docs/v1/appstore/index.html
+++ b/docs/v1/appstore/index.html
@@ -1242,7 +1242,7 @@
-
+
getSubscription
diff --git a/docs/v1/assets/index.html b/docs/v1/assets/index.html
index 19a4136d..0d2a3f99 100644
--- a/docs/v1/assets/index.html
+++ b/docs/v1/assets/index.html
@@ -1420,7 +1420,7 @@
-
+
createAsset
diff --git a/docs/v1/files/index.html b/docs/v1/files/index.html
index 1edcf9ec..0aecdb04 100644
--- a/docs/v1/files/index.html
+++ b/docs/v1/files/index.html
@@ -1181,7 +1181,7 @@
-
+
createFileAssociation
diff --git a/docs/v1/finance/index.html b/docs/v1/finance/index.html
index f5c1a53e..2066001b 100644
--- a/docs/v1/finance/index.html
+++ b/docs/v1/finance/index.html
@@ -2376,7 +2376,7 @@
-
+
getBankStatementAccounting
diff --git a/docs/v1/payroll-au-v2/index.html b/docs/v1/payroll-au-v2/index.html
index 7562d5fb..fc98f311 100644
--- a/docs/v1/payroll-au-v2/index.html
+++ b/docs/v1/payroll-au-v2/index.html
@@ -1160,7 +1160,7 @@
-
+
approveTimesheet
diff --git a/docs/v1/payroll-au/index.html b/docs/v1/payroll-au/index.html
index 4729cd91..d10d54ed 100644
--- a/docs/v1/payroll-au/index.html
+++ b/docs/v1/payroll-au/index.html
@@ -3450,7 +3450,7 @@
-
+
approveLeaveApplication
diff --git a/docs/v1/payroll-nz/index.html b/docs/v1/payroll-nz/index.html
index 20a02376..d83b751a 100644
--- a/docs/v1/payroll-nz/index.html
+++ b/docs/v1/payroll-nz/index.html
@@ -4068,7 +4068,7 @@
-
+
approveTimesheet
diff --git a/docs/v1/payroll-uk/index.html b/docs/v1/payroll-uk/index.html
index 4cda5c86..c7c1528a 100644
--- a/docs/v1/payroll-uk/index.html
+++ b/docs/v1/payroll-uk/index.html
@@ -3701,7 +3701,7 @@
-
+
approveTimesheet
diff --git a/docs/v1/projects/index.html b/docs/v1/projects/index.html
index 83d52e0b..075f297b 100644
--- a/docs/v1/projects/index.html
+++ b/docs/v1/projects/index.html
@@ -1463,7 +1463,7 @@
-
+
createProject
diff --git a/setup.py b/setup.py
index a4ad5f68..4229c0da 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="15.0.0",
+ version="15.1.0",
)
diff --git a/xero_python/__init__.py b/xero_python/__init__.py
index 29b27643..3d1a4fec 100644
--- a/xero_python/__init__.py
+++ b/xero_python/__init__.py
@@ -2,4 +2,4 @@
__author__ = """Xero Developer API"""
__email__ = "api@xero.com"
-__version__ = "15.0.0"
+__version__ = "15.1.0"
diff --git a/xero_python/accounting/api/accounting_api.py b/xero_python/accounting/api/accounting_api.py
index 946bf94c..1bc445e5 100644
--- a/xero_python/accounting/api/accounting_api.py
+++ b/xero_python/accounting/api/accounting_api.py
@@ -21,7 +21,7 @@
"""
"""
- OpenAPI spec version: 16.1.0
+ OpenAPI spec version: 16.2.0
"""
@@ -2454,6 +2454,7 @@ def create_invoices(
summarize_errors=empty,
unitdp=empty,
idempotency_key=empty,
+ allow_backorders=empty,
_return_http_data_only=True,
_preload_content=True,
_request_timeout=None,
@@ -2465,6 +2466,7 @@ def create_invoices(
:param bool summarize_errors: If false return 200 OK and mix of successfully created objects and any with validation errors
:param int unitdp: e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
:param str idempotency_key: This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
+ :param bool allow_backorders: Allows an invoice to be created even when one or more line items contain tracked inventory where the invoice quantity would cause the available quantity to go negative
:param bool _return_http_data_only: return received data only
:param bool _preload_content: load received data in models
:param bool _request_timeout: maximum wait time for response
@@ -2495,6 +2497,9 @@ def create_invoices(
if unitdp is not empty:
query_params.append(("unitdp", unitdp))
+ if allow_backorders is not empty:
+ query_params.append(("allowBackorders", allow_backorders))
+
header_params = {
"xero-tenant-id": xero_tenant_id,
}
@@ -7426,6 +7431,7 @@ def get_bank_transactions(
page=empty,
unitdp=empty,
page_size=empty,
+ references=empty,
_return_http_data_only=True,
_preload_content=True,
_request_timeout=None,
@@ -7439,6 +7445,7 @@ def get_bank_transactions(
:param int page: Up to 100 bank transactions will be returned in a single API call with line items details
:param int unitdp: e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
:param int page_size: Number of records to retrieve per page
+ :param list[str] references: Filter by a comma-separated list of References
:param bool _return_http_data_only: return received data only
:param bool _preload_content: load received data in models
:param bool _request_timeout: maximum wait time for response
@@ -7452,7 +7459,9 @@ def get_bank_transactions(
"when calling `get_bank_transactions`"
)
- collection_formats = {}
+ collection_formats = {
+ "References": "csv",
+ }
path_params = {}
query_params = []
@@ -7472,6 +7481,9 @@ def get_bank_transactions(
if page_size is not empty:
query_params.append(("pageSize", page_size))
+ if references is not empty:
+ query_params.append(("References", references))
+
header_params = {
"xero-tenant-id": xero_tenant_id,
}
@@ -13358,6 +13370,7 @@ def get_prepayments(
unitdp=empty,
page_size=empty,
invoice_numbers=empty,
+ references=empty,
_return_http_data_only=True,
_preload_content=True,
_request_timeout=None,
@@ -13368,10 +13381,11 @@ def get_prepayments(
:param datetime if_modified_since: Only records created or modified since this timestamp will be returned
:param str where: Filter by an any element
:param str order: Order by an any element
- :param int page: e.g. page=1 – Up to 100 prepayments will be returned in a single API call with line items shown for each overpayment
+ :param int page: e.g. page=1 – Up to 100 prepayments will be returned in a single API call with line items shown for each prepayment
:param int unitdp: e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
:param int page_size: Number of records to retrieve per page
:param list[str] invoice_numbers: Filter by a comma-separated list of InvoiceNumbers
+ :param list[str] references: Filter by a comma-separated list of References
:param bool _return_http_data_only: return received data only
:param bool _preload_content: load received data in models
:param bool _request_timeout: maximum wait time for response
@@ -13387,6 +13401,7 @@ def get_prepayments(
collection_formats = {
"InvoiceNumbers": "csv",
+ "References": "csv",
}
path_params = {}
@@ -13410,6 +13425,9 @@ def get_prepayments(
if invoice_numbers is not empty:
query_params.append(("InvoiceNumbers", invoice_numbers))
+ if references is not empty:
+ query_params.append(("References", references))
+
header_params = {
"xero-tenant-id": xero_tenant_id,
}
@@ -18340,6 +18358,7 @@ def update_invoice(
invoices,
unitdp=empty,
idempotency_key=empty,
+ allow_backorders=empty,
_return_http_data_only=True,
_preload_content=True,
_request_timeout=None,
@@ -18351,6 +18370,7 @@ def update_invoice(
:param Invoices invoices: (required)
:param int unitdp: e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
:param str idempotency_key: This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
+ :param bool allow_backorders: Allows an invoice to be created even when one or more line items contain tracked inventory where the invoice quantity would cause the available quantity to go negative
:param bool _return_http_data_only: return received data only
:param bool _preload_content: load received data in models
:param bool _request_timeout: maximum wait time for response
@@ -18386,6 +18406,9 @@ def update_invoice(
if unitdp is not empty:
query_params.append(("unitdp", unitdp))
+ if allow_backorders is not empty:
+ query_params.append(("allowBackorders", allow_backorders))
+
header_params = {
"xero-tenant-id": xero_tenant_id,
}
@@ -19217,6 +19240,7 @@ def update_or_create_invoices(
summarize_errors=empty,
unitdp=empty,
idempotency_key=empty,
+ allow_backorders=empty,
_return_http_data_only=True,
_preload_content=True,
_request_timeout=None,
@@ -19228,6 +19252,7 @@ def update_or_create_invoices(
:param bool summarize_errors: If false return 200 OK and mix of successfully created objects and any with validation errors
:param int unitdp: e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
:param str idempotency_key: This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
+ :param bool allow_backorders: Allows an invoice to be created even when one or more line items contain tracked inventory where the invoice quantity would cause the available quantity to go negative
:param bool _return_http_data_only: return received data only
:param bool _preload_content: load received data in models
:param bool _request_timeout: maximum wait time for response
@@ -19258,6 +19283,9 @@ def update_or_create_invoices(
if unitdp is not empty:
query_params.append(("unitdp", unitdp))
+ if allow_backorders is not empty:
+ query_params.append(("allowBackorders", allow_backorders))
+
header_params = {
"xero-tenant-id": xero_tenant_id,
}
diff --git a/xero_python/accounting/docs/AccountingApi.md b/xero_python/accounting/docs/AccountingApi.md
index 7a80b42f..60538fa0 100644
--- a/xero_python/accounting/docs/AccountingApi.md
+++ b/xero_python/accounting/docs/AccountingApi.md
@@ -1927,7 +1927,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **create_invoices**
-> Invoices create_invoices(xero_tenant_id, invoices, summarize_errors=summarize_errors, unitdp=unitdp, idempotency_key=idempotency_key)
+> Invoices create_invoices(xero_tenant_id, invoices, summarize_errors=summarize_errors, unitdp=unitdp, idempotency_key=idempotency_key, allow_backorders=allow_backorders)
Creates one or more sales invoices or purchase bills
@@ -1962,9 +1962,10 @@ invoices = {"Invoices":[{"Type":"ACCREC","Contact":{"ContactID":"430fa14a-f945-4
summarize_errors = False # bool | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to False)
unitdp = 4 # int | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional)
idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional)
+allow_backorders = true # bool | Allows an invoice to be created even when one or more line items contain tracked inventory where the invoice quantity would cause the available quantity to go negative (optional)
try:
# Creates one or more sales invoices or purchase bills
- api_response = api_instance.create_invoices(xero_tenant_id, invoices, summarize_errors=summarize_errors, unitdp=unitdp, idempotency_key=idempotency_key)
+ api_response = api_instance.create_invoices(xero_tenant_id, invoices, summarize_errors=summarize_errors, unitdp=unitdp, idempotency_key=idempotency_key, allow_backorders=allow_backorders)
pprint(api_response)
except ApiException as e:
print("Exception when calling AccountingApi->create_invoices: %s\n" % e)
@@ -1979,6 +1980,7 @@ Name | Type | Description | Notes
**summarize_errors** | **bool**| If false return 200 OK and mix of successfully created objects and any with validation errors | [optional] [default to False]
**unitdp** | **int**| e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts | [optional]
**idempotency_key** | **str**| This allows you to safely retry requests without the risk of duplicate processing. 128 character max. | [optional]
+ **allow_backorders** | **bool**| Allows an invoice to be created even when one or more line items contain tracked inventory where the invoice quantity would cause the available quantity to go negative | [optional]
### Return type
@@ -5569,7 +5571,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **get_bank_transactions**
-> BankTransactions get_bank_transactions(xero_tenant_id, if_modified_since=if_modified_since, where=where, order=order, page=page, unitdp=unitdp, page_size=page_size)
+> BankTransactions get_bank_transactions(xero_tenant_id, if_modified_since=if_modified_since, where=where, order=order, page=page, unitdp=unitdp, page_size=page_size, references=references)
Retrieves any spent or received money transactions
@@ -5606,9 +5608,10 @@ order = 'Type ASC' # str | Order by an any element (optional)
page = 1 # int | Up to 100 bank transactions will be returned in a single API call with line items details (optional)
unitdp = 4 # int | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional)
page_size = 100 # int | Number of records to retrieve per page (optional)
+references = ['"Ref1", "Ref2"'] # list[str] | Filter by a comma-separated list of References (optional)
try:
# Retrieves any spent or received money transactions
- api_response = api_instance.get_bank_transactions(xero_tenant_id, if_modified_since=if_modified_since, where=where, order=order, page=page, unitdp=unitdp, page_size=page_size)
+ api_response = api_instance.get_bank_transactions(xero_tenant_id, if_modified_since=if_modified_since, where=where, order=order, page=page, unitdp=unitdp, page_size=page_size, references=references)
pprint(api_response)
except ApiException as e:
print("Exception when calling AccountingApi->get_bank_transactions: %s\n" % e)
@@ -5625,6 +5628,7 @@ Name | Type | Description | Notes
**page** | **int**| Up to 100 bank transactions will be returned in a single API call with line items details | [optional]
**unitdp** | **int**| e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts | [optional]
**page_size** | **int**| Number of records to retrieve per page | [optional]
+ **references** | [**list[str]**](str.md)| Filter by a comma-separated list of References | [optional]
### Return type
@@ -10277,7 +10281,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **get_prepayments**
-> Prepayments get_prepayments(xero_tenant_id, if_modified_since=if_modified_since, where=where, order=order, page=page, unitdp=unitdp, page_size=page_size, invoice_numbers=invoice_numbers)
+> Prepayments get_prepayments(xero_tenant_id, if_modified_since=if_modified_since, where=where, order=order, page=page, unitdp=unitdp, page_size=page_size, invoice_numbers=invoice_numbers, references=references)
Retrieves prepayments
@@ -10311,13 +10315,14 @@ xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant
if_modified_since = '2020-02-06T12:17:43.202-08:00' # datetime | Only records created or modified since this timestamp will be returned (optional)
where = 'Status==\"AUTHORISED\"' # str | Filter by an any element (optional)
order = 'Reference ASC' # str | Order by an any element (optional)
-page = 1 # int | e.g. page=1 – Up to 100 prepayments will be returned in a single API call with line items shown for each overpayment (optional)
+page = 1 # int | e.g. page=1 – Up to 100 prepayments will be returned in a single API call with line items shown for each prepayment (optional)
unitdp = 4 # int | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional)
page_size = 100 # int | Number of records to retrieve per page (optional)
invoice_numbers = ['"INV-001", "INV-002"'] # list[str] | Filter by a comma-separated list of InvoiceNumbers (optional)
+references = ['"Ref1", "Ref2"'] # list[str] | Filter by a comma-separated list of References (optional)
try:
# Retrieves prepayments
- api_response = api_instance.get_prepayments(xero_tenant_id, if_modified_since=if_modified_since, where=where, order=order, page=page, unitdp=unitdp, page_size=page_size, invoice_numbers=invoice_numbers)
+ api_response = api_instance.get_prepayments(xero_tenant_id, if_modified_since=if_modified_since, where=where, order=order, page=page, unitdp=unitdp, page_size=page_size, invoice_numbers=invoice_numbers, references=references)
pprint(api_response)
except ApiException as e:
print("Exception when calling AccountingApi->get_prepayments: %s\n" % e)
@@ -10331,10 +10336,11 @@ Name | Type | Description | Notes
**if_modified_since** | **datetime**| Only records created or modified since this timestamp will be returned | [optional]
**where** | **str**| Filter by an any element | [optional]
**order** | **str**| Order by an any element | [optional]
- **page** | **int**| e.g. page=1 – Up to 100 prepayments will be returned in a single API call with line items shown for each overpayment | [optional]
+ **page** | **int**| e.g. page=1 – Up to 100 prepayments will be returned in a single API call with line items shown for each prepayment | [optional]
**unitdp** | **int**| e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts | [optional]
**page_size** | **int**| Number of records to retrieve per page | [optional]
**invoice_numbers** | [**list[str]**](str.md)| Filter by a comma-separated list of InvoiceNumbers | [optional]
+ **references** | [**list[str]**](str.md)| Filter by a comma-separated list of References | [optional]
### Return type
@@ -14068,7 +14074,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **update_invoice**
-> Invoices update_invoice(xero_tenant_id, invoice_id, invoices, unitdp=unitdp, idempotency_key=idempotency_key)
+> Invoices update_invoice(xero_tenant_id, invoice_id, invoices, unitdp=unitdp, idempotency_key=idempotency_key, allow_backorders=allow_backorders)
Updates a specific sales invoices or purchase bills
@@ -14103,9 +14109,10 @@ invoice_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier fo
invoices = {"Invoices":[{"Reference":"May the force be with you","InvoiceID":"00000000-0000-0000-0000-000000000000","LineItems":[],"Contact":{},"Type":"ACCPAY"}]} # Invoices |
unitdp = 4 # int | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional)
idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional)
+allow_backorders = true # bool | Allows an invoice to be created even when one or more line items contain tracked inventory where the invoice quantity would cause the available quantity to go negative (optional)
try:
# Updates a specific sales invoices or purchase bills
- api_response = api_instance.update_invoice(xero_tenant_id, invoice_id, invoices, unitdp=unitdp, idempotency_key=idempotency_key)
+ api_response = api_instance.update_invoice(xero_tenant_id, invoice_id, invoices, unitdp=unitdp, idempotency_key=idempotency_key, allow_backorders=allow_backorders)
pprint(api_response)
except ApiException as e:
print("Exception when calling AccountingApi->update_invoice: %s\n" % e)
@@ -14120,6 +14127,7 @@ Name | Type | Description | Notes
**invoices** | [**Invoices**](Invoices.md)| |
**unitdp** | **int**| e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts | [optional]
**idempotency_key** | **str**| This allows you to safely retry requests without the risk of duplicate processing. 128 character max. | [optional]
+ **allow_backorders** | **bool**| Allows an invoice to be created even when one or more line items contain tracked inventory where the invoice quantity would cause the available quantity to go negative | [optional]
### Return type
@@ -14683,7 +14691,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **update_or_create_invoices**
-> Invoices update_or_create_invoices(xero_tenant_id, invoices, summarize_errors=summarize_errors, unitdp=unitdp, idempotency_key=idempotency_key)
+> Invoices update_or_create_invoices(xero_tenant_id, invoices, summarize_errors=summarize_errors, unitdp=unitdp, idempotency_key=idempotency_key, allow_backorders=allow_backorders)
Updates or creates one or more sales invoices or purchase bills
@@ -14718,9 +14726,10 @@ invoices = {"Invoices":[{"Type":"ACCREC","Contact":{"ContactID":"430fa14a-f945-4
summarize_errors = False # bool | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to False)
unitdp = 4 # int | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional)
idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional)
+allow_backorders = true # bool | Allows an invoice to be created even when one or more line items contain tracked inventory where the invoice quantity would cause the available quantity to go negative (optional)
try:
# Updates or creates one or more sales invoices or purchase bills
- api_response = api_instance.update_or_create_invoices(xero_tenant_id, invoices, summarize_errors=summarize_errors, unitdp=unitdp, idempotency_key=idempotency_key)
+ api_response = api_instance.update_or_create_invoices(xero_tenant_id, invoices, summarize_errors=summarize_errors, unitdp=unitdp, idempotency_key=idempotency_key, allow_backorders=allow_backorders)
pprint(api_response)
except ApiException as e:
print("Exception when calling AccountingApi->update_or_create_invoices: %s\n" % e)
@@ -14735,6 +14744,7 @@ Name | Type | Description | Notes
**summarize_errors** | **bool**| If false return 200 OK and mix of successfully created objects and any with validation errors | [optional] [default to False]
**unitdp** | **int**| e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts | [optional]
**idempotency_key** | **str**| This allows you to safely retry requests without the risk of duplicate processing. 128 character max. | [optional]
+ **allow_backorders** | **bool**| Allows an invoice to be created even when one or more line items contain tracked inventory where the invoice quantity would cause the available quantity to go negative | [optional]
### Return type
diff --git a/xero_python/accounting/docs/Item.md b/xero_python/accounting/docs/Item.md
index 2666df71..afc2811a 100644
--- a/xero_python/accounting/docs/Item.md
+++ b/xero_python/accounting/docs/Item.md
@@ -14,7 +14,9 @@ Name | Type | Description | Notes
**sales_details** | [**Purchase**](Purchase.md) | | [optional]
**is_tracked_as_inventory** | **bool** | True for items that are tracked as inventory. An item will be tracked as inventory if the InventoryAssetAccountCode and COGSAccountCode are set. | [optional]
**total_cost_pool** | **float** | The value of the item on hand. Calculated using average cost accounting. | [optional]
-**quantity_on_hand** | **float** | The quantity of the item on hand | [optional]
+**quantity_on_hand** | **float** | The quantity of the item on hand. This will be 0 if `QuantityOnBackOrder` is greater than 0. | [optional]
+**quantity_available** | **float** | The quantity of the item available. This is equal to `QuantityOnHand` - `QuantityOnBackOrder`. This value will be negative if `QuantityOnBackOrder` is greater than 0. | [optional]
+**quantity_on_back_order** | **float** | The quantity of the item on backorder. This will be 0 if `QuantityOnHand` is greater than 0. | [optional]
**updated_date_utc** | **datetime** | Last modified date in UTC format | [optional]
**item_id** | **str** | The Xero identifier for an Item | [optional]
**status_attribute_string** | **str** | Status of object | [optional]
diff --git a/xero_python/accounting/models/item.py b/xero_python/accounting/models/item.py
index 04f4e775..33c76626 100644
--- a/xero_python/accounting/models/item.py
+++ b/xero_python/accounting/models/item.py
@@ -42,6 +42,8 @@ class Item(BaseModel):
"is_tracked_as_inventory": "bool",
"total_cost_pool": "float",
"quantity_on_hand": "float",
+ "quantity_available": "float",
+ "quantity_on_back_order": "float",
"updated_date_utc": "datetime[ms-format]",
"item_id": "str",
"status_attribute_string": "str",
@@ -61,6 +63,8 @@ class Item(BaseModel):
"is_tracked_as_inventory": "IsTrackedAsInventory",
"total_cost_pool": "TotalCostPool",
"quantity_on_hand": "QuantityOnHand",
+ "quantity_available": "QuantityAvailable",
+ "quantity_on_back_order": "QuantityOnBackOrder",
"updated_date_utc": "UpdatedDateUTC",
"item_id": "ItemID",
"status_attribute_string": "StatusAttributeString",
@@ -81,6 +85,8 @@ def __init__(
is_tracked_as_inventory=None,
total_cost_pool=None,
quantity_on_hand=None,
+ quantity_available=None,
+ quantity_on_back_order=None,
updated_date_utc=None,
item_id=None,
status_attribute_string=None,
@@ -100,6 +106,8 @@ def __init__(
self._is_tracked_as_inventory = None
self._total_cost_pool = None
self._quantity_on_hand = None
+ self._quantity_available = None
+ self._quantity_on_back_order = None
self._updated_date_utc = None
self._item_id = None
self._status_attribute_string = None
@@ -129,6 +137,10 @@ def __init__(
self.total_cost_pool = total_cost_pool
if quantity_on_hand is not None:
self.quantity_on_hand = quantity_on_hand
+ if quantity_available is not None:
+ self.quantity_available = quantity_available
+ if quantity_on_back_order is not None:
+ self.quantity_on_back_order = quantity_on_back_order
if updated_date_utc is not None:
self.updated_date_utc = updated_date_utc
if item_id is not None:
@@ -413,7 +425,7 @@ def total_cost_pool(self, total_cost_pool):
def quantity_on_hand(self):
"""Gets the quantity_on_hand of this Item. # noqa: E501
- The quantity of the item on hand # noqa: E501
+ The quantity of the item on hand. This will be 0 if `QuantityOnBackOrder` is greater than 0. # noqa: E501
:return: The quantity_on_hand of this Item. # noqa: E501
:rtype: float
@@ -424,7 +436,7 @@ def quantity_on_hand(self):
def quantity_on_hand(self, quantity_on_hand):
"""Sets the quantity_on_hand of this Item.
- The quantity of the item on hand # noqa: E501
+ The quantity of the item on hand. This will be 0 if `QuantityOnBackOrder` is greater than 0. # noqa: E501
:param quantity_on_hand: The quantity_on_hand of this Item. # noqa: E501
:type: float
@@ -432,6 +444,52 @@ def quantity_on_hand(self, quantity_on_hand):
self._quantity_on_hand = quantity_on_hand
+ @property
+ def quantity_available(self):
+ """Gets the quantity_available of this Item. # noqa: E501
+
+ The quantity of the item available. This is equal to `QuantityOnHand` - `QuantityOnBackOrder`. This value will be negative if `QuantityOnBackOrder` is greater than 0. # noqa: E501
+
+ :return: The quantity_available of this Item. # noqa: E501
+ :rtype: float
+ """
+ return self._quantity_available
+
+ @quantity_available.setter
+ def quantity_available(self, quantity_available):
+ """Sets the quantity_available of this Item.
+
+ The quantity of the item available. This is equal to `QuantityOnHand` - `QuantityOnBackOrder`. This value will be negative if `QuantityOnBackOrder` is greater than 0. # noqa: E501
+
+ :param quantity_available: The quantity_available of this Item. # noqa: E501
+ :type: float
+ """
+
+ self._quantity_available = quantity_available
+
+ @property
+ def quantity_on_back_order(self):
+ """Gets the quantity_on_back_order of this Item. # noqa: E501
+
+ The quantity of the item on backorder. This will be 0 if `QuantityOnHand` is greater than 0. # noqa: E501
+
+ :return: The quantity_on_back_order of this Item. # noqa: E501
+ :rtype: float
+ """
+ return self._quantity_on_back_order
+
+ @quantity_on_back_order.setter
+ def quantity_on_back_order(self, quantity_on_back_order):
+ """Sets the quantity_on_back_order of this Item.
+
+ The quantity of the item on backorder. This will be 0 if `QuantityOnHand` is greater than 0. # noqa: E501
+
+ :param quantity_on_back_order: The quantity_on_back_order of this Item. # noqa: E501
+ :type: float
+ """
+
+ self._quantity_on_back_order = quantity_on_back_order
+
@property
def updated_date_utc(self):
"""Gets the updated_date_utc of this Item. # noqa: E501
diff --git a/xero_python/appstore/api/app_store_api.py b/xero_python/appstore/api/app_store_api.py
index 05a2ac87..b201bc02 100644
--- a/xero_python/appstore/api/app_store_api.py
+++ b/xero_python/appstore/api/app_store_api.py
@@ -21,7 +21,7 @@
"""
"""
- OpenAPI spec version: 16.1.0
+ OpenAPI spec version: 16.2.0
"""
diff --git a/xero_python/assets/api/asset_api.py b/xero_python/assets/api/asset_api.py
index 5d469279..d15296ad 100644
--- a/xero_python/assets/api/asset_api.py
+++ b/xero_python/assets/api/asset_api.py
@@ -21,7 +21,7 @@
"""
"""
- OpenAPI spec version: 16.1.0
+ OpenAPI spec version: 16.2.0
"""
diff --git a/xero_python/docs/README.md b/xero_python/docs/README.md
index 3af15e4f..550a5b28 100644
--- a/xero_python/docs/README.md
+++ b/xero_python/docs/README.md
@@ -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: 16.1.0
-- Package version: 15.0.0
+- API version: 16.2.0
+- Package version: 15.1.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
For more information, please visit [https://developer.xero.com](https://developer.xero.com)
diff --git a/xero_python/file/api/files_api.py b/xero_python/file/api/files_api.py
index e1eba526..1f799f6c 100644
--- a/xero_python/file/api/files_api.py
+++ b/xero_python/file/api/files_api.py
@@ -21,7 +21,7 @@
"""
"""
- OpenAPI spec version: 16.1.0
+ OpenAPI spec version: 16.2.0
"""
diff --git a/xero_python/finance/api/finance_api.py b/xero_python/finance/api/finance_api.py
index d8edd077..826c35ad 100644
--- a/xero_python/finance/api/finance_api.py
+++ b/xero_python/finance/api/finance_api.py
@@ -21,7 +21,7 @@
"""
"""
- OpenAPI spec version: 16.1.0
+ OpenAPI spec version: 16.2.0
"""
diff --git a/xero_python/identity/api/identity_api.py b/xero_python/identity/api/identity_api.py
index 24bce811..d412386d 100644
--- a/xero_python/identity/api/identity_api.py
+++ b/xero_python/identity/api/identity_api.py
@@ -21,7 +21,7 @@
"""
"""
- OpenAPI spec version: 16.1.0
+ OpenAPI spec version: 16.2.0
"""
diff --git a/xero_python/payrollau/api/payroll_au_api.py b/xero_python/payrollau/api/payroll_au_api.py
index f15b6aa8..68b77542 100644
--- a/xero_python/payrollau/api/payroll_au_api.py
+++ b/xero_python/payrollau/api/payroll_au_api.py
@@ -21,7 +21,7 @@
"""
"""
- OpenAPI spec version: 16.1.0
+ OpenAPI spec version: 16.2.0
"""
diff --git a/xero_python/payrollauv2/api/payroll_au_v2_api.py b/xero_python/payrollauv2/api/payroll_au_v2_api.py
index cea699a8..fcc58aa7 100644
--- a/xero_python/payrollauv2/api/payroll_au_v2_api.py
+++ b/xero_python/payrollauv2/api/payroll_au_v2_api.py
@@ -21,7 +21,7 @@
"""
"""
- OpenAPI spec version: 16.1.0
+ OpenAPI spec version: 16.2.0
"""
diff --git a/xero_python/payrollnz/api/payroll_nz_api.py b/xero_python/payrollnz/api/payroll_nz_api.py
index 35900315..7c37737e 100644
--- a/xero_python/payrollnz/api/payroll_nz_api.py
+++ b/xero_python/payrollnz/api/payroll_nz_api.py
@@ -21,7 +21,7 @@
"""
"""
- OpenAPI spec version: 16.1.0
+ OpenAPI spec version: 16.2.0
"""
diff --git a/xero_python/payrolluk/api/payroll_uk_api.py b/xero_python/payrolluk/api/payroll_uk_api.py
index e1ce3643..2025c28b 100644
--- a/xero_python/payrolluk/api/payroll_uk_api.py
+++ b/xero_python/payrolluk/api/payroll_uk_api.py
@@ -21,7 +21,7 @@
"""
"""
- OpenAPI spec version: 16.1.0
+ OpenAPI spec version: 16.2.0
"""
diff --git a/xero_python/project/api/project_api.py b/xero_python/project/api/project_api.py
index b423b9b8..cfddf7ba 100644
--- a/xero_python/project/api/project_api.py
+++ b/xero_python/project/api/project_api.py
@@ -21,7 +21,7 @@
"""
"""
- OpenAPI spec version: 16.1.0
+ OpenAPI spec version: 16.2.0
"""