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.2",
version="0.2.3",
)
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.2"
__version__ = "0.2.3"
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.1.6
OpenAPI spec version: 2.2.2
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.1.6
OpenAPI spec version: 2.2.2
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down Expand Up @@ -11628,6 +11628,7 @@ def get_payments(
if_modified_since=empty,
where=empty,
order=empty,
page=empty,
_return_http_data_only=True,
_preload_content=True,
_request_timeout=None,
Expand All @@ -11638,6 +11639,7 @@ def get_payments(
:param datetime if_modified_since: Only records created or modified since this timestamp will be returned
:param str where: Filter by an any element
:param str order: Order by an any element
:param int page: Up to 100 payments will be returned in a single API call
: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 All @@ -11662,6 +11664,9 @@ def get_payments(
if order is not empty:
query_params.append(("order", order))

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

header_params = {
"xero-tenant-id": xero_tenant_id,
}
Expand Down
6 changes: 4 additions & 2 deletions xero_python/accounting/docs/AccountingApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -9071,7 +9071,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)

# **get_payments**
> Payments get_payments(xero_tenant_id, if_modified_since=if_modified_since, where=where, order=order)
> Payments get_payments(xero_tenant_id, if_modified_since=if_modified_since, where=where, order=order, page=page)

Allows you to retrieve payments for invoices and credit notes

Expand Down Expand Up @@ -9105,9 +9105,10 @@ xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant
if_modified_since = '2020-02-06T12:17:43.202-08:00' # datetime | Only records created or modified since this timestamp will be returned (optional)
where = 'Status==\"' + Payment.StatusEnum.AUTHORISED + '\"' # str | Filter by an any element (optional)
order = 'Amount ASC' # str | Order by an any element (optional)
page = 1 # int | Up to 100 payments will be returned in a single API call (optional)
try:
# Allows you to retrieve payments for invoices and credit notes
api_response = api_instance.get_payments(xero_tenant_id, if_modified_since=if_modified_since, where=where, order=order)
api_response = api_instance.get_payments(xero_tenant_id, if_modified_since=if_modified_since, where=where, order=order, page=page)
pprint(api_response)
except ApiException as e:
print("Exception when calling AccountingApi->get_payments: %s\n" % e)
Expand All @@ -9121,6 +9122,7 @@ Name | Type | Description | Notes
**if_modified_since** | **datetime**| Only records created or modified since this timestamp will be returned | [optional]
**where** | **str**| Filter by an any element | [optional]
**order** | **str**| Order by an any element | [optional]
**page** | **int**| Up to 100 payments will be returned in a single API call | [optional]

### Return type

Expand Down
5 changes: 5 additions & 0 deletions xero_python/accounting/docs/Allocation.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**invoice** | [**Invoice**](Invoice.md) | |
**overpayment** | [**Overpayment**](Overpayment.md) | | [optional]
**prepayment** | [**Prepayment**](Prepayment.md) | | [optional]
**credit_note** | [**CreditNote**](CreditNote.md) | | [optional]
**amount** | **float** | the amount being applied to the invoice |
**date** | **date** | the date the allocation is applied YYYY-MM-DD. |
**status_attribute_string** | **str** | A string to indicate if a invoice status | [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
1 change: 1 addition & 0 deletions xero_python/accounting/docs/Organisation.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Name | Type | Description | Notes
**is_demo_company** | **bool** | Boolean to describe if organisation is a demo company. | [optional]
**organisation_status** | **str** | Will be set to ACTIVE if you can connect to organisation via the Xero API | [optional]
**registration_number** | **str** | Shows for New Zealand, Australian and UK organisations | [optional]
**employer_identification_number** | **str** | Shown if set. US Only. | [optional]
**tax_number** | **str** | Shown if set. Displays in the Xero UI as Tax File Number (AU), GST Number (NZ), VAT Number (UK) and Tax ID Number (US & Global). | [optional]
**financial_year_end_day** | **int** | Calendar day e.g. 0-31 | [optional]
**financial_year_end_month** | **int** | Calendar Month e.g. 1-12 | [optional]
Expand Down
2 changes: 2 additions & 0 deletions xero_python/accounting/docs/Quote.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ Name | Type | Description | Notes
**branding_theme_id** | **str** | See BrandingThemes | [optional]
**updated_date_utc** | **datetime** | Last modified date UTC format | [optional]
**line_amount_types** | [**QuoteLineAmountTypes**](QuoteLineAmountTypes.md) | | [optional]
**status_attribute_string** | **str** | A string to indicate if a invoice status | [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
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.1.6
OpenAPI spec version: 2.2.2
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.1.6
OpenAPI spec version: 2.2.2
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.1.6
OpenAPI spec version: 2.2.2
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.1.6
OpenAPI spec version: 2.2.2
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.1.6
OpenAPI spec version: 2.2.2
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.1.6
OpenAPI spec version: 2.2.2
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.1.6
OpenAPI spec version: 2.2.2
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down
164 changes: 158 additions & 6 deletions 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.1.6
OpenAPI spec version: 2.2.2
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand All @@ -30,21 +30,64 @@ class Allocation(BaseModel):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
openapi_types = {"invoice": "Invoice", "amount": "float", "date": "date[ms-format]"}

attribute_map = {"invoice": "Invoice", "amount": "Amount", "date": "Date"}

def __init__(self, invoice=None, amount=None, date=None): # noqa: E501
openapi_types = {
"invoice": "Invoice",
"overpayment": "Overpayment",
"prepayment": "Prepayment",
"credit_note": "CreditNote",
"amount": "float",
"date": "date[ms-format]",
"status_attribute_string": "str",
"validation_errors": "list[ValidationError]",
}

attribute_map = {
"invoice": "Invoice",
"overpayment": "Overpayment",
"prepayment": "Prepayment",
"credit_note": "CreditNote",
"amount": "Amount",
"date": "Date",
"status_attribute_string": "StatusAttributeString",
"validation_errors": "ValidationErrors",
}

def __init__(
self,
invoice=None,
overpayment=None,
prepayment=None,
credit_note=None,
amount=None,
date=None,
status_attribute_string=None,
validation_errors=None,
): # noqa: E501
"""Allocation - a model defined in OpenAPI""" # noqa: E501

self._invoice = None
self._overpayment = None
self._prepayment = None
self._credit_note = None
self._amount = None
self._date = None
self._status_attribute_string = None
self._validation_errors = None
self.discriminator = None

self.invoice = invoice
if overpayment is not None:
self.overpayment = overpayment
if prepayment is not None:
self.prepayment = prepayment
if credit_note is not None:
self.credit_note = credit_note
self.amount = amount
self.date = date
if status_attribute_string is not None:
self.status_attribute_string = status_attribute_string
if validation_errors is not None:
self.validation_errors = validation_errors

@property
def invoice(self):
Expand All @@ -71,6 +114,69 @@ def invoice(self, invoice):

self._invoice = invoice

@property
def overpayment(self):
"""Gets the overpayment of this Allocation. # noqa: E501


:return: The overpayment of this Allocation. # noqa: E501
:rtype: Overpayment
"""
return self._overpayment

@overpayment.setter
def overpayment(self, overpayment):
"""Sets the overpayment of this Allocation.


:param overpayment: The overpayment of this Allocation. # noqa: E501
:type: Overpayment
"""

self._overpayment = overpayment

@property
def prepayment(self):
"""Gets the prepayment of this Allocation. # noqa: E501


:return: The prepayment of this Allocation. # noqa: E501
:rtype: Prepayment
"""
return self._prepayment

@prepayment.setter
def prepayment(self, prepayment):
"""Sets the prepayment of this Allocation.


:param prepayment: The prepayment of this Allocation. # noqa: E501
:type: Prepayment
"""

self._prepayment = prepayment

@property
def credit_note(self):
"""Gets the credit_note of this Allocation. # noqa: E501


:return: The credit_note of this Allocation. # noqa: E501
:rtype: CreditNote
"""
return self._credit_note

@credit_note.setter
def credit_note(self, credit_note):
"""Sets the credit_note of this Allocation.


:param credit_note: The credit_note of this Allocation. # noqa: E501
:type: CreditNote
"""

self._credit_note = credit_note

@property
def amount(self):
"""Gets the amount of this Allocation. # noqa: E501
Expand Down Expand Up @@ -124,3 +230,49 @@ def date(self, date):
) # noqa: E501

self._date = date

@property
def status_attribute_string(self):
"""Gets the status_attribute_string of this Allocation. # noqa: E501

A string to indicate if a invoice status # noqa: E501

:return: The status_attribute_string of this Allocation. # noqa: E501
:rtype: str
"""
return self._status_attribute_string

@status_attribute_string.setter
def status_attribute_string(self, status_attribute_string):
"""Sets the status_attribute_string of this Allocation.

A string to indicate if a invoice status # noqa: E501

:param status_attribute_string: The status_attribute_string of this Allocation. # noqa: E501
:type: str
"""

self._status_attribute_string = status_attribute_string

@property
def validation_errors(self):
"""Gets the validation_errors of this Allocation. # noqa: E501

Displays array of validation error messages from the API # noqa: E501

:return: The validation_errors of this Allocation. # noqa: E501
:rtype: list[ValidationError]
"""
return self._validation_errors

@validation_errors.setter
def validation_errors(self, validation_errors):
"""Sets the validation_errors of this Allocation.

Displays array of validation error messages from the API # noqa: E501

:param validation_errors: The validation_errors of this Allocation. # noqa: E501
:type: list[ValidationError]
"""

self._validation_errors = validation_errors
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.1.6
OpenAPI spec version: 2.2.2
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.1.6
OpenAPI spec version: 2.2.2
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
Expand Down
Loading