diff --git a/docs/v1/accounting/index.html b/docs/v1/accounting/index.html index f2b551b5..f02fc636 100644 --- a/docs/v1/accounting/index.html +++ b/docs/v1/accounting/index.html @@ -6008,7 +6008,7 @@ SDK: - VSN: 1.24.0 + VSN: 1.25.0 Methods createAccount diff --git a/docs/v1/appstore/index.html b/docs/v1/appstore/index.html index f80d40b1..54ea0326 100644 --- a/docs/v1/appstore/index.html +++ b/docs/v1/appstore/index.html @@ -1133,7 +1133,7 @@ SDK: - VSN: 1.24.0 + VSN: 1.25.0 Methods getSubscription diff --git a/docs/v1/assets/index.html b/docs/v1/assets/index.html index a3a3c255..5fdf9c78 100644 --- a/docs/v1/assets/index.html +++ b/docs/v1/assets/index.html @@ -1392,7 +1392,7 @@ SDK: - VSN: 1.24.0 + VSN: 1.25.0 Methods createAsset diff --git a/docs/v1/files/index.html b/docs/v1/files/index.html index 51bfc486..01a5065b 100644 --- a/docs/v1/files/index.html +++ b/docs/v1/files/index.html @@ -1155,7 +1155,7 @@ SDK: - VSN: 1.24.0 + VSN: 1.25.0 Methods createFileAssociation diff --git a/docs/v1/finance/index.html b/docs/v1/finance/index.html index 9867c635..b771ae59 100644 --- a/docs/v1/finance/index.html +++ b/docs/v1/finance/index.html @@ -2706,7 +2706,7 @@ SDK: - VSN: 1.24.0 + VSN: 1.25.0 Methods getAccountingActivityAccountUsage diff --git a/docs/v1/payroll-au/index.html b/docs/v1/payroll-au/index.html index b4c46a64..1f5d1499 100644 --- a/docs/v1/payroll-au/index.html +++ b/docs/v1/payroll-au/index.html @@ -3254,7 +3254,7 @@ SDK: - VSN: 1.24.0 + VSN: 1.25.0 Methods createEmployee diff --git a/docs/v1/payroll-nz/index.html b/docs/v1/payroll-nz/index.html index aa36ff0e..427acba2 100644 --- a/docs/v1/payroll-nz/index.html +++ b/docs/v1/payroll-nz/index.html @@ -3838,7 +3838,7 @@ SDK: - VSN: 1.24.0 + VSN: 1.25.0 Methods approveTimesheet diff --git a/docs/v1/payroll-uk/index.html b/docs/v1/payroll-uk/index.html index 6c944705..7d50840b 100644 --- a/docs/v1/payroll-uk/index.html +++ b/docs/v1/payroll-uk/index.html @@ -3510,7 +3510,7 @@ SDK: - VSN: 1.24.0 + VSN: 1.25.0 Methods approveTimesheet diff --git a/docs/v1/projects/index.html b/docs/v1/projects/index.html index 744811ca..3473ed9d 100644 --- a/docs/v1/projects/index.html +++ b/docs/v1/projects/index.html @@ -1468,7 +1468,7 @@ SDK: - VSN: 1.24.0 + VSN: 1.25.0 Methods createProject diff --git a/setup.py b/setup.py index ae199c17..0e630248 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="1.24.0", + version="1.25.0", ) diff --git a/xero_python/__init__.py b/xero_python/__init__.py index e6c6ff1a..092c1523 100644 --- a/xero_python/__init__.py +++ b/xero_python/__init__.py @@ -2,4 +2,4 @@ __author__ = """Xero Developer API""" __email__ = "api@xero.com" -__version__ = "1.24.0" +__version__ = "1.25.0" diff --git a/xero_python/accounting/api/accounting_api.py b/xero_python/accounting/api/accounting_api.py index f8f8dcc5..fc4c9469 100644 --- a/xero_python/accounting/api/accounting_api.py +++ b/xero_python/accounting/api/accounting_api.py @@ -10,7 +10,7 @@ """ """ - OpenAPI spec version: 2.37.0 + OpenAPI spec version: 2.38.0 """ import importlib diff --git a/xero_python/accounting/models/tax_rate.py b/xero_python/accounting/models/tax_rate.py index 7f4b5532..c1c620e2 100644 --- a/xero_python/accounting/models/tax_rate.py +++ b/xero_python/accounting/models/tax_rate.py @@ -335,6 +335,11 @@ def report_tax_type(self, report_tax_type): "SROVRRS", "SROVRLVG", "SRLVG", + "IM", + "IMESS", + "IMN33", + "IMRE", + "BADDEBTRECOVERY", "None", ] # noqa: E501 diff --git a/xero_python/accounting/models/tax_type.py b/xero_python/accounting/models/tax_type.py index 26be3411..dbf1c59a 100644 --- a/xero_python/accounting/models/tax_type.py +++ b/xero_python/accounting/models/tax_type.py @@ -110,3 +110,13 @@ class TaxType(Enum): TXRCREY23 = "TXRCREY23" TXRCESSY23 = "TXRCESSY23" TXRCTSY23 = "TXRCTSY23" + IM = "IM" + IMY23 = "IMY23" + IMESS = "IMESS" + IMESSY23 = "IMESSY23" + IMN33 = "IMN33" + IMN33Y23 = "IMN33Y23" + IMRE = "IMRE" + IMREY23 = "IMREY23" + BADDEBTRECOVERY = "BADDEBTRECOVERY" + BADDEBTRECOVERYY23 = "BADDEBTRECOVERYY23" diff --git a/xero_python/appstore/api/app_store_api.py b/xero_python/appstore/api/app_store_api.py index c87ee5b2..f7965d0b 100644 --- a/xero_python/appstore/api/app_store_api.py +++ b/xero_python/appstore/api/app_store_api.py @@ -10,7 +10,7 @@ """ """ - OpenAPI spec version: 2.37.0 + OpenAPI spec version: 2.38.0 """ import importlib diff --git a/xero_python/assets/api/asset_api.py b/xero_python/assets/api/asset_api.py index e3a1c620..9f014898 100644 --- a/xero_python/assets/api/asset_api.py +++ b/xero_python/assets/api/asset_api.py @@ -10,7 +10,7 @@ """ """ - OpenAPI spec version: 2.37.0 + OpenAPI spec version: 2.38.0 """ import importlib diff --git a/xero_python/docs/README.md b/xero_python/docs/README.md index fb4d33a0..22263ea5 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: 2.37.0 -- Package version: 1.24.0 +- API version: 2.38.0 +- Package version: 1.25.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 0fee738c..8bc7b0a5 100644 --- a/xero_python/file/api/files_api.py +++ b/xero_python/file/api/files_api.py @@ -10,7 +10,7 @@ """ """ - OpenAPI spec version: 2.37.0 + OpenAPI spec version: 2.38.0 """ import importlib diff --git a/xero_python/finance/api/finance_api.py b/xero_python/finance/api/finance_api.py index d9e5df8e..1d769a91 100644 --- a/xero_python/finance/api/finance_api.py +++ b/xero_python/finance/api/finance_api.py @@ -10,7 +10,7 @@ """ """ - OpenAPI spec version: 2.37.0 + OpenAPI spec version: 2.38.0 """ import importlib diff --git a/xero_python/identity/api/identity_api.py b/xero_python/identity/api/identity_api.py index 6d49a2ec..5ba397a5 100644 --- a/xero_python/identity/api/identity_api.py +++ b/xero_python/identity/api/identity_api.py @@ -10,7 +10,7 @@ """ """ - OpenAPI spec version: 2.37.0 + OpenAPI spec version: 2.38.0 """ import importlib diff --git a/xero_python/payrollau/api/payroll_au_api.py b/xero_python/payrollau/api/payroll_au_api.py index 67d5af63..b22114b3 100644 --- a/xero_python/payrollau/api/payroll_au_api.py +++ b/xero_python/payrollau/api/payroll_au_api.py @@ -10,7 +10,7 @@ """ """ - OpenAPI spec version: 2.37.0 + OpenAPI spec version: 2.38.0 """ import importlib @@ -56,6 +56,82 @@ def get_resource_url(self, resource_path): def get_model_finder(self): return ModelFinder(self.models_module) + def approve_leave_application( + self, + xero_tenant_id, + leave_application_id, + _return_http_data_only=True, + _preload_content=True, + _request_timeout=None, + ): + """Approve a requested leave application by a unique leave application id # noqa: E501 + OAuth2 scope: payroll.employees + :param str xero_tenant_id: Xero identifier for Tenant (required) + :param str leave_application_id: Leave Application id for single object (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: LeaveApplications + """ + + # 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 `approve_leave_application`" + ) + # verify the required parameter 'leave_application_id' is set + if leave_application_id is None: + raise ValueError( + "Missing the required parameter `leave_application_id` " + "when calling `approve_leave_application`" + ) + + collection_formats = {} + path_params = { + "LeaveApplicationID": leave_application_id, + } + + query_params = [] + + 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("/LeaveApplications/{LeaveApplicationID}/approve") + + try: + return self.api_client.call_api( + url, + "POST", + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type="LeaveApplications", + 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, "approve_leave_application") + def create_employee( self, xero_tenant_id, @@ -933,6 +1009,92 @@ def get_leave_applications( except exceptions.HTTPStatusException as error: raise translate_status_exception(error, self, "get_leave_applications") + def get_leave_applications_v2( + self, + xero_tenant_id, + if_modified_since=empty, + where=empty, + order=empty, + page=empty, + _return_http_data_only=True, + _preload_content=True, + _request_timeout=None, + ): + """Retrieves leave applications including leave requests # noqa: E501 + OAuth2 scope: payroll.employees, payroll.employees.read + :param str xero_tenant_id: Xero identifier for Tenant (required) + :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 objects will be returned in a single API call + :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: LeaveApplications + """ + + # 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_leave_applications_v2`" + ) + + collection_formats = {} + path_params = {} + + query_params = [] + + if where is not empty: + query_params.append(("where", where)) + + if order is not empty: + query_params.append(("order", order)) + + if page is not empty: + query_params.append(("page", page)) + + header_params = { + "Xero-Tenant-Id": xero_tenant_id, + } + + if if_modified_since is not empty: + header_params["If-Modified-Since"] = if_modified_since + + 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("/LeaveApplications/v2") + + 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="LeaveApplications", + 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_leave_applications_v2") + def get_pay_items( self, xero_tenant_id, @@ -1885,6 +2047,82 @@ def get_timesheets( except exceptions.HTTPStatusException as error: raise translate_status_exception(error, self, "get_timesheets") + def reject_leave_application( + self, + xero_tenant_id, + leave_application_id, + _return_http_data_only=True, + _preload_content=True, + _request_timeout=None, + ): + """Reject a leave application by a unique leave application id # noqa: E501 + OAuth2 scope: payroll.employees + :param str xero_tenant_id: Xero identifier for Tenant (required) + :param str leave_application_id: Leave Application id for single object (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: LeaveApplications + """ + + # 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 `reject_leave_application`" + ) + # verify the required parameter 'leave_application_id' is set + if leave_application_id is None: + raise ValueError( + "Missing the required parameter `leave_application_id` " + "when calling `reject_leave_application`" + ) + + collection_formats = {} + path_params = { + "LeaveApplicationID": leave_application_id, + } + + query_params = [] + + 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("/LeaveApplications/{LeaveApplicationID}/reject") + + try: + return self.api_client.call_api( + url, + "POST", + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type="LeaveApplications", + 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, "reject_leave_application") + def update_employee( self, xero_tenant_id, diff --git a/xero_python/payrollau/docs/PayrollAuApi.md b/xero_python/payrollau/docs/PayrollAuApi.md index d2752ff1..a7443b27 100644 --- a/xero_python/payrollau/docs/PayrollAuApi.md +++ b/xero_python/payrollau/docs/PayrollAuApi.md @@ -4,6 +4,7 @@ All URIs are relative to *https://api.xero.com/payroll.xro/1.0* Method | HTTP request | Description ------------- | ------------- | ------------- +[**approve_leave_application**](PayrollAuApi.md#approve_leave_application) | **POST** /LeaveApplications/{LeaveApplicationID}/approve | Approve a requested leave application by a unique leave application id [**create_employee**](PayrollAuApi.md#create_employee) | **POST** /Employees | Creates a payroll employee [**create_leave_application**](PayrollAuApi.md#create_leave_application) | **POST** /LeaveApplications | Creates a leave application [**create_pay_item**](PayrollAuApi.md#create_pay_item) | **POST** /PayItems | Creates a pay item @@ -15,6 +16,7 @@ Method | HTTP request | Description [**get_employees**](PayrollAuApi.md#get_employees) | **GET** /Employees | Searches payroll employees [**get_leave_application**](PayrollAuApi.md#get_leave_application) | **GET** /LeaveApplications/{LeaveApplicationID} | Retrieves a leave application by a unique leave application id [**get_leave_applications**](PayrollAuApi.md#get_leave_applications) | **GET** /LeaveApplications | Retrieves leave applications +[**get_leave_applications_v2**](PayrollAuApi.md#get_leave_applications_v2) | **GET** /LeaveApplications/v2 | Retrieves leave applications including leave requests [**get_pay_items**](PayrollAuApi.md#get_pay_items) | **GET** /PayItems | Retrieves pay items [**get_pay_run**](PayrollAuApi.md#get_pay_run) | **GET** /PayRuns/{PayRunID} | Retrieves a pay run by using a unique pay run id [**get_pay_runs**](PayrollAuApi.md#get_pay_runs) | **GET** /PayRuns | Retrieves pay runs @@ -27,6 +29,7 @@ Method | HTTP request | Description [**get_superfunds**](PayrollAuApi.md#get_superfunds) | **GET** /Superfunds | Retrieves superfunds [**get_timesheet**](PayrollAuApi.md#get_timesheet) | **GET** /Timesheets/{TimesheetID} | Retrieves a timesheet by using a unique timesheet id [**get_timesheets**](PayrollAuApi.md#get_timesheets) | **GET** /Timesheets | Retrieves timesheets +[**reject_leave_application**](PayrollAuApi.md#reject_leave_application) | **POST** /LeaveApplications/{LeaveApplicationID}/reject | Reject a leave application by a unique leave application id [**update_employee**](PayrollAuApi.md#update_employee) | **POST** /Employees/{EmployeeID} | Updates an employee's detail [**update_leave_application**](PayrollAuApi.md#update_leave_application) | **POST** /LeaveApplications/{LeaveApplicationID} | Updates a specific leave application [**update_pay_run**](PayrollAuApi.md#update_pay_run) | **POST** /PayRuns/{PayRunID} | Updates a pay run @@ -35,6 +38,69 @@ Method | HTTP request | Description [**update_timesheet**](PayrollAuApi.md#update_timesheet) | **POST** /Timesheets/{TimesheetID} | Updates a timesheet +# **approve_leave_application** +> LeaveApplications approve_leave_application(xero_tenant_id, leave_application_id) + +Approve a requested leave application by a unique leave application id + +### 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.payrollau import PayrollAuApi +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 = PayrollAuApi(api_client) + +xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant +leave_application_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # str | Leave Application id for single object +try: + # Approve a requested leave application by a unique leave application id + api_response = api_instance.approve_leave_application(xero_tenant_id, leave_application_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling PayrollAuApi->approve_leave_application: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xero_tenant_id** | **str**| Xero identifier for Tenant | + **leave_application_id** | [**str**](.md)| Leave Application id for single object | + +### Return type + +[**LeaveApplications**](LeaveApplications.md) + +### 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) + # **create_employee** > Employees create_employee(xero_tenant_id, employee) @@ -740,6 +806,75 @@ 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_leave_applications_v2** +> LeaveApplications get_leave_applications_v2(xero_tenant_id, if_modified_since=if_modified_since, where=where, order=order, page=page) + +Retrieves leave applications including leave requests + +### 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.payrollau import PayrollAuApi +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 = PayrollAuApi(api_client) + +xero_tenant_id = 'xero_tenant_id_example' # 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==\"ACTIVE\"' # str | Filter by an any element (optional) +order = 'EmailAddress%20DESC' # str | Order by an any element (optional) +page = 56 # int | e.g. page=1 – Up to 100 objects will be returned in a single API call (optional) +try: + # Retrieves leave applications including leave requests + api_response = api_instance.get_leave_applications_v2(xero_tenant_id, if_modified_since=if_modified_since, where=where, order=order, page=page) + pprint(api_response) +except ApiException as e: + print("Exception when calling PayrollAuApi->get_leave_applications_v2: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xero_tenant_id** | **str**| Xero identifier for Tenant | + **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 objects will be returned in a single API call | [optional] + +### Return type + +[**LeaveApplications**](LeaveApplications.md) + +### 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_pay_items** > PayItems get_pay_items(xero_tenant_id, if_modified_since=if_modified_since, where=where, order=order, page=page) @@ -1526,6 +1661,69 @@ 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) +# **reject_leave_application** +> LeaveApplications reject_leave_application(xero_tenant_id, leave_application_id) + +Reject a leave application by a unique leave application id + +### 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.payrollau import PayrollAuApi +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 = PayrollAuApi(api_client) + +xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant +leave_application_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # str | Leave Application id for single object +try: + # Reject a leave application by a unique leave application id + api_response = api_instance.reject_leave_application(xero_tenant_id, leave_application_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling PayrollAuApi->reject_leave_application: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xero_tenant_id** | **str**| Xero identifier for Tenant | + **leave_application_id** | [**str**](.md)| Leave Application id for single object | + +### Return type + +[**LeaveApplications**](LeaveApplications.md) + +### 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) + # **update_employee** > Employees update_employee(xero_tenant_id, employee_id, employee=employee) @@ -1626,7 +1824,7 @@ api_instance = PayrollAuApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant leave_application_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # str | Leave Application id for single object -leave_application = [ { "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e", "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca", "StartDate": "/Date(1572559200000+0000)/", "EndDate": "/Date(1572645600000+0000)/", "Description": "My updated Description" } ] # list[LeaveApplication] | +leave_application = [ { "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e", "LeaveApplicationID": "1d4cd583-0107-4386-936b-672eb3d1f624", "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca", "LeavePeriods": [ { "PayPeriodStartDate": "/Date(1572566400000+0000)/", "PayPeriodEndDate": "/Date(1573084800000+0000)/", "LeavePeriodStatus": "SCHEDULED", "NumberOfUnits": 7.6 } ], "Title": "vacation", "Description": "My updated Description", "StartDate": "/Date(1572559200000+0000)/", "EndDate": "/Date(1572645600000+0000)/", "PayOutType": "DEFAULT" } ] # list[LeaveApplication] | try: # Updates a specific leave application api_response = api_instance.update_leave_application(xero_tenant_id, leave_application_id, leave_application) diff --git a/xero_python/payrollnz/api/payroll_nz_api.py b/xero_python/payrollnz/api/payroll_nz_api.py index 42abc8e5..5f3e96cb 100644 --- a/xero_python/payrollnz/api/payroll_nz_api.py +++ b/xero_python/payrollnz/api/payroll_nz_api.py @@ -10,7 +10,7 @@ """ """ - OpenAPI spec version: 2.37.0 + OpenAPI spec version: 2.38.0 """ import importlib diff --git a/xero_python/payrolluk/api/payroll_uk_api.py b/xero_python/payrolluk/api/payroll_uk_api.py index 0e55b02b..bf9eb0cd 100644 --- a/xero_python/payrolluk/api/payroll_uk_api.py +++ b/xero_python/payrolluk/api/payroll_uk_api.py @@ -10,7 +10,7 @@ """ """ - OpenAPI spec version: 2.37.0 + OpenAPI spec version: 2.38.0 """ import importlib diff --git a/xero_python/project/api/project_api.py b/xero_python/project/api/project_api.py index b798563d..0dd5ede6 100644 --- a/xero_python/project/api/project_api.py +++ b/xero_python/project/api/project_api.py @@ -10,7 +10,7 @@ """ """ - OpenAPI spec version: 2.37.0 + OpenAPI spec version: 2.38.0 """ import importlib