ENGINE_PREFIX
ENGINE_PREFIX = 'discount_engine_'
سرویس پرداختها را برای ماژولهای داخلی سیستم ایجاد می کند.
getPrice(integer $price, \Discount_Discount $discount, \Pluf_HTTP_Request $request)
Compute new price after use given discount.
integer | $price | |
\Discount_Discount | $discount | |
\Pluf_HTTP_Request | $request |
isValid(\Discount_Discount $discount, \Pluf_HTTP_Request $request)
Check if give discount is valid or not.
\Discount_Discount | $discount | |
\Pluf_HTTP_Request | $request |
validate(\Discount_Discount $discount, \Pluf_Http_Request $request)
Validate given discount and returns a code as result.
Returned code should be as following:
\Discount_Discount | $discount | |
\Pluf_Http_Request | $request |
consumeDiscount(\Discount_Discount $discount)
Cosume one unit from given discount
\Discount_Discount | $discount |