Example #1
0
 /**
  * @param int $amount
  * @param string|null $voucherCoder
  *
  * @return \Orm\Zed\Discount\Persistence\SpyDiscount
  */
 protected function createDiscountEntity($amount, $voucherCoder = null)
 {
     $discountEntity = new SpyDiscount();
     $discountEntity->setVirtualColumn('VoucherCode', $voucherCoder);
     $discountEntity->setDecisionRuleQueryString('query string');
     $discountEntity->setAmount($amount);
     return $discountEntity;
 }