Skip to content

Commit 0424e9c

Browse files
committed
update sdk to the latest spec version
1 parent c0b1e90 commit 0424e9c

File tree

17 files changed

+446
-23
lines changed

17 files changed

+446
-23
lines changed

docs/v4/accounting/index.html

Lines changed: 137 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4052,7 +4052,7 @@
40524052
"Class" : {
40534053
"type" : "string",
40544054
"description" : "Organisation Classes describe which plan the Xero organisation is on (e.g. DEMO, TRIAL, PREMIUM)",
4055-
"enum" : [ "DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK", "ULTIMATE" ]
4055+
"enum" : [ "DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK", "ULTIMATE", "LITE" ]
40564056
},
40574057
"Edition" : {
40584058
"type" : "string",
@@ -6319,6 +6319,9 @@
63196319
<li data-group="Accounting" data-name="getBankTransfers" class="">
63206320
<a href="#api-Accounting-getBankTransfers">getBankTransfers</a>
63216321
</li>
6322+
<li data-group="Accounting" data-name="getBatchPayment" class="">
6323+
<a href="#api-Accounting-getBatchPayment">getBatchPayment</a>
6324+
</li>
63226325
<li data-group="Accounting" data-name="getBatchPaymentHistory" class="">
63236326
<a href="#api-Accounting-getBatchPaymentHistory">getBatchPaymentHistory</a>
63246327
</li>
@@ -20848,6 +20851,138 @@ <h2>Parameters</h2>
2084820851
</div>
2084920852
</div>
2085020853
</td>
20854+
</tr>
20855+
20856+
</table>
20857+
</article>
20858+
</div>
20859+
<hr>
20860+
<div id="api-Accounting-getBatchPayment">
20861+
<article id="api-Accounting-getBatchPayment-0" data-group="User" data-name="getBatchPayment" data-version="0">
20862+
<div class="pull-left">
20863+
<h1>getBatchPayment</h1>
20864+
<p>Retrieves a specific batch payment using a unique batch payment Id</p>
20865+
</div>
20866+
<div class="pull-right"></div>
20867+
<div class="clearfix"></div>
20868+
<p></p>
20869+
<p class="marked"></p>
20870+
<p></p>
20871+
<br />
20872+
<pre class="prettyprint language-html prettyprinted" data-type="get"><code><span class="pln">/BatchPayments/{BatchPaymentID}</span></code></pre>
20873+
<p>
20874+
<h3>Usage and SDK Samples</h3>
20875+
</p>
20876+
<ul class="nav nav-tabs nav-tabs-examples">
20877+
<li class=""><a href="#examples-Accounting-getBatchPayment-0-java">Java</a></li>
20878+
</ul>
20879+
<div class="tab-content">
20880+
<div class="tab-pane" id="examples-Accounting-getBatchPayment-0-java">
20881+
<pre class="prettyprint"><code class="language-java">import org.openapitools.client.api.*;
20882+
import org.openapitools.client.api.client.AccountingApi;
20883+
import org.openapitools.client.models.accounting.*;
20884+
20885+
import java.io.File;
20886+
import java.util.*;
20887+
20888+
public class AccountingApiExample {
20889+
private AccountingApi apiInstance;
20890+
20891+
public static void main(String[] args) {
20892+
String accessToken = "YOUR_ACCESS_TOKEN";
20893+
ApiClient defaultClient = new ApiClient();
20894+
20895+
apiInstance = AccountingApi.getInstance(defaultClient);
20896+
String xeroTenantId = 'YOUR_XERO_TENANT_ID';
20897+
UUID batchPaymentID = UUID.fromString("00000000-0000-0000-0000-000000000000");
20898+
UUID batchPaymentID = '00000000-0000-0000-0000-000000000000';
20899+
20900+
try {
20901+
BatchPayments result = apiInstance.getBatchPayment(accessToken, xeroTenantId, batchPaymentID);
20902+
System.out.println(result);
20903+
} catch (XeroException e) {
20904+
System.err.println("Exception when calling AccountingApi#getBatchPayment");
20905+
e.printStackTrace();
20906+
}
20907+
}
20908+
}</code></pre>
20909+
</div>
20910+
</div>
20911+
<h2>Scopes</h2>
20912+
<table>
20913+
20914+
<tr>
20915+
<td>accounting.transactions</td>
20916+
<td>Grant read-write access to bank transactions, credit notes, invoices, repeating invoices</td>
20917+
</tr>
20918+
20919+
<tr>
20920+
<td>accounting.transactions.read</td>
20921+
<td>Grant read-only access to invoices</td>
20922+
</tr>
20923+
20924+
</table>
20925+
<h2>Parameters</h2>
20926+
<div class="methodsubtabletitle">Path parameters</div>
20927+
<table id="methodsubtable">
20928+
<tr>
20929+
<th width="150px">Name</th>
20930+
<th>Description</th>
20931+
</tr>
20932+
<tr><td style="width:150px;">BatchPaymentID<span style="color:red;">*</span></td>
20933+
<td>
20934+
20935+
20936+
<div id="d2e199_getBatchPayment_batchPaymentID">
20937+
<div class="json-schema-view">
20938+
<div class="primitive">
20939+
<span class="type">
20940+
UUID
20941+
</span>
20942+
<span class="format">
20943+
(uuid)
20944+
</span>
20945+
20946+
<div class="inner description marked">
20947+
Unique identifier for BatchPayment
20948+
</div>
20949+
</div>
20950+
<div class="inner required">
20951+
Required
20952+
</div>
20953+
</div>
20954+
</div>
20955+
</td>
20956+
</tr>
20957+
20958+
</table>
20959+
<div class="methodsubtabletitle">Header parameters</div>
20960+
<table id="methodsubtable">
20961+
<tr>
20962+
<th width="150px">Name</th>
20963+
<th>Description</th>
20964+
</tr>
20965+
<tr><td style="width:150px;">xero-tenant-id<span style="color:red;">*</span></td>
20966+
<td>
20967+
20968+
20969+
<div id="d2e199_getBatchPayment_xeroTenantId">
20970+
<div class="json-schema-view">
20971+
<div class="primitive">
20972+
<span class="type">
20973+
String
20974+
</span>
20975+
20976+
<div class="inner description marked">
20977+
Xero identifier for Tenant
20978+
</div>
20979+
</div>
20980+
<div class="inner required">
20981+
Required
20982+
</div>
20983+
</div>
20984+
</div>
20985+
</td>
2085120986
</tr>
2085220987

2085320988
</table>
@@ -23199,7 +23334,7 @@ <h3>Usage and SDK Samples</h3>
2319923334
Integer page = 1;
2320023335
Boolean includeArchived = true;
2320123336
Boolean summaryOnly = true;
23202-
String searchTerm = 'searchTerm=Joe Bloggs';
23337+
String searchTerm = 'Joe Bloggs';
2320323338

2320423339
try {
2320523340
Contacts result = apiInstance.getContacts(accessToken, xeroTenantId, ifModifiedSince, where, order, iDs, page, includeArchived, summaryOnly, searchTerm);

docs/v4/payroll-au/index.html

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1292,7 +1292,7 @@
12921292
},
12931293
"Gender" : {
12941294
"type" : "string",
1295-
"description" : "The employee’s gender. See Employee Gender",
1295+
"description" : "The employee’s gender. See Employee Gender",
12961296
"example" : "F",
12971297
"enum" : [ "N", "M", "F", "I" ]
12981298
},
@@ -1626,6 +1626,13 @@
16261626
}
16271627
},
16281628
"description" : ""
1629+
};
1630+
defs["LeaveCategoryCode"] = {
1631+
"title" : "",
1632+
"type" : "string",
1633+
"description" : "Code used to identify the Leave Category",
1634+
"example" : "ANNUALLEAVE",
1635+
"enum" : [ "ANNUALLEAVE", "LONGSERVICELEAVE", "PERSONALCARERSLEAVE", "ROSTEREDDAYOFF", "TIMEOFFINLIEU", "COMPASSIONATEANDBEREAVEMENTLEAVE", "STUDYLEAVE", "FAMILYANDDOMESTICVIOLENCELEAVE", "SPECIALPAIDLEAVE", "COMMUNITYSERVICELEAVE", "JURYDUTYLEAVE", "DEFENCERESERVELEAVE" ]
16291636
};
16301637
defs["LeaveEarningsLine"] = {
16311638
"title" : "",
@@ -1811,6 +1818,14 @@
18111818
"type" : "boolean",
18121819
"description" : "Is the current record",
18131820
"example" : true
1821+
},
1822+
"LeaveCategoryCode" : {
1823+
"$ref" : "#/components/schemas/LeaveCategoryCode"
1824+
},
1825+
"SGCExempt" : {
1826+
"type" : "boolean",
1827+
"description" : "Set this to indicate that the leave type is exempt from superannuation guarantee contribution",
1828+
"example" : true
18141829
}
18151830
},
18161831
"description" : ""

src/main/java/com/xero/api/client/AccountingApi.java

Lines changed: 92 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Xero Accounting API
33
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
44
*
5-
* The version of the OpenAPI document: 2.25.0
5+
* The version of the OpenAPI document: 2.28.1
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -11434,6 +11434,97 @@ public HttpResponse getBankTransfersForHttpResponse(
1143411434
.execute();
1143511435
}
1143611436

11437+
/**
11438+
* Retrieves a specific batch payment using a unique batch payment Id
11439+
*
11440+
* <p><b>200</b> - Success - return response of type BatchPayments array with matching batch
11441+
* payment Id
11442+
*
11443+
* @param xeroTenantId Xero identifier for Tenant
11444+
* @param batchPaymentID Unique identifier for BatchPayment
11445+
* @param accessToken Authorization token for user set in header of each request
11446+
* @return BatchPayments
11447+
* @throws IOException if an error occurs while attempting to invoke the API *
11448+
*/
11449+
public BatchPayments getBatchPayment(String accessToken, String xeroTenantId, UUID batchPaymentID)
11450+
throws IOException {
11451+
try {
11452+
TypeReference<BatchPayments> typeRef = new TypeReference<BatchPayments>() {};
11453+
HttpResponse response =
11454+
getBatchPaymentForHttpResponse(accessToken, xeroTenantId, batchPaymentID);
11455+
return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);
11456+
} catch (HttpResponseException e) {
11457+
if (logger.isDebugEnabled()) {
11458+
logger.debug(
11459+
"------------------ HttpResponseException "
11460+
+ e.getStatusCode()
11461+
+ " : getBatchPayment -------------------");
11462+
logger.debug(e.toString());
11463+
}
11464+
XeroApiExceptionHandler handler = new XeroApiExceptionHandler();
11465+
handler.execute(e);
11466+
} catch (IOException ioe) {
11467+
throw ioe;
11468+
}
11469+
return null;
11470+
}
11471+
11472+
/**
11473+
* Retrieves a specific batch payment using a unique batch payment Id
11474+
*
11475+
* <p><b>200</b> - Success - return response of type BatchPayments array with matching batch
11476+
* payment Id
11477+
*
11478+
* @param xeroTenantId Xero identifier for Tenant
11479+
* @param batchPaymentID Unique identifier for BatchPayment
11480+
* @param accessToken Authorization token for user set in header of each request
11481+
* @return HttpResponse
11482+
* @throws IOException if an error occurs while attempting to invoke the API
11483+
*/
11484+
public HttpResponse getBatchPaymentForHttpResponse(
11485+
String accessToken, String xeroTenantId, UUID batchPaymentID) throws IOException {
11486+
// verify the required parameter 'xeroTenantId' is set
11487+
if (xeroTenantId == null) {
11488+
throw new IllegalArgumentException(
11489+
"Missing the required parameter 'xeroTenantId' when calling getBatchPayment");
11490+
} // verify the required parameter 'batchPaymentID' is set
11491+
if (batchPaymentID == null) {
11492+
throw new IllegalArgumentException(
11493+
"Missing the required parameter 'batchPaymentID' when calling getBatchPayment");
11494+
}
11495+
if (accessToken == null) {
11496+
throw new IllegalArgumentException(
11497+
"Missing the required parameter 'accessToken' when calling getBatchPayment");
11498+
}
11499+
HttpHeaders headers = new HttpHeaders();
11500+
headers.set("xero-tenant-id", xeroTenantId);
11501+
headers.setAccept("application/json");
11502+
headers.setUserAgent(this.getUserAgent());
11503+
// create a map of path variables
11504+
final Map<String, Object> uriVariables = new HashMap<String, Object>();
11505+
uriVariables.put("BatchPaymentID", batchPaymentID);
11506+
11507+
UriBuilder uriBuilder =
11508+
UriBuilder.fromUri(apiClient.getBasePath() + "/BatchPayments/{BatchPaymentID}");
11509+
String url = uriBuilder.buildFromMap(uriVariables).toString();
11510+
GenericUrl genericUrl = new GenericUrl(url);
11511+
if (logger.isDebugEnabled()) {
11512+
logger.debug("GET " + genericUrl.toString());
11513+
}
11514+
11515+
HttpContent content = null;
11516+
Credential credential =
11517+
new Credential(BearerToken.authorizationHeaderAccessMethod()).setAccessToken(accessToken);
11518+
HttpTransport transport = apiClient.getHttpTransport();
11519+
HttpRequestFactory requestFactory = transport.createRequestFactory(credential);
11520+
return requestFactory
11521+
.buildRequest(HttpMethods.GET, genericUrl, content)
11522+
.setHeaders(headers)
11523+
.setConnectTimeout(apiClient.getConnectionTimeout())
11524+
.setReadTimeout(apiClient.getReadTimeout())
11525+
.execute();
11526+
}
11527+
1143711528
/**
1143811529
* Retrieves history from a specific batch payment
1143911530
*

src/main/java/com/xero/api/client/AppStoreApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Xero AppStore API
33
* These endpoints are for Xero Partners to interact with the App Store Billing platform
44
*
5-
* The version of the OpenAPI document: 2.25.0
5+
* The version of the OpenAPI document: 2.28.1
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

src/main/java/com/xero/api/client/AssetApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Xero Assets API
33
* 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.
44
*
5-
* The version of the OpenAPI document: 2.25.0
5+
* The version of the OpenAPI document: 2.28.1
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

src/main/java/com/xero/api/client/BankFeedsApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Xero Bank Feeds API
33
* 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.
44
*
5-
* The version of the OpenAPI document: 2.25.0
5+
* The version of the OpenAPI document: 2.28.1
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

src/main/java/com/xero/api/client/FilesApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Xero Files API
33
* These endpoints are specific to Xero Files API
44
*
5-
* The version of the OpenAPI document: 2.25.0
5+
* The version of the OpenAPI document: 2.28.1
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

src/main/java/com/xero/api/client/FinanceApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Xero Finance API
33
* 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.
44
*
5-
* The version of the OpenAPI document: 2.25.0
5+
* The version of the OpenAPI document: 2.28.1
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

src/main/java/com/xero/api/client/IdentityApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Xero OAuth 2 Identity Service API
33
* These endpoints are related to managing authentication tokens and identity for Xero API
44
*
5-
* The version of the OpenAPI document: 2.25.0
5+
* The version of the OpenAPI document: 2.28.1
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

src/main/java/com/xero/api/client/PayrollAuApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Xero Payroll AU API
33
* This is the Xero Payroll API for orgs in Australia region.
44
*
5-
* The version of the OpenAPI document: 2.25.0
5+
* The version of the OpenAPI document: 2.28.1
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

0 commit comments

Comments
 (0)