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
30 changes: 28 additions & 2 deletions docs/v4/accounting/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4355,6 +4355,11 @@
"example" : false,
"default" : false
},
"Reference" : {
"type" : "string",
"description" : "An optional description for Overpayment",
"example" : "Ref for payment"
},
"Attachments" : {
"type" : "array",
"description" : "See Attachments",
Expand Down Expand Up @@ -6340,7 +6345,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>12.3.1</li>
<li class="nav-header" data-group="Accounting"><strong>VSN: </strong>12.4.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 Expand Up @@ -32589,9 +32594,10 @@ <h3>Usage and SDK Samples</h3>
Integer page = 1;
Integer unitdp = 4;
Integer pageSize = 100;
array[String] references = &quot;Ref1&quot;, &quot;Ref2&quot;;

try {
Overpayments result = apiInstance.getOverpayments(accessToken, xeroTenantId, ifModifiedSince, where, order, page, unitdp, pageSize);
Overpayments result = apiInstance.getOverpayments(accessToken, xeroTenantId, ifModifiedSince, where, order, page, unitdp, pageSize, references);
System.out.println(result);
} catch (XeroException e) {
System.err.println("Exception when calling AccountingApi#getOverpayments");
Expand Down Expand Up @@ -32773,6 +32779,26 @@ <h2>Parameters</h2>
</div>
</div>
</td>
</tr>

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


<div id="d2e199_getOverpayments_references">
<div class="json-schema-view">
<div class="primitive">
<span class="type">
array[String]
</span>

<div class="inner description marked">
Filter by a comma-separated list of References
</div>
</div>
</div>
</div>
</td>
</tr>

</table>
Expand Down
2 changes: 1 addition & 1 deletion docs/v4/appstore/index.html
Original file line number Diff line number Diff line change
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>12.3.1</li>
<li class="nav-header" data-group="AppStore"><strong>VSN: </strong>12.4.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 @@ -1415,7 +1415,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>12.3.1</li>
<li class="nav-header" data-group="Asset"><strong>VSN: </strong>12.4.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
2 changes: 1 addition & 1 deletion 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>12.3.1</li>
<li class="nav-header" data-group="Files"><strong>VSN: </strong>12.4.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
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>12.3.1</li>
<li class="nav-header" data-group="Finance"><strong>VSN: </strong>12.4.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>12.3.1</li>
<li class="nav-header" data-group="PayrollAu"><strong>VSN: </strong>12.4.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
32 changes: 4 additions & 28 deletions docs/v4/payroll-nz/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1680,20 +1680,6 @@
"example" : 10.0,
"x-is-money" : true
},
"sickLeaveHoursToAccrueAnnually" : {
"type" : "number",
"description" : "Deprecated use SickLeaveToAccrueAnnually",
"format" : "double",
"example" : 100.5,
"x-is-money" : true
},
"sickLeaveMaximumHoursToAccrue" : {
"type" : "number",
"description" : "Deprecated use SickLeaveMaximumToAccrue",
"format" : "double",
"example" : 200.5,
"x-is-money" : true
},
"SickLeaveToAccrueAnnually" : {
"type" : "number",
"description" : "Number of units accrued annually for sick leave. The type of units is determined by the property \"TypeOfUnitsToAccrue\" on the \"Sick Leave\" leave type",
Expand Down Expand Up @@ -1767,13 +1753,7 @@
"description" : "The schedule of accrual",
"enum" : [ "AnnuallyAfter6Months", "OnAnniversaryDate", "PercentageOfGrossEarnings", "NoAccruals" ]
},
"hoursAccruedAnnually" : {
"type" : "number",
"description" : "Deprecated use UnitsAccruedAnnually",
"format" : "double",
"x-is-money" : true
},
"UnitsAccruedAnnually" : {
"unitsAccruedAnnually" : {
"type" : "number",
"description" : "The number of units accrued for the leave annually. This is 0 when the ScheduleOfAccrual chosen is \"NoAccruals\"",
"format" : "double",
Expand Down Expand Up @@ -1801,7 +1781,7 @@
},
"rateAccruedHourly" : {
"type" : "number",
"description" : "The number of hours added to the leave balance for every hour worked by the employee. This is normally 0, unless the scheduleOfAccrual chosen is \"OnHourWorked\"",
"description" : "not supported in Payroll NZ",
"format" : "double",
"x-is-money" : true
},
Expand Down Expand Up @@ -4083,7 +4063,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>12.3.1</li>
<li class="nav-header" data-group="PayrollNz"><strong>VSN: </strong>12.4.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 Expand Up @@ -5400,8 +5380,6 @@ <h3>Usage and SDK Samples</h3>
employeeLeaveSetup.setIncludeHolidayPay(false);
employeeLeaveSetup.setHolidayPayOpeningBalance(10.5);
employeeLeaveSetup.setAnnualLeaveOpeningBalance(25.89);
employeeLeaveSetup.setSickLeaveHoursToAccrueAnnually(100.0);
employeeLeaveSetup.setSickLeaveMaximumHoursToAccrue(200.0);
employeeLeaveSetup.setSickLeaveOpeningBalance(10.5);
employeeLeaveSetup.setSickLeaveToAccrueAnnually(100.0);
employeeLeaveSetup.setSickLeaveMaximumToAccrue(200.0);
Expand Down Expand Up @@ -5545,7 +5523,6 @@ <h2>Parameters</h2>
"example" : {
"holidayPayOpeningBalance" : 10,
"annualLeaveOpeningBalance" : 100,
"sickLeaveHoursToAccrueAnnually" : 20,
"sickLeaveToAccrueAnnually" : 20,
"sickLeaveOpeningBalance" : 10,
"sickLeaveScheduleOfAccrual" : "OnAnniversaryDate",
Expand Down Expand Up @@ -5744,13 +5721,12 @@ <h2>Parameters</h2>
"example" : {
"leaveTypeID" : "35da97ae-05b9-427f-9a98-69157ba42cec",
"scheduleOfAccrual" : "AnnuallyAfter6Months",
"hoursAccruedAnnually" : 10,
"unitsAccruedAnnually" : 10,
"typeOfUnitsToAccrue" : "Hours",
"openingBalanceTypeOfUnits" : "Hours",
"maximumToAccrue" : 80,
"openingBalance" : 100,
"rateAccruedHourly" : 3.5
"rateAccruedHourly" : null
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion docs/v4/payroll-uk/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3696,7 +3696,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>12.3.1</li>
<li class="nav-header" data-group="PayrollUk"><strong>VSN: </strong>12.4.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>12.3.1</version>
<version>12.4.0</version>
<url>https://github.com/XeroAPI/Xero-Java</url>
<description>This is the official Java SDK for Xero API</description>
<licenses>
Expand Down
110 changes: 105 additions & 5 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: 9.3.0
* The version of the OpenAPI document: 10.1.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 = "12.3.1";
private String version = "12.4.0";
static final Logger logger = LoggerFactory.getLogger(AccountingApi.class);

/** AccountingApi */
Expand Down Expand Up @@ -168,6 +168,74 @@ public String getUserAgent() {
return this.userAgent + " [Xero-Java-" + this.version + "]";
}

/* Backward compatibility functions */

/**
* Retrieves overpayments
*
* <p><b>200</b> - Success - return response of type Overpayments array with all Overpayments
*
* @param xeroTenantId Xero identifier for Tenant
* @param ifModifiedSince Only records created or modified since this timestamp will be returned
* @param where Filter by an any element
* @param order Order by an any element
* @param page e.g. page&#x3D;1 – Up to 100 overpayments will be returned in a single API call
* with line items shown for each overpayment
* @param unitdp e.g. unitdp&#x3D;4 – (Unit Decimal Places) You can opt in to use four decimal
* places for unit amounts
* @param pageSize Number of records to retrieve per page
* @param accessToken Authorization token for user set in header of each request
* @return Overpayments
* @throws IOException if an error occurs while attempting to invoke the API *
*/
public Overpayments getOverpayments(
String accessToken,
String xeroTenantId,
OffsetDateTime ifModifiedSince,
String where,
String order,
Integer page,
Integer unitdp,
Integer pageSize)
throws IOException {
return getOverpayments(
accessToken, xeroTenantId, ifModifiedSince, where, order, page, unitdp, pageSize, null);
}

/**
* Retrieves overpayments
*
* <p><b>200</b> - Success - return response of type Overpayments array with all Overpayments
*
* @param xeroTenantId Xero identifier for Tenant
* @param ifModifiedSince Only records created or modified since this timestamp will be returned
* @param where Filter by an any element
* @param order Order by an any element
* @param page e.g. page&#x3D;1 – Up to 100 overpayments will be returned in a single API call
* with line items shown for each overpayment
* @param unitdp e.g. unitdp&#x3D;4 – (Unit Decimal Places) You can opt in to use four decimal
* places for unit amounts
* @param pageSize Number of records to retrieve per page
* @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 getOverpaymentsForHttpResponse(
String accessToken,
String xeroTenantId,
OffsetDateTime ifModifiedSince,
String where,
String order,
Integer page,
Integer unitdp,
Integer pageSize)
throws IOException {
return getOverpaymentsForHttpResponse(
accessToken, xeroTenantId, ifModifiedSince, where, order, page, unitdp, pageSize, null);
}

/* End backward compatibility functions */

/**
* Creates a new chart of accounts
*
Expand Down Expand Up @@ -19836,6 +19904,7 @@ public HttpResponse getOverpaymentHistoryForHttpResponse(
* @param unitdp e.g. unitdp&#x3D;4 – (Unit Decimal Places) You can opt in to use four decimal
* places for unit amounts
* @param pageSize Number of records to retrieve per page
* @param references Filter by a comma-separated list of References
* @param accessToken Authorization token for user set in header of each request
* @return Overpayments
* @throws IOException if an error occurs while attempting to invoke the API *
Expand All @@ -19848,13 +19917,22 @@ public Overpayments getOverpayments(
String order,
Integer page,
Integer unitdp,
Integer pageSize)
Integer pageSize,
List<String> references)
throws IOException {
try {
TypeReference<Overpayments> typeRef = new TypeReference<Overpayments>() {};
HttpResponse response =
getOverpaymentsForHttpResponse(
accessToken, xeroTenantId, ifModifiedSince, where, order, page, unitdp, pageSize);
accessToken,
xeroTenantId,
ifModifiedSince,
where,
order,
page,
unitdp,
pageSize,
references);
return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);
} catch (HttpResponseException e) {
if (logger.isDebugEnabled()) {
Expand Down Expand Up @@ -19886,6 +19964,7 @@ public Overpayments getOverpayments(
* @param unitdp e.g. unitdp&#x3D;4 – (Unit Decimal Places) You can opt in to use four decimal
* places for unit amounts
* @param pageSize Number of records to retrieve per page
* @param references Filter by a comma-separated list of References
* @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
Expand All @@ -19898,7 +19977,8 @@ public HttpResponse getOverpaymentsForHttpResponse(
String order,
Integer page,
Integer unitdp,
Integer pageSize)
Integer pageSize,
List<String> references)
throws IOException {
// verify the required parameter 'xeroTenantId' is set
if (xeroTenantId == null) {
Expand Down Expand Up @@ -20017,6 +20097,26 @@ public HttpResponse getOverpaymentsForHttpResponse(
uriBuilder = uriBuilder.queryParam(key, value);
}
}
if (references != null) {
String key = "References";
Object value = references;
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/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: 9.3.0
* The version of the OpenAPI document: 10.1.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 = "12.3.1";
private String version = "12.4.0";
static final Logger logger = LoggerFactory.getLogger(AppStoreApi.class);

/** AppStoreApi */
Expand Down
Loading