Skip to content

Commit b8266e9

Browse files
committed
fix LineItem case for invoices & receipts
1 parent 1130742 commit b8266e9

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>com.github.xeroapi</groupId>
55
<artifactId>xero-java</artifactId>
66
<packaging>jar</packaging>
7-
<version>2.3.11</version>
7+
<version>2.3.12</version>
88
<name>Xero-Java SDK</name>
99
<description>This is the official Java SDK for Xero API</description>
1010
<url>https://github.com/XeroAPI/Xero-Java</url>

src/main/java/com/xero/api/JsonConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
public class JsonConfig implements Config {
1717

18-
private String SDK_VERSION = "2.3.11";
18+
private String SDK_VERSION = "2.3.12";
1919
private String APP_TYPE = "Public";
2020
private String USER_AGENT = "Xero-Java-SDK";
2121
private String ACCEPT = "application/xml";

src/main/java/com/xero/example/RequestResourceServlet.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,6 +1093,7 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response)
10931093
} else if (object.equals("BankTransactions")) {
10941094
/* BANK TRANSACTION */
10951095
try {
1096+
10961097
where = "Status==\"ACTIVE\"&&Type==\"BANK\"";
10971098
Accounts accountsWhere = accountingApi.getAccounts(ifModifiedSince, where, order);
10981099

@@ -1117,7 +1118,7 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response)
11171118
BankTransaction bt = new BankTransaction();
11181119
bt.setBankAccount(bankAcct);
11191120
bt.setContact(useContact);
1120-
bt.setLineitems(lineItems);
1121+
bt.setLineItems(lineItems);
11211122
bt.setType(com.xero.models.accounting.BankTransaction.TypeEnum.SPEND);
11221123
BankTransactions bts = new BankTransactions();
11231124
bts.addBankTransactionsItem(bt);
@@ -1159,7 +1160,6 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response)
11591160
messages.add("Create a one Bank Transaction History Record - details :" + newHr.getHistoryRecords().get(0).getDetails());
11601161
*/
11611162
}
1162-
11631163
} catch (Exception e) {
11641164
System.out.println(e.getMessage());
11651165
}
@@ -1361,7 +1361,7 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response)
13611361

13621362
HistoryRecords newInvoiceHistory = accountingApi.createContactHistory(contactID,newHistoryRecords);
13631363
messages.add("Contact History - note added to : " + newInvoiceHistory.getHistoryRecords().get(0).getDetails());
1364-
1364+
13651365
} catch (XeroApiException e) {
13661366
System.out.println(e.getResponseCode());
13671367
System.out.println(e.getMessage());
@@ -1623,7 +1623,7 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response)
16231623
li.setLineAmount(40.00);
16241624
li.setTaxType("NONE");
16251625

1626-
receipt.addLineitemsItem(li);
1626+
receipt.addLineItemsItem(li);
16271627
receipt.setUser(user);
16281628
receipt.lineAmountTypes(LineAmountTypes.NOTAX);
16291629
receipt.contact(useContact);
@@ -2098,7 +2098,7 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response)
20982098
BankTransaction bt = new BankTransaction();
20992099
bt.setBankAccount(bankAccount);
21002100
bt.setContact(useContact);
2101-
bt.setLineitems(lineItems);
2101+
bt.setLineItems(lineItems);
21022102
bt.setType(com.xero.models.accounting.BankTransaction.TypeEnum.RECEIVE_OVERPAYMENT);
21032103
BankTransactions bts = new BankTransactions();
21042104
bts.addBankTransactionsItem(bt);
@@ -2247,7 +2247,7 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response)
22472247
BankTransaction bt = new BankTransaction();
22482248
bt.setBankAccount(bankAccount);
22492249
bt.setContact(useContact);
2250-
bt.setLineitems(lineItems);
2250+
bt.setLineItems(lineItems);
22512251
bt.setType(com.xero.models.accounting.BankTransaction.TypeEnum.RECEIVE_PREPAYMENT);
22522252
BankTransactions bts = new BankTransactions();
22532253
bts.addBankTransactionsItem(bt);
@@ -2392,7 +2392,7 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response)
23922392
li.setLineAmount(40.00);
23932393
li.setTaxType("NONE");
23942394

2395-
receipt.addLineitemsItem(li);
2395+
receipt.addLineItemsItem(li);
23962396
receipt.setUser(useUser);
23972397
receipt.lineAmountTypes(LineAmountTypes.NOTAX);
23982398
receipt.contact(useContact);

0 commit comments

Comments
 (0)