diff --git a/setup.py b/setup.py index df78ad68..7ff7b291 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="0.2.3", + version="0.3.0", ) diff --git a/xero_python/__init__.py b/xero_python/__init__.py index b76edf2c..ecbc8a42 100644 --- a/xero_python/__init__.py +++ b/xero_python/__init__.py @@ -2,4 +2,4 @@ __author__ = """Xero Developer API""" __email__ = "api@xero.com" -__version__ = "0.2.3" +__version__ = "0.3.0" diff --git a/xero_python/accounting/__init__.py b/xero_python/accounting/__init__.py index 99dd1132..b9f0673e 100644 --- a/xero_python/accounting/__init__.py +++ b/xero_python/accounting/__init__.py @@ -7,7 +7,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/api/accounting_api.py b/xero_python/accounting/api/accounting_api.py index 612e3d13..617ba8a7 100644 --- a/xero_python/accounting/api/accounting_api.py +++ b/xero_python/accounting/api/accounting_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ @@ -1501,6 +1501,7 @@ def create_credit_note_allocation( xero_tenant_id, credit_note_id, allocations, + summarize_errors=empty, _return_http_data_only=True, _preload_content=True, _request_timeout=None, @@ -1510,6 +1511,7 @@ def create_credit_note_allocation( :param str xero_tenant_id: Xero identifier for Tenant (required) :param str credit_note_id: Unique identifier for a Credit Note (required) :param Allocations allocations: Allocations with array of Allocation object in body of request. (required) + :param bool summarize_errors: If false return 200 OK and mix of successfully created obejcts 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 @@ -1542,6 +1544,9 @@ def create_credit_note_allocation( query_params = [] + if summarize_errors is not empty: + query_params.append(("summarizeErrors", summarize_errors)) + header_params = { "xero-tenant-id": xero_tenant_id, } diff --git a/xero_python/accounting/docs/AccountingApi.md b/xero_python/accounting/docs/AccountingApi.md index be5120dc..a01e5571 100644 --- a/xero_python/accounting/docs/AccountingApi.md +++ b/xero_python/accounting/docs/AccountingApi.md @@ -150,7 +150,7 @@ Method | HTTP request | Description [**get_purchase_order_history**](AccountingApi.md#get_purchase_order_history) | **GET** /PurchaseOrders/{PurchaseOrderID}/History | Allows you to retrieve history for PurchaseOrder [**get_purchase_orders**](AccountingApi.md#get_purchase_orders) | **GET** /PurchaseOrders | Allows you to retrieve purchase orders [**get_quote**](AccountingApi.md#get_quote) | **GET** /Quotes/{QuoteID} | Allows you to retrieve a specified quote -[**get_quote_as_pdf**](AccountingApi.md#get_quote_as_pdf) | **GET** /Quotes/{QuotesID}/pdf | Allows you to retrieve quotes as PDF files +[**get_quote_as_pdf**](AccountingApi.md#get_quote_as_pdf) | **GET** /Quotes/{QuoteID}/pdf | Allows you to retrieve quotes as PDF files [**get_quote_attachment_by_file_name**](AccountingApi.md#get_quote_attachment_by_file_name) | **GET** /Quotes/{QuoteID}/Attachments/{FileName} | Allows you to retrieve Attachment on Quote by Filename [**get_quote_attachment_by_id**](AccountingApi.md#get_quote_attachment_by_id) | **GET** /Quotes/{QuoteID}/Attachments/{AttachmentID} | Allows you to retrieve specific Attachment on Quote [**get_quote_attachments**](AccountingApi.md#get_quote_attachments) | **GET** /Quotes/{QuoteID}/Attachments | Allows you to retrieve Attachments for Quotes @@ -1263,7 +1263,7 @@ 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_credit_note_allocation** -> Allocations create_credit_note_allocation(xero_tenant_id, credit_note_id, allocations) +> Allocations create_credit_note_allocation(xero_tenant_id, credit_note_id, allocations, summarize_errors=summarize_errors) Allows you to create Allocation on CreditNote @@ -1296,9 +1296,10 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant credit_note_id = '00000000-0000-0000-000-000000000000' # str | Unique identifier for a Credit Note allocations = { allocations:[ { amount:1.0, date:"2019-03-05", invoice:{ invoiceID:"c45720a1-ade3-4a38-a064-d15489be6841", lineItems:[], type: Invoice.TypeEnum.ACCPAY, contact:{} } } ] } # Allocations | Allocations with array of Allocation object in body of request. +summarize_errors = False # bool | If false return 200 OK and mix of successfully created obejcts and any with validation errors (optional) (default to False) try: # Allows you to create Allocation on CreditNote - api_response = api_instance.create_credit_note_allocation(xero_tenant_id, credit_note_id, allocations) + api_response = api_instance.create_credit_note_allocation(xero_tenant_id, credit_note_id, allocations, summarize_errors=summarize_errors) pprint(api_response) except ApiException as e: print("Exception when calling AccountingApi->create_credit_note_allocation: %s\n" % e) @@ -1311,6 +1312,7 @@ Name | Type | Description | Notes **xero_tenant_id** | **str**| Xero identifier for Tenant | **credit_note_id** | [**str**](.md)| Unique identifier for a Credit Note | **allocations** | [**Allocations**](Allocations.md)| Allocations with array of Allocation object in body of request. | + **summarize_errors** | **bool**| If false return 200 OK and mix of successfully created obejcts and any with validation errors | [optional] [default to False] ### Return type diff --git a/xero_python/accounting/models/__init__.py b/xero_python/accounting/models/__init__.py index fcb9e264..0d3ec92d 100644 --- a/xero_python/accounting/models/__init__.py +++ b/xero_python/accounting/models/__init__.py @@ -6,7 +6,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/account.py b/xero_python/accounting/models/account.py index a1ae8556..34a6751d 100644 --- a/xero_python/accounting/models/account.py +++ b/xero_python/accounting/models/account.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/account_type.py b/xero_python/accounting/models/account_type.py index c059d024..485136e3 100644 --- a/xero_python/accounting/models/account_type.py +++ b/xero_python/accounting/models/account_type.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/accounts.py b/xero_python/accounting/models/accounts.py index 12a58a3a..a7b62666 100644 --- a/xero_python/accounting/models/accounts.py +++ b/xero_python/accounting/models/accounts.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/accounts_payable.py b/xero_python/accounting/models/accounts_payable.py index 5adcae43..5287566b 100644 --- a/xero_python/accounting/models/accounts_payable.py +++ b/xero_python/accounting/models/accounts_payable.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/accounts_receivable.py b/xero_python/accounting/models/accounts_receivable.py index 8e705833..f11e2e8b 100644 --- a/xero_python/accounting/models/accounts_receivable.py +++ b/xero_python/accounting/models/accounts_receivable.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/address.py b/xero_python/accounting/models/address.py index 051bd04d..72c12096 100644 --- a/xero_python/accounting/models/address.py +++ b/xero_python/accounting/models/address.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/allocation.py b/xero_python/accounting/models/allocation.py index 1f03c43a..c8494c79 100644 --- a/xero_python/accounting/models/allocation.py +++ b/xero_python/accounting/models/allocation.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/allocations.py b/xero_python/accounting/models/allocations.py index 8092f4c7..da1e0abc 100644 --- a/xero_python/accounting/models/allocations.py +++ b/xero_python/accounting/models/allocations.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/attachment.py b/xero_python/accounting/models/attachment.py index e5c7bcfe..5aa0a4e3 100644 --- a/xero_python/accounting/models/attachment.py +++ b/xero_python/accounting/models/attachment.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/attachments.py b/xero_python/accounting/models/attachments.py index a4d062f3..f7362de7 100644 --- a/xero_python/accounting/models/attachments.py +++ b/xero_python/accounting/models/attachments.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/balances.py b/xero_python/accounting/models/balances.py index 4893e7e3..7d8cdd73 100644 --- a/xero_python/accounting/models/balances.py +++ b/xero_python/accounting/models/balances.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/bank_transaction.py b/xero_python/accounting/models/bank_transaction.py index 95683d9f..22d3e381 100644 --- a/xero_python/accounting/models/bank_transaction.py +++ b/xero_python/accounting/models/bank_transaction.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/bank_transactions.py b/xero_python/accounting/models/bank_transactions.py index 9a5ce0e9..39d292b8 100644 --- a/xero_python/accounting/models/bank_transactions.py +++ b/xero_python/accounting/models/bank_transactions.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/bank_transfer.py b/xero_python/accounting/models/bank_transfer.py index c3cbf58a..a41997c4 100644 --- a/xero_python/accounting/models/bank_transfer.py +++ b/xero_python/accounting/models/bank_transfer.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/bank_transfers.py b/xero_python/accounting/models/bank_transfers.py index 5542343c..bb97d017 100644 --- a/xero_python/accounting/models/bank_transfers.py +++ b/xero_python/accounting/models/bank_transfers.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/batch_payment.py b/xero_python/accounting/models/batch_payment.py index 25bda3d4..a93b8582 100644 --- a/xero_python/accounting/models/batch_payment.py +++ b/xero_python/accounting/models/batch_payment.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/batch_payment_details.py b/xero_python/accounting/models/batch_payment_details.py index 61869e7c..15dbfd61 100644 --- a/xero_python/accounting/models/batch_payment_details.py +++ b/xero_python/accounting/models/batch_payment_details.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/batch_payments.py b/xero_python/accounting/models/batch_payments.py index d894f56e..b5583ca9 100644 --- a/xero_python/accounting/models/batch_payments.py +++ b/xero_python/accounting/models/batch_payments.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/bill.py b/xero_python/accounting/models/bill.py index b7da6c2f..7ad8364e 100644 --- a/xero_python/accounting/models/bill.py +++ b/xero_python/accounting/models/bill.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/branding_theme.py b/xero_python/accounting/models/branding_theme.py index 205c7b83..c50e4b6c 100644 --- a/xero_python/accounting/models/branding_theme.py +++ b/xero_python/accounting/models/branding_theme.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/branding_themes.py b/xero_python/accounting/models/branding_themes.py index 1a1f38ce..6013e793 100644 --- a/xero_python/accounting/models/branding_themes.py +++ b/xero_python/accounting/models/branding_themes.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/cis_org_setting.py b/xero_python/accounting/models/cis_org_setting.py index 18be63c5..f4565620 100644 --- a/xero_python/accounting/models/cis_org_setting.py +++ b/xero_python/accounting/models/cis_org_setting.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/cis_setting.py b/xero_python/accounting/models/cis_setting.py index 60b02ba3..d26fe19a 100644 --- a/xero_python/accounting/models/cis_setting.py +++ b/xero_python/accounting/models/cis_setting.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/cis_settings.py b/xero_python/accounting/models/cis_settings.py index 3af71545..c4fd4189 100644 --- a/xero_python/accounting/models/cis_settings.py +++ b/xero_python/accounting/models/cis_settings.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/contact.py b/xero_python/accounting/models/contact.py index 23dd7183..0857ab67 100644 --- a/xero_python/accounting/models/contact.py +++ b/xero_python/accounting/models/contact.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/contact_group.py b/xero_python/accounting/models/contact_group.py index 58b159a5..58f895fb 100644 --- a/xero_python/accounting/models/contact_group.py +++ b/xero_python/accounting/models/contact_group.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/contact_groups.py b/xero_python/accounting/models/contact_groups.py index 684adee8..c7d1e075 100644 --- a/xero_python/accounting/models/contact_groups.py +++ b/xero_python/accounting/models/contact_groups.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/contact_person.py b/xero_python/accounting/models/contact_person.py index 480681c1..5fb6da17 100644 --- a/xero_python/accounting/models/contact_person.py +++ b/xero_python/accounting/models/contact_person.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/contacts.py b/xero_python/accounting/models/contacts.py index 42b62c29..d69d204b 100644 --- a/xero_python/accounting/models/contacts.py +++ b/xero_python/accounting/models/contacts.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/country_code.py b/xero_python/accounting/models/country_code.py index 0384e993..c27fb998 100644 --- a/xero_python/accounting/models/country_code.py +++ b/xero_python/accounting/models/country_code.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/credit_note.py b/xero_python/accounting/models/credit_note.py index 545f21e2..efb483dc 100644 --- a/xero_python/accounting/models/credit_note.py +++ b/xero_python/accounting/models/credit_note.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/credit_notes.py b/xero_python/accounting/models/credit_notes.py index 77600462..cdcdf33b 100644 --- a/xero_python/accounting/models/credit_notes.py +++ b/xero_python/accounting/models/credit_notes.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/currencies.py b/xero_python/accounting/models/currencies.py index 0485817d..37a042ec 100644 --- a/xero_python/accounting/models/currencies.py +++ b/xero_python/accounting/models/currencies.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/currency.py b/xero_python/accounting/models/currency.py index 1f08b1ae..15cfcfc9 100644 --- a/xero_python/accounting/models/currency.py +++ b/xero_python/accounting/models/currency.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/currency_code.py b/xero_python/accounting/models/currency_code.py index db930b7a..09262458 100644 --- a/xero_python/accounting/models/currency_code.py +++ b/xero_python/accounting/models/currency_code.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/element.py b/xero_python/accounting/models/element.py index 97ca39cb..bfbd161f 100644 --- a/xero_python/accounting/models/element.py +++ b/xero_python/accounting/models/element.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/employee.py b/xero_python/accounting/models/employee.py index 284cd796..97263627 100644 --- a/xero_python/accounting/models/employee.py +++ b/xero_python/accounting/models/employee.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/employees.py b/xero_python/accounting/models/employees.py index 70d689d3..f7268e5c 100644 --- a/xero_python/accounting/models/employees.py +++ b/xero_python/accounting/models/employees.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/error.py b/xero_python/accounting/models/error.py index 2669e10c..055ce556 100644 --- a/xero_python/accounting/models/error.py +++ b/xero_python/accounting/models/error.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/expense_claim.py b/xero_python/accounting/models/expense_claim.py index ddbbb50c..a2e35c0f 100644 --- a/xero_python/accounting/models/expense_claim.py +++ b/xero_python/accounting/models/expense_claim.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/expense_claims.py b/xero_python/accounting/models/expense_claims.py index 59a59b3d..fc2879f5 100644 --- a/xero_python/accounting/models/expense_claims.py +++ b/xero_python/accounting/models/expense_claims.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/external_link.py b/xero_python/accounting/models/external_link.py index 78973dbc..e2a25b83 100644 --- a/xero_python/accounting/models/external_link.py +++ b/xero_python/accounting/models/external_link.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/history_record.py b/xero_python/accounting/models/history_record.py index 95a506f9..0726b2f2 100644 --- a/xero_python/accounting/models/history_record.py +++ b/xero_python/accounting/models/history_record.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/history_records.py b/xero_python/accounting/models/history_records.py index 99ee97a6..5475904a 100644 --- a/xero_python/accounting/models/history_records.py +++ b/xero_python/accounting/models/history_records.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/invoice.py b/xero_python/accounting/models/invoice.py index ff8f16fc..240cb979 100644 --- a/xero_python/accounting/models/invoice.py +++ b/xero_python/accounting/models/invoice.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/invoice_reminder.py b/xero_python/accounting/models/invoice_reminder.py index 59a6de82..eb63ea02 100644 --- a/xero_python/accounting/models/invoice_reminder.py +++ b/xero_python/accounting/models/invoice_reminder.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/invoice_reminders.py b/xero_python/accounting/models/invoice_reminders.py index 679d2315..64b7dbda 100644 --- a/xero_python/accounting/models/invoice_reminders.py +++ b/xero_python/accounting/models/invoice_reminders.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/invoices.py b/xero_python/accounting/models/invoices.py index b3ec21ca..499aaad3 100644 --- a/xero_python/accounting/models/invoices.py +++ b/xero_python/accounting/models/invoices.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/item.py b/xero_python/accounting/models/item.py index 0b669723..779f2253 100644 --- a/xero_python/accounting/models/item.py +++ b/xero_python/accounting/models/item.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/items.py b/xero_python/accounting/models/items.py index 73dcfe4b..35135055 100644 --- a/xero_python/accounting/models/items.py +++ b/xero_python/accounting/models/items.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/journal.py b/xero_python/accounting/models/journal.py index 5c3725b0..7311b7a6 100644 --- a/xero_python/accounting/models/journal.py +++ b/xero_python/accounting/models/journal.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/journal_line.py b/xero_python/accounting/models/journal_line.py index 6294f5ef..68f770c7 100644 --- a/xero_python/accounting/models/journal_line.py +++ b/xero_python/accounting/models/journal_line.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/journals.py b/xero_python/accounting/models/journals.py index 4eed45c0..3a57ecb5 100644 --- a/xero_python/accounting/models/journals.py +++ b/xero_python/accounting/models/journals.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/line_amount_types.py b/xero_python/accounting/models/line_amount_types.py index abe7b16d..0e51b6d7 100644 --- a/xero_python/accounting/models/line_amount_types.py +++ b/xero_python/accounting/models/line_amount_types.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/line_item.py b/xero_python/accounting/models/line_item.py index fabcdec9..017bafe5 100644 --- a/xero_python/accounting/models/line_item.py +++ b/xero_python/accounting/models/line_item.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/line_item_tracking.py b/xero_python/accounting/models/line_item_tracking.py index 9dd2dd13..545fb42c 100644 --- a/xero_python/accounting/models/line_item_tracking.py +++ b/xero_python/accounting/models/line_item_tracking.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/linked_transaction.py b/xero_python/accounting/models/linked_transaction.py index d6d54470..21ff29d1 100644 --- a/xero_python/accounting/models/linked_transaction.py +++ b/xero_python/accounting/models/linked_transaction.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/linked_transactions.py b/xero_python/accounting/models/linked_transactions.py index 8e496da6..ff9e1322 100644 --- a/xero_python/accounting/models/linked_transactions.py +++ b/xero_python/accounting/models/linked_transactions.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/manual_journal.py b/xero_python/accounting/models/manual_journal.py index 9efb5095..625cb91f 100644 --- a/xero_python/accounting/models/manual_journal.py +++ b/xero_python/accounting/models/manual_journal.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/manual_journal_line.py b/xero_python/accounting/models/manual_journal_line.py index 454ff26d..abc08e88 100644 --- a/xero_python/accounting/models/manual_journal_line.py +++ b/xero_python/accounting/models/manual_journal_line.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/manual_journals.py b/xero_python/accounting/models/manual_journals.py index 01940e4e..bc8a2832 100644 --- a/xero_python/accounting/models/manual_journals.py +++ b/xero_python/accounting/models/manual_journals.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/online_invoice.py b/xero_python/accounting/models/online_invoice.py index a89e55dd..504419e2 100644 --- a/xero_python/accounting/models/online_invoice.py +++ b/xero_python/accounting/models/online_invoice.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/online_invoices.py b/xero_python/accounting/models/online_invoices.py index 491975d9..5e7f25ae 100644 --- a/xero_python/accounting/models/online_invoices.py +++ b/xero_python/accounting/models/online_invoices.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/organisation.py b/xero_python/accounting/models/organisation.py index 47f7fa4d..0f2feba8 100644 --- a/xero_python/accounting/models/organisation.py +++ b/xero_python/accounting/models/organisation.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/organisations.py b/xero_python/accounting/models/organisations.py index 7ccce1cd..317fd1fa 100644 --- a/xero_python/accounting/models/organisations.py +++ b/xero_python/accounting/models/organisations.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/overpayment.py b/xero_python/accounting/models/overpayment.py index 7a095b28..fb3b3036 100644 --- a/xero_python/accounting/models/overpayment.py +++ b/xero_python/accounting/models/overpayment.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/overpayments.py b/xero_python/accounting/models/overpayments.py index de89da92..79b1fdc5 100644 --- a/xero_python/accounting/models/overpayments.py +++ b/xero_python/accounting/models/overpayments.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/payment.py b/xero_python/accounting/models/payment.py index b22eb701..5e4e2360 100644 --- a/xero_python/accounting/models/payment.py +++ b/xero_python/accounting/models/payment.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/payment_delete.py b/xero_python/accounting/models/payment_delete.py index 5b74a4b8..0d514387 100644 --- a/xero_python/accounting/models/payment_delete.py +++ b/xero_python/accounting/models/payment_delete.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/payment_service.py b/xero_python/accounting/models/payment_service.py index d85fa51e..5c16b425 100644 --- a/xero_python/accounting/models/payment_service.py +++ b/xero_python/accounting/models/payment_service.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/payment_services.py b/xero_python/accounting/models/payment_services.py index be1d6dfc..769ecb24 100644 --- a/xero_python/accounting/models/payment_services.py +++ b/xero_python/accounting/models/payment_services.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/payment_term.py b/xero_python/accounting/models/payment_term.py index 55151a4b..b4afe15e 100644 --- a/xero_python/accounting/models/payment_term.py +++ b/xero_python/accounting/models/payment_term.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/payment_term_type.py b/xero_python/accounting/models/payment_term_type.py index ac81e1fe..d99d4324 100644 --- a/xero_python/accounting/models/payment_term_type.py +++ b/xero_python/accounting/models/payment_term_type.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/payments.py b/xero_python/accounting/models/payments.py index c80fc578..e6f63cf6 100644 --- a/xero_python/accounting/models/payments.py +++ b/xero_python/accounting/models/payments.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/phone.py b/xero_python/accounting/models/phone.py index d68fb569..3208daad 100644 --- a/xero_python/accounting/models/phone.py +++ b/xero_python/accounting/models/phone.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/prepayment.py b/xero_python/accounting/models/prepayment.py index 73eccf3e..296de58c 100644 --- a/xero_python/accounting/models/prepayment.py +++ b/xero_python/accounting/models/prepayment.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/prepayments.py b/xero_python/accounting/models/prepayments.py index f6b8bfb9..d43dd21d 100644 --- a/xero_python/accounting/models/prepayments.py +++ b/xero_python/accounting/models/prepayments.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/purchase.py b/xero_python/accounting/models/purchase.py index 8de2b922..4622d258 100644 --- a/xero_python/accounting/models/purchase.py +++ b/xero_python/accounting/models/purchase.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/purchase_order.py b/xero_python/accounting/models/purchase_order.py index 29e7a995..87e7ae8e 100644 --- a/xero_python/accounting/models/purchase_order.py +++ b/xero_python/accounting/models/purchase_order.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/purchase_orders.py b/xero_python/accounting/models/purchase_orders.py index 155ac36b..403f1fa7 100644 --- a/xero_python/accounting/models/purchase_orders.py +++ b/xero_python/accounting/models/purchase_orders.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/quote.py b/xero_python/accounting/models/quote.py index 5967468d..2575e08b 100644 --- a/xero_python/accounting/models/quote.py +++ b/xero_python/accounting/models/quote.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/quote_line_amount_types.py b/xero_python/accounting/models/quote_line_amount_types.py index af0f94c5..684c2bb2 100644 --- a/xero_python/accounting/models/quote_line_amount_types.py +++ b/xero_python/accounting/models/quote_line_amount_types.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/quote_status_codes.py b/xero_python/accounting/models/quote_status_codes.py index 764bd184..162aac0d 100644 --- a/xero_python/accounting/models/quote_status_codes.py +++ b/xero_python/accounting/models/quote_status_codes.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/quotes.py b/xero_python/accounting/models/quotes.py index 9c2ea6b0..2152fe6b 100644 --- a/xero_python/accounting/models/quotes.py +++ b/xero_python/accounting/models/quotes.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/receipt.py b/xero_python/accounting/models/receipt.py index ffa54f40..a84a7d9d 100644 --- a/xero_python/accounting/models/receipt.py +++ b/xero_python/accounting/models/receipt.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/receipts.py b/xero_python/accounting/models/receipts.py index 7f8648ae..ee23e976 100644 --- a/xero_python/accounting/models/receipts.py +++ b/xero_python/accounting/models/receipts.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/repeating_invoice.py b/xero_python/accounting/models/repeating_invoice.py index d93dafd4..b5e8e5d9 100644 --- a/xero_python/accounting/models/repeating_invoice.py +++ b/xero_python/accounting/models/repeating_invoice.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/repeating_invoices.py b/xero_python/accounting/models/repeating_invoices.py index 10b68d10..d447e043 100644 --- a/xero_python/accounting/models/repeating_invoices.py +++ b/xero_python/accounting/models/repeating_invoices.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/report.py b/xero_python/accounting/models/report.py index c9f05add..c5c52e1e 100644 --- a/xero_python/accounting/models/report.py +++ b/xero_python/accounting/models/report.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/report_attribute.py b/xero_python/accounting/models/report_attribute.py index f50f295b..810c7ee1 100644 --- a/xero_python/accounting/models/report_attribute.py +++ b/xero_python/accounting/models/report_attribute.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/report_cell.py b/xero_python/accounting/models/report_cell.py index ec72fb09..32aafe1f 100644 --- a/xero_python/accounting/models/report_cell.py +++ b/xero_python/accounting/models/report_cell.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/report_fields.py b/xero_python/accounting/models/report_fields.py index 2463399d..7994dd16 100644 --- a/xero_python/accounting/models/report_fields.py +++ b/xero_python/accounting/models/report_fields.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/report_row.py b/xero_python/accounting/models/report_row.py index 6ed9c46b..a710c9d3 100644 --- a/xero_python/accounting/models/report_row.py +++ b/xero_python/accounting/models/report_row.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/report_rows.py b/xero_python/accounting/models/report_rows.py index 7f380598..f886bce9 100644 --- a/xero_python/accounting/models/report_rows.py +++ b/xero_python/accounting/models/report_rows.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/report_with_row.py b/xero_python/accounting/models/report_with_row.py index 1748be8b..75b35971 100644 --- a/xero_python/accounting/models/report_with_row.py +++ b/xero_python/accounting/models/report_with_row.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/report_with_rows.py b/xero_python/accounting/models/report_with_rows.py index e6dc7ee5..4d8e99b1 100644 --- a/xero_python/accounting/models/report_with_rows.py +++ b/xero_python/accounting/models/report_with_rows.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/reports.py b/xero_python/accounting/models/reports.py index 4c010cb1..babb6208 100644 --- a/xero_python/accounting/models/reports.py +++ b/xero_python/accounting/models/reports.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/request_empty.py b/xero_python/accounting/models/request_empty.py index 4a798562..37aef6e6 100644 --- a/xero_python/accounting/models/request_empty.py +++ b/xero_python/accounting/models/request_empty.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/row_type.py b/xero_python/accounting/models/row_type.py index b3983b68..0878b607 100644 --- a/xero_python/accounting/models/row_type.py +++ b/xero_python/accounting/models/row_type.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/sales_tracking_category.py b/xero_python/accounting/models/sales_tracking_category.py index a36a4dda..5004c299 100644 --- a/xero_python/accounting/models/sales_tracking_category.py +++ b/xero_python/accounting/models/sales_tracking_category.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/schedule.py b/xero_python/accounting/models/schedule.py index c7b5c12a..eee1f826 100644 --- a/xero_python/accounting/models/schedule.py +++ b/xero_python/accounting/models/schedule.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/tax_component.py b/xero_python/accounting/models/tax_component.py index d8d7aa54..6803aa64 100644 --- a/xero_python/accounting/models/tax_component.py +++ b/xero_python/accounting/models/tax_component.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/tax_rate.py b/xero_python/accounting/models/tax_rate.py index 159917ce..43172ab2 100644 --- a/xero_python/accounting/models/tax_rate.py +++ b/xero_python/accounting/models/tax_rate.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/tax_rates.py b/xero_python/accounting/models/tax_rates.py index 214d7d36..9a98877e 100644 --- a/xero_python/accounting/models/tax_rates.py +++ b/xero_python/accounting/models/tax_rates.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/tax_type.py b/xero_python/accounting/models/tax_type.py index 86ffe4ab..cf59f36a 100644 --- a/xero_python/accounting/models/tax_type.py +++ b/xero_python/accounting/models/tax_type.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/ten_nintey_nine_contact.py b/xero_python/accounting/models/ten_nintey_nine_contact.py index adc2151a..fb049e26 100644 --- a/xero_python/accounting/models/ten_nintey_nine_contact.py +++ b/xero_python/accounting/models/ten_nintey_nine_contact.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/time_zone.py b/xero_python/accounting/models/time_zone.py index 7f068a0b..01e5f8f9 100644 --- a/xero_python/accounting/models/time_zone.py +++ b/xero_python/accounting/models/time_zone.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/tracking_categories.py b/xero_python/accounting/models/tracking_categories.py index a21dbcad..f8cfffe0 100644 --- a/xero_python/accounting/models/tracking_categories.py +++ b/xero_python/accounting/models/tracking_categories.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/tracking_category.py b/xero_python/accounting/models/tracking_category.py index fee7a607..911aed2f 100644 --- a/xero_python/accounting/models/tracking_category.py +++ b/xero_python/accounting/models/tracking_category.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/tracking_option.py b/xero_python/accounting/models/tracking_option.py index 0cb9ca8b..9af6203d 100644 --- a/xero_python/accounting/models/tracking_option.py +++ b/xero_python/accounting/models/tracking_option.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/tracking_options.py b/xero_python/accounting/models/tracking_options.py index a2a2f80d..6e7f5df5 100644 --- a/xero_python/accounting/models/tracking_options.py +++ b/xero_python/accounting/models/tracking_options.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/user.py b/xero_python/accounting/models/user.py index 6232e604..5af45ca1 100644 --- a/xero_python/accounting/models/user.py +++ b/xero_python/accounting/models/user.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/users.py b/xero_python/accounting/models/users.py index 1bf7430e..167857b9 100644 --- a/xero_python/accounting/models/users.py +++ b/xero_python/accounting/models/users.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/validation_error.py b/xero_python/accounting/models/validation_error.py index e578e07f..88c294a8 100644 --- a/xero_python/accounting/models/validation_error.py +++ b/xero_python/accounting/models/validation_error.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/assets/__init__.py b/xero_python/assets/__init__.py new file mode 100644 index 00000000..6954abf0 --- /dev/null +++ b/xero_python/assets/__init__.py @@ -0,0 +1,36 @@ +# coding: utf-8 + +# flake8: noqa + +""" + Xero Assets API + + This is the Xero Assets API # noqa: E501 + + OpenAPI spec version: 2.2.5 + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +# import apis into sdk package +from xero_python.assets.api.asset_api import AssetApi + + +# import models into sdk package +from xero_python.assets.models.asset import Asset +from xero_python.assets.models.asset_status import AssetStatus +from xero_python.assets.models.asset_status_query_param import AssetStatusQueryParam +from xero_python.assets.models.asset_type import AssetType +from xero_python.assets.models.assets import Assets +from xero_python.assets.models.book_depreciation_detail import BookDepreciationDetail +from xero_python.assets.models.book_depreciation_setting import BookDepreciationSetting +from xero_python.assets.models.error import Error +from xero_python.assets.models.field_validation_errors_element import ( + FieldValidationErrorsElement, +) +from xero_python.assets.models.pagination import Pagination +from xero_python.assets.models.resource_validation_errors_element import ( + ResourceValidationErrorsElement, +) +from xero_python.assets.models.setting import Setting diff --git a/xero_python/assets/api/__init__.py b/xero_python/assets/api/__init__.py new file mode 100644 index 00000000..1c490274 --- /dev/null +++ b/xero_python/assets/api/__init__.py @@ -0,0 +1,4 @@ +# flake8: noqa + +# import apis into api package +from xero_python.assets.api.asset_api import AssetApi diff --git a/xero_python/assets/api/asset_api.py b/xero_python/assets/api/asset_api.py new file mode 100644 index 00000000..22ed9e95 --- /dev/null +++ b/xero_python/assets/api/asset_api.py @@ -0,0 +1,519 @@ +# coding: utf-8 + +""" + Xero Assets API + + This is the Xero Assets API # noqa: E501 + + OpenAPI spec version: 2.2.5 + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +import importlib +import re # noqa: F401 + +from xero_python import exceptions +from xero_python.api_client import ApiClient, ModelFinder + +try: + from .exception_handler import translate_status_exception +except ImportError: + translate_status_exception = exceptions.translate_status_exception + + +class empty: + """ empty object to mark optional parameter not set """ + + +class AssetApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + base_url = "https://api.xero.com/assets.xro/1.0" + models_module = importlib.import_module("xero_python.assets.models") + + def __init__(self, api_client=None, base_url=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.base_url = base_url or self.base_url + + def get_resource_url(self, resource_path): + """ + Combine API base url with resource specific path + :param str resource_path: API endpoint specific path + :return: str full resource path + """ + return self.base_url + resource_path + + def get_model_finder(self): + return ModelFinder(self.models_module) + + def create_asset( + self, + xero_tenant_id, + asset, + _return_http_data_only=True, + _preload_content=True, + _request_timeout=None, + ): + """adds a fixed asset # noqa: E501 + OAuth2 scope: assets + Adds an asset to the system # noqa: E501 + :param str xero_tenant_id: Xero identifier for Tenant (required) + :param Asset asset: Fixed asset you are creating (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: Asset + """ + + # 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_asset`" + ) + # verify the required parameter 'asset' is set + if asset is None: + raise ValueError( + "Missing the required parameter `asset` " "when calling `create_asset`" + ) + + collection_formats = {} + path_params = {} + + query_params = [] + + header_params = { + "Xero-Tenant-Id": xero_tenant_id, + } + + local_var_files = {} + form_params = [] + + body_params = asset + # 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("/Assets") + + 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="Asset", + 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_asset") + + def create_asset_type( + self, + xero_tenant_id, + asset_type=empty, + _return_http_data_only=True, + _preload_content=True, + _request_timeout=None, + ): + """adds a fixed asset type # noqa: E501 + OAuth2 scope: assets + Adds an fixed asset type to the system # noqa: E501 + :param str xero_tenant_id: Xero identifier for Tenant (required) + :param AssetType asset_type: Asset type to add + :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: AssetType + """ + + # 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_asset_type`" + ) + + collection_formats = {} + path_params = {} + + query_params = [] + + header_params = { + "Xero-Tenant-Id": xero_tenant_id, + } + + local_var_files = {} + form_params = [] + + body_params = asset_type + # 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("/AssetTypes") + + 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="AssetType", + 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_asset_type") + + def get_asset_by_id( + self, + xero_tenant_id, + id, + _return_http_data_only=True, + _preload_content=True, + _request_timeout=None, + ): + """retrieves fixed asset by id # noqa: E501 + OAuth2 scope: assets.read + By passing in the appropriate asset id, you can search for a specific fixed asset in the system # noqa: E501 + :param str xero_tenant_id: Xero identifier for Tenant (required) + :param str id: fixed asset 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: Asset + """ + + # 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_asset_by_id`" + ) + # verify the required parameter 'id' is set + if id is None: + raise ValueError( + "Missing the required parameter `id` " "when calling `get_asset_by_id`" + ) + + collection_formats = {} + path_params = { + "id": 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("/Assets/{id}") + + 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="Asset", + 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_asset_by_id") + + def get_asset_settings( + self, + xero_tenant_id, + _return_http_data_only=True, + _preload_content=True, + _request_timeout=None, + ): + """searches fixed asset settings # noqa: E501 + OAuth2 scope: assets.read + By passing in the appropriate options, you can search for available fixed asset types in the system # noqa: E501 + :param str xero_tenant_id: Xero identifier for Tenant (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: Setting + """ + + # 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_asset_settings`" + ) + + collection_formats = {} + path_params = {} + + 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("/Settings") + + 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="Setting", + 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_asset_settings") + + def get_asset_types( + self, + xero_tenant_id, + _return_http_data_only=True, + _preload_content=True, + _request_timeout=None, + ): + """searches fixed asset types # noqa: E501 + OAuth2 scope: assets.read + By passing in the appropriate options, you can search for available fixed asset types in the system # noqa: E501 + :param str xero_tenant_id: Xero identifier for Tenant (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: list[AssetType] + """ + + # 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_asset_types`" + ) + + collection_formats = {} + path_params = {} + + 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("/AssetTypes") + + 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="list[AssetType]", + 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_asset_types") + + def get_assets( + self, + xero_tenant_id, + status, + page=empty, + page_size=empty, + order_by=empty, + sort_direction=empty, + filter_by=empty, + _return_http_data_only=True, + _preload_content=True, + _request_timeout=None, + ): + """searches fixed asset # noqa: E501 + OAuth2 scope: assets.read + By passing in the appropriate options, you can search for available fixed asset in the system # noqa: E501 + :param str xero_tenant_id: Xero identifier for Tenant (required) + :param AssetStatusQueryParam status: Required when retrieving a collection of assets. See Asset Status Codes (required) + :param int page: Results are paged. This specifies which page of the results to return. The default page is 1. + :param int page_size: The number of records returned per page. By default the number of records returned is 10. + :param str order_by: Requests can be ordered by AssetType, AssetName, AssetNumber, PurchaseDate and PurchasePrice. If the asset status is DISPOSED it also allows DisposalDate and DisposalPrice. + :param str sort_direction: ASC or DESC + :param str filter_by: A string that can be used to filter the list to only return assets containing the text. Checks it against the AssetName, AssetNumber, Description and AssetTypeName fields. + :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: Assets + """ + + # 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_assets`" + ) + # verify the required parameter 'status' is set + if status is None: + raise ValueError( + "Missing the required parameter `status` " "when calling `get_assets`" + ) + + collection_formats = {} + path_params = {} + + query_params = [ + ("status", status), + ] + + if page is not empty: + query_params.append(("page", page)) + + if page_size is not empty: + query_params.append(("pageSize", page_size)) + + if order_by is not empty: + query_params.append(("orderBy", order_by)) + + if sort_direction is not empty: + query_params.append(("sortDirection", sort_direction)) + + if filter_by is not empty: + query_params.append(("filterBy", filter_by)) + + 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("/Assets") + + 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="Assets", + 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_assets") diff --git a/xero_python/assets/docs/Asset.md b/xero_python/assets/docs/Asset.md new file mode 100644 index 00000000..72ddb757 --- /dev/null +++ b/xero_python/assets/docs/Asset.md @@ -0,0 +1,24 @@ +# Asset + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset_id** | **str** | The Xero-generated Id for the asset | [optional] +**asset_name** | **str** | The name of the asset | +**asset_type_id** | **str** | The Xero-generated Id for the asset type | [optional] +**asset_number** | **str** | Must be unique. | [optional] +**purchase_date** | **date** | The date the asset was purchased YYYY-MM-DD | [optional] +**purchase_price** | **float** | The purchase price of the asset | [optional] +**disposal_price** | **float** | The price the asset was disposed at | [optional] +**asset_status** | [**AssetStatus**](AssetStatus.md) | | [optional] +**warranty_expiry_date** | **str** | The date the asset’s warranty expires (if needed) YYYY-MM-DD | [optional] +**serial_number** | **str** | The asset's serial number | [optional] +**book_depreciation_setting** | [**BookDepreciationSetting**](BookDepreciationSetting.md) | | [optional] +**book_depreciation_detail** | [**BookDepreciationDetail**](BookDepreciationDetail.md) | | [optional] +**can_rollback** | **bool** | Boolean to indicate whether depreciation can be rolled back for this asset individually. This is true if it doesn't have 'legacy' journal entries and if there is no lock period that would prevent this asset from rolling back. | [optional] +**accounting_book_value** | **float** | The accounting value of the asset | [optional] +**is_delete_enabled_for_date** | **bool** | Boolean to indicate whether delete is enabled | [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/assets/docs/AssetApi.md b/xero_python/assets/docs/AssetApi.md new file mode 100644 index 00000000..6d49600d --- /dev/null +++ b/xero_python/assets/docs/AssetApi.md @@ -0,0 +1,410 @@ +# xero_python.assets.AssetApi + +All URIs are relative to *https://api.xero.com/assets.xro/1.0* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_asset**](AssetApi.md#create_asset) | **POST** /Assets | adds a fixed asset +[**create_asset_type**](AssetApi.md#create_asset_type) | **POST** /AssetTypes | adds a fixed asset type +[**get_asset_by_id**](AssetApi.md#get_asset_by_id) | **GET** /Assets/{id} | retrieves fixed asset by id +[**get_asset_settings**](AssetApi.md#get_asset_settings) | **GET** /Settings | searches fixed asset settings +[**get_asset_types**](AssetApi.md#get_asset_types) | **GET** /AssetTypes | searches fixed asset types +[**get_assets**](AssetApi.md#get_assets) | **GET** /Assets | searches fixed asset + + +# **create_asset** +> Asset create_asset(xero_tenant_id, asset) + +adds a fixed asset + +Adds an asset to the system + +### 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.assets import AssetApi +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 = AssetApi(api_client) + +xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant +asset = { "assetName":"Computer74863", "assetNumber":"123477544", "purchaseDate":"2020-01-01", "purchasePrice":100.0, "disposalPrice":23.23, "assetStatus":"Draft", "bookDepreciationSetting":{ "depreciationMethod":"StraightLine", "averagingMethod":"ActualDays", "depreciationRate":0.5, "depreciationCalculationMethod":"None" }, "bookDepreciationDetail":{ "currentCapitalGain":5.32, "currentGainLoss":3.88, "depreciationStartDate":"2020-01-02", "costLimit":100.0, "currentAccumDepreciationAmount":2.25 }, "AccountingBookValue":99.5 } # Asset | Fixed asset you are creating +try: + # adds a fixed asset + api_response = api_instance.create_asset(xero_tenant_id, asset) + pprint(api_response) +except ApiException as e: + print("Exception when calling AssetApi->create_asset: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xero_tenant_id** | **str**| Xero identifier for Tenant | + **asset** | [**Asset**](Asset.md)| Fixed asset you are creating | + +### Return type + +[**Asset**](Asset.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_asset_type** +> AssetType create_asset_type(xero_tenant_id, asset_type=asset_type) + +adds a fixed asset type + +Adds an fixed asset type to the system + +### 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.assets import AssetApi +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 = AssetApi(api_client) + +xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant +asset_type = { "assetTypeName":"Machinery11004", "fixedAssetAccountId":"3d8d063a-c148-4bb8-8b3c-a5e2ad3b1e82", "depreciationExpenseAccountId":"d1602f69-f900-4616-8d34-90af393fa368", "accumulatedDepreciationAccountId":"9195cadd-8645-41e6-9f67-7bcd421defe8", "bookDepreciationSetting":{ "depreciationMethod":"DiminishingValue100", "averagingMethod":"ActualDays", "depreciationRate":0.05, "depreciationCalculationMethod":"None" } } # AssetType | Asset type to add (optional) +try: + # adds a fixed asset type + api_response = api_instance.create_asset_type(xero_tenant_id, asset_type=asset_type) + pprint(api_response) +except ApiException as e: + print("Exception when calling AssetApi->create_asset_type: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xero_tenant_id** | **str**| Xero identifier for Tenant | + **asset_type** | [**AssetType**](AssetType.md)| Asset type to add | [optional] + +### Return type + +[**AssetType**](AssetType.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) + +# **get_asset_by_id** +> Asset get_asset_by_id(xero_tenant_id, id) + +retrieves fixed asset by id + +By passing in the appropriate asset id, you can search for a specific fixed asset in the system + +### 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.assets import AssetApi +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 = AssetApi(api_client) + +xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant +id = '4f7bcdcb-5ec1-4258-9558-19f662fccdfe' # str | fixed asset id for single object +try: + # retrieves fixed asset by id + api_response = api_instance.get_asset_by_id(xero_tenant_id, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling AssetApi->get_asset_by_id: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xero_tenant_id** | **str**| Xero identifier for Tenant | + **id** | [**str**](.md)| fixed asset id for single object | + +### Return type + +[**Asset**](Asset.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_asset_settings** +> Setting get_asset_settings(xero_tenant_id) + +searches fixed asset settings + +By passing in the appropriate options, you can search for available fixed asset types in the system + +### 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.assets import AssetApi +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 = AssetApi(api_client) + +xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant +try: + # searches fixed asset settings + api_response = api_instance.get_asset_settings(xero_tenant_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling AssetApi->get_asset_settings: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xero_tenant_id** | **str**| Xero identifier for Tenant | + +### Return type + +[**Setting**](Setting.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_asset_types** +> list[AssetType] get_asset_types(xero_tenant_id) + +searches fixed asset types + +By passing in the appropriate options, you can search for available fixed asset types in the system + +### 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.assets import AssetApi +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 = AssetApi(api_client) + +xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant +try: + # searches fixed asset types + api_response = api_instance.get_asset_types(xero_tenant_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling AssetApi->get_asset_types: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xero_tenant_id** | **str**| Xero identifier for Tenant | + +### Return type + +[**list[AssetType]**](AssetType.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_assets** +> Assets get_assets(xero_tenant_id, status, page=page, page_size=page_size, order_by=order_by, sort_direction=sort_direction, filter_by=filter_by) + +searches fixed asset + +By passing in the appropriate options, you can search for available fixed asset in the system + +### 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.assets import AssetApi +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 = AssetApi(api_client) + +xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant +status = xero_python.assets.AssetStatusQueryParam() # AssetStatusQueryParam | Required when retrieving a collection of assets. See Asset Status Codes +page = 1 # int | Results are paged. This specifies which page of the results to return. The default page is 1. (optional) +page_size = 5 # int | The number of records returned per page. By default the number of records returned is 10. (optional) +order_by = 'AssetName' # str | Requests can be ordered by AssetType, AssetName, AssetNumber, PurchaseDate and PurchasePrice. If the asset status is DISPOSED it also allows DisposalDate and DisposalPrice. (optional) +sort_direction = 'ASC' # str | ASC or DESC (optional) +filter_by = 'Draft' # str | A string that can be used to filter the list to only return assets containing the text. Checks it against the AssetName, AssetNumber, Description and AssetTypeName fields. (optional) +try: + # searches fixed asset + api_response = api_instance.get_assets(xero_tenant_id, status, page=page, page_size=page_size, order_by=order_by, sort_direction=sort_direction, filter_by=filter_by) + pprint(api_response) +except ApiException as e: + print("Exception when calling AssetApi->get_assets: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xero_tenant_id** | **str**| Xero identifier for Tenant | + **status** | [**AssetStatusQueryParam**](.md)| Required when retrieving a collection of assets. See Asset Status Codes | + **page** | **int**| Results are paged. This specifies which page of the results to return. The default page is 1. | [optional] + **page_size** | **int**| The number of records returned per page. By default the number of records returned is 10. | [optional] + **order_by** | **str**| Requests can be ordered by AssetType, AssetName, AssetNumber, PurchaseDate and PurchasePrice. If the asset status is DISPOSED it also allows DisposalDate and DisposalPrice. | [optional] + **sort_direction** | **str**| ASC or DESC | [optional] + **filter_by** | **str**| A string that can be used to filter the list to only return assets containing the text. Checks it against the AssetName, AssetNumber, Description and AssetTypeName fields. | [optional] + +### Return type + +[**Assets**](Assets.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) + diff --git a/xero_python/assets/docs/AssetStatus.md b/xero_python/assets/docs/AssetStatus.md new file mode 100644 index 00000000..06d1782f --- /dev/null +++ b/xero_python/assets/docs/AssetStatus.md @@ -0,0 +1,9 @@ +# AssetStatus + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/assets/docs/AssetStatusQueryParam.md b/xero_python/assets/docs/AssetStatusQueryParam.md new file mode 100644 index 00000000..e97cfdc0 --- /dev/null +++ b/xero_python/assets/docs/AssetStatusQueryParam.md @@ -0,0 +1,9 @@ +# AssetStatusQueryParam + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/assets/docs/AssetType.md b/xero_python/assets/docs/AssetType.md new file mode 100644 index 00000000..9d80c546 --- /dev/null +++ b/xero_python/assets/docs/AssetType.md @@ -0,0 +1,16 @@ +# AssetType + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset_type_id** | **str** | Xero generated unique identifier for asset types | +**asset_type_name** | **str** | The name of the asset type | +**fixed_asset_account_id** | **str** | The asset account for fixed assets of this type | [optional] +**depreciation_expense_account_id** | **str** | The expense account for the depreciation of fixed assets of this type | [optional] +**accumulated_depreciation_account_id** | **str** | The account for accumulated depreciation of fixed assets of this type | [optional] +**book_depreciation_setting** | [**BookDepreciationSetting**](BookDepreciationSetting.md) | | +**locks** | **int** | All asset types that have accumulated depreciation for any assets that use them are deemed ‘locked’ and cannot be removed. | [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/assets/docs/Assets.md b/xero_python/assets/docs/Assets.md new file mode 100644 index 00000000..7fbabe12 --- /dev/null +++ b/xero_python/assets/docs/Assets.md @@ -0,0 +1,11 @@ +# Assets + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**Pagination**](Pagination.md) | | [optional] +**items** | [**list[Asset]**](Asset.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/xero_python/assets/docs/BookDepreciationDetail.md b/xero_python/assets/docs/BookDepreciationDetail.md new file mode 100644 index 00000000..73e3a6f0 --- /dev/null +++ b/xero_python/assets/docs/BookDepreciationDetail.md @@ -0,0 +1,16 @@ +# BookDepreciationDetail + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**current_capital_gain** | **float** | When an asset is disposed, this will be the sell price minus the purchase price if a profit was made. | [optional] +**current_gain_loss** | **float** | When an asset is disposed, this will be the lowest one of sell price or purchase price, minus the current book value. | [optional] +**depreciation_start_date** | **date** | YYYY-MM-DD | [optional] +**cost_limit** | **float** | The value of the asset you want to depreciate, if this is less than the cost of the asset. | [optional] +**residual_value** | **float** | The value of the asset remaining when you've fully depreciated it. | [optional] +**prior_accum_depreciation_amount** | **float** | All depreciation prior to the current financial year. | [optional] +**current_accum_depreciation_amount** | **float** | All depreciation occurring in the current financial year. | [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/assets/docs/BookDepreciationSetting.md b/xero_python/assets/docs/BookDepreciationSetting.md new file mode 100644 index 00000000..12532661 --- /dev/null +++ b/xero_python/assets/docs/BookDepreciationSetting.md @@ -0,0 +1,17 @@ +# BookDepreciationSetting + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**depreciation_method** | **str** | The method of depreciation applied to this asset. See Depreciation Methods | [optional] +**averaging_method** | **str** | The method of averaging applied to this asset. See Averaging Methods | [optional] +**depreciation_rate** | **float** | The rate of depreciation (e.g. 0.05) | [optional] +**effective_life_years** | **int** | Effective life of the asset in years (e.g. 5) | [optional] +**depreciation_calculation_method** | **str** | See Depreciation Calculation Methods | [optional] +**depreciable_object_id** | **str** | Unique Xero identifier for the depreciable object | [optional] +**depreciable_object_type** | **str** | The type of asset object | [optional] +**book_effective_date_of_change_id** | **str** | Unique Xero identifier for the effective date change | [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/assets/docs/Error.md b/xero_python/assets/docs/Error.md new file mode 100644 index 00000000..30fbd1c8 --- /dev/null +++ b/xero_python/assets/docs/Error.md @@ -0,0 +1,14 @@ +# Error + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resource_validation_errors** | [**list[ResourceValidationErrorsElement]**](ResourceValidationErrorsElement.md) | Array of elements of resource validation errors | [optional] +**field_validation_errors** | [**list[FieldValidationErrorsElement]**](FieldValidationErrorsElement.md) | Array of elements of field validation errors | [optional] +**type** | **str** | The internal type of error, not accessible externally | [optional] +**title** | **str** | Title of the error | [optional] +**detail** | **str** | Detail of the error | [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/assets/docs/FieldValidationErrorsElement.md b/xero_python/assets/docs/FieldValidationErrorsElement.md new file mode 100644 index 00000000..58a16685 --- /dev/null +++ b/xero_python/assets/docs/FieldValidationErrorsElement.md @@ -0,0 +1,15 @@ +# FieldValidationErrorsElement + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**field_name** | **str** | The field name of the erroneous field | [optional] +**value_provided** | **str** | The provided value | [optional] +**localised_message** | **str** | Explaination of the field validation error | [optional] +**type** | **str** | Internal type of the field validation error message | [optional] +**title** | **str** | Title of the field validation error | [optional] +**detail** | **str** | Detail of the field validation error | [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/assets/docs/Pagination.md b/xero_python/assets/docs/Pagination.md new file mode 100644 index 00000000..7d4aa488 --- /dev/null +++ b/xero_python/assets/docs/Pagination.md @@ -0,0 +1,13 @@ +# Pagination + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**page** | **int** | | [optional] +**page_size** | **int** | | [optional] +**page_count** | **int** | | [optional] +**item_count** | **int** | | [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/assets/docs/ResourceValidationErrorsElement.md b/xero_python/assets/docs/ResourceValidationErrorsElement.md new file mode 100644 index 00000000..2b95e6e0 --- /dev/null +++ b/xero_python/assets/docs/ResourceValidationErrorsElement.md @@ -0,0 +1,14 @@ +# ResourceValidationErrorsElement + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resource_name** | **str** | The field name of the erroneous field | [optional] +**localised_message** | **str** | Explaination of the resource validation error | [optional] +**type** | **str** | Internal type of the resource error message | [optional] +**title** | **str** | Title of the resource validation error | [optional] +**detail** | **str** | Detail of the resource validation error | [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/assets/docs/Setting.md b/xero_python/assets/docs/Setting.md new file mode 100644 index 00000000..e3d44697 --- /dev/null +++ b/xero_python/assets/docs/Setting.md @@ -0,0 +1,17 @@ +# Setting + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset_number_prefix** | **str** | The prefix used for fixed asset numbers (“FA-” by default) | [optional] +**asset_number_sequence** | **str** | The next available sequence number | [optional] +**asset_start_date** | **date** | The date depreciation calculations started on registered fixed assets in Xero | [optional] +**last_depreciation_date** | **date** | The last depreciation date | [optional] +**default_gain_on_disposal_account_id** | **str** | Default account that gains are posted to | [optional] +**default_loss_on_disposal_account_id** | **str** | Default account that losses are posted to | [optional] +**default_capital_gain_on_disposal_account_id** | **str** | Default account that capital gains are posted to | [optional] +**opt_in_for_tax** | **bool** | opt in for tax calculation | [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/assets/models/__init__.py b/xero_python/assets/models/__init__.py new file mode 100644 index 00000000..05be850d --- /dev/null +++ b/xero_python/assets/models/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +# flake8: noqa +""" + Xero Assets API + + This is the Xero Assets API # noqa: E501 + + OpenAPI spec version: 2.2.5 + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +# import models into model package +from xero_python.assets.models.asset import Asset +from xero_python.assets.models.asset_status import AssetStatus +from xero_python.assets.models.asset_status_query_param import AssetStatusQueryParam +from xero_python.assets.models.asset_type import AssetType +from xero_python.assets.models.assets import Assets +from xero_python.assets.models.book_depreciation_detail import BookDepreciationDetail +from xero_python.assets.models.book_depreciation_setting import BookDepreciationSetting +from xero_python.assets.models.error import Error +from xero_python.assets.models.field_validation_errors_element import ( + FieldValidationErrorsElement, +) +from xero_python.assets.models.pagination import Pagination +from xero_python.assets.models.resource_validation_errors_element import ( + ResourceValidationErrorsElement, +) +from xero_python.assets.models.setting import Setting diff --git a/xero_python/assets/models/asset.py b/xero_python/assets/models/asset.py new file mode 100644 index 00000000..97950c62 --- /dev/null +++ b/xero_python/assets/models/asset.py @@ -0,0 +1,477 @@ +# coding: utf-8 + +""" + Xero Assets API + + This is the Xero Assets API # noqa: E501 + + OpenAPI spec version: 2.2.5 + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 + +from xero_python.models import BaseModel + + +class Asset(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 = { + "asset_id": "str", + "asset_name": "str", + "asset_type_id": "str", + "asset_number": "str", + "purchase_date": "date", + "purchase_price": "float", + "disposal_price": "float", + "asset_status": "AssetStatus", + "warranty_expiry_date": "str", + "serial_number": "str", + "book_depreciation_setting": "BookDepreciationSetting", + "book_depreciation_detail": "BookDepreciationDetail", + "can_rollback": "bool", + "accounting_book_value": "float", + "is_delete_enabled_for_date": "bool", + } + + attribute_map = { + "asset_id": "assetId", + "asset_name": "assetName", + "asset_type_id": "assetTypeId", + "asset_number": "assetNumber", + "purchase_date": "purchaseDate", + "purchase_price": "purchasePrice", + "disposal_price": "disposalPrice", + "asset_status": "assetStatus", + "warranty_expiry_date": "warrantyExpiryDate", + "serial_number": "serialNumber", + "book_depreciation_setting": "bookDepreciationSetting", + "book_depreciation_detail": "bookDepreciationDetail", + "can_rollback": "canRollback", + "accounting_book_value": "accountingBookValue", + "is_delete_enabled_for_date": "isDeleteEnabledForDate", + } + + def __init__( + self, + asset_id=None, + asset_name=None, + asset_type_id=None, + asset_number=None, + purchase_date=None, + purchase_price=None, + disposal_price=None, + asset_status=None, + warranty_expiry_date=None, + serial_number=None, + book_depreciation_setting=None, + book_depreciation_detail=None, + can_rollback=None, + accounting_book_value=None, + is_delete_enabled_for_date=None, + ): # noqa: E501 + """Asset - a model defined in OpenAPI""" # noqa: E501 + + self._asset_id = None + self._asset_name = None + self._asset_type_id = None + self._asset_number = None + self._purchase_date = None + self._purchase_price = None + self._disposal_price = None + self._asset_status = None + self._warranty_expiry_date = None + self._serial_number = None + self._book_depreciation_setting = None + self._book_depreciation_detail = None + self._can_rollback = None + self._accounting_book_value = None + self._is_delete_enabled_for_date = None + self.discriminator = None + + if asset_id is not None: + self.asset_id = asset_id + self.asset_name = asset_name + if asset_type_id is not None: + self.asset_type_id = asset_type_id + if asset_number is not None: + self.asset_number = asset_number + if purchase_date is not None: + self.purchase_date = purchase_date + if purchase_price is not None: + self.purchase_price = purchase_price + if disposal_price is not None: + self.disposal_price = disposal_price + if asset_status is not None: + self.asset_status = asset_status + if warranty_expiry_date is not None: + self.warranty_expiry_date = warranty_expiry_date + if serial_number is not None: + self.serial_number = serial_number + if book_depreciation_setting is not None: + self.book_depreciation_setting = book_depreciation_setting + if book_depreciation_detail is not None: + self.book_depreciation_detail = book_depreciation_detail + if can_rollback is not None: + self.can_rollback = can_rollback + if accounting_book_value is not None: + self.accounting_book_value = accounting_book_value + if is_delete_enabled_for_date is not None: + self.is_delete_enabled_for_date = is_delete_enabled_for_date + + @property + def asset_id(self): + """Gets the asset_id of this Asset. # noqa: E501 + + The Xero-generated Id for the asset # noqa: E501 + + :return: The asset_id of this Asset. # noqa: E501 + :rtype: str + """ + return self._asset_id + + @asset_id.setter + def asset_id(self, asset_id): + """Sets the asset_id of this Asset. + + The Xero-generated Id for the asset # noqa: E501 + + :param asset_id: The asset_id of this Asset. # noqa: E501 + :type: str + """ + + self._asset_id = asset_id + + @property + def asset_name(self): + """Gets the asset_name of this Asset. # noqa: E501 + + The name of the asset # noqa: E501 + + :return: The asset_name of this Asset. # noqa: E501 + :rtype: str + """ + return self._asset_name + + @asset_name.setter + def asset_name(self, asset_name): + """Sets the asset_name of this Asset. + + The name of the asset # noqa: E501 + + :param asset_name: The asset_name of this Asset. # noqa: E501 + :type: str + """ + if asset_name is None: + raise ValueError( + "Invalid value for `asset_name`, must not be `None`" + ) # noqa: E501 + + self._asset_name = asset_name + + @property + def asset_type_id(self): + """Gets the asset_type_id of this Asset. # noqa: E501 + + The Xero-generated Id for the asset type # noqa: E501 + + :return: The asset_type_id of this Asset. # noqa: E501 + :rtype: str + """ + return self._asset_type_id + + @asset_type_id.setter + def asset_type_id(self, asset_type_id): + """Sets the asset_type_id of this Asset. + + The Xero-generated Id for the asset type # noqa: E501 + + :param asset_type_id: The asset_type_id of this Asset. # noqa: E501 + :type: str + """ + + self._asset_type_id = asset_type_id + + @property + def asset_number(self): + """Gets the asset_number of this Asset. # noqa: E501 + + Must be unique. # noqa: E501 + + :return: The asset_number of this Asset. # noqa: E501 + :rtype: str + """ + return self._asset_number + + @asset_number.setter + def asset_number(self, asset_number): + """Sets the asset_number of this Asset. + + Must be unique. # noqa: E501 + + :param asset_number: The asset_number of this Asset. # noqa: E501 + :type: str + """ + + self._asset_number = asset_number + + @property + def purchase_date(self): + """Gets the purchase_date of this Asset. # noqa: E501 + + The date the asset was purchased YYYY-MM-DD # noqa: E501 + + :return: The purchase_date of this Asset. # noqa: E501 + :rtype: date + """ + return self._purchase_date + + @purchase_date.setter + def purchase_date(self, purchase_date): + """Sets the purchase_date of this Asset. + + The date the asset was purchased YYYY-MM-DD # noqa: E501 + + :param purchase_date: The purchase_date of this Asset. # noqa: E501 + :type: date + """ + + self._purchase_date = purchase_date + + @property + def purchase_price(self): + """Gets the purchase_price of this Asset. # noqa: E501 + + The purchase price of the asset # noqa: E501 + + :return: The purchase_price of this Asset. # noqa: E501 + :rtype: float + """ + return self._purchase_price + + @purchase_price.setter + def purchase_price(self, purchase_price): + """Sets the purchase_price of this Asset. + + The purchase price of the asset # noqa: E501 + + :param purchase_price: The purchase_price of this Asset. # noqa: E501 + :type: float + """ + + self._purchase_price = purchase_price + + @property + def disposal_price(self): + """Gets the disposal_price of this Asset. # noqa: E501 + + The price the asset was disposed at # noqa: E501 + + :return: The disposal_price of this Asset. # noqa: E501 + :rtype: float + """ + return self._disposal_price + + @disposal_price.setter + def disposal_price(self, disposal_price): + """Sets the disposal_price of this Asset. + + The price the asset was disposed at # noqa: E501 + + :param disposal_price: The disposal_price of this Asset. # noqa: E501 + :type: float + """ + + self._disposal_price = disposal_price + + @property + def asset_status(self): + """Gets the asset_status of this Asset. # noqa: E501 + + + :return: The asset_status of this Asset. # noqa: E501 + :rtype: AssetStatus + """ + return self._asset_status + + @asset_status.setter + def asset_status(self, asset_status): + """Sets the asset_status of this Asset. + + + :param asset_status: The asset_status of this Asset. # noqa: E501 + :type: AssetStatus + """ + + self._asset_status = asset_status + + @property + def warranty_expiry_date(self): + """Gets the warranty_expiry_date of this Asset. # noqa: E501 + + The date the asset’s warranty expires (if needed) YYYY-MM-DD # noqa: E501 + + :return: The warranty_expiry_date of this Asset. # noqa: E501 + :rtype: str + """ + return self._warranty_expiry_date + + @warranty_expiry_date.setter + def warranty_expiry_date(self, warranty_expiry_date): + """Sets the warranty_expiry_date of this Asset. + + The date the asset’s warranty expires (if needed) YYYY-MM-DD # noqa: E501 + + :param warranty_expiry_date: The warranty_expiry_date of this Asset. # noqa: E501 + :type: str + """ + + self._warranty_expiry_date = warranty_expiry_date + + @property + def serial_number(self): + """Gets the serial_number of this Asset. # noqa: E501 + + The asset's serial number # noqa: E501 + + :return: The serial_number of this Asset. # noqa: E501 + :rtype: str + """ + return self._serial_number + + @serial_number.setter + def serial_number(self, serial_number): + """Sets the serial_number of this Asset. + + The asset's serial number # noqa: E501 + + :param serial_number: The serial_number of this Asset. # noqa: E501 + :type: str + """ + + self._serial_number = serial_number + + @property + def book_depreciation_setting(self): + """Gets the book_depreciation_setting of this Asset. # noqa: E501 + + + :return: The book_depreciation_setting of this Asset. # noqa: E501 + :rtype: BookDepreciationSetting + """ + return self._book_depreciation_setting + + @book_depreciation_setting.setter + def book_depreciation_setting(self, book_depreciation_setting): + """Sets the book_depreciation_setting of this Asset. + + + :param book_depreciation_setting: The book_depreciation_setting of this Asset. # noqa: E501 + :type: BookDepreciationSetting + """ + + self._book_depreciation_setting = book_depreciation_setting + + @property + def book_depreciation_detail(self): + """Gets the book_depreciation_detail of this Asset. # noqa: E501 + + + :return: The book_depreciation_detail of this Asset. # noqa: E501 + :rtype: BookDepreciationDetail + """ + return self._book_depreciation_detail + + @book_depreciation_detail.setter + def book_depreciation_detail(self, book_depreciation_detail): + """Sets the book_depreciation_detail of this Asset. + + + :param book_depreciation_detail: The book_depreciation_detail of this Asset. # noqa: E501 + :type: BookDepreciationDetail + """ + + self._book_depreciation_detail = book_depreciation_detail + + @property + def can_rollback(self): + """Gets the can_rollback of this Asset. # noqa: E501 + + Boolean to indicate whether depreciation can be rolled back for this asset individually. This is true if it doesn't have 'legacy' journal entries and if there is no lock period that would prevent this asset from rolling back. # noqa: E501 + + :return: The can_rollback of this Asset. # noqa: E501 + :rtype: bool + """ + return self._can_rollback + + @can_rollback.setter + def can_rollback(self, can_rollback): + """Sets the can_rollback of this Asset. + + Boolean to indicate whether depreciation can be rolled back for this asset individually. This is true if it doesn't have 'legacy' journal entries and if there is no lock period that would prevent this asset from rolling back. # noqa: E501 + + :param can_rollback: The can_rollback of this Asset. # noqa: E501 + :type: bool + """ + + self._can_rollback = can_rollback + + @property + def accounting_book_value(self): + """Gets the accounting_book_value of this Asset. # noqa: E501 + + The accounting value of the asset # noqa: E501 + + :return: The accounting_book_value of this Asset. # noqa: E501 + :rtype: float + """ + return self._accounting_book_value + + @accounting_book_value.setter + def accounting_book_value(self, accounting_book_value): + """Sets the accounting_book_value of this Asset. + + The accounting value of the asset # noqa: E501 + + :param accounting_book_value: The accounting_book_value of this Asset. # noqa: E501 + :type: float + """ + + self._accounting_book_value = accounting_book_value + + @property + def is_delete_enabled_for_date(self): + """Gets the is_delete_enabled_for_date of this Asset. # noqa: E501 + + Boolean to indicate whether delete is enabled # noqa: E501 + + :return: The is_delete_enabled_for_date of this Asset. # noqa: E501 + :rtype: bool + """ + return self._is_delete_enabled_for_date + + @is_delete_enabled_for_date.setter + def is_delete_enabled_for_date(self, is_delete_enabled_for_date): + """Sets the is_delete_enabled_for_date of this Asset. + + Boolean to indicate whether delete is enabled # noqa: E501 + + :param is_delete_enabled_for_date: The is_delete_enabled_for_date of this Asset. # noqa: E501 + :type: bool + """ + + self._is_delete_enabled_for_date = is_delete_enabled_for_date diff --git a/xero_python/assets/models/asset_status.py b/xero_python/assets/models/asset_status.py new file mode 100644 index 00000000..5fd34513 --- /dev/null +++ b/xero_python/assets/models/asset_status.py @@ -0,0 +1,30 @@ +# coding: utf-8 + +""" + Xero Assets API + + This is the Xero Assets API # noqa: E501 + + OpenAPI spec version: 2.2.5 + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 + +from enum import Enum + + +class AssetStatus(Enum): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + allowed enum values + """ + + DRAFT = "Draft" + REGISTERED = "Registered" + DISPOSED = "Disposed" diff --git a/xero_python/assets/models/asset_status_query_param.py b/xero_python/assets/models/asset_status_query_param.py new file mode 100644 index 00000000..1e7e97f0 --- /dev/null +++ b/xero_python/assets/models/asset_status_query_param.py @@ -0,0 +1,30 @@ +# coding: utf-8 + +""" + Xero Assets API + + This is the Xero Assets API # noqa: E501 + + OpenAPI spec version: 2.2.5 + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 + +from enum import Enum + + +class AssetStatusQueryParam(Enum): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + allowed enum values + """ + + DRAFT = "DRAFT" + REGISTERED = "REGISTERED" + DISPOSED = "DISPOSED" diff --git a/xero_python/assets/models/asset_type.py b/xero_python/assets/models/asset_type.py new file mode 100644 index 00000000..6e7e8d8a --- /dev/null +++ b/xero_python/assets/models/asset_type.py @@ -0,0 +1,257 @@ +# coding: utf-8 + +""" + Xero Assets API + + This is the Xero Assets API # noqa: E501 + + OpenAPI spec version: 2.2.5 + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 + +from xero_python.models import BaseModel + + +class AssetType(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 = { + "asset_type_id": "str", + "asset_type_name": "str", + "fixed_asset_account_id": "str", + "depreciation_expense_account_id": "str", + "accumulated_depreciation_account_id": "str", + "book_depreciation_setting": "BookDepreciationSetting", + "locks": "int", + } + + attribute_map = { + "asset_type_id": "assetTypeId", + "asset_type_name": "assetTypeName", + "fixed_asset_account_id": "fixedAssetAccountId", + "depreciation_expense_account_id": "depreciationExpenseAccountId", + "accumulated_depreciation_account_id": "accumulatedDepreciationAccountId", + "book_depreciation_setting": "bookDepreciationSetting", + "locks": "locks", + } + + def __init__( + self, + asset_type_id=None, + asset_type_name=None, + fixed_asset_account_id=None, + depreciation_expense_account_id=None, + accumulated_depreciation_account_id=None, + book_depreciation_setting=None, + locks=None, + ): # noqa: E501 + """AssetType - a model defined in OpenAPI""" # noqa: E501 + + self._asset_type_id = None + self._asset_type_name = None + self._fixed_asset_account_id = None + self._depreciation_expense_account_id = None + self._accumulated_depreciation_account_id = None + self._book_depreciation_setting = None + self._locks = None + self.discriminator = None + + self.asset_type_id = asset_type_id + self.asset_type_name = asset_type_name + if fixed_asset_account_id is not None: + self.fixed_asset_account_id = fixed_asset_account_id + if depreciation_expense_account_id is not None: + self.depreciation_expense_account_id = depreciation_expense_account_id + if accumulated_depreciation_account_id is not None: + self.accumulated_depreciation_account_id = ( + accumulated_depreciation_account_id + ) + self.book_depreciation_setting = book_depreciation_setting + if locks is not None: + self.locks = locks + + @property + def asset_type_id(self): + """Gets the asset_type_id of this AssetType. # noqa: E501 + + Xero generated unique identifier for asset types # noqa: E501 + + :return: The asset_type_id of this AssetType. # noqa: E501 + :rtype: str + """ + return self._asset_type_id + + @asset_type_id.setter + def asset_type_id(self, asset_type_id): + """Sets the asset_type_id of this AssetType. + + Xero generated unique identifier for asset types # noqa: E501 + + :param asset_type_id: The asset_type_id of this AssetType. # noqa: E501 + :type: str + """ + if asset_type_id is None: + raise ValueError( + "Invalid value for `asset_type_id`, must not be `None`" + ) # noqa: E501 + + self._asset_type_id = asset_type_id + + @property + def asset_type_name(self): + """Gets the asset_type_name of this AssetType. # noqa: E501 + + The name of the asset type # noqa: E501 + + :return: The asset_type_name of this AssetType. # noqa: E501 + :rtype: str + """ + return self._asset_type_name + + @asset_type_name.setter + def asset_type_name(self, asset_type_name): + """Sets the asset_type_name of this AssetType. + + The name of the asset type # noqa: E501 + + :param asset_type_name: The asset_type_name of this AssetType. # noqa: E501 + :type: str + """ + if asset_type_name is None: + raise ValueError( + "Invalid value for `asset_type_name`, must not be `None`" + ) # noqa: E501 + + self._asset_type_name = asset_type_name + + @property + def fixed_asset_account_id(self): + """Gets the fixed_asset_account_id of this AssetType. # noqa: E501 + + The asset account for fixed assets of this type # noqa: E501 + + :return: The fixed_asset_account_id of this AssetType. # noqa: E501 + :rtype: str + """ + return self._fixed_asset_account_id + + @fixed_asset_account_id.setter + def fixed_asset_account_id(self, fixed_asset_account_id): + """Sets the fixed_asset_account_id of this AssetType. + + The asset account for fixed assets of this type # noqa: E501 + + :param fixed_asset_account_id: The fixed_asset_account_id of this AssetType. # noqa: E501 + :type: str + """ + + self._fixed_asset_account_id = fixed_asset_account_id + + @property + def depreciation_expense_account_id(self): + """Gets the depreciation_expense_account_id of this AssetType. # noqa: E501 + + The expense account for the depreciation of fixed assets of this type # noqa: E501 + + :return: The depreciation_expense_account_id of this AssetType. # noqa: E501 + :rtype: str + """ + return self._depreciation_expense_account_id + + @depreciation_expense_account_id.setter + def depreciation_expense_account_id(self, depreciation_expense_account_id): + """Sets the depreciation_expense_account_id of this AssetType. + + The expense account for the depreciation of fixed assets of this type # noqa: E501 + + :param depreciation_expense_account_id: The depreciation_expense_account_id of this AssetType. # noqa: E501 + :type: str + """ + + self._depreciation_expense_account_id = depreciation_expense_account_id + + @property + def accumulated_depreciation_account_id(self): + """Gets the accumulated_depreciation_account_id of this AssetType. # noqa: E501 + + The account for accumulated depreciation of fixed assets of this type # noqa: E501 + + :return: The accumulated_depreciation_account_id of this AssetType. # noqa: E501 + :rtype: str + """ + return self._accumulated_depreciation_account_id + + @accumulated_depreciation_account_id.setter + def accumulated_depreciation_account_id(self, accumulated_depreciation_account_id): + """Sets the accumulated_depreciation_account_id of this AssetType. + + The account for accumulated depreciation of fixed assets of this type # noqa: E501 + + :param accumulated_depreciation_account_id: The accumulated_depreciation_account_id of this AssetType. # noqa: E501 + :type: str + """ + + self._accumulated_depreciation_account_id = accumulated_depreciation_account_id + + @property + def book_depreciation_setting(self): + """Gets the book_depreciation_setting of this AssetType. # noqa: E501 + + + :return: The book_depreciation_setting of this AssetType. # noqa: E501 + :rtype: BookDepreciationSetting + """ + return self._book_depreciation_setting + + @book_depreciation_setting.setter + def book_depreciation_setting(self, book_depreciation_setting): + """Sets the book_depreciation_setting of this AssetType. + + + :param book_depreciation_setting: The book_depreciation_setting of this AssetType. # noqa: E501 + :type: BookDepreciationSetting + """ + if book_depreciation_setting is None: + raise ValueError( + "Invalid value for `book_depreciation_setting`, must not be `None`" + ) # noqa: E501 + + self._book_depreciation_setting = book_depreciation_setting + + @property + def locks(self): + """Gets the locks of this AssetType. # noqa: E501 + + All asset types that have accumulated depreciation for any assets that use them are deemed ‘locked’ and cannot be removed. # noqa: E501 + + :return: The locks of this AssetType. # noqa: E501 + :rtype: int + """ + return self._locks + + @locks.setter + def locks(self, locks): + """Sets the locks of this AssetType. + + All asset types that have accumulated depreciation for any assets that use them are deemed ‘locked’ and cannot be removed. # noqa: E501 + + :param locks: The locks of this AssetType. # noqa: E501 + :type: int + """ + + self._locks = locks diff --git a/xero_python/assets/models/assets.py b/xero_python/assets/models/assets.py new file mode 100644 index 00000000..f1f66e14 --- /dev/null +++ b/xero_python/assets/models/assets.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Xero Assets API + + This is the Xero Assets API # noqa: E501 + + OpenAPI spec version: 2.2.5 + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 + +from xero_python.models import BaseModel + + +class Assets(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 = {"pagination": "Pagination", "items": "list[Asset]"} + + attribute_map = {"pagination": "pagination", "items": "items"} + + def __init__(self, pagination=None, items=None): # noqa: E501 + """Assets - a model defined in OpenAPI""" # noqa: E501 + + self._pagination = None + self._items = None + self.discriminator = None + + if pagination is not None: + self.pagination = pagination + if items is not None: + self.items = items + + @property + def pagination(self): + """Gets the pagination of this Assets. # noqa: E501 + + + :return: The pagination of this Assets. # noqa: E501 + :rtype: Pagination + """ + return self._pagination + + @pagination.setter + def pagination(self, pagination): + """Sets the pagination of this Assets. + + + :param pagination: The pagination of this Assets. # noqa: E501 + :type: Pagination + """ + + self._pagination = pagination + + @property + def items(self): + """Gets the items of this Assets. # noqa: E501 + + + :return: The items of this Assets. # noqa: E501 + :rtype: list[Asset] + """ + return self._items + + @items.setter + def items(self, items): + """Sets the items of this Assets. + + + :param items: The items of this Assets. # noqa: E501 + :type: list[Asset] + """ + + self._items = items diff --git a/xero_python/assets/models/book_depreciation_detail.py b/xero_python/assets/models/book_depreciation_detail.py new file mode 100644 index 00000000..fde76be8 --- /dev/null +++ b/xero_python/assets/models/book_depreciation_detail.py @@ -0,0 +1,248 @@ +# coding: utf-8 + +""" + Xero Assets API + + This is the Xero Assets API # noqa: E501 + + OpenAPI spec version: 2.2.5 + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 + +from xero_python.models import BaseModel + + +class BookDepreciationDetail(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 = { + "current_capital_gain": "float", + "current_gain_loss": "float", + "depreciation_start_date": "date", + "cost_limit": "float", + "residual_value": "float", + "prior_accum_depreciation_amount": "float", + "current_accum_depreciation_amount": "float", + } + + attribute_map = { + "current_capital_gain": "currentCapitalGain", + "current_gain_loss": "currentGainLoss", + "depreciation_start_date": "depreciationStartDate", + "cost_limit": "costLimit", + "residual_value": "residualValue", + "prior_accum_depreciation_amount": "priorAccumDepreciationAmount", + "current_accum_depreciation_amount": "currentAccumDepreciationAmount", + } + + def __init__( + self, + current_capital_gain=None, + current_gain_loss=None, + depreciation_start_date=None, + cost_limit=None, + residual_value=None, + prior_accum_depreciation_amount=None, + current_accum_depreciation_amount=None, + ): # noqa: E501 + """BookDepreciationDetail - a model defined in OpenAPI""" # noqa: E501 + + self._current_capital_gain = None + self._current_gain_loss = None + self._depreciation_start_date = None + self._cost_limit = None + self._residual_value = None + self._prior_accum_depreciation_amount = None + self._current_accum_depreciation_amount = None + self.discriminator = None + + if current_capital_gain is not None: + self.current_capital_gain = current_capital_gain + if current_gain_loss is not None: + self.current_gain_loss = current_gain_loss + if depreciation_start_date is not None: + self.depreciation_start_date = depreciation_start_date + if cost_limit is not None: + self.cost_limit = cost_limit + if residual_value is not None: + self.residual_value = residual_value + if prior_accum_depreciation_amount is not None: + self.prior_accum_depreciation_amount = prior_accum_depreciation_amount + if current_accum_depreciation_amount is not None: + self.current_accum_depreciation_amount = current_accum_depreciation_amount + + @property + def current_capital_gain(self): + """Gets the current_capital_gain of this BookDepreciationDetail. # noqa: E501 + + When an asset is disposed, this will be the sell price minus the purchase price if a profit was made. # noqa: E501 + + :return: The current_capital_gain of this BookDepreciationDetail. # noqa: E501 + :rtype: float + """ + return self._current_capital_gain + + @current_capital_gain.setter + def current_capital_gain(self, current_capital_gain): + """Sets the current_capital_gain of this BookDepreciationDetail. + + When an asset is disposed, this will be the sell price minus the purchase price if a profit was made. # noqa: E501 + + :param current_capital_gain: The current_capital_gain of this BookDepreciationDetail. # noqa: E501 + :type: float + """ + + self._current_capital_gain = current_capital_gain + + @property + def current_gain_loss(self): + """Gets the current_gain_loss of this BookDepreciationDetail. # noqa: E501 + + When an asset is disposed, this will be the lowest one of sell price or purchase price, minus the current book value. # noqa: E501 + + :return: The current_gain_loss of this BookDepreciationDetail. # noqa: E501 + :rtype: float + """ + return self._current_gain_loss + + @current_gain_loss.setter + def current_gain_loss(self, current_gain_loss): + """Sets the current_gain_loss of this BookDepreciationDetail. + + When an asset is disposed, this will be the lowest one of sell price or purchase price, minus the current book value. # noqa: E501 + + :param current_gain_loss: The current_gain_loss of this BookDepreciationDetail. # noqa: E501 + :type: float + """ + + self._current_gain_loss = current_gain_loss + + @property + def depreciation_start_date(self): + """Gets the depreciation_start_date of this BookDepreciationDetail. # noqa: E501 + + YYYY-MM-DD # noqa: E501 + + :return: The depreciation_start_date of this BookDepreciationDetail. # noqa: E501 + :rtype: date + """ + return self._depreciation_start_date + + @depreciation_start_date.setter + def depreciation_start_date(self, depreciation_start_date): + """Sets the depreciation_start_date of this BookDepreciationDetail. + + YYYY-MM-DD # noqa: E501 + + :param depreciation_start_date: The depreciation_start_date of this BookDepreciationDetail. # noqa: E501 + :type: date + """ + + self._depreciation_start_date = depreciation_start_date + + @property + def cost_limit(self): + """Gets the cost_limit of this BookDepreciationDetail. # noqa: E501 + + The value of the asset you want to depreciate, if this is less than the cost of the asset. # noqa: E501 + + :return: The cost_limit of this BookDepreciationDetail. # noqa: E501 + :rtype: float + """ + return self._cost_limit + + @cost_limit.setter + def cost_limit(self, cost_limit): + """Sets the cost_limit of this BookDepreciationDetail. + + The value of the asset you want to depreciate, if this is less than the cost of the asset. # noqa: E501 + + :param cost_limit: The cost_limit of this BookDepreciationDetail. # noqa: E501 + :type: float + """ + + self._cost_limit = cost_limit + + @property + def residual_value(self): + """Gets the residual_value of this BookDepreciationDetail. # noqa: E501 + + The value of the asset remaining when you've fully depreciated it. # noqa: E501 + + :return: The residual_value of this BookDepreciationDetail. # noqa: E501 + :rtype: float + """ + return self._residual_value + + @residual_value.setter + def residual_value(self, residual_value): + """Sets the residual_value of this BookDepreciationDetail. + + The value of the asset remaining when you've fully depreciated it. # noqa: E501 + + :param residual_value: The residual_value of this BookDepreciationDetail. # noqa: E501 + :type: float + """ + + self._residual_value = residual_value + + @property + def prior_accum_depreciation_amount(self): + """Gets the prior_accum_depreciation_amount of this BookDepreciationDetail. # noqa: E501 + + All depreciation prior to the current financial year. # noqa: E501 + + :return: The prior_accum_depreciation_amount of this BookDepreciationDetail. # noqa: E501 + :rtype: float + """ + return self._prior_accum_depreciation_amount + + @prior_accum_depreciation_amount.setter + def prior_accum_depreciation_amount(self, prior_accum_depreciation_amount): + """Sets the prior_accum_depreciation_amount of this BookDepreciationDetail. + + All depreciation prior to the current financial year. # noqa: E501 + + :param prior_accum_depreciation_amount: The prior_accum_depreciation_amount of this BookDepreciationDetail. # noqa: E501 + :type: float + """ + + self._prior_accum_depreciation_amount = prior_accum_depreciation_amount + + @property + def current_accum_depreciation_amount(self): + """Gets the current_accum_depreciation_amount of this BookDepreciationDetail. # noqa: E501 + + All depreciation occurring in the current financial year. # noqa: E501 + + :return: The current_accum_depreciation_amount of this BookDepreciationDetail. # noqa: E501 + :rtype: float + """ + return self._current_accum_depreciation_amount + + @current_accum_depreciation_amount.setter + def current_accum_depreciation_amount(self, current_accum_depreciation_amount): + """Sets the current_accum_depreciation_amount of this BookDepreciationDetail. + + All depreciation occurring in the current financial year. # noqa: E501 + + :param current_accum_depreciation_amount: The current_accum_depreciation_amount of this BookDepreciationDetail. # noqa: E501 + :type: float + """ + + self._current_accum_depreciation_amount = current_accum_depreciation_amount diff --git a/xero_python/assets/models/book_depreciation_setting.py b/xero_python/assets/models/book_depreciation_setting.py new file mode 100644 index 00000000..a3a5977a --- /dev/null +++ b/xero_python/assets/models/book_depreciation_setting.py @@ -0,0 +1,305 @@ +# coding: utf-8 + +""" + Xero Assets API + + This is the Xero Assets API # noqa: E501 + + OpenAPI spec version: 2.2.5 + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 + +from xero_python.models import BaseModel + + +class BookDepreciationSetting(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 = { + "depreciation_method": "str", + "averaging_method": "str", + "depreciation_rate": "float", + "effective_life_years": "int", + "depreciation_calculation_method": "str", + "depreciable_object_id": "str", + "depreciable_object_type": "str", + "book_effective_date_of_change_id": "str", + } + + attribute_map = { + "depreciation_method": "depreciationMethod", + "averaging_method": "averagingMethod", + "depreciation_rate": "depreciationRate", + "effective_life_years": "effectiveLifeYears", + "depreciation_calculation_method": "depreciationCalculationMethod", + "depreciable_object_id": "depreciableObjectId", + "depreciable_object_type": "depreciableObjectType", + "book_effective_date_of_change_id": "bookEffectiveDateOfChangeId", + } + + def __init__( + self, + depreciation_method=None, + averaging_method=None, + depreciation_rate=None, + effective_life_years=None, + depreciation_calculation_method=None, + depreciable_object_id=None, + depreciable_object_type=None, + book_effective_date_of_change_id=None, + ): # noqa: E501 + """BookDepreciationSetting - a model defined in OpenAPI""" # noqa: E501 + + self._depreciation_method = None + self._averaging_method = None + self._depreciation_rate = None + self._effective_life_years = None + self._depreciation_calculation_method = None + self._depreciable_object_id = None + self._depreciable_object_type = None + self._book_effective_date_of_change_id = None + self.discriminator = None + + if depreciation_method is not None: + self.depreciation_method = depreciation_method + if averaging_method is not None: + self.averaging_method = averaging_method + if depreciation_rate is not None: + self.depreciation_rate = depreciation_rate + if effective_life_years is not None: + self.effective_life_years = effective_life_years + if depreciation_calculation_method is not None: + self.depreciation_calculation_method = depreciation_calculation_method + if depreciable_object_id is not None: + self.depreciable_object_id = depreciable_object_id + if depreciable_object_type is not None: + self.depreciable_object_type = depreciable_object_type + if book_effective_date_of_change_id is not None: + self.book_effective_date_of_change_id = book_effective_date_of_change_id + + @property + def depreciation_method(self): + """Gets the depreciation_method of this BookDepreciationSetting. # noqa: E501 + + The method of depreciation applied to this asset. See Depreciation Methods # noqa: E501 + + :return: The depreciation_method of this BookDepreciationSetting. # noqa: E501 + :rtype: str + """ + return self._depreciation_method + + @depreciation_method.setter + def depreciation_method(self, depreciation_method): + """Sets the depreciation_method of this BookDepreciationSetting. + + The method of depreciation applied to this asset. See Depreciation Methods # noqa: E501 + + :param depreciation_method: The depreciation_method of this BookDepreciationSetting. # noqa: E501 + :type: str + """ + allowed_values = [ + "NoDepreciation", + "StraightLine", + "DiminishingValue100", + "DiminishingValue150", + "DiminishingValue200", + "FullDepreciation", + ] # noqa: E501 + if depreciation_method not in allowed_values: + raise ValueError( + "Invalid value for `depreciation_method` ({0}), must be one of {1}".format( # noqa: E501 + depreciation_method, allowed_values + ) + ) + + self._depreciation_method = depreciation_method + + @property + def averaging_method(self): + """Gets the averaging_method of this BookDepreciationSetting. # noqa: E501 + + The method of averaging applied to this asset. See Averaging Methods # noqa: E501 + + :return: The averaging_method of this BookDepreciationSetting. # noqa: E501 + :rtype: str + """ + return self._averaging_method + + @averaging_method.setter + def averaging_method(self, averaging_method): + """Sets the averaging_method of this BookDepreciationSetting. + + The method of averaging applied to this asset. See Averaging Methods # noqa: E501 + + :param averaging_method: The averaging_method of this BookDepreciationSetting. # noqa: E501 + :type: str + """ + allowed_values = ["FullMonth", "ActualDays"] # noqa: E501 + if averaging_method not in allowed_values: + raise ValueError( + "Invalid value for `averaging_method` ({0}), must be one of {1}".format( # noqa: E501 + averaging_method, allowed_values + ) + ) + + self._averaging_method = averaging_method + + @property + def depreciation_rate(self): + """Gets the depreciation_rate of this BookDepreciationSetting. # noqa: E501 + + The rate of depreciation (e.g. 0.05) # noqa: E501 + + :return: The depreciation_rate of this BookDepreciationSetting. # noqa: E501 + :rtype: float + """ + return self._depreciation_rate + + @depreciation_rate.setter + def depreciation_rate(self, depreciation_rate): + """Sets the depreciation_rate of this BookDepreciationSetting. + + The rate of depreciation (e.g. 0.05) # noqa: E501 + + :param depreciation_rate: The depreciation_rate of this BookDepreciationSetting. # noqa: E501 + :type: float + """ + + self._depreciation_rate = depreciation_rate + + @property + def effective_life_years(self): + """Gets the effective_life_years of this BookDepreciationSetting. # noqa: E501 + + Effective life of the asset in years (e.g. 5) # noqa: E501 + + :return: The effective_life_years of this BookDepreciationSetting. # noqa: E501 + :rtype: int + """ + return self._effective_life_years + + @effective_life_years.setter + def effective_life_years(self, effective_life_years): + """Sets the effective_life_years of this BookDepreciationSetting. + + Effective life of the asset in years (e.g. 5) # noqa: E501 + + :param effective_life_years: The effective_life_years of this BookDepreciationSetting. # noqa: E501 + :type: int + """ + + self._effective_life_years = effective_life_years + + @property + def depreciation_calculation_method(self): + """Gets the depreciation_calculation_method of this BookDepreciationSetting. # noqa: E501 + + See Depreciation Calculation Methods # noqa: E501 + + :return: The depreciation_calculation_method of this BookDepreciationSetting. # noqa: E501 + :rtype: str + """ + return self._depreciation_calculation_method + + @depreciation_calculation_method.setter + def depreciation_calculation_method(self, depreciation_calculation_method): + """Sets the depreciation_calculation_method of this BookDepreciationSetting. + + See Depreciation Calculation Methods # noqa: E501 + + :param depreciation_calculation_method: The depreciation_calculation_method of this BookDepreciationSetting. # noqa: E501 + :type: str + """ + allowed_values = ["Rate", "Life", "None"] # noqa: E501 + if depreciation_calculation_method not in allowed_values: + raise ValueError( + "Invalid value for `depreciation_calculation_method` ({0}), must be one of {1}".format( # noqa: E501 + depreciation_calculation_method, allowed_values + ) + ) + + self._depreciation_calculation_method = depreciation_calculation_method + + @property + def depreciable_object_id(self): + """Gets the depreciable_object_id of this BookDepreciationSetting. # noqa: E501 + + Unique Xero identifier for the depreciable object # noqa: E501 + + :return: The depreciable_object_id of this BookDepreciationSetting. # noqa: E501 + :rtype: str + """ + return self._depreciable_object_id + + @depreciable_object_id.setter + def depreciable_object_id(self, depreciable_object_id): + """Sets the depreciable_object_id of this BookDepreciationSetting. + + Unique Xero identifier for the depreciable object # noqa: E501 + + :param depreciable_object_id: The depreciable_object_id of this BookDepreciationSetting. # noqa: E501 + :type: str + """ + + self._depreciable_object_id = depreciable_object_id + + @property + def depreciable_object_type(self): + """Gets the depreciable_object_type of this BookDepreciationSetting. # noqa: E501 + + The type of asset object # noqa: E501 + + :return: The depreciable_object_type of this BookDepreciationSetting. # noqa: E501 + :rtype: str + """ + return self._depreciable_object_type + + @depreciable_object_type.setter + def depreciable_object_type(self, depreciable_object_type): + """Sets the depreciable_object_type of this BookDepreciationSetting. + + The type of asset object # noqa: E501 + + :param depreciable_object_type: The depreciable_object_type of this BookDepreciationSetting. # noqa: E501 + :type: str + """ + + self._depreciable_object_type = depreciable_object_type + + @property + def book_effective_date_of_change_id(self): + """Gets the book_effective_date_of_change_id of this BookDepreciationSetting. # noqa: E501 + + Unique Xero identifier for the effective date change # noqa: E501 + + :return: The book_effective_date_of_change_id of this BookDepreciationSetting. # noqa: E501 + :rtype: str + """ + return self._book_effective_date_of_change_id + + @book_effective_date_of_change_id.setter + def book_effective_date_of_change_id(self, book_effective_date_of_change_id): + """Sets the book_effective_date_of_change_id of this BookDepreciationSetting. + + Unique Xero identifier for the effective date change # noqa: E501 + + :param book_effective_date_of_change_id: The book_effective_date_of_change_id of this BookDepreciationSetting. # noqa: E501 + :type: str + """ + + self._book_effective_date_of_change_id = book_effective_date_of_change_id diff --git a/xero_python/assets/models/error.py b/xero_python/assets/models/error.py new file mode 100644 index 00000000..ed67a75f --- /dev/null +++ b/xero_python/assets/models/error.py @@ -0,0 +1,190 @@ +# coding: utf-8 + +""" + Xero Assets API + + This is the Xero Assets API # noqa: E501 + + OpenAPI spec version: 2.2.5 + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 + +from xero_python.models import BaseModel + + +class Error(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 = { + "resource_validation_errors": "list[ResourceValidationErrorsElement]", + "field_validation_errors": "list[FieldValidationErrorsElement]", + "type": "str", + "title": "str", + "detail": "str", + } + + attribute_map = { + "resource_validation_errors": "resourceValidationErrors", + "field_validation_errors": "fieldValidationErrors", + "type": "type", + "title": "title", + "detail": "detail", + } + + def __init__( + self, + resource_validation_errors=None, + field_validation_errors=None, + type=None, + title=None, + detail=None, + ): # noqa: E501 + """Error - a model defined in OpenAPI""" # noqa: E501 + + self._resource_validation_errors = None + self._field_validation_errors = None + self._type = None + self._title = None + self._detail = None + self.discriminator = None + + if resource_validation_errors is not None: + self.resource_validation_errors = resource_validation_errors + if field_validation_errors is not None: + self.field_validation_errors = field_validation_errors + if type is not None: + self.type = type + if title is not None: + self.title = title + if detail is not None: + self.detail = detail + + @property + def resource_validation_errors(self): + """Gets the resource_validation_errors of this Error. # noqa: E501 + + Array of elements of resource validation errors # noqa: E501 + + :return: The resource_validation_errors of this Error. # noqa: E501 + :rtype: list[ResourceValidationErrorsElement] + """ + return self._resource_validation_errors + + @resource_validation_errors.setter + def resource_validation_errors(self, resource_validation_errors): + """Sets the resource_validation_errors of this Error. + + Array of elements of resource validation errors # noqa: E501 + + :param resource_validation_errors: The resource_validation_errors of this Error. # noqa: E501 + :type: list[ResourceValidationErrorsElement] + """ + + self._resource_validation_errors = resource_validation_errors + + @property + def field_validation_errors(self): + """Gets the field_validation_errors of this Error. # noqa: E501 + + Array of elements of field validation errors # noqa: E501 + + :return: The field_validation_errors of this Error. # noqa: E501 + :rtype: list[FieldValidationErrorsElement] + """ + return self._field_validation_errors + + @field_validation_errors.setter + def field_validation_errors(self, field_validation_errors): + """Sets the field_validation_errors of this Error. + + Array of elements of field validation errors # noqa: E501 + + :param field_validation_errors: The field_validation_errors of this Error. # noqa: E501 + :type: list[FieldValidationErrorsElement] + """ + + self._field_validation_errors = field_validation_errors + + @property + def type(self): + """Gets the type of this Error. # noqa: E501 + + The internal type of error, not accessible externally # noqa: E501 + + :return: The type of this Error. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this Error. + + The internal type of error, not accessible externally # noqa: E501 + + :param type: The type of this Error. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def title(self): + """Gets the title of this Error. # noqa: E501 + + Title of the error # noqa: E501 + + :return: The title of this Error. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this Error. + + Title of the error # noqa: E501 + + :param title: The title of this Error. # noqa: E501 + :type: str + """ + + self._title = title + + @property + def detail(self): + """Gets the detail of this Error. # noqa: E501 + + Detail of the error # noqa: E501 + + :return: The detail of this Error. # noqa: E501 + :rtype: str + """ + return self._detail + + @detail.setter + def detail(self, detail): + """Sets the detail of this Error. + + Detail of the error # noqa: E501 + + :param detail: The detail of this Error. # noqa: E501 + :type: str + """ + + self._detail = detail diff --git a/xero_python/assets/models/field_validation_errors_element.py b/xero_python/assets/models/field_validation_errors_element.py new file mode 100644 index 00000000..d1db2160 --- /dev/null +++ b/xero_python/assets/models/field_validation_errors_element.py @@ -0,0 +1,219 @@ +# coding: utf-8 + +""" + Xero Assets API + + This is the Xero Assets API # noqa: E501 + + OpenAPI spec version: 2.2.5 + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 + +from xero_python.models import BaseModel + + +class FieldValidationErrorsElement(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 = { + "field_name": "str", + "value_provided": "str", + "localised_message": "str", + "type": "str", + "title": "str", + "detail": "str", + } + + attribute_map = { + "field_name": "fieldName", + "value_provided": "valueProvided", + "localised_message": "localisedMessage", + "type": "type", + "title": "title", + "detail": "detail", + } + + def __init__( + self, + field_name=None, + value_provided=None, + localised_message=None, + type=None, + title=None, + detail=None, + ): # noqa: E501 + """FieldValidationErrorsElement - a model defined in OpenAPI""" # noqa: E501 + + self._field_name = None + self._value_provided = None + self._localised_message = None + self._type = None + self._title = None + self._detail = None + self.discriminator = None + + if field_name is not None: + self.field_name = field_name + if value_provided is not None: + self.value_provided = value_provided + if localised_message is not None: + self.localised_message = localised_message + if type is not None: + self.type = type + if title is not None: + self.title = title + if detail is not None: + self.detail = detail + + @property + def field_name(self): + """Gets the field_name of this FieldValidationErrorsElement. # noqa: E501 + + The field name of the erroneous field # noqa: E501 + + :return: The field_name of this FieldValidationErrorsElement. # noqa: E501 + :rtype: str + """ + return self._field_name + + @field_name.setter + def field_name(self, field_name): + """Sets the field_name of this FieldValidationErrorsElement. + + The field name of the erroneous field # noqa: E501 + + :param field_name: The field_name of this FieldValidationErrorsElement. # noqa: E501 + :type: str + """ + + self._field_name = field_name + + @property + def value_provided(self): + """Gets the value_provided of this FieldValidationErrorsElement. # noqa: E501 + + The provided value # noqa: E501 + + :return: The value_provided of this FieldValidationErrorsElement. # noqa: E501 + :rtype: str + """ + return self._value_provided + + @value_provided.setter + def value_provided(self, value_provided): + """Sets the value_provided of this FieldValidationErrorsElement. + + The provided value # noqa: E501 + + :param value_provided: The value_provided of this FieldValidationErrorsElement. # noqa: E501 + :type: str + """ + + self._value_provided = value_provided + + @property + def localised_message(self): + """Gets the localised_message of this FieldValidationErrorsElement. # noqa: E501 + + Explaination of the field validation error # noqa: E501 + + :return: The localised_message of this FieldValidationErrorsElement. # noqa: E501 + :rtype: str + """ + return self._localised_message + + @localised_message.setter + def localised_message(self, localised_message): + """Sets the localised_message of this FieldValidationErrorsElement. + + Explaination of the field validation error # noqa: E501 + + :param localised_message: The localised_message of this FieldValidationErrorsElement. # noqa: E501 + :type: str + """ + + self._localised_message = localised_message + + @property + def type(self): + """Gets the type of this FieldValidationErrorsElement. # noqa: E501 + + Internal type of the field validation error message # noqa: E501 + + :return: The type of this FieldValidationErrorsElement. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this FieldValidationErrorsElement. + + Internal type of the field validation error message # noqa: E501 + + :param type: The type of this FieldValidationErrorsElement. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def title(self): + """Gets the title of this FieldValidationErrorsElement. # noqa: E501 + + Title of the field validation error # noqa: E501 + + :return: The title of this FieldValidationErrorsElement. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this FieldValidationErrorsElement. + + Title of the field validation error # noqa: E501 + + :param title: The title of this FieldValidationErrorsElement. # noqa: E501 + :type: str + """ + + self._title = title + + @property + def detail(self): + """Gets the detail of this FieldValidationErrorsElement. # noqa: E501 + + Detail of the field validation error # noqa: E501 + + :return: The detail of this FieldValidationErrorsElement. # noqa: E501 + :rtype: str + """ + return self._detail + + @detail.setter + def detail(self, detail): + """Sets the detail of this FieldValidationErrorsElement. + + Detail of the field validation error # noqa: E501 + + :param detail: The detail of this FieldValidationErrorsElement. # noqa: E501 + :type: str + """ + + self._detail = detail diff --git a/xero_python/assets/models/pagination.py b/xero_python/assets/models/pagination.py new file mode 100644 index 00000000..e2eb0207 --- /dev/null +++ b/xero_python/assets/models/pagination.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Xero Assets API + + This is the Xero Assets API # noqa: E501 + + OpenAPI spec version: 2.2.5 + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 + +from xero_python.models import BaseModel + + +class Pagination(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 = { + "page": "int", + "page_size": "int", + "page_count": "int", + "item_count": "int", + } + + attribute_map = { + "page": "page", + "page_size": "pageSize", + "page_count": "pageCount", + "item_count": "itemCount", + } + + def __init__( + self, page=None, page_size=None, page_count=None, item_count=None + ): # noqa: E501 + """Pagination - a model defined in OpenAPI""" # noqa: E501 + + self._page = None + self._page_size = None + self._page_count = None + self._item_count = None + self.discriminator = None + + if page is not None: + self.page = page + if page_size is not None: + self.page_size = page_size + if page_count is not None: + self.page_count = page_count + if item_count is not None: + self.item_count = item_count + + @property + def page(self): + """Gets the page of this Pagination. # noqa: E501 + + + :return: The page of this Pagination. # noqa: E501 + :rtype: int + """ + return self._page + + @page.setter + def page(self, page): + """Sets the page of this Pagination. + + + :param page: The page of this Pagination. # noqa: E501 + :type: int + """ + + self._page = page + + @property + def page_size(self): + """Gets the page_size of this Pagination. # noqa: E501 + + + :return: The page_size of this Pagination. # noqa: E501 + :rtype: int + """ + return self._page_size + + @page_size.setter + def page_size(self, page_size): + """Sets the page_size of this Pagination. + + + :param page_size: The page_size of this Pagination. # noqa: E501 + :type: int + """ + + self._page_size = page_size + + @property + def page_count(self): + """Gets the page_count of this Pagination. # noqa: E501 + + + :return: The page_count of this Pagination. # noqa: E501 + :rtype: int + """ + return self._page_count + + @page_count.setter + def page_count(self, page_count): + """Sets the page_count of this Pagination. + + + :param page_count: The page_count of this Pagination. # noqa: E501 + :type: int + """ + + self._page_count = page_count + + @property + def item_count(self): + """Gets the item_count of this Pagination. # noqa: E501 + + + :return: The item_count of this Pagination. # noqa: E501 + :rtype: int + """ + return self._item_count + + @item_count.setter + def item_count(self, item_count): + """Sets the item_count of this Pagination. + + + :param item_count: The item_count of this Pagination. # noqa: E501 + :type: int + """ + + self._item_count = item_count diff --git a/xero_python/assets/models/resource_validation_errors_element.py b/xero_python/assets/models/resource_validation_errors_element.py new file mode 100644 index 00000000..b0673e20 --- /dev/null +++ b/xero_python/assets/models/resource_validation_errors_element.py @@ -0,0 +1,190 @@ +# coding: utf-8 + +""" + Xero Assets API + + This is the Xero Assets API # noqa: E501 + + OpenAPI spec version: 2.2.5 + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 + +from xero_python.models import BaseModel + + +class ResourceValidationErrorsElement(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 = { + "resource_name": "str", + "localised_message": "str", + "type": "str", + "title": "str", + "detail": "str", + } + + attribute_map = { + "resource_name": "resourceName", + "localised_message": "localisedMessage", + "type": "type", + "title": "title", + "detail": "detail", + } + + def __init__( + self, + resource_name=None, + localised_message=None, + type=None, + title=None, + detail=None, + ): # noqa: E501 + """ResourceValidationErrorsElement - a model defined in OpenAPI""" # noqa: E501 + + self._resource_name = None + self._localised_message = None + self._type = None + self._title = None + self._detail = None + self.discriminator = None + + if resource_name is not None: + self.resource_name = resource_name + if localised_message is not None: + self.localised_message = localised_message + if type is not None: + self.type = type + if title is not None: + self.title = title + if detail is not None: + self.detail = detail + + @property + def resource_name(self): + """Gets the resource_name of this ResourceValidationErrorsElement. # noqa: E501 + + The field name of the erroneous field # noqa: E501 + + :return: The resource_name of this ResourceValidationErrorsElement. # noqa: E501 + :rtype: str + """ + return self._resource_name + + @resource_name.setter + def resource_name(self, resource_name): + """Sets the resource_name of this ResourceValidationErrorsElement. + + The field name of the erroneous field # noqa: E501 + + :param resource_name: The resource_name of this ResourceValidationErrorsElement. # noqa: E501 + :type: str + """ + + self._resource_name = resource_name + + @property + def localised_message(self): + """Gets the localised_message of this ResourceValidationErrorsElement. # noqa: E501 + + Explaination of the resource validation error # noqa: E501 + + :return: The localised_message of this ResourceValidationErrorsElement. # noqa: E501 + :rtype: str + """ + return self._localised_message + + @localised_message.setter + def localised_message(self, localised_message): + """Sets the localised_message of this ResourceValidationErrorsElement. + + Explaination of the resource validation error # noqa: E501 + + :param localised_message: The localised_message of this ResourceValidationErrorsElement. # noqa: E501 + :type: str + """ + + self._localised_message = localised_message + + @property + def type(self): + """Gets the type of this ResourceValidationErrorsElement. # noqa: E501 + + Internal type of the resource error message # noqa: E501 + + :return: The type of this ResourceValidationErrorsElement. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this ResourceValidationErrorsElement. + + Internal type of the resource error message # noqa: E501 + + :param type: The type of this ResourceValidationErrorsElement. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def title(self): + """Gets the title of this ResourceValidationErrorsElement. # noqa: E501 + + Title of the resource validation error # noqa: E501 + + :return: The title of this ResourceValidationErrorsElement. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this ResourceValidationErrorsElement. + + Title of the resource validation error # noqa: E501 + + :param title: The title of this ResourceValidationErrorsElement. # noqa: E501 + :type: str + """ + + self._title = title + + @property + def detail(self): + """Gets the detail of this ResourceValidationErrorsElement. # noqa: E501 + + Detail of the resource validation error # noqa: E501 + + :return: The detail of this ResourceValidationErrorsElement. # noqa: E501 + :rtype: str + """ + return self._detail + + @detail.setter + def detail(self, detail): + """Sets the detail of this ResourceValidationErrorsElement. + + Detail of the resource validation error # noqa: E501 + + :param detail: The detail of this ResourceValidationErrorsElement. # noqa: E501 + :type: str + """ + + self._detail = detail diff --git a/xero_python/assets/models/setting.py b/xero_python/assets/models/setting.py new file mode 100644 index 00000000..48f7c018 --- /dev/null +++ b/xero_python/assets/models/setting.py @@ -0,0 +1,287 @@ +# coding: utf-8 + +""" + Xero Assets API + + This is the Xero Assets API # noqa: E501 + + OpenAPI spec version: 2.2.5 + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 + +from xero_python.models import BaseModel + + +class Setting(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 = { + "asset_number_prefix": "str", + "asset_number_sequence": "str", + "asset_start_date": "date", + "last_depreciation_date": "date", + "default_gain_on_disposal_account_id": "str", + "default_loss_on_disposal_account_id": "str", + "default_capital_gain_on_disposal_account_id": "str", + "opt_in_for_tax": "bool", + } + + attribute_map = { + "asset_number_prefix": "assetNumberPrefix", + "asset_number_sequence": "assetNumberSequence", + "asset_start_date": "assetStartDate", + "last_depreciation_date": "lastDepreciationDate", + "default_gain_on_disposal_account_id": "defaultGainOnDisposalAccountId", + "default_loss_on_disposal_account_id": "defaultLossOnDisposalAccountId", + "default_capital_gain_on_disposal_account_id": "defaultCapitalGainOnDisposalAccountId", + "opt_in_for_tax": "optInForTax", + } + + def __init__( + self, + asset_number_prefix=None, + asset_number_sequence=None, + asset_start_date=None, + last_depreciation_date=None, + default_gain_on_disposal_account_id=None, + default_loss_on_disposal_account_id=None, + default_capital_gain_on_disposal_account_id=None, + opt_in_for_tax=None, + ): # noqa: E501 + """Setting - a model defined in OpenAPI""" # noqa: E501 + + self._asset_number_prefix = None + self._asset_number_sequence = None + self._asset_start_date = None + self._last_depreciation_date = None + self._default_gain_on_disposal_account_id = None + self._default_loss_on_disposal_account_id = None + self._default_capital_gain_on_disposal_account_id = None + self._opt_in_for_tax = None + self.discriminator = None + + if asset_number_prefix is not None: + self.asset_number_prefix = asset_number_prefix + if asset_number_sequence is not None: + self.asset_number_sequence = asset_number_sequence + if asset_start_date is not None: + self.asset_start_date = asset_start_date + if last_depreciation_date is not None: + self.last_depreciation_date = last_depreciation_date + if default_gain_on_disposal_account_id is not None: + self.default_gain_on_disposal_account_id = ( + default_gain_on_disposal_account_id + ) + if default_loss_on_disposal_account_id is not None: + self.default_loss_on_disposal_account_id = ( + default_loss_on_disposal_account_id + ) + if default_capital_gain_on_disposal_account_id is not None: + self.default_capital_gain_on_disposal_account_id = ( + default_capital_gain_on_disposal_account_id + ) + if opt_in_for_tax is not None: + self.opt_in_for_tax = opt_in_for_tax + + @property + def asset_number_prefix(self): + """Gets the asset_number_prefix of this Setting. # noqa: E501 + + The prefix used for fixed asset numbers (“FA-” by default) # noqa: E501 + + :return: The asset_number_prefix of this Setting. # noqa: E501 + :rtype: str + """ + return self._asset_number_prefix + + @asset_number_prefix.setter + def asset_number_prefix(self, asset_number_prefix): + """Sets the asset_number_prefix of this Setting. + + The prefix used for fixed asset numbers (“FA-” by default) # noqa: E501 + + :param asset_number_prefix: The asset_number_prefix of this Setting. # noqa: E501 + :type: str + """ + + self._asset_number_prefix = asset_number_prefix + + @property + def asset_number_sequence(self): + """Gets the asset_number_sequence of this Setting. # noqa: E501 + + The next available sequence number # noqa: E501 + + :return: The asset_number_sequence of this Setting. # noqa: E501 + :rtype: str + """ + return self._asset_number_sequence + + @asset_number_sequence.setter + def asset_number_sequence(self, asset_number_sequence): + """Sets the asset_number_sequence of this Setting. + + The next available sequence number # noqa: E501 + + :param asset_number_sequence: The asset_number_sequence of this Setting. # noqa: E501 + :type: str + """ + + self._asset_number_sequence = asset_number_sequence + + @property + def asset_start_date(self): + """Gets the asset_start_date of this Setting. # noqa: E501 + + The date depreciation calculations started on registered fixed assets in Xero # noqa: E501 + + :return: The asset_start_date of this Setting. # noqa: E501 + :rtype: date + """ + return self._asset_start_date + + @asset_start_date.setter + def asset_start_date(self, asset_start_date): + """Sets the asset_start_date of this Setting. + + The date depreciation calculations started on registered fixed assets in Xero # noqa: E501 + + :param asset_start_date: The asset_start_date of this Setting. # noqa: E501 + :type: date + """ + + self._asset_start_date = asset_start_date + + @property + def last_depreciation_date(self): + """Gets the last_depreciation_date of this Setting. # noqa: E501 + + The last depreciation date # noqa: E501 + + :return: The last_depreciation_date of this Setting. # noqa: E501 + :rtype: date + """ + return self._last_depreciation_date + + @last_depreciation_date.setter + def last_depreciation_date(self, last_depreciation_date): + """Sets the last_depreciation_date of this Setting. + + The last depreciation date # noqa: E501 + + :param last_depreciation_date: The last_depreciation_date of this Setting. # noqa: E501 + :type: date + """ + + self._last_depreciation_date = last_depreciation_date + + @property + def default_gain_on_disposal_account_id(self): + """Gets the default_gain_on_disposal_account_id of this Setting. # noqa: E501 + + Default account that gains are posted to # noqa: E501 + + :return: The default_gain_on_disposal_account_id of this Setting. # noqa: E501 + :rtype: str + """ + return self._default_gain_on_disposal_account_id + + @default_gain_on_disposal_account_id.setter + def default_gain_on_disposal_account_id(self, default_gain_on_disposal_account_id): + """Sets the default_gain_on_disposal_account_id of this Setting. + + Default account that gains are posted to # noqa: E501 + + :param default_gain_on_disposal_account_id: The default_gain_on_disposal_account_id of this Setting. # noqa: E501 + :type: str + """ + + self._default_gain_on_disposal_account_id = default_gain_on_disposal_account_id + + @property + def default_loss_on_disposal_account_id(self): + """Gets the default_loss_on_disposal_account_id of this Setting. # noqa: E501 + + Default account that losses are posted to # noqa: E501 + + :return: The default_loss_on_disposal_account_id of this Setting. # noqa: E501 + :rtype: str + """ + return self._default_loss_on_disposal_account_id + + @default_loss_on_disposal_account_id.setter + def default_loss_on_disposal_account_id(self, default_loss_on_disposal_account_id): + """Sets the default_loss_on_disposal_account_id of this Setting. + + Default account that losses are posted to # noqa: E501 + + :param default_loss_on_disposal_account_id: The default_loss_on_disposal_account_id of this Setting. # noqa: E501 + :type: str + """ + + self._default_loss_on_disposal_account_id = default_loss_on_disposal_account_id + + @property + def default_capital_gain_on_disposal_account_id(self): + """Gets the default_capital_gain_on_disposal_account_id of this Setting. # noqa: E501 + + Default account that capital gains are posted to # noqa: E501 + + :return: The default_capital_gain_on_disposal_account_id of this Setting. # noqa: E501 + :rtype: str + """ + return self._default_capital_gain_on_disposal_account_id + + @default_capital_gain_on_disposal_account_id.setter + def default_capital_gain_on_disposal_account_id( + self, default_capital_gain_on_disposal_account_id + ): + """Sets the default_capital_gain_on_disposal_account_id of this Setting. + + Default account that capital gains are posted to # noqa: E501 + + :param default_capital_gain_on_disposal_account_id: The default_capital_gain_on_disposal_account_id of this Setting. # noqa: E501 + :type: str + """ + + self._default_capital_gain_on_disposal_account_id = ( + default_capital_gain_on_disposal_account_id + ) + + @property + def opt_in_for_tax(self): + """Gets the opt_in_for_tax of this Setting. # noqa: E501 + + opt in for tax calculation # noqa: E501 + + :return: The opt_in_for_tax of this Setting. # noqa: E501 + :rtype: bool + """ + return self._opt_in_for_tax + + @opt_in_for_tax.setter + def opt_in_for_tax(self, opt_in_for_tax): + """Sets the opt_in_for_tax of this Setting. + + opt in for tax calculation # noqa: E501 + + :param opt_in_for_tax: The opt_in_for_tax of this Setting. # noqa: E501 + :type: bool + """ + + self._opt_in_for_tax = opt_in_for_tax diff --git a/xero_python/docs/README.md b/xero_python/docs/README.md index c876cfc4..6dd2a7fb 100644 --- a/xero_python/docs/README.md +++ b/xero_python/docs/README.md @@ -3,8 +3,8 @@ This specifing endpoints related to managing authentication tokens and identity 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.2.2 -- Package version: 0.2.3 +- API version: 2.2.5 +- Package version: 0.3.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit [https://developer.xero.com](https://developer.xero.com) @@ -30,6 +30,10 @@ from pprint import pprint ## Documentation For Authorization +### BasicAuth + +- **Type**: HTTP basic authentication + ### OAuth2 - **Type**: OAuth diff --git a/xero_python/identity/__init__.py b/xero_python/identity/__init__.py index d1fcfa8f..d19064b2 100644 --- a/xero_python/identity/__init__.py +++ b/xero_python/identity/__init__.py @@ -7,7 +7,7 @@ This specifing endpoints related to managing authentication tokens and identity for Xero API # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/identity/api/identity_api.py b/xero_python/identity/api/identity_api.py index 152eb3b9..c662b300 100644 --- a/xero_python/identity/api/identity_api.py +++ b/xero_python/identity/api/identity_api.py @@ -5,7 +5,7 @@ This specifing endpoints related to managing authentication tokens and identity for Xero API # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/identity/models/__init__.py b/xero_python/identity/models/__init__.py index 74bf3f8d..726a8b3b 100644 --- a/xero_python/identity/models/__init__.py +++ b/xero_python/identity/models/__init__.py @@ -6,7 +6,7 @@ This specifing endpoints related to managing authentication tokens and identity for Xero API # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/identity/models/access_token.py b/xero_python/identity/models/access_token.py index ad99ef63..4092e9db 100644 --- a/xero_python/identity/models/access_token.py +++ b/xero_python/identity/models/access_token.py @@ -5,7 +5,7 @@ This specifing endpoints related to managing authentication tokens and identity for Xero API # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/identity/models/connection.py b/xero_python/identity/models/connection.py index 49dbe0f5..1282e08b 100644 --- a/xero_python/identity/models/connection.py +++ b/xero_python/identity/models/connection.py @@ -5,7 +5,7 @@ This specifing endpoints related to managing authentication tokens and identity for Xero API # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ @@ -46,7 +46,7 @@ class Connection(BaseModel): "auth_event_id": "authEventId", "tenant_type": "tenantType", "tenant_name": "tenantName", - "created_date_utc": "createdDateUTC", + "created_date_utc": "createdDateUtc", "updated_date_utc": "updatedDateUtc", } diff --git a/xero_python/identity/models/refresh_token.py b/xero_python/identity/models/refresh_token.py index 9f34278d..562960aa 100644 --- a/xero_python/identity/models/refresh_token.py +++ b/xero_python/identity/models/refresh_token.py @@ -5,7 +5,7 @@ This specifing endpoints related to managing authentication tokens and identity for Xero API # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/rest.py b/xero_python/rest.py index 02f39f3b..c00db15e 100644 --- a/xero_python/rest.py +++ b/xero_python/rest.py @@ -5,7 +5,7 @@ This specifing endpoints related to managing authentication tokens and identity for Xero API # noqa: E501 - OpenAPI spec version: 2.2.2 + OpenAPI spec version: 2.2.5 Contact: api@xero.com Generated by: https://openapi-generator.tech """