Skip to content
Closed
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
697 changes: 6 additions & 691 deletions docs/v1/accounting/index.html

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions docs/v1/files/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,16 @@
"description" : "The size of the associated file in bytes. Note- The Size element is only returned when using /Associations/{ObjectId} endpoint.",
"example" : 12357
},
"CreatedDateUtc" : {
"type" : "string",
"description" : "The date the file was created (UTC). Note- The CreatedDateUtc element is only returned when using /Associations/{ObjectId} endpoint.",
"format" : "date-time"
},
"AssociationDateUtc" : {
"type" : "string",
"description" : "The date the file was associated with the object (UTC). Note- The AssociationDateUtc element is only returned when using /Associations/{ObjectId} endpoint.",
"format" : "date-time"
},
"FileId" : {
"type" : "string",
"description" : "The unique identifier of the file",
Expand Down
341 changes: 1 addition & 340 deletions xero_python/accounting/api/accounting_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"""

"""
OpenAPI spec version: 12.0.2
OpenAPI spec version: 13.0.0
"""


Expand Down Expand Up @@ -2063,96 +2063,6 @@ def create_currency(
except exceptions.HTTPStatusException as error:
raise translate_status_exception(error, self, "create_currency")

def create_employees(
self,
xero_tenant_id,
employees,
summarize_errors=empty,
idempotency_key=empty,
_return_http_data_only=True,
_preload_content=True,
_request_timeout=None,
):
"""Creates new employees used in Xero payrun # noqa: E501
OAuth2 scope: accounting.settings
This endpoint is deprecated and will be removed April 28, 2026 # noqa: E501
:param str xero_tenant_id: Xero identifier for Tenant (required)
:param Employees employees: Employees with array of Employee object in body of request (required)
:param bool summarize_errors: If false return 200 OK and mix of successfully created objects and any with validation errors
:param str idempotency_key: This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
: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
:return: Employees
"""

# verify the required parameter 'xero_tenant_id' is set
if xero_tenant_id is None:
raise ValueError(
"Missing the required parameter `xero_tenant_id` "
"when calling `create_employees`"
)
# verify the required parameter 'employees' is set
if employees is None:
raise ValueError(
"Missing the required parameter `employees` "
"when calling `create_employees`"
)

collection_formats = {}
path_params = {}

query_params = []

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

header_params = {
"xero-tenant-id": xero_tenant_id,
}

if idempotency_key is not empty:
header_params["Idempotency-Key"] = idempotency_key

local_var_files = {}
form_params = []

body_params = employees
# HTTP header `Accept`
header_params["Accept"] = self.api_client.select_header_accept(
["application/json"]
)

# HTTP header `Content-Type`
header_params["Content-Type"] = self.api_client.select_header_content_type(
["application/json"]
)

# Authentication setting
auth_settings = ["OAuth2"]
url = self.get_resource_url("/Employees")

try:
return self.api_client.call_api(
url,
"PUT",
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type="Employees",
response_model_finder=self.get_model_finder(),
auth_settings=auth_settings,
_return_http_data_only=_return_http_data_only,
_preload_content=_preload_content,
_request_timeout=_request_timeout,
collection_formats=collection_formats,
)
except exceptions.HTTPStatusException as error:
raise translate_status_exception(error, self, "create_employees")

def create_expense_claim_history(
self,
xero_tenant_id,
Expand Down Expand Up @@ -10143,165 +10053,6 @@ def get_currencies(
except exceptions.HTTPStatusException as error:
raise translate_status_exception(error, self, "get_currencies")

def get_employee(
self,
xero_tenant_id,
employee_id,
_return_http_data_only=True,
_preload_content=True,
_request_timeout=None,
):
"""Retrieves a specific employee used in Xero payrun using a unique employee Id # noqa: E501
OAuth2 scope: accounting.settings, accounting.settings.read
This endpoint is deprecated and will be removed April 28, 2026 # noqa: E501
:param str xero_tenant_id: Xero identifier for Tenant (required)
:param str employee_id: Unique identifier for a Employee (required)
: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
:return: Employees
"""

# verify the required parameter 'xero_tenant_id' is set
if xero_tenant_id is None:
raise ValueError(
"Missing the required parameter `xero_tenant_id` "
"when calling `get_employee`"
)
# verify the required parameter 'employee_id' is set
if employee_id is None:
raise ValueError(
"Missing the required parameter `employee_id` "
"when calling `get_employee`"
)

collection_formats = {}
path_params = {
"EmployeeID": employee_id,
}

query_params = []

header_params = {
"xero-tenant-id": xero_tenant_id,
}

local_var_files = {}
form_params = []

body_params = None
# HTTP header `Accept`
header_params["Accept"] = self.api_client.select_header_accept(
["application/json"]
)

# Authentication setting
auth_settings = ["OAuth2"]
url = self.get_resource_url("/Employees/{EmployeeID}")

try:
return self.api_client.call_api(
url,
"GET",
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type="Employees",
response_model_finder=self.get_model_finder(),
auth_settings=auth_settings,
_return_http_data_only=_return_http_data_only,
_preload_content=_preload_content,
_request_timeout=_request_timeout,
collection_formats=collection_formats,
)
except exceptions.HTTPStatusException as error:
raise translate_status_exception(error, self, "get_employee")

def get_employees(
self,
xero_tenant_id,
if_modified_since=empty,
where=empty,
order=empty,
_return_http_data_only=True,
_preload_content=True,
_request_timeout=None,
):
"""Retrieves employees used in Xero payrun # noqa: E501
OAuth2 scope: accounting.settings, accounting.settings.read
This endpoint is deprecated and will be removed April 28, 2026 # noqa: E501
:param str xero_tenant_id: Xero identifier for Tenant (required)
: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 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
:return: Employees
"""

# verify the required parameter 'xero_tenant_id' is set
if xero_tenant_id is None:
raise ValueError(
"Missing the required parameter `xero_tenant_id` "
"when calling `get_employees`"
)

collection_formats = {}
path_params = {}

query_params = []

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

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

header_params = {
"xero-tenant-id": xero_tenant_id,
}

if if_modified_since is not empty:
header_params["If-Modified-Since"] = if_modified_since

local_var_files = {}
form_params = []

body_params = None
# HTTP header `Accept`
header_params["Accept"] = self.api_client.select_header_accept(
["application/json"]
)

# Authentication setting
auth_settings = ["OAuth2"]
url = self.get_resource_url("/Employees")

try:
return self.api_client.call_api(
url,
"GET",
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type="Employees",
response_model_finder=self.get_model_finder(),
auth_settings=auth_settings,
_return_http_data_only=_return_http_data_only,
_preload_content=_preload_content,
_request_timeout=_request_timeout,
collection_formats=collection_formats,
)
except exceptions.HTTPStatusException as error:
raise translate_status_exception(error, self, "get_employees")

def get_expense_claim(
self,
xero_tenant_id,
Expand Down Expand Up @@ -19271,96 +19022,6 @@ def update_or_create_credit_notes(
error, self, "update_or_create_credit_notes"
)

def update_or_create_employees(
self,
xero_tenant_id,
employees,
summarize_errors=empty,
idempotency_key=empty,
_return_http_data_only=True,
_preload_content=True,
_request_timeout=None,
):
"""Creates a single new employees used in Xero payrun # noqa: E501
OAuth2 scope: accounting.settings
This endpoint is deprecated and will be removed April 28, 2026 # noqa: E501
:param str xero_tenant_id: Xero identifier for Tenant (required)
:param Employees employees: Employees with array of Employee object in body of request (required)
:param bool summarize_errors: If false return 200 OK and mix of successfully created objects and any with validation errors
:param str idempotency_key: This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
: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
:return: Employees
"""

# verify the required parameter 'xero_tenant_id' is set
if xero_tenant_id is None:
raise ValueError(
"Missing the required parameter `xero_tenant_id` "
"when calling `update_or_create_employees`"
)
# verify the required parameter 'employees' is set
if employees is None:
raise ValueError(
"Missing the required parameter `employees` "
"when calling `update_or_create_employees`"
)

collection_formats = {}
path_params = {}

query_params = []

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

header_params = {
"xero-tenant-id": xero_tenant_id,
}

if idempotency_key is not empty:
header_params["Idempotency-Key"] = idempotency_key

local_var_files = {}
form_params = []

body_params = employees
# HTTP header `Accept`
header_params["Accept"] = self.api_client.select_header_accept(
["application/json"]
)

# HTTP header `Content-Type`
header_params["Content-Type"] = self.api_client.select_header_content_type(
["application/json"]
)

# Authentication setting
auth_settings = ["OAuth2"]
url = self.get_resource_url("/Employees")

try:
return self.api_client.call_api(
url,
"POST",
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type="Employees",
response_model_finder=self.get_model_finder(),
auth_settings=auth_settings,
_return_http_data_only=_return_http_data_only,
_preload_content=_preload_content,
_request_timeout=_request_timeout,
collection_formats=collection_formats,
)
except exceptions.HTTPStatusException as error:
raise translate_status_exception(error, self, "update_or_create_employees")

def update_or_create_invoices(
self,
xero_tenant_id,
Expand Down
Loading
Loading