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
4 changes: 2 additions & 2 deletions docs/v4/accounting/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6218,7 +6218,7 @@
"OrganisationRole" : {
"type" : "string",
"description" : "User role that defines permissions in Xero and via API (READONLY, INVOICEONLY, STANDARD, FINANCIALADVISER, etc)",
"enum" : [ "READONLY", "INVOICEONLY", "STANDARD", "FINANCIALADVISER", "MANAGEDCLIENT", "CASHBOOKCLIENT", "UNKNOWN" ]
"enum" : [ "READONLY", "INVOICEONLY", "STANDARD", "FINANCIALADVISER", "MANAGEDCLIENT", "CASHBOOKCLIENT", "UNKNOWN", "REMOVED" ]
}
},
"description" : "",
Expand Down Expand Up @@ -6335,7 +6335,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="Accounting"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="Accounting"><strong>VSN: </strong>10.2.0</li>
<li class="nav-header" data-group="Accounting"><strong>VSN: </strong>11.0.0</li>
<li class="nav-header" data-group="Accounting"><a href="#api-Accounting">Methods</a></li>
<li data-group="Accounting" data-name="createAccount" class="">
<a href="#api-Accounting-createAccount">createAccount</a>
Expand Down
6 changes: 3 additions & 3 deletions docs/v4/appstore/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -974,8 +974,8 @@
},
"type" : {
"type" : "string",
"description" : "The pricing model of the product:\n* FIXED: Customers are charged a fixed amount for each billing period\n* PER_SEAT: Customers are charged based on the number of units they purchase\n* METERED: Customers are charged per use of this product\n",
"enum" : [ "FIXED", "PER_SEAT", "METERED" ]
"description" : "The pricing model of the product:\n* FIXED: Customers are charged a fixed amount for each billing period\n* PER_SEAT: Customers are charged based on the number of units they purchase\n* METERED: Customers are charged per use of this product\n* SIMPLE: Customers are charged on a fixed amount for each billing period with an optional add-on feature\n",
"enum" : [ "FIXED", "PER_SEAT", "METERED", "SIMPLE" ]
},
"usageUnit" : {
"type" : "string",
Expand Down Expand Up @@ -1237,7 +1237,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="AppStore"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="AppStore"><strong>VSN: </strong>10.2.0</li>
<li class="nav-header" data-group="AppStore"><strong>VSN: </strong>11.0.0</li>
<li class="nav-header" data-group="AppStore"><a href="#api-AppStore">Methods</a></li>
<li data-group="AppStore" data-name="getSubscription" class="">
<a href="#api-AppStore-getSubscription">getSubscription</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/v4/assets/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1388,7 +1388,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="Asset"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="Asset"><strong>VSN: </strong>10.2.0</li>
<li class="nav-header" data-group="Asset"><strong>VSN: </strong>11.0.0</li>
<li class="nav-header" data-group="Asset"><a href="#api-Asset">Methods</a></li>
<li data-group="Asset" data-name="createAsset" class="">
<a href="#api-Asset-createAsset">createAsset</a>
Expand Down
27 changes: 24 additions & 3 deletions docs/v4/files/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1144,7 +1144,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="Files"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="Files"><strong>VSN: </strong>10.2.0</li>
<li class="nav-header" data-group="Files"><strong>VSN: </strong>11.0.0</li>
<li class="nav-header" data-group="Files"><a href="#api-Files">Methods</a></li>
<li data-group="Files" data-name="createFileAssociation" class="">
<a href="#api-Files-createFileAssociation">createFileAssociation</a>
Expand Down Expand Up @@ -2746,10 +2746,11 @@ <h3>Usage and SDK Samples</h3>
String xeroTenantId = 'YOUR_XERO_TENANT_ID';
Integer pagesize = 50;
Integer page = 2;
String sort = 'CreatedDateUTC DESC';
String sort = 'CreatedDateUTC';
String direction = 'ASC';

try {
Files result = apiInstance.getFiles(accessToken, xeroTenantId, pagesize, page, sort);
Files result = apiInstance.getFiles(accessToken, xeroTenantId, pagesize, page, sort, direction);
System.out.println(result);
} catch (XeroException e) {
System.err.println("Exception when calling FilesApi#getFiles");
Expand Down Expand Up @@ -2868,6 +2869,26 @@ <h2>Parameters</h2>
</div>
</div>
</td>
</tr>

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


<div id="d2e199_getFiles_direction">
<div class="json-schema-view">
<div class="primitive">
<span class="type">
String
</span>

<div class="inner description marked">
sort direction
</div>
</div>
</div>
</div>
</td>
</tr>

</table>
Expand Down
2 changes: 1 addition & 1 deletion docs/v4/finance/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2712,7 +2712,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="Finance"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="Finance"><strong>VSN: </strong>10.2.0</li>
<li class="nav-header" data-group="Finance"><strong>VSN: </strong>11.0.0</li>
<li class="nav-header" data-group="Finance"><a href="#api-Finance">Methods</a></li>
<li data-group="Finance" data-name="getAccountingActivityAccountUsage" class="">
<a href="#api-Finance-getAccountingActivityAccountUsage">getAccountingActivityAccountUsage</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/v4/payroll-au/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3411,7 +3411,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="PayrollAu"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="PayrollAu"><strong>VSN: </strong>10.2.0</li>
<li class="nav-header" data-group="PayrollAu"><strong>VSN: </strong>11.0.0</li>
<li class="nav-header" data-group="PayrollAu"><a href="#api-PayrollAu">Methods</a></li>
<li data-group="PayrollAu" data-name="approveLeaveApplication" class="">
<a href="#api-PayrollAu-approveLeaveApplication">approveLeaveApplication</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/v4/payroll-nz/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4083,7 +4083,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="PayrollNz"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="PayrollNz"><strong>VSN: </strong>10.2.0</li>
<li class="nav-header" data-group="PayrollNz"><strong>VSN: </strong>11.0.0</li>
<li class="nav-header" data-group="PayrollNz"><a href="#api-PayrollNz">Methods</a></li>
<li data-group="PayrollNz" data-name="approveTimesheet" class="">
<a href="#api-PayrollNz-approveTimesheet">approveTimesheet</a>
Expand Down
6 changes: 3 additions & 3 deletions docs/v4/payroll-uk/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1952,7 +1952,7 @@
"leaveType" : {
"type" : "string",
"description" : "The type of statutory leave",
"enum" : [ "Sick", "Adoption", "Maternity", "Paternity", "Sharedparental", "Bereavement" ]
"enum" : [ "Sick", "Adoption", "Maternity", "Paternity", "Sharedparental", "Bereavement", "NeonatalCare" ]
},
"balanceRemaining" : {
"type" : "number",
Expand Down Expand Up @@ -2000,7 +2000,7 @@
"type" : {
"type" : "string",
"description" : "The category of statutory leave",
"enum" : [ "Sick", "Adoption", "Maternity", "Paternity", "Sharedparental", "Bereavement" ]
"enum" : [ "Sick", "Adoption", "Maternity", "Paternity", "Sharedparental", "Bereavement", "NeonatalCare" ]
},
"startDate" : {
"type" : "string",
Expand Down Expand Up @@ -3596,7 +3596,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="PayrollUk"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="PayrollUk"><strong>VSN: </strong>10.2.0</li>
<li class="nav-header" data-group="PayrollUk"><strong>VSN: </strong>11.0.0</li>
<li class="nav-header" data-group="PayrollUk"><a href="#api-PayrollUk">Methods</a></li>
<li data-group="PayrollUk" data-name="approveTimesheet" class="">
<a href="#api-PayrollUk-approveTimesheet">approveTimesheet</a>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<artifactId>xero-java</artifactId>
<packaging>jar</packaging>
<name>xero-java</name>
<version>10.2.0</version>
<version>11.0.0</version>
<url>https://github.com/XeroAPI/Xero-Java</url>
<description>This is the official Java SDK for Xero API</description>
<licenses>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/xero/api/client/AccountingApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Xero Accounting API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 8.2.0
* The version of the OpenAPI document: 8.3.0
* Contact: api@xero.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down Expand Up @@ -102,7 +102,7 @@ public class AccountingApi {
private ApiClient apiClient;
private static AccountingApi instance = null;
private String userAgent = "Default";
private String version = "10.2.0";
private String version = "11.0.0";
static final Logger logger = LoggerFactory.getLogger(AccountingApi.class);

/** AccountingApi */
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/xero/api/client/AppStoreApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Xero AppStore API
* These endpoints are for Xero Partners to interact with the App Store Billing platform
*
* The version of the OpenAPI document: 8.2.0
* The version of the OpenAPI document: 8.3.0
* Contact: api@xero.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down Expand Up @@ -46,7 +46,7 @@ public class AppStoreApi {
private ApiClient apiClient;
private static AppStoreApi instance = null;
private String userAgent = "Default";
private String version = "10.2.0";
private String version = "11.0.0";
static final Logger logger = LoggerFactory.getLogger(AppStoreApi.class);

/** AppStoreApi */
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/xero/api/client/AssetApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Xero Assets API
* The Assets API exposes fixed asset related functions of the Xero Accounting application and can be used for a variety of purposes such as creating assets, retrieving asset valuations etc.
*
* The version of the OpenAPI document: 8.2.0
* The version of the OpenAPI document: 8.3.0
* Contact: api@xero.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down Expand Up @@ -49,7 +49,7 @@ public class AssetApi {
private ApiClient apiClient;
private static AssetApi instance = null;
private String userAgent = "Default";
private String version = "10.2.0";
private String version = "11.0.0";
static final Logger logger = LoggerFactory.getLogger(AssetApi.class);

/** AssetApi */
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/xero/api/client/BankFeedsApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Xero Bank Feeds API
* The Bank Feeds API is a closed API that is only available to financial institutions that have an established financial services partnership with Xero. If you're an existing financial services partner that wants access, contact your local Partner Manager. If you're a financial institution who wants to provide bank feeds to your business customers, contact us to become a financial services partner.
*
* The version of the OpenAPI document: 8.2.0
* The version of the OpenAPI document: 8.3.0
* Contact: api@xero.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down Expand Up @@ -48,7 +48,7 @@ public class BankFeedsApi {
private ApiClient apiClient;
private static BankFeedsApi instance = null;
private String userAgent = "Default";
private String version = "10.2.0";
private String version = "11.0.0";
static final Logger logger = LoggerFactory.getLogger(BankFeedsApi.class);

/** BankFeedsApi */
Expand Down
42 changes: 37 additions & 5 deletions src/main/java/com/xero/api/client/FilesApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Xero Files API
* These endpoints are specific to Xero Files API
*
* The version of the OpenAPI document: 8.2.0
* The version of the OpenAPI document: 8.3.0
* Contact: api@xero.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down Expand Up @@ -54,7 +54,7 @@ public class FilesApi {
private ApiClient apiClient;
private static FilesApi instance = null;
private String userAgent = "Default";
private String version = "10.2.0";
private String version = "11.0.0";
static final Logger logger = LoggerFactory.getLogger(FilesApi.class);

/** FilesApi */
Expand Down Expand Up @@ -1169,17 +1169,23 @@ public HttpResponse getFileContentForHttpResponse(
* @param pagesize pass an optional page size value
* @param page number of records to skip for pagination
* @param sort values to sort by
* @param direction sort direction
* @param accessToken Authorization token for user set in header of each request
* @return Files
* @throws IOException if an error occurs while attempting to invoke the API *
*/
public Files getFiles(
String accessToken, String xeroTenantId, Integer pagesize, Integer page, String sort)
String accessToken,
String xeroTenantId,
Integer pagesize,
Integer page,
String sort,
String direction)
throws IOException {
try {
TypeReference<Files> typeRef = new TypeReference<Files>() {};
HttpResponse response =
getFilesForHttpResponse(accessToken, xeroTenantId, pagesize, page, sort);
getFilesForHttpResponse(accessToken, xeroTenantId, pagesize, page, sort, direction);
return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);
} catch (HttpResponseException e) {
if (logger.isDebugEnabled()) {
Expand All @@ -1206,12 +1212,18 @@ public Files getFiles(
* @param pagesize pass an optional page size value
* @param page number of records to skip for pagination
* @param sort values to sort by
* @param direction sort direction
* @param accessToken Authorization token for user set in header of each request
* @return HttpResponse
* @throws IOException if an error occurs while attempting to invoke the API
*/
public HttpResponse getFilesForHttpResponse(
String accessToken, String xeroTenantId, Integer pagesize, Integer page, String sort)
String accessToken,
String xeroTenantId,
Integer pagesize,
Integer page,
String sort,
String direction)
throws IOException {
// verify the required parameter 'xeroTenantId' is set
if (xeroTenantId == null) {
Expand Down Expand Up @@ -1287,6 +1299,26 @@ public HttpResponse getFilesForHttpResponse(
uriBuilder = uriBuilder.queryParam(key, value);
}
}
if (direction != null) {
String key = "direction";
Object value = direction;
if (value instanceof Collection) {
List valueList = new ArrayList<>((Collection) value);
if (!valueList.isEmpty() && valueList.get(0) instanceof UUID) {
List<String> list = new ArrayList<String>();
for (int i = 0; i < valueList.size(); i++) {
list.add(valueList.get(i).toString());
}
uriBuilder = uriBuilder.queryParam(key, String.join(",", list));
} else {
uriBuilder = uriBuilder.queryParam(key, String.join(",", valueList));
}
} else if (value instanceof Object[]) {
uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
} else {
uriBuilder = uriBuilder.queryParam(key, value);
}
}
String url = uriBuilder.build().toString();
GenericUrl genericUrl = new GenericUrl(url);
if (logger.isDebugEnabled()) {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/xero/api/client/FinanceApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Xero Finance API
* The Finance API is a collection of endpoints which customers can use in the course of a loan application, which may assist lenders to gain the confidence they need to provide capital.
*
* The version of the OpenAPI document: 8.2.0
* The version of the OpenAPI document: 8.3.0
* Contact: api@xero.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down Expand Up @@ -53,7 +53,7 @@ public class FinanceApi {
private ApiClient apiClient;
private static FinanceApi instance = null;
private String userAgent = "Default";
private String version = "10.2.0";
private String version = "11.0.0";
static final Logger logger = LoggerFactory.getLogger(FinanceApi.class);

/** FinanceApi */
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/xero/api/client/IdentityApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Xero OAuth 2 Identity Service API
* These endpoints are related to managing authentication tokens and identity for Xero API
*
* The version of the OpenAPI document: 8.2.0
* The version of the OpenAPI document: 8.3.0
* Contact: api@xero.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down Expand Up @@ -45,7 +45,7 @@ public class IdentityApi {
private ApiClient apiClient;
private static IdentityApi instance = null;
private String userAgent = "Default";
private String version = "10.2.0";
private String version = "11.0.0";
static final Logger logger = LoggerFactory.getLogger(IdentityApi.class);

/** IdentityApi */
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/xero/api/client/PayrollAuApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Xero Payroll AU API
* This is the Xero Payroll API for orgs in Australia region.
*
* The version of the OpenAPI document: 8.2.0
* The version of the OpenAPI document: 8.3.0
* Contact: api@xero.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down Expand Up @@ -65,7 +65,7 @@ public class PayrollAuApi {
private ApiClient apiClient;
private static PayrollAuApi instance = null;
private String userAgent = "Default";
private String version = "10.2.0";
private String version = "11.0.0";
static final Logger logger = LoggerFactory.getLogger(PayrollAuApi.class);

/** PayrollAuApi */
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/xero/api/client/PayrollNzApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Xero Payroll NZ
* This is the Xero Payroll API for orgs in the NZ region.
*
* The version of the OpenAPI document: 8.2.0
* The version of the OpenAPI document: 8.3.0
* Contact: api@xero.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down Expand Up @@ -109,7 +109,7 @@ public class PayrollNzApi {
private ApiClient apiClient;
private static PayrollNzApi instance = null;
private String userAgent = "Default";
private String version = "10.2.0";
private String version = "11.0.0";
static final Logger logger = LoggerFactory.getLogger(PayrollNzApi.class);

/** PayrollNzApi */
Expand Down
Loading