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