commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
DiscountCode
DiscountCode.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\DiscountCode
;
10
11
use
Commercetools\Api\Models\CartDiscount\CartDiscountReferenceCollection
;
12
use
Commercetools\Api\Models\Common\BaseResource
;
13
use
Commercetools\Api\Models\Common\CreatedBy
;
14
use
Commercetools\Api\Models\Common\LastModifiedBy
;
15
use
Commercetools\Api\Models\Common\LocalizedString
;
16
use
Commercetools\Api\Models\Common\ReferenceCollection
;
17
use
Commercetools\Api\Models\Type\CustomFields
;
18
use
Commercetools\Base\DateTimeImmutableCollection
;
19
use
Commercetools\Base\JsonObject
;
20
use DateTimeImmutable;
21
22
interface
DiscountCode
extends
BaseResource
23
{
24
public
const
FIELD_KEY
=
'key'
;
25
public
const
FIELD_LAST_MODIFIED_BY
=
'lastModifiedBy'
;
26
public
const
FIELD_CREATED_BY
=
'createdBy'
;
27
public
const
FIELD_NAME
=
'name'
;
28
public
const
FIELD_DESCRIPTION
=
'description'
;
29
public
const
FIELD_CODE
=
'code'
;
30
public
const
FIELD_CART_DISCOUNTS
=
'cartDiscounts'
;
31
public
const
FIELD_CART_PREDICATE
=
'cartPredicate'
;
32
public
const
FIELD_IS_ACTIVE
=
'isActive'
;
33
public
const
FIELD_REFERENCES
=
'references'
;
34
public
const
FIELD_MAX_APPLICATIONS
=
'maxApplications'
;
35
public
const
FIELD_MAX_APPLICATIONS_PER_CUSTOMER
=
'maxApplicationsPerCustomer'
;
36
public
const
FIELD_CUSTOM
=
'custom'
;
37
public
const
FIELD_GROUPS
=
'groups'
;
38
public
const
FIELD_VALID_FROM
=
'validFrom'
;
39
public
const
FIELD_VALID_UNTIL
=
'validUntil'
;
40
public
const
FIELD_APPLICATION_VERSION
=
'applicationVersion'
;
41
48
public
function
getId
();
49
56
public
function
getKey
();
57
64
public
function
getVersion
();
65
72
public
function
getCreatedAt
();
73
80
public
function
getLastModifiedAt
();
81
88
public
function
getLastModifiedBy
();
89
96
public
function
getCreatedBy
();
97
104
public
function
getName
();
105
112
public
function
getDescription
();
113
120
public
function
getCode
();
121
128
public
function
getCartDiscounts
();
129
136
public
function
getCartPredicate
();
137
144
public
function
getIsActive
();
145
153
public
function
getReferences
();
154
162
public
function
getMaxApplications
();
163
171
public
function
getMaxApplicationsPerCustomer
();
172
179
public
function
getCustom
();
180
187
public
function
getGroups
();
188
195
public
function
getValidFrom
();
196
203
public
function
getValidUntil
();
204
212
public
function
getApplicationVersion
();
213
217
public
function
setId
(?
string
$id): void;
218
222
public
function
setKey
(?
string
$key): void;
223
227
public
function
setVersion
(?
int
$version): void;
228
232
public
function
setCreatedAt
(?DateTimeImmutable $createdAt): void;
233
237
public
function
setLastModifiedAt
(?DateTimeImmutable $lastModifiedAt): void;
238
242
public
function
setLastModifiedBy
(?
LastModifiedBy
$lastModifiedBy): void;
243
247
public
function
setCreatedBy
(?
CreatedBy
$createdBy): void;
248
252
public
function
setName
(?
LocalizedString
$name): void;
253
257
public
function
setDescription
(?
LocalizedString
$description): void;
258
262
public
function
setCode
(?
string
$code): void;
263
267
public
function
setCartDiscounts
(?
CartDiscountReferenceCollection
$cartDiscounts): void;
268
272
public
function
setCartPredicate
(?
string
$cartPredicate): void;
273
277
public
function
setIsActive
(?
bool
$isActive): void;
278
282
public
function
setReferences
(?
ReferenceCollection
$references): void;
283
287
public
function
setMaxApplications
(?
int
$maxApplications): void;
288
292
public
function
setMaxApplicationsPerCustomer
(?
int
$maxApplicationsPerCustomer): void;
293
297
public
function
setCustom
(?
CustomFields
$custom): void;
298
302
public
function
setGroups
(?array $groups): void;
303
307
public
function
setValidFrom
(?DateTimeImmutable $validFrom): void;
308
312
public
function
setValidUntil
(?DateTimeImmutable $validUntil): void;
313
317
public
function
setApplicationVersion
(?
int
$applicationVersion): void;
318
}
Commercetools\Api\Models\CartDiscount\CartDiscountReferenceCollection
Definition:
CartDiscountReferenceCollection.php:22
Commercetools\Api\Models\Common\ReferenceCollection
Definition:
ReferenceCollection.php:26
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Api\Models\Common\BaseResource
Definition:
BaseResource.php:249
Commercetools\Api\Models\Common\CreatedBy
Definition:
CreatedBy.php:16
Commercetools\Api\Models\Common\LastModifiedBy
Definition:
LastModifiedBy.php:16
Commercetools\Api\Models\Common\LocalizedString
Definition:
LocalizedString.php:14
Commercetools\Api\Models\DiscountCode\DiscountCode
Definition:
DiscountCode.php:23
Commercetools\Api\Models\DiscountCode\DiscountCode\FIELD_APPLICATION_VERSION
const FIELD_APPLICATION_VERSION
Definition:
DiscountCode.php:40
Commercetools\Api\Models\DiscountCode\DiscountCode\setMaxApplications
setMaxApplications(?int $maxApplications)
Commercetools\Api\Models\DiscountCode\DiscountCode\FIELD_CREATED_BY
const FIELD_CREATED_BY
Definition:
DiscountCode.php:26
Commercetools\Api\Models\DiscountCode\DiscountCode\FIELD_VALID_UNTIL
const FIELD_VALID_UNTIL
Definition:
DiscountCode.php:39
Commercetools\Api\Models\DiscountCode\DiscountCode\setReferences
setReferences(?ReferenceCollection $references)
Commercetools\Api\Models\DiscountCode\DiscountCode\getReferences
getReferences()
Commercetools\Api\Models\DiscountCode\DiscountCode\FIELD_KEY
const FIELD_KEY
Definition:
DiscountCode.php:24
Commercetools\Api\Models\DiscountCode\DiscountCode\getCustom
getCustom()
Commercetools\Api\Models\DiscountCode\DiscountCode\setCode
setCode(?string $code)
Commercetools\Api\Models\DiscountCode\DiscountCode\FIELD_VALID_FROM
const FIELD_VALID_FROM
Definition:
DiscountCode.php:38
Commercetools\Api\Models\DiscountCode\DiscountCode\FIELD_LAST_MODIFIED_BY
const FIELD_LAST_MODIFIED_BY
Definition:
DiscountCode.php:25
Commercetools\Api\Models\DiscountCode\DiscountCode\FIELD_MAX_APPLICATIONS
const FIELD_MAX_APPLICATIONS
Definition:
DiscountCode.php:34
Commercetools\Api\Models\DiscountCode\DiscountCode\setName
setName(?LocalizedString $name)
Commercetools\Api\Models\DiscountCode\DiscountCode\setIsActive
setIsActive(?bool $isActive)
Commercetools\Api\Models\DiscountCode\DiscountCode\setApplicationVersion
setApplicationVersion(?int $applicationVersion)
Commercetools\Api\Models\DiscountCode\DiscountCode\getCreatedBy
getCreatedBy()
Commercetools\Api\Models\DiscountCode\DiscountCode\getCreatedAt
getCreatedAt()
Commercetools\Api\Models\DiscountCode\DiscountCode\setId
setId(?string $id)
Commercetools\Api\Models\DiscountCode\DiscountCode\FIELD_DESCRIPTION
const FIELD_DESCRIPTION
Definition:
DiscountCode.php:28
Commercetools\Api\Models\DiscountCode\DiscountCode\FIELD_CODE
const FIELD_CODE
Definition:
DiscountCode.php:29
Commercetools\Api\Models\DiscountCode\DiscountCode\setLastModifiedAt
setLastModifiedAt(?DateTimeImmutable $lastModifiedAt)
Commercetools\Api\Models\DiscountCode\DiscountCode\setCreatedAt
setCreatedAt(?DateTimeImmutable $createdAt)
Commercetools\Api\Models\DiscountCode\DiscountCode\getApplicationVersion
getApplicationVersion()
Commercetools\Api\Models\DiscountCode\DiscountCode\getKey
getKey()
Commercetools\Api\Models\DiscountCode\DiscountCode\FIELD_REFERENCES
const FIELD_REFERENCES
Definition:
DiscountCode.php:33
Commercetools\Api\Models\DiscountCode\DiscountCode\setCartDiscounts
setCartDiscounts(?CartDiscountReferenceCollection $cartDiscounts)
Commercetools\Api\Models\DiscountCode\DiscountCode\getLastModifiedAt
getLastModifiedAt()
Commercetools\Api\Models\DiscountCode\DiscountCode\setGroups
setGroups(?array $groups)
Commercetools\Api\Models\DiscountCode\DiscountCode\setDescription
setDescription(?LocalizedString $description)
Commercetools\Api\Models\DiscountCode\DiscountCode\setVersion
setVersion(?int $version)
Commercetools\Api\Models\DiscountCode\DiscountCode\setCreatedBy
setCreatedBy(?CreatedBy $createdBy)
Commercetools\Api\Models\DiscountCode\DiscountCode\getCode
getCode()
Commercetools\Api\Models\DiscountCode\DiscountCode\FIELD_CART_DISCOUNTS
const FIELD_CART_DISCOUNTS
Definition:
DiscountCode.php:30
Commercetools\Api\Models\DiscountCode\DiscountCode\setCartPredicate
setCartPredicate(?string $cartPredicate)
Commercetools\Api\Models\DiscountCode\DiscountCode\FIELD_MAX_APPLICATIONS_PER_CUSTOMER
const FIELD_MAX_APPLICATIONS_PER_CUSTOMER
Definition:
DiscountCode.php:35
Commercetools\Api\Models\DiscountCode\DiscountCode\getMaxApplications
getMaxApplications()
Commercetools\Api\Models\DiscountCode\DiscountCode\getIsActive
getIsActive()
Commercetools\Api\Models\DiscountCode\DiscountCode\getCartPredicate
getCartPredicate()
Commercetools\Api\Models\DiscountCode\DiscountCode\getMaxApplicationsPerCustomer
getMaxApplicationsPerCustomer()
Commercetools\Api\Models\DiscountCode\DiscountCode\getValidFrom
getValidFrom()
Commercetools\Api\Models\DiscountCode\DiscountCode\setMaxApplicationsPerCustomer
setMaxApplicationsPerCustomer(?int $maxApplicationsPerCustomer)
Commercetools\Api\Models\DiscountCode\DiscountCode\setCustom
setCustom(?CustomFields $custom)
Commercetools\Api\Models\DiscountCode\DiscountCode\setValidFrom
setValidFrom(?DateTimeImmutable $validFrom)
Commercetools\Api\Models\DiscountCode\DiscountCode\getId
getId()
Commercetools\Api\Models\DiscountCode\DiscountCode\setLastModifiedBy
setLastModifiedBy(?LastModifiedBy $lastModifiedBy)
Commercetools\Api\Models\DiscountCode\DiscountCode\getCartDiscounts
getCartDiscounts()
Commercetools\Api\Models\DiscountCode\DiscountCode\getGroups
getGroups()
Commercetools\Api\Models\DiscountCode\DiscountCode\FIELD_IS_ACTIVE
const FIELD_IS_ACTIVE
Definition:
DiscountCode.php:32
Commercetools\Api\Models\DiscountCode\DiscountCode\FIELD_CART_PREDICATE
const FIELD_CART_PREDICATE
Definition:
DiscountCode.php:31
Commercetools\Api\Models\DiscountCode\DiscountCode\FIELD_CUSTOM
const FIELD_CUSTOM
Definition:
DiscountCode.php:36
Commercetools\Api\Models\DiscountCode\DiscountCode\setKey
setKey(?string $key)
Commercetools\Api\Models\DiscountCode\DiscountCode\getVersion
getVersion()
Commercetools\Api\Models\DiscountCode\DiscountCode\FIELD_NAME
const FIELD_NAME
Definition:
DiscountCode.php:27
Commercetools\Api\Models\DiscountCode\DiscountCode\getLastModifiedBy
getLastModifiedBy()
Commercetools\Api\Models\DiscountCode\DiscountCode\setValidUntil
setValidUntil(?DateTimeImmutable $validUntil)
Commercetools\Api\Models\DiscountCode\DiscountCode\getName
getName()
Commercetools\Api\Models\DiscountCode\DiscountCode\getValidUntil
getValidUntil()
Commercetools\Api\Models\DiscountCode\DiscountCode\FIELD_GROUPS
const FIELD_GROUPS
Definition:
DiscountCode.php:37
Commercetools\Api\Models\DiscountCode\DiscountCode\getDescription
getDescription()
Commercetools\Api\Models\Type\CustomFields
Definition:
CustomFields.php:15
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\DiscountCode
Definition:
DiscountCode.php:9
Generated by
1.9.1