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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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="0.2.3",
version="0.3.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__ = "0.2.3"
__version__ = "0.3.0"
2 changes: 1 addition & 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.2.2
OpenAPI spec version: 2.2.5
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down
7 changes: 6 additions & 1 deletion 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.2.2
OpenAPI spec version: 2.2.5
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down Expand Up @@ -1501,6 +1501,7 @@ def create_credit_note_allocation(
xero_tenant_id,
credit_note_id,
allocations,
summarize_errors=empty,
_return_http_data_only=True,
_preload_content=True,
_request_timeout=None,
Expand All @@ -1510,6 +1511,7 @@ def create_credit_note_allocation(
:param str xero_tenant_id: Xero identifier for Tenant (required)
:param str credit_note_id: Unique identifier for a Credit Note (required)
:param Allocations allocations: Allocations with array of Allocation object in body of request. (required)
:param bool summarize_errors: If false return 200 OK and mix of successfully created obejcts and any with validation errors
:param bool _return_http_data_only: return received data only
:param bool _preload_content: load received data in models
:param bool _request_timeout: maximum wait time for response
Expand Down Expand Up @@ -1542,6 +1544,9 @@ def create_credit_note_allocation(

query_params = []

if summarize_errors is not empty:
query_params.append(("summarizeErrors", summarize_errors))

header_params = {
"xero-tenant-id": xero_tenant_id,
}
Expand Down
8 changes: 5 additions & 3 deletions xero_python/accounting/docs/AccountingApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ Method | HTTP request | Description
[**get_purchase_order_history**](AccountingApi.md#get_purchase_order_history) | **GET** /PurchaseOrders/{PurchaseOrderID}/History | Allows you to retrieve history for PurchaseOrder
[**get_purchase_orders**](AccountingApi.md#get_purchase_orders) | **GET** /PurchaseOrders | Allows you to retrieve purchase orders
[**get_quote**](AccountingApi.md#get_quote) | **GET** /Quotes/{QuoteID} | Allows you to retrieve a specified quote
[**get_quote_as_pdf**](AccountingApi.md#get_quote_as_pdf) | **GET** /Quotes/{QuotesID}/pdf | Allows you to retrieve quotes as PDF files
[**get_quote_as_pdf**](AccountingApi.md#get_quote_as_pdf) | **GET** /Quotes/{QuoteID}/pdf | Allows you to retrieve quotes as PDF files
[**get_quote_attachment_by_file_name**](AccountingApi.md#get_quote_attachment_by_file_name) | **GET** /Quotes/{QuoteID}/Attachments/{FileName} | Allows you to retrieve Attachment on Quote by Filename
[**get_quote_attachment_by_id**](AccountingApi.md#get_quote_attachment_by_id) | **GET** /Quotes/{QuoteID}/Attachments/{AttachmentID} | Allows you to retrieve specific Attachment on Quote
[**get_quote_attachments**](AccountingApi.md#get_quote_attachments) | **GET** /Quotes/{QuoteID}/Attachments | Allows you to retrieve Attachments for Quotes
Expand Down Expand Up @@ -1263,7 +1263,7 @@ Name | Type | Description | Notes
[[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)

# **create_credit_note_allocation**
> Allocations create_credit_note_allocation(xero_tenant_id, credit_note_id, allocations)
> Allocations create_credit_note_allocation(xero_tenant_id, credit_note_id, allocations, summarize_errors=summarize_errors)

Allows you to create Allocation on CreditNote

Expand Down Expand Up @@ -1296,9 +1296,10 @@ api_instance = AccountingApi(api_client)
xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant
credit_note_id = '00000000-0000-0000-000-000000000000' # str | Unique identifier for a Credit Note
allocations = { allocations:[ { amount:1.0, date:"2019-03-05", invoice:{ invoiceID:"c45720a1-ade3-4a38-a064-d15489be6841", lineItems:[], type: Invoice.TypeEnum.ACCPAY, contact:{} } } ] } # Allocations | Allocations with array of Allocation object in body of request.
summarize_errors = False # bool | If false return 200 OK and mix of successfully created obejcts and any with validation errors (optional) (default to False)
try:
# Allows you to create Allocation on CreditNote
api_response = api_instance.create_credit_note_allocation(xero_tenant_id, credit_note_id, allocations)
api_response = api_instance.create_credit_note_allocation(xero_tenant_id, credit_note_id, allocations, summarize_errors=summarize_errors)
pprint(api_response)
except ApiException as e:
print("Exception when calling AccountingApi->create_credit_note_allocation: %s\n" % e)
Expand All @@ -1311,6 +1312,7 @@ Name | Type | Description | Notes
**xero_tenant_id** | **str**| Xero identifier for Tenant |
**credit_note_id** | [**str**](.md)| Unique identifier for a Credit Note |
**allocations** | [**Allocations**](Allocations.md)| Allocations with array of Allocation object in body of request. |
**summarize_errors** | **bool**| If false return 200 OK and mix of successfully created obejcts and any with validation errors | [optional] [default to False]

### Return type

Expand Down
2 changes: 1 addition & 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.2.2
OpenAPI spec version: 2.2.5
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
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.2.2
OpenAPI spec version: 2.2.5
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.2.2
OpenAPI spec version: 2.2.5
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.2.2
OpenAPI spec version: 2.2.5
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.2.2
OpenAPI spec version: 2.2.5
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.2.2
OpenAPI spec version: 2.2.5
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down
2 changes: 1 addition & 1 deletion 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.2.2
OpenAPI spec version: 2.2.5
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down
2 changes: 1 addition & 1 deletion xero_python/accounting/models/allocation.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.2.2
OpenAPI spec version: 2.2.5
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down
2 changes: 1 addition & 1 deletion xero_python/accounting/models/allocations.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.2.2
OpenAPI spec version: 2.2.5
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down
2 changes: 1 addition & 1 deletion xero_python/accounting/models/attachment.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.2.2
OpenAPI spec version: 2.2.5
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down
2 changes: 1 addition & 1 deletion xero_python/accounting/models/attachments.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.2.2
OpenAPI spec version: 2.2.5
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down
2 changes: 1 addition & 1 deletion xero_python/accounting/models/balances.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.2.2
OpenAPI spec version: 2.2.5
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down
2 changes: 1 addition & 1 deletion xero_python/accounting/models/bank_transaction.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.2.2
OpenAPI spec version: 2.2.5
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down
2 changes: 1 addition & 1 deletion xero_python/accounting/models/bank_transactions.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.2.2
OpenAPI spec version: 2.2.5
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down
2 changes: 1 addition & 1 deletion xero_python/accounting/models/bank_transfer.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.2.2
OpenAPI spec version: 2.2.5
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down
2 changes: 1 addition & 1 deletion xero_python/accounting/models/bank_transfers.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.2.2
OpenAPI spec version: 2.2.5
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down
2 changes: 1 addition & 1 deletion xero_python/accounting/models/batch_payment.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.2.2
OpenAPI spec version: 2.2.5
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down
2 changes: 1 addition & 1 deletion xero_python/accounting/models/batch_payment_details.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.2.2
OpenAPI spec version: 2.2.5
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down
2 changes: 1 addition & 1 deletion xero_python/accounting/models/batch_payments.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.2.2
OpenAPI spec version: 2.2.5
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down
2 changes: 1 addition & 1 deletion xero_python/accounting/models/bill.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.2.2
OpenAPI spec version: 2.2.5
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down
2 changes: 1 addition & 1 deletion xero_python/accounting/models/branding_theme.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.2.2
OpenAPI spec version: 2.2.5
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down
2 changes: 1 addition & 1 deletion xero_python/accounting/models/branding_themes.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.2.2
OpenAPI spec version: 2.2.5
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down
2 changes: 1 addition & 1 deletion xero_python/accounting/models/cis_org_setting.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.2.2
OpenAPI spec version: 2.2.5
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down
2 changes: 1 addition & 1 deletion xero_python/accounting/models/cis_setting.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.2.2
OpenAPI spec version: 2.2.5
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down
2 changes: 1 addition & 1 deletion xero_python/accounting/models/cis_settings.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.2.2
OpenAPI spec version: 2.2.5
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down
2 changes: 1 addition & 1 deletion xero_python/accounting/models/contact.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.2.2
OpenAPI spec version: 2.2.5
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down
2 changes: 1 addition & 1 deletion xero_python/accounting/models/contact_group.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.2.2
OpenAPI spec version: 2.2.5
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down
2 changes: 1 addition & 1 deletion xero_python/accounting/models/contact_groups.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.2.2
OpenAPI spec version: 2.2.5
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down
2 changes: 1 addition & 1 deletion xero_python/accounting/models/contact_person.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.2.2
OpenAPI spec version: 2.2.5
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down
2 changes: 1 addition & 1 deletion xero_python/accounting/models/contacts.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.2.2
OpenAPI spec version: 2.2.5
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down
2 changes: 1 addition & 1 deletion xero_python/accounting/models/country_code.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.2.2
OpenAPI spec version: 2.2.5
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down
2 changes: 1 addition & 1 deletion xero_python/accounting/models/credit_note.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.2.2
OpenAPI spec version: 2.2.5
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down
2 changes: 1 addition & 1 deletion xero_python/accounting/models/credit_notes.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.2.2
OpenAPI spec version: 2.2.5
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down
Loading