diff --git a/docs/v1/accounting/index.html b/docs/v1/accounting/index.html index c4b4258a..d7cc2258 100644 --- a/docs/v1/accounting/index.html +++ b/docs/v1/accounting/index.html @@ -6008,7 +6008,7 @@ SDK: - VSN: 1.14.0 + VSN: 1.15.0 Methods createAccount diff --git a/docs/v1/appstore/index.html b/docs/v1/appstore/index.html index cff570d2..14007487 100644 --- a/docs/v1/appstore/index.html +++ b/docs/v1/appstore/index.html @@ -1133,7 +1133,7 @@ SDK: - VSN: 1.14.0 + VSN: 1.15.0 Methods getSubscription diff --git a/docs/v1/assets/index.html b/docs/v1/assets/index.html index 0b103e09..b02b7bd8 100644 --- a/docs/v1/assets/index.html +++ b/docs/v1/assets/index.html @@ -1392,7 +1392,7 @@ SDK: - VSN: 1.14.0 + VSN: 1.15.0 Methods createAsset diff --git a/docs/v1/files/index.html b/docs/v1/files/index.html index 114990aa..e506614c 100644 --- a/docs/v1/files/index.html +++ b/docs/v1/files/index.html @@ -1155,7 +1155,7 @@ SDK: - VSN: 1.14.0 + VSN: 1.15.0 Methods createFileAssociation diff --git a/docs/v1/finance/index.html b/docs/v1/finance/index.html index 60cf46d7..a9f34474 100644 --- a/docs/v1/finance/index.html +++ b/docs/v1/finance/index.html @@ -2706,7 +2706,7 @@ SDK: - VSN: 1.14.0 + VSN: 1.15.0 Methods getAccountingActivityAccountUsage diff --git a/docs/v1/payroll-au/index.html b/docs/v1/payroll-au/index.html index 57153672..2480bdc6 100644 --- a/docs/v1/payroll-au/index.html +++ b/docs/v1/payroll-au/index.html @@ -3254,7 +3254,7 @@ SDK: - VSN: 1.14.0 + VSN: 1.15.0 Methods createEmployee diff --git a/docs/v1/payroll-nz/index.html b/docs/v1/payroll-nz/index.html index b51a12c6..88c42a71 100644 --- a/docs/v1/payroll-nz/index.html +++ b/docs/v1/payroll-nz/index.html @@ -3838,7 +3838,7 @@ SDK: - VSN: 1.14.0 + VSN: 1.15.0 Methods approveTimesheet diff --git a/docs/v1/payroll-uk/index.html b/docs/v1/payroll-uk/index.html index 7c8d9c16..302cb8bf 100644 --- a/docs/v1/payroll-uk/index.html +++ b/docs/v1/payroll-uk/index.html @@ -3510,7 +3510,7 @@ SDK: - VSN: 1.14.0 + VSN: 1.15.0 Methods approveTimesheet diff --git a/docs/v1/projects/index.html b/docs/v1/projects/index.html index 141eef39..92b57cc8 100644 --- a/docs/v1/projects/index.html +++ b/docs/v1/projects/index.html @@ -1468,7 +1468,7 @@ SDK: - VSN: 1.14.0 + VSN: 1.15.0 Methods createProject diff --git a/setup.py b/setup.py index 08c5e385..29cc3d15 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.14.0", + version="1.15.0", ) diff --git a/xero_python/__init__.py b/xero_python/__init__.py index 83464660..961bb771 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.14.0" +__version__ = "1.15.0" diff --git a/xero_python/accounting/api/accounting_api.py b/xero_python/accounting/api/accounting_api.py index 08a85c05..fbdeedbf 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.21.0 + OpenAPI spec version: 2.22.4 """ import importlib @@ -10636,6 +10636,82 @@ def get_journal( except exceptions.HTTPStatusException as error: raise translate_status_exception(error, self, "get_journal") + def get_journal_by_number( + self, + xero_tenant_id, + journal_number, + _return_http_data_only=True, + _preload_content=True, + _request_timeout=None, + ): + """Retrieves a specific journal using a unique journal number. # noqa: E501 + OAuth2 scope: accounting.journals.read + :param str xero_tenant_id: Xero identifier for Tenant (required) + :param int journal_number: Number of a Journal (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: Journals + """ + + # 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_journal_by_number`" + ) + # verify the required parameter 'journal_number' is set + if journal_number is None: + raise ValueError( + "Missing the required parameter `journal_number` " + "when calling `get_journal_by_number`" + ) + + collection_formats = {} + path_params = { + "JournalNumber": journal_number, + } + + 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("/Journals/{JournalNumber}") + + 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="Journals", + 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_journal_by_number") + def get_journals( self, xero_tenant_id, diff --git a/xero_python/accounting/docs/AccountingApi.md b/xero_python/accounting/docs/AccountingApi.md index c41be602..5459a30f 100644 --- a/xero_python/accounting/docs/AccountingApi.md +++ b/xero_python/accounting/docs/AccountingApi.md @@ -127,6 +127,7 @@ Method | HTTP request | Description [**get_item_history**](AccountingApi.md#get_item_history) | **GET** /Items/{ItemID}/History | Retrieves history for a specific item [**get_items**](AccountingApi.md#get_items) | **GET** /Items | Retrieves items [**get_journal**](AccountingApi.md#get_journal) | **GET** /Journals/{JournalID} | Retrieves a specific journal using a unique journal Id. +[**get_journal_by_number**](AccountingApi.md#get_journal_by_number) | **GET** /Journals/{JournalNumber} | Retrieves a specific journal using a unique journal number. [**get_journals**](AccountingApi.md#get_journals) | **GET** /Journals | Retrieves journals [**get_linked_transaction**](AccountingApi.md#get_linked_transaction) | **GET** /LinkedTransactions/{LinkedTransactionID} | Retrieves a specific linked transaction (billable expenses) using a unique linked transaction Id [**get_linked_transactions**](AccountingApi.md#get_linked_transactions) | **GET** /LinkedTransactions | Retrieves linked transactions (billable expenses) @@ -8254,6 +8255,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) +# **get_journal_by_number** +> Journals get_journal_by_number(xero_tenant_id, journal_number) + +Retrieves a specific journal using a unique journal number. + +### 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.accounting import AccountingApi +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 = AccountingApi(api_client) + +xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant +journal_number = 1000 # int | Number of a Journal +try: + # Retrieves a specific journal using a unique journal number. + api_response = api_instance.get_journal_by_number(xero_tenant_id, journal_number) + pprint(api_response) +except ApiException as e: + print("Exception when calling AccountingApi->get_journal_by_number: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xero_tenant_id** | **str**| Xero identifier for Tenant | + **journal_number** | **int**| Number of a Journal | + +### Return type + +[**Journals**](Journals.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_journals** > Journals get_journals(xero_tenant_id, if_modified_since=if_modified_since, offset=offset, payments_only=payments_only) diff --git a/xero_python/accounting/models/organisation.py b/xero_python/accounting/models/organisation.py index d40b2a5b..47a68ae2 100644 --- a/xero_python/accounting/models/organisation.py +++ b/xero_python/accounting/models/organisation.py @@ -979,6 +979,7 @@ def _class(self, _class): "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK", + "ULTIMATE", "None", ] # noqa: E501 diff --git a/xero_python/accounting/models/tax_rate.py b/xero_python/accounting/models/tax_rate.py index e7a1308e..e8b4539b 100644 --- a/xero_python/accounting/models/tax_rate.py +++ b/xero_python/accounting/models/tax_rate.py @@ -317,6 +317,13 @@ def report_tax_type(self, report_tax_type): "ZRINPUT", "BADDEBT", "OTHERINPUT", + "BADDEBTRELIEF", + "IGDSINPUT3", + "SROVR", + "TOURISTREFUND", + "TXRCN33INPUT", + "TXRCREINPUT", + "TXRCESSINPUT", "None", ] # noqa: E501 diff --git a/xero_python/accounting/models/tax_type.py b/xero_python/accounting/models/tax_type.py index 7a35e1db..26bbb492 100644 --- a/xero_python/accounting/models/tax_type.py +++ b/xero_python/accounting/models/tax_type.py @@ -83,3 +83,10 @@ class TaxType(Enum): DRCHARGE20 = "DRCHARGE20" DRCHARGESUPPLY5 = "DRCHARGESUPPLY5" DRCHARGE5 = "DRCHARGE5" + BADDEBTRELIEF = "BADDEBTRELIEF" + IGDSINPUT3 = "IGDSINPUT3" + SROVR = "SROVR" + TOURISTREFUND = "TOURISTREFUND" + TXRCN33INPUT = "TXRCN33INPUT" + TXRCREINPUT = "TXRCREINPUT" + TXRCESSINPUT = "TXRCESSINPUT" diff --git a/xero_python/appstore/api/app_store_api.py b/xero_python/appstore/api/app_store_api.py index 16359247..bb92f458 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.21.0 + OpenAPI spec version: 2.22.4 """ import importlib diff --git a/xero_python/assets/api/asset_api.py b/xero_python/assets/api/asset_api.py index ec54c327..7b02bea3 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.21.0 + OpenAPI spec version: 2.22.4 """ import importlib diff --git a/xero_python/docs/README.md b/xero_python/docs/README.md index 2cd48158..8761f6a1 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.21.0 -- Package version: 1.14.0 +- API version: 2.22.4 +- Package version: 1.15.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 07492e2b..4489d58f 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.21.0 + OpenAPI spec version: 2.22.4 """ import importlib diff --git a/xero_python/finance/api/finance_api.py b/xero_python/finance/api/finance_api.py index 8ec1d4e4..19b275fe 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.21.0 + OpenAPI spec version: 2.22.4 """ import importlib diff --git a/xero_python/finance/docs/StatementResponse.md b/xero_python/finance/docs/StatementResponse.md index b6a0cf61..087c6798 100644 --- a/xero_python/finance/docs/StatementResponse.md +++ b/xero_python/finance/docs/StatementResponse.md @@ -7,7 +7,9 @@ Name | Type | Description | Notes **start_date** | **date** | Start date of statement | [optional] **end_date** | **date** | End date of statement | [optional] **imported_date_time_utc** | **datetime** | Utc date time of when the statement was imported in Xero | [optional] -**import_source** | **str** | Import source of statement (STMTIMPORTSRC/MANUAL, STMTIMPORTSRC/CSV, STMTIMPORTSRC/QIF, STMTIMPORTSRC/OFX, XeroApi) | [optional] +**import_source** | **str** | Indicates the source of the statement data. Either imported from 1) direct bank feed OR 2) manual customer entry or upload. Manual import sources are STMTIMPORTSRC/MANUAL, STMTIMPORTSRC/CSV, STMTIMPORTSRC/OFX, Ofx or STMTIMPORTSRC/QIF. All other import sources are direct and, depending on the direct solution, may contain the name of the financial institution. | [optional] +**start_balance** | **float** | Opening balance sourced from imported bank statements (if supplied). Note, for manually uploaded statements, this balance is also manual and usually not supplied. | [optional] +**end_balance** | **float** | Closing balance sourced from imported bank statements (if supplied). Note, for manually uploaded statements, this balance is also manual and usually not supplied. | [optional] **statement_lines** | [**list[StatementLineResponse]**](StatementLineResponse.md) | List of statement lines | [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) diff --git a/xero_python/finance/models/statement_response.py b/xero_python/finance/models/statement_response.py index d521898a..f7a77835 100644 --- a/xero_python/finance/models/statement_response.py +++ b/xero_python/finance/models/statement_response.py @@ -35,6 +35,8 @@ class StatementResponse(BaseModel): "end_date": "date", "imported_date_time_utc": "datetime", "import_source": "str", + "start_balance": "float", + "end_balance": "float", "statement_lines": "list[StatementLineResponse]", } @@ -44,6 +46,8 @@ class StatementResponse(BaseModel): "end_date": "endDate", "imported_date_time_utc": "importedDateTimeUtc", "import_source": "importSource", + "start_balance": "startBalance", + "end_balance": "endBalance", "statement_lines": "statementLines", } @@ -54,6 +58,8 @@ def __init__( end_date=None, imported_date_time_utc=None, import_source=None, + start_balance=None, + end_balance=None, statement_lines=None, ): # noqa: E501 """StatementResponse - a model defined in OpenAPI""" # noqa: E501 @@ -63,6 +69,8 @@ def __init__( self._end_date = None self._imported_date_time_utc = None self._import_source = None + self._start_balance = None + self._end_balance = None self._statement_lines = None self.discriminator = None @@ -76,6 +84,10 @@ def __init__( self.imported_date_time_utc = imported_date_time_utc if import_source is not None: self.import_source = import_source + if start_balance is not None: + self.start_balance = start_balance + if end_balance is not None: + self.end_balance = end_balance if statement_lines is not None: self.statement_lines = statement_lines @@ -175,7 +187,7 @@ def imported_date_time_utc(self, imported_date_time_utc): def import_source(self): """Gets the import_source of this StatementResponse. # noqa: E501 - Import source of statement (STMTIMPORTSRC/MANUAL, STMTIMPORTSRC/CSV, STMTIMPORTSRC/QIF, STMTIMPORTSRC/OFX, XeroApi) # noqa: E501 + Indicates the source of the statement data. Either imported from 1) direct bank feed OR 2) manual customer entry or upload. Manual import sources are STMTIMPORTSRC/MANUAL, STMTIMPORTSRC/CSV, STMTIMPORTSRC/OFX, Ofx or STMTIMPORTSRC/QIF. All other import sources are direct and, depending on the direct solution, may contain the name of the financial institution. # noqa: E501 :return: The import_source of this StatementResponse. # noqa: E501 :rtype: str @@ -186,7 +198,7 @@ def import_source(self): def import_source(self, import_source): """Sets the import_source of this StatementResponse. - Import source of statement (STMTIMPORTSRC/MANUAL, STMTIMPORTSRC/CSV, STMTIMPORTSRC/QIF, STMTIMPORTSRC/OFX, XeroApi) # noqa: E501 + Indicates the source of the statement data. Either imported from 1) direct bank feed OR 2) manual customer entry or upload. Manual import sources are STMTIMPORTSRC/MANUAL, STMTIMPORTSRC/CSV, STMTIMPORTSRC/OFX, Ofx or STMTIMPORTSRC/QIF. All other import sources are direct and, depending on the direct solution, may contain the name of the financial institution. # noqa: E501 :param import_source: The import_source of this StatementResponse. # noqa: E501 :type: str @@ -194,6 +206,52 @@ def import_source(self, import_source): self._import_source = import_source + @property + def start_balance(self): + """Gets the start_balance of this StatementResponse. # noqa: E501 + + Opening balance sourced from imported bank statements (if supplied). Note, for manually uploaded statements, this balance is also manual and usually not supplied. # noqa: E501 + + :return: The start_balance of this StatementResponse. # noqa: E501 + :rtype: float + """ + return self._start_balance + + @start_balance.setter + def start_balance(self, start_balance): + """Sets the start_balance of this StatementResponse. + + Opening balance sourced from imported bank statements (if supplied). Note, for manually uploaded statements, this balance is also manual and usually not supplied. # noqa: E501 + + :param start_balance: The start_balance of this StatementResponse. # noqa: E501 + :type: float + """ + + self._start_balance = start_balance + + @property + def end_balance(self): + """Gets the end_balance of this StatementResponse. # noqa: E501 + + Closing balance sourced from imported bank statements (if supplied). Note, for manually uploaded statements, this balance is also manual and usually not supplied. # noqa: E501 + + :return: The end_balance of this StatementResponse. # noqa: E501 + :rtype: float + """ + return self._end_balance + + @end_balance.setter + def end_balance(self, end_balance): + """Sets the end_balance of this StatementResponse. + + Closing balance sourced from imported bank statements (if supplied). Note, for manually uploaded statements, this balance is also manual and usually not supplied. # noqa: E501 + + :param end_balance: The end_balance of this StatementResponse. # noqa: E501 + :type: float + """ + + self._end_balance = end_balance + @property def statement_lines(self): """Gets the statement_lines of this StatementResponse. # noqa: E501 diff --git a/xero_python/identity/api/identity_api.py b/xero_python/identity/api/identity_api.py index fd95ba27..2d5f758b 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.21.0 + OpenAPI spec version: 2.22.4 """ import importlib diff --git a/xero_python/payrollau/api/payroll_au_api.py b/xero_python/payrollau/api/payroll_au_api.py index bf030950..74a529c3 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.21.0 + OpenAPI spec version: 2.22.4 """ import importlib diff --git a/xero_python/payrollnz/api/payroll_nz_api.py b/xero_python/payrollnz/api/payroll_nz_api.py index 47a83317..7327c373 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.21.0 + OpenAPI spec version: 2.22.4 """ import importlib diff --git a/xero_python/payrolluk/api/payroll_uk_api.py b/xero_python/payrolluk/api/payroll_uk_api.py index e2477cd5..e8fd025f 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.21.0 + OpenAPI spec version: 2.22.4 """ import importlib diff --git a/xero_python/project/api/project_api.py b/xero_python/project/api/project_api.py index bf317346..3036b1ff 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.21.0 + OpenAPI spec version: 2.22.4 """ import importlib