Skip to content

Commit d83da35

Browse files
committed
Rebuild from OAS 2.4.4
1 parent e8416f3 commit d83da35

File tree

559 files changed

+31373
-342
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

559 files changed

+31373
-342
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,5 @@ def read_file(filename):
4848
keywords="xero python sdk API oAuth",
4949
name="xero_python",
5050
packages=find_packages(include=["xero_python", "xero_python.*"]),
51-
version="1.0.13",
51+
version="1.1.0",
5252
)

xero_python/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
__author__ = """Xero Developer API"""
44
__email__ = "[email protected]"
5-
__version__ = "1.0.13"
5+
__version__ = "1.1.0"

xero_python/accounting/__init__.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
88
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
99
10-
OpenAPI spec version: 2.4.0
10+
OpenAPI spec version: 2.4.4
1111
1212
Generated by: https://openapi-generator.tech
1313
"""
@@ -30,6 +30,7 @@
3030
from xero_python.accounting.models.allocations import Allocations
3131
from xero_python.accounting.models.attachment import Attachment
3232
from xero_python.accounting.models.attachments import Attachments
33+
from xero_python.accounting.models.balance_details import BalanceDetails
3334
from xero_python.accounting.models.balances import Balances
3435
from xero_python.accounting.models.bank_transaction import BankTransaction
3536
from xero_python.accounting.models.bank_transactions import BankTransactions
@@ -49,6 +50,8 @@
4950
from xero_python.accounting.models.contact_groups import ContactGroups
5051
from xero_python.accounting.models.contact_person import ContactPerson
5152
from xero_python.accounting.models.contacts import Contacts
53+
from xero_python.accounting.models.conversion_balances import ConversionBalances
54+
from xero_python.accounting.models.conversion_date import ConversionDate
5255
from xero_python.accounting.models.country_code import CountryCode
5356
from xero_python.accounting.models.credit_note import CreditNote
5457
from xero_python.accounting.models.credit_notes import CreditNotes
@@ -64,6 +67,12 @@
6467
from xero_python.accounting.models.external_link import ExternalLink
6568
from xero_python.accounting.models.history_record import HistoryRecord
6669
from xero_python.accounting.models.history_records import HistoryRecords
70+
from xero_python.accounting.models.import_summary import ImportSummary
71+
from xero_python.accounting.models.import_summary_accounts import ImportSummaryAccounts
72+
from xero_python.accounting.models.import_summary_object import ImportSummaryObject
73+
from xero_python.accounting.models.import_summary_organisation import (
74+
ImportSummaryOrganisation,
75+
)
6776
from xero_python.accounting.models.invoice import Invoice
6877
from xero_python.accounting.models.invoice_reminder import InvoiceReminder
6978
from xero_python.accounting.models.invoice_reminders import InvoiceReminders
@@ -121,6 +130,7 @@
121130
from xero_python.accounting.models.row_type import RowType
122131
from xero_python.accounting.models.sales_tracking_category import SalesTrackingCategory
123132
from xero_python.accounting.models.schedule import Schedule
133+
from xero_python.accounting.models.setup import Setup
124134
from xero_python.accounting.models.tax_component import TaxComponent
125135
from xero_python.accounting.models.tax_rate import TaxRate
126136
from xero_python.accounting.models.tax_rates import TaxRates

xero_python/accounting/api/accounting_api.py

Lines changed: 79 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

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

8-
OpenAPI spec version: 2.4.0
8+
OpenAPI spec version: 2.4.4
99
1010
Generated by: https://openapi-generator.tech
1111
"""
@@ -15909,6 +15909,84 @@ def get_users(
1590915909
except exceptions.HTTPStatusException as error:
1591015910
raise translate_status_exception(error, self, "get_users")
1591115911

15912+
def post_setup(
15913+
self,
15914+
xero_tenant_id,
15915+
setup,
15916+
_return_http_data_only=True,
15917+
_preload_content=True,
15918+
_request_timeout=None,
15919+
):
15920+
"""Allows you to set the chart of accounts, the conversion date and conversion balances # noqa: E501
15921+
OAuth2 scope: accounting.settings
15922+
:param str xero_tenant_id: Xero identifier for Tenant (required)
15923+
:param Setup setup: Object including an accounts array, a conversion balances array and a conversion date object in body of request (required)
15924+
:param bool _return_http_data_only: return received data only
15925+
:param bool _preload_content: load received data in models
15926+
:param bool _request_timeout: maximum wait time for response
15927+
:return: ImportSummaryObject
15928+
"""
15929+
15930+
# verify the required parameter 'xero_tenant_id' is set
15931+
if xero_tenant_id is None:
15932+
raise ValueError(
15933+
"Missing the required parameter `xero_tenant_id` "
15934+
"when calling `post_setup`"
15935+
)
15936+
# verify the required parameter 'setup' is set
15937+
if setup is None:
15938+
raise ValueError(
15939+
"Missing the required parameter `setup` " "when calling `post_setup`"
15940+
)
15941+
15942+
collection_formats = {}
15943+
path_params = {}
15944+
15945+
query_params = []
15946+
15947+
header_params = {
15948+
"xero-tenant-id": xero_tenant_id,
15949+
}
15950+
15951+
local_var_files = {}
15952+
form_params = []
15953+
15954+
body_params = setup
15955+
# HTTP header `Accept`
15956+
header_params["Accept"] = self.api_client.select_header_accept(
15957+
["application/json"]
15958+
)
15959+
15960+
# HTTP header `Content-Type`
15961+
header_params["Content-Type"] = self.api_client.select_header_content_type(
15962+
["application/json"]
15963+
)
15964+
15965+
# Authentication setting
15966+
auth_settings = ["OAuth2"]
15967+
url = self.get_resource_url("/Setup")
15968+
15969+
try:
15970+
return self.api_client.call_api(
15971+
url,
15972+
"POST",
15973+
path_params,
15974+
query_params,
15975+
header_params,
15976+
body=body_params,
15977+
post_params=form_params,
15978+
files=local_var_files,
15979+
response_type="ImportSummaryObject",
15980+
response_model_finder=self.get_model_finder(),
15981+
auth_settings=auth_settings,
15982+
_return_http_data_only=_return_http_data_only,
15983+
_preload_content=_preload_content,
15984+
_request_timeout=_request_timeout,
15985+
collection_formats=collection_formats,
15986+
)
15987+
except exceptions.HTTPStatusException as error:
15988+
raise translate_status_exception(error, self, "post_setup")
15989+
1591215990
def update_account(
1591315991
self,
1591415992
xero_tenant_id,

xero_python/accounting/docs/AccountingApi.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ Method | HTTP request | Description
191191
[**get_tracking_category**](AccountingApi.md#get_tracking_category) | **GET** /TrackingCategories/{TrackingCategoryID} | Allows you to retrieve tracking categories and options for specified category
192192
[**get_user**](AccountingApi.md#get_user) | **GET** /Users/{UserID} | Allows you to retrieve a specified user
193193
[**get_users**](AccountingApi.md#get_users) | **GET** /Users | Allows you to retrieve users
194+
[**post_setup**](AccountingApi.md#post_setup) | **POST** /Setup | Allows you to set the chart of accounts, the conversion date and conversion balances
194195
[**update_account**](AccountingApi.md#update_account) | **POST** /Accounts/{AccountID} | Allows you to update a chart of accounts
195196
[**update_account_attachment_by_file_name**](AccountingApi.md#update_account_attachment_by_file_name) | **POST** /Accounts/{AccountID}/Attachments/{FileName} | Allows you to update Attachment on Account by Filename
196197
[**update_bank_transaction**](AccountingApi.md#update_bank_transaction) | **POST** /BankTransactions/{BankTransactionID} | Allows you to update a single spend or receive money transaction
@@ -12441,6 +12442,69 @@ Name | Type | Description | Notes
1244112442

1244212443
[[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)
1244312444

12445+
# **post_setup**
12446+
> ImportSummaryObject post_setup(xero_tenant_id, setup)
12447+
12448+
Allows you to set the chart of accounts, the conversion date and conversion balances
12449+
12450+
### Example
12451+
12452+
* OAuth Authentication (OAuth2):
12453+
```python
12454+
from xero_python.api_client import Configuration, ApiClient
12455+
from xero_python.api_client.oauth2 import OAuth2Token
12456+
from xero_python.exceptions import ApiException
12457+
from xero_python.accounting import AccountingApi
12458+
from pprint import pprint
12459+
12460+
# Configure OAuth2 access token for authorization: OAuth2
12461+
# simplified version, `xero_oauth2_token` represents permanent global token storage
12462+
xero_oauth2_token = {} # set to valid xero oauth2 token dictionary
12463+
# create client configuration with client id and client secret for automatic token refresh
12464+
api_config = Configuration(oauth2_token=OAuth2Token(
12465+
client_id="YOUR_API_CLIENT_ID", client_secret="YOUR_API_CLIENT_SECRET"
12466+
))
12467+
# configure xero-python sdk client
12468+
api_client = ApiClient(
12469+
api_config,
12470+
oauth2_token_saver=lambda x: xero_oauth2_token.update(x),
12471+
oauth2_token_getter=lambda : xero_oauth2_token
12472+
)
12473+
# create an instance of the API class
12474+
api_instance = AccountingApi(api_client)
12475+
12476+
xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant
12477+
setup = { "ConversionDate": {}, "ConversionBalances": [], "Accounts": [ { "Code": "200", "Name": "Sales", "Type": "SALES", "ReportingCode": "REV.TRA.GOO" }, { "Code": "400", "Name": "Advertising", "Type": "OVERHEADS", "ReportingCode": "EXP" }, { "Code": "610", "Name": "Accounts Receivable", "Type": "CURRENT", "SystemAccount": "DEBTORS", "ReportingCode": "ASS.CUR.REC.TRA" }, { "Code": "800", "Name": "Accounts Payable", "Type": "CURRLIAB", "SystemAccount": "CREDITORS", "ReportingCode": "LIA.CUR.PAY" } ] } # Setup | Object including an accounts array, a conversion balances array and a conversion date object in body of request
12478+
try:
12479+
# Allows you to set the chart of accounts, the conversion date and conversion balances
12480+
api_response = api_instance.post_setup(xero_tenant_id, setup)
12481+
pprint(api_response)
12482+
except ApiException as e:
12483+
print("Exception when calling AccountingApi->post_setup: %s\n" % e)
12484+
```
12485+
12486+
### Parameters
12487+
12488+
Name | Type | Description | Notes
12489+
------------- | ------------- | ------------- | -------------
12490+
**xero_tenant_id** | **str**| Xero identifier for Tenant |
12491+
**setup** | [**Setup**](Setup.md)| Object including an accounts array, a conversion balances array and a conversion date object in body of request |
12492+
12493+
### Return type
12494+
12495+
[**ImportSummaryObject**](ImportSummaryObject.md)
12496+
12497+
### Authorization
12498+
12499+
[OAuth2](../README.md#OAuth2)
12500+
12501+
### HTTP request headers
12502+
12503+
- **Content-Type**: application/json
12504+
- **Accept**: application/json
12505+
12506+
[[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)
12507+
1244412508
# **update_account**
1244512509
> Accounts update_account(xero_tenant_id, account_id, accounts)
1244612510

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# BalanceDetails
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**balance** | **float** | The opening balances of the account. Debits are positive, credits are negative values | [optional]
7+
**currency_code** | **str** | The currency of the balance (Not required for base currency) | [optional]
8+
**currency_rate** | **float** | (Optional) Exchange rate to base currency when money is spent or received. If not specified, XE rate for the day is applied | [optional]
9+
10+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11+
12+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# ConversionBalances
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**account_code** | **str** | The account code for a account | [optional]
7+
**balance** | **float** | The opening balances of the account. Debits are positive, credits are negative values | [optional]
8+
**balance_details** | [**list[BalanceDetails]**](BalanceDetails.md) | | [optional]
9+
10+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11+
12+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# ConversionDate
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**month** | **int** | The month the organisation starts using Xero. Value is an integer between 1 and 12 | [optional]
7+
**year** | **int** | The year the organisation starts using Xero. Value is an integer greater than 2006 | [optional]
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+
11+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# ImportSummary
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**accounts** | [**ImportSummaryAccounts**](ImportSummaryAccounts.md) | | [optional]
7+
**organisation** | [**ImportSummaryOrganisation**](ImportSummaryOrganisation.md) | | [optional]
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+
11+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# ImportSummaryAccounts
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**total** | **float** | The total number of accounts in the org | [optional]
7+
**new** | **float** | The number of new accounts created | [optional]
8+
**updated** | **float** | The number of accounts updated | [optional]
9+
**deleted** | **float** | The number of accounts deleted | [optional]
10+
**locked** | **float** | The number of locked accounts | [optional]
11+
**system** | **float** | The number of system accounts | [optional]
12+
**errored** | **float** | The number of accounts that had an error | [optional]
13+
**present** | **bool** | | [optional]
14+
**new_or_updated** | **float** | The number of new or updated accounts | [optional]
15+
16+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
17+
18+

0 commit comments

Comments
 (0)