Skip to content

Commit 22c322c

Browse files
authored
Merge pull request #51 from XeroAPI/sid-development
Build from OAS 2.12.0
2 parents fae7381 + 5e9a50c commit 22c322c

File tree

19 files changed

+118
-29
lines changed

19 files changed

+118
-29
lines changed

docs/v1/accounting/index.html

Lines changed: 53 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3662,7 +3662,6 @@
36623662
"type" : "number",
36633663
"description" : "The calculated tax amount based on the TaxType and LineAmount",
36643664
"format" : "double",
3665-
"readOnly" : true,
36663665
"example" : 0.0,
36673666
"x-is-money" : true
36683667
},
@@ -4373,6 +4372,13 @@
43734372
"$ref" : "#/components/schemas/Allocation"
43744373
}
43754374
},
4375+
"Payments" : {
4376+
"type" : "array",
4377+
"description" : "See Payments",
4378+
"items" : {
4379+
"$ref" : "#/components/schemas/Payment"
4380+
}
4381+
},
43764382
"AppliedAmount" : {
43774383
"type" : "number",
43784384
"description" : "The amount of applied to an invoice",
@@ -5789,7 +5795,7 @@
57895795
} else if (location.includes('php')){
57905796
sdkLang = 'php'
57915797
sdkName = 'xero-php-oauth2'
5792-
} else if (location.includes('dotnet')){
5798+
} else if (location.includes('xero-netstandard') || location.includes('csharp')){
57935799
sdkLang = 'dotnet'
57945800
sdkName = 'Xero-NetStandard'
57955801
} else if (location.includes('java')){
@@ -5813,7 +5819,7 @@
58135819
<nav id="scrollingNav">
58145820
<ul class="sidenav nav nav-list">
58155821
<li class="nav-header" data-group="Accounting"><strong>SDK: </strong><span id='sdk-name'></span></li>
5816-
<li class="nav-header" data-group="Accounting"><strong>VSN: </strong>1.5.3</li>
5822+
<li class="nav-header" data-group="Accounting"><strong>VSN: </strong>1.6.0</li>
58175823
<li class="nav-header" data-group="Accounting"><a href="#api-Accounting">Methods</a></li>
58185824
<li data-group="Accounting" data-name="createAccount" class="">
58195825
<a href="#api-Accounting-createAccount">createAccount</a>
@@ -21692,9 +21698,10 @@ <h3>Usage and SDK Samples</h3>
2169221698
order = 'Name ASC'
2169321699
ids = [&quot;00000000-0000-0000-0000-000000000000&quot;]
2169421700
include_archived = 'true'
21701+
summary_only = 'true'
2169521702

2169621703
try:
21697-
api_response = api_instance.get_contacts(xero_tenant_id, if_modified_since, where, order, ids, page, include_archived)
21704+
api_response = api_instance.get_contacts(xero_tenant_id, if_modified_since, where, order, ids, page, include_archived, summary_only)
2169821705
print(api_response)
2169921706
except AccountingBadRequestException as e:
2170021707
print("Exception when calling AccountingApi->getContacts: %s\n" % e)</code></pre>
@@ -21870,6 +21877,26 @@ <h2>Parameters</h2>
2187021877
</div>
2187121878
</div>
2187221879
</td>
21880+
</tr>
21881+
21882+
<tr><td style="width:150px;">summaryOnly</td>
21883+
<td>
21884+
21885+
21886+
<div id="d2e199_getContacts_summaryOnly">
21887+
<div class="json-schema-view">
21888+
<div class="primitive">
21889+
<span class="type">
21890+
Boolean
21891+
</span>
21892+
21893+
<div class="inner description marked">
21894+
Use summaryOnly=true in GET Contacts and Invoices endpoint to retrieve a smaller version of the response object. This returns only lightweight fields, excluding computation-heavy fields from the response, making the API calls quick and efficient.
21895+
</div>
21896+
</div>
21897+
</div>
21898+
</div>
21899+
</td>
2187321900
</tr>
2187421901

2187521902
</table>
@@ -24794,9 +24821,10 @@ <h3>Usage and SDK Samples</h3>
2479424821
statuses = [&quot;DRAFT&quot;, &quot;SUBMITTED&quot;]
2479524822
include_archived = 'true'
2479624823
created_by_my_app = 'false'
24824+
summary_only = 'true'
2479724825

2479824826
try:
24799-
api_response = api_instance.get_invoices(xero_tenant_id, if_modified_since, where, order, ids, invoice_numbers, contact_ids, statuses, page, include_archived, created_by_my_app, unitdp)
24827+
api_response = api_instance.get_invoices(xero_tenant_id, if_modified_since, where, order, ids, invoice_numbers, contact_ids, statuses, page, include_archived, created_by_my_app, summary_only, unitdp)
2480024828
print(api_response)
2480124829
except AccountingBadRequestException as e:
2480224830
print("Exception when calling AccountingApi->getInvoices: %s\n" % e)</code></pre>
@@ -25055,6 +25083,26 @@ <h2>Parameters</h2>
2505525083
</div>
2505625084
</div>
2505725085
</td>
25086+
</tr>
25087+
25088+
<tr><td style="width:150px;">summaryOnly</td>
25089+
<td>
25090+
25091+
25092+
<div id="d2e199_getInvoices_summaryOnly">
25093+
<div class="json-schema-view">
25094+
<div class="primitive">
25095+
<span class="type">
25096+
Boolean
25097+
</span>
25098+
25099+
<div class="inner description marked">
25100+
Use summaryOnly=true in GET Contacts and Invoices endpoint to retrieve a smaller version of the response object. This returns only lightweight fields, excluding computation-heavy fields from the response, making the API calls quick and efficient.
25101+
</div>
25102+
</div>
25103+
</div>
25104+
</div>
25105+
</td>
2505825106
</tr>
2505925107

2506025108
<tr><td style="width:150px;">unitdp</td>

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.3",
51+
version="1.6.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__ = "api@xero.com"
5-
__version__ = "1.5.3"
5+
__version__ = "1.6.0"

xero_python/accounting/api/accounting_api.py

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

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

1616
import importlib
@@ -8290,6 +8290,7 @@ def get_contacts(
82908290
i_ds=empty,
82918291
page=empty,
82928292
include_archived=empty,
8293+
summary_only=empty,
82938294
_return_http_data_only=True,
82948295
_preload_content=True,
82958296
_request_timeout=None,
@@ -8303,6 +8304,7 @@ def get_contacts(
83038304
:param list[str] i_ds: Filter by a comma separated list of ContactIDs. Allows you to retrieve a specific set of contacts in a single call.
83048305
:param int page: e.g. page=1 - Up to 100 contacts will be returned in a single API call.
83058306
:param bool include_archived: e.g. includeArchived=true - Contacts with a status of ARCHIVED will be included in the response
8307+
:param bool summary_only: Use summaryOnly=true in GET Contacts and Invoices endpoint to retrieve a smaller version of the response object. This returns only lightweight fields, excluding computation-heavy fields from the response, making the API calls quick and efficient.
83068308
:param bool _return_http_data_only: return received data only
83078309
:param bool _preload_content: load received data in models
83088310
:param bool _request_timeout: maximum wait time for response
@@ -8338,6 +8340,9 @@ def get_contacts(
83388340
if include_archived is not empty:
83398341
query_params.append(("includeArchived", include_archived))
83408342

8343+
if summary_only is not empty:
8344+
query_params.append(("summaryOnly", summary_only))
8345+
83418346
header_params = {
83428347
"xero-tenant-id": xero_tenant_id,
83438348
}
@@ -10021,6 +10026,7 @@ def get_invoices(
1002110026
page=empty,
1002210027
include_archived=empty,
1002310028
created_by_my_app=empty,
10029+
summary_only=empty,
1002410030
unitdp=empty,
1002510031
_return_http_data_only=True,
1002610032
_preload_content=True,
@@ -10039,6 +10045,7 @@ def get_invoices(
1003910045
:param int page: e.g. page=1 – Up to 100 invoices will be returned in a single API call with line items shown for each invoice
1004010046
:param bool include_archived: e.g. includeArchived=true - Invoices with a status of ARCHIVED will be included in the response
1004110047
:param bool created_by_my_app: When set to true you'll only retrieve Invoices created by your app
10048+
:param bool summary_only: Use summaryOnly=true in GET Contacts and Invoices endpoint to retrieve a smaller version of the response object. This returns only lightweight fields, excluding computation-heavy fields from the response, making the API calls quick and efficient.
1004210049
:param int unitdp: e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
1004310050
:param bool _return_http_data_only: return received data only
1004410051
:param bool _preload_content: load received data in models
@@ -10090,6 +10097,9 @@ def get_invoices(
1009010097
if created_by_my_app is not empty:
1009110098
query_params.append(("createdByMyApp", created_by_my_app))
1009210099

10100+
if summary_only is not empty:
10101+
query_params.append(("summaryOnly", summary_only))
10102+
1009310103
if unitdp is not empty:
1009410104
query_params.append(("unitdp", unitdp))
1009510105

xero_python/accounting/docs/AccountingApi.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6401,7 +6401,7 @@ Name | Type | Description | Notes
64016401
[[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)
64026402

64036403
# **get_contacts**
6404-
> Contacts get_contacts(xero_tenant_id, if_modified_since=if_modified_since, where=where, order=order, i_ds=i_ds, page=page, include_archived=include_archived)
6404+
> Contacts get_contacts(xero_tenant_id, if_modified_since=if_modified_since, where=where, order=order, i_ds=i_ds, page=page, include_archived=include_archived, summary_only=summary_only)
64056405

64066406
Retrieves all contacts in a Xero organisation
64076407

@@ -6438,9 +6438,10 @@ order = 'Name ASC' # str | Order by an any element (optional)
64386438
i_ds = ['&quot;00000000-0000-0000-0000-000000000000&quot;'] # list[str] | Filter by a comma separated list of ContactIDs. Allows you to retrieve a specific set of contacts in a single call. (optional)
64396439
page = 1 # int | e.g. page=1 - Up to 100 contacts will be returned in a single API call. (optional)
64406440
include_archived = True # bool | e.g. includeArchived=true - Contacts with a status of ARCHIVED will be included in the response (optional)
6441+
summary_only = False # bool | Use summaryOnly=true in GET Contacts and Invoices endpoint to retrieve a smaller version of the response object. This returns only lightweight fields, excluding computation-heavy fields from the response, making the API calls quick and efficient. (optional) (default to False)
64416442
try:
64426443
# Retrieves all contacts in a Xero organisation
6443-
api_response = api_instance.get_contacts(xero_tenant_id, if_modified_since=if_modified_since, where=where, order=order, i_ds=i_ds, page=page, include_archived=include_archived)
6444+
api_response = api_instance.get_contacts(xero_tenant_id, if_modified_since=if_modified_since, where=where, order=order, i_ds=i_ds, page=page, include_archived=include_archived, summary_only=summary_only)
64446445
pprint(api_response)
64456446
except ApiException as e:
64466447
print("Exception when calling AccountingApi->get_contacts: %s\n" % e)
@@ -6457,6 +6458,7 @@ Name | Type | Description | Notes
64576458
**i_ds** | [**list[str]**](str.md)| Filter by a comma separated list of ContactIDs. Allows you to retrieve a specific set of contacts in a single call. | [optional]
64586459
**page** | **int**| e.g. page&#x3D;1 - Up to 100 contacts will be returned in a single API call. | [optional]
64596460
**include_archived** | **bool**| e.g. includeArchived&#x3D;true - Contacts with a status of ARCHIVED will be included in the response | [optional]
6461+
**summary_only** | **bool**| Use summaryOnly&#x3D;true in GET Contacts and Invoices endpoint to retrieve a smaller version of the response object. This returns only lightweight fields, excluding computation-heavy fields from the response, making the API calls quick and efficient. | [optional] [default to False]
64606462

64616463
### Return type
64626464

@@ -7770,7 +7772,7 @@ Name | Type | Description | Notes
77707772
[[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)
77717773

77727774
# **get_invoices**
7773-
> Invoices get_invoices(xero_tenant_id, if_modified_since=if_modified_since, where=where, order=order, i_ds=i_ds, invoice_numbers=invoice_numbers, contact_i_ds=contact_i_ds, statuses=statuses, page=page, include_archived=include_archived, created_by_my_app=created_by_my_app, unitdp=unitdp)
7775+
> Invoices get_invoices(xero_tenant_id, if_modified_since=if_modified_since, where=where, order=order, i_ds=i_ds, invoice_numbers=invoice_numbers, contact_i_ds=contact_i_ds, statuses=statuses, page=page, include_archived=include_archived, created_by_my_app=created_by_my_app, summary_only=summary_only, unitdp=unitdp)
77747776

77757777
Retrieves sales invoices or purchase bills
77767778

@@ -7811,10 +7813,11 @@ statuses = ['&quot;DRAFT&quot;, &quot;SUBMITTED&quot;'] # list[str] | Filter by
78117813
page = 1 # int | e.g. page=1 – Up to 100 invoices will be returned in a single API call with line items shown for each invoice (optional)
78127814
include_archived = True # bool | e.g. includeArchived=true - Invoices with a status of ARCHIVED will be included in the response (optional)
78137815
created_by_my_app = false # bool | When set to true you'll only retrieve Invoices created by your app (optional)
7816+
summary_only = False # bool | Use summaryOnly=true in GET Contacts and Invoices endpoint to retrieve a smaller version of the response object. This returns only lightweight fields, excluding computation-heavy fields from the response, making the API calls quick and efficient. (optional) (default to False)
78147817
unitdp = 4 # int | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional)
78157818
try:
78167819
# Retrieves sales invoices or purchase bills
7817-
api_response = api_instance.get_invoices(xero_tenant_id, if_modified_since=if_modified_since, where=where, order=order, i_ds=i_ds, invoice_numbers=invoice_numbers, contact_i_ds=contact_i_ds, statuses=statuses, page=page, include_archived=include_archived, created_by_my_app=created_by_my_app, unitdp=unitdp)
7820+
api_response = api_instance.get_invoices(xero_tenant_id, if_modified_since=if_modified_since, where=where, order=order, i_ds=i_ds, invoice_numbers=invoice_numbers, contact_i_ds=contact_i_ds, statuses=statuses, page=page, include_archived=include_archived, created_by_my_app=created_by_my_app, summary_only=summary_only, unitdp=unitdp)
78187821
pprint(api_response)
78197822
except ApiException as e:
78207823
print("Exception when calling AccountingApi->get_invoices: %s\n" % e)
@@ -7835,6 +7838,7 @@ Name | Type | Description | Notes
78357838
**page** | **int**| e.g. page&#x3D;1 – Up to 100 invoices will be returned in a single API call with line items shown for each invoice | [optional]
78367839
**include_archived** | **bool**| e.g. includeArchived&#x3D;true - Invoices with a status of ARCHIVED will be included in the response | [optional]
78377840
**created_by_my_app** | **bool**| When set to true you&#39;ll only retrieve Invoices created by your app | [optional]
7841+
**summary_only** | **bool**| Use summaryOnly&#x3D;true in GET Contacts and Invoices endpoint to retrieve a smaller version of the response object. This returns only lightweight fields, excluding computation-heavy fields from the response, making the API calls quick and efficient. | [optional] [default to False]
78387842
**unitdp** | **int**| e.g. unitdp&#x3D;4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts | [optional]
78397843

78407844
### Return type

xero_python/accounting/docs/Prepayment.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Name | Type | Description | Notes
1919
**currency_rate** | **float** | The currency rate for a multicurrency prepayment. If no rate is specified, the XE.com day rate is used | [optional]
2020
**remaining_credit** | **float** | The remaining credit balance on the prepayment | [optional]
2121
**allocations** | [**list[Allocation]**](Allocation.md) | See Allocations | [optional]
22+
**payments** | [**list[Payment]**](Payment.md) | See Payments | [optional]
2223
**applied_amount** | **float** | The amount of applied to an invoice | [optional]
2324
**has_attachments** | **bool** | boolean to indicate if a prepayment has an attachment | [optional] [default to False]
2425
**attachments** | [**list[Attachment]**](Attachment.md) | See Attachments | [optional]

xero_python/accounting/models/prepayment.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ class Prepayment(BaseModel):
4646
"currency_rate": "float",
4747
"remaining_credit": "float",
4848
"allocations": "list[Allocation]",
49+
"payments": "list[Payment]",
4950
"applied_amount": "float",
5051
"has_attachments": "bool",
5152
"attachments": "list[Attachment]",
@@ -68,6 +69,7 @@ class Prepayment(BaseModel):
6869
"currency_rate": "CurrencyRate",
6970
"remaining_credit": "RemainingCredit",
7071
"allocations": "Allocations",
72+
"payments": "Payments",
7173
"applied_amount": "AppliedAmount",
7274
"has_attachments": "HasAttachments",
7375
"attachments": "Attachments",
@@ -91,6 +93,7 @@ def __init__(
9193
currency_rate=None,
9294
remaining_credit=None,
9395
allocations=None,
96+
payments=None,
9497
applied_amount=None,
9598
has_attachments=False,
9699
attachments=None,
@@ -113,6 +116,7 @@ def __init__(
113116
self._currency_rate = None
114117
self._remaining_credit = None
115118
self._allocations = None
119+
self._payments = None
116120
self._applied_amount = None
117121
self._has_attachments = None
118122
self._attachments = None
@@ -150,6 +154,8 @@ def __init__(
150154
self.remaining_credit = remaining_credit
151155
if allocations is not None:
152156
self.allocations = allocations
157+
if payments is not None:
158+
self.payments = payments
153159
if applied_amount is not None:
154160
self.applied_amount = applied_amount
155161
if has_attachments is not None:
@@ -543,6 +549,29 @@ def allocations(self, allocations):
543549

544550
self._allocations = allocations
545551

552+
@property
553+
def payments(self):
554+
"""Gets the payments of this Prepayment. # noqa: E501
555+
556+
See Payments # noqa: E501
557+
558+
:return: The payments of this Prepayment. # noqa: E501
559+
:rtype: list[Payment]
560+
"""
561+
return self._payments
562+
563+
@payments.setter
564+
def payments(self, payments):
565+
"""Sets the payments of this Prepayment.
566+
567+
See Payments # noqa: E501
568+
569+
:param payments: The payments of this Prepayment. # noqa: E501
570+
:type: list[Payment]
571+
"""
572+
573+
self._payments = payments
574+
546575
@property
547576
def applied_amount(self):
548577
"""Gets the applied_amount of this Prepayment. # noqa: E501

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.4
13+
OpenAPI spec version: 2.12.0
1414
"""
1515

1616
import importlib

xero_python/assets/docs/AssetApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ api_client = ApiClient(
176176
api_instance = AssetApi(api_client)
177177

178178
xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant
179-
id = '4f7bcdcb-5ec1-4258-9558-19f662fccdfe' # str | fixed asset id for single object
179+
id = '00000000-0000-0000-0000-000000000000' # str | fixed asset id for single object
180180
try:
181181
# Retrieves fixed asset by id
182182
api_response = api_instance.get_asset_by_id(xero_tenant_id, id)

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.4
7-
- Package version: 1.5.3
6+
- API version: 2.12.0
7+
- Package version: 1.6.0
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/api/files_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.4
13+
OpenAPI spec version: 2.12.0
1414
"""
1515

1616
import importlib

xero_python/identity/api/identity_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.4
13+
OpenAPI spec version: 2.12.0
1414
"""
1515

1616
import importlib

xero_python/payrollau/api/payroll_au_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.4
13+
OpenAPI spec version: 2.12.0
1414
"""
1515

1616
import importlib

xero_python/payrollau/docs/DeductionLine.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**deduction_type_id** | **str** | Xero deduction type identifier |
7-
**calculation_type** | [**DeductionTypeCalculationType**](DeductionTypeCalculationType.md) | |
7+
**calculation_type** | [**DeductionTypeCalculationType**](DeductionTypeCalculationType.md) | | [optional]
88
**amount** | **float** | Deduction type amount | [optional]
99
**percentage** | **float** | The Percentage of the Deduction | [optional]
1010
**number_of_units** | **float** | Deduction number of units | [optional]

0 commit comments

Comments
 (0)