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
381 changes: 104 additions & 277 deletions docs/v1/accounting/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/v1/appstore/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1241,7 +1241,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="AppStore"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="AppStore"><strong>VSN: </strong>5.0.0</li>
<li class="nav-header" data-group="AppStore"><strong>VSN: </strong>6.0.0</li>
<li class="nav-header" data-group="AppStore"><a href="#api-AppStore">Methods</a></li>
<li data-group="AppStore" data-name="getSubscription" class="">
<a href="#api-AppStore-getSubscription">getSubscription</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/v1/assets/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1392,7 +1392,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="Asset"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="Asset"><strong>VSN: </strong>5.0.0</li>
<li class="nav-header" data-group="Asset"><strong>VSN: </strong>6.0.0</li>
<li class="nav-header" data-group="Asset"><a href="#api-Asset">Methods</a></li>
<li data-group="Asset" data-name="createAsset" class="">
<a href="#api-Asset-createAsset">createAsset</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/v1/files/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1170,7 +1170,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="Files"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="Files"><strong>VSN: </strong>5.0.0</li>
<li class="nav-header" data-group="Files"><strong>VSN: </strong>6.0.0</li>
<li class="nav-header" data-group="Files"><a href="#api-Files">Methods</a></li>
<li data-group="Files" data-name="createFileAssociation" class="">
<a href="#api-Files-createFileAssociation">createFileAssociation</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/v1/finance/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2737,7 +2737,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="Finance"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="Finance"><strong>VSN: </strong>5.0.0</li>
<li class="nav-header" data-group="Finance"><strong>VSN: </strong>6.0.0</li>
<li class="nav-header" data-group="Finance"><a href="#api-Finance">Methods</a></li>
<li data-group="Finance" data-name="getAccountingActivityAccountUsage" class="">
<a href="#api-Finance-getAccountingActivityAccountUsage">getAccountingActivityAccountUsage</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/v1/payroll-au/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3412,7 +3412,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="PayrollAu"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="PayrollAu"><strong>VSN: </strong>5.0.0</li>
<li class="nav-header" data-group="PayrollAu"><strong>VSN: </strong>6.0.0</li>
<li class="nav-header" data-group="PayrollAu"><a href="#api-PayrollAu">Methods</a></li>
<li data-group="PayrollAu" data-name="approveLeaveApplication" class="">
<a href="#api-PayrollAu-approveLeaveApplication">approveLeaveApplication</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/v1/payroll-nz/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3843,7 +3843,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="PayrollNz"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="PayrollNz"><strong>VSN: </strong>5.0.0</li>
<li class="nav-header" data-group="PayrollNz"><strong>VSN: </strong>6.0.0</li>
<li class="nav-header" data-group="PayrollNz"><a href="#api-PayrollNz">Methods</a></li>
<li data-group="PayrollNz" data-name="approveTimesheet" class="">
<a href="#api-PayrollNz-approveTimesheet">approveTimesheet</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/v1/payroll-uk/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3510,7 +3510,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="PayrollUk"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="PayrollUk"><strong>VSN: </strong>5.0.0</li>
<li class="nav-header" data-group="PayrollUk"><strong>VSN: </strong>6.0.0</li>
<li class="nav-header" data-group="PayrollUk"><a href="#api-PayrollUk">Methods</a></li>
<li data-group="PayrollUk" data-name="approveTimesheet" class="">
<a href="#api-PayrollUk-approveTimesheet">approveTimesheet</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/v1/projects/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1462,7 +1462,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="Project"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="Project"><strong>VSN: </strong>5.0.0</li>
<li class="nav-header" data-group="Project"><strong>VSN: </strong>6.0.0</li>
<li class="nav-header" data-group="Project"><a href="#api-Project">Methods</a></li>
<li data-group="Project" data-name="createProject" class="">
<a href="#api-Project-createProject">createProject</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="5.0.0",
version="6.0.0",
)
9 changes: 2 additions & 7 deletions tests/accounting/api/test_accounting_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
LineItem,
Attachments,
Attachment,
GetInvoicesResponse
)
from xero_python.api_client import ApiClient
from xero_python.rest import RESTClientObject
Expand Down Expand Up @@ -96,7 +95,7 @@ def test_invoice_attachment_upload_and_download(

# 1. get first page of invoices
invoiceResponse = accounting_api.get_invoices(xero_tenant_id, page=1)
assert isinstance(invoiceResponse, GetInvoicesResponse)
assert isinstance(invoiceResponse, Invoices)
assert len(invoiceResponse.invoices)
# 2. choose first invoice
invoice = invoiceResponse.invoices[0]
Expand Down Expand Up @@ -342,7 +341,7 @@ def test_get_invoices(sandbox_accounting_api: AccountingApi, xero_tenant_id):
# When getting all invoices
result = sandbox_accounting_api.get_invoices(xero_tenant_id)
# Then expect correct invoices received
expected = GetInvoicesResponse(
expected = Invoices(
invoices=[
Invoice(
amount_credited=Decimal("0.00"),
Expand Down Expand Up @@ -475,10 +474,6 @@ def test_get_invoices(sandbox_accounting_api: AccountingApi, xero_tenant_id):
),
),
],
provider_name = 'Provider Name Example',
status = 'OK',
date_time_utc = '/Date(1552326816230)/',
id = '900c500b-e83c-4ce2-902a-b8ba04751748'
)
assert result == expected

Expand Down
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__ = "5.0.0"
__version__ = "6.0.0"
23 changes: 1 addition & 22 deletions xero_python/accounting/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,27 +76,6 @@
from xero_python.accounting.models.expense_claim import ExpenseClaim
from xero_python.accounting.models.expense_claims import ExpenseClaims
from xero_python.accounting.models.external_link import ExternalLink
from xero_python.accounting.models.get_bank_transactions_response import (
GetBankTransactionsResponse,
)
from xero_python.accounting.models.get_contacts_response import GetContactsResponse
from xero_python.accounting.models.get_credit_notes_response import (
GetCreditNotesResponse,
)
from xero_python.accounting.models.get_invoices_response import GetInvoicesResponse
from xero_python.accounting.models.get_manual_journals_response import (
GetManualJournalsResponse,
)
from xero_python.accounting.models.get_overpayments_response import (
GetOverpaymentsResponse,
)
from xero_python.accounting.models.get_payments_response import GetPaymentsResponse
from xero_python.accounting.models.get_prepayments_response import (
GetPrepaymentsResponse,
)
from xero_python.accounting.models.get_purchase_orders_response import (
GetPurchaseOrdersResponse,
)
from xero_python.accounting.models.history_record import HistoryRecord
from xero_python.accounting.models.history_records import HistoryRecords
from xero_python.accounting.models.import_summary import ImportSummary
Expand Down Expand Up @@ -129,7 +108,7 @@
from xero_python.accounting.models.organisations import Organisations
from xero_python.accounting.models.overpayment import Overpayment
from xero_python.accounting.models.overpayments import Overpayments
from xero_python.accounting.models.page_info import PageInfo
from xero_python.accounting.models.pagination import Pagination
from xero_python.accounting.models.payment import Payment
from xero_python.accounting.models.payment_delete import PaymentDelete
from xero_python.accounting.models.payment_service import PaymentService
Expand Down
53 changes: 34 additions & 19 deletions 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: 5.0.0
OpenAPI spec version: 6.0.0
"""

import importlib
Expand Down Expand Up @@ -7348,7 +7348,7 @@ def get_bank_transactions(
: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
:return: GetBankTransactionsResponse
:return: BankTransactions
"""

# verify the required parameter 'xero_tenant_id' is set
Expand Down Expand Up @@ -7408,7 +7408,7 @@ def get_bank_transactions(
body=body_params,
post_params=form_params,
files=local_var_files,
response_type="GetBankTransactionsResponse",
response_type="BankTransactions",
response_model_finder=self.get_model_finder(),
auth_settings=auth_settings,
_return_http_data_only=_return_http_data_only,
Expand Down Expand Up @@ -9383,7 +9383,7 @@ def get_contacts(
: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
:return: GetContactsResponse
:return: Contacts
"""

# verify the required parameter 'xero_tenant_id' is set
Expand Down Expand Up @@ -9454,7 +9454,7 @@ def get_contacts(
body=body_params,
post_params=form_params,
files=local_var_files,
response_type="GetContactsResponse",
response_type="Contacts",
response_model_finder=self.get_model_finder(),
auth_settings=auth_settings,
_return_http_data_only=_return_http_data_only,
Expand Down Expand Up @@ -9995,7 +9995,7 @@ def get_credit_notes(
: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
:return: GetCreditNotesResponse
:return: CreditNotes
"""

# verify the required parameter 'xero_tenant_id' is set
Expand Down Expand Up @@ -10055,7 +10055,7 @@ def get_credit_notes(
body=body_params,
post_params=form_params,
files=local_var_files,
response_type="GetCreditNotesResponse",
response_type="CreditNotes",
response_model_finder=self.get_model_finder(),
auth_settings=auth_settings,
_return_http_data_only=_return_http_data_only,
Expand Down Expand Up @@ -11115,6 +11115,7 @@ def get_invoices(
unitdp=empty,
summary_only=empty,
page_size=empty,
search_term=empty,
_return_http_data_only=True,
_preload_content=True,
_request_timeout=None,
Expand All @@ -11135,10 +11136,11 @@ def get_invoices(
:param int unitdp: e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
:param bool summary_only: Use summaryOnly=true in GET Contacts and Invoices endpoint to retrieve a smaller version of the response object. This returns only lightweight fields, excluding computation-heavy fields from the response, making the API calls quick and efficient.
:param int page_size: Number of records to retrieve per page
:param str search_term: Search parameter that performs a case-insensitive text search across the fields e.g. InvoiceNumber, Reference.
: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
:return: GetInvoicesResponse
:return: Invoices
"""

# verify the required parameter 'xero_tenant_id' is set
Expand Down Expand Up @@ -11194,6 +11196,9 @@ def get_invoices(
if page_size is not empty:
query_params.append(("pageSize", page_size))

if search_term is not empty:
query_params.append(("searchTerm", search_term))

header_params = {
"xero-tenant-id": xero_tenant_id,
}
Expand Down Expand Up @@ -11224,7 +11229,7 @@ def get_invoices(
body=body_params,
post_params=form_params,
files=local_var_files,
response_type="GetInvoicesResponse",
response_type="Invoices",
response_model_finder=self.get_model_finder(),
auth_settings=auth_settings,
_return_http_data_only=_return_http_data_only,
Expand Down Expand Up @@ -12255,7 +12260,7 @@ def get_manual_journals(
: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
:return: GetManualJournalsResponse
:return: ManualJournals
"""

# verify the required parameter 'xero_tenant_id' is set
Expand Down Expand Up @@ -12312,7 +12317,7 @@ def get_manual_journals(
body=body_params,
post_params=form_params,
files=local_var_files,
response_type="GetManualJournalsResponse",
response_type="ManualJournals",
response_model_finder=self.get_model_finder(),
auth_settings=auth_settings,
_return_http_data_only=_return_http_data_only,
Expand Down Expand Up @@ -12845,6 +12850,7 @@ def get_overpayments(
order=empty,
page=empty,
unitdp=empty,
page_size=empty,
_return_http_data_only=True,
_preload_content=True,
_request_timeout=None,
Expand All @@ -12857,10 +12863,11 @@ def get_overpayments(
:param str order: Order by an any element
:param int page: e.g. page=1 – Up to 100 overpayments will be returned in a single API call with line items shown for each overpayment
: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 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
:return: GetOverpaymentsResponse
:return: Overpayments
"""

# verify the required parameter 'xero_tenant_id' is set
Expand All @@ -12887,6 +12894,9 @@ def get_overpayments(
if unitdp is not empty:
query_params.append(("unitdp", unitdp))

if page_size is not empty:
query_params.append(("pageSize", page_size))

header_params = {
"xero-tenant-id": xero_tenant_id,
}
Expand Down Expand Up @@ -12917,7 +12927,7 @@ def get_overpayments(
body=body_params,
post_params=form_params,
files=local_var_files,
response_type="GetOverpaymentsResponse",
response_type="Overpayments",
response_model_finder=self.get_model_finder(),
auth_settings=auth_settings,
_return_http_data_only=_return_http_data_only,
Expand Down Expand Up @@ -13169,7 +13179,7 @@ def get_payments(
: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
:return: GetPaymentsResponse
:return: Payments
"""

# verify the required parameter 'xero_tenant_id' is set
Expand Down Expand Up @@ -13226,7 +13236,7 @@ def get_payments(
body=body_params,
post_params=form_params,
files=local_var_files,
response_type="GetPaymentsResponse",
response_type="Payments",
response_model_finder=self.get_model_finder(),
auth_settings=auth_settings,
_return_http_data_only=_return_http_data_only,
Expand Down Expand Up @@ -13397,6 +13407,7 @@ def get_prepayments(
order=empty,
page=empty,
unitdp=empty,
page_size=empty,
_return_http_data_only=True,
_preload_content=True,
_request_timeout=None,
Expand All @@ -13409,10 +13420,11 @@ def get_prepayments(
: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 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 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
:return: GetPrepaymentsResponse
:return: Prepayments
"""

# verify the required parameter 'xero_tenant_id' is set
Expand All @@ -13439,6 +13451,9 @@ def get_prepayments(
if unitdp is not empty:
query_params.append(("unitdp", unitdp))

if page_size is not empty:
query_params.append(("pageSize", page_size))

header_params = {
"xero-tenant-id": xero_tenant_id,
}
Expand Down Expand Up @@ -13469,7 +13484,7 @@ def get_prepayments(
body=body_params,
post_params=form_params,
files=local_var_files,
response_type="GetPrepaymentsResponse",
response_type="Prepayments",
response_model_finder=self.get_model_finder(),
auth_settings=auth_settings,
_return_http_data_only=_return_http_data_only,
Expand Down Expand Up @@ -14087,7 +14102,7 @@ def get_purchase_orders(
: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
:return: GetPurchaseOrdersResponse
:return: PurchaseOrders
"""

# verify the required parameter 'xero_tenant_id' is set
Expand Down Expand Up @@ -14150,7 +14165,7 @@ def get_purchase_orders(
body=body_params,
post_params=form_params,
files=local_var_files,
response_type="GetPurchaseOrdersResponse",
response_type="PurchaseOrders",
response_model_finder=self.get_model_finder(),
auth_settings=auth_settings,
_return_http_data_only=_return_http_data_only,
Expand Down
Loading