HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/zipwire.komma.pro/app/KommaApp/Shop/Cart/HasCouponCodesInterface.php
<?php


namespace App\KommaApp\Shop\Cart;

/**
 * Defines that the implementor of this interface has coupon codes.
 * This does not mean that they are valid. Validation is done via the discountService.
 *
 * Interface HasCouponCodesInterface
 * @package App\KommaApp\Shop\Cart
 */
interface HasCouponCodesInterface
{
    /**
     * Adds a coupon code. Notice that this does not mean that it is valid.
     * Validation is done via the DiscountServiceInterface. Returns true if
     * it was added. false if not
     *
     * @param string $code
     * @return mixed
     */
    public function addCouponCode(string $code): bool;

    /**
     * Removes a coupon code and returns true if it was removed and false if not.
     *
     * @param string $code
     * @return bool
     */
    public function removeCouponCode(string $code):bool;

    /**
     * Return all coupon codes;
     *
     * @return string[];
     */
    public function getCouponCodes():array;
}