Skip to content

Commit fce4721

Browse files
authored
Merge pull request #43 from XeroAPI/sid-development
Sid development
2 parents 9789789 + 73113eb commit fce4721

File tree

20 files changed

+446
-238
lines changed

20 files changed

+446
-238
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,17 @@ Official python SDK for Xero API generated by OpenAPI spec for oAuth 2
2020

2121
* [Accounting API](https://developer.xero.com/documentation/api/api-overview)
2222
* [Assets API](https://developer.xero.com/documentation/assets-api/overview)
23+
* [Files API](https://developer.xero.com/documentation/files-api/overview-files)
24+
* [Payroll API (AU)](https://developer.xero.com/documentation/payroll-api/overview)
25+
* [Payroll API (NZ)](https://developer.xero.com/documentation/payroll-api-nz/overview)
26+
* [Payroll API (UK)](https://developer.xero.com/documentation/payroll-api-uk/overview)
2327
* [Projects API](https://developer.xero.com/documentation/projects/overview-projects)
24-
* [AU Payroll API](https://developer.xero.com/documentation/payroll-api/overview)
25-
* [UK Payroll API](https://developer.xero.com/documentation/payroll-api-uk/overview)
26-
* [NZ Payroll API](https://developer.xero.com/documentation/payroll-api-nz/overview)
27-
28+
2829
* Error handling for ease of use.
2930

31+
## SDK Documentation
32+
* [Accounting](https://xeroapi.github.io/xero-python/v1/accounting/index.html)
33+
3034
## Starter Project
3135
We've created [xero-python-outh2-starter](https://github.com/XeroAPI/xero-python-oauth2-starter) a project to demonstrate how to use this SDK.
3236

docs/v1/accounting/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5792,7 +5792,7 @@
57925792
<li class="nav-fixed nav-header active" data-group="_"><a href="#api-_">API Summary</a></li>
57935793

57945794
<li class="nav-header" data-group="Accounting"><strong>SDK: </strong>xero-python</li>
5795-
<li class="nav-header" data-group="Accounting"><strong>VSN: </strong>1.5.1</li>
5795+
<li class="nav-header" data-group="Accounting"><strong>VSN: </strong>1.5.2</li>
57965796
<li class="nav-header" data-group="Accounting"><a href="#api-Accounting">Methods</a></li>
57975797
<li data-group="Accounting" data-name="createAccount" class="">
57985798
<a href="#api-Accounting-createAccount">createAccount</a>
@@ -6479,7 +6479,7 @@ <h1>Xero Accounting API</h1>
64796479
<div id="header">
64806480
<div id="api-_">
64816481
<h2 id="welcome-to-apidoc">API and SDK Documentation</h2>
6482-
<div class="app-desc">Version: 1.5.1</div>
6482+
<div class="app-desc">Version: 1.5.2</div>
64836483
<!--
64846484
<div class="app-desc">Version: 2.10.4</div>
64856485
<hr>

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.5.1",
51+
version="1.5.2",
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.5.1"
5+
__version__ = "1.5.2"

xero_python/accounting/api/accounting_api.py

Lines changed: 62 additions & 62 deletions
Large diffs are not rendered by default.

xero_python/accounting/docs/AccountingApi.md

Lines changed: 124 additions & 124 deletions
Large diffs are not rendered by default.

xero_python/assets/api/asset_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"""
1111

1212
"""
13-
OpenAPI spec version: 2.10.2
13+
OpenAPI spec version: 2.10.4
1414
"""
1515

1616
import importlib

xero_python/docs/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ These endpoints are related to managing authentication tokens and identity for X
33

44
The `xero_python` package is automatically generated by the [XeroAPI SDK 2.0 Codegen](https://github.com/xero-github/xeroapi-sdk-codegen) project:
55

6-
- API version: 2.10.2
7-
- Package version: 1.5.1
6+
- API version: 2.10.4
7+
- Package version: 1.5.2
88
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
99
For more information, please visit [https://developer.xero.com](https://developer.xero.com)
1010

xero_python/file/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222
from xero_python.file.models.files import Files
2323
from xero_python.file.models.folder import Folder
2424
from xero_python.file.models.folders import Folders
25-
from xero_python.file.models.inline_object import InlineObject
26-
from xero_python.file.models.inline_object1 import InlineObject1
2725
from xero_python.file.models.object_group import ObjectGroup
2826
from xero_python.file.models.object_type import ObjectType
27+
from xero_python.file.models.upload_object import UploadObject
2928
from xero_python.file.models.user import User

xero_python/file/api/files_api.py

Lines changed: 48 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"""
1111

1212
"""
13-
OpenAPI spec version: 2.10.2
13+
OpenAPI spec version: 2.10.4
1414
"""
1515

1616
import importlib
@@ -1231,9 +1231,9 @@ def update_folder(
12311231
def upload_file(
12321232
self,
12331233
xero_tenant_id,
1234-
body=empty,
1235-
name=empty,
1236-
filename=empty,
1234+
body,
1235+
name,
1236+
filename,
12371237
mime_type=empty,
12381238
_return_http_data_only=True,
12391239
_preload_content=True,
@@ -1242,9 +1242,9 @@ def upload_file(
12421242
"""Uploads a File to the inbox # noqa: E501
12431243
OAuth2 scope: files
12441244
:param str xero_tenant_id: Xero identifier for Tenant (required)
1245-
:param str body:
1246-
:param str name: exact name of the file you are uploading
1247-
:param str filename:
1245+
:param str body: (required)
1246+
:param str name: exact name of the file you are uploading (required)
1247+
:param str filename: (required)
12481248
:param str mime_type:
12491249
:param bool _return_http_data_only: return received data only
12501250
:param bool _preload_content: load received data in models
@@ -1258,6 +1258,22 @@ def upload_file(
12581258
"Missing the required parameter `xero_tenant_id` "
12591259
"when calling `upload_file`"
12601260
)
1261+
# verify the required parameter 'body' is set
1262+
if body is None:
1263+
raise ValueError(
1264+
"Missing the required parameter `body` " "when calling `upload_file`"
1265+
)
1266+
# verify the required parameter 'name' is set
1267+
if name is None:
1268+
raise ValueError(
1269+
"Missing the required parameter `name` " "when calling `upload_file`"
1270+
)
1271+
# verify the required parameter 'filename' is set
1272+
if filename is None:
1273+
raise ValueError(
1274+
"Missing the required parameter `filename` "
1275+
"when calling `upload_file`"
1276+
)
12611277

12621278
collection_formats = {}
12631279
path_params = {}
@@ -1317,9 +1333,9 @@ def upload_file_to_folder(
13171333
self,
13181334
xero_tenant_id,
13191335
folder_id,
1320-
body=empty,
1321-
name=empty,
1322-
filename=empty,
1336+
body,
1337+
name,
1338+
filename,
13231339
mime_type=empty,
13241340
_return_http_data_only=True,
13251341
_preload_content=True,
@@ -1329,9 +1345,9 @@ def upload_file_to_folder(
13291345
OAuth2 scope: files
13301346
:param str xero_tenant_id: Xero identifier for Tenant (required)
13311347
:param str folder_id: pass required folder id to save file to specific folder (required)
1332-
:param str body:
1333-
:param str name: exact name of the file you are uploading
1334-
:param str filename:
1348+
:param str body: (required)
1349+
:param str name: exact name of the file you are uploading (required)
1350+
:param str filename: (required)
13351351
:param str mime_type:
13361352
:param bool _return_http_data_only: return received data only
13371353
:param bool _preload_content: load received data in models
@@ -1351,6 +1367,24 @@ def upload_file_to_folder(
13511367
"Missing the required parameter `folder_id` "
13521368
"when calling `upload_file_to_folder`"
13531369
)
1370+
# verify the required parameter 'body' is set
1371+
if body is None:
1372+
raise ValueError(
1373+
"Missing the required parameter `body` "
1374+
"when calling `upload_file_to_folder`"
1375+
)
1376+
# verify the required parameter 'name' is set
1377+
if name is None:
1378+
raise ValueError(
1379+
"Missing the required parameter `name` "
1380+
"when calling `upload_file_to_folder`"
1381+
)
1382+
# verify the required parameter 'filename' is set
1383+
if filename is None:
1384+
raise ValueError(
1385+
"Missing the required parameter `filename` "
1386+
"when calling `upload_file_to_folder`"
1387+
)
13541388

13551389
collection_formats = {}
13561390
path_params = {
@@ -1385,7 +1419,7 @@ def upload_file_to_folder(
13851419

13861420
# Authentication setting
13871421
auth_settings = ["OAuth2"]
1388-
url = self.get_resource_url("/Folders/{FolderId}")
1422+
url = self.get_resource_url("/Files/{FolderId}")
13891423

13901424
try:
13911425
return self.api_client.call_api(

0 commit comments

Comments
 (0)