net.commerce.zocalo.currency
Class UnaryCouponBank

java.lang.Object
  extended by net.commerce.zocalo.currency.CouponBank
      extended by net.commerce.zocalo.currency.UnaryCouponBank

public class UnaryCouponBank
extends CouponBank

CouponBank doesn't charge for coupons, so sellers get the proceeds of the sale.


Constructor Summary
UnaryCouponBank(Claim claim, Funds empty)
           
 
Method Summary
static UnaryCouponBank makeUnaryBank(Claim claim, Funds empty)
           
 Coupons[] printNewCouponSets(Quantity amount, Funds funds, Quantity couponCost)
           
 Quantity redeem(Position pos, java.util.Set users)
           
 Accounts settle(Quantity quantity, java.util.Map couponsMap)
          couponsMap should contain QUANTITY of each coupon in this claim.
 
Methods inherited from class net.commerce.zocalo.currency.CouponBank
balance, getSetsMinted, getSetsRedeemed, identify, increment, incrementSetsMinted, incrementSetsRedeemed, issueUnpairedCoupons, makeBank, redeem, settle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnaryCouponBank

public UnaryCouponBank(Claim claim,
                       Funds empty)
Method Detail

makeUnaryBank

public static UnaryCouponBank makeUnaryBank(Claim claim,
                                            Funds empty)

printNewCouponSets

public Coupons[] printNewCouponSets(Quantity amount,
                                    Funds funds,
                                    Quantity couponCost)
Overrides:
printNewCouponSets in class CouponBank

settle

public Accounts settle(Quantity quantity,
                       java.util.Map couponsMap)
couponsMap should contain QUANTITY of each coupon in this claim. If it contains fewer, the owner will only get credit for the full sets. Any odd coupons will be returned.


redeem

public Quantity redeem(Position pos,
                       java.util.Set users)