Method | Description | |
---|---|---|
CreateCoupon ( |
Create and submit coupon
|
|
DiscountService ( ) : System |
No-Args constructor, creates new CouponUtility();
|
|
GetAllUsers ( ) : List |
GetAllUsers gets a list of all the Users
|
|
GetCoupon ( int userId, String discountCode, bool &isSuccess, String &error ) : |
Get Coupon by userId and discountCode returns null if no UserDiscount is found Using outs to return additional error information Also checks for expiration and redemption status
|
|
GetCouponList ( |
Returns a matching UserDiscount from the database
|
|
GetInstance ( ) : IDiscountService | ||
RedeemCoupon ( |
Mark Inputted coupon as redeemed.
|
|
ValidateCoupon ( List |
Checks coupon to see if it is valid
|
|
getCouponListByUserIdAndCouponCode ( int userId, String discountCode ) : List |
public CreateCoupon ( |
||
coupon | Coupon without code | |
return |
public GetCoupon ( int userId, String discountCode, bool &isSuccess, String &error ) : |
||
userId | int | |
discountCode | String | |
isSuccess | bool | |
error | String | |
return |
public GetCouponList ( |
||
coupon | ||
return | List |
public static GetInstance ( ) : IDiscountService | ||
return | IDiscountService |
public RedeemCoupon ( |
||
coupon | ||
isSuccess | bool | |
return |
public ValidateCoupon ( List |
||
couponList | List |
|
isSuccess | bool | |
error | String | |
return |
public getCouponListByUserIdAndCouponCode ( int userId, String discountCode ) : List |
||
userId | int | |
discountCode | String | |
return | List |