commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
DiscountCode
DiscountCodeDraft.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\DiscountCode
;
10
11
use
Commercetools\Api\Models\CartDiscount\CartDiscountResourceIdentifierCollection
;
12
use
Commercetools\Api\Models\Common\LocalizedString
;
13
use
Commercetools\Api\Models\Type\CustomFieldsDraft
;
14
use
Commercetools\Base\DateTimeImmutableCollection
;
15
use
Commercetools\Base\JsonObject
;
16
use DateTimeImmutable;
17
18
interface
DiscountCodeDraft
extends
JsonObject
19
{
20
public
const
FIELD_KEY
=
'key'
;
21
public
const
FIELD_NAME
=
'name'
;
22
public
const
FIELD_DESCRIPTION
=
'description'
;
23
public
const
FIELD_CODE
=
'code'
;
24
public
const
FIELD_CART_DISCOUNTS
=
'cartDiscounts'
;
25
public
const
FIELD_CART_PREDICATE
=
'cartPredicate'
;
26
public
const
FIELD_IS_ACTIVE
=
'isActive'
;
27
public
const
FIELD_MAX_APPLICATIONS
=
'maxApplications'
;
28
public
const
FIELD_MAX_APPLICATIONS_PER_CUSTOMER
=
'maxApplicationsPerCustomer'
;
29
public
const
FIELD_CUSTOM
=
'custom'
;
30
public
const
FIELD_GROUPS
=
'groups'
;
31
public
const
FIELD_VALID_FROM
=
'validFrom'
;
32
public
const
FIELD_VALID_UNTIL
=
'validUntil'
;
33
41
public
function
getKey
();
42
49
public
function
getName
();
50
57
public
function
getDescription
();
58
66
public
function
getCode
();
67
74
public
function
getCartDiscounts
();
75
82
public
function
getCartPredicate
();
83
90
public
function
getIsActive
();
91
99
public
function
getMaxApplications
();
100
108
public
function
getMaxApplicationsPerCustomer
();
109
116
public
function
getCustom
();
117
124
public
function
getGroups
();
125
132
public
function
getValidFrom
();
133
140
public
function
getValidUntil
();
141
145
public
function
setKey
(?
string
$key): void;
146
150
public
function
setName
(?
LocalizedString
$name): void;
151
155
public
function
setDescription
(?
LocalizedString
$description): void;
156
160
public
function
setCode
(?
string
$code): void;
161
165
public
function
setCartDiscounts
(?
CartDiscountResourceIdentifierCollection
$cartDiscounts): void;
166
170
public
function
setCartPredicate
(?
string
$cartPredicate): void;
171
175
public
function
setIsActive
(?
bool
$isActive): void;
176
180
public
function
setMaxApplications
(?
int
$maxApplications): void;
181
185
public
function
setMaxApplicationsPerCustomer
(?
int
$maxApplicationsPerCustomer): void;
186
190
public
function
setCustom
(?
CustomFieldsDraft
$custom): void;
191
195
public
function
setGroups
(?array $groups): void;
196
200
public
function
setValidFrom
(?DateTimeImmutable $validFrom): void;
201
205
public
function
setValidUntil
(?DateTimeImmutable $validUntil): void;
206
}
Commercetools\Api\Models\CartDiscount\CartDiscountResourceIdentifierCollection
Definition:
CartDiscountResourceIdentifierCollection.php:22
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Api\Models\Common\LocalizedString
Definition:
LocalizedString.php:14
Commercetools\Api\Models\DiscountCode\DiscountCodeDraft
Definition:
DiscountCodeDraft.php:19
Commercetools\Api\Models\DiscountCode\DiscountCodeDraft\setValidUntil
setValidUntil(?DateTimeImmutable $validUntil)
Commercetools\Api\Models\DiscountCode\DiscountCodeDraft\getIsActive
getIsActive()
Commercetools\Api\Models\DiscountCode\DiscountCodeDraft\setValidFrom
setValidFrom(?DateTimeImmutable $validFrom)
Commercetools\Api\Models\DiscountCode\DiscountCodeDraft\FIELD_CODE
const FIELD_CODE
Definition:
DiscountCodeDraft.php:23
Commercetools\Api\Models\DiscountCode\DiscountCodeDraft\setName
setName(?LocalizedString $name)
Commercetools\Api\Models\DiscountCode\DiscountCodeDraft\setKey
setKey(?string $key)
Commercetools\Api\Models\DiscountCode\DiscountCodeDraft\getMaxApplicationsPerCustomer
getMaxApplicationsPerCustomer()
Commercetools\Api\Models\DiscountCode\DiscountCodeDraft\setCartPredicate
setCartPredicate(?string $cartPredicate)
Commercetools\Api\Models\DiscountCode\DiscountCodeDraft\getCartDiscounts
getCartDiscounts()
Commercetools\Api\Models\DiscountCode\DiscountCodeDraft\getCartPredicate
getCartPredicate()
Commercetools\Api\Models\DiscountCode\DiscountCodeDraft\getGroups
getGroups()
Commercetools\Api\Models\DiscountCode\DiscountCodeDraft\FIELD_IS_ACTIVE
const FIELD_IS_ACTIVE
Definition:
DiscountCodeDraft.php:26
Commercetools\Api\Models\DiscountCode\DiscountCodeDraft\setDescription
setDescription(?LocalizedString $description)
Commercetools\Api\Models\DiscountCode\DiscountCodeDraft\FIELD_CUSTOM
const FIELD_CUSTOM
Definition:
DiscountCodeDraft.php:29
Commercetools\Api\Models\DiscountCode\DiscountCodeDraft\getKey
getKey()
Commercetools\Api\Models\DiscountCode\DiscountCodeDraft\FIELD_DESCRIPTION
const FIELD_DESCRIPTION
Definition:
DiscountCodeDraft.php:22
Commercetools\Api\Models\DiscountCode\DiscountCodeDraft\setCartDiscounts
setCartDiscounts(?CartDiscountResourceIdentifierCollection $cartDiscounts)
Commercetools\Api\Models\DiscountCode\DiscountCodeDraft\FIELD_CART_DISCOUNTS
const FIELD_CART_DISCOUNTS
Definition:
DiscountCodeDraft.php:24
Commercetools\Api\Models\DiscountCode\DiscountCodeDraft\setCustom
setCustom(?CustomFieldsDraft $custom)
Commercetools\Api\Models\DiscountCode\DiscountCodeDraft\getName
getName()
Commercetools\Api\Models\DiscountCode\DiscountCodeDraft\FIELD_VALID_FROM
const FIELD_VALID_FROM
Definition:
DiscountCodeDraft.php:31
Commercetools\Api\Models\DiscountCode\DiscountCodeDraft\FIELD_KEY
const FIELD_KEY
Definition:
DiscountCodeDraft.php:20
Commercetools\Api\Models\DiscountCode\DiscountCodeDraft\getCode
getCode()
Commercetools\Api\Models\DiscountCode\DiscountCodeDraft\FIELD_MAX_APPLICATIONS
const FIELD_MAX_APPLICATIONS
Definition:
DiscountCodeDraft.php:27
Commercetools\Api\Models\DiscountCode\DiscountCodeDraft\setMaxApplications
setMaxApplications(?int $maxApplications)
Commercetools\Api\Models\DiscountCode\DiscountCodeDraft\setGroups
setGroups(?array $groups)
Commercetools\Api\Models\DiscountCode\DiscountCodeDraft\getValidFrom
getValidFrom()
Commercetools\Api\Models\DiscountCode\DiscountCodeDraft\getCustom
getCustom()
Commercetools\Api\Models\DiscountCode\DiscountCodeDraft\setIsActive
setIsActive(?bool $isActive)
Commercetools\Api\Models\DiscountCode\DiscountCodeDraft\getMaxApplications
getMaxApplications()
Commercetools\Api\Models\DiscountCode\DiscountCodeDraft\getDescription
getDescription()
Commercetools\Api\Models\DiscountCode\DiscountCodeDraft\FIELD_GROUPS
const FIELD_GROUPS
Definition:
DiscountCodeDraft.php:30
Commercetools\Api\Models\DiscountCode\DiscountCodeDraft\setMaxApplicationsPerCustomer
setMaxApplicationsPerCustomer(?int $maxApplicationsPerCustomer)
Commercetools\Api\Models\DiscountCode\DiscountCodeDraft\FIELD_VALID_UNTIL
const FIELD_VALID_UNTIL
Definition:
DiscountCodeDraft.php:32
Commercetools\Api\Models\DiscountCode\DiscountCodeDraft\getValidUntil
getValidUntil()
Commercetools\Api\Models\DiscountCode\DiscountCodeDraft\FIELD_CART_PREDICATE
const FIELD_CART_PREDICATE
Definition:
DiscountCodeDraft.php:25
Commercetools\Api\Models\DiscountCode\DiscountCodeDraft\setCode
setCode(?string $code)
Commercetools\Api\Models\DiscountCode\DiscountCodeDraft\FIELD_NAME
const FIELD_NAME
Definition:
DiscountCodeDraft.php:21
Commercetools\Api\Models\DiscountCode\DiscountCodeDraft\FIELD_MAX_APPLICATIONS_PER_CUSTOMER
const FIELD_MAX_APPLICATIONS_PER_CUSTOMER
Definition:
DiscountCodeDraft.php:28
Commercetools\Api\Models\Type\CustomFieldsDraft
Definition:
CustomFieldsDraft.php:15
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\DiscountCode
Definition:
DiscountCode.php:9
Generated by
1.9.1