diff --git a/docs/v1/accounting/index.html b/docs/v1/accounting/index.html index a24179de..b51a69d4 100644 --- a/docs/v1/accounting/index.html +++ b/docs/v1/accounting/index.html @@ -6008,7 +6008,7 @@ SDK: - VSN: 1.16.0 + VSN: 1.17.0 Methods createAccount diff --git a/docs/v1/appstore/index.html b/docs/v1/appstore/index.html index 15d3e23a..d94ee2e9 100644 --- a/docs/v1/appstore/index.html +++ b/docs/v1/appstore/index.html @@ -1133,7 +1133,7 @@ SDK: - VSN: 1.16.0 + VSN: 1.17.0 Methods getSubscription diff --git a/docs/v1/assets/index.html b/docs/v1/assets/index.html index 2c775874..5e8b6440 100644 --- a/docs/v1/assets/index.html +++ b/docs/v1/assets/index.html @@ -1392,7 +1392,7 @@ SDK: - VSN: 1.16.0 + VSN: 1.17.0 Methods createAsset diff --git a/docs/v1/files/index.html b/docs/v1/files/index.html index 3e40de64..07d90377 100644 --- a/docs/v1/files/index.html +++ b/docs/v1/files/index.html @@ -1155,7 +1155,7 @@ SDK: - VSN: 1.16.0 + VSN: 1.17.0 Methods createFileAssociation diff --git a/docs/v1/finance/index.html b/docs/v1/finance/index.html index 4016c1dd..8f218463 100644 --- a/docs/v1/finance/index.html +++ b/docs/v1/finance/index.html @@ -2706,7 +2706,7 @@ SDK: - VSN: 1.16.0 + VSN: 1.17.0 Methods getAccountingActivityAccountUsage diff --git a/docs/v1/payroll-au/index.html b/docs/v1/payroll-au/index.html index a41dbc4c..da08c385 100644 --- a/docs/v1/payroll-au/index.html +++ b/docs/v1/payroll-au/index.html @@ -3254,7 +3254,7 @@ SDK: - VSN: 1.16.0 + VSN: 1.17.0 Methods createEmployee diff --git a/docs/v1/payroll-nz/index.html b/docs/v1/payroll-nz/index.html index 784bf299..2b7ed50c 100644 --- a/docs/v1/payroll-nz/index.html +++ b/docs/v1/payroll-nz/index.html @@ -3838,7 +3838,7 @@ SDK: - VSN: 1.16.0 + VSN: 1.17.0 Methods approveTimesheet diff --git a/docs/v1/payroll-uk/index.html b/docs/v1/payroll-uk/index.html index 54cdb923..c48ab96e 100644 --- a/docs/v1/payroll-uk/index.html +++ b/docs/v1/payroll-uk/index.html @@ -3510,7 +3510,7 @@ SDK: - VSN: 1.16.0 + VSN: 1.17.0 Methods approveTimesheet diff --git a/docs/v1/projects/index.html b/docs/v1/projects/index.html index 825ea530..fec049f6 100644 --- a/docs/v1/projects/index.html +++ b/docs/v1/projects/index.html @@ -1468,7 +1468,7 @@ SDK: - VSN: 1.16.0 + VSN: 1.17.0 Methods createProject diff --git a/setup.py b/setup.py index 46b7a2cb..daa68ede 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.16.0", + version="1.17.0", ) diff --git a/xero_python/__init__.py b/xero_python/__init__.py index efacb5cc..e587afa5 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.16.0" +__version__ = "1.17.0" diff --git a/xero_python/accounting/__init__.py b/xero_python/accounting/__init__.py index 44640aee..c5f7c873 100644 --- a/xero_python/accounting/__init__.py +++ b/xero_python/accounting/__init__.py @@ -39,6 +39,10 @@ from xero_python.accounting.models.bank_transfer import BankTransfer from xero_python.accounting.models.bank_transfers import BankTransfers from xero_python.accounting.models.batch_payment import BatchPayment +from xero_python.accounting.models.batch_payment_delete import BatchPaymentDelete +from xero_python.accounting.models.batch_payment_delete_by_url_param import ( + BatchPaymentDeleteByUrlParam, +) from xero_python.accounting.models.batch_payment_details import BatchPaymentDetails from xero_python.accounting.models.batch_payments import BatchPayments from xero_python.accounting.models.bill import Bill diff --git a/xero_python/accounting/api/accounting_api.py b/xero_python/accounting/api/accounting_api.py index 3d206b89..5b00a107 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.23.0 + OpenAPI spec version: 2.25.0 """ import importlib @@ -4745,6 +4745,90 @@ def create_repeating_invoice_history( error, self, "create_repeating_invoice_history" ) + def create_repeating_invoices( + self, + xero_tenant_id, + repeating_invoices, + summarize_errors=empty, + _return_http_data_only=True, + _preload_content=True, + _request_timeout=None, + ): + """Creates one or more repeating invoice templates # noqa: E501 + OAuth2 scope: accounting.transactions + :param str xero_tenant_id: Xero identifier for Tenant (required) + :param RepeatingInvoices repeating_invoices: RepeatingInvoices with an array of repeating invoice objects in body of request (required) + :param bool summarize_errors: If false return 200 OK and mix of successfully created objects and any with validation errors + :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: RepeatingInvoices + """ + + # 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 `create_repeating_invoices`" + ) + # verify the required parameter 'repeating_invoices' is set + if repeating_invoices is None: + raise ValueError( + "Missing the required parameter `repeating_invoices` " + "when calling `create_repeating_invoices`" + ) + + collection_formats = {} + path_params = {} + + query_params = [] + + if summarize_errors is not empty: + query_params.append(("summarizeErrors", summarize_errors)) + + header_params = { + "xero-tenant-id": xero_tenant_id, + } + + local_var_files = {} + form_params = [] + + body_params = repeating_invoices + # HTTP header `Accept` + header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # HTTP header `Content-Type` + header_params["Content-Type"] = self.api_client.select_header_content_type( + ["application/json"] + ) + + # Authentication setting + auth_settings = ["OAuth2"] + url = self.get_resource_url("/RepeatingInvoices") + + try: + return self.api_client.call_api( + url, + "PUT", + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type="RepeatingInvoices", + 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, "create_repeating_invoices") + def create_tax_rates( self, xero_tenant_id, @@ -5068,6 +5152,176 @@ def delete_account( except exceptions.HTTPStatusException as error: raise translate_status_exception(error, self, "delete_account") + def delete_batch_payment( + self, + xero_tenant_id, + batch_payment_delete, + _return_http_data_only=True, + _preload_content=True, + _request_timeout=None, + ): + """Updates a specific batch payment for invoices and credit notes # noqa: E501 + OAuth2 scope: accounting.transactions + :param str xero_tenant_id: Xero identifier for Tenant (required) + :param BatchPaymentDelete batch_payment_delete: (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: BatchPayments + """ + + # 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 `delete_batch_payment`" + ) + # verify the required parameter 'batch_payment_delete' is set + if batch_payment_delete is None: + raise ValueError( + "Missing the required parameter `batch_payment_delete` " + "when calling `delete_batch_payment`" + ) + + collection_formats = {} + path_params = {} + + query_params = [] + + header_params = { + "xero-tenant-id": xero_tenant_id, + } + + local_var_files = {} + form_params = [] + + body_params = batch_payment_delete + # HTTP header `Accept` + header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # HTTP header `Content-Type` + header_params["Content-Type"] = self.api_client.select_header_content_type( + ["application/json"] + ) + + # Authentication setting + auth_settings = ["OAuth2"] + url = self.get_resource_url("/BatchPayments") + + 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="BatchPayments", + 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, "delete_batch_payment") + + def delete_batch_payment_by_url_param( + self, + xero_tenant_id, + batch_payment_id, + batch_payment_delete_by_url_param, + _return_http_data_only=True, + _preload_content=True, + _request_timeout=None, + ): + """Updates a specific batch payment for invoices and credit notes # noqa: E501 + OAuth2 scope: accounting.transactions + :param str xero_tenant_id: Xero identifier for Tenant (required) + :param str batch_payment_id: Unique identifier for BatchPayment (required) + :param BatchPaymentDeleteByUrlParam batch_payment_delete_by_url_param: (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: BatchPayments + """ + + # 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 `delete_batch_payment_by_url_param`" + ) + # verify the required parameter 'batch_payment_id' is set + if batch_payment_id is None: + raise ValueError( + "Missing the required parameter `batch_payment_id` " + "when calling `delete_batch_payment_by_url_param`" + ) + # verify the required parameter 'batch_payment_delete_by_url_param' is set + if batch_payment_delete_by_url_param is None: + raise ValueError( + "Missing the required parameter `batch_payment_delete_by_url_param` " + "when calling `delete_batch_payment_by_url_param`" + ) + + collection_formats = {} + path_params = { + "BatchPaymentID": batch_payment_id, + } + + query_params = [] + + header_params = { + "xero-tenant-id": xero_tenant_id, + } + + local_var_files = {} + form_params = [] + + body_params = batch_payment_delete_by_url_param + # HTTP header `Accept` + header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # HTTP header `Content-Type` + header_params["Content-Type"] = self.api_client.select_header_content_type( + ["application/json"] + ) + + # Authentication setting + auth_settings = ["OAuth2"] + url = self.get_resource_url("/BatchPayments/{BatchPaymentID}") + + 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="BatchPayments", + 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, "delete_batch_payment_by_url_param" + ) + def delete_contact_group_contact( self, xero_tenant_id, @@ -18649,6 +18903,92 @@ def update_or_create_quotes( except exceptions.HTTPStatusException as error: raise translate_status_exception(error, self, "update_or_create_quotes") + def update_or_create_repeating_invoices( + self, + xero_tenant_id, + repeating_invoices, + summarize_errors=empty, + _return_http_data_only=True, + _preload_content=True, + _request_timeout=None, + ): + """Creates or deletes one or more repeating invoice templates # noqa: E501 + OAuth2 scope: accounting.transactions + :param str xero_tenant_id: Xero identifier for Tenant (required) + :param RepeatingInvoices repeating_invoices: RepeatingInvoices with an array of repeating invoice objects in body of request (required) + :param bool summarize_errors: If false return 200 OK and mix of successfully created objects and any with validation errors + :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: RepeatingInvoices + """ + + # 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 `update_or_create_repeating_invoices`" + ) + # verify the required parameter 'repeating_invoices' is set + if repeating_invoices is None: + raise ValueError( + "Missing the required parameter `repeating_invoices` " + "when calling `update_or_create_repeating_invoices`" + ) + + collection_formats = {} + path_params = {} + + query_params = [] + + if summarize_errors is not empty: + query_params.append(("summarizeErrors", summarize_errors)) + + header_params = { + "xero-tenant-id": xero_tenant_id, + } + + local_var_files = {} + form_params = [] + + body_params = repeating_invoices + # HTTP header `Accept` + header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # HTTP header `Content-Type` + header_params["Content-Type"] = self.api_client.select_header_content_type( + ["application/json"] + ) + + # Authentication setting + auth_settings = ["OAuth2"] + url = self.get_resource_url("/RepeatingInvoices") + + 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="RepeatingInvoices", + 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, "update_or_create_repeating_invoices" + ) + def update_purchase_order( self, xero_tenant_id, @@ -19222,6 +19562,95 @@ def update_receipt_attachment_by_file_name( error, self, "update_receipt_attachment_by_file_name" ) + def update_repeating_invoice( + self, + xero_tenant_id, + repeating_invoice_id, + repeating_invoices, + _return_http_data_only=True, + _preload_content=True, + _request_timeout=None, + ): + """Deletes a specific repeating invoice template # noqa: E501 + OAuth2 scope: accounting.transactions + :param str xero_tenant_id: Xero identifier for Tenant (required) + :param str repeating_invoice_id: Unique identifier for a Repeating Invoice (required) + :param RepeatingInvoices repeating_invoices: (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: RepeatingInvoices + """ + + # 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 `update_repeating_invoice`" + ) + # verify the required parameter 'repeating_invoice_id' is set + if repeating_invoice_id is None: + raise ValueError( + "Missing the required parameter `repeating_invoice_id` " + "when calling `update_repeating_invoice`" + ) + # verify the required parameter 'repeating_invoices' is set + if repeating_invoices is None: + raise ValueError( + "Missing the required parameter `repeating_invoices` " + "when calling `update_repeating_invoice`" + ) + + collection_formats = {} + path_params = { + "RepeatingInvoiceID": repeating_invoice_id, + } + + query_params = [] + + header_params = { + "xero-tenant-id": xero_tenant_id, + } + + local_var_files = {} + form_params = [] + + body_params = repeating_invoices + # HTTP header `Accept` + header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # HTTP header `Content-Type` + header_params["Content-Type"] = self.api_client.select_header_content_type( + ["application/json"] + ) + + # Authentication setting + auth_settings = ["OAuth2"] + url = self.get_resource_url("/RepeatingInvoices/{RepeatingInvoiceID}") + + 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="RepeatingInvoices", + 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, "update_repeating_invoice") + def update_repeating_invoice_attachment_by_file_name( self, xero_tenant_id, diff --git a/xero_python/accounting/docs/AccountingApi.md b/xero_python/accounting/docs/AccountingApi.md index 5459a30f..a7feb7e2 100644 --- a/xero_python/accounting/docs/AccountingApi.md +++ b/xero_python/accounting/docs/AccountingApi.md @@ -56,10 +56,13 @@ Method | HTTP request | Description [**create_receipt_history**](AccountingApi.md#create_receipt_history) | **PUT** /Receipts/{ReceiptID}/History | Creates a history record for a specific receipt [**create_repeating_invoice_attachment_by_file_name**](AccountingApi.md#create_repeating_invoice_attachment_by_file_name) | **PUT** /RepeatingInvoices/{RepeatingInvoiceID}/Attachments/{FileName} | Creates an attachment from a specific repeating invoices by file name [**create_repeating_invoice_history**](AccountingApi.md#create_repeating_invoice_history) | **PUT** /RepeatingInvoices/{RepeatingInvoiceID}/History | Creates a history record for a specific repeating invoice +[**create_repeating_invoices**](AccountingApi.md#create_repeating_invoices) | **PUT** /RepeatingInvoices | Creates one or more repeating invoice templates [**create_tax_rates**](AccountingApi.md#create_tax_rates) | **PUT** /TaxRates | Creates one or more tax rates [**create_tracking_category**](AccountingApi.md#create_tracking_category) | **PUT** /TrackingCategories | Create tracking categories [**create_tracking_options**](AccountingApi.md#create_tracking_options) | **PUT** /TrackingCategories/{TrackingCategoryID}/Options | Creates options for a specific tracking category [**delete_account**](AccountingApi.md#delete_account) | **DELETE** /Accounts/{AccountID} | Deletes a chart of accounts +[**delete_batch_payment**](AccountingApi.md#delete_batch_payment) | **POST** /BatchPayments | Updates a specific batch payment for invoices and credit notes +[**delete_batch_payment_by_url_param**](AccountingApi.md#delete_batch_payment_by_url_param) | **POST** /BatchPayments/{BatchPaymentID} | Updates a specific batch payment for invoices and credit notes [**delete_contact_group_contact**](AccountingApi.md#delete_contact_group_contact) | **DELETE** /ContactGroups/{ContactGroupID}/Contacts/{ContactID} | Deletes a specific contact from a contact group using a unique contact Id [**delete_contact_group_contacts**](AccountingApi.md#delete_contact_group_contacts) | **DELETE** /ContactGroups/{ContactGroupID}/Contacts | Deletes all contacts from a specific contact group [**delete_item**](AccountingApi.md#delete_item) | **DELETE** /Items/{ItemID} | Deletes a specific item @@ -221,12 +224,14 @@ Method | HTTP request | Description [**update_or_create_manual_journals**](AccountingApi.md#update_or_create_manual_journals) | **POST** /ManualJournals | Updates or creates a single manual journal [**update_or_create_purchase_orders**](AccountingApi.md#update_or_create_purchase_orders) | **POST** /PurchaseOrders | Updates or creates one or more purchase orders [**update_or_create_quotes**](AccountingApi.md#update_or_create_quotes) | **POST** /Quotes | Updates or creates one or more quotes +[**update_or_create_repeating_invoices**](AccountingApi.md#update_or_create_repeating_invoices) | **POST** /RepeatingInvoices | Creates or deletes one or more repeating invoice templates [**update_purchase_order**](AccountingApi.md#update_purchase_order) | **POST** /PurchaseOrders/{PurchaseOrderID} | Updates a specific purchase order [**update_purchase_order_attachment_by_file_name**](AccountingApi.md#update_purchase_order_attachment_by_file_name) | **POST** /PurchaseOrders/{PurchaseOrderID}/Attachments/{FileName} | Updates a specific attachment for a specific purchase order by filename [**update_quote**](AccountingApi.md#update_quote) | **POST** /Quotes/{QuoteID} | Updates a specific quote [**update_quote_attachment_by_file_name**](AccountingApi.md#update_quote_attachment_by_file_name) | **POST** /Quotes/{QuoteID}/Attachments/{FileName} | Updates a specific attachment from a specific quote by filename [**update_receipt**](AccountingApi.md#update_receipt) | **POST** /Receipts/{ReceiptID} | Updates a specific draft expense claim receipts [**update_receipt_attachment_by_file_name**](AccountingApi.md#update_receipt_attachment_by_file_name) | **POST** /Receipts/{ReceiptID}/Attachments/{FileName} | Updates a specific attachment on a specific expense claim receipts by file name +[**update_repeating_invoice**](AccountingApi.md#update_repeating_invoice) | **POST** /RepeatingInvoices/{RepeatingInvoiceID} | Deletes a specific repeating invoice template [**update_repeating_invoice_attachment_by_file_name**](AccountingApi.md#update_repeating_invoice_attachment_by_file_name) | **POST** /RepeatingInvoices/{RepeatingInvoiceID}/Attachments/{FileName} | Updates a specific attachment from a specific repeating invoices by file name [**update_tax_rate**](AccountingApi.md#update_tax_rate) | **POST** /TaxRates | Updates tax rates [**update_tracking_category**](AccountingApi.md#update_tracking_category) | **POST** /TrackingCategories/{TrackingCategoryID} | Updates a specific tracking category @@ -3635,6 +3640,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) +# **create_repeating_invoices** +> RepeatingInvoices create_repeating_invoices(xero_tenant_id, repeating_invoices, summarize_errors=summarize_errors) + +Creates one or more repeating invoice templates + +### 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 +repeating_invoices = { "RepeatingInvoices": [ { "Schedule": { "Period": 1, "Unit": "MONTHLY", "DueDate": 10, "DueDateType": "OFFOLLOWINGMONTH", "StartDate": "\/Date(1555286400000+0000)\/" }, "Type": "ACCREC", "Reference": "[Week]", "ApprovedForSending": false, "SendCopy": false, "MarkAsSent": false, "IncludePDF": false, "Contact": { "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", "Name": "Liam Gallagher" }, "Status": "AUTHORISED", "LineAmountTypes": "Exclusive", "LineItems": [ { "Description": "Guitars Fender Strat", "UnitAmount": 5000.00, "TaxType": "OUTPUT2", "TaxAmount": 750.00, "LineAmount": 5000.00, "AccountCode": "200", "Tracking": [], "Quantity": 1.0000, "LineItemID": "13a8353c-d2af-4d5b-920c-438449f08900", "DiscountEnteredAsPercent": true } ], "CurrencyCode": "NZD" } ] } # RepeatingInvoices | RepeatingInvoices with an array of repeating invoice objects in body of request +summarize_errors = False # bool | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to False) +try: + # Creates one or more repeating invoice templates + api_response = api_instance.create_repeating_invoices(xero_tenant_id, repeating_invoices, summarize_errors=summarize_errors) + pprint(api_response) +except ApiException as e: + print("Exception when calling AccountingApi->create_repeating_invoices: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xero_tenant_id** | **str**| Xero identifier for Tenant | + **repeating_invoices** | [**RepeatingInvoices**](RepeatingInvoices.md)| RepeatingInvoices with an array of repeating invoice objects in body of request | + **summarize_errors** | **bool**| If false return 200 OK and mix of successfully created objects and any with validation errors | [optional] [default to False] + +### Return type + +[**RepeatingInvoices**](RepeatingInvoices.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **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_tax_rates** > TaxRates create_tax_rates(xero_tenant_id, tax_rates) @@ -3889,6 +3959,134 @@ 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) +# **delete_batch_payment** +> BatchPayments delete_batch_payment(xero_tenant_id, batch_payment_delete) + +Updates a specific batch payment for invoices and credit notes + +### 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 +batch_payment_delete = { "BatchPaymentID": "9bf296e9-0748-4d29-a3dc-24dde1098030", "Status":"DELETED" } # BatchPaymentDelete | +try: + # Updates a specific batch payment for invoices and credit notes + api_response = api_instance.delete_batch_payment(xero_tenant_id, batch_payment_delete) + pprint(api_response) +except ApiException as e: + print("Exception when calling AccountingApi->delete_batch_payment: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xero_tenant_id** | **str**| Xero identifier for Tenant | + **batch_payment_delete** | [**BatchPaymentDelete**](BatchPaymentDelete.md)| | + +### Return type + +[**BatchPayments**](BatchPayments.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **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) + +# **delete_batch_payment_by_url_param** +> BatchPayments delete_batch_payment_by_url_param(xero_tenant_id, batch_payment_id, batch_payment_delete_by_url_param) + +Updates a specific batch payment for invoices and credit notes + +### 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 +batch_payment_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for BatchPayment +batch_payment_delete_by_url_param = { "Status":"DELETED" } # BatchPaymentDeleteByUrlParam | +try: + # Updates a specific batch payment for invoices and credit notes + api_response = api_instance.delete_batch_payment_by_url_param(xero_tenant_id, batch_payment_id, batch_payment_delete_by_url_param) + pprint(api_response) +except ApiException as e: + print("Exception when calling AccountingApi->delete_batch_payment_by_url_param: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xero_tenant_id** | **str**| Xero identifier for Tenant | + **batch_payment_id** | [**str**](.md)| Unique identifier for BatchPayment | + **batch_payment_delete_by_url_param** | [**BatchPaymentDeleteByUrlParam**](BatchPaymentDeleteByUrlParam.md)| | + +### Return type + +[**BatchPayments**](BatchPayments.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **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) + # **delete_contact_group_contact** > delete_contact_group_contact(xero_tenant_id, contact_group_id, contact_id) @@ -14431,6 +14629,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) +# **update_or_create_repeating_invoices** +> RepeatingInvoices update_or_create_repeating_invoices(xero_tenant_id, repeating_invoices, summarize_errors=summarize_errors) + +Creates or deletes one or more repeating invoice templates + +### 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 +repeating_invoices = { "RepeatingInvoices": [ { "Schedule": { "Period": 1, "Unit": "MONTHLY", "DueDate": 10, "DueDateType": "OFFOLLOWINGMONTH", "StartDate": "\/Date(1555286400000+0000)\/" }, "Type": "ACCREC", "Reference": "[Week]", "ApprovedForSending": false, "SendCopy": false, "MarkAsSent": false, "IncludePDF": false, "Contact": { "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", "Name": "Liam Gallagher" }, "Status": "AUTHORISED", "LineAmountTypes": "Exclusive", "LineItems": [ { "Description": "Guitars Fender Strat", "UnitAmount": 5000.00, "TaxType": "OUTPUT2", "TaxAmount": 750.00, "LineAmount": 5000.00, "AccountCode": "200", "Tracking": [], "Quantity": 1.0000, "LineItemID": "13a8353c-d2af-4d5b-920c-438449f08900", "DiscountEnteredAsPercent": true } ], "CurrencyCode": "NZD" } ] } # RepeatingInvoices | RepeatingInvoices with an array of repeating invoice objects in body of request +summarize_errors = False # bool | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to False) +try: + # Creates or deletes one or more repeating invoice templates + api_response = api_instance.update_or_create_repeating_invoices(xero_tenant_id, repeating_invoices, summarize_errors=summarize_errors) + pprint(api_response) +except ApiException as e: + print("Exception when calling AccountingApi->update_or_create_repeating_invoices: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xero_tenant_id** | **str**| Xero identifier for Tenant | + **repeating_invoices** | [**RepeatingInvoices**](RepeatingInvoices.md)| RepeatingInvoices with an array of repeating invoice objects in body of request | + **summarize_errors** | **bool**| If false return 200 OK and mix of successfully created objects and any with validation errors | [optional] [default to False] + +### Return type + +[**RepeatingInvoices**](RepeatingInvoices.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **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_purchase_order** > PurchaseOrders update_purchase_order(xero_tenant_id, purchase_order_id, purchase_orders) @@ -14829,6 +15092,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) +# **update_repeating_invoice** +> RepeatingInvoices update_repeating_invoice(xero_tenant_id, repeating_invoice_id, repeating_invoices) + +Deletes a specific repeating invoice template + +### 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 +repeating_invoice_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for a Repeating Invoice +repeating_invoices = { "Schedule": { "Period": 1, "Unit": "MONTHLY", "DueDate": 10, "DueDateType": "OFFOLLOWINGMONTH", "StartDate": "\/Date(1555286400000+0000)\/", "EndDate": "\/Date(1569801600000+0000)\/", "NextScheduledDate": "\/Date(1555286400000+0000)\/" }, "RepeatingInvoiceID": "428c0d75-909f-4b04-8403-a48dc27283b0", "Type": "ACCREC", "Reference": "[Week]", "HasAttachments": true, "ApprovedForSending": false, "SendCopy": false, "MarkAsSent": false, "IncludePDF": false, "ID": "428c0d75-909f-4b04-8403-a48dc27283b0", "Contact": { "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", "Name": "Liam Gallagher", "Addresses": [], "Phones": [], "ContactGroups": [], "ContactPersons": [], "HasValidationErrors": false }, "Status": "DELETED", "LineAmountTypes": "Exclusive", "LineItems": [ { "Description": "Guitars Fender Strat", "UnitAmount": 5000.00, "TaxType": "OUTPUT2", "TaxAmount": 750.00, "LineAmount": 5000.00, "AccountCode": "200", "Tracking": [], "Quantity": 1.0000, "LineItemID": "13a8353c-d2af-4d5b-920c-438449f08900", "DiscountEnteredAsPercent": true } ], "SubTotal": 5000.00, "TotalTax": 750.00, "Total": 5750.00, "CurrencyCode": "NZD" } # RepeatingInvoices | +try: + # Deletes a specific repeating invoice template + api_response = api_instance.update_repeating_invoice(xero_tenant_id, repeating_invoice_id, repeating_invoices) + pprint(api_response) +except ApiException as e: + print("Exception when calling AccountingApi->update_repeating_invoice: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xero_tenant_id** | **str**| Xero identifier for Tenant | + **repeating_invoice_id** | [**str**](.md)| Unique identifier for a Repeating Invoice | + **repeating_invoices** | [**RepeatingInvoices**](RepeatingInvoices.md)| | + +### Return type + +[**RepeatingInvoices**](RepeatingInvoices.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **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_repeating_invoice_attachment_by_file_name** > Attachments update_repeating_invoice_attachment_by_file_name(xero_tenant_id, repeating_invoice_id, file_name, body) diff --git a/xero_python/accounting/docs/BatchPaymentDelete.md b/xero_python/accounting/docs/BatchPaymentDelete.md new file mode 100644 index 00000000..9d04c92e --- /dev/null +++ b/xero_python/accounting/docs/BatchPaymentDelete.md @@ -0,0 +1,11 @@ +# BatchPaymentDelete + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**batch_payment_id** | **str** | The Xero generated unique identifier for the bank transaction (read-only) | +**status** | **str** | The status of the batch payment. | [default to 'DELETED'] + +[[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/accounting/docs/BatchPaymentDeleteByUrlParam.md b/xero_python/accounting/docs/BatchPaymentDeleteByUrlParam.md new file mode 100644 index 00000000..4d9daee5 --- /dev/null +++ b/xero_python/accounting/docs/BatchPaymentDeleteByUrlParam.md @@ -0,0 +1,10 @@ +# BatchPaymentDeleteByUrlParam + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **str** | The status of the batch payment. | [default to 'DELETED'] + +[[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/accounting/docs/RepeatingInvoice.md b/xero_python/accounting/docs/RepeatingInvoice.md index 172a5e54..1d9eb724 100644 --- a/xero_python/accounting/docs/RepeatingInvoice.md +++ b/xero_python/accounting/docs/RepeatingInvoice.md @@ -17,8 +17,12 @@ Name | Type | Description | Notes **total** | **float** | Total of Invoice tax inclusive (i.e. SubTotal + TotalTax) | [optional] **repeating_invoice_id** | **str** | Xero generated unique identifier for repeating invoice template | [optional] **id** | **str** | Xero generated unique identifier for repeating invoice template | [optional] -**has_attachments** | **bool** | boolean to indicate if an invoice has an attachment | [optional] [default to False] +**has_attachments** | **bool** | Boolean to indicate if an invoice has an attachment | [optional] [default to False] **attachments** | [**list[Attachment]**](Attachment.md) | Displays array of attachments from the API | [optional] +**approved_for_sending** | **bool** | Boolean to indicate whether the invoice has been approved for sending | [optional] [default to False] +**send_copy** | **bool** | Boolean to indicate whether a copy is sent to sender's email | [optional] [default to False] +**mark_as_sent** | **bool** | Boolean to indicate whether the invoice in the Xero app displays as \"sent\" | [optional] [default to False] +**include_pdf** | **bool** | Boolean to indicate whether to include PDF attachment | [optional] [default to False] [[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/accounting/models/__init__.py b/xero_python/accounting/models/__init__.py index 3de0d697..d98997c3 100644 --- a/xero_python/accounting/models/__init__.py +++ b/xero_python/accounting/models/__init__.py @@ -34,6 +34,10 @@ from xero_python.accounting.models.bank_transfer import BankTransfer from xero_python.accounting.models.bank_transfers import BankTransfers from xero_python.accounting.models.batch_payment import BatchPayment +from xero_python.accounting.models.batch_payment_delete import BatchPaymentDelete +from xero_python.accounting.models.batch_payment_delete_by_url_param import ( + BatchPaymentDeleteByUrlParam, +) from xero_python.accounting.models.batch_payment_details import BatchPaymentDetails from xero_python.accounting.models.batch_payments import BatchPayments from xero_python.accounting.models.bill import Bill diff --git a/xero_python/accounting/models/batch_payment_delete.py b/xero_python/accounting/models/batch_payment_delete.py new file mode 100644 index 00000000..1fbe31ef --- /dev/null +++ b/xero_python/accounting/models/batch_payment_delete.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Xero Accounting API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 + +from xero_python.models import BaseModel + + +class BatchPaymentDelete(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = {"batch_payment_id": "str", "status": "str"} + + attribute_map = {"batch_payment_id": "BatchPaymentID", "status": "Status"} + + def __init__(self, batch_payment_id=None, status="DELETED"): # noqa: E501 + """BatchPaymentDelete - a model defined in OpenAPI""" # noqa: E501 + + self._batch_payment_id = None + self._status = None + self.discriminator = None + + self.batch_payment_id = batch_payment_id + self.status = status + + @property + def batch_payment_id(self): + """Gets the batch_payment_id of this BatchPaymentDelete. # noqa: E501 + + The Xero generated unique identifier for the bank transaction (read-only) # noqa: E501 + + :return: The batch_payment_id of this BatchPaymentDelete. # noqa: E501 + :rtype: str + """ + return self._batch_payment_id + + @batch_payment_id.setter + def batch_payment_id(self, batch_payment_id): + """Sets the batch_payment_id of this BatchPaymentDelete. + + The Xero generated unique identifier for the bank transaction (read-only) # noqa: E501 + + :param batch_payment_id: The batch_payment_id of this BatchPaymentDelete. # noqa: E501 + :type: str + """ + if batch_payment_id is None: + raise ValueError( + "Invalid value for `batch_payment_id`, must not be `None`" + ) # noqa: E501 + + self._batch_payment_id = batch_payment_id + + @property + def status(self): + """Gets the status of this BatchPaymentDelete. # noqa: E501 + + The status of the batch payment. # noqa: E501 + + :return: The status of this BatchPaymentDelete. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this BatchPaymentDelete. + + The status of the batch payment. # noqa: E501 + + :param status: The status of this BatchPaymentDelete. # noqa: E501 + :type: str + """ + if status is None: + raise ValueError( + "Invalid value for `status`, must not be `None`" + ) # noqa: E501 + + self._status = status diff --git a/xero_python/accounting/models/batch_payment_delete_by_url_param.py b/xero_python/accounting/models/batch_payment_delete_by_url_param.py new file mode 100644 index 00000000..59e12cc7 --- /dev/null +++ b/xero_python/accounting/models/batch_payment_delete_by_url_param.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + Xero Accounting API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 + +from xero_python.models import BaseModel + + +class BatchPaymentDeleteByUrlParam(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = {"status": "str"} + + attribute_map = {"status": "Status"} + + def __init__(self, status="DELETED"): # noqa: E501 + """BatchPaymentDeleteByUrlParam - a model defined in OpenAPI""" # noqa: E501 + + self._status = None + self.discriminator = None + + self.status = status + + @property + def status(self): + """Gets the status of this BatchPaymentDeleteByUrlParam. # noqa: E501 + + The status of the batch payment. # noqa: E501 + + :return: The status of this BatchPaymentDeleteByUrlParam. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this BatchPaymentDeleteByUrlParam. + + The status of the batch payment. # noqa: E501 + + :param status: The status of this BatchPaymentDeleteByUrlParam. # noqa: E501 + :type: str + """ + if status is None: + raise ValueError( + "Invalid value for `status`, must not be `None`" + ) # noqa: E501 + + self._status = status diff --git a/xero_python/accounting/models/repeating_invoice.py b/xero_python/accounting/models/repeating_invoice.py index 072582b9..aa0b82c7 100644 --- a/xero_python/accounting/models/repeating_invoice.py +++ b/xero_python/accounting/models/repeating_invoice.py @@ -46,6 +46,10 @@ class RepeatingInvoice(BaseModel): "id": "str", "has_attachments": "bool", "attachments": "list[Attachment]", + "approved_for_sending": "bool", + "send_copy": "bool", + "mark_as_sent": "bool", + "include_pdf": "bool", } attribute_map = { @@ -65,6 +69,10 @@ class RepeatingInvoice(BaseModel): "id": "ID", "has_attachments": "HasAttachments", "attachments": "Attachments", + "approved_for_sending": "ApprovedForSending", + "send_copy": "SendCopy", + "mark_as_sent": "MarkAsSent", + "include_pdf": "IncludePDF", } def __init__( @@ -85,6 +93,10 @@ def __init__( id=None, has_attachments=False, attachments=None, + approved_for_sending=False, + send_copy=False, + mark_as_sent=False, + include_pdf=False, ): # noqa: E501 """RepeatingInvoice - a model defined in OpenAPI""" # noqa: E501 @@ -104,6 +116,10 @@ def __init__( self._id = None self._has_attachments = None self._attachments = None + self._approved_for_sending = None + self._send_copy = None + self._mark_as_sent = None + self._include_pdf = None self.discriminator = None if type is not None: @@ -138,6 +154,14 @@ def __init__( self.has_attachments = has_attachments if attachments is not None: self.attachments = attachments + if approved_for_sending is not None: + self.approved_for_sending = approved_for_sending + if send_copy is not None: + self.send_copy = send_copy + if mark_as_sent is not None: + self.mark_as_sent = mark_as_sent + if include_pdf is not None: + self.include_pdf = include_pdf @property def type(self): @@ -475,7 +499,7 @@ def id(self, id): def has_attachments(self): """Gets the has_attachments of this RepeatingInvoice. # noqa: E501 - boolean to indicate if an invoice has an attachment # noqa: E501 + Boolean to indicate if an invoice has an attachment # noqa: E501 :return: The has_attachments of this RepeatingInvoice. # noqa: E501 :rtype: bool @@ -486,7 +510,7 @@ def has_attachments(self): def has_attachments(self, has_attachments): """Sets the has_attachments of this RepeatingInvoice. - boolean to indicate if an invoice has an attachment # noqa: E501 + Boolean to indicate if an invoice has an attachment # noqa: E501 :param has_attachments: The has_attachments of this RepeatingInvoice. # noqa: E501 :type: bool @@ -516,3 +540,95 @@ def attachments(self, attachments): """ self._attachments = attachments + + @property + def approved_for_sending(self): + """Gets the approved_for_sending of this RepeatingInvoice. # noqa: E501 + + Boolean to indicate whether the invoice has been approved for sending # noqa: E501 + + :return: The approved_for_sending of this RepeatingInvoice. # noqa: E501 + :rtype: bool + """ + return self._approved_for_sending + + @approved_for_sending.setter + def approved_for_sending(self, approved_for_sending): + """Sets the approved_for_sending of this RepeatingInvoice. + + Boolean to indicate whether the invoice has been approved for sending # noqa: E501 + + :param approved_for_sending: The approved_for_sending of this RepeatingInvoice. # noqa: E501 + :type: bool + """ + + self._approved_for_sending = approved_for_sending + + @property + def send_copy(self): + """Gets the send_copy of this RepeatingInvoice. # noqa: E501 + + Boolean to indicate whether a copy is sent to sender's email # noqa: E501 + + :return: The send_copy of this RepeatingInvoice. # noqa: E501 + :rtype: bool + """ + return self._send_copy + + @send_copy.setter + def send_copy(self, send_copy): + """Sets the send_copy of this RepeatingInvoice. + + Boolean to indicate whether a copy is sent to sender's email # noqa: E501 + + :param send_copy: The send_copy of this RepeatingInvoice. # noqa: E501 + :type: bool + """ + + self._send_copy = send_copy + + @property + def mark_as_sent(self): + """Gets the mark_as_sent of this RepeatingInvoice. # noqa: E501 + + Boolean to indicate whether the invoice in the Xero app displays as \"sent\" # noqa: E501 + + :return: The mark_as_sent of this RepeatingInvoice. # noqa: E501 + :rtype: bool + """ + return self._mark_as_sent + + @mark_as_sent.setter + def mark_as_sent(self, mark_as_sent): + """Sets the mark_as_sent of this RepeatingInvoice. + + Boolean to indicate whether the invoice in the Xero app displays as \"sent\" # noqa: E501 + + :param mark_as_sent: The mark_as_sent of this RepeatingInvoice. # noqa: E501 + :type: bool + """ + + self._mark_as_sent = mark_as_sent + + @property + def include_pdf(self): + """Gets the include_pdf of this RepeatingInvoice. # noqa: E501 + + Boolean to indicate whether to include PDF attachment # noqa: E501 + + :return: The include_pdf of this RepeatingInvoice. # noqa: E501 + :rtype: bool + """ + return self._include_pdf + + @include_pdf.setter + def include_pdf(self, include_pdf): + """Sets the include_pdf of this RepeatingInvoice. + + Boolean to indicate whether to include PDF attachment # noqa: E501 + + :param include_pdf: The include_pdf of this RepeatingInvoice. # noqa: E501 + :type: bool + """ + + self._include_pdf = include_pdf diff --git a/xero_python/appstore/api/app_store_api.py b/xero_python/appstore/api/app_store_api.py index 700edf32..06c110de 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.23.0 + OpenAPI spec version: 2.25.0 """ import importlib diff --git a/xero_python/assets/api/asset_api.py b/xero_python/assets/api/asset_api.py index 732f57bb..4436b586 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.23.0 + OpenAPI spec version: 2.25.0 """ import importlib diff --git a/xero_python/docs/README.md b/xero_python/docs/README.md index a61b0ee9..228be5d1 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.23.0 -- Package version: 1.16.0 +- API version: 2.25.0 +- Package version: 1.17.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 9b786119..12b74a4c 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.23.0 + OpenAPI spec version: 2.25.0 """ import importlib diff --git a/xero_python/finance/api/finance_api.py b/xero_python/finance/api/finance_api.py index 01e1739f..ea6d970c 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.23.0 + OpenAPI spec version: 2.25.0 """ import importlib diff --git a/xero_python/identity/api/identity_api.py b/xero_python/identity/api/identity_api.py index 3761117d..94a1e381 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.23.0 + OpenAPI spec version: 2.25.0 """ import importlib diff --git a/xero_python/payrollau/api/payroll_au_api.py b/xero_python/payrollau/api/payroll_au_api.py index 7ccda312..b4ac18d6 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.23.0 + OpenAPI spec version: 2.25.0 """ import importlib diff --git a/xero_python/payrollau/docs/TaxDeclaration.md b/xero_python/payrollau/docs/TaxDeclaration.md index e012c76a..4c720a8c 100644 --- a/xero_python/payrollau/docs/TaxDeclaration.md +++ b/xero_python/payrollau/docs/TaxDeclaration.md @@ -18,6 +18,7 @@ Name | Type | Description | Notes **eligible_to_receive_leave_loading** | **bool** | If the employee is eligible to receive an additional percentage on top of ordinary earnings when they take leave (typically 17.5%). e.g true or false | [optional] **approved_withholding_variation_percentage** | **float** | If the employee has approved withholding variation. e.g (0 - 100) | [optional] **has_student_startup_loan** | **bool** | If the employee is eligible for student startup loan rules | [optional] +**has_loan_or_student_debt** | **bool** | If the employee has any of the following loans or debts: Higher Education Loan Program (HELP/HECS), VET Student Loan (VSL), Financial Supplement (FS), Student Start-up Loan (SSL), or Trade Support Loan (TSL) | [optional] **updated_date_utc** | **datetime** | Last modified timestamp | [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/payrollau/models/earnings_type.py b/xero_python/payrollau/models/earnings_type.py index 64bf9fa9..80fe95c8 100644 --- a/xero_python/payrollau/models/earnings_type.py +++ b/xero_python/payrollau/models/earnings_type.py @@ -36,3 +36,5 @@ class EarningsType(Enum): LUMPSUME = "LUMPSUME" LUMPSUMW = "LUMPSUMW" DIRECTORSFEES = "DIRECTORSFEES" + PAIDPARENTALLEAVE = "PAIDPARENTALLEAVE" + WORKERSCOMPENSATION = "WORKERSCOMPENSATION" diff --git a/xero_python/payrollau/models/tax_declaration.py b/xero_python/payrollau/models/tax_declaration.py index 53c8595f..907a3672 100644 --- a/xero_python/payrollau/models/tax_declaration.py +++ b/xero_python/payrollau/models/tax_declaration.py @@ -45,6 +45,7 @@ class TaxDeclaration(BaseModel): "eligible_to_receive_leave_loading": "bool", "approved_withholding_variation_percentage": "float", "has_student_startup_loan": "bool", + "has_loan_or_student_debt": "bool", "updated_date_utc": "datetime[ms-format]", } @@ -64,6 +65,7 @@ class TaxDeclaration(BaseModel): "eligible_to_receive_leave_loading": "EligibleToReceiveLeaveLoading", "approved_withholding_variation_percentage": "ApprovedWithholdingVariationPercentage", "has_student_startup_loan": "HasStudentStartupLoan", + "has_loan_or_student_debt": "HasLoanOrStudentDebt", "updated_date_utc": "UpdatedDateUTC", } @@ -84,6 +86,7 @@ def __init__( eligible_to_receive_leave_loading=None, approved_withholding_variation_percentage=None, has_student_startup_loan=None, + has_loan_or_student_debt=None, updated_date_utc=None, ): # noqa: E501 """TaxDeclaration - a model defined in OpenAPI""" # noqa: E501 @@ -103,6 +106,7 @@ def __init__( self._eligible_to_receive_leave_loading = None self._approved_withholding_variation_percentage = None self._has_student_startup_loan = None + self._has_loan_or_student_debt = None self._updated_date_utc = None self.discriminator = None @@ -142,6 +146,8 @@ def __init__( ) if has_student_startup_loan is not None: self.has_student_startup_loan = has_student_startup_loan + if has_loan_or_student_debt is not None: + self.has_loan_or_student_debt = has_loan_or_student_debt if updated_date_utc is not None: self.updated_date_utc = updated_date_utc @@ -496,6 +502,29 @@ def has_student_startup_loan(self, has_student_startup_loan): self._has_student_startup_loan = has_student_startup_loan + @property + def has_loan_or_student_debt(self): + """Gets the has_loan_or_student_debt of this TaxDeclaration. # noqa: E501 + + If the employee has any of the following loans or debts: Higher Education Loan Program (HELP/HECS), VET Student Loan (VSL), Financial Supplement (FS), Student Start-up Loan (SSL), or Trade Support Loan (TSL) # noqa: E501 + + :return: The has_loan_or_student_debt of this TaxDeclaration. # noqa: E501 + :rtype: bool + """ + return self._has_loan_or_student_debt + + @has_loan_or_student_debt.setter + def has_loan_or_student_debt(self, has_loan_or_student_debt): + """Sets the has_loan_or_student_debt of this TaxDeclaration. + + If the employee has any of the following loans or debts: Higher Education Loan Program (HELP/HECS), VET Student Loan (VSL), Financial Supplement (FS), Student Start-up Loan (SSL), or Trade Support Loan (TSL) # noqa: E501 + + :param has_loan_or_student_debt: The has_loan_or_student_debt of this TaxDeclaration. # noqa: E501 + :type: bool + """ + + self._has_loan_or_student_debt = has_loan_or_student_debt + @property def updated_date_utc(self): """Gets the updated_date_utc of this TaxDeclaration. # noqa: E501 diff --git a/xero_python/payrollnz/api/payroll_nz_api.py b/xero_python/payrollnz/api/payroll_nz_api.py index 8a50b0f4..9ca098e3 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.23.0 + OpenAPI spec version: 2.25.0 """ import importlib diff --git a/xero_python/payrolluk/api/payroll_uk_api.py b/xero_python/payrolluk/api/payroll_uk_api.py index f81d9215..a42d91cf 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.23.0 + OpenAPI spec version: 2.25.0 """ import importlib diff --git a/xero_python/project/api/project_api.py b/xero_python/project/api/project_api.py index fb06ba1d..dbf13312 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.23.0 + OpenAPI spec version: 2.25.0 """ import importlib