Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@ Official python SDK for Xero API generated by OpenAPI spec for oAuth 2
* 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)
* [AU Payroll API](https://developer.xero.com/documentation/payroll-api/overview)
* [UK Payroll API](https://developer.xero.com/documentation/payroll-api-uk/overview)
* [NZ Payroll API](https://developer.xero.com/documentation/payroll-api-nz/overview)

* Error handling for ease of use.

## Starter Project
Expand Down Expand Up @@ -95,8 +98,6 @@ We've created [xero-python-outh2-app](https://github.com/XeroAPI/xero-python-oau
* settings
* tracking categories



## Credits

* This package was created with
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ def read_file(filename):
keywords="xero python sdk API oAuth",
name="xero_python",
packages=find_packages(include=["xero_python", "xero_python.*"]),
version="1.1.0",
version="1.2.0",
)
2 changes: 1 addition & 1 deletion xero_python/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

__author__ = """Xero Developer API"""
__email__ = "api@xero.com"
__version__ = "1.1.0"
__version__ = "1.2.0"
5 changes: 4 additions & 1 deletion xero_python/accounting/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501

OpenAPI spec version: 2.4.4
OpenAPI spec version: 2.7.0
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand All @@ -26,6 +26,9 @@
from xero_python.accounting.models.action import Action
from xero_python.accounting.models.actions import Actions
from xero_python.accounting.models.address import Address
from xero_python.accounting.models.address_for_organisation import (
AddressForOrganisation,
)
from xero_python.accounting.models.allocation import Allocation
from xero_python.accounting.models.allocations import Allocations
from xero_python.accounting.models.attachment import Attachment
Expand Down
4 changes: 2 additions & 2 deletions xero_python/accounting/api/accounting_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501

OpenAPI spec version: 2.4.4
OpenAPI spec version: 2.7.0
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down Expand Up @@ -14938,7 +14938,7 @@ def get_report_balance_sheet(
"""Allows you to retrieve report for BalanceSheet # noqa: E501
OAuth2 scope: accounting.reports.read
:param str xero_tenant_id: Xero identifier for Tenant (required)
:param str date: The date of the Balance Sheet report
:param date date: The date of the Balance Sheet report
:param int periods: The number of periods for the Balance Sheet report
:param str timeframe: The period size to compare to (MONTH, QUARTER, YEAR)
:param str tracking_option_id1: The tracking option 1 for the Balance Sheet report
Expand Down
12 changes: 6 additions & 6 deletions xero_python/accounting/docs/AccountingApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -8292,11 +8292,11 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xero_tenant_id** | **str**| Xero identifier for Tenant |
**page** | **int**| Up to 100 linked transactions will be returned in a single API call. Use the page parameter to specify the page to be returned e.g. page=1. | [optional]
**linked_transaction_id** | **str**| The Xero identifier for an Linked Transaction | [optional]
**source_transaction_id** | **str**| Filter by the SourceTransactionID. Get the linked transactions created from a particular ACCPAY invoice | [optional]
**contact_id** | **str**| Filter by the ContactID. Get all the linked transactions that have been assigned to a particular customer. | [optional]
**linked_transaction_id** | [**str**](.md)| The Xero identifier for an Linked Transaction | [optional]
**source_transaction_id** | [**str**](.md)| Filter by the SourceTransactionID. Get the linked transactions created from a particular ACCPAY invoice | [optional]
**contact_id** | [**str**](.md)| Filter by the ContactID. Get all the linked transactions that have been assigned to a particular customer. | [optional]
**status** | **str**| Filter by the combination of ContactID and Status. Get the linked transactions associaed to a customer and with a status | [optional]
**target_transaction_id** | **str**| Filter by the TargetTransactionID. Get all the linked transactions allocated to a particular ACCREC invoice | [optional]
**target_transaction_id** | [**str**](.md)| Filter by the TargetTransactionID. Get all the linked transactions allocated to a particular ACCREC invoice | [optional]

### Return type

Expand Down Expand Up @@ -11668,7 +11668,7 @@ api_client = ApiClient(
api_instance = AccountingApi(api_client)

xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant
date = '2019-11-01' # str | The date of the Balance Sheet report (optional)
date = '2019-11-01' # date | The date of the Balance Sheet report (optional)
periods = 3 # int | The number of periods for the Balance Sheet report (optional)
timeframe = 'MONTH' # str | The period size to compare to (MONTH, QUARTER, YEAR) (optional)
tracking_option_id1 = '00000000-0000-0000-000-000000000000' # str | The tracking option 1 for the Balance Sheet report (optional)
Expand All @@ -11688,7 +11688,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xero_tenant_id** | **str**| Xero identifier for Tenant |
**date** | **str**| The date of the Balance Sheet report | [optional]
**date** | **date**| The date of the Balance Sheet report | [optional]
**periods** | **int**| The number of periods for the Balance Sheet report | [optional]
**timeframe** | **str**| The period size to compare to (MONTH, QUARTER, YEAR) | [optional]
**tracking_option_id1** | **str**| The tracking option 1 for the Balance Sheet report | [optional]
Expand Down
19 changes: 19 additions & 0 deletions xero_python/accounting/docs/AddressForOrganisation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# AddressForOrganisation

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**address_type** | **str** | define the type of address | [optional]
**address_line1** | **str** | max length = 500 | [optional]
**address_line2** | **str** | max length = 500 | [optional]
**address_line3** | **str** | max length = 500 | [optional]
**address_line4** | **str** | max length = 500 | [optional]
**city** | **str** | max length = 255 | [optional]
**region** | **str** | max length = 255 | [optional]
**postal_code** | **str** | max length = 50 | [optional]
**country** | **str** | max length = 50, [A-Z], [a-z] only | [optional]
**attention_to** | **str** | max length = 255 | [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)


2 changes: 1 addition & 1 deletion xero_python/accounting/docs/CISOrgSetting.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**cis_contractor_enabled** | **bool** | true or false - Boolean that describes if the organisation is a CIS Contractor | [optional]
**cis_sub_contractor_enabled** | **bool** | true or false - Boolean that describes if the organisation is a CIS SubContractor | [optional]
**rate** | **int** | CIS Deduction rate for the organisation | [optional]
**rate** | **float** | CIS Deduction rate for the organisation | [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)

Expand Down
2 changes: 1 addition & 1 deletion xero_python/accounting/docs/CISSetting.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**cis_enabled** | **bool** | Boolean that describes if the contact is a CIS Subcontractor | [optional]
**rate** | **int** | CIS Deduction rate for the contact if he is a subcontractor. If the contact is not CISEnabled, then the rate is not returned | [optional]
**rate** | **float** | CIS Deduction rate for the contact if he is a subcontractor. If the contact is not CISEnabled, then the rate is not 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)

Expand Down
3 changes: 3 additions & 0 deletions xero_python/accounting/docs/CreditNote.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ Name | Type | Description | Notes
**type** | **str** | See Credit Note Types | [optional]
**contact** | [**Contact**](Contact.md) | | [optional]
**date** | **date** | The date the credit note is issued YYYY-MM-DD. If the Date element is not specified then it will default to the current date based on the timezone setting of the organisation | [optional]
**due_date** | **date** | Date invoice is due – YYYY-MM-DD | [optional]
**status** | **str** | See Credit Note Status Codes | [optional]
**line_amount_types** | [**LineAmountTypes**](LineAmountTypes.md) | | [optional]
**line_items** | [**list[LineItem]**](LineItem.md) | See Invoice Line Items | [optional]
**sub_total** | **float** | The subtotal of the credit note excluding taxes | [optional]
**total_tax** | **float** | The total tax on the credit note | [optional]
**total** | **float** | The total of the Credit Note(subtotal + total tax) | [optional]
**cis_deduction** | **float** | CIS deduction for UK contractors | [optional]
**cis_rate** | **float** | CIS Deduction rate for the organisation | [optional]
**updated_date_utc** | **datetime** | UTC timestamp of last update to the credit note | [optional]
**currency_code** | [**CurrencyCode**](CurrencyCode.md) | | [optional]
**fully_paid_on_date** | **date** | Date when credit note was fully paid(UTC format) | [optional]
Expand Down
3 changes: 2 additions & 1 deletion xero_python/accounting/docs/Invoice.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Name | Type | Description | Notes
**due_date** | **date** | Date invoice is due – YYYY-MM-DD | [optional]
**line_amount_types** | [**LineAmountTypes**](LineAmountTypes.md) | | [optional]
**invoice_number** | **str** | ACCREC – Unique alpha numeric code identifying invoice (when missing will auto-generate from your Organisation Invoice Settings) (max length = 255) | [optional]
**reference** | **str** | ACCREC only – additional reference number (max length = 255) | [optional]
**reference** | **str** | ACCREC only – additional reference number | [optional]
**branding_theme_id** | **str** | See BrandingThemes | [optional]
**url** | **str** | URL link to a source document – shown as “Go to [appName]” in the Xero app | [optional]
**currency_code** | [**CurrencyCode**](CurrencyCode.md) | | [optional]
Expand All @@ -20,6 +20,7 @@ Name | Type | Description | Notes
**expected_payment_date** | **date** | Shown on sales invoices (Accounts Receivable) when this has been set | [optional]
**planned_payment_date** | **date** | Shown on bills (Accounts Payable) when this has been set | [optional]
**cis_deduction** | **float** | CIS deduction for UK contractors | [optional]
**cis_rate** | **float** | CIS Deduction rate for the organisation | [optional]
**sub_total** | **float** | Total of invoice excluding taxes | [optional]
**total_tax** | **float** | Total tax on invoice | [optional]
**total** | **float** | Total of Invoice tax inclusive (i.e. SubTotal + TotalTax). This will be ignored if it doesn’t equal the sum of the LineAmounts | [optional]
Expand Down
2 changes: 1 addition & 1 deletion xero_python/accounting/docs/Organisation.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Name | Type | Description | Notes
**_class** | **str** | Organisation Classes describe which plan the Xero organisation is on (e.g. DEMO, TRIAL, PREMIUM) | [optional]
**edition** | **str** | BUSINESS or PARTNER. Partner edition organisations are sold exclusively through accounting partners and have restricted functionality (e.g. no access to invoicing) | [optional]
**line_of_business** | **str** | Description of business type as defined in Organisation settings | [optional]
**addresses** | [**list[Address]**](Address.md) | Address details for organisation – see Addresses | [optional]
**addresses** | [**list[AddressForOrganisation]**](AddressForOrganisation.md) | Address details for organisation – see Addresses | [optional]
**phones** | [**list[Phone]**](Phone.md) | Phones details for organisation – see Phones | [optional]
**external_links** | [**list[ExternalLink]**](ExternalLink.md) | Organisation profile links for popular services such as Facebook,Twitter, GooglePlus and LinkedIn. You can also add link to your website here. Shown if Organisation settings is updated in Xero. See ExternalLinks below | [optional]
**payment_terms** | [**PaymentTerm**](PaymentTerm.md) | | [optional]
Expand Down
5 changes: 4 additions & 1 deletion xero_python/accounting/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501

OpenAPI spec version: 2.4.4
OpenAPI spec version: 2.7.0
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand All @@ -21,6 +21,9 @@
from xero_python.accounting.models.action import Action
from xero_python.accounting.models.actions import Actions
from xero_python.accounting.models.address import Address
from xero_python.accounting.models.address_for_organisation import (
AddressForOrganisation,
)
from xero_python.accounting.models.allocation import Allocation
from xero_python.accounting.models.allocations import Allocations
from xero_python.accounting.models.attachment import Attachment
Expand Down
2 changes: 1 addition & 1 deletion xero_python/accounting/models/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501

OpenAPI spec version: 2.4.4
OpenAPI spec version: 2.7.0
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down
2 changes: 1 addition & 1 deletion xero_python/accounting/models/account_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501

OpenAPI spec version: 2.4.4
OpenAPI spec version: 2.7.0
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down
2 changes: 1 addition & 1 deletion xero_python/accounting/models/accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501

OpenAPI spec version: 2.4.4
OpenAPI spec version: 2.7.0
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down
2 changes: 1 addition & 1 deletion xero_python/accounting/models/accounts_payable.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501

OpenAPI spec version: 2.4.4
OpenAPI spec version: 2.7.0
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down
2 changes: 1 addition & 1 deletion xero_python/accounting/models/accounts_receivable.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501

OpenAPI spec version: 2.4.4
OpenAPI spec version: 2.7.0
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down
2 changes: 1 addition & 1 deletion xero_python/accounting/models/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501

OpenAPI spec version: 2.4.4
OpenAPI spec version: 2.7.0
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down
2 changes: 1 addition & 1 deletion xero_python/accounting/models/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: 2.4.4
OpenAPI spec version: 2.7.0
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down
4 changes: 2 additions & 2 deletions xero_python/accounting/models/address.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501

OpenAPI spec version: 2.4.4
OpenAPI spec version: 2.7.0
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down Expand Up @@ -124,7 +124,7 @@ def address_type(self, address_type):
:param address_type: The address_type of this Address. # noqa: E501
:type: str
"""
allowed_values = ["POBOX", "STREET", "DELIVERY", "None"] # noqa: E501
allowed_values = ["POBOX", "STREET", "None"] # noqa: E501
if address_type not in allowed_values:
raise ValueError(
"Invalid value for `address_type` ({0}), must be one of {1}".format( # noqa: E501
Expand Down
Loading