commercetools-sdk-php-v2  master
The platform, import-api and ml-api PHP sdks generated from our api reference.
Public Member Functions | Public Attributes | List of all members
Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft Interface Reference
Inheritance diagram for Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft:
Commercetools\Base\JsonObject Commercetools\Api\Models\ProductDiscount\ProductDiscountDraftModel

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)
 

Detailed Description

Definition at line 16 of file ProductDiscountDraft.php.

Member Function Documentation

◆ getDescription()

Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::getDescription ( )

Description of the ProductDiscount.

Returns
null|LocalizedString

Implemented in Commercetools\Api\Models\ProductDiscount\ProductDiscountDraftModel.

◆ getIsActive()

Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::getIsActive ( )

Set to true to activate the ProductDiscount, set to false to deactivate it (even though the predicate matches).

Returns
null|bool

Implemented in Commercetools\Api\Models\ProductDiscount\ProductDiscountDraftModel.

◆ getKey()

Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::getKey ( )

User-defined unique identifier for the ProductDiscount.

Returns
null|string

Implemented in Commercetools\Api\Models\ProductDiscount\ProductDiscountDraftModel.

◆ getName()

Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::getName ( )

Name of the ProductDiscount.

Returns
null|LocalizedString

Implemented in Commercetools\Api\Models\ProductDiscount\ProductDiscountDraftModel.

◆ getPredicate()

Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::getPredicate ( )

◆ getSortOrder()

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.

Returns
null|string

Implemented in Commercetools\Api\Models\ProductDiscount\ProductDiscountDraftModel.

◆ getValidFrom()

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.

Returns
null|DateTimeImmutable

Implemented in Commercetools\Api\Models\ProductDiscount\ProductDiscountDraftModel.

◆ getValidUntil()

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.

Returns
null|DateTimeImmutable

Implemented in Commercetools\Api\Models\ProductDiscount\ProductDiscountDraftModel.

◆ getValue()

Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::getValue ( )

Type of Discount and its corresponding value.

Returns
null|ProductDiscountValueDraft

Implemented in Commercetools\Api\Models\ProductDiscount\ProductDiscountDraftModel.

◆ setDescription()

Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::setDescription ( ?LocalizedString  $description)
Parameters
?LocalizedString$description

Implemented in Commercetools\Api\Models\ProductDiscount\ProductDiscountDraftModel.

◆ setIsActive()

Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::setIsActive ( ?bool  $isActive)
Parameters
?bool$isActive

Implemented in Commercetools\Api\Models\ProductDiscount\ProductDiscountDraftModel.

◆ setKey()

Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::setKey ( ?string  $key)

◆ setName()

Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::setName ( ?LocalizedString  $name)
Parameters
?LocalizedString$name

Implemented in Commercetools\Api\Models\ProductDiscount\ProductDiscountDraftModel.

◆ setPredicate()

Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::setPredicate ( ?string  $predicate)
Parameters
?string$predicate

Implemented in Commercetools\Api\Models\ProductDiscount\ProductDiscountDraftModel.

◆ setSortOrder()

Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::setSortOrder ( ?string  $sortOrder)
Parameters
?string$sortOrder

Implemented in Commercetools\Api\Models\ProductDiscount\ProductDiscountDraftModel.

◆ setValidFrom()

Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::setValidFrom ( ?DateTimeImmutable  $validFrom)
Parameters
?DateTimeImmutable$validFrom

Implemented in Commercetools\Api\Models\ProductDiscount\ProductDiscountDraftModel.

◆ setValidUntil()

Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::setValidUntil ( ?DateTimeImmutable  $validUntil)
Parameters
?DateTimeImmutable$validUntil

Implemented in Commercetools\Api\Models\ProductDiscount\ProductDiscountDraftModel.

◆ setValue()

Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::setValue ( ?ProductDiscountValueDraft  $value)
Parameters
?ProductDiscountValueDraft$value

Implemented in Commercetools\Api\Models\ProductDiscount\ProductDiscountDraftModel.

Member Data Documentation

◆ FIELD_DESCRIPTION

const Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::FIELD_DESCRIPTION = 'description'

Definition at line 20 of file ProductDiscountDraft.php.

◆ FIELD_IS_ACTIVE

const Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::FIELD_IS_ACTIVE = 'isActive'

Definition at line 24 of file ProductDiscountDraft.php.

◆ FIELD_KEY

const Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::FIELD_KEY = 'key'

Definition at line 19 of file ProductDiscountDraft.php.

◆ FIELD_NAME

const Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::FIELD_NAME = 'name'

Definition at line 18 of file ProductDiscountDraft.php.

◆ FIELD_PREDICATE

const Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::FIELD_PREDICATE = 'predicate'

Definition at line 22 of file ProductDiscountDraft.php.

◆ FIELD_SORT_ORDER

const Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::FIELD_SORT_ORDER = 'sortOrder'

Definition at line 23 of file ProductDiscountDraft.php.

◆ FIELD_VALID_FROM

const Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::FIELD_VALID_FROM = 'validFrom'

Definition at line 25 of file ProductDiscountDraft.php.

◆ FIELD_VALID_UNTIL

const Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::FIELD_VALID_UNTIL = 'validUntil'

Definition at line 26 of file ProductDiscountDraft.php.

◆ FIELD_VALUE

const Commercetools\Api\Models\ProductDiscount\ProductDiscountDraft::FIELD_VALUE = 'value'

Definition at line 21 of file ProductDiscountDraft.php.


The documentation for this interface was generated from the following file: