-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy pathTaxCodeInfo.java
38 lines (29 loc) · 933 Bytes
/
TaxCodeInfo.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package com.intuit.developer.sampleapp.crud.helper;
import java.util.List;
import com.intuit.ipp.data.ReferenceType;
import com.intuit.ipp.data.TaxCode;
import com.intuit.ipp.exception.FMSException;
import com.intuit.ipp.services.DataService;
/**
* @author dderose
*
*/
public final class TaxCodeInfo {
private TaxCodeInfo() {
}
public static TaxCode getTaxCode(DataService service) throws FMSException {
List<TaxCode> taxcodes = (List<TaxCode>) service.findAll(new TaxCode());
return taxcodes.get(0);
}
public static ReferenceType getTaxCodeRef(TaxCode taxcode) {
ReferenceType taxcodeRef = new ReferenceType();
taxcodeRef.setName(taxcode.getName());
taxcodeRef.setValue(taxcode.getId());
return taxcodeRef;
}
public static ReferenceType getTaxCodeRef(String taxcode) {
ReferenceType taxcodeRef = new ReferenceType();
taxcodeRef.setValue(taxcode);
return taxcodeRef;
}
}