Interface CouponWsFacades<T extends AbstractCouponWsDTO>
-
- All Known Implementing Classes:
AbstractCouponWsFacades
,DefaultMultiCodeCouponWsFacades
,DefaultSingleCodeCouponWsFacades
public interface CouponWsFacades<T extends AbstractCouponWsDTO>
Interface declaring basic web-services facade operations on coupons
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
createCoupon(T coupon)
Creates the coupon, given the coupon data.SearchPageData
getCoupons(PaginationData pagination, java.util.List<SortData> sort)
Returns a restricted size list (page) of available couponsT
getCouponWsDTO(java.lang.String couponId)
Given the couponId string, returns the coupon DTO, otherwise throws exceptionvoid
updateCoupon(T coupon)
Updates the coupon identified by it couponIdvoid
updateCouponStatus(java.lang.String couponId, java.lang.Boolean active)
Updates status of a coupon identified by it couponIdCouponValidationResponseWsDTO
validateCoupon(java.lang.String couponId)
Validates the given couponId, throws an exception if coupon id is invalidCouponValidationResponseWsDTO
validateCoupon(java.lang.String couponId, java.lang.String customerId)
Validates the given couponId for the given customer, throws an exception if coupon id or customer id is invalid
-
-
-
Method Detail
-
getCouponWsDTO
T getCouponWsDTO(java.lang.String couponId)
Given the couponId string, returns the coupon DTO, otherwise throws exception- Parameters:
couponId
- a string to be used to find a coupon- Returns:
- - an instance of coupon DTO
-
createCoupon
T createCoupon(T coupon)
Creates the coupon, given the coupon data. Throws exception otherwise- Parameters:
coupon
- - data to create coupon with- Returns:
- - a new instance of coupon
-
updateCoupon
void updateCoupon(T coupon)
Updates the coupon identified by it couponId- Parameters:
coupon
- - data to update coupon with
-
updateCouponStatus
void updateCouponStatus(java.lang.String couponId, java.lang.Boolean active)
Updates status of a coupon identified by it couponId- Parameters:
couponId
- - identifier of a coupon to set statusactive
- - coupon status to set
-
validateCoupon
CouponValidationResponseWsDTO validateCoupon(java.lang.String couponId)
Validates the given couponId, throws an exception if coupon id is invalid- Parameters:
couponId
- a string to be used to validate a coupon- Returns:
- - an instance of
CouponValidationResponseWsDTO
- Throws:
CouponNotFoundException
-
validateCoupon
CouponValidationResponseWsDTO validateCoupon(java.lang.String couponId, java.lang.String customerId)
Validates the given couponId for the given customer, throws an exception if coupon id or customer id is invalid- Parameters:
couponId
- a string to be used to validate a couponcustomerId
- the user id- Returns:
- - an instance of
CouponValidationResponseWsDTO
- Throws:
CouponNotFoundException
-
getCoupons
SearchPageData getCoupons(PaginationData pagination, java.util.List<SortData> sort)
Returns a restricted size list (page) of available coupons- Parameters:
pagination
- - pagination instructionssort
- - sort instructions- Returns:
- - an instance of
SearchPageData
containing a list of coupons, registered in the system
-
-