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 () | |
getPredicate () | |
getSortOrder () | |
getIsActive () | |
getValidFrom () | |
getValidUntil () | |
setName (?LocalizedString $name) | |
setKey (?string $key) | |
setDescription (?LocalizedString $description) | |
setValue (?ProductDiscountValueDraft $value) | |
setPredicate (?string $predicate) | |
setSortOrder (?string $sortOrder) | |
setIsActive (?bool $isActive) | |
setValidFrom (?DateTimeImmutable $validFrom) | |
setValidUntil (?DateTimeImmutable $validUntil) | |
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_PREDICATE = 'predicate' |
const | FIELD_SORT_ORDER = 'sortOrder' |
const | FIELD_IS_ACTIVE = 'isActive' |
const | FIELD_VALID_FROM = 'validFrom' |
const | FIELD_VALID_UNTIL = 'validUntil' |
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 16 of file ProductDiscountDraft.php.
Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::getDescription | ( | ) |
Description of the ProductDiscount.
Implemented in Commercetools\Api\Models\ProductDiscount\ProductDiscountDraftModel.
Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::getIsActive | ( | ) |
Set to true
to activate the ProductDiscount, set to false
to deactivate it (even though the predicate
matches).
Implemented in Commercetools\Api\Models\ProductDiscount\ProductDiscountDraftModel.
Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::getKey | ( | ) |
User-defined unique identifier for the ProductDiscount.
Implemented in Commercetools\Api\Models\ProductDiscount\ProductDiscountDraftModel.
Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::getName | ( | ) |
Name of the ProductDiscount.
Implemented in Commercetools\Api\Models\ProductDiscount\ProductDiscountDraftModel.
Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::getPredicate | ( | ) |
Valid ProductDiscount predicate.
Implemented in Commercetools\Api\Models\ProductDiscount\ProductDiscountDraftModel.
Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::getSortOrder | ( | ) |
Decimal value between 0 and 1 (passed as String literal) that defines the order of ProductDiscounts to apply in case more than one is applicable and active. A ProductDiscount with a higher sortOrder
is prioritized. The value must be unique among all ProductDiscounts in the Project.
Implemented in Commercetools\Api\Models\ProductDiscount\ProductDiscountDraftModel.
Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::getValidFrom | ( | ) |
Date and time (UTC) from which the Discount is effective. Take Eventual Consistency into account for calculated discount values.
Implemented in Commercetools\Api\Models\ProductDiscount\ProductDiscountDraftModel.
Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::getValidUntil | ( | ) |
Date and time (UTC) until which the Discount is effective. Take Eventual Consistency into account for calculated undiscounted values.
Implemented in Commercetools\Api\Models\ProductDiscount\ProductDiscountDraftModel.
Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::getValue | ( | ) |
Type of Discount and its corresponding value.
Implemented in Commercetools\Api\Models\ProductDiscount\ProductDiscountDraftModel.
Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::setDescription | ( | ?LocalizedString | $description | ) |
?LocalizedString | $description |
Implemented in Commercetools\Api\Models\ProductDiscount\ProductDiscountDraftModel.
Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::setIsActive | ( | ?bool | $isActive | ) |
?bool | $isActive |
Implemented in Commercetools\Api\Models\ProductDiscount\ProductDiscountDraftModel.
Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::setKey | ( | ?string | $key | ) |
?string | $key |
Implemented in Commercetools\Api\Models\ProductDiscount\ProductDiscountDraftModel.
Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::setName | ( | ?LocalizedString | $name | ) |
?LocalizedString | $name |
Implemented in Commercetools\Api\Models\ProductDiscount\ProductDiscountDraftModel.
Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::setPredicate | ( | ?string | $predicate | ) |
?string | $predicate |
Implemented in Commercetools\Api\Models\ProductDiscount\ProductDiscountDraftModel.
Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::setSortOrder | ( | ?string | $sortOrder | ) |
?string | $sortOrder |
Implemented in Commercetools\Api\Models\ProductDiscount\ProductDiscountDraftModel.
Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::setValidFrom | ( | ?DateTimeImmutable | $validFrom | ) |
?DateTimeImmutable | $validFrom |
Implemented in Commercetools\Api\Models\ProductDiscount\ProductDiscountDraftModel.
Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::setValidUntil | ( | ?DateTimeImmutable | $validUntil | ) |
?DateTimeImmutable | $validUntil |
Implemented in Commercetools\Api\Models\ProductDiscount\ProductDiscountDraftModel.
Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::setValue | ( | ?ProductDiscountValueDraft | $value | ) |
?ProductDiscountValueDraft | $value |
Implemented in Commercetools\Api\Models\ProductDiscount\ProductDiscountDraftModel.
const Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::FIELD_DESCRIPTION = 'description' |
Definition at line 20 of file ProductDiscountDraft.php.
const Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::FIELD_IS_ACTIVE = 'isActive' |
Definition at line 24 of file ProductDiscountDraft.php.
const Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::FIELD_KEY = 'key' |
Definition at line 19 of file ProductDiscountDraft.php.
const Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::FIELD_NAME = 'name' |
Definition at line 18 of file ProductDiscountDraft.php.
const Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::FIELD_PREDICATE = 'predicate' |
Definition at line 22 of file ProductDiscountDraft.php.
const Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::FIELD_SORT_ORDER = 'sortOrder' |
Definition at line 23 of file ProductDiscountDraft.php.
const Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::FIELD_VALID_FROM = 'validFrom' |
Definition at line 25 of file ProductDiscountDraft.php.
const Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::FIELD_VALID_UNTIL = 'validUntil' |
Definition at line 26 of file ProductDiscountDraft.php.
const Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::FIELD_VALUE = 'value' |
Definition at line 21 of file ProductDiscountDraft.php.