1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
<?php
/**
* @author @jenschude <jens.schulze@commercetools.de>
*/
namespace Commercetools\Core\Error;
use Commercetools\Core\Model\Common\DateTimeDecorator;
use DateTime;
/**
* @package Commercetools\Core\Error
*
* @method string getCode()
* @method DiscountCodeNonApplicableError setCode(string $code = null)
* @method string getMessage()
* @method DiscountCodeNonApplicableError setMessage(string $message = null)
* @method string getDiscountCode()
* @method DiscountCodeNonApplicableError setDiscountCode(string $discountCode = null)
* @method string getReason()
* @method DiscountCodeNonApplicableError setReason(string $reason = null)
* @method string getDicountCodeId()
* @method DiscountCodeNonApplicableError setDicountCodeId(string $dicountCodeId = null)
* @method DateTimeDecorator getValidFrom()
* @method DiscountCodeNonApplicableError setValidFrom(DateTime $validFrom = null)
* @method DateTimeDecorator getValidUntil()
* @method DiscountCodeNonApplicableError setValidUntil(DateTime $validUntil = null)
* @method DateTimeDecorator getValidityCheckTime()
* @method DiscountCodeNonApplicableError setValidityCheckTime(DateTime $validityCheckTime = null)
*/
class DiscountCodeNonApplicableError extends ApiError
{
const CODE = 'DiscountCodeNonApplicable';
public function fieldDefinitions()
{
$definitions = parent::fieldDefinitions();
$definitions['discountCode'] = [static::TYPE => 'string'];
$definitions['reason'] = [static::TYPE => 'string'];
$definitions['dicountCodeId'] = [static::TYPE => 'string'];
$definitions['validFrom'] = [
static::TYPE => DateTime::class,
static::DECORATOR => DateTimeDecorator::class
];
$definitions['validUntil'] = [
static::TYPE => DateTime::class,
static::DECORATOR => DateTimeDecorator::class
];
$definitions['validityCheckTime'] = [
static::TYPE => DateTime::class,
static::DECORATOR => DateTimeDecorator::class
];
return $definitions;
}
}