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
2 changes: 1 addition & 1 deletion docs/v1/accounting/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6008,7 +6008,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.22.0</li>
<li class="nav-header" data-group="Accounting"><strong>VSN: </strong>1.23.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 docs/v1/appstore/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,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>1.22.0</li>
<li class="nav-header" data-group="AppStore"><strong>VSN: </strong>1.23.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>1.22.0</li>
<li class="nav-header" data-group="Asset"><strong>VSN: </strong>1.23.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 @@ -1155,7 +1155,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>1.22.0</li>
<li class="nav-header" data-group="Files"><strong>VSN: </strong>1.23.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 @@ -2706,7 +2706,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>1.22.0</li>
<li class="nav-header" data-group="Finance"><strong>VSN: </strong>1.23.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 @@ -3254,7 +3254,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>1.22.0</li>
<li class="nav-header" data-group="PayrollAu"><strong>VSN: </strong>1.23.0</li>
<li class="nav-header" data-group="PayrollAu"><a href="#api-PayrollAu">Methods</a></li>
<li data-group="PayrollAu" data-name="createEmployee" class="">
<a href="#api-PayrollAu-createEmployee">createEmployee</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 @@ -3838,7 +3838,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>1.22.0</li>
<li class="nav-header" data-group="PayrollNz"><strong>VSN: </strong>1.23.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>1.22.0</li>
<li class="nav-header" data-group="PayrollUk"><strong>VSN: </strong>1.23.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 @@ -1468,7 +1468,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>1.22.0</li>
<li class="nav-header" data-group="Project"><strong>VSN: </strong>1.23.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="1.22.0",
version="1.23.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.22.0"
__version__ = "1.23.0"
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.35.0
OpenAPI spec version: 2.36.0
"""

import importlib
Expand Down
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.35.0
OpenAPI spec version: 2.36.0
"""

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.35.0
OpenAPI spec version: 2.36.0
"""

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.35.0
- Package version: 1.22.0
- API version: 2.36.0
- Package version: 1.23.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
For more information, please visit [https://developer.xero.com](https://developer.xero.com)

Expand Down
83 changes: 81 additions & 2 deletions 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.35.0
OpenAPI spec version: 2.36.0
"""

import importlib
Expand Down Expand Up @@ -448,7 +448,7 @@ def get_associations_by_object(
):
"""Retrieves an association object using a unique object ID # noqa: E501
OAuth2 scope: files, files.read
By passing in the appropriate options, # noqa: E501
By passing in the appropriate options, you can retrieve an association # noqa: E501
:param str xero_tenant_id: Xero identifier for Tenant (required)
:param str object_id: Object id for single object (required)
:param bool _return_http_data_only: return received data only
Expand Down Expand Up @@ -515,6 +515,85 @@ def get_associations_by_object(
except exceptions.HTTPStatusException as error:
raise translate_status_exception(error, self, "get_associations_by_object")

def get_associations_count(
self,
xero_tenant_id,
object_ids,
_return_http_data_only=True,
_preload_content=True,
_request_timeout=None,
):
"""Retrieves a count of associations for a list of objects. # noqa: E501
OAuth2 scope: files, files.read
By passing in the appropriate options, you can retrieve the association count for objects # noqa: E501
:param str xero_tenant_id: Xero identifier for Tenant (required)
:param list[str] object_ids: A comma-separated list of object ids (required)
: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: object
"""

# verify the required parameter 'xero_tenant_id' is set
if xero_tenant_id is None:
raise ValueError(
"Missing the required parameter `xero_tenant_id` "
"when calling `get_associations_count`"
)
# verify the required parameter 'object_ids' is set
if object_ids is None:
raise ValueError(
"Missing the required parameter `object_ids` "
"when calling `get_associations_count`"
)

collection_formats = {
"ObjectIds": "multi",
}
path_params = {}

query_params = [
("ObjectIds", object_ids),
]

header_params = {
"xero-tenant-id": xero_tenant_id,
}

local_var_files = {}
form_params = []

body_params = None
# HTTP header `Accept`
header_params["Accept"] = self.api_client.select_header_accept(
["application/json"]
)

# Authentication setting
auth_settings = ["OAuth2"]
url = self.get_resource_url("/Associations/Count")

try:
return self.api_client.call_api(
url,
"GET",
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type="object",
response_model_finder=self.get_model_finder(),
auth_settings=auth_settings,
_return_http_data_only=_return_http_data_only,
_preload_content=_preload_content,
_request_timeout=_request_timeout,
collection_formats=collection_formats,
)
except exceptions.HTTPStatusException as error:
raise translate_status_exception(error, self, "get_associations_count")

def get_file(
self,
xero_tenant_id,
Expand Down
68 changes: 67 additions & 1 deletion xero_python/file/docs/FilesApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Method | HTTP request | Description
[**delete_file_association**](FilesApi.md#delete_file_association) | **DELETE** /Files/{FileId}/Associations/{ObjectId} | Deletes an existing file association
[**delete_folder**](FilesApi.md#delete_folder) | **DELETE** /Folders/{FolderId} | Deletes a folder
[**get_associations_by_object**](FilesApi.md#get_associations_by_object) | **GET** /Associations/{ObjectId} | Retrieves an association object using a unique object ID
[**get_associations_count**](FilesApi.md#get_associations_count) | **GET** /Associations/Count | Retrieves a count of associations for a list of objects.
[**get_file**](FilesApi.md#get_file) | **GET** /Files/{FileId} | Retrieves a file by a unique file ID
[**get_file_associations**](FilesApi.md#get_file_associations) | **GET** /Files/{FileId}/Associations | Retrieves a specific file associations
[**get_file_content**](FilesApi.md#get_file_content) | **GET** /Files/{FileId}/Content | Retrieves the content of a specific file
Expand Down Expand Up @@ -354,7 +355,7 @@ void (empty response body)

Retrieves an association object using a unique object ID

By passing in the appropriate options,
By passing in the appropriate options, you can retrieve an association

### Example

Expand Down Expand Up @@ -414,6 +415,71 @@ 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_associations_count**
> object get_associations_count(xero_tenant_id, object_ids)

Retrieves a count of associations for a list of objects.

By passing in the appropriate options, you can retrieve the association count for objects

### Example

* OAuth Authentication (OAuth2):
```python
from xero_python.api_client import Configuration, ApiClient
from xero_python.api_client.oauth2 import OAuth2Token
from xero_python.exceptions import ApiException
from xero_python.file import FilesApi
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
# simplified version, `xero_oauth2_token` represents permanent global token storage
xero_oauth2_token = {} # set to valid xero oauth2 token dictionary
# create client configuration with client id and client secret for automatic token refresh
api_config = Configuration(oauth2_token=OAuth2Token(
client_id="YOUR_API_CLIENT_ID", client_secret="YOUR_API_CLIENT_SECRET"
))
# configure xero-python sdk client
api_client = ApiClient(
api_config,
oauth2_token_saver=lambda x: xero_oauth2_token.update(x),
oauth2_token_getter=lambda : xero_oauth2_token
)
# create an instance of the API class
api_instance = FilesApi(api_client)

xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant
object_ids = ['object_ids_example'] # list[str] | A comma-separated list of object ids
try:
# Retrieves a count of associations for a list of objects.
api_response = api_instance.get_associations_count(xero_tenant_id, object_ids)
pprint(api_response)
except ApiException as e:
print("Exception when calling FilesApi->get_associations_count: %s\n" % e)
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xero_tenant_id** | **str**| Xero identifier for Tenant |
**object_ids** | [**list[str]**](str.md)| A comma-separated list of object ids |

### Return type

**object**

### Authorization

[OAuth2](../README.md#OAuth2)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[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_file**
> FileObject get_file(xero_tenant_id, file_id)

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

"""
OpenAPI spec version: 2.35.0
OpenAPI spec version: 2.36.0
"""

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

"""
OpenAPI spec version: 2.35.0
OpenAPI spec version: 2.36.0
"""

import importlib
Expand Down
2 changes: 2 additions & 0 deletions xero_python/payrollau/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@
)
from xero_python.payrollau.models.manual_tax_type import ManualTaxType
from xero_python.payrollau.models.opening_balances import OpeningBalances
from xero_python.payrollau.models.paid_leave_earnings_line import PaidLeaveEarningsLine
from xero_python.payrollau.models.pay_item import PayItem
from xero_python.payrollau.models.pay_items import PayItems
from xero_python.payrollau.models.pay_out_type import PayOutType
from xero_python.payrollau.models.pay_run import PayRun
from xero_python.payrollau.models.pay_run_status import PayRunStatus
from xero_python.payrollau.models.pay_runs import PayRuns
Expand Down
2 changes: 1 addition & 1 deletion xero_python/payrollau/api/payroll_au_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"""

"""
OpenAPI spec version: 2.35.0
OpenAPI spec version: 2.36.0
"""

import importlib
Expand Down
1 change: 1 addition & 0 deletions xero_python/payrollau/docs/LeaveApplication.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Name | Type | Description | Notes
**start_date** | **date** | Start date of the leave (YYYY-MM-DD) | [optional]
**end_date** | **date** | End date of the leave (YYYY-MM-DD) | [optional]
**description** | **str** | The Description of the Leave | [optional]
**pay_out_type** | [**PayOutType**](PayOutType.md) | | [optional]
**leave_periods** | [**list[LeavePeriod]**](LeavePeriod.md) | | [optional]
**updated_date_utc** | **datetime** | Last modified timestamp | [optional]
**validation_errors** | [**list[ValidationError]**](ValidationError.md) | Displays array of validation error messages from the API | [optional]
Expand Down
1 change: 1 addition & 0 deletions xero_python/payrollau/docs/LeaveEarningsLine.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Name | Type | Description | Notes
**earnings_rate_id** | **str** | Xero identifier | [optional]
**rate_per_unit** | **float** | Rate per unit of the EarningsLine. | [optional]
**number_of_units** | **float** | Earnings rate number of units. | [optional]
**pay_out_type** | [**PayOutType**](PayOutType.md) | | [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)

Expand Down
1 change: 1 addition & 0 deletions xero_python/payrollau/docs/OpeningBalances.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Name | Type | Description | Notes
**super_lines** | [**list[SuperLine]**](SuperLine.md) | | [optional]
**reimbursement_lines** | [**list[ReimbursementLine]**](ReimbursementLine.md) | | [optional]
**leave_lines** | [**list[LeaveLine]**](LeaveLine.md) | | [optional]
**paid_leave_earnings_lines** | [**list[PaidLeaveEarningsLine]**](PaidLeaveEarningsLine.md) | | [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)

Expand Down
Loading