Skip to content

Commit 01e80d4

Browse files
committed
fix tests for Items and Report Bank Summary
1 parent 2bc3cfc commit 01e80d4

8 files changed

Lines changed: 12 additions & 13 deletions

File tree

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<artifactId>xero-java</artifactId>
66
<packaging>jar</packaging>
77
<name>xero-java</name>
8-
<version>3.2.1</version>
8+
<version>3.2.2</version>
99
<url>https://github.com/XeroAPI/Xero-Java</url>
1010
<description>This is the official Java SDK for Xero API</description>
1111
<licenses>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public class AccountingApi {
9393
private ApiClient apiClient;
9494
private static AccountingApi instance = null;
9595
private String userAgent = "Default";
96-
private String version = "3.2.1";
96+
private String version = "3.2.2";
9797

9898
public AccountingApi() {
9999
this(new ApiClient());

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public class AssetApi {
4444
private ApiClient apiClient;
4545
private static AssetApi instance = null;
4646
private String userAgent = "Default";
47-
private String version = "3.2.1";
47+
private String version = "3.2.2";
4848

4949
public AssetApi() {
5050
this(new ApiClient());

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public class BankFeedsApi {
4545
private ApiClient apiClient;
4646
private static BankFeedsApi instance = null;
4747
private String userAgent = "Default";
48-
private String version = "3.2.1";
48+
private String version = "3.2.2";
4949

5050
public BankFeedsApi() {
5151
this(new ApiClient());

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public class IdentityApi {
4141
private ApiClient apiClient;
4242
private static IdentityApi instance = null;
4343
private String userAgent = "Default";
44-
private String version = "3.2.1";
44+
private String version = "3.2.2";
4545

4646
public IdentityApi() {
4747
this(new ApiClient());

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public class PayrollAuApi {
5959
private ApiClient apiClient;
6060
private static PayrollAuApi instance = null;
6161
private String userAgent = "Default";
62-
private String version = "3.2.1";
62+
private String version = "3.2.2";
6363

6464
public PayrollAuApi() {
6565
this(new ApiClient());

src/test/java/com/xero/api/client/AccountingApiItemsTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ public void tearDown() {
8585
@Test
8686
public void createItemTest() throws IOException {
8787
System.out.println("@Test - createItem");
88-
Item item = new Item();
89-
Items response = accountingApi.createItem(accessToken,xeroTenantId,item);
88+
Items items = new Items();
89+
Items response = accountingApi.updateOrCreateItems(accessToken,xeroTenantId,items,false);
9090

9191
assertThat(response.getItems().get(0).getCode(), is(equalTo("abc65591")));
9292
assertThat(response.getItems().get(0).getName(), is(equalTo("Hello11350")));

src/test/java/com/xero/api/client/AccountingApiReportsTest.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,10 @@ public void getReportBalanceSheetTest() throws IOException {
186186
@Test
187187
public void getReportBankSummaryTest() throws IOException {
188188
System.out.println("@Test - getReportBankSummary");
189-
LocalDate date = null;
190-
Integer period = null;
191-
Integer timeframe = null;
189+
LocalDate toDate = null;
190+
LocalDate fromDate = null;
192191

193-
ReportWithRows response = accountingApi.getReportBankSummary(accessToken,xeroTenantId,date, period, timeframe);
192+
ReportWithRows response = accountingApi.getReportBankSummary(accessToken,xeroTenantId,fromDate, toDate );
194193
assertThat(response.getReports().get(0).getReportID(), is(equalTo("BankSummary")));
195194
assertThat(response.getReports().get(0).getReportName(), is(equalTo("Bank Summary")));
196195
assertThat(response.getReports().get(0).getReportType(), is("BankSummary"));
@@ -396,4 +395,4 @@ public void getReportBASorGSTListTest() throws IOException {
396395
// TODO: test validations
397396
//System.out.println(response.getReports().get(0).toString());
398397
}
399-
}
398+
}

0 commit comments

Comments
 (0)