commercetools-sdk-php-v2
master
The platform, import-api and ml-api PHP sdks generated from our api reference.
|
Public Member Functions | |
getName () | |
getKey () | |
getDescription () | |
getValue () | |
getCartPredicate () | |
getTarget () | |
getSortOrder () | |
getStores () | |
getIsActive () | |
getValidFrom () | |
getValidUntil () | |
getRequiresDiscountCode () | |
getStackingMode () | |
getCustom () | |
setName (?LocalizedString $name) | |
setKey (?string $key) | |
setDescription (?LocalizedString $description) | |
setValue (?CartDiscountValueDraft $value) | |
setCartPredicate (?string $cartPredicate) | |
setTarget (?CartDiscountTarget $target) | |
setSortOrder (?string $sortOrder) | |
setStores (?StoreResourceIdentifierCollection $stores) | |
setIsActive (?bool $isActive) | |
setValidFrom (?DateTimeImmutable $validFrom) | |
setValidUntil (?DateTimeImmutable $validUntil) | |
setRequiresDiscountCode (?bool $requiresDiscountCode) | |
setStackingMode (?string $stackingMode) | |
setCustom (?CustomFieldsDraft $custom) | |
Public Member Functions inherited from Commercetools\Base\JsonObject | |
get (string $field) | |
with (callable $callable=null) | |
Public Attributes | |
const | FIELD_NAME = 'name' |
const | FIELD_KEY = 'key' |
const | FIELD_DESCRIPTION = 'description' |
const | FIELD_VALUE = 'value' |
const | FIELD_CART_PREDICATE = 'cartPredicate' |
const | FIELD_TARGET = 'target' |
const | FIELD_SORT_ORDER = 'sortOrder' |
const | FIELD_STORES = 'stores' |
const | FIELD_IS_ACTIVE = 'isActive' |
const | FIELD_VALID_FROM = 'validFrom' |
const | FIELD_VALID_UNTIL = 'validUntil' |
const | FIELD_REQUIRES_DISCOUNT_CODE = 'requiresDiscountCode' |
const | FIELD_STACKING_MODE = 'stackingMode' |
const | FIELD_CUSTOM = 'custom' |
Additional Inherited Members | |
Static Public Member Functions inherited from Commercetools\Base\JsonObject | |
static | of ($data=null) |
static | fromArray (array $data=[]) |
static | fromStdClass (stdClass $data=null) |
Definition at line 18 of file CartDiscountDraft.php.
Commercetools\Api\Models\CartDiscount\CartDiscountDraft::getCartPredicate | ( | ) |
Valid Cart Predicate.
Implemented in Commercetools\Api\Models\CartDiscount\CartDiscountDraftModel.
Commercetools\Api\Models\CartDiscount\CartDiscountDraft::getCustom | ( | ) |
Custom Fields of the CartDiscount.
Implemented in Commercetools\Api\Models\CartDiscount\CartDiscountDraftModel.
Commercetools\Api\Models\CartDiscount\CartDiscountDraft::getDescription | ( | ) |
Description of the CartDiscount.
Implemented in Commercetools\Api\Models\CartDiscount\CartDiscountDraftModel.
Commercetools\Api\Models\CartDiscount\CartDiscountDraft::getIsActive | ( | ) |
Only active Discounts can be applied to the Cart. If the limit for active Cart Discounts is reached, a MaxCartDiscountsReached error is returned.
Implemented in Commercetools\Api\Models\CartDiscount\CartDiscountDraftModel.
Commercetools\Api\Models\CartDiscount\CartDiscountDraft::getKey | ( | ) |
User-defined unique identifier for the CartDiscount.
Implemented in Commercetools\Api\Models\CartDiscount\CartDiscountDraftModel.
Commercetools\Api\Models\CartDiscount\CartDiscountDraft::getName | ( | ) |
Name of the CartDiscount.
Implemented in Commercetools\Api\Models\CartDiscount\CartDiscountDraftModel.
Commercetools\Api\Models\CartDiscount\CartDiscountDraft::getRequiresDiscountCode | ( | ) |
States whether the Discount can only be used in a connection with a DiscountCode.
Implemented in Commercetools\Api\Models\CartDiscount\CartDiscountDraftModel.
Commercetools\Api\Models\CartDiscount\CartDiscountDraft::getSortOrder | ( | ) |
Value between 0
and 1
. A Discount with a higher sortOrder is prioritized. The sort order must be unambiguous among all CartDiscounts.
Implemented in Commercetools\Api\Models\CartDiscount\CartDiscountDraftModel.
Commercetools\Api\Models\CartDiscount\CartDiscountDraft::getStackingMode | ( | ) |
Specifies whether the application of this discount causes the following discounts to be ignored.
Implemented in Commercetools\Api\Models\CartDiscount\CartDiscountDraftModel.
Commercetools\Api\Models\CartDiscount\CartDiscountDraft::getStores | ( | ) |
If the referenced Stores exceed the limit, a MaxStoreReferencesReached error is returned.
If the referenced Stores exceed the limit for Cart Discounts that do not require a Discount Code, a StoreCartDiscountsLimitReached error is returned.
Implemented in Commercetools\Api\Models\CartDiscount\CartDiscountDraftModel.
Commercetools\Api\Models\CartDiscount\CartDiscountDraft::getTarget | ( | ) |
Segment of the Cart that will be discounted.
Must not be set if the value
is giftLineItem
.
Implemented in Commercetools\Api\Models\CartDiscount\CartDiscountDraftModel.
Commercetools\Api\Models\CartDiscount\CartDiscountDraft::getValidFrom | ( | ) |
Date and time (UTC) from which the Discount is effective.
Implemented in Commercetools\Api\Models\CartDiscount\CartDiscountDraftModel.
Commercetools\Api\Models\CartDiscount\CartDiscountDraft::getValidUntil | ( | ) |
Date and time (UTC) until which the Discount is effective.
Implemented in Commercetools\Api\Models\CartDiscount\CartDiscountDraftModel.
Commercetools\Api\Models\CartDiscount\CartDiscountDraft::getValue | ( | ) |
Effect of the CartDiscount on the target
.
Implemented in Commercetools\Api\Models\CartDiscount\CartDiscountDraftModel.
Commercetools\Api\Models\CartDiscount\CartDiscountDraft::setCartPredicate | ( | ?string | $cartPredicate | ) |
?string | $cartPredicate |
Implemented in Commercetools\Api\Models\CartDiscount\CartDiscountDraftModel.
Commercetools\Api\Models\CartDiscount\CartDiscountDraft::setCustom | ( | ?CustomFieldsDraft | $custom | ) |
?CustomFieldsDraft | $custom |
Implemented in Commercetools\Api\Models\CartDiscount\CartDiscountDraftModel.
Commercetools\Api\Models\CartDiscount\CartDiscountDraft::setDescription | ( | ?LocalizedString | $description | ) |
?LocalizedString | $description |
Implemented in Commercetools\Api\Models\CartDiscount\CartDiscountDraftModel.
Commercetools\Api\Models\CartDiscount\CartDiscountDraft::setIsActive | ( | ?bool | $isActive | ) |
?bool | $isActive |
Implemented in Commercetools\Api\Models\CartDiscount\CartDiscountDraftModel.
Commercetools\Api\Models\CartDiscount\CartDiscountDraft::setKey | ( | ?string | $key | ) |
?string | $key |
Implemented in Commercetools\Api\Models\CartDiscount\CartDiscountDraftModel.
Commercetools\Api\Models\CartDiscount\CartDiscountDraft::setName | ( | ?LocalizedString | $name | ) |
?LocalizedString | $name |
Implemented in Commercetools\Api\Models\CartDiscount\CartDiscountDraftModel.
Commercetools\Api\Models\CartDiscount\CartDiscountDraft::setRequiresDiscountCode | ( | ?bool | $requiresDiscountCode | ) |
?bool | $requiresDiscountCode |
Implemented in Commercetools\Api\Models\CartDiscount\CartDiscountDraftModel.
Commercetools\Api\Models\CartDiscount\CartDiscountDraft::setSortOrder | ( | ?string | $sortOrder | ) |
?string | $sortOrder |
Implemented in Commercetools\Api\Models\CartDiscount\CartDiscountDraftModel.
Commercetools\Api\Models\CartDiscount\CartDiscountDraft::setStackingMode | ( | ?string | $stackingMode | ) |
?string | $stackingMode |
Implemented in Commercetools\Api\Models\CartDiscount\CartDiscountDraftModel.
Commercetools\Api\Models\CartDiscount\CartDiscountDraft::setStores | ( | ?StoreResourceIdentifierCollection | $stores | ) |
?StoreResourceIdentifierCollection | $stores |
Implemented in Commercetools\Api\Models\CartDiscount\CartDiscountDraftModel.
Commercetools\Api\Models\CartDiscount\CartDiscountDraft::setTarget | ( | ?CartDiscountTarget | $target | ) |
?CartDiscountTarget | $target |
Implemented in Commercetools\Api\Models\CartDiscount\CartDiscountDraftModel.
Commercetools\Api\Models\CartDiscount\CartDiscountDraft::setValidFrom | ( | ?DateTimeImmutable | $validFrom | ) |
?DateTimeImmutable | $validFrom |
Implemented in Commercetools\Api\Models\CartDiscount\CartDiscountDraftModel.
Commercetools\Api\Models\CartDiscount\CartDiscountDraft::setValidUntil | ( | ?DateTimeImmutable | $validUntil | ) |
?DateTimeImmutable | $validUntil |
Implemented in Commercetools\Api\Models\CartDiscount\CartDiscountDraftModel.
Commercetools\Api\Models\CartDiscount\CartDiscountDraft::setValue | ( | ?CartDiscountValueDraft | $value | ) |
?CartDiscountValueDraft | $value |
Implemented in Commercetools\Api\Models\CartDiscount\CartDiscountDraftModel.
const Commercetools\Api\Models\CartDiscount\CartDiscountDraft::FIELD_CART_PREDICATE = 'cartPredicate' |
Definition at line 24 of file CartDiscountDraft.php.
const Commercetools\Api\Models\CartDiscount\CartDiscountDraft::FIELD_CUSTOM = 'custom' |
Definition at line 33 of file CartDiscountDraft.php.
const Commercetools\Api\Models\CartDiscount\CartDiscountDraft::FIELD_DESCRIPTION = 'description' |
Definition at line 22 of file CartDiscountDraft.php.
const Commercetools\Api\Models\CartDiscount\CartDiscountDraft::FIELD_IS_ACTIVE = 'isActive' |
Definition at line 28 of file CartDiscountDraft.php.
const Commercetools\Api\Models\CartDiscount\CartDiscountDraft::FIELD_KEY = 'key' |
Definition at line 21 of file CartDiscountDraft.php.
const Commercetools\Api\Models\CartDiscount\CartDiscountDraft::FIELD_NAME = 'name' |
Definition at line 20 of file CartDiscountDraft.php.
const Commercetools\Api\Models\CartDiscount\CartDiscountDraft::FIELD_REQUIRES_DISCOUNT_CODE = 'requiresDiscountCode' |
Definition at line 31 of file CartDiscountDraft.php.
const Commercetools\Api\Models\CartDiscount\CartDiscountDraft::FIELD_SORT_ORDER = 'sortOrder' |
Definition at line 26 of file CartDiscountDraft.php.
const Commercetools\Api\Models\CartDiscount\CartDiscountDraft::FIELD_STACKING_MODE = 'stackingMode' |
Definition at line 32 of file CartDiscountDraft.php.
const Commercetools\Api\Models\CartDiscount\CartDiscountDraft::FIELD_STORES = 'stores' |
Definition at line 27 of file CartDiscountDraft.php.
const Commercetools\Api\Models\CartDiscount\CartDiscountDraft::FIELD_TARGET = 'target' |
Definition at line 25 of file CartDiscountDraft.php.
const Commercetools\Api\Models\CartDiscount\CartDiscountDraft::FIELD_VALID_FROM = 'validFrom' |
Definition at line 29 of file CartDiscountDraft.php.
const Commercetools\Api\Models\CartDiscount\CartDiscountDraft::FIELD_VALID_UNTIL = 'validUntil' |
Definition at line 30 of file CartDiscountDraft.php.
const Commercetools\Api\Models\CartDiscount\CartDiscountDraft::FIELD_VALUE = 'value' |
Definition at line 23 of file CartDiscountDraft.php.