Interface VoucherFacade

    • Method Detail

      • checkVoucherCode

        boolean checkVoucherCode​(java.lang.String voucherCode)
        Check if voucher code is valid
        Parameters:
        voucherCode - voucher code
        Returns:
        true when voucher code is valid, false when voucher code is invalid
      • applyVoucher

        void applyVoucher​(java.lang.String voucherCode)
                   throws VoucherOperationException
        Apply voucher to current session cart
        Parameters:
        voucherCode - voucher identifier
        Throws:
        VoucherOperationException - if voucher wasn't applied due to some problems
        java.lang.IllegalArgumentException - if parameter code is null or empty
      • releaseVoucher

        void releaseVoucher​(java.lang.String voucherCode)
                     throws VoucherOperationException
        Remove voucher from current session cart
        Parameters:
        voucherCode - voucher identifier
        Throws:
        VoucherOperationException - if voucher wasn't released due to some problems
        java.lang.IllegalArgumentException - if parameter code is null or empty
      • getVouchersForCart

        java.util.List<VoucherData> getVouchersForCart()
        Get vouchers applied for current session cart
        Returns:
        list of vouchers applied for current session cart