diff --git a/README.md b/README.md index 908f723f..508caa7f 100644 --- a/README.md +++ b/README.md @@ -6,21 +6,36 @@ -Official Python sdk for Xero API generated by OpenAPI spec for oAuth2 - -* Free software: MIT license +Official python SDK for Xero API generated by OpenAPI spec for oAuth 2 + ## Features * XERO API Client with oauth2 token integration. -* Automatic oauth2 token refresh before token expiration. +* Automatic OAuth 2 token refresh before token expiration. * Class based interface for Xero API endpoints. * Model classes used to represent API data. * Currently Supported API sets: * [Accounting API](https://developer.xero.com/documentation/api/api-overview) + * [Assets API](https://developer.xero.com/documentation/assets-api/overview) + * [Projects API](https://developer.xero.com/documentation/projects/overview-projects) * Error handling for ease of use. +## Starter Project +We've created a [xero-python-outh2-starter](https://github.com/XeroAPI/xero-python-oauth2-starter) project to demonstrate how to use this SDK. + +* oauth 2 flow to obtain a token +* token refresh +* identity to obtain tenant_id +* organisation endpoint +* create contact +* create multiple contacts +* get invoices using where clause + +We've created a [15 min video walkthrough](https://www.youtube.com/watch?v=i8JWtbMo90M) on using the starter project. + + ## Credits * This package was created with @@ -32,3 +47,30 @@ project template. ## Contribution Please read [contribution](https://github.com/xero-github/xero-python/blob/master/CONTRIBUTING.md) guidelines. + +## License + +This software is published under the [MIT License](http://en.wikipedia.org/wiki/MIT_License). + + Copyright (c) 2020 Xero Limited + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation + files (the "Software"), to deal in the Software without + restriction, including without limitation the rights to use, + copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following + conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. diff --git a/setup.py b/setup.py index 7ff7b291..bbc70de5 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.3.0", + version="0.4.1", ) diff --git a/xero_python/__init__.py b/xero_python/__init__.py index ecbc8a42..7a8b0b84 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.3.0" +__version__ = "0.4.1" diff --git a/xero_python/accounting/__init__.py b/xero_python/accounting/__init__.py index b9f0673e..b08c11fe 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.5 + OpenAPI spec version: 2.2.6 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 617ba8a7..b6717a3d 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.5 + OpenAPI spec version: 2.2.6 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/accounting/models/__init__.py b/xero_python/accounting/models/__init__.py index 0d3ec92d..8278bde2 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.5 + OpenAPI spec version: 2.2.6 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 34a6751d..a933e48e 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.5 + OpenAPI spec version: 2.2.6 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 485136e3..3b664f98 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.5 + OpenAPI spec version: 2.2.6 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 a7b62666..aceeaf89 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.5 + OpenAPI spec version: 2.2.6 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 5287566b..7ae6ecee 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.5 + OpenAPI spec version: 2.2.6 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 f11e2e8b..f5d7aeb0 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.5 + OpenAPI spec version: 2.2.6 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 72c12096..a19e6197 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.5 + OpenAPI spec version: 2.2.6 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 c8494c79..7f98e61b 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.5 + OpenAPI spec version: 2.2.6 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 da1e0abc..6a75be2d 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.5 + OpenAPI spec version: 2.2.6 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 5aa0a4e3..3947bd49 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.5 + OpenAPI spec version: 2.2.6 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 f7362de7..bfd8fc69 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.5 + OpenAPI spec version: 2.2.6 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 7d8cdd73..f2e64e03 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.5 + OpenAPI spec version: 2.2.6 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 22d3e381..16d5579c 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.5 + OpenAPI spec version: 2.2.6 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 39d292b8..6c5fa8a6 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.5 + OpenAPI spec version: 2.2.6 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 a41997c4..b26191d0 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.5 + OpenAPI spec version: 2.2.6 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 bb97d017..bc544ab4 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.5 + OpenAPI spec version: 2.2.6 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 a93b8582..2d1b6492 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.5 + OpenAPI spec version: 2.2.6 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 15dbfd61..b4f71cec 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.5 + OpenAPI spec version: 2.2.6 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 b5583ca9..7d31a88a 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.5 + OpenAPI spec version: 2.2.6 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 7ad8364e..60dd8ece 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.5 + OpenAPI spec version: 2.2.6 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 c50e4b6c..ad38de7c 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.5 + OpenAPI spec version: 2.2.6 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 6013e793..c7f62d2e 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.5 + OpenAPI spec version: 2.2.6 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 f4565620..3895fd60 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.5 + OpenAPI spec version: 2.2.6 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 d26fe19a..4f45315d 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.5 + OpenAPI spec version: 2.2.6 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 c4fd4189..9838ac3f 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.5 + OpenAPI spec version: 2.2.6 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 0857ab67..a893b405 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.5 + OpenAPI spec version: 2.2.6 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 58f895fb..1c19c7db 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.5 + OpenAPI spec version: 2.2.6 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 c7d1e075..79b447f8 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.5 + OpenAPI spec version: 2.2.6 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 5fb6da17..378ef702 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.5 + OpenAPI spec version: 2.2.6 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 d69d204b..56c30bb1 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.5 + OpenAPI spec version: 2.2.6 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 c27fb998..22beef01 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.5 + OpenAPI spec version: 2.2.6 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 efb483dc..32e584b1 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.5 + OpenAPI spec version: 2.2.6 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 cdcdf33b..8c317f75 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.5 + OpenAPI spec version: 2.2.6 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 37a042ec..fc1d2ee3 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.5 + OpenAPI spec version: 2.2.6 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 15cfcfc9..5f277b66 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.5 + OpenAPI spec version: 2.2.6 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 09262458..2e1d933d 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.5 + OpenAPI spec version: 2.2.6 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 bfbd161f..73d4e99f 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.5 + OpenAPI spec version: 2.2.6 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 97263627..41592282 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.5 + OpenAPI spec version: 2.2.6 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 f7268e5c..b4396367 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.5 + OpenAPI spec version: 2.2.6 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 055ce556..c5cf775d 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.5 + OpenAPI spec version: 2.2.6 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 a2e35c0f..8826eed9 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.5 + OpenAPI spec version: 2.2.6 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 fc2879f5..b5f406df 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.5 + OpenAPI spec version: 2.2.6 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 e2a25b83..d5ed46ca 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.5 + OpenAPI spec version: 2.2.6 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 0726b2f2..4ddfe36c 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.5 + OpenAPI spec version: 2.2.6 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 5475904a..ae404f7e 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.5 + OpenAPI spec version: 2.2.6 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 240cb979..df764b70 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.5 + OpenAPI spec version: 2.2.6 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 eb63ea02..8ee85c50 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.5 + OpenAPI spec version: 2.2.6 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 64b7dbda..075be7f5 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.5 + OpenAPI spec version: 2.2.6 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 499aaad3..47b28368 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.5 + OpenAPI spec version: 2.2.6 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 779f2253..41b2e2a8 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.5 + OpenAPI spec version: 2.2.6 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 35135055..af282770 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.5 + OpenAPI spec version: 2.2.6 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 7311b7a6..2011e97f 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.5 + OpenAPI spec version: 2.2.6 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 68f770c7..d63ac832 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.5 + OpenAPI spec version: 2.2.6 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 3a57ecb5..6ebe84db 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.5 + OpenAPI spec version: 2.2.6 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 0e51b6d7..af2e572f 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.5 + OpenAPI spec version: 2.2.6 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 017bafe5..0e148c4c 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.5 + OpenAPI spec version: 2.2.6 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 545fb42c..32b61fb7 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.5 + OpenAPI spec version: 2.2.6 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 21ff29d1..0c9615fe 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.5 + OpenAPI spec version: 2.2.6 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 ff9e1322..b945546c 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.5 + OpenAPI spec version: 2.2.6 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 625cb91f..3fd16547 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.5 + OpenAPI spec version: 2.2.6 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 abc08e88..cf5ec80d 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.5 + OpenAPI spec version: 2.2.6 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 bc8a2832..36d43f86 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.5 + OpenAPI spec version: 2.2.6 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 504419e2..4ba11c35 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.5 + OpenAPI spec version: 2.2.6 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 5e7f25ae..fdf1668f 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.5 + OpenAPI spec version: 2.2.6 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 0f2feba8..5e46d215 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.5 + OpenAPI spec version: 2.2.6 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 317fd1fa..d7210567 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.5 + OpenAPI spec version: 2.2.6 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 fb3b3036..45e7965c 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.5 + OpenAPI spec version: 2.2.6 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 79b1fdc5..628fe74d 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.5 + OpenAPI spec version: 2.2.6 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 5e4e2360..8992d939 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.5 + OpenAPI spec version: 2.2.6 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 0d514387..109c754a 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.5 + OpenAPI spec version: 2.2.6 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 5c16b425..5be904a5 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.5 + OpenAPI spec version: 2.2.6 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 769ecb24..bfc49d67 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.5 + OpenAPI spec version: 2.2.6 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 b4afe15e..57282fcd 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.5 + OpenAPI spec version: 2.2.6 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 d99d4324..cedbfa22 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.5 + OpenAPI spec version: 2.2.6 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 e6f63cf6..e3d2de73 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.5 + OpenAPI spec version: 2.2.6 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 3208daad..ce167d5b 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.5 + OpenAPI spec version: 2.2.6 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 296de58c..6572d4b4 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.5 + OpenAPI spec version: 2.2.6 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 d43dd21d..5e6205e0 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.5 + OpenAPI spec version: 2.2.6 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 4622d258..634d75cf 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.5 + OpenAPI spec version: 2.2.6 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 87e7ae8e..d6739739 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.5 + OpenAPI spec version: 2.2.6 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 403f1fa7..0d5c219a 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.5 + OpenAPI spec version: 2.2.6 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 2575e08b..5dcd46ed 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.5 + OpenAPI spec version: 2.2.6 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 684c2bb2..ed8a7e70 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.5 + OpenAPI spec version: 2.2.6 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 162aac0d..418f4c62 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.5 + OpenAPI spec version: 2.2.6 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 2152fe6b..09850acd 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.5 + OpenAPI spec version: 2.2.6 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 a84a7d9d..e75013f5 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.5 + OpenAPI spec version: 2.2.6 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 ee23e976..0032f98b 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.5 + OpenAPI spec version: 2.2.6 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 b5e8e5d9..ae41dea1 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.5 + OpenAPI spec version: 2.2.6 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 d447e043..fcd62f5d 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.5 + OpenAPI spec version: 2.2.6 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 c5c52e1e..c6f41ce2 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.5 + OpenAPI spec version: 2.2.6 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 810c7ee1..4f73cff8 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.5 + OpenAPI spec version: 2.2.6 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 32aafe1f..0f426b9b 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.5 + OpenAPI spec version: 2.2.6 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 7994dd16..9af0af95 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.5 + OpenAPI spec version: 2.2.6 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 a710c9d3..3a204a3e 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.5 + OpenAPI spec version: 2.2.6 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 f886bce9..2df4b47f 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.5 + OpenAPI spec version: 2.2.6 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 75b35971..286eb563 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.5 + OpenAPI spec version: 2.2.6 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 4d8e99b1..fb0db2cc 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.5 + OpenAPI spec version: 2.2.6 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 babb6208..b4bb1868 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.5 + OpenAPI spec version: 2.2.6 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 37aef6e6..1bbd9d75 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.5 + OpenAPI spec version: 2.2.6 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 0878b607..870ed0ad 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.5 + OpenAPI spec version: 2.2.6 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 5004c299..9e5af997 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.5 + OpenAPI spec version: 2.2.6 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 eee1f826..eb0a53dc 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.5 + OpenAPI spec version: 2.2.6 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 6803aa64..b2eff2fa 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.5 + OpenAPI spec version: 2.2.6 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 43172ab2..67bbb8b7 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.5 + OpenAPI spec version: 2.2.6 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 9a98877e..7be871e2 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.5 + OpenAPI spec version: 2.2.6 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 cf59f36a..9f630a3c 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.5 + OpenAPI spec version: 2.2.6 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 fb049e26..22bf9cd0 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.5 + OpenAPI spec version: 2.2.6 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 01e5f8f9..2dab1f63 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.5 + OpenAPI spec version: 2.2.6 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 f8cfffe0..615e1775 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.5 + OpenAPI spec version: 2.2.6 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 911aed2f..7ae7461f 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.5 + OpenAPI spec version: 2.2.6 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 9af6203d..446a9f77 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.5 + OpenAPI spec version: 2.2.6 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 6e7f5df5..7181caf9 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.5 + OpenAPI spec version: 2.2.6 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 5af45ca1..81b703ed 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.5 + OpenAPI spec version: 2.2.6 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 167857b9..84d4a7c7 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.5 + OpenAPI spec version: 2.2.6 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 88c294a8..630b693d 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.5 + OpenAPI spec version: 2.2.6 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/api_client/deserializer.py b/xero_python/api_client/deserializer.py index 609a4d88..f52519a8 100644 --- a/xero_python/api_client/deserializer.py +++ b/xero_python/api_client/deserializer.py @@ -14,7 +14,12 @@ # taken from https://github.com/django/django/blob/master/django/utils/dateparse.py # at 4bbe8261c402694a1da3efcaafe3332f9c57af15 DATE_RE = re.compile(r"(?P\d{4})-(?P\d{1,2})-(?P\d{1,2})$") - +DATETIME_RE = re.compile( + r"(?P\d{4})-(?P\d{1,2})-(?P\d{1,2})" + r"[T ](?P\d{1,2}):(?P\d{1,2})" + r"(?::(?P\d{1,2})(?:[\.,](?P\d{1,6})\d{0,6})?)?" + r"(?PZ|[+-]\d{2}(?::?\d{2})?)?$" +) MS_DATETIME_RE = re.compile(r"/Date\((?P\d+)(?P[+-]\d{2,4})?\)/$") @@ -151,9 +156,13 @@ def deserialize_date(data_type, data, model_finder): # based on https://github.com/django/django/blob/master/django/utils/dateparse.py # at 4bbe8261c402694a1da3efcaafe3332f9c57af15 match = DATE_RE.match(str(data)) + match2 = DATETIME_RE.match(str(data)) if match: kw = {k: int(v) for k, v in match.groupdict().items()} return datetime.date(**kw) + elif match2: + dt = isoparse(data) + return dt else: raise ValueError("Invalid date value {!r}".format(data)) diff --git a/xero_python/assets/__init__.py b/xero_python/assets/__init__.py index 6954abf0..9c227234 100644 --- a/xero_python/assets/__init__.py +++ b/xero_python/assets/__init__.py @@ -7,7 +7,7 @@ This is the Xero Assets API # noqa: E501 - OpenAPI spec version: 2.2.5 + OpenAPI spec version: 2.2.6 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/assets/api/asset_api.py b/xero_python/assets/api/asset_api.py index 22ed9e95..54358adc 100644 --- a/xero_python/assets/api/asset_api.py +++ b/xero_python/assets/api/asset_api.py @@ -5,7 +5,7 @@ This is the Xero Assets API # noqa: E501 - OpenAPI spec version: 2.2.5 + OpenAPI spec version: 2.2.6 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/assets/docs/AssetType.md b/xero_python/assets/docs/AssetType.md index 9d80c546..cf5f4af7 100644 --- a/xero_python/assets/docs/AssetType.md +++ b/xero_python/assets/docs/AssetType.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**asset_type_id** | **str** | Xero generated unique identifier for asset types | +**asset_type_id** | **str** | Xero generated unique identifier for asset types | [optional] **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] diff --git a/xero_python/assets/models/__init__.py b/xero_python/assets/models/__init__.py index 05be850d..60a55fc1 100644 --- a/xero_python/assets/models/__init__.py +++ b/xero_python/assets/models/__init__.py @@ -6,7 +6,7 @@ This is the Xero Assets API # noqa: E501 - OpenAPI spec version: 2.2.5 + OpenAPI spec version: 2.2.6 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/assets/models/asset.py b/xero_python/assets/models/asset.py index 97950c62..883776cf 100644 --- a/xero_python/assets/models/asset.py +++ b/xero_python/assets/models/asset.py @@ -5,7 +5,7 @@ This is the Xero Assets API # noqa: E501 - OpenAPI spec version: 2.2.5 + OpenAPI spec version: 2.2.6 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/assets/models/asset_status.py b/xero_python/assets/models/asset_status.py index 5fd34513..271e75c0 100644 --- a/xero_python/assets/models/asset_status.py +++ b/xero_python/assets/models/asset_status.py @@ -5,7 +5,7 @@ This is the Xero Assets API # noqa: E501 - OpenAPI spec version: 2.2.5 + OpenAPI spec version: 2.2.6 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/assets/models/asset_status_query_param.py b/xero_python/assets/models/asset_status_query_param.py index 1e7e97f0..4cb9ada9 100644 --- a/xero_python/assets/models/asset_status_query_param.py +++ b/xero_python/assets/models/asset_status_query_param.py @@ -5,7 +5,7 @@ This is the Xero Assets API # noqa: E501 - OpenAPI spec version: 2.2.5 + OpenAPI spec version: 2.2.6 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/assets/models/asset_type.py b/xero_python/assets/models/asset_type.py index 6e7e8d8a..0811aef0 100644 --- a/xero_python/assets/models/asset_type.py +++ b/xero_python/assets/models/asset_type.py @@ -5,7 +5,7 @@ This is the Xero Assets API # noqa: E501 - OpenAPI spec version: 2.2.5 + OpenAPI spec version: 2.2.6 Contact: api@xero.com Generated by: https://openapi-generator.tech """ @@ -71,7 +71,8 @@ def __init__( self._locks = None self.discriminator = None - self.asset_type_id = asset_type_id + if asset_type_id is not 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 @@ -105,10 +106,6 @@ def asset_type_id(self, asset_type_id): :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 diff --git a/xero_python/assets/models/assets.py b/xero_python/assets/models/assets.py index f1f66e14..8fd7fa5a 100644 --- a/xero_python/assets/models/assets.py +++ b/xero_python/assets/models/assets.py @@ -5,7 +5,7 @@ This is the Xero Assets API # noqa: E501 - OpenAPI spec version: 2.2.5 + OpenAPI spec version: 2.2.6 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/assets/models/book_depreciation_detail.py b/xero_python/assets/models/book_depreciation_detail.py index fde76be8..b6d68d41 100644 --- a/xero_python/assets/models/book_depreciation_detail.py +++ b/xero_python/assets/models/book_depreciation_detail.py @@ -5,7 +5,7 @@ This is the Xero Assets API # noqa: E501 - OpenAPI spec version: 2.2.5 + OpenAPI spec version: 2.2.6 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/assets/models/book_depreciation_setting.py b/xero_python/assets/models/book_depreciation_setting.py index a3a5977a..97933217 100644 --- a/xero_python/assets/models/book_depreciation_setting.py +++ b/xero_python/assets/models/book_depreciation_setting.py @@ -5,7 +5,7 @@ This is the Xero Assets API # noqa: E501 - OpenAPI spec version: 2.2.5 + OpenAPI spec version: 2.2.6 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/assets/models/error.py b/xero_python/assets/models/error.py index ed67a75f..410d0211 100644 --- a/xero_python/assets/models/error.py +++ b/xero_python/assets/models/error.py @@ -5,7 +5,7 @@ This is the Xero Assets API # noqa: E501 - OpenAPI spec version: 2.2.5 + OpenAPI spec version: 2.2.6 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/assets/models/field_validation_errors_element.py b/xero_python/assets/models/field_validation_errors_element.py index d1db2160..19e99b83 100644 --- a/xero_python/assets/models/field_validation_errors_element.py +++ b/xero_python/assets/models/field_validation_errors_element.py @@ -5,7 +5,7 @@ This is the Xero Assets API # noqa: E501 - OpenAPI spec version: 2.2.5 + OpenAPI spec version: 2.2.6 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/assets/models/pagination.py b/xero_python/assets/models/pagination.py index e2eb0207..bf78b785 100644 --- a/xero_python/assets/models/pagination.py +++ b/xero_python/assets/models/pagination.py @@ -5,7 +5,7 @@ This is the Xero Assets API # noqa: E501 - OpenAPI spec version: 2.2.5 + OpenAPI spec version: 2.2.6 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/assets/models/resource_validation_errors_element.py b/xero_python/assets/models/resource_validation_errors_element.py index b0673e20..dd2065d7 100644 --- a/xero_python/assets/models/resource_validation_errors_element.py +++ b/xero_python/assets/models/resource_validation_errors_element.py @@ -5,7 +5,7 @@ This is the Xero Assets API # noqa: E501 - OpenAPI spec version: 2.2.5 + OpenAPI spec version: 2.2.6 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/assets/models/setting.py b/xero_python/assets/models/setting.py index 48f7c018..59b04ad7 100644 --- a/xero_python/assets/models/setting.py +++ b/xero_python/assets/models/setting.py @@ -5,7 +5,7 @@ This is the Xero Assets API # noqa: E501 - OpenAPI spec version: 2.2.5 + OpenAPI spec version: 2.2.6 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/docs/README.md b/xero_python/docs/README.md index 6dd2a7fb..e969c223 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.5 -- Package version: 0.3.0 +- API version: 2.2.6 +- Package version: 0.4.1 - Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit [https://developer.xero.com](https://developer.xero.com) diff --git a/xero_python/identity/__init__.py b/xero_python/identity/__init__.py index d19064b2..0411f416 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.5 + OpenAPI spec version: 2.2.6 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 c662b300..a03362ce 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.5 + OpenAPI spec version: 2.2.6 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 726a8b3b..094f0b2b 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.5 + OpenAPI spec version: 2.2.6 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 4092e9db..82dcd2eb 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.5 + OpenAPI spec version: 2.2.6 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 1282e08b..bb69a405 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.5 + OpenAPI spec version: 2.2.6 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/identity/models/refresh_token.py b/xero_python/identity/models/refresh_token.py index 562960aa..1ecc4e30 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.5 + OpenAPI spec version: 2.2.6 Contact: api@xero.com Generated by: https://openapi-generator.tech """ diff --git a/xero_python/project/__init__.py b/xero_python/project/__init__.py new file mode 100644 index 00000000..8015b1b9 --- /dev/null +++ b/xero_python/project/__init__.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +# flake8: noqa + +""" + Xero Projects API + + This is the Xero Projects API # noqa: E501 + + OpenAPI spec version: 2.2.6 + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +# import apis into sdk package +from xero_python.project.api.project_api import ProjectApi + + +# import models into sdk package +from xero_python.project.models.amount import Amount +from xero_python.project.models.charge_type import ChargeType +from xero_python.project.models.currency_code import CurrencyCode +from xero_python.project.models.error import Error +from xero_python.project.models.pagination import Pagination +from xero_python.project.models.project import Project +from xero_python.project.models.project_create_or_update import ProjectCreateOrUpdate +from xero_python.project.models.project_patch import ProjectPatch +from xero_python.project.models.project_status import ProjectStatus +from xero_python.project.models.project_user import ProjectUser +from xero_python.project.models.project_users import ProjectUsers +from xero_python.project.models.projects import Projects +from xero_python.project.models.task import Task +from xero_python.project.models.task_create_or_update import TaskCreateOrUpdate +from xero_python.project.models.tasks import Tasks +from xero_python.project.models.time_entries import TimeEntries +from xero_python.project.models.time_entry import TimeEntry +from xero_python.project.models.time_entry_create_or_update import ( + TimeEntryCreateOrUpdate, +) diff --git a/xero_python/project/api/__init__.py b/xero_python/project/api/__init__.py new file mode 100644 index 00000000..ae7af19b --- /dev/null +++ b/xero_python/project/api/__init__.py @@ -0,0 +1,4 @@ +# flake8: noqa + +# import apis into api package +from xero_python.project.api.project_api import ProjectApi diff --git a/xero_python/project/api/project_api.py b/xero_python/project/api/project_api.py new file mode 100644 index 00000000..c7b76b42 --- /dev/null +++ b/xero_python/project/api/project_api.py @@ -0,0 +1,1246 @@ +# coding: utf-8 + +""" + Xero Projects API + + This is the Xero Projects API # noqa: E501 + + OpenAPI spec version: 2.2.6 + 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 ProjectApi(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/projects.xro/2.0" + models_module = importlib.import_module("xero_python.project.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_project( + self, + xero_tenant_id, + project_create_or_update, + _return_http_data_only=True, + _preload_content=True, + _request_timeout=None, + ): + """create one or more new projects # noqa: E501 + OAuth2 scope: projects.create + :param str xero_tenant_id: Xero identifier for Tenant (required) + :param ProjectCreateOrUpdate project_create_or_update: Create a new project with ProjectCreateOrUpdate 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: Project + """ + + # 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_project`" + ) + # verify the required parameter 'project_create_or_update' is set + if project_create_or_update is None: + raise ValueError( + "Missing the required parameter `project_create_or_update` " + "when calling `create_project`" + ) + + collection_formats = {} + path_params = {} + + query_params = [] + + header_params = { + "Xero-Tenant-Id": xero_tenant_id, + } + + local_var_files = {} + form_params = [] + + body_params = project_create_or_update + # 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("/projects") + + 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="Project", + 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_project") + + def create_time_entry( + self, + xero_tenant_id, + project_id, + time_entry_create_or_update, + _return_http_data_only=True, + _preload_content=True, + _request_timeout=None, + ): + """Allows you to create a task # noqa: E501 + OAuth2 scope: projects, projects.read + Allows you to create a specific task # noqa: E501 + :param str xero_tenant_id: Xero identifier for Tenant (required) + :param str project_id: You can specify an individual project by appending the projectId to the endpoint (required) + :param TimeEntryCreateOrUpdate time_entry_create_or_update: The time entry object 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: TimeEntry + """ + + # 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_time_entry`" + ) + # verify the required parameter 'project_id' is set + if project_id is None: + raise ValueError( + "Missing the required parameter `project_id` " + "when calling `create_time_entry`" + ) + # verify the required parameter 'time_entry_create_or_update' is set + if time_entry_create_or_update is None: + raise ValueError( + "Missing the required parameter `time_entry_create_or_update` " + "when calling `create_time_entry`" + ) + + collection_formats = {} + path_params = { + "projectId": project_id, + } + + query_params = [] + + header_params = { + "Xero-Tenant-Id": xero_tenant_id, + } + + local_var_files = {} + form_params = [] + + body_params = time_entry_create_or_update + # 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("/projects/{projectId}/time") + + 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="TimeEntry", + 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_time_entry") + + def delete_time_entry( + self, + xero_tenant_id, + project_id, + time_entry_id, + _return_http_data_only=True, + _preload_content=True, + _request_timeout=None, + ): + """Allows you to delete a time entry # noqa: E501 + OAuth2 scope: projects, projects.read + Allows you to delete a specific time entry # noqa: E501 + :param str xero_tenant_id: Xero identifier for Tenant (required) + :param str project_id: You can specify an individual project by appending the projectId to the endpoint (required) + :param str time_entry_id: You can specify an individual task by appending the id to the endpoint (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: None + """ + + # verify the required parameter 'xero_tenant_id' is set + if xero_tenant_id is None: + raise ValueError( + "Missing the required parameter `xero_tenant_id` " + "when calling `delete_time_entry`" + ) + # verify the required parameter 'project_id' is set + if project_id is None: + raise ValueError( + "Missing the required parameter `project_id` " + "when calling `delete_time_entry`" + ) + # verify the required parameter 'time_entry_id' is set + if time_entry_id is None: + raise ValueError( + "Missing the required parameter `time_entry_id` " + "when calling `delete_time_entry`" + ) + + collection_formats = {} + path_params = { + "projectId": project_id, + "timeEntryId": time_entry_id, + } + + query_params = [] + + header_params = { + "Xero-Tenant-Id": xero_tenant_id, + } + + local_var_files = {} + form_params = [] + + body_params = None + # Authentication setting + auth_settings = ["OAuth2"] + url = self.get_resource_url("/projects/{projectId}/time/{timeEntryId}") + + try: + return self.api_client.call_api( + url, + "DELETE", + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + response_model_finder=self.get_model_finder(), + auth_settings=auth_settings, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + except exceptions.HTTPStatusException as error: + raise translate_status_exception(error, self, "delete_time_entry") + + def get_project( + self, + xero_tenant_id, + project_id, + _return_http_data_only=True, + _preload_content=True, + _request_timeout=None, + ): + """Allows you to retrieve a single project # noqa: E501 + OAuth2 scope: projects, projects.read + Allows you to retrieve a specific project # noqa: E501 + :param str xero_tenant_id: Xero identifier for Tenant (required) + :param str project_id: You can specify an individual project by appending the projectId to the endpoint (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: Project + """ + + # 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_project`" + ) + # verify the required parameter 'project_id' is set + if project_id is None: + raise ValueError( + "Missing the required parameter `project_id` " + "when calling `get_project`" + ) + + collection_formats = {} + path_params = { + "projectId": project_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("/projects/{projectId}") + + 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="Project", + 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_project") + + def get_project_users( + self, + xero_tenant_id, + page=empty, + page_size=empty, + _return_http_data_only=True, + _preload_content=True, + _request_timeout=None, + ): + """list all project users # noqa: E501 + OAuth2 scope: projects.read + Allows you to retrieve the users on a projects. # noqa: E501 + :param str xero_tenant_id: Xero identifier for Tenant (required) + :param int page: set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0. + :param int page_size: Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500. + :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: ProjectUsers + """ + + # 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_project_users`" + ) + + if page_size is not empty and page_size > 500: + raise ValueError( + "Invalid value for parameter `page_size` " + "when calling `get_project_users`, must be a value " + "less than or equal to " + "`500`" + ) + if page_size is not empty and page_size < 1: + raise ValueError( + "Invalid value for parameter `page_size` " + "when calling `get_project_users`, must be a value " + "greater than or equal to " + "`1`" + ) + collection_formats = {} + path_params = {} + + query_params = [] + + if page is not empty: + query_params.append(("page", page)) + + if page_size is not empty: + query_params.append(("pageSize", page_size)) + + 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("/projectsusers") + + 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="ProjectUsers", + 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_project_users") + + def get_projects( + self, + xero_tenant_id, + project_ids=empty, + contact_id=empty, + states=empty, + page=empty, + page_size=empty, + _return_http_data_only=True, + _preload_content=True, + _request_timeout=None, + ): + """list all projects # noqa: E501 + OAuth2 scope: projects, projects.read + Allows you to retrieve, create and update projects. # noqa: E501 + :param str xero_tenant_id: Xero identifier for Tenant (required) + :param list[str] project_ids: Search for all projects that match a comma separated list of projectIds + :param str contact_id: Filter for projects for a specific contact + :param str states: Filter for projects in a particular state (INPROGRESS or CLOSED) + :param int page: set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0. + :param int page_size: Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500. + :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: Projects + """ + + # 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_projects`" + ) + + if page_size is not empty and page_size > 500: + raise ValueError( + "Invalid value for parameter `page_size` " + "when calling `get_projects`, must be a value " + "less than or equal to " + "`500`" + ) + if page_size is not empty and page_size < 1: + raise ValueError( + "Invalid value for parameter `page_size` " + "when calling `get_projects`, must be a value " + "greater than or equal to " + "`1`" + ) + collection_formats = { + "projectIds": "multi", + } + path_params = {} + + query_params = [] + + if project_ids is not empty: + query_params.append(("projectIds", project_ids)) + + if contact_id is not empty: + query_params.append(("contactID", contact_id)) + + if states is not empty: + query_params.append(("states", states)) + + if page is not empty: + query_params.append(("page", page)) + + if page_size is not empty: + query_params.append(("pageSize", page_size)) + + 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("/projects") + + 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="Projects", + 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_projects") + + def get_task( + self, + xero_tenant_id, + project_id, + task_id, + _return_http_data_only=True, + _preload_content=True, + _request_timeout=None, + ): + """Allows you to retrieve a single project # noqa: E501 + OAuth2 scope: projects, projects.read + Allows you to retrieve a specific project # noqa: E501 + :param str xero_tenant_id: Xero identifier for Tenant (required) + :param str project_id: You can specify an individual project by appending the projectId to the endpoint (required) + :param str task_id: You can specify an individual task by appending the taskId to the endpoint, i.e. GET https://.../tasks/{taskId} (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: Task + """ + + # 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_task`" + ) + # verify the required parameter 'project_id' is set + if project_id is None: + raise ValueError( + "Missing the required parameter `project_id` " "when calling `get_task`" + ) + # verify the required parameter 'task_id' is set + if task_id is None: + raise ValueError( + "Missing the required parameter `task_id` " "when calling `get_task`" + ) + + collection_formats = {} + path_params = { + "projectId": project_id, + "taskId": task_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("/projects/{projectId}/tasks/{taskId}") + + 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="Task", + 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_task") + + def get_tasks( + self, + xero_tenant_id, + project_id, + page=empty, + page_size=empty, + task_ids=empty, + _return_http_data_only=True, + _preload_content=True, + _request_timeout=None, + ): + """Allows you to retrieve a single project # noqa: E501 + OAuth2 scope: projects, projects.read + Allows you to retrieve a specific project # noqa: E501 + :param str xero_tenant_id: Xero identifier for Tenant (required) + :param str project_id: You can specify an individual project by appending the projectId to the endpoint (required) + :param int page: Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0. + :param int page_size: Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500. + :param str task_ids: taskIdsSearch for all tasks that match a comma separated list of taskIds, i.e. GET https://.../tasks?taskIds={taskId},{taskId} + :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: Tasks + """ + + # 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_tasks`" + ) + # verify the required parameter 'project_id' is set + if project_id is None: + raise ValueError( + "Missing the required parameter `project_id` " + "when calling `get_tasks`" + ) + + collection_formats = {} + path_params = { + "projectId": project_id, + } + + query_params = [] + + if page is not empty: + query_params.append(("page", page)) + + if page_size is not empty: + query_params.append(("pageSize", page_size)) + + if task_ids is not empty: + query_params.append(("taskIds", task_ids)) + + header_params = { + "Xero-Tenant-Id": xero_tenant_id, + } + + local_var_files = {} + form_params = [] + + body_params = None + # HTTP header `Accept` + header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # Authentication setting + auth_settings = ["OAuth2"] + url = self.get_resource_url("/projects/{projectId}/tasks") + + 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="Tasks", + 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_tasks") + + def get_time_entries( + self, + xero_tenant_id, + project_id, + user_id=empty, + task_id=empty, + invoice_id=empty, + contact_id=empty, + page=empty, + page_size=empty, + states=empty, + is_chargeable=empty, + date_after_utc=empty, + date_before_utc=empty, + _return_http_data_only=True, + _preload_content=True, + _request_timeout=None, + ): + """Allows you to retrieve the time entries associated with a specific project # noqa: E501 + OAuth2 scope: projects, projects.read + Allows you to retrieve the time entries associated with a specific project # noqa: E501 + :param str xero_tenant_id: Xero identifier for Tenant (required) + :param str project_id: Identifier of the project, that the task (which the time entry is logged against) belongs to. (required) + :param str user_id: The xero user identifier of the person who logged time. + :param str task_id: Identifier of the task that time entry is logged against. + :param str invoice_id: Finds all time entries for this invoice. + :param str contact_id: Finds all time entries for this contact identifier. + :param int page: Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0. + :param int page_size: Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500. + :param list[str] states: Comma-separated list of states to find. Will find all time entries that are in the status of whatever’s specified. + :param bool is_chargeable: Finds all time entries which relate to tasks with the charge type `TIME` or `FIXED`. + :param datetime date_after_utc: ISO 8601 UTC date. Finds all time entries on or after this date filtered on the `dateUtc` field. + :param datetime date_before_utc: ISO 8601 UTC date. Finds all time entries on or before this date filtered on the `dateUtc` field. + :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: TimeEntries + """ + + # 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_time_entries`" + ) + # verify the required parameter 'project_id' is set + if project_id is None: + raise ValueError( + "Missing the required parameter `project_id` " + "when calling `get_time_entries`" + ) + + collection_formats = { + "states": "multi", + } + path_params = { + "projectId": project_id, + } + + query_params = [] + + if user_id is not empty: + query_params.append(("userId", user_id)) + + if task_id is not empty: + query_params.append(("taskId", task_id)) + + if invoice_id is not empty: + query_params.append(("invoiceId", invoice_id)) + + if contact_id is not empty: + query_params.append(("contactId", contact_id)) + + if page is not empty: + query_params.append(("page", page)) + + if page_size is not empty: + query_params.append(("pageSize", page_size)) + + if states is not empty: + query_params.append(("states", states)) + + if is_chargeable is not empty: + query_params.append(("isChargeable", is_chargeable)) + + if date_after_utc is not empty: + query_params.append(("dateAfterUtc", date_after_utc)) + + if date_before_utc is not empty: + query_params.append(("dateBeforeUtc", date_before_utc)) + + 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("/projects/{projectId}/time") + + 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="TimeEntries", + 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_time_entries") + + def get_time_entry( + self, + xero_tenant_id, + project_id, + time_entry_id, + _return_http_data_only=True, + _preload_content=True, + _request_timeout=None, + ): + """Allows you to get a single time entry in a project # noqa: E501 + OAuth2 scope: projects, projects.read + Allows you to upget a single time entry in a project # noqa: E501 + :param str xero_tenant_id: Xero identifier for Tenant (required) + :param str project_id: You can specify an individual project by appending the projectId to the endpoint (required) + :param str time_entry_id: You can specify an individual time entry by appending the id to the endpoint (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: TimeEntry + """ + + # 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_time_entry`" + ) + # verify the required parameter 'project_id' is set + if project_id is None: + raise ValueError( + "Missing the required parameter `project_id` " + "when calling `get_time_entry`" + ) + # verify the required parameter 'time_entry_id' is set + if time_entry_id is None: + raise ValueError( + "Missing the required parameter `time_entry_id` " + "when calling `get_time_entry`" + ) + + collection_formats = {} + path_params = { + "projectId": project_id, + "timeEntryId": time_entry_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("/projects/{projectId}/time/{timeEntryId}") + + 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="TimeEntry", + 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_time_entry") + + def patch_project( + self, + xero_tenant_id, + project_id, + project_patch, + _return_http_data_only=True, + _preload_content=True, + _request_timeout=None, + ): + """creates a project for the specified contact # noqa: E501 + OAuth2 scope: projects.create + Allows you to update a specific projects. # noqa: E501 + :param str xero_tenant_id: Xero identifier for Tenant (required) + :param str project_id: You can specify an individual project by appending the projectId to the endpoint (required) + :param ProjectPatch project_patch: Update the status of an existing Project (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: None + """ + + # 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 `patch_project`" + ) + # verify the required parameter 'project_id' is set + if project_id is None: + raise ValueError( + "Missing the required parameter `project_id` " + "when calling `patch_project`" + ) + # verify the required parameter 'project_patch' is set + if project_patch is None: + raise ValueError( + "Missing the required parameter `project_patch` " + "when calling `patch_project`" + ) + + collection_formats = {} + path_params = { + "projectId": project_id, + } + + query_params = [] + + header_params = { + "Xero-Tenant-Id": xero_tenant_id, + } + + local_var_files = {} + form_params = [] + + body_params = project_patch + # 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("/projects/{projectId}") + + try: + return self.api_client.call_api( + url, + "PATCH", + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + 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, "patch_project") + + def update_project( + self, + xero_tenant_id, + project_id, + project_create_or_update, + _return_http_data_only=True, + _preload_content=True, + _request_timeout=None, + ): + """update a specific project # noqa: E501 + OAuth2 scope: projects.create + Allows you to update a specific projects. # noqa: E501 + :param str xero_tenant_id: Xero identifier for Tenant (required) + :param str project_id: You can specify an individual project by appending the projectId to the endpoint (required) + :param ProjectCreateOrUpdate project_create_or_update: Request of type ProjectCreateOrUpdate (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: None + """ + + # verify the required parameter 'xero_tenant_id' is set + if xero_tenant_id is None: + raise ValueError( + "Missing the required parameter `xero_tenant_id` " + "when calling `update_project`" + ) + # verify the required parameter 'project_id' is set + if project_id is None: + raise ValueError( + "Missing the required parameter `project_id` " + "when calling `update_project`" + ) + # verify the required parameter 'project_create_or_update' is set + if project_create_or_update is None: + raise ValueError( + "Missing the required parameter `project_create_or_update` " + "when calling `update_project`" + ) + + collection_formats = {} + path_params = { + "projectId": project_id, + } + + query_params = [] + + header_params = { + "Xero-Tenant-Id": xero_tenant_id, + } + + local_var_files = {} + form_params = [] + + body_params = project_create_or_update + # 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("/projects/{projectId}") + + try: + return self.api_client.call_api( + url, + "PUT", + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + response_model_finder=self.get_model_finder(), + auth_settings=auth_settings, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + except exceptions.HTTPStatusException as error: + raise translate_status_exception(error, self, "update_project") + + def update_time_entry( + self, + xero_tenant_id, + project_id, + time_entry_id, + time_entry_create_or_update, + _return_http_data_only=True, + _preload_content=True, + _request_timeout=None, + ): + """Allows you to update time entry in a project # noqa: E501 + OAuth2 scope: projects, projects.read + Allows you to update time entry in a project # noqa: E501 + :param str xero_tenant_id: Xero identifier for Tenant (required) + :param str project_id: You can specify an individual project by appending the projectId to the endpoint (required) + :param str time_entry_id: You can specify an individual time entry by appending the id to the endpoint (required) + :param TimeEntryCreateOrUpdate time_entry_create_or_update: The time entry object you are updating (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: None + """ + + # verify the required parameter 'xero_tenant_id' is set + if xero_tenant_id is None: + raise ValueError( + "Missing the required parameter `xero_tenant_id` " + "when calling `update_time_entry`" + ) + # verify the required parameter 'project_id' is set + if project_id is None: + raise ValueError( + "Missing the required parameter `project_id` " + "when calling `update_time_entry`" + ) + # verify the required parameter 'time_entry_id' is set + if time_entry_id is None: + raise ValueError( + "Missing the required parameter `time_entry_id` " + "when calling `update_time_entry`" + ) + # verify the required parameter 'time_entry_create_or_update' is set + if time_entry_create_or_update is None: + raise ValueError( + "Missing the required parameter `time_entry_create_or_update` " + "when calling `update_time_entry`" + ) + + collection_formats = {} + path_params = { + "projectId": project_id, + "timeEntryId": time_entry_id, + } + + query_params = [] + + header_params = { + "Xero-Tenant-Id": xero_tenant_id, + } + + local_var_files = {} + form_params = [] + + body_params = time_entry_create_or_update + # 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("/projects/{projectId}/time/{timeEntryId}") + + try: + return self.api_client.call_api( + url, + "PUT", + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + response_model_finder=self.get_model_finder(), + auth_settings=auth_settings, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + except exceptions.HTTPStatusException as error: + raise translate_status_exception(error, self, "update_time_entry") diff --git a/xero_python/project/docs/Amount.md b/xero_python/project/docs/Amount.md new file mode 100644 index 00000000..87890ffa --- /dev/null +++ b/xero_python/project/docs/Amount.md @@ -0,0 +1,11 @@ +# Amount + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | [**CurrencyCode**](CurrencyCode.md) | | [optional] +**value** | **float** | | [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/project/docs/ChargeType.md b/xero_python/project/docs/ChargeType.md new file mode 100644 index 00000000..9b600487 --- /dev/null +++ b/xero_python/project/docs/ChargeType.md @@ -0,0 +1,9 @@ +# ChargeType + +## 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/project/docs/CurrencyCode.md b/xero_python/project/docs/CurrencyCode.md new file mode 100644 index 00000000..84a3f473 --- /dev/null +++ b/xero_python/project/docs/CurrencyCode.md @@ -0,0 +1,9 @@ +# CurrencyCode + +## 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/project/docs/Error.md b/xero_python/project/docs/Error.md new file mode 100644 index 00000000..27ad5aa4 --- /dev/null +++ b/xero_python/project/docs/Error.md @@ -0,0 +1,11 @@ +# Error + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | Exception message | [optional] +**model_state** | [**object**](.md) | Array of Elements of validation Errors | [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/project/docs/Pagination.md b/xero_python/project/docs/Pagination.md new file mode 100644 index 00000000..4137907a --- /dev/null +++ b/xero_python/project/docs/Pagination.md @@ -0,0 +1,13 @@ +# Pagination + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**page** | **int** | Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0. | [optional] +**page_size** | **int** | Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500. | [optional] +**page_count** | **int** | Number of pages available | [optional] +**item_count** | **int** | Number of items returned | [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/project/docs/Project.md b/xero_python/project/docs/Project.md new file mode 100644 index 00000000..80abd509 --- /dev/null +++ b/xero_python/project/docs/Project.md @@ -0,0 +1,31 @@ +# Project + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**project_id** | **str** | Identifier of the project. | [optional] +**contact_id** | **str** | Identifier of the contact this project was created for. | [optional] +**name** | **str** | Name of the project. | +**currency_code** | [**CurrencyCode**](CurrencyCode.md) | | [optional] +**minutes_logged** | **int** | A total of minutes logged against all tasks on the Project. | [optional] +**total_task_amount** | [**Amount**](Amount.md) | | [optional] +**total_expense_amount** | [**Amount**](Amount.md) | | [optional] +**estimate_amount** | [**Amount**](Amount.md) | | [optional] +**minutes_to_be_invoiced** | **int** | Minutes which have not been invoiced across all chargeable tasks in the project. | [optional] +**task_amount_to_be_invoiced** | [**Amount**](Amount.md) | | [optional] +**task_amount_invoiced** | [**Amount**](Amount.md) | | [optional] +**expense_amount_to_be_invoiced** | [**Amount**](Amount.md) | | [optional] +**expense_amount_invoiced** | [**Amount**](Amount.md) | | [optional] +**project_amount_invoiced** | [**Amount**](Amount.md) | | [optional] +**deposit** | [**Amount**](Amount.md) | | [optional] +**deposit_applied** | [**Amount**](Amount.md) | | [optional] +**credit_note_amount** | [**Amount**](Amount.md) | | [optional] +**deadline_utc** | **datetime** | Deadline for the project. UTC Date Time in ISO-8601 format. | [optional] +**total_invoiced** | [**Amount**](Amount.md) | | [optional] +**total_to_be_invoiced** | [**Amount**](Amount.md) | | [optional] +**estimate** | [**Amount**](Amount.md) | | [optional] +**status** | [**ProjectStatus**](ProjectStatus.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/project/docs/ProjectApi.md b/xero_python/project/docs/ProjectApi.md new file mode 100644 index 00000000..c2a1cd99 --- /dev/null +++ b/xero_python/project/docs/ProjectApi.md @@ -0,0 +1,912 @@ +# xero_python.project.ProjectApi + +All URIs are relative to *https://api.xero.com/projects.xro/2.0* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_project**](ProjectApi.md#create_project) | **POST** /projects | create one or more new projects +[**create_time_entry**](ProjectApi.md#create_time_entry) | **POST** /projects/{projectId}/time | Allows you to create a task +[**delete_time_entry**](ProjectApi.md#delete_time_entry) | **DELETE** /projects/{projectId}/time/{timeEntryId} | Allows you to delete a time entry +[**get_project**](ProjectApi.md#get_project) | **GET** /projects/{projectId} | Allows you to retrieve a single project +[**get_project_users**](ProjectApi.md#get_project_users) | **GET** /projectsusers | list all project users +[**get_projects**](ProjectApi.md#get_projects) | **GET** /projects | list all projects +[**get_task**](ProjectApi.md#get_task) | **GET** /projects/{projectId}/tasks/{taskId} | Allows you to retrieve a single project +[**get_tasks**](ProjectApi.md#get_tasks) | **GET** /projects/{projectId}/tasks | Allows you to retrieve a single project +[**get_time_entries**](ProjectApi.md#get_time_entries) | **GET** /projects/{projectId}/time | Allows you to retrieve the time entries associated with a specific project +[**get_time_entry**](ProjectApi.md#get_time_entry) | **GET** /projects/{projectId}/time/{timeEntryId} | Allows you to get a single time entry in a project +[**patch_project**](ProjectApi.md#patch_project) | **PATCH** /projects/{projectId} | creates a project for the specified contact +[**update_project**](ProjectApi.md#update_project) | **PUT** /projects/{projectId} | update a specific project +[**update_time_entry**](ProjectApi.md#update_time_entry) | **PUT** /projects/{projectId}/time/{timeEntryId} | Allows you to update time entry in a project + + +# **create_project** +> Project create_project(xero_tenant_id, project_create_or_update) + +create one or more new projects + +### 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.project import ProjectApi +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 = ProjectApi(api_client) + +xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant +project_create_or_update = { "contactId":"00000000-0000-0000-000-000000000000", "name":"New Kitchen", "deadlineUtc":"2019-12-10T12:59:59Z", "estimateAmount":"99.99" } # ProjectCreateOrUpdate | Create a new project with ProjectCreateOrUpdate object +try: + # create one or more new projects + api_response = api_instance.create_project(xero_tenant_id, project_create_or_update) + pprint(api_response) +except ApiException as e: + print("Exception when calling ProjectApi->create_project: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xero_tenant_id** | **str**| Xero identifier for Tenant | + **project_create_or_update** | [**ProjectCreateOrUpdate**](ProjectCreateOrUpdate.md)| Create a new project with ProjectCreateOrUpdate object | + +### Return type + +[**Project**](Project.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_time_entry** +> TimeEntry create_time_entry(xero_tenant_id, project_id, time_entry_create_or_update) + +Allows you to create a task + +Allows you to create a specific task + +### 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.project import ProjectApi +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 = ProjectApi(api_client) + +xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant +project_id = 'project_id_example' # str | You can specify an individual project by appending the projectId to the endpoint +time_entry_create_or_update = { "userId":"740add2a-a703-4b8a-a670-1093919c2040", "taskId":"7be77337-feec-4458-bb1b-dbaa5a4aafce", "dateUtc":"2020-02-26T15:00:00Z", "duration":30, "description":"My description" } # TimeEntryCreateOrUpdate | The time entry object you are creating +try: + # Allows you to create a task + api_response = api_instance.create_time_entry(xero_tenant_id, project_id, time_entry_create_or_update) + pprint(api_response) +except ApiException as e: + print("Exception when calling ProjectApi->create_time_entry: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xero_tenant_id** | **str**| Xero identifier for Tenant | + **project_id** | [**str**](.md)| You can specify an individual project by appending the projectId to the endpoint | + **time_entry_create_or_update** | [**TimeEntryCreateOrUpdate**](TimeEntryCreateOrUpdate.md)| The time entry object you are creating | + +### Return type + +[**TimeEntry**](TimeEntry.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_time_entry** +> delete_time_entry(xero_tenant_id, project_id, time_entry_id) + +Allows you to delete a time entry + +Allows you to delete a specific time entry + +### 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.project import ProjectApi + + +# 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 = ProjectApi(api_client) + +xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant +project_id = 'project_id_example' # str | You can specify an individual project by appending the projectId to the endpoint +time_entry_id = 'time_entry_id_example' # str | You can specify an individual task by appending the id to the endpoint +try: + # Allows you to delete a time entry + api_instance.delete_time_entry(xero_tenant_id, project_id, time_entry_id) +except ApiException as e: + print("Exception when calling ProjectApi->delete_time_entry: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xero_tenant_id** | **str**| Xero identifier for Tenant | + **project_id** | [**str**](.md)| You can specify an individual project by appending the projectId to the endpoint | + **time_entry_id** | [**str**](.md)| You can specify an individual task by appending the id to the endpoint | + +### Return type + +void (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[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_project** +> Project get_project(xero_tenant_id, project_id) + +Allows you to retrieve a single project + +Allows you to retrieve a specific project + +### 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.project import ProjectApi +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 = ProjectApi(api_client) + +xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant +project_id = 'project_id_example' # str | You can specify an individual project by appending the projectId to the endpoint +try: + # Allows you to retrieve a single project + api_response = api_instance.get_project(xero_tenant_id, project_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling ProjectApi->get_project: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xero_tenant_id** | **str**| Xero identifier for Tenant | + **project_id** | [**str**](.md)| You can specify an individual project by appending the projectId to the endpoint | + +### Return type + +[**Project**](Project.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_project_users** +> ProjectUsers get_project_users(xero_tenant_id, page=page, page_size=page_size) + +list all project users + +Allows you to retrieve the users on a projects. + +### 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.project import ProjectApi +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 = ProjectApi(api_client) + +xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant +page = 1 # int | set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0. (optional) (default to 1) +page_size = 50 # int | Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500. (optional) (default to 50) +try: + # list all project users + api_response = api_instance.get_project_users(xero_tenant_id, page=page, page_size=page_size) + pprint(api_response) +except ApiException as e: + print("Exception when calling ProjectApi->get_project_users: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xero_tenant_id** | **str**| Xero identifier for Tenant | + **page** | **int**| set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0. | [optional] [default to 1] + **page_size** | **int**| Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500. | [optional] [default to 50] + +### Return type + +[**ProjectUsers**](ProjectUsers.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_projects** +> Projects get_projects(xero_tenant_id, project_ids=project_ids, contact_id=contact_id, states=states, page=page, page_size=page_size) + +list all projects + +Allows you to retrieve, create and update projects. + +### 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.project import ProjectApi +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 = ProjectApi(api_client) + +xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant +project_ids = ['project_ids_example'] # list[str] | Search for all projects that match a comma separated list of projectIds (optional) +contact_id = 'contact_id_example' # str | Filter for projects for a specific contact (optional) +states = 'states_example' # str | Filter for projects in a particular state (INPROGRESS or CLOSED) (optional) +page = 1 # int | set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0. (optional) (default to 1) +page_size = 50 # int | Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500. (optional) (default to 50) +try: + # list all projects + api_response = api_instance.get_projects(xero_tenant_id, project_ids=project_ids, contact_id=contact_id, states=states, page=page, page_size=page_size) + pprint(api_response) +except ApiException as e: + print("Exception when calling ProjectApi->get_projects: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xero_tenant_id** | **str**| Xero identifier for Tenant | + **project_ids** | [**list[str]**](str.md)| Search for all projects that match a comma separated list of projectIds | [optional] + **contact_id** | [**str**](.md)| Filter for projects for a specific contact | [optional] + **states** | **str**| Filter for projects in a particular state (INPROGRESS or CLOSED) | [optional] + **page** | **int**| set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0. | [optional] [default to 1] + **page_size** | **int**| Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500. | [optional] [default to 50] + +### Return type + +[**Projects**](Projects.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_task** +> Task get_task(xero_tenant_id, project_id, task_id) + +Allows you to retrieve a single project + +Allows you to retrieve a specific project + +### 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.project import ProjectApi +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 = ProjectApi(api_client) + +xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant +project_id = 'project_id_example' # str | You can specify an individual project by appending the projectId to the endpoint +task_id = 'task_id_example' # str | You can specify an individual task by appending the taskId to the endpoint, i.e. GET https://.../tasks/{taskId} +try: + # Allows you to retrieve a single project + api_response = api_instance.get_task(xero_tenant_id, project_id, task_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling ProjectApi->get_task: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xero_tenant_id** | **str**| Xero identifier for Tenant | + **project_id** | [**str**](.md)| You can specify an individual project by appending the projectId to the endpoint | + **task_id** | [**str**](.md)| You can specify an individual task by appending the taskId to the endpoint, i.e. GET https://.../tasks/{taskId} | + +### Return type + +[**Task**](Task.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_tasks** +> Tasks get_tasks(xero_tenant_id, project_id, page=page, page_size=page_size, task_ids=task_ids) + +Allows you to retrieve a single project + +Allows you to retrieve a specific project + +### 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.project import ProjectApi +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 = ProjectApi(api_client) + +xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant +project_id = 'project_id_example' # str | You can specify an individual project by appending the projectId to the endpoint +page = 1 # int | Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0. (optional) +page_size = 10 # int | Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500. (optional) +task_ids = 'task_ids_example' # str | taskIdsSearch for all tasks that match a comma separated list of taskIds, i.e. GET https://.../tasks?taskIds={taskId},{taskId} (optional) +try: + # Allows you to retrieve a single project + api_response = api_instance.get_tasks(xero_tenant_id, project_id, page=page, page_size=page_size, task_ids=task_ids) + pprint(api_response) +except ApiException as e: + print("Exception when calling ProjectApi->get_tasks: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xero_tenant_id** | **str**| Xero identifier for Tenant | + **project_id** | [**str**](.md)| You can specify an individual project by appending the projectId to the endpoint | + **page** | **int**| Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0. | [optional] + **page_size** | **int**| Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500. | [optional] + **task_ids** | **str**| taskIdsSearch for all tasks that match a comma separated list of taskIds, i.e. GET https://.../tasks?taskIds={taskId},{taskId} | [optional] + +### Return type + +[**Tasks**](Tasks.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_time_entries** +> TimeEntries get_time_entries(xero_tenant_id, project_id, user_id=user_id, task_id=task_id, invoice_id=invoice_id, contact_id=contact_id, page=page, page_size=page_size, states=states, is_chargeable=is_chargeable, date_after_utc=date_after_utc, date_before_utc=date_before_utc) + +Allows you to retrieve the time entries associated with a specific project + +Allows you to retrieve the time entries associated with a specific project + +### 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.project import ProjectApi +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 = ProjectApi(api_client) + +xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant +project_id = 'project_id_example' # str | Identifier of the project, that the task (which the time entry is logged against) belongs to. +user_id = 'user_id_example' # str | The xero user identifier of the person who logged time. (optional) +task_id = 'task_id_example' # str | Identifier of the task that time entry is logged against. (optional) +invoice_id = 'invoice_id_example' # str | Finds all time entries for this invoice. (optional) +contact_id = 'contact_id_example' # str | Finds all time entries for this contact identifier. (optional) +page = 1 # int | Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0. (optional) +page_size = 10 # int | Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500. (optional) +states = ['states_example'] # list[str] | Comma-separated list of states to find. Will find all time entries that are in the status of whatever’s specified. (optional) +is_chargeable = True # bool | Finds all time entries which relate to tasks with the charge type `TIME` or `FIXED`. (optional) +date_after_utc = '2013-10-20T19:20:30+01:00' # datetime | ISO 8601 UTC date. Finds all time entries on or after this date filtered on the `dateUtc` field. (optional) +date_before_utc = '2013-10-20T19:20:30+01:00' # datetime | ISO 8601 UTC date. Finds all time entries on or before this date filtered on the `dateUtc` field. (optional) +try: + # Allows you to retrieve the time entries associated with a specific project + api_response = api_instance.get_time_entries(xero_tenant_id, project_id, user_id=user_id, task_id=task_id, invoice_id=invoice_id, contact_id=contact_id, page=page, page_size=page_size, states=states, is_chargeable=is_chargeable, date_after_utc=date_after_utc, date_before_utc=date_before_utc) + pprint(api_response) +except ApiException as e: + print("Exception when calling ProjectApi->get_time_entries: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xero_tenant_id** | **str**| Xero identifier for Tenant | + **project_id** | [**str**](.md)| Identifier of the project, that the task (which the time entry is logged against) belongs to. | + **user_id** | [**str**](.md)| The xero user identifier of the person who logged time. | [optional] + **task_id** | [**str**](.md)| Identifier of the task that time entry is logged against. | [optional] + **invoice_id** | [**str**](.md)| Finds all time entries for this invoice. | [optional] + **contact_id** | [**str**](.md)| Finds all time entries for this contact identifier. | [optional] + **page** | **int**| Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0. | [optional] + **page_size** | **int**| Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500. | [optional] + **states** | [**list[str]**](str.md)| Comma-separated list of states to find. Will find all time entries that are in the status of whatever’s specified. | [optional] + **is_chargeable** | **bool**| Finds all time entries which relate to tasks with the charge type `TIME` or `FIXED`. | [optional] + **date_after_utc** | **datetime**| ISO 8601 UTC date. Finds all time entries on or after this date filtered on the `dateUtc` field. | [optional] + **date_before_utc** | **datetime**| ISO 8601 UTC date. Finds all time entries on or before this date filtered on the `dateUtc` field. | [optional] + +### Return type + +[**TimeEntries**](TimeEntries.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_time_entry** +> TimeEntry get_time_entry(xero_tenant_id, project_id, time_entry_id) + +Allows you to get a single time entry in a project + +Allows you to upget a single time entry in a project + +### 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.project import ProjectApi +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 = ProjectApi(api_client) + +xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant +project_id = 'project_id_example' # str | You can specify an individual project by appending the projectId to the endpoint +time_entry_id = 'time_entry_id_example' # str | You can specify an individual time entry by appending the id to the endpoint +try: + # Allows you to get a single time entry in a project + api_response = api_instance.get_time_entry(xero_tenant_id, project_id, time_entry_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling ProjectApi->get_time_entry: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xero_tenant_id** | **str**| Xero identifier for Tenant | + **project_id** | [**str**](.md)| You can specify an individual project by appending the projectId to the endpoint | + **time_entry_id** | [**str**](.md)| You can specify an individual time entry by appending the id to the endpoint | + +### Return type + +[**TimeEntry**](TimeEntry.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) + +# **patch_project** +> patch_project(xero_tenant_id, project_id, project_patch) + +creates a project for the specified contact + +Allows you to update a specific projects. + +### 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.project import ProjectApi + + +# 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 = ProjectApi(api_client) + +xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant +project_id = 'project_id_example' # str | You can specify an individual project by appending the projectId to the endpoint +project_patch = { "status": "INPROGRESS" } # ProjectPatch | Update the status of an existing Project +try: + # creates a project for the specified contact + api_instance.patch_project(xero_tenant_id, project_id, project_patch) +except ApiException as e: + print("Exception when calling ProjectApi->patch_project: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xero_tenant_id** | **str**| Xero identifier for Tenant | + **project_id** | [**str**](.md)| You can specify an individual project by appending the projectId to the endpoint | + **project_patch** | [**ProjectPatch**](ProjectPatch.md)| Update the status of an existing Project | + +### Return type + +void (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_project** +> update_project(xero_tenant_id, project_id, project_create_or_update) + +update a specific project + +Allows you to update a specific projects. + +### 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.project import ProjectApi + + +# 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 = ProjectApi(api_client) + +xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant +project_id = 'project_id_example' # str | You can specify an individual project by appending the projectId to the endpoint +project_create_or_update = { "name": "New Kitchen", "deadlineUtc": "2017-04-23T18:25:43.511Z", "estimateAmount": 99.99 } # ProjectCreateOrUpdate | Request of type ProjectCreateOrUpdate +try: + # update a specific project + api_instance.update_project(xero_tenant_id, project_id, project_create_or_update) +except ApiException as e: + print("Exception when calling ProjectApi->update_project: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xero_tenant_id** | **str**| Xero identifier for Tenant | + **project_id** | [**str**](.md)| You can specify an individual project by appending the projectId to the endpoint | + **project_create_or_update** | [**ProjectCreateOrUpdate**](ProjectCreateOrUpdate.md)| Request of type ProjectCreateOrUpdate | + +### Return type + +void (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_time_entry** +> update_time_entry(xero_tenant_id, project_id, time_entry_id, time_entry_create_or_update) + +Allows you to update time entry in a project + +Allows you to update time entry in a project + +### 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.project import ProjectApi + + +# 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 = ProjectApi(api_client) + +xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant +project_id = 'project_id_example' # str | You can specify an individual project by appending the projectId to the endpoint +time_entry_id = 'time_entry_id_example' # str | You can specify an individual time entry by appending the id to the endpoint +time_entry_create_or_update = { "userId":"740add2a-a703-4b8a-a670-1093919c2040", "taskId":"7be77337-feec-4458-bb1b-dbaa5a4aafce", "dateUtc":"2020-02-27T15:00:00Z", "duration":45, "description":"My UPDATED description" } # TimeEntryCreateOrUpdate | The time entry object you are updating +try: + # Allows you to update time entry in a project + api_instance.update_time_entry(xero_tenant_id, project_id, time_entry_id, time_entry_create_or_update) +except ApiException as e: + print("Exception when calling ProjectApi->update_time_entry: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xero_tenant_id** | **str**| Xero identifier for Tenant | + **project_id** | [**str**](.md)| You can specify an individual project by appending the projectId to the endpoint | + **time_entry_id** | [**str**](.md)| You can specify an individual time entry by appending the id to the endpoint | + **time_entry_create_or_update** | [**TimeEntryCreateOrUpdate**](TimeEntryCreateOrUpdate.md)| The time entry object you are updating | + +### Return type + +void (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[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/project/docs/ProjectCreateOrUpdate.md b/xero_python/project/docs/ProjectCreateOrUpdate.md new file mode 100644 index 00000000..dcc5df60 --- /dev/null +++ b/xero_python/project/docs/ProjectCreateOrUpdate.md @@ -0,0 +1,13 @@ +# ProjectCreateOrUpdate + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**contact_id** | **str** | Identifier of the contact this project was created for. | [optional] +**name** | **str** | Name of the project. | +**estimate_amount** | **float** | | [optional] +**deadline_utc** | **datetime** | Deadline for the project. UTC Date Time in ISO-8601 format. | [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/project/docs/ProjectPatch.md b/xero_python/project/docs/ProjectPatch.md new file mode 100644 index 00000000..07853bca --- /dev/null +++ b/xero_python/project/docs/ProjectPatch.md @@ -0,0 +1,10 @@ +# ProjectPatch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | [**ProjectStatus**](ProjectStatus.md) | | + +[[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/project/docs/ProjectStatus.md b/xero_python/project/docs/ProjectStatus.md new file mode 100644 index 00000000..0349beb3 --- /dev/null +++ b/xero_python/project/docs/ProjectStatus.md @@ -0,0 +1,9 @@ +# ProjectStatus + +## 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/project/docs/ProjectUser.md b/xero_python/project/docs/ProjectUser.md new file mode 100644 index 00000000..bcc2b3b0 --- /dev/null +++ b/xero_python/project/docs/ProjectUser.md @@ -0,0 +1,12 @@ +# ProjectUser + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_id** | **str** | Identifier of the user of the project. | [optional] +**name** | **str** | Full name of the user. | [optional] +**email** | **str** | Email address of the user. | [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/project/docs/ProjectUsers.md b/xero_python/project/docs/ProjectUsers.md new file mode 100644 index 00000000..f8e813c4 --- /dev/null +++ b/xero_python/project/docs/ProjectUsers.md @@ -0,0 +1,11 @@ +# ProjectUsers + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**Pagination**](Pagination.md) | | [optional] +**items** | [**list[ProjectUser]**](ProjectUser.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/project/docs/Projects.md b/xero_python/project/docs/Projects.md new file mode 100644 index 00000000..fcb49a9b --- /dev/null +++ b/xero_python/project/docs/Projects.md @@ -0,0 +1,11 @@ +# Projects + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**Pagination**](Pagination.md) | | [optional] +**items** | [**list[Project]**](Project.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/project/docs/Task.md b/xero_python/project/docs/Task.md new file mode 100644 index 00000000..a579df7b --- /dev/null +++ b/xero_python/project/docs/Task.md @@ -0,0 +1,24 @@ +# Task + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**task_id** | **str** | Identifier of the task. | [optional] +**name** | **str** | Name of the task. | [optional] +**rate** | [**Amount**](Amount.md) | | [optional] +**charge_type** | [**ChargeType**](ChargeType.md) | | [optional] +**estimate_minutes** | **float** | An estimated time to perform the task | [optional] +**project_id** | **str** | Identifier of the project task belongs to. | [optional] +**total_minutes** | **float** | Total minutes which have been logged against the task. Logged by assigning a time entry to a task | [optional] +**total_amount** | [**Amount**](Amount.md) | | [optional] +**minutes_invoiced** | **float** | Minutes on this task which have been invoiced. | [optional] +**minutes_to_be_invoiced** | **float** | Minutes on this task which have not been invoiced. | [optional] +**fixed_minutes** | **float** | Minutes logged against this task if its charge type is `FIXED`. | [optional] +**non_chargeable_minutes** | **float** | Minutes logged against this task if its charge type is `NON_CHARGEABLE`. | [optional] +**amount_to_be_invoiced** | [**Amount**](Amount.md) | | [optional] +**amount_invoiced** | [**Amount**](Amount.md) | | [optional] +**status** | **str** | Status of the task. When a task of ChargeType is `FIXED` and the rate amount is invoiced the status will be set to `INVOICED` and can't be modified. A task with ChargeType of `TIME` or `NON_CHARGEABLE` cannot have a status of `INVOICED`. A `LOCKED` state indicates that the task is currently changing state (for example being invoiced) and can't be modified. | [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/project/docs/TaskCreateOrUpdate.md b/xero_python/project/docs/TaskCreateOrUpdate.md new file mode 100644 index 00000000..0866e1f0 --- /dev/null +++ b/xero_python/project/docs/TaskCreateOrUpdate.md @@ -0,0 +1,13 @@ +# TaskCreateOrUpdate + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of the task. Max length 100 characters. | +**rate** | [**Amount**](Amount.md) | | +**charge_type** | [**ChargeType**](ChargeType.md) | | +**estimate_minutes** | **int** | Estimated time to perform the task. EstimateMinutes has to be greater than 0 if provided. | [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/project/docs/Tasks.md b/xero_python/project/docs/Tasks.md new file mode 100644 index 00000000..693b8de7 --- /dev/null +++ b/xero_python/project/docs/Tasks.md @@ -0,0 +1,11 @@ +# Tasks + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**Pagination**](Pagination.md) | | [optional] +**items** | [**list[Task]**](Task.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/project/docs/TimeEntries.md b/xero_python/project/docs/TimeEntries.md new file mode 100644 index 00000000..28b76f4e --- /dev/null +++ b/xero_python/project/docs/TimeEntries.md @@ -0,0 +1,11 @@ +# TimeEntries + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**Pagination**](Pagination.md) | | [optional] +**items** | [**list[TimeEntry]**](TimeEntry.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/project/docs/TimeEntry.md b/xero_python/project/docs/TimeEntry.md new file mode 100644 index 00000000..386cf7eb --- /dev/null +++ b/xero_python/project/docs/TimeEntry.md @@ -0,0 +1,18 @@ +# TimeEntry + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**time_entry_id** | **str** | Identifier of the time entry. | [optional] +**user_id** | **str** | The xero user identifier of the person who logged time. | [optional] +**project_id** | **str** | Identifier of the project, that the task (which the time entry is logged against) belongs to. | [optional] +**task_id** | **str** | Identifier of the task that time entry is logged against. | [optional] +**date_utc** | **datetime** | The date time that time entry is logged on. UTC Date Time in ISO-8601 format. | [optional] +**date_entered_utc** | **datetime** | The date time that time entry is created. UTC Date Time in ISO-8601 format. By default it is set to server time. | [optional] +**duration** | **int** | The duration of logged minutes. | [optional] +**description** | **str** | A description of the time entry. | [optional] +**status** | **str** | Status of the time entry. By default a time entry is created with status of `ACTIVE`. A `LOCKED` state indicates that the time entry is currently changing state (for example being invoiced). Updates are not allowed when in this state. It will have a status of INVOICED once it is invoiced. | [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/project/docs/TimeEntryCreateOrUpdate.md b/xero_python/project/docs/TimeEntryCreateOrUpdate.md new file mode 100644 index 00000000..65a1e42e --- /dev/null +++ b/xero_python/project/docs/TimeEntryCreateOrUpdate.md @@ -0,0 +1,14 @@ +# TimeEntryCreateOrUpdate + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_id** | **str** | The xero user identifier of the person logging the time. | +**task_id** | **str** | Identifier of the task that time entry is logged against. | +**date_utc** | **datetime** | Date time entry is logged on. UTC Date Time in ISO-8601 format. | +**duration** | **int** | Number of minutes to be logged. Duration is between 1 and 59940 inclusively. | +**description** | **str** | An optional description of the time entry, will be set to null if not provided during update. | [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/project/models/__init__.py b/xero_python/project/models/__init__.py new file mode 100644 index 00000000..016fe787 --- /dev/null +++ b/xero_python/project/models/__init__.py @@ -0,0 +1,35 @@ +# coding: utf-8 + +# flake8: noqa +""" + Xero Projects API + + This is the Xero Projects API # noqa: E501 + + OpenAPI spec version: 2.2.6 + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +# import models into model package +from xero_python.project.models.amount import Amount +from xero_python.project.models.charge_type import ChargeType +from xero_python.project.models.currency_code import CurrencyCode +from xero_python.project.models.error import Error +from xero_python.project.models.pagination import Pagination +from xero_python.project.models.project import Project +from xero_python.project.models.project_create_or_update import ProjectCreateOrUpdate +from xero_python.project.models.project_patch import ProjectPatch +from xero_python.project.models.project_status import ProjectStatus +from xero_python.project.models.project_user import ProjectUser +from xero_python.project.models.project_users import ProjectUsers +from xero_python.project.models.projects import Projects +from xero_python.project.models.task import Task +from xero_python.project.models.task_create_or_update import TaskCreateOrUpdate +from xero_python.project.models.tasks import Tasks +from xero_python.project.models.time_entries import TimeEntries +from xero_python.project.models.time_entry import TimeEntry +from xero_python.project.models.time_entry_create_or_update import ( + TimeEntryCreateOrUpdate, +) diff --git a/xero_python/project/models/amount.py b/xero_python/project/models/amount.py new file mode 100644 index 00000000..43458988 --- /dev/null +++ b/xero_python/project/models/amount.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Xero Projects API + + This is the Xero Projects API # noqa: E501 + + OpenAPI spec version: 2.2.6 + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 + +from xero_python.models import BaseModel + + +class Amount(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 = {"currency": "CurrencyCode", "value": "float"} + + attribute_map = {"currency": "currency", "value": "value"} + + def __init__(self, currency=None, value=None): # noqa: E501 + """Amount - a model defined in OpenAPI""" # noqa: E501 + + self._currency = None + self._value = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if value is not None: + self.value = value + + @property + def currency(self): + """Gets the currency of this Amount. # noqa: E501 + + + :return: The currency of this Amount. # noqa: E501 + :rtype: CurrencyCode + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this Amount. + + + :param currency: The currency of this Amount. # noqa: E501 + :type: CurrencyCode + """ + + self._currency = currency + + @property + def value(self): + """Gets the value of this Amount. # noqa: E501 + + + :return: The value of this Amount. # noqa: E501 + :rtype: float + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this Amount. + + + :param value: The value of this Amount. # noqa: E501 + :type: float + """ + + self._value = value diff --git a/xero_python/project/models/charge_type.py b/xero_python/project/models/charge_type.py new file mode 100644 index 00000000..723767a8 --- /dev/null +++ b/xero_python/project/models/charge_type.py @@ -0,0 +1,30 @@ +# coding: utf-8 + +""" + Xero Projects API + + This is the Xero Projects API # noqa: E501 + + OpenAPI spec version: 2.2.6 + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 + +from enum import Enum + + +class ChargeType(Enum): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + allowed enum values + """ + + TIME = "TIME" + FIXED = "FIXED" + NON_CHARGEABLE = "NON_CHARGEABLE" diff --git a/xero_python/project/models/currency_code.py b/xero_python/project/models/currency_code.py new file mode 100644 index 00000000..37359996 --- /dev/null +++ b/xero_python/project/models/currency_code.py @@ -0,0 +1,191 @@ +# coding: utf-8 + +""" + Xero Projects API + + This is the Xero Projects API # noqa: E501 + + OpenAPI spec version: 2.2.6 + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 + +from enum import Enum + + +class CurrencyCode(Enum): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + allowed enum values + """ + + AED = "AED" + AFN = "AFN" + ALL = "ALL" + AMD = "AMD" + ANG = "ANG" + AOA = "AOA" + ARS = "ARS" + AUD = "AUD" + AWG = "AWG" + AZN = "AZN" + BAM = "BAM" + BBD = "BBD" + BDT = "BDT" + BGN = "BGN" + BHD = "BHD" + BIF = "BIF" + BMD = "BMD" + BND = "BND" + BOB = "BOB" + BRL = "BRL" + BSD = "BSD" + BTN = "BTN" + BWP = "BWP" + BYN = "BYN" + BZD = "BZD" + CAD = "CAD" + CDF = "CDF" + CHF = "CHF" + CLP = "CLP" + CNY = "CNY" + COP = "COP" + CRC = "CRC" + CUC = "CUC" + CUP = "CUP" + CVE = "CVE" + CZK = "CZK" + DJF = "DJF" + DKK = "DKK" + DOP = "DOP" + DZD = "DZD" + EGP = "EGP" + ERN = "ERN" + ETB = "ETB" + EUR = "EUR" + FJD = "FJD" + FKP = "FKP" + GBP = "GBP" + GEL = "GEL" + GGP = "GGP" + GHS = "GHS" + GIP = "GIP" + GMD = "GMD" + GNF = "GNF" + GTQ = "GTQ" + GYD = "GYD" + HKD = "HKD" + HNL = "HNL" + HRK = "HRK" + HTG = "HTG" + HUF = "HUF" + IDR = "IDR" + ILS = "ILS" + IMP = "IMP" + INR = "INR" + IQD = "IQD" + IRR = "IRR" + ISK = "ISK" + JEP = "JEP" + JMD = "JMD" + JOD = "JOD" + JPY = "JPY" + KES = "KES" + KGS = "KGS" + KHR = "KHR" + KMF = "KMF" + KPW = "KPW" + KRW = "KRW" + KWD = "KWD" + KYD = "KYD" + KZT = "KZT" + LAK = "LAK" + LBP = "LBP" + LKR = "LKR" + LRD = "LRD" + LSL = "LSL" + LYD = "LYD" + MAD = "MAD" + MDL = "MDL" + MGA = "MGA" + MKD = "MKD" + MMK = "MMK" + MNT = "MNT" + MOP = "MOP" + MRU = "MRU" + MUR = "MUR" + MVR = "MVR" + MWK = "MWK" + MXN = "MXN" + MYR = "MYR" + MZN = "MZN" + NAD = "NAD" + NGN = "NGN" + NIO = "NIO" + NOK = "NOK" + NPR = "NPR" + NZD = "NZD" + OMR = "OMR" + PAB = "PAB" + PEN = "PEN" + PGK = "PGK" + PHP = "PHP" + PKR = "PKR" + PLN = "PLN" + PYG = "PYG" + QAR = "QAR" + RON = "RON" + RSD = "RSD" + RUB = "RUB" + RWF = "RWF" + SAR = "SAR" + SBD = "SBD" + SCR = "SCR" + SDG = "SDG" + SEK = "SEK" + SGD = "SGD" + SHP = "SHP" + SLL = "SLL" + SOS = "SOS" + SPL = "SPL" + SRD = "SRD" + STN = "STN" + SVC = "SVC" + SYP = "SYP" + SZL = "SZL" + THB = "THB" + TJS = "TJS" + TMT = "TMT" + TND = "TND" + TOP = "TOP" + TRY = "TRY" + TTD = "TTD" + TVD = "TVD" + TWD = "TWD" + TZS = "TZS" + UAH = "UAH" + UGX = "UGX" + USD = "USD" + UYU = "UYU" + UZS = "UZS" + VEF = "VEF" + VND = "VND" + VUV = "VUV" + WST = "WST" + XAF = "XAF" + XCD = "XCD" + XDR = "XDR" + XOF = "XOF" + XPF = "XPF" + YER = "YER" + ZAR = "ZAR" + ZMW = "ZMW" + ZMK = "ZMK" + ZWD = "ZWD" + EMPTY = "" diff --git a/xero_python/project/models/error.py b/xero_python/project/models/error.py new file mode 100644 index 00000000..0d85a651 --- /dev/null +++ b/xero_python/project/models/error.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Xero Projects API + + This is the Xero Projects API # noqa: E501 + + OpenAPI spec version: 2.2.6 + 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 = {"message": "str", "model_state": "object"} + + attribute_map = {"message": "message", "model_state": "modelState"} + + def __init__(self, message=None, model_state=None): # noqa: E501 + """Error - a model defined in OpenAPI""" # noqa: E501 + + self._message = None + self._model_state = None + self.discriminator = None + + if message is not None: + self.message = message + if model_state is not None: + self.model_state = model_state + + @property + def message(self): + """Gets the message of this Error. # noqa: E501 + + Exception message # noqa: E501 + + :return: The message of this Error. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this Error. + + Exception message # noqa: E501 + + :param message: The message of this Error. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def model_state(self): + """Gets the model_state of this Error. # noqa: E501 + + Array of Elements of validation Errors # noqa: E501 + + :return: The model_state of this Error. # noqa: E501 + :rtype: object + """ + return self._model_state + + @model_state.setter + def model_state(self, model_state): + """Sets the model_state of this Error. + + Array of Elements of validation Errors # noqa: E501 + + :param model_state: The model_state of this Error. # noqa: E501 + :type: object + """ + + self._model_state = model_state diff --git a/xero_python/project/models/pagination.py b/xero_python/project/models/pagination.py new file mode 100644 index 00000000..3be890aa --- /dev/null +++ b/xero_python/project/models/pagination.py @@ -0,0 +1,157 @@ +# coding: utf-8 + +""" + Xero Projects API + + This is the Xero Projects API # noqa: E501 + + OpenAPI spec version: 2.2.6 + 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 + + Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0. # 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. + + Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0. # noqa: E501 + + :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 + + Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500. # 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. + + Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500. # noqa: E501 + + :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 + + Number of pages available # 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. + + Number of pages available # noqa: E501 + + :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 + + Number of items returned # 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. + + Number of items returned # noqa: E501 + + :param item_count: The item_count of this Pagination. # noqa: E501 + :type: int + """ + + self._item_count = item_count diff --git a/xero_python/project/models/project.py b/xero_python/project/models/project.py new file mode 100644 index 00000000..b485bbeb --- /dev/null +++ b/xero_python/project/models/project.py @@ -0,0 +1,654 @@ +# coding: utf-8 + +""" + Xero Projects API + + This is the Xero Projects API # noqa: E501 + + OpenAPI spec version: 2.2.6 + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 + +from xero_python.models import BaseModel + + +class Project(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 = { + "project_id": "str", + "contact_id": "str", + "name": "str", + "currency_code": "CurrencyCode", + "minutes_logged": "int", + "total_task_amount": "Amount", + "total_expense_amount": "Amount", + "estimate_amount": "Amount", + "minutes_to_be_invoiced": "int", + "task_amount_to_be_invoiced": "Amount", + "task_amount_invoiced": "Amount", + "expense_amount_to_be_invoiced": "Amount", + "expense_amount_invoiced": "Amount", + "project_amount_invoiced": "Amount", + "deposit": "Amount", + "deposit_applied": "Amount", + "credit_note_amount": "Amount", + "deadline_utc": "datetime", + "total_invoiced": "Amount", + "total_to_be_invoiced": "Amount", + "estimate": "Amount", + "status": "ProjectStatus", + } + + attribute_map = { + "project_id": "projectId", + "contact_id": "contactId", + "name": "name", + "currency_code": "currencyCode", + "minutes_logged": "minutesLogged", + "total_task_amount": "totalTaskAmount", + "total_expense_amount": "totalExpenseAmount", + "estimate_amount": "estimateAmount", + "minutes_to_be_invoiced": "minutesToBeInvoiced", + "task_amount_to_be_invoiced": "taskAmountToBeInvoiced", + "task_amount_invoiced": "taskAmountInvoiced", + "expense_amount_to_be_invoiced": "expenseAmountToBeInvoiced", + "expense_amount_invoiced": "expenseAmountInvoiced", + "project_amount_invoiced": "projectAmountInvoiced", + "deposit": "deposit", + "deposit_applied": "depositApplied", + "credit_note_amount": "creditNoteAmount", + "deadline_utc": "deadlineUtc", + "total_invoiced": "totalInvoiced", + "total_to_be_invoiced": "totalToBeInvoiced", + "estimate": "estimate", + "status": "status", + } + + def __init__( + self, + project_id=None, + contact_id=None, + name=None, + currency_code=None, + minutes_logged=None, + total_task_amount=None, + total_expense_amount=None, + estimate_amount=None, + minutes_to_be_invoiced=None, + task_amount_to_be_invoiced=None, + task_amount_invoiced=None, + expense_amount_to_be_invoiced=None, + expense_amount_invoiced=None, + project_amount_invoiced=None, + deposit=None, + deposit_applied=None, + credit_note_amount=None, + deadline_utc=None, + total_invoiced=None, + total_to_be_invoiced=None, + estimate=None, + status=None, + ): # noqa: E501 + """Project - a model defined in OpenAPI""" # noqa: E501 + + self._project_id = None + self._contact_id = None + self._name = None + self._currency_code = None + self._minutes_logged = None + self._total_task_amount = None + self._total_expense_amount = None + self._estimate_amount = None + self._minutes_to_be_invoiced = None + self._task_amount_to_be_invoiced = None + self._task_amount_invoiced = None + self._expense_amount_to_be_invoiced = None + self._expense_amount_invoiced = None + self._project_amount_invoiced = None + self._deposit = None + self._deposit_applied = None + self._credit_note_amount = None + self._deadline_utc = None + self._total_invoiced = None + self._total_to_be_invoiced = None + self._estimate = None + self._status = None + self.discriminator = None + + if project_id is not None: + self.project_id = project_id + if contact_id is not None: + self.contact_id = contact_id + self.name = name + if currency_code is not None: + self.currency_code = currency_code + if minutes_logged is not None: + self.minutes_logged = minutes_logged + if total_task_amount is not None: + self.total_task_amount = total_task_amount + if total_expense_amount is not None: + self.total_expense_amount = total_expense_amount + if estimate_amount is not None: + self.estimate_amount = estimate_amount + if minutes_to_be_invoiced is not None: + self.minutes_to_be_invoiced = minutes_to_be_invoiced + if task_amount_to_be_invoiced is not None: + self.task_amount_to_be_invoiced = task_amount_to_be_invoiced + if task_amount_invoiced is not None: + self.task_amount_invoiced = task_amount_invoiced + if expense_amount_to_be_invoiced is not None: + self.expense_amount_to_be_invoiced = expense_amount_to_be_invoiced + if expense_amount_invoiced is not None: + self.expense_amount_invoiced = expense_amount_invoiced + if project_amount_invoiced is not None: + self.project_amount_invoiced = project_amount_invoiced + if deposit is not None: + self.deposit = deposit + if deposit_applied is not None: + self.deposit_applied = deposit_applied + if credit_note_amount is not None: + self.credit_note_amount = credit_note_amount + if deadline_utc is not None: + self.deadline_utc = deadline_utc + if total_invoiced is not None: + self.total_invoiced = total_invoiced + if total_to_be_invoiced is not None: + self.total_to_be_invoiced = total_to_be_invoiced + if estimate is not None: + self.estimate = estimate + if status is not None: + self.status = status + + @property + def project_id(self): + """Gets the project_id of this Project. # noqa: E501 + + Identifier of the project. # noqa: E501 + + :return: The project_id of this Project. # noqa: E501 + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this Project. + + Identifier of the project. # noqa: E501 + + :param project_id: The project_id of this Project. # noqa: E501 + :type: str + """ + + self._project_id = project_id + + @property + def contact_id(self): + """Gets the contact_id of this Project. # noqa: E501 + + Identifier of the contact this project was created for. # noqa: E501 + + :return: The contact_id of this Project. # noqa: E501 + :rtype: str + """ + return self._contact_id + + @contact_id.setter + def contact_id(self, contact_id): + """Sets the contact_id of this Project. + + Identifier of the contact this project was created for. # noqa: E501 + + :param contact_id: The contact_id of this Project. # noqa: E501 + :type: str + """ + + self._contact_id = contact_id + + @property + def name(self): + """Gets the name of this Project. # noqa: E501 + + Name of the project. # noqa: E501 + + :return: The name of this Project. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Project. + + Name of the project. # noqa: E501 + + :param name: The name of this Project. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError( + "Invalid value for `name`, must not be `None`" + ) # noqa: E501 + + self._name = name + + @property + def currency_code(self): + """Gets the currency_code of this Project. # noqa: E501 + + + :return: The currency_code of this Project. # noqa: E501 + :rtype: CurrencyCode + """ + return self._currency_code + + @currency_code.setter + def currency_code(self, currency_code): + """Sets the currency_code of this Project. + + + :param currency_code: The currency_code of this Project. # noqa: E501 + :type: CurrencyCode + """ + + self._currency_code = currency_code + + @property + def minutes_logged(self): + """Gets the minutes_logged of this Project. # noqa: E501 + + A total of minutes logged against all tasks on the Project. # noqa: E501 + + :return: The minutes_logged of this Project. # noqa: E501 + :rtype: int + """ + return self._minutes_logged + + @minutes_logged.setter + def minutes_logged(self, minutes_logged): + """Sets the minutes_logged of this Project. + + A total of minutes logged against all tasks on the Project. # noqa: E501 + + :param minutes_logged: The minutes_logged of this Project. # noqa: E501 + :type: int + """ + + self._minutes_logged = minutes_logged + + @property + def total_task_amount(self): + """Gets the total_task_amount of this Project. # noqa: E501 + + + :return: The total_task_amount of this Project. # noqa: E501 + :rtype: Amount + """ + return self._total_task_amount + + @total_task_amount.setter + def total_task_amount(self, total_task_amount): + """Sets the total_task_amount of this Project. + + + :param total_task_amount: The total_task_amount of this Project. # noqa: E501 + :type: Amount + """ + + self._total_task_amount = total_task_amount + + @property + def total_expense_amount(self): + """Gets the total_expense_amount of this Project. # noqa: E501 + + + :return: The total_expense_amount of this Project. # noqa: E501 + :rtype: Amount + """ + return self._total_expense_amount + + @total_expense_amount.setter + def total_expense_amount(self, total_expense_amount): + """Sets the total_expense_amount of this Project. + + + :param total_expense_amount: The total_expense_amount of this Project. # noqa: E501 + :type: Amount + """ + + self._total_expense_amount = total_expense_amount + + @property + def estimate_amount(self): + """Gets the estimate_amount of this Project. # noqa: E501 + + + :return: The estimate_amount of this Project. # noqa: E501 + :rtype: Amount + """ + return self._estimate_amount + + @estimate_amount.setter + def estimate_amount(self, estimate_amount): + """Sets the estimate_amount of this Project. + + + :param estimate_amount: The estimate_amount of this Project. # noqa: E501 + :type: Amount + """ + + self._estimate_amount = estimate_amount + + @property + def minutes_to_be_invoiced(self): + """Gets the minutes_to_be_invoiced of this Project. # noqa: E501 + + Minutes which have not been invoiced across all chargeable tasks in the project. # noqa: E501 + + :return: The minutes_to_be_invoiced of this Project. # noqa: E501 + :rtype: int + """ + return self._minutes_to_be_invoiced + + @minutes_to_be_invoiced.setter + def minutes_to_be_invoiced(self, minutes_to_be_invoiced): + """Sets the minutes_to_be_invoiced of this Project. + + Minutes which have not been invoiced across all chargeable tasks in the project. # noqa: E501 + + :param minutes_to_be_invoiced: The minutes_to_be_invoiced of this Project. # noqa: E501 + :type: int + """ + + self._minutes_to_be_invoiced = minutes_to_be_invoiced + + @property + def task_amount_to_be_invoiced(self): + """Gets the task_amount_to_be_invoiced of this Project. # noqa: E501 + + + :return: The task_amount_to_be_invoiced of this Project. # noqa: E501 + :rtype: Amount + """ + return self._task_amount_to_be_invoiced + + @task_amount_to_be_invoiced.setter + def task_amount_to_be_invoiced(self, task_amount_to_be_invoiced): + """Sets the task_amount_to_be_invoiced of this Project. + + + :param task_amount_to_be_invoiced: The task_amount_to_be_invoiced of this Project. # noqa: E501 + :type: Amount + """ + + self._task_amount_to_be_invoiced = task_amount_to_be_invoiced + + @property + def task_amount_invoiced(self): + """Gets the task_amount_invoiced of this Project. # noqa: E501 + + + :return: The task_amount_invoiced of this Project. # noqa: E501 + :rtype: Amount + """ + return self._task_amount_invoiced + + @task_amount_invoiced.setter + def task_amount_invoiced(self, task_amount_invoiced): + """Sets the task_amount_invoiced of this Project. + + + :param task_amount_invoiced: The task_amount_invoiced of this Project. # noqa: E501 + :type: Amount + """ + + self._task_amount_invoiced = task_amount_invoiced + + @property + def expense_amount_to_be_invoiced(self): + """Gets the expense_amount_to_be_invoiced of this Project. # noqa: E501 + + + :return: The expense_amount_to_be_invoiced of this Project. # noqa: E501 + :rtype: Amount + """ + return self._expense_amount_to_be_invoiced + + @expense_amount_to_be_invoiced.setter + def expense_amount_to_be_invoiced(self, expense_amount_to_be_invoiced): + """Sets the expense_amount_to_be_invoiced of this Project. + + + :param expense_amount_to_be_invoiced: The expense_amount_to_be_invoiced of this Project. # noqa: E501 + :type: Amount + """ + + self._expense_amount_to_be_invoiced = expense_amount_to_be_invoiced + + @property + def expense_amount_invoiced(self): + """Gets the expense_amount_invoiced of this Project. # noqa: E501 + + + :return: The expense_amount_invoiced of this Project. # noqa: E501 + :rtype: Amount + """ + return self._expense_amount_invoiced + + @expense_amount_invoiced.setter + def expense_amount_invoiced(self, expense_amount_invoiced): + """Sets the expense_amount_invoiced of this Project. + + + :param expense_amount_invoiced: The expense_amount_invoiced of this Project. # noqa: E501 + :type: Amount + """ + + self._expense_amount_invoiced = expense_amount_invoiced + + @property + def project_amount_invoiced(self): + """Gets the project_amount_invoiced of this Project. # noqa: E501 + + + :return: The project_amount_invoiced of this Project. # noqa: E501 + :rtype: Amount + """ + return self._project_amount_invoiced + + @project_amount_invoiced.setter + def project_amount_invoiced(self, project_amount_invoiced): + """Sets the project_amount_invoiced of this Project. + + + :param project_amount_invoiced: The project_amount_invoiced of this Project. # noqa: E501 + :type: Amount + """ + + self._project_amount_invoiced = project_amount_invoiced + + @property + def deposit(self): + """Gets the deposit of this Project. # noqa: E501 + + + :return: The deposit of this Project. # noqa: E501 + :rtype: Amount + """ + return self._deposit + + @deposit.setter + def deposit(self, deposit): + """Sets the deposit of this Project. + + + :param deposit: The deposit of this Project. # noqa: E501 + :type: Amount + """ + + self._deposit = deposit + + @property + def deposit_applied(self): + """Gets the deposit_applied of this Project. # noqa: E501 + + + :return: The deposit_applied of this Project. # noqa: E501 + :rtype: Amount + """ + return self._deposit_applied + + @deposit_applied.setter + def deposit_applied(self, deposit_applied): + """Sets the deposit_applied of this Project. + + + :param deposit_applied: The deposit_applied of this Project. # noqa: E501 + :type: Amount + """ + + self._deposit_applied = deposit_applied + + @property + def credit_note_amount(self): + """Gets the credit_note_amount of this Project. # noqa: E501 + + + :return: The credit_note_amount of this Project. # noqa: E501 + :rtype: Amount + """ + return self._credit_note_amount + + @credit_note_amount.setter + def credit_note_amount(self, credit_note_amount): + """Sets the credit_note_amount of this Project. + + + :param credit_note_amount: The credit_note_amount of this Project. # noqa: E501 + :type: Amount + """ + + self._credit_note_amount = credit_note_amount + + @property + def deadline_utc(self): + """Gets the deadline_utc of this Project. # noqa: E501 + + Deadline for the project. UTC Date Time in ISO-8601 format. # noqa: E501 + + :return: The deadline_utc of this Project. # noqa: E501 + :rtype: datetime + """ + return self._deadline_utc + + @deadline_utc.setter + def deadline_utc(self, deadline_utc): + """Sets the deadline_utc of this Project. + + Deadline for the project. UTC Date Time in ISO-8601 format. # noqa: E501 + + :param deadline_utc: The deadline_utc of this Project. # noqa: E501 + :type: datetime + """ + + self._deadline_utc = deadline_utc + + @property + def total_invoiced(self): + """Gets the total_invoiced of this Project. # noqa: E501 + + + :return: The total_invoiced of this Project. # noqa: E501 + :rtype: Amount + """ + return self._total_invoiced + + @total_invoiced.setter + def total_invoiced(self, total_invoiced): + """Sets the total_invoiced of this Project. + + + :param total_invoiced: The total_invoiced of this Project. # noqa: E501 + :type: Amount + """ + + self._total_invoiced = total_invoiced + + @property + def total_to_be_invoiced(self): + """Gets the total_to_be_invoiced of this Project. # noqa: E501 + + + :return: The total_to_be_invoiced of this Project. # noqa: E501 + :rtype: Amount + """ + return self._total_to_be_invoiced + + @total_to_be_invoiced.setter + def total_to_be_invoiced(self, total_to_be_invoiced): + """Sets the total_to_be_invoiced of this Project. + + + :param total_to_be_invoiced: The total_to_be_invoiced of this Project. # noqa: E501 + :type: Amount + """ + + self._total_to_be_invoiced = total_to_be_invoiced + + @property + def estimate(self): + """Gets the estimate of this Project. # noqa: E501 + + + :return: The estimate of this Project. # noqa: E501 + :rtype: Amount + """ + return self._estimate + + @estimate.setter + def estimate(self, estimate): + """Sets the estimate of this Project. + + + :param estimate: The estimate of this Project. # noqa: E501 + :type: Amount + """ + + self._estimate = estimate + + @property + def status(self): + """Gets the status of this Project. # noqa: E501 + + + :return: The status of this Project. # noqa: E501 + :rtype: ProjectStatus + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this Project. + + + :param status: The status of this Project. # noqa: E501 + :type: ProjectStatus + """ + + self._status = status diff --git a/xero_python/project/models/project_create_or_update.py b/xero_python/project/models/project_create_or_update.py new file mode 100644 index 00000000..070661e7 --- /dev/null +++ b/xero_python/project/models/project_create_or_update.py @@ -0,0 +1,158 @@ +# coding: utf-8 + +""" + Xero Projects API + + This is the Xero Projects API # noqa: E501 + + OpenAPI spec version: 2.2.6 + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 + +from xero_python.models import BaseModel + + +class ProjectCreateOrUpdate(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 = { + "contact_id": "str", + "name": "str", + "estimate_amount": "float", + "deadline_utc": "datetime", + } + + attribute_map = { + "contact_id": "contactId", + "name": "name", + "estimate_amount": "estimateAmount", + "deadline_utc": "deadlineUtc", + } + + def __init__( + self, contact_id=None, name=None, estimate_amount=None, deadline_utc=None + ): # noqa: E501 + """ProjectCreateOrUpdate - a model defined in OpenAPI""" # noqa: E501 + + self._contact_id = None + self._name = None + self._estimate_amount = None + self._deadline_utc = None + self.discriminator = None + + if contact_id is not None: + self.contact_id = contact_id + self.name = name + if estimate_amount is not None: + self.estimate_amount = estimate_amount + if deadline_utc is not None: + self.deadline_utc = deadline_utc + + @property + def contact_id(self): + """Gets the contact_id of this ProjectCreateOrUpdate. # noqa: E501 + + Identifier of the contact this project was created for. # noqa: E501 + + :return: The contact_id of this ProjectCreateOrUpdate. # noqa: E501 + :rtype: str + """ + return self._contact_id + + @contact_id.setter + def contact_id(self, contact_id): + """Sets the contact_id of this ProjectCreateOrUpdate. + + Identifier of the contact this project was created for. # noqa: E501 + + :param contact_id: The contact_id of this ProjectCreateOrUpdate. # noqa: E501 + :type: str + """ + + self._contact_id = contact_id + + @property + def name(self): + """Gets the name of this ProjectCreateOrUpdate. # noqa: E501 + + Name of the project. # noqa: E501 + + :return: The name of this ProjectCreateOrUpdate. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ProjectCreateOrUpdate. + + Name of the project. # noqa: E501 + + :param name: The name of this ProjectCreateOrUpdate. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError( + "Invalid value for `name`, must not be `None`" + ) # noqa: E501 + + self._name = name + + @property + def estimate_amount(self): + """Gets the estimate_amount of this ProjectCreateOrUpdate. # noqa: E501 + + + :return: The estimate_amount of this ProjectCreateOrUpdate. # noqa: E501 + :rtype: float + """ + return self._estimate_amount + + @estimate_amount.setter + def estimate_amount(self, estimate_amount): + """Sets the estimate_amount of this ProjectCreateOrUpdate. + + + :param estimate_amount: The estimate_amount of this ProjectCreateOrUpdate. # noqa: E501 + :type: float + """ + + self._estimate_amount = estimate_amount + + @property + def deadline_utc(self): + """Gets the deadline_utc of this ProjectCreateOrUpdate. # noqa: E501 + + Deadline for the project. UTC Date Time in ISO-8601 format. # noqa: E501 + + :return: The deadline_utc of this ProjectCreateOrUpdate. # noqa: E501 + :rtype: datetime + """ + return self._deadline_utc + + @deadline_utc.setter + def deadline_utc(self, deadline_utc): + """Sets the deadline_utc of this ProjectCreateOrUpdate. + + Deadline for the project. UTC Date Time in ISO-8601 format. # noqa: E501 + + :param deadline_utc: The deadline_utc of this ProjectCreateOrUpdate. # noqa: E501 + :type: datetime + """ + + self._deadline_utc = deadline_utc diff --git a/xero_python/project/models/project_patch.py b/xero_python/project/models/project_patch.py new file mode 100644 index 00000000..0de36518 --- /dev/null +++ b/xero_python/project/models/project_patch.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Xero Projects API + + This is the Xero Projects API # noqa: E501 + + OpenAPI spec version: 2.2.6 + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 + +from xero_python.models import BaseModel + + +class ProjectPatch(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = {"status": "ProjectStatus"} + + attribute_map = {"status": "status"} + + def __init__(self, status=None): # noqa: E501 + """ProjectPatch - a model defined in OpenAPI""" # noqa: E501 + + self._status = None + self.discriminator = None + + self.status = status + + @property + def status(self): + """Gets the status of this ProjectPatch. # noqa: E501 + + + :return: The status of this ProjectPatch. # noqa: E501 + :rtype: ProjectStatus + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ProjectPatch. + + + :param status: The status of this ProjectPatch. # noqa: E501 + :type: ProjectStatus + """ + if status is None: + raise ValueError( + "Invalid value for `status`, must not be `None`" + ) # noqa: E501 + + self._status = status diff --git a/xero_python/project/models/project_status.py b/xero_python/project/models/project_status.py new file mode 100644 index 00000000..525653ca --- /dev/null +++ b/xero_python/project/models/project_status.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +""" + Xero Projects API + + This is the Xero Projects API # noqa: E501 + + OpenAPI spec version: 2.2.6 + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 + +from enum import Enum + + +class ProjectStatus(Enum): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + allowed enum values + """ + + INPROGRESS = "INPROGRESS" + CLOSED = "CLOSED" diff --git a/xero_python/project/models/project_user.py b/xero_python/project/models/project_user.py new file mode 100644 index 00000000..867556fc --- /dev/null +++ b/xero_python/project/models/project_user.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + Xero Projects API + + This is the Xero Projects API # noqa: E501 + + OpenAPI spec version: 2.2.6 + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 + +from xero_python.models import BaseModel + + +class ProjectUser(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 = {"user_id": "str", "name": "str", "email": "str"} + + attribute_map = {"user_id": "userId", "name": "name", "email": "email"} + + def __init__(self, user_id=None, name=None, email=None): # noqa: E501 + """ProjectUser - a model defined in OpenAPI""" # noqa: E501 + + self._user_id = None + self._name = None + self._email = None + self.discriminator = None + + if user_id is not None: + self.user_id = user_id + if name is not None: + self.name = name + if email is not None: + self.email = email + + @property + def user_id(self): + """Gets the user_id of this ProjectUser. # noqa: E501 + + Identifier of the user of the project. # noqa: E501 + + :return: The user_id of this ProjectUser. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this ProjectUser. + + Identifier of the user of the project. # noqa: E501 + + :param user_id: The user_id of this ProjectUser. # noqa: E501 + :type: str + """ + + self._user_id = user_id + + @property + def name(self): + """Gets the name of this ProjectUser. # noqa: E501 + + Full name of the user. # noqa: E501 + + :return: The name of this ProjectUser. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ProjectUser. + + Full name of the user. # noqa: E501 + + :param name: The name of this ProjectUser. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def email(self): + """Gets the email of this ProjectUser. # noqa: E501 + + Email address of the user. # noqa: E501 + + :return: The email of this ProjectUser. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this ProjectUser. + + Email address of the user. # noqa: E501 + + :param email: The email of this ProjectUser. # noqa: E501 + :type: str + """ + + self._email = email diff --git a/xero_python/project/models/project_users.py b/xero_python/project/models/project_users.py new file mode 100644 index 00000000..bc1297b1 --- /dev/null +++ b/xero_python/project/models/project_users.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Xero Projects API + + This is the Xero Projects API # noqa: E501 + + OpenAPI spec version: 2.2.6 + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 + +from xero_python.models import BaseModel + + +class ProjectUsers(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[ProjectUser]"} + + attribute_map = {"pagination": "pagination", "items": "items"} + + def __init__(self, pagination=None, items=None): # noqa: E501 + """ProjectUsers - 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 ProjectUsers. # noqa: E501 + + + :return: The pagination of this ProjectUsers. # noqa: E501 + :rtype: Pagination + """ + return self._pagination + + @pagination.setter + def pagination(self, pagination): + """Sets the pagination of this ProjectUsers. + + + :param pagination: The pagination of this ProjectUsers. # noqa: E501 + :type: Pagination + """ + + self._pagination = pagination + + @property + def items(self): + """Gets the items of this ProjectUsers. # noqa: E501 + + + :return: The items of this ProjectUsers. # noqa: E501 + :rtype: list[ProjectUser] + """ + return self._items + + @items.setter + def items(self, items): + """Sets the items of this ProjectUsers. + + + :param items: The items of this ProjectUsers. # noqa: E501 + :type: list[ProjectUser] + """ + + self._items = items diff --git a/xero_python/project/models/projects.py b/xero_python/project/models/projects.py new file mode 100644 index 00000000..659551d0 --- /dev/null +++ b/xero_python/project/models/projects.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Xero Projects API + + This is the Xero Projects API # noqa: E501 + + OpenAPI spec version: 2.2.6 + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 + +from xero_python.models import BaseModel + + +class Projects(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[Project]"} + + attribute_map = {"pagination": "pagination", "items": "items"} + + def __init__(self, pagination=None, items=None): # noqa: E501 + """Projects - 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 Projects. # noqa: E501 + + + :return: The pagination of this Projects. # noqa: E501 + :rtype: Pagination + """ + return self._pagination + + @pagination.setter + def pagination(self, pagination): + """Sets the pagination of this Projects. + + + :param pagination: The pagination of this Projects. # noqa: E501 + :type: Pagination + """ + + self._pagination = pagination + + @property + def items(self): + """Gets the items of this Projects. # noqa: E501 + + + :return: The items of this Projects. # noqa: E501 + :rtype: list[Project] + """ + return self._items + + @items.setter + def items(self, items): + """Sets the items of this Projects. + + + :param items: The items of this Projects. # noqa: E501 + :type: list[Project] + """ + + self._items = items diff --git a/xero_python/project/models/task.py b/xero_python/project/models/task.py new file mode 100644 index 00000000..35a255e6 --- /dev/null +++ b/xero_python/project/models/task.py @@ -0,0 +1,477 @@ +# coding: utf-8 + +""" + Xero Projects API + + This is the Xero Projects API # noqa: E501 + + OpenAPI spec version: 2.2.6 + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 + +from xero_python.models import BaseModel + + +class Task(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 = { + "task_id": "str", + "name": "str", + "rate": "Amount", + "charge_type": "ChargeType", + "estimate_minutes": "float", + "project_id": "str", + "total_minutes": "float", + "total_amount": "Amount", + "minutes_invoiced": "float", + "minutes_to_be_invoiced": "float", + "fixed_minutes": "float", + "non_chargeable_minutes": "float", + "amount_to_be_invoiced": "Amount", + "amount_invoiced": "Amount", + "status": "str", + } + + attribute_map = { + "task_id": "taskId", + "name": "name", + "rate": "rate", + "charge_type": "chargeType", + "estimate_minutes": "estimateMinutes", + "project_id": "projectId", + "total_minutes": "totalMinutes", + "total_amount": "totalAmount", + "minutes_invoiced": "minutesInvoiced", + "minutes_to_be_invoiced": "minutesToBeInvoiced", + "fixed_minutes": "fixedMinutes", + "non_chargeable_minutes": "nonChargeableMinutes", + "amount_to_be_invoiced": "amountToBeInvoiced", + "amount_invoiced": "amountInvoiced", + "status": "status", + } + + def __init__( + self, + task_id=None, + name=None, + rate=None, + charge_type=None, + estimate_minutes=None, + project_id=None, + total_minutes=None, + total_amount=None, + minutes_invoiced=None, + minutes_to_be_invoiced=None, + fixed_minutes=None, + non_chargeable_minutes=None, + amount_to_be_invoiced=None, + amount_invoiced=None, + status=None, + ): # noqa: E501 + """Task - a model defined in OpenAPI""" # noqa: E501 + + self._task_id = None + self._name = None + self._rate = None + self._charge_type = None + self._estimate_minutes = None + self._project_id = None + self._total_minutes = None + self._total_amount = None + self._minutes_invoiced = None + self._minutes_to_be_invoiced = None + self._fixed_minutes = None + self._non_chargeable_minutes = None + self._amount_to_be_invoiced = None + self._amount_invoiced = None + self._status = None + self.discriminator = None + + if task_id is not None: + self.task_id = task_id + if name is not None: + self.name = name + if rate is not None: + self.rate = rate + if charge_type is not None: + self.charge_type = charge_type + if estimate_minutes is not None: + self.estimate_minutes = estimate_minutes + if project_id is not None: + self.project_id = project_id + if total_minutes is not None: + self.total_minutes = total_minutes + if total_amount is not None: + self.total_amount = total_amount + if minutes_invoiced is not None: + self.minutes_invoiced = minutes_invoiced + if minutes_to_be_invoiced is not None: + self.minutes_to_be_invoiced = minutes_to_be_invoiced + if fixed_minutes is not None: + self.fixed_minutes = fixed_minutes + if non_chargeable_minutes is not None: + self.non_chargeable_minutes = non_chargeable_minutes + if amount_to_be_invoiced is not None: + self.amount_to_be_invoiced = amount_to_be_invoiced + if amount_invoiced is not None: + self.amount_invoiced = amount_invoiced + if status is not None: + self.status = status + + @property + def task_id(self): + """Gets the task_id of this Task. # noqa: E501 + + Identifier of the task. # noqa: E501 + + :return: The task_id of this Task. # noqa: E501 + :rtype: str + """ + return self._task_id + + @task_id.setter + def task_id(self, task_id): + """Sets the task_id of this Task. + + Identifier of the task. # noqa: E501 + + :param task_id: The task_id of this Task. # noqa: E501 + :type: str + """ + + self._task_id = task_id + + @property + def name(self): + """Gets the name of this Task. # noqa: E501 + + Name of the task. # noqa: E501 + + :return: The name of this Task. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Task. + + Name of the task. # noqa: E501 + + :param name: The name of this Task. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def rate(self): + """Gets the rate of this Task. # noqa: E501 + + + :return: The rate of this Task. # noqa: E501 + :rtype: Amount + """ + return self._rate + + @rate.setter + def rate(self, rate): + """Sets the rate of this Task. + + + :param rate: The rate of this Task. # noqa: E501 + :type: Amount + """ + + self._rate = rate + + @property + def charge_type(self): + """Gets the charge_type of this Task. # noqa: E501 + + + :return: The charge_type of this Task. # noqa: E501 + :rtype: ChargeType + """ + return self._charge_type + + @charge_type.setter + def charge_type(self, charge_type): + """Sets the charge_type of this Task. + + + :param charge_type: The charge_type of this Task. # noqa: E501 + :type: ChargeType + """ + + self._charge_type = charge_type + + @property + def estimate_minutes(self): + """Gets the estimate_minutes of this Task. # noqa: E501 + + An estimated time to perform the task # noqa: E501 + + :return: The estimate_minutes of this Task. # noqa: E501 + :rtype: float + """ + return self._estimate_minutes + + @estimate_minutes.setter + def estimate_minutes(self, estimate_minutes): + """Sets the estimate_minutes of this Task. + + An estimated time to perform the task # noqa: E501 + + :param estimate_minutes: The estimate_minutes of this Task. # noqa: E501 + :type: float + """ + + self._estimate_minutes = estimate_minutes + + @property + def project_id(self): + """Gets the project_id of this Task. # noqa: E501 + + Identifier of the project task belongs to. # noqa: E501 + + :return: The project_id of this Task. # noqa: E501 + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this Task. + + Identifier of the project task belongs to. # noqa: E501 + + :param project_id: The project_id of this Task. # noqa: E501 + :type: str + """ + + self._project_id = project_id + + @property + def total_minutes(self): + """Gets the total_minutes of this Task. # noqa: E501 + + Total minutes which have been logged against the task. Logged by assigning a time entry to a task # noqa: E501 + + :return: The total_minutes of this Task. # noqa: E501 + :rtype: float + """ + return self._total_minutes + + @total_minutes.setter + def total_minutes(self, total_minutes): + """Sets the total_minutes of this Task. + + Total minutes which have been logged against the task. Logged by assigning a time entry to a task # noqa: E501 + + :param total_minutes: The total_minutes of this Task. # noqa: E501 + :type: float + """ + + self._total_minutes = total_minutes + + @property + def total_amount(self): + """Gets the total_amount of this Task. # noqa: E501 + + + :return: The total_amount of this Task. # noqa: E501 + :rtype: Amount + """ + return self._total_amount + + @total_amount.setter + def total_amount(self, total_amount): + """Sets the total_amount of this Task. + + + :param total_amount: The total_amount of this Task. # noqa: E501 + :type: Amount + """ + + self._total_amount = total_amount + + @property + def minutes_invoiced(self): + """Gets the minutes_invoiced of this Task. # noqa: E501 + + Minutes on this task which have been invoiced. # noqa: E501 + + :return: The minutes_invoiced of this Task. # noqa: E501 + :rtype: float + """ + return self._minutes_invoiced + + @minutes_invoiced.setter + def minutes_invoiced(self, minutes_invoiced): + """Sets the minutes_invoiced of this Task. + + Minutes on this task which have been invoiced. # noqa: E501 + + :param minutes_invoiced: The minutes_invoiced of this Task. # noqa: E501 + :type: float + """ + + self._minutes_invoiced = minutes_invoiced + + @property + def minutes_to_be_invoiced(self): + """Gets the minutes_to_be_invoiced of this Task. # noqa: E501 + + Minutes on this task which have not been invoiced. # noqa: E501 + + :return: The minutes_to_be_invoiced of this Task. # noqa: E501 + :rtype: float + """ + return self._minutes_to_be_invoiced + + @minutes_to_be_invoiced.setter + def minutes_to_be_invoiced(self, minutes_to_be_invoiced): + """Sets the minutes_to_be_invoiced of this Task. + + Minutes on this task which have not been invoiced. # noqa: E501 + + :param minutes_to_be_invoiced: The minutes_to_be_invoiced of this Task. # noqa: E501 + :type: float + """ + + self._minutes_to_be_invoiced = minutes_to_be_invoiced + + @property + def fixed_minutes(self): + """Gets the fixed_minutes of this Task. # noqa: E501 + + Minutes logged against this task if its charge type is `FIXED`. # noqa: E501 + + :return: The fixed_minutes of this Task. # noqa: E501 + :rtype: float + """ + return self._fixed_minutes + + @fixed_minutes.setter + def fixed_minutes(self, fixed_minutes): + """Sets the fixed_minutes of this Task. + + Minutes logged against this task if its charge type is `FIXED`. # noqa: E501 + + :param fixed_minutes: The fixed_minutes of this Task. # noqa: E501 + :type: float + """ + + self._fixed_minutes = fixed_minutes + + @property + def non_chargeable_minutes(self): + """Gets the non_chargeable_minutes of this Task. # noqa: E501 + + Minutes logged against this task if its charge type is `NON_CHARGEABLE`. # noqa: E501 + + :return: The non_chargeable_minutes of this Task. # noqa: E501 + :rtype: float + """ + return self._non_chargeable_minutes + + @non_chargeable_minutes.setter + def non_chargeable_minutes(self, non_chargeable_minutes): + """Sets the non_chargeable_minutes of this Task. + + Minutes logged against this task if its charge type is `NON_CHARGEABLE`. # noqa: E501 + + :param non_chargeable_minutes: The non_chargeable_minutes of this Task. # noqa: E501 + :type: float + """ + + self._non_chargeable_minutes = non_chargeable_minutes + + @property + def amount_to_be_invoiced(self): + """Gets the amount_to_be_invoiced of this Task. # noqa: E501 + + + :return: The amount_to_be_invoiced of this Task. # noqa: E501 + :rtype: Amount + """ + return self._amount_to_be_invoiced + + @amount_to_be_invoiced.setter + def amount_to_be_invoiced(self, amount_to_be_invoiced): + """Sets the amount_to_be_invoiced of this Task. + + + :param amount_to_be_invoiced: The amount_to_be_invoiced of this Task. # noqa: E501 + :type: Amount + """ + + self._amount_to_be_invoiced = amount_to_be_invoiced + + @property + def amount_invoiced(self): + """Gets the amount_invoiced of this Task. # noqa: E501 + + + :return: The amount_invoiced of this Task. # noqa: E501 + :rtype: Amount + """ + return self._amount_invoiced + + @amount_invoiced.setter + def amount_invoiced(self, amount_invoiced): + """Sets the amount_invoiced of this Task. + + + :param amount_invoiced: The amount_invoiced of this Task. # noqa: E501 + :type: Amount + """ + + self._amount_invoiced = amount_invoiced + + @property + def status(self): + """Gets the status of this Task. # noqa: E501 + + Status of the task. When a task of ChargeType is `FIXED` and the rate amount is invoiced the status will be set to `INVOICED` and can't be modified. A task with ChargeType of `TIME` or `NON_CHARGEABLE` cannot have a status of `INVOICED`. A `LOCKED` state indicates that the task is currently changing state (for example being invoiced) and can't be modified. # noqa: E501 + + :return: The status of this Task. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this Task. + + Status of the task. When a task of ChargeType is `FIXED` and the rate amount is invoiced the status will be set to `INVOICED` and can't be modified. A task with ChargeType of `TIME` or `NON_CHARGEABLE` cannot have a status of `INVOICED`. A `LOCKED` state indicates that the task is currently changing state (for example being invoiced) and can't be modified. # noqa: E501 + + :param status: The status of this Task. # noqa: E501 + :type: str + """ + allowed_values = ["ACTIVE", "INVOICED", "LOCKED"] # noqa: E501 + if status not in allowed_values: + raise ValueError( + "Invalid value for `status` ({0}), must be one of {1}".format( # noqa: E501 + status, allowed_values + ) + ) + + self._status = status diff --git a/xero_python/project/models/task_create_or_update.py b/xero_python/project/models/task_create_or_update.py new file mode 100644 index 00000000..4a7edac2 --- /dev/null +++ b/xero_python/project/models/task_create_or_update.py @@ -0,0 +1,162 @@ +# coding: utf-8 + +""" + Xero Projects API + + This is the Xero Projects API # noqa: E501 + + OpenAPI spec version: 2.2.6 + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 + +from xero_python.models import BaseModel + + +class TaskCreateOrUpdate(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 = { + "name": "str", + "rate": "Amount", + "charge_type": "ChargeType", + "estimate_minutes": "int", + } + + attribute_map = { + "name": "name", + "rate": "rate", + "charge_type": "chargeType", + "estimate_minutes": "estimateMinutes", + } + + def __init__( + self, name=None, rate=None, charge_type=None, estimate_minutes=None + ): # noqa: E501 + """TaskCreateOrUpdate - a model defined in OpenAPI""" # noqa: E501 + + self._name = None + self._rate = None + self._charge_type = None + self._estimate_minutes = None + self.discriminator = None + + self.name = name + self.rate = rate + self.charge_type = charge_type + if estimate_minutes is not None: + self.estimate_minutes = estimate_minutes + + @property + def name(self): + """Gets the name of this TaskCreateOrUpdate. # noqa: E501 + + Name of the task. Max length 100 characters. # noqa: E501 + + :return: The name of this TaskCreateOrUpdate. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this TaskCreateOrUpdate. + + Name of the task. Max length 100 characters. # noqa: E501 + + :param name: The name of this TaskCreateOrUpdate. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError( + "Invalid value for `name`, must not be `None`" + ) # noqa: E501 + + self._name = name + + @property + def rate(self): + """Gets the rate of this TaskCreateOrUpdate. # noqa: E501 + + + :return: The rate of this TaskCreateOrUpdate. # noqa: E501 + :rtype: Amount + """ + return self._rate + + @rate.setter + def rate(self, rate): + """Sets the rate of this TaskCreateOrUpdate. + + + :param rate: The rate of this TaskCreateOrUpdate. # noqa: E501 + :type: Amount + """ + if rate is None: + raise ValueError( + "Invalid value for `rate`, must not be `None`" + ) # noqa: E501 + + self._rate = rate + + @property + def charge_type(self): + """Gets the charge_type of this TaskCreateOrUpdate. # noqa: E501 + + + :return: The charge_type of this TaskCreateOrUpdate. # noqa: E501 + :rtype: ChargeType + """ + return self._charge_type + + @charge_type.setter + def charge_type(self, charge_type): + """Sets the charge_type of this TaskCreateOrUpdate. + + + :param charge_type: The charge_type of this TaskCreateOrUpdate. # noqa: E501 + :type: ChargeType + """ + if charge_type is None: + raise ValueError( + "Invalid value for `charge_type`, must not be `None`" + ) # noqa: E501 + + self._charge_type = charge_type + + @property + def estimate_minutes(self): + """Gets the estimate_minutes of this TaskCreateOrUpdate. # noqa: E501 + + Estimated time to perform the task. EstimateMinutes has to be greater than 0 if provided. # noqa: E501 + + :return: The estimate_minutes of this TaskCreateOrUpdate. # noqa: E501 + :rtype: int + """ + return self._estimate_minutes + + @estimate_minutes.setter + def estimate_minutes(self, estimate_minutes): + """Sets the estimate_minutes of this TaskCreateOrUpdate. + + Estimated time to perform the task. EstimateMinutes has to be greater than 0 if provided. # noqa: E501 + + :param estimate_minutes: The estimate_minutes of this TaskCreateOrUpdate. # noqa: E501 + :type: int + """ + + self._estimate_minutes = estimate_minutes diff --git a/xero_python/project/models/tasks.py b/xero_python/project/models/tasks.py new file mode 100644 index 00000000..2f49d677 --- /dev/null +++ b/xero_python/project/models/tasks.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Xero Projects API + + This is the Xero Projects API # noqa: E501 + + OpenAPI spec version: 2.2.6 + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 + +from xero_python.models import BaseModel + + +class Tasks(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[Task]"} + + attribute_map = {"pagination": "pagination", "items": "items"} + + def __init__(self, pagination=None, items=None): # noqa: E501 + """Tasks - 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 Tasks. # noqa: E501 + + + :return: The pagination of this Tasks. # noqa: E501 + :rtype: Pagination + """ + return self._pagination + + @pagination.setter + def pagination(self, pagination): + """Sets the pagination of this Tasks. + + + :param pagination: The pagination of this Tasks. # noqa: E501 + :type: Pagination + """ + + self._pagination = pagination + + @property + def items(self): + """Gets the items of this Tasks. # noqa: E501 + + + :return: The items of this Tasks. # noqa: E501 + :rtype: list[Task] + """ + return self._items + + @items.setter + def items(self, items): + """Sets the items of this Tasks. + + + :param items: The items of this Tasks. # noqa: E501 + :type: list[Task] + """ + + self._items = items diff --git a/xero_python/project/models/time_entries.py b/xero_python/project/models/time_entries.py new file mode 100644 index 00000000..bcfc605c --- /dev/null +++ b/xero_python/project/models/time_entries.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Xero Projects API + + This is the Xero Projects API # noqa: E501 + + OpenAPI spec version: 2.2.6 + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 + +from xero_python.models import BaseModel + + +class TimeEntries(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[TimeEntry]"} + + attribute_map = {"pagination": "pagination", "items": "items"} + + def __init__(self, pagination=None, items=None): # noqa: E501 + """TimeEntries - 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 TimeEntries. # noqa: E501 + + + :return: The pagination of this TimeEntries. # noqa: E501 + :rtype: Pagination + """ + return self._pagination + + @pagination.setter + def pagination(self, pagination): + """Sets the pagination of this TimeEntries. + + + :param pagination: The pagination of this TimeEntries. # noqa: E501 + :type: Pagination + """ + + self._pagination = pagination + + @property + def items(self): + """Gets the items of this TimeEntries. # noqa: E501 + + + :return: The items of this TimeEntries. # noqa: E501 + :rtype: list[TimeEntry] + """ + return self._items + + @items.setter + def items(self, items): + """Sets the items of this TimeEntries. + + + :param items: The items of this TimeEntries. # noqa: E501 + :type: list[TimeEntry] + """ + + self._items = items diff --git a/xero_python/project/models/time_entry.py b/xero_python/project/models/time_entry.py new file mode 100644 index 00000000..b642d124 --- /dev/null +++ b/xero_python/project/models/time_entry.py @@ -0,0 +1,313 @@ +# coding: utf-8 + +""" + Xero Projects API + + This is the Xero Projects API # noqa: E501 + + OpenAPI spec version: 2.2.6 + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 + +from xero_python.models import BaseModel + + +class TimeEntry(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 = { + "time_entry_id": "str", + "user_id": "str", + "project_id": "str", + "task_id": "str", + "date_utc": "datetime", + "date_entered_utc": "datetime", + "duration": "int", + "description": "str", + "status": "str", + } + + attribute_map = { + "time_entry_id": "timeEntryId", + "user_id": "userId", + "project_id": "projectId", + "task_id": "taskId", + "date_utc": "dateUtc", + "date_entered_utc": "dateEnteredUtc", + "duration": "duration", + "description": "description", + "status": "status", + } + + def __init__( + self, + time_entry_id=None, + user_id=None, + project_id=None, + task_id=None, + date_utc=None, + date_entered_utc=None, + duration=None, + description=None, + status=None, + ): # noqa: E501 + """TimeEntry - a model defined in OpenAPI""" # noqa: E501 + + self._time_entry_id = None + self._user_id = None + self._project_id = None + self._task_id = None + self._date_utc = None + self._date_entered_utc = None + self._duration = None + self._description = None + self._status = None + self.discriminator = None + + if time_entry_id is not None: + self.time_entry_id = time_entry_id + if user_id is not None: + self.user_id = user_id + if project_id is not None: + self.project_id = project_id + if task_id is not None: + self.task_id = task_id + if date_utc is not None: + self.date_utc = date_utc + if date_entered_utc is not None: + self.date_entered_utc = date_entered_utc + if duration is not None: + self.duration = duration + if description is not None: + self.description = description + if status is not None: + self.status = status + + @property + def time_entry_id(self): + """Gets the time_entry_id of this TimeEntry. # noqa: E501 + + Identifier of the time entry. # noqa: E501 + + :return: The time_entry_id of this TimeEntry. # noqa: E501 + :rtype: str + """ + return self._time_entry_id + + @time_entry_id.setter + def time_entry_id(self, time_entry_id): + """Sets the time_entry_id of this TimeEntry. + + Identifier of the time entry. # noqa: E501 + + :param time_entry_id: The time_entry_id of this TimeEntry. # noqa: E501 + :type: str + """ + + self._time_entry_id = time_entry_id + + @property + def user_id(self): + """Gets the user_id of this TimeEntry. # noqa: E501 + + The xero user identifier of the person who logged time. # noqa: E501 + + :return: The user_id of this TimeEntry. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this TimeEntry. + + The xero user identifier of the person who logged time. # noqa: E501 + + :param user_id: The user_id of this TimeEntry. # noqa: E501 + :type: str + """ + + self._user_id = user_id + + @property + def project_id(self): + """Gets the project_id of this TimeEntry. # noqa: E501 + + Identifier of the project, that the task (which the time entry is logged against) belongs to. # noqa: E501 + + :return: The project_id of this TimeEntry. # noqa: E501 + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this TimeEntry. + + Identifier of the project, that the task (which the time entry is logged against) belongs to. # noqa: E501 + + :param project_id: The project_id of this TimeEntry. # noqa: E501 + :type: str + """ + + self._project_id = project_id + + @property + def task_id(self): + """Gets the task_id of this TimeEntry. # noqa: E501 + + Identifier of the task that time entry is logged against. # noqa: E501 + + :return: The task_id of this TimeEntry. # noqa: E501 + :rtype: str + """ + return self._task_id + + @task_id.setter + def task_id(self, task_id): + """Sets the task_id of this TimeEntry. + + Identifier of the task that time entry is logged against. # noqa: E501 + + :param task_id: The task_id of this TimeEntry. # noqa: E501 + :type: str + """ + + self._task_id = task_id + + @property + def date_utc(self): + """Gets the date_utc of this TimeEntry. # noqa: E501 + + The date time that time entry is logged on. UTC Date Time in ISO-8601 format. # noqa: E501 + + :return: The date_utc of this TimeEntry. # noqa: E501 + :rtype: datetime + """ + return self._date_utc + + @date_utc.setter + def date_utc(self, date_utc): + """Sets the date_utc of this TimeEntry. + + The date time that time entry is logged on. UTC Date Time in ISO-8601 format. # noqa: E501 + + :param date_utc: The date_utc of this TimeEntry. # noqa: E501 + :type: datetime + """ + + self._date_utc = date_utc + + @property + def date_entered_utc(self): + """Gets the date_entered_utc of this TimeEntry. # noqa: E501 + + The date time that time entry is created. UTC Date Time in ISO-8601 format. By default it is set to server time. # noqa: E501 + + :return: The date_entered_utc of this TimeEntry. # noqa: E501 + :rtype: datetime + """ + return self._date_entered_utc + + @date_entered_utc.setter + def date_entered_utc(self, date_entered_utc): + """Sets the date_entered_utc of this TimeEntry. + + The date time that time entry is created. UTC Date Time in ISO-8601 format. By default it is set to server time. # noqa: E501 + + :param date_entered_utc: The date_entered_utc of this TimeEntry. # noqa: E501 + :type: datetime + """ + + self._date_entered_utc = date_entered_utc + + @property + def duration(self): + """Gets the duration of this TimeEntry. # noqa: E501 + + The duration of logged minutes. # noqa: E501 + + :return: The duration of this TimeEntry. # noqa: E501 + :rtype: int + """ + return self._duration + + @duration.setter + def duration(self, duration): + """Sets the duration of this TimeEntry. + + The duration of logged minutes. # noqa: E501 + + :param duration: The duration of this TimeEntry. # noqa: E501 + :type: int + """ + + self._duration = duration + + @property + def description(self): + """Gets the description of this TimeEntry. # noqa: E501 + + A description of the time entry. # noqa: E501 + + :return: The description of this TimeEntry. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this TimeEntry. + + A description of the time entry. # noqa: E501 + + :param description: The description of this TimeEntry. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def status(self): + """Gets the status of this TimeEntry. # noqa: E501 + + Status of the time entry. By default a time entry is created with status of `ACTIVE`. A `LOCKED` state indicates that the time entry is currently changing state (for example being invoiced). Updates are not allowed when in this state. It will have a status of INVOICED once it is invoiced. # noqa: E501 + + :return: The status of this TimeEntry. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this TimeEntry. + + Status of the time entry. By default a time entry is created with status of `ACTIVE`. A `LOCKED` state indicates that the time entry is currently changing state (for example being invoiced). Updates are not allowed when in this state. It will have a status of INVOICED once it is invoiced. # noqa: E501 + + :param status: The status of this TimeEntry. # noqa: E501 + :type: str + """ + allowed_values = ["ACTIVE", "LOCKED"] # noqa: E501 + if status not in allowed_values: + raise ValueError( + "Invalid value for `status` ({0}), must be one of {1}".format( # noqa: E501 + status, allowed_values + ) + ) + + self._status = status diff --git a/xero_python/project/models/time_entry_create_or_update.py b/xero_python/project/models/time_entry_create_or_update.py new file mode 100644 index 00000000..ae13c588 --- /dev/null +++ b/xero_python/project/models/time_entry_create_or_update.py @@ -0,0 +1,197 @@ +# coding: utf-8 + +""" + Xero Projects API + + This is the Xero Projects API # noqa: E501 + + OpenAPI spec version: 2.2.6 + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 + +from xero_python.models import BaseModel + + +class TimeEntryCreateOrUpdate(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 = { + "user_id": "str", + "task_id": "str", + "date_utc": "datetime", + "duration": "int", + "description": "str", + } + + attribute_map = { + "user_id": "userId", + "task_id": "taskId", + "date_utc": "dateUtc", + "duration": "duration", + "description": "description", + } + + def __init__( + self, user_id=None, task_id=None, date_utc=None, duration=None, description=None + ): # noqa: E501 + """TimeEntryCreateOrUpdate - a model defined in OpenAPI""" # noqa: E501 + + self._user_id = None + self._task_id = None + self._date_utc = None + self._duration = None + self._description = None + self.discriminator = None + + self.user_id = user_id + self.task_id = task_id + self.date_utc = date_utc + self.duration = duration + if description is not None: + self.description = description + + @property + def user_id(self): + """Gets the user_id of this TimeEntryCreateOrUpdate. # noqa: E501 + + The xero user identifier of the person logging the time. # noqa: E501 + + :return: The user_id of this TimeEntryCreateOrUpdate. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this TimeEntryCreateOrUpdate. + + The xero user identifier of the person logging the time. # noqa: E501 + + :param user_id: The user_id of this TimeEntryCreateOrUpdate. # noqa: E501 + :type: str + """ + if user_id is None: + raise ValueError( + "Invalid value for `user_id`, must not be `None`" + ) # noqa: E501 + + self._user_id = user_id + + @property + def task_id(self): + """Gets the task_id of this TimeEntryCreateOrUpdate. # noqa: E501 + + Identifier of the task that time entry is logged against. # noqa: E501 + + :return: The task_id of this TimeEntryCreateOrUpdate. # noqa: E501 + :rtype: str + """ + return self._task_id + + @task_id.setter + def task_id(self, task_id): + """Sets the task_id of this TimeEntryCreateOrUpdate. + + Identifier of the task that time entry is logged against. # noqa: E501 + + :param task_id: The task_id of this TimeEntryCreateOrUpdate. # noqa: E501 + :type: str + """ + if task_id is None: + raise ValueError( + "Invalid value for `task_id`, must not be `None`" + ) # noqa: E501 + + self._task_id = task_id + + @property + def date_utc(self): + """Gets the date_utc of this TimeEntryCreateOrUpdate. # noqa: E501 + + Date time entry is logged on. UTC Date Time in ISO-8601 format. # noqa: E501 + + :return: The date_utc of this TimeEntryCreateOrUpdate. # noqa: E501 + :rtype: datetime + """ + return self._date_utc + + @date_utc.setter + def date_utc(self, date_utc): + """Sets the date_utc of this TimeEntryCreateOrUpdate. + + Date time entry is logged on. UTC Date Time in ISO-8601 format. # noqa: E501 + + :param date_utc: The date_utc of this TimeEntryCreateOrUpdate. # noqa: E501 + :type: datetime + """ + if date_utc is None: + raise ValueError( + "Invalid value for `date_utc`, must not be `None`" + ) # noqa: E501 + + self._date_utc = date_utc + + @property + def duration(self): + """Gets the duration of this TimeEntryCreateOrUpdate. # noqa: E501 + + Number of minutes to be logged. Duration is between 1 and 59940 inclusively. # noqa: E501 + + :return: The duration of this TimeEntryCreateOrUpdate. # noqa: E501 + :rtype: int + """ + return self._duration + + @duration.setter + def duration(self, duration): + """Sets the duration of this TimeEntryCreateOrUpdate. + + Number of minutes to be logged. Duration is between 1 and 59940 inclusively. # noqa: E501 + + :param duration: The duration of this TimeEntryCreateOrUpdate. # noqa: E501 + :type: int + """ + if duration is None: + raise ValueError( + "Invalid value for `duration`, must not be `None`" + ) # noqa: E501 + + self._duration = duration + + @property + def description(self): + """Gets the description of this TimeEntryCreateOrUpdate. # noqa: E501 + + An optional description of the time entry, will be set to null if not provided during update. # noqa: E501 + + :return: The description of this TimeEntryCreateOrUpdate. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this TimeEntryCreateOrUpdate. + + An optional description of the time entry, will be set to null if not provided during update. # noqa: E501 + + :param description: The description of this TimeEntryCreateOrUpdate. # noqa: E501 + :type: str + """ + + self._description = description diff --git a/xero_python/rest.py b/xero_python/rest.py index c00db15e..5402cf98 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.5 + OpenAPI spec version: 2.2.6 Contact: api@xero.com Generated by: https://openapi-generator.tech """