CouponRepository

package

Default

Methods

__construct

__construct(\CI_DB_query_builder $queryBuilder) 

Arguments

$queryBuilder

\CI_DB_query_builder

createCouponEntityFromDatabaseRow

createCouponEntityFromDatabaseRow(array $couponRow) : \CouponEntity
Throws
\Exception

Arguments

$couponRow

array

Response

\CouponEntity

getCouponByCode

getCouponByCode(string $couponCode) : \CouponEntity
Throws
\InvalidCouponCodeException

Arguments

$couponCode

string

Response

\CouponEntity

getCouponById

getCouponById(\IdType $couponId) : \CouponEntity
Throws
\InvalidCouponIdException

Arguments

$couponId

\IdType

Response

\CouponEntity

Stores a coupon in database.

storeCoupon(\CouponEntity $coupon) 

If the CouponEntity has a non-empty CouponId, it is assumed to represent an existing record which will be updated, otherwise a new record is created and the CouponId set accordingly.

Arguments

$coupon

\CouponEntity

Properties

queryBuilder

queryBuilder : \CI_DB_query_builder
var

Type(s)

\CI_DB_query_builder