Skip to content

Commit

Permalink
Add Files API support and build from OAS 2.10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
SidneyAllen committed Mar 20, 2021
1 parent 4ac8b2d commit 5b132e7
Show file tree
Hide file tree
Showing 42 changed files with 3,943 additions and 86 deletions.
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.4.0",
version="1.5.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__ = "[email protected]"
__version__ = "1.4.0"
__version__ = "1.5.0"
2 changes: 1 addition & 1 deletion xero_python/accounting/api/accounting_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"""

"""
OpenAPI spec version: 2.9.3
OpenAPI spec version: 2.10.1
"""

import importlib
Expand Down
1 change: 1 addition & 0 deletions xero_python/accounting/docs/BatchPayment.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Name | Type | Description | Notes
**total_amount** | **str** | The total of the payments that make up the batch (read-only) | [optional]
**updated_date_utc** | **datetime** | UTC timestamp of last update to the payment | [optional]
**is_reconciled** | **str** | Booelan that tells you if the batch payment has been reconciled (read-only) | [optional]
**validation_errors** | [**list[ValidationError]**](ValidationError.md) | Displays array of validation error messages from the API | [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
16 changes: 8 additions & 8 deletions xero_python/accounting/docs/ImportSummaryAccounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**total** | **float** | The total number of accounts in the org | [optional]
**new** | **float** | The number of new accounts created | [optional]
**updated** | **float** | The number of accounts updated | [optional]
**deleted** | **float** | The number of accounts deleted | [optional]
**locked** | **float** | The number of locked accounts | [optional]
**system** | **float** | The number of system accounts | [optional]
**errored** | **float** | The number of accounts that had an error | [optional]
**total** | **int** | The total number of accounts in the org | [optional]
**new** | **int** | The number of new accounts created | [optional]
**updated** | **int** | The number of accounts updated | [optional]
**deleted** | **int** | The number of accounts deleted | [optional]
**locked** | **int** | The number of locked accounts | [optional]
**system** | **int** | The number of system accounts | [optional]
**errored** | **int** | The number of accounts that had an error | [optional]
**present** | **bool** | | [optional]
**new_or_updated** | **float** | The number of new or updated accounts | [optional]
**new_or_updated** | **int** | The number of new or updated accounts | [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
29 changes: 29 additions & 0 deletions xero_python/accounting/models/batch_payment.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class BatchPayment(BaseModel):
"total_amount": "str",
"updated_date_utc": "datetime[ms-format]",
"is_reconciled": "str",
"validation_errors": "list[ValidationError]",
}

attribute_map = {
Expand All @@ -65,6 +66,7 @@ class BatchPayment(BaseModel):
"total_amount": "TotalAmount",
"updated_date_utc": "UpdatedDateUTC",
"is_reconciled": "IsReconciled",
"validation_errors": "ValidationErrors",
}

def __init__(
Expand All @@ -85,6 +87,7 @@ def __init__(
total_amount=None,
updated_date_utc=None,
is_reconciled=None,
validation_errors=None,
): # noqa: E501
"""BatchPayment - a model defined in OpenAPI""" # noqa: E501

Expand All @@ -104,6 +107,7 @@ def __init__(
self._total_amount = None
self._updated_date_utc = None
self._is_reconciled = None
self._validation_errors = None
self.discriminator = None

if account is not None:
Expand Down Expand Up @@ -138,6 +142,8 @@ def __init__(
self.updated_date_utc = updated_date_utc
if is_reconciled is not None:
self.is_reconciled = is_reconciled
if validation_errors is not None:
self.validation_errors = validation_errors

@property
def account(self):
Expand Down Expand Up @@ -541,3 +547,26 @@ def is_reconciled(self, is_reconciled):
"""

self._is_reconciled = is_reconciled

@property
def validation_errors(self):
"""Gets the validation_errors of this BatchPayment. # noqa: E501
Displays array of validation error messages from the API # noqa: E501
:return: The validation_errors of this BatchPayment. # noqa: E501
:rtype: list[ValidationError]
"""
return self._validation_errors

@validation_errors.setter
def validation_errors(self, validation_errors):
"""Sets the validation_errors of this BatchPayment.
Displays array of validation error messages from the API # noqa: E501
:param validation_errors: The validation_errors of this BatchPayment. # noqa: E501
:type: list[ValidationError]
"""

self._validation_errors = validation_errors
48 changes: 24 additions & 24 deletions xero_python/accounting/models/import_summary_accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ class ImportSummaryAccounts(BaseModel):
and the value is json key in definition.
"""
openapi_types = {
"total": "float",
"new": "float",
"updated": "float",
"deleted": "float",
"locked": "float",
"system": "float",
"errored": "float",
"total": "int",
"new": "int",
"updated": "int",
"deleted": "int",
"locked": "int",
"system": "int",
"errored": "int",
"present": "bool",
"new_or_updated": "float",
"new_or_updated": "int",
}

attribute_map = {
Expand Down Expand Up @@ -104,7 +104,7 @@ def total(self):
The total number of accounts in the org # noqa: E501
:return: The total of this ImportSummaryAccounts. # noqa: E501
:rtype: float
:rtype: int
"""
return self._total

Expand All @@ -115,7 +115,7 @@ def total(self, total):
The total number of accounts in the org # noqa: E501
:param total: The total of this ImportSummaryAccounts. # noqa: E501
:type: float
:type: int
"""

self._total = total
Expand All @@ -127,7 +127,7 @@ def new(self):
The number of new accounts created # noqa: E501
:return: The new of this ImportSummaryAccounts. # noqa: E501
:rtype: float
:rtype: int
"""
return self._new

Expand All @@ -138,7 +138,7 @@ def new(self, new):
The number of new accounts created # noqa: E501
:param new: The new of this ImportSummaryAccounts. # noqa: E501
:type: float
:type: int
"""

self._new = new
Expand All @@ -150,7 +150,7 @@ def updated(self):
The number of accounts updated # noqa: E501
:return: The updated of this ImportSummaryAccounts. # noqa: E501
:rtype: float
:rtype: int
"""
return self._updated

Expand All @@ -161,7 +161,7 @@ def updated(self, updated):
The number of accounts updated # noqa: E501
:param updated: The updated of this ImportSummaryAccounts. # noqa: E501
:type: float
:type: int
"""

self._updated = updated
Expand All @@ -173,7 +173,7 @@ def deleted(self):
The number of accounts deleted # noqa: E501
:return: The deleted of this ImportSummaryAccounts. # noqa: E501
:rtype: float
:rtype: int
"""
return self._deleted

Expand All @@ -184,7 +184,7 @@ def deleted(self, deleted):
The number of accounts deleted # noqa: E501
:param deleted: The deleted of this ImportSummaryAccounts. # noqa: E501
:type: float
:type: int
"""

self._deleted = deleted
Expand All @@ -196,7 +196,7 @@ def locked(self):
The number of locked accounts # noqa: E501
:return: The locked of this ImportSummaryAccounts. # noqa: E501
:rtype: float
:rtype: int
"""
return self._locked

Expand All @@ -207,7 +207,7 @@ def locked(self, locked):
The number of locked accounts # noqa: E501
:param locked: The locked of this ImportSummaryAccounts. # noqa: E501
:type: float
:type: int
"""

self._locked = locked
Expand All @@ -219,7 +219,7 @@ def system(self):
The number of system accounts # noqa: E501
:return: The system of this ImportSummaryAccounts. # noqa: E501
:rtype: float
:rtype: int
"""
return self._system

Expand All @@ -230,7 +230,7 @@ def system(self, system):
The number of system accounts # noqa: E501
:param system: The system of this ImportSummaryAccounts. # noqa: E501
:type: float
:type: int
"""

self._system = system
Expand All @@ -242,7 +242,7 @@ def errored(self):
The number of accounts that had an error # noqa: E501
:return: The errored of this ImportSummaryAccounts. # noqa: E501
:rtype: float
:rtype: int
"""
return self._errored

Expand All @@ -253,7 +253,7 @@ def errored(self, errored):
The number of accounts that had an error # noqa: E501
:param errored: The errored of this ImportSummaryAccounts. # noqa: E501
:type: float
:type: int
"""

self._errored = errored
Expand Down Expand Up @@ -286,7 +286,7 @@ def new_or_updated(self):
The number of new or updated accounts # noqa: E501
:return: The new_or_updated of this ImportSummaryAccounts. # noqa: E501
:rtype: float
:rtype: int
"""
return self._new_or_updated

Expand All @@ -297,7 +297,7 @@ def new_or_updated(self, new_or_updated):
The number of new or updated accounts # noqa: E501
:param new_or_updated: The new_or_updated of this ImportSummaryAccounts. # noqa: E501
:type: float
:type: int
"""

self._new_or_updated = new_or_updated
2 changes: 1 addition & 1 deletion xero_python/assets/api/asset_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"""

"""
OpenAPI spec version: 2.9.3
OpenAPI spec version: 2.10.1
"""

import importlib
Expand Down
4 changes: 2 additions & 2 deletions xero_python/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ These endpoints are related to managing authentication tokens and identity for X

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.9.3
- Package version: 1.4.0
- API version: 2.10.1
- Package version: 1.5.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
For more information, please visit [https://developer.xero.com](https://developer.xero.com)

Expand Down
28 changes: 28 additions & 0 deletions xero_python/file/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# coding: utf-8

# flake8: noqa

"""
Xero Files API
These endpoints are specific to Xero Files API # noqa: E501
Contact: [email protected]
Generated by: https://openapi-generator.tech
"""


# import apis into sdk package
from xero_python.file.api.files_api import FilesApi


# import models into sdk package
from xero_python.file.models.association import Association
from xero_python.file.models.file_object import FileObject
from xero_python.file.models.files import Files
from xero_python.file.models.folder import Folder
from xero_python.file.models.folders import Folders
from xero_python.file.models.inline_object import InlineObject
from xero_python.file.models.object_group import ObjectGroup
from xero_python.file.models.object_type import ObjectType
from xero_python.file.models.user import User
4 changes: 4 additions & 0 deletions xero_python/file/api/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# flake8: noqa

# import apis into api package
from xero_python.file.api.files_api import FilesApi
Loading

0 comments on commit 5b132e7

Please sign in to comment.