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 Details

    • getCouponWsDTO

      T getCouponWsDTO(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(String couponId, Boolean active)
      Updates status of a coupon identified by it couponId
      Parameters:
      couponId - - identifier of a coupon to set status
      active - - coupon status to set
    • validateCoupon

      CouponValidationResponseWsDTO validateCoupon(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(String couponId, 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 coupon
      customerId - the user id
      Returns:
      - an instance of CouponValidationResponseWsDTO
      Throws:
      CouponNotFoundException
    • getCoupons

      SearchPageData getCoupons(PaginationData pagination, List<SortData> sort)
      Returns a restricted size list (page) of available coupons
      Parameters:
      pagination - - pagination instructions
      sort - - sort instructions
      Returns:
      - an instance of SearchPageData containing a list of coupons, registered in the system