Skip to content

Commit

Permalink
Merge pull request #238 from XeroAPI/sid-development
Browse files Browse the repository at this point in the history
Build from version 2.4.2
  • Loading branch information
SidneyAllen authored Nov 10, 2020
2 parents a2546cf + be8c72d commit ab6405b
Show file tree
Hide file tree
Showing 444 changed files with 1,559 additions and 466 deletions.
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>4.3.3</version>
<version>4.3.4</version>
<url>https://github.com/XeroAPI/Xero-Java</url>
<description>This is the official Java SDK for Xero API</description>
<licenses>
Expand Down
125 changes: 101 additions & 24 deletions src/main/java/com/xero/api/client/AccountingApi.java

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/main/java/com/xero/api/client/AssetApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class AssetApi {
private ApiClient apiClient;
private static AssetApi instance = null;
private String userAgent = "Default";
private String version = "4.3.3";
private String version = "4.3.4";
static final Logger logger = LoggerFactory.getLogger(AssetApi.class);

public AssetApi() {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/xero/api/client/BankFeedsApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class BankFeedsApi {
private ApiClient apiClient;
private static BankFeedsApi instance = null;
private String userAgent = "Default";
private String version = "4.3.3";
private String version = "4.3.4";
static final Logger logger = LoggerFactory.getLogger(BankFeedsApi.class);

public BankFeedsApi() {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/xero/api/client/IdentityApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class IdentityApi {
private ApiClient apiClient;
private static IdentityApi instance = null;
private String userAgent = "Default";
private String version = "4.3.3";
private String version = "4.3.4";
static final Logger logger = LoggerFactory.getLogger(IdentityApi.class);

public IdentityApi() {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/xero/api/client/PayrollAuApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public class PayrollAuApi {
private ApiClient apiClient;
private static PayrollAuApi instance = null;
private String userAgent = "Default";
private String version = "4.3.3";
private String version = "4.3.4";
static final Logger logger = LoggerFactory.getLogger(PayrollAuApi.class);

public PayrollAuApi() {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/xero/api/client/PayrollNzApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public class PayrollNzApi {
private ApiClient apiClient;
private static PayrollNzApi instance = null;
private String userAgent = "Default";
private String version = "4.3.3";
private String version = "4.3.4";
static final Logger logger = LoggerFactory.getLogger(PayrollNzApi.class);

public PayrollNzApi() {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/xero/api/client/PayrollUkApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public class PayrollUkApi {
private ApiClient apiClient;
private static PayrollUkApi instance = null;
private String userAgent = "Default";
private String version = "4.3.3";
private String version = "4.3.4";
static final Logger logger = LoggerFactory.getLogger(PayrollUkApi.class);

public PayrollUkApi() {
Expand Down
24 changes: 20 additions & 4 deletions src/main/java/com/xero/api/client/ProjectApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import com.google.api.client.http.HttpTransport;
import com.xero.api.ApiClient;
import com.xero.api.XeroApiExceptionHandler;
import com.xero.models.project.ChargeType;
import com.xero.models.project.Project;
import com.xero.models.project.ProjectCreateOrUpdate;
import com.xero.models.project.ProjectPatch;
Expand Down Expand Up @@ -41,7 +42,7 @@ public class ProjectApi {
private ApiClient apiClient;
private static ProjectApi instance = null;
private String userAgent = "Default";
private String version = "4.3.3";
private String version = "4.3.4";
static final Logger logger = LoggerFactory.getLogger(ProjectApi.class);

public ProjectApi() {
Expand Down Expand Up @@ -752,6 +753,7 @@ public HttpResponse getTaskForHttpResponse(
* a paged response - Must be a number between 1 and 500.
* @param taskIds taskIdsSearch for all tasks that match a comma separated list of taskIds, i.e.
* GET https://.../tasks?taskIds&#x3D;{taskId},{taskId}
* @param chargeType The chargeType parameter
* @param accessToken Authorization token for user set in header of each request
* @return Tasks
* @throws IOException if an error occurs while attempting to invoke the API
Expand All @@ -762,12 +764,14 @@ public Tasks getTasks(
UUID projectId,
Integer page,
Integer pageSize,
String taskIds)
String taskIds,
ChargeType chargeType)
throws IOException {
try {
TypeReference<Tasks> typeRef = new TypeReference<Tasks>() {};
HttpResponse response =
getTasksForHttpResponse(accessToken, xeroTenantId, projectId, page, pageSize, taskIds);
getTasksForHttpResponse(
accessToken, xeroTenantId, projectId, page, pageSize, taskIds, chargeType);
return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);
} catch (HttpResponseException e) {
if (logger.isDebugEnabled()) {
Expand All @@ -791,7 +795,8 @@ public HttpResponse getTasksForHttpResponse(
UUID projectId,
Integer page,
Integer pageSize,
String taskIds)
String taskIds,
ChargeType chargeType)
throws IOException {
// verify the required parameter 'xeroTenantId' is set
if (xeroTenantId == null) {
Expand Down Expand Up @@ -849,6 +854,17 @@ public HttpResponse getTasksForHttpResponse(
uriBuilder = uriBuilder.queryParam(key, value);
}
}
if (chargeType != null) {
String key = "chargeType";
Object value = chargeType;
if (value instanceof Collection) {
uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray());
} else if (value instanceof Object[]) {
uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
} else {
uriBuilder = uriBuilder.queryParam(key, value);
}
}
String url = uriBuilder.buildFromMap(uriVariables).toString();
GenericUrl genericUrl = new GenericUrl(url);
if (logger.isDebugEnabled()) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/xero/models/accounting/Account.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Accounting API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.3.7
* The version of the OpenAPI document: 2.4.2
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/xero/models/accounting/AccountType.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Accounting API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.3.7
* The version of the OpenAPI document: 2.4.2
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/xero/models/accounting/Accounts.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Accounting API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.3.7
* The version of the OpenAPI document: 2.4.2
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Accounting API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.3.7
* The version of the OpenAPI document: 2.4.2
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Accounting API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.3.7
* The version of the OpenAPI document: 2.4.2
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/xero/models/accounting/Action.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Accounting API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.3.7
* The version of the OpenAPI document: 2.4.2
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/xero/models/accounting/Actions.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Accounting API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.3.7
* The version of the OpenAPI document: 2.4.2
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/xero/models/accounting/Address.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Accounting API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.3.7
* The version of the OpenAPI document: 2.4.2
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/xero/models/accounting/Allocation.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Accounting API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.3.7
* The version of the OpenAPI document: 2.4.2
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/xero/models/accounting/Allocations.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Accounting API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.3.7
* The version of the OpenAPI document: 2.4.2
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/xero/models/accounting/Attachment.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Accounting API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.3.7
* The version of the OpenAPI document: 2.4.2
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/xero/models/accounting/Attachments.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Accounting API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.3.7
* The version of the OpenAPI document: 2.4.2
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/xero/models/accounting/Balances.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Accounting API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.3.7
* The version of the OpenAPI document: 2.4.2
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Accounting API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.3.7
* The version of the OpenAPI document: 2.4.2
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Accounting API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.3.7
* The version of the OpenAPI document: 2.4.2
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/xero/models/accounting/BankTransfer.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Accounting API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.3.7
* The version of the OpenAPI document: 2.4.2
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Accounting API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.3.7
* The version of the OpenAPI document: 2.4.2
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/xero/models/accounting/BatchPayment.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Accounting API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.3.7
* The version of the OpenAPI document: 2.4.2
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Accounting API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.3.7
* The version of the OpenAPI document: 2.4.2
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Accounting API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.3.7
* The version of the OpenAPI document: 2.4.2
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/xero/models/accounting/Bill.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Accounting API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.3.7
* The version of the OpenAPI document: 2.4.2
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Accounting API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.3.7
* The version of the OpenAPI document: 2.4.2
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Accounting API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.3.7
* The version of the OpenAPI document: 2.4.2
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Accounting API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.3.7
* The version of the OpenAPI document: 2.4.2
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/xero/models/accounting/CISSetting.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Accounting API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.3.7
* The version of the OpenAPI document: 2.4.2
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/xero/models/accounting/CISSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Accounting API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.3.7
* The version of the OpenAPI document: 2.4.2
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/xero/models/accounting/Contact.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Accounting API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.3.7
* The version of the OpenAPI document: 2.4.2
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/xero/models/accounting/ContactGroup.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Accounting API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.3.7
* The version of the OpenAPI document: 2.4.2
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Accounting API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.3.7
* The version of the OpenAPI document: 2.4.2
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Loading

0 comments on commit ab6405b

Please sign in to comment.