Skip to content

Commit b6ae375

Browse files
committed
update SDK
1 parent 29e9a52 commit b6ae375

File tree

2 files changed

+57
-2
lines changed

2 files changed

+57
-2
lines changed

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
<dependency>
88
<groupId>ipp.v3.java.devkit.dependencies</groupId>
99
<artifactId>ipp-v3-java-devkit-dependencies</artifactId>
10-
<version>2.5.0</version>
10+
<version>2.7.1</version>
1111
</dependency>
1212
<dependency>
1313
<groupId>ipp.v3.java.data</groupId>
1414
<artifactId>ipp-v3-java-data</artifactId>
15-
<version>2.5.0</version>
15+
<version>2.7.1</version>
1616
</dependency>
1717
<!-- for logging -->
1818
<dependency>
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
package com.intuit.developer.sampleapp.crud.entities.billpayment;
2+
3+
import java.text.ParseException;
4+
import java.util.List;
5+
6+
import com.intuit.developer.sampleapp.crud.helper.BillHelper;
7+
import com.intuit.developer.sampleapp.crud.qbo.DataServiceFactory;
8+
import com.intuit.ipp.data.Error;
9+
import com.intuit.ipp.data.BillPayment;
10+
import com.intuit.ipp.exception.FMSException;
11+
import com.intuit.ipp.services.DataService;
12+
import com.intuit.ipp.util.Logger;
13+
14+
/**
15+
* Demonstrates methods to void billPayment
16+
* Note: We'll create an entity first and then void the same
17+
*
18+
* @author dderose
19+
*
20+
*/
21+
public class BillPaymentVoid {
22+
23+
private static final org.slf4j.Logger LOG = Logger.getLogger();
24+
25+
public static void main(String[] args) {
26+
try {
27+
voidBillPayment();
28+
} catch (Exception e) {
29+
LOG.error("Error during CRUD", e.getCause());
30+
}
31+
}
32+
33+
public static void voidBillPayment() throws FMSException, ParseException {
34+
35+
try {
36+
DataService service = DataServiceFactory.getDataService();
37+
38+
// create billPayment
39+
BillPayment billPayment = BillHelper.getBillPaymentFields(service);
40+
BillPayment addBillPayment = service.add(billPayment);
41+
LOG.info("BillPayment added : " + addBillPayment.getId());
42+
43+
// void billPayment
44+
BillPayment voidedBillPayment = service.voidRequest(addBillPayment);
45+
LOG.info("BillPayment voided : " + voidedBillPayment.getId() + " status ::: " + voidedBillPayment.getPrivateNote());
46+
47+
} catch (FMSException e) {
48+
List<Error> list = e.getErrorList();
49+
list.forEach(error -> LOG.error("Error while voiding entity :: " + error.getMessage()));
50+
}
51+
}
52+
53+
54+
55+
}

0 commit comments

Comments
 (0)