Hourly staff6 = new Commission("Marcus Gendron", "66 Highland St.", "272-9555", "123-62-5678", 6.25, 0.20);
/** * Adds a new monetary value of the commission. * * @param money monetary value of the commission */ public void addMoney(Money money) { getMoney().add(money); }
/** * Returns the monetary value of the commission. * * @return monetary value of the commission */ public List<Money> getMoney() { return getRepeatingExtension(Money.class); }
@Override public void declareExtensions(ExtensionProfile extProfile) { if (extProfile.isDeclared(TransactionData.class)) { return; } extProfile.declare(TransactionData.class, Commission.class); new Commission().declareExtensions(extProfile); extProfile.declare(TransactionData.class, Price.class); new Price().declareExtensions(extProfile); }
Commission c = new Commission(); c.addMoney(new Money(Double.valueOf(commission).doubleValue(), currency)); data.setCommission(c);
/** * Returns whether it has the monetary value of the commission. * * @return whether it has the monetary value of the commission */ public boolean hasMoney() { return hasRepeatingExtension(Money.class); }
@Override public void declareExtensions(ExtensionProfile extProfile) { if (extProfile.isDeclared(TransactionData.class)) { return; } extProfile.declare(TransactionData.class, Commission.class); new Commission().declareExtensions(extProfile); extProfile.declare(TransactionData.class, Price.class); new Price().declareExtensions(extProfile); }
Commission c = new Commission(); c.addMoney(new Money(Double.valueOf(commission).doubleValue(), currency)); data.setCommission(c);
/** * Returns whether it has the monetary value of the commission. * * @return whether it has the monetary value of the commission */ public boolean hasMoney() { return hasRepeatingExtension(Money.class); }
Hourly staff6 = new Commission("Marcus Gendron", "66 Highland St.", "272-9555", "123-62-5678", 6.25, 0.20);
/** * Adds a new monetary value of the commission. * * @param money monetary value of the commission */ public void addMoney(Money money) { getMoney().add(money); }
/** * Returns the monetary value of the commission. * * @return monetary value of the commission */ public List<Money> getMoney() { return getRepeatingExtension(Money.class); }
public Fee unmarshal(AdaptedFee adaptedFee) throws Exception { if("Commission".equals(adaptedFee.type)) { Commission commission = new Commission(); commission.name = adaptedFee.name; commission.rate = adaptedFee.rate;