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
436 changes: 428 additions & 8 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>4.0.0</li>
<li class="nav-header" data-group="AppStore"><strong>VSN: </strong>5.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>4.0.0</li>
<li class="nav-header" data-group="Asset"><strong>VSN: </strong>5.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>4.0.0</li>
<li class="nav-header" data-group="Files"><strong>VSN: </strong>5.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
35 changes: 19 additions & 16 deletions docs/v1/finance/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1529,91 +1529,94 @@
"properties" : {
"directBankFeed" : {
"type" : "number",
"description" : "Sum of the amounts of all statement lines where the source of the data was a direct bank feed in to Xero. This gives an indication on the certainty of correctness of the data.",
"description" : "Sum of the amounts of all statement lines where the source of the data was a direct bank feed in to Xero via an API integration. This could be from a bank or aggregator. This gives an indication on the certainty of correctness of the data.",
"format" : "double",
"x-is-money" : true
},
"indirectBankFeed" : {
"type" : "number",
"description" : "Sum of the amounts of all statement lines where the source of the data was a indirect bank feed to Xero (usually via Yodlee). This gives an indication on the certainty of correctness of the data.",
"description" : "No longer in use.",
"format" : "double",
"deprecated" : true,
"x-is-money" : true
},
"fileUpload" : {
"type" : "number",
"description" : "Sum of the amounts of all statement lines where the source of the data was a CSV file upload in to Xero. This gives an indication on the certainty of correctness of the data.",
"description" : "Sum of the amounts of all statement lines where the source of the data was a file manually uploaded in to Xero. This gives an indication on the certainty of correctness of the data.",
"format" : "double",
"x-is-money" : true
},
"manual" : {
"type" : "number",
"description" : "Sum of the amounts of all statement lines where the source of the data was manually keyed in to Xero. This gives an indication on the certainty of correctness of the data.",
"description" : "Sum of the amounts of all statement lines where the source of the data was manually input in to Xero. This gives an indication on the certainty of correctness of the data.",
"format" : "double",
"x-is-money" : true
},
"directBankFeedPos" : {
"type" : "number",
"description" : "Sum of the amounts of all statement lines where the source of the data was a direct bank feed in to Xero. This gives an indication on the certainty of correctness of the data. Only positive transactions are included.",
"description" : "Sum of the amounts of all statement lines where the source of the data was a direct bank feed in to Xero via an API integration. This could be from a bank or aggregator. This gives an indication on the certainty of correctness of the data. Only positive transactions are included.",
"format" : "double",
"x-is-money" : true
},
"indirectBankFeedPos" : {
"type" : "number",
"description" : "Sum of the amounts of all statement lines where the source of the data was a indirect bank feed to Xero (usually via Yodlee). This gives an indication on the certainty of correctness of the data. Only positive transactions are included.",
"description" : "No longer in use.",
"format" : "double",
"deprecated" : true,
"x-is-money" : true
},
"fileUploadPos" : {
"type" : "number",
"description" : "Sum of the amounts of all statement lines where the source of the data was a CSV file upload in to Xero. This gives an indication on the certainty of correctness of the data. Only positive transactions are included.",
"description" : "Sum of the amounts of all statement lines where the source of the data was a file manually uploaded in to Xero. This gives an indication on the certainty of correctness of the data. Only positive transactions are included.",
"format" : "double",
"x-is-money" : true
},
"manualPos" : {
"type" : "number",
"description" : "Sum of the amounts of all statement lines where the source of the data was manually keyed in to Xero. This gives an indication on the certainty of correctness of the data. Only positive transactions are included.",
"description" : "Sum of the amounts of all statement lines where the source of the data was manually input in to Xero. This gives an indication on the certainty of correctness of the data. Only positive transactions are included.",
"format" : "double",
"x-is-money" : true
},
"directBankFeedNeg" : {
"type" : "number",
"description" : "Sum of the amounts of all statement lines where the source of the data was a direct bank feed in to Xero. This gives an indication on the certainty of correctness of the data. Only negative transactions are included.",
"description" : "Sum of the amounts of all statement lines where the source of the data was a direct bank feed in to Xero via an API integration. This could be from a bank or aggregator. This gives an indication on the certainty of correctness of the data. Only negative transactions are included.",
"format" : "double",
"x-is-money" : true
},
"indirectBankFeedNeg" : {
"type" : "number",
"description" : "Sum of the amounts of all statement lines where the source of the data was a indirect bank feed to Xero (usually via Yodlee). This gives an indication on the certainty of correctness of the data. Only negative transactions are included.",
"description" : "No longer in use.",
"format" : "double",
"deprecated" : true,
"x-is-money" : true
},
"fileUploadNeg" : {
"type" : "number",
"description" : "Sum of the amounts of all statement lines where the source of the data was a CSV file upload in to Xero. This gives an indication on the certainty of correctness of the data. Only negative transactions are included.",
"description" : "Sum of the amounts of all statement lines where the source of the data was a file manually uploaded in to Xero. This gives an indication on the certainty of correctness of the data. Only negative transactions are included.",
"format" : "double",
"x-is-money" : true
},
"manualNeg" : {
"type" : "number",
"description" : "Sum of the amounts of all statement lines where the source of the data was manually keyed in to Xero. This gives an indication on the certainty of correctness of the data. Only negative transactions are included.",
"description" : "Sum of the amounts of all statement lines where the source of the data was manually input in to Xero. This gives an indication on the certainty of correctness of the data. Only negative transactions are included.",
"format" : "double",
"x-is-money" : true
},
"otherPos" : {
"type" : "number",
"description" : "Sum of the amounts of all statement lines where the source of the data was any other category. This gives an indication on the certainty of correctness of the data. Only positive transactions are included.",
"description" : "Sum of the amounts of all statement lines where the source of the data was unknown. This gives an indication on the certainty of correctness of the data. Only positive transactions are included.",
"format" : "double",
"x-is-money" : true
},
"otherNeg" : {
"type" : "number",
"description" : "Sum of the amounts of all statement lines where the source of the data was any other category. This gives an indication on the certainty of correctness of the data. Only negative transactions are included.",
"description" : "Sum of the amounts of all statement lines where the source of the data was unknown. This gives an indication on the certainty of correctness of the data. Only negative transactions are included.",
"format" : "double",
"x-is-money" : true
},
"other" : {
"type" : "number",
"description" : "Sum of the amounts of all statement lines where the source of the data was any other category. This gives an indication on the certainty of correctness of the data.",
"description" : "Sum of the amounts of all statement lines where the source of the data was unknown. This gives an indication on the certainty of correctness of the data.",
"format" : "double",
"x-is-money" : true
}
Expand Down Expand Up @@ -2734,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>4.0.0</li>
<li class="nav-header" data-group="Finance"><strong>VSN: </strong>5.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>4.0.0</li>
<li class="nav-header" data-group="PayrollAu"><strong>VSN: </strong>5.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>4.0.0</li>
<li class="nav-header" data-group="PayrollNz"><strong>VSN: </strong>5.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>4.0.0</li>
<li class="nav-header" data-group="PayrollUk"><strong>VSN: </strong>5.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>4.0.0</li>
<li class="nav-header" data-group="Project"><strong>VSN: </strong>5.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="4.0.0",
version="5.0.0",
)
17 changes: 11 additions & 6 deletions tests/accounting/api/test_accounting_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
LineItem,
Attachments,
Attachment,
GetInvoicesResponse
)
from xero_python.api_client import ApiClient
from xero_python.rest import RESTClientObject
Expand Down Expand Up @@ -94,11 +95,11 @@ def test_invoice_attachment_upload_and_download(
"""

# 1. get first page of invoices
invoices = accounting_api.get_invoices(xero_tenant_id, page=1)
assert isinstance(invoices, Invoices)
assert len(invoices.invoices)
invoiceResponse = accounting_api.get_invoices(xero_tenant_id, page=1)
assert isinstance(invoiceResponse, GetInvoicesResponse)
assert len(invoiceResponse.invoices)
# 2. choose first invoice
invoice = invoices.invoices[0]
invoice = invoiceResponse.invoices[0]
assert isinstance(invoice, Invoice)
# 3. upload test pdf file as invoice attachment
include_online = True
Expand Down Expand Up @@ -341,7 +342,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 = Invoices(
expected = GetInvoicesResponse(
invoices=[
Invoice(
amount_credited=Decimal("0.00"),
Expand Down Expand Up @@ -473,7 +474,11 @@ def test_get_invoices(sandbox_accounting_api: AccountingApi, xero_tenant_id):
2018, 11, 2, 16, 37, 28, 927000, tzinfo=tz.UTC
),
),
]
],
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__ = "4.0.0"
__version__ = "5.0.0"
22 changes: 22 additions & 0 deletions xero_python/accounting/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,27 @@
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 @@ -108,6 +129,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.payment import Payment
from xero_python.accounting.models.payment_delete import PaymentDelete
from xero_python.accounting.models.payment_service import PaymentService
Expand Down
Loading