* @return AlternateTaxTable object
*/
public AlternateTaxTable addAlternateTaxRule(AlternateTaxTable taxTable,
AlternateTaxRule rule) throws ProtocolException {
try {
AlternateTaxTable returnTaxTable = taxTable;
if (returnTaxTable == null) {
returnTaxTable = _objectFact.createAlternateTaxTable();
}
AlternateTaxRulesType aRules
= _objectFact.createAlternateTaxTableAlternateTaxRulesType();
List taxRuleList = aRules.getAlternateTaxRule();
if (!taxRuleList.contains(rule) && rule != null) {
taxRuleList.add(rule);
}
returnTaxTable.setAlternateTaxRules(aRules);
return returnTaxTable;
} catch (JAXBException jaxbEx) {
throw new ProtocolException(jaxbEx.getMessage());
}
}