89 lines
3.1 KiB
PHP
89 lines
3.1 KiB
PHP
<?php
|
|
/*************************************************************************************/
|
|
/* */
|
|
/* Thelia */
|
|
/* */
|
|
/* Copyright (c) OpenStudio */
|
|
/* email : info@thelia.net */
|
|
/* web : http://www.thelia.net */
|
|
/* */
|
|
/* This program is free software; you can redistribute it and/or modify */
|
|
/* it under the terms of the GNU General Public License as published by */
|
|
/* the Free Software Foundation; either version 3 of the License */
|
|
/* */
|
|
/* This program is distributed in the hope that it will be useful, */
|
|
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
|
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
|
/* GNU General Public License for more details. */
|
|
/* */
|
|
/* You should have received a copy of the GNU General Public License */
|
|
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
/* */
|
|
/*************************************************************************************/
|
|
|
|
namespace Thelia\Coupon;
|
|
|
|
/**
|
|
* Created by JetBrains PhpStorm.
|
|
* Date: 8/19/13
|
|
* Time: 3:24 PM
|
|
*
|
|
* Represents a Coupon ready to be processed in a Checkout process
|
|
*
|
|
* @package Coupon
|
|
* @author Guillaume MOREL <gmorel@openstudio.fr>
|
|
*
|
|
*/
|
|
interface CouponInterface
|
|
{
|
|
/**
|
|
* Return Coupon code (ex: XMAS)
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getCode();
|
|
|
|
/**
|
|
* Return Coupon title (ex: Coupon for XMAS)
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getTitle();
|
|
|
|
/**
|
|
* Return Coupon short description
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getShortDescription();
|
|
|
|
/**
|
|
* Return Coupon description
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getDescription();
|
|
|
|
/**
|
|
* If Coupon is cumulative or prevent any accumulation
|
|
* If is cumulative you can sum Coupon effects
|
|
* If not cancel all other Coupon and take the last given
|
|
*
|
|
* @return string
|
|
*/
|
|
public function isCumulative();
|
|
|
|
/**
|
|
* If Coupon is removing Checkout Postage
|
|
*
|
|
* @return bool
|
|
*/
|
|
public function isRemovingPostage();
|
|
|
|
/**
|
|
* Return effects generated by the coupon
|
|
*
|
|
* @return \Closure
|
|
*/
|
|
public function getEffect();
|
|
} |