PriceRule
+ Inheritance diagram for PriceRule:

Description

Public Properties

const ALLOCATE_ACROSS = 'across'
 
const ALLOCATE_EACH = 'each'
 
const CUSTOMER_SELECT_ALL = 'all'
 
const CUSTOMER_SELECT_CONDITION = 'prerequisite'
 
const DIR = 'price_rules'
 
const MAP
 
const TARGET_SELECT_ALL = 'all'
 
const TARGET_SELECT_ENTITLED = 'entitled'
 
const TARGET_TYPE_LINE_ITEM = 'line_item'
 
const TARGET_TYPE_SHIPPING_LINE = 'shipping_line'
 
const TYPE = 'price_rule'
 
const VALUE_FIXED = 'fixed'
 
const VALUE_PERCENT = 'percentage'
 
- Public Properties inherited from AbstractEntity
const DIR = ''
 All subclasses must redeclare this to match their REST directory (without container). More...
 
const TYPE = ''
 All subclasses must redeclare this to match their types. More...
 
- Public Properties inherited from Data
const MAP = []
 
const PATCH = []
 

Public Methods

magic int getAllocationLimit ()
 
magic string getAllocationMethod ()
 see the constants More...
 
magic string getCreatedAt ()
 
magic string getCustomerSelection ()
 see the constants More...
 
DiscountCode[] getDiscountCodes ()
 
magic string getEndsAt ()
 
magic string[] getEntitledCollectionIds ()
 
magic string[] getEntitledCountryIds ()
 
magic string[] getEntitledProductIds ()
 
magic string[] getEntitledVariantIds ()
 
null number getMaxShipping ()
 
null int getMinQuantity ()
 
null number getMinSubtotal ()
 
magic string[] getPrerequisiteCollectionIds ()
 
magic string[] getPrerequisiteCustomerIds ()
 
magic string[] getPrerequisiteProductIds ()
 
magic string[] getPrerequisiteSavedSearchIds ()
 
magic string[] getPrerequisiteVariantIds ()
 
magic string getStartsAt ()
 
magic string getTargetSelection ()
 see the constants More...
 
magic string getTargetType ()
 see the constants More...
 
magic string getTitle ()
 
magic string getUpdatedAt ()
 
magic string getUsageLimit ()
 
magic int getValue ()
 
magic string getValueType ()
 
magic bool hasEntitledCollectionIds ()
 
magic bool hasEntitledCountryIds ()
 
magic bool hasEntitledProductIds ()
 
magic bool hasEntitledVariantIds ()
 
magic bool hasPrerequisiteCollectionIds ()
 
magic bool hasPrerequisiteCustomerIds ()
 
magic bool hasPrerequisiteProductIds ()
 
magic bool hasPrerequisiteSavedSearchIds ()
 
magic bool hasPrerequisiteVariantIds ()
 
magic bool isOncePerCustomer ()
 
DiscountCode newDiscountCode ()
 
magic $this setAllocationLimit (int $limit)
 
magic $this setAllocationMethod (string $method)
 see the constants More...
 
magic $this setCustomerSelection (string $selection)
 see the constants More...
 
magic $this setEndsAt (string $iso8601)
 
magic $this setEntitledCollectionIds (string[] $ids)
 
magic $this setEntitledCountryIds (string[] $ids)
 
magic $this setEntitledProductIds (string[] $ids)
 
magic $this setEntitledVariantIds (string[] $ids)
 
$this setMaxShipping ($max)
 
$this setMinQuantity (?int $min)
 
$this setMinSubtotal ($min)
 
magic $this setOncePerCustomer (bool $once)
 
magic $this setPrerequisiteCollectionIds (string[] $ids)
 
magic $this setPrerequisiteCustomerIds (string[] $ids)
 
magic $this setPrerequisiteProductIds (string[] $ids)
 
magic $this setPrerequisiteSavedSearchIds (string[] $ids)
 
magic $this setPrerequisiteVariantIds (string[] $ids)
 
magic $this setStartsAt (string $iso8601)
 
magic $this setTargetSelection (string $selection)
 see the constants More...
 
magic $this setTargetType (string $type)
 see the constants More...
 
magic $this setTitle (string $title)
 
magic $this setUsageLimit (string $limit)
 
magic $this setValue (int $value)
 negative More...
 
magic $this setValueType (string $type)
 
- Public Methods inherited from AbstractEntity
string __toString ()
 
null string getId ()
 
string[] getPoolKeys ()
 
bool hasId ()
 
$this reload ()
 Fully reloads the entity from Shopify. More...
 
- Public Methods inherited from Data
mixed __call (string $method, array $args)
 
 __construct ($caller, array $data=[])
 
string serialize ()
 Dehydrated JSON encode. More...
 
array toArray ()
 
void unserialize ($serialized)
 

Additional Inherited Members

- Protected Properties inherited from Data
Api $api
 
Pool $pool
 
- Public Static Methods inherited from AbstractEntity
static null self load ($caller, string $id, array $query=[])
 
static self[] loadAll ($caller, string $path, array $query=[])
 
- Protected Methods inherited from AbstractEntity
null AbstractEntity _container ()
 The container/owner object, if any. More...
 
mixed _get (string $field)
 Lazy-loads missing fields. More...
 
void _onDelete ()
 
void _onSave ()
 
void _reload (string $field)
 
- Protected Methods inherited from Data
mixed _hydrate (string $class, $item)
 A factory that also hydrates / caches entities. More...
 
array _select ($subject, callable $filter,... $args)
 Magic method: selectField(callable $filter) More...
 
$this _setData (array $data)
 Clears all diffs and sets all data, hydrating mapped fields. More...
 
$this _setField (string $field, $value)
 Sets a value, hydrating if mapped, and clears the diff. More...
 

Properties

◆ MAP

const MAP
Initial value:
= [
'prerequisite_to_entitlement_quantity_ratio' => QuantityRatio::class
]

Methods

◆ getAllocationLimit()

magic int getAllocationLimit ( )
Returns
int

◆ getAllocationMethod()

magic string getAllocationMethod ( )

see the constants

Returns
string

◆ getCreatedAt()

magic string getCreatedAt ( )
Returns
string

◆ getCustomerSelection()

magic string getCustomerSelection ( )

see the constants

Returns
string

◆ getDiscountCodes()

DiscountCode [] getDiscountCodes ( )
Returns
DiscountCode[]

◆ getEndsAt()

magic string getEndsAt ( )
Returns
string

◆ getEntitledCollectionIds()

magic string [] getEntitledCollectionIds ( )
Returns
string[]

◆ getEntitledCountryIds()

magic string [] getEntitledCountryIds ( )
Returns
string[]

◆ getEntitledProductIds()

magic string [] getEntitledProductIds ( )
Returns
string[]

◆ getEntitledVariantIds()

magic string [] getEntitledVariantIds ( )
Returns
string[]

◆ getMaxShipping()

null number getMaxShipping ( )
Returns
null|number

◆ getMinQuantity()

null int getMinQuantity ( )
Returns
null|int

◆ getMinSubtotal()

null number getMinSubtotal ( )
Returns
null|number

◆ getPrerequisiteCollectionIds()

magic string [] getPrerequisiteCollectionIds ( )
Returns
string[]

◆ getPrerequisiteCustomerIds()

magic string [] getPrerequisiteCustomerIds ( )
Returns
string[]

◆ getPrerequisiteProductIds()

magic string [] getPrerequisiteProductIds ( )
Returns
string[]

◆ getPrerequisiteSavedSearchIds()

magic string [] getPrerequisiteSavedSearchIds ( )
Returns
string[]

◆ getPrerequisiteVariantIds()

magic string [] getPrerequisiteVariantIds ( )
Returns
string[]

◆ getStartsAt()

magic string getStartsAt ( )
Returns
string

◆ getTargetSelection()

magic string getTargetSelection ( )

see the constants

Returns
string

◆ getTargetType()

magic string getTargetType ( )

see the constants

Returns
string

◆ getTitle()

magic string getTitle ( )
Returns
string

◆ getUpdatedAt()

magic string getUpdatedAt ( )
Returns
string

◆ getUsageLimit()

magic string getUsageLimit ( )
Returns
string

◆ getValue()

magic int getValue ( )
Returns
int

◆ getValueType()

magic string getValueType ( )
Returns
string

◆ hasEntitledCollectionIds()

magic bool hasEntitledCollectionIds ( )
Returns
bool

◆ hasEntitledCountryIds()

magic bool hasEntitledCountryIds ( )
Returns
bool

◆ hasEntitledProductIds()

magic bool hasEntitledProductIds ( )
Returns
bool

◆ hasEntitledVariantIds()

magic bool hasEntitledVariantIds ( )
Returns
bool

◆ hasPrerequisiteCollectionIds()

magic bool hasPrerequisiteCollectionIds ( )
Returns
bool

◆ hasPrerequisiteCustomerIds()

magic bool hasPrerequisiteCustomerIds ( )
Returns
bool

◆ hasPrerequisiteProductIds()

magic bool hasPrerequisiteProductIds ( )
Returns
bool

◆ hasPrerequisiteSavedSearchIds()

magic bool hasPrerequisiteSavedSearchIds ( )
Returns
bool

◆ hasPrerequisiteVariantIds()

magic bool hasPrerequisiteVariantIds ( )
Returns
bool

◆ isOncePerCustomer()

magic bool isOncePerCustomer ( )
Returns
bool

◆ newDiscountCode()

DiscountCode newDiscountCode ( )
Returns
DiscountCode

◆ setAllocationLimit()

magic $this setAllocationLimit ( int  $limit)
Returns
$this

◆ setAllocationMethod()

magic $this setAllocationMethod ( string  $method)

see the constants

Returns
$this

◆ setCustomerSelection()

magic $this setCustomerSelection ( string  $selection)

see the constants

Returns
$this

◆ setEndsAt()

magic $this setEndsAt ( string  $iso8601)
Returns
$this

◆ setEntitledCollectionIds()

magic $this setEntitledCollectionIds ( string[]  $ids)
Returns
$this

◆ setEntitledCountryIds()

magic $this setEntitledCountryIds ( string[]  $ids)
Returns
$this

◆ setEntitledProductIds()

magic $this setEntitledProductIds ( string[]  $ids)
Returns
$this

◆ setEntitledVariantIds()

magic $this setEntitledVariantIds ( string[]  $ids)
Returns
$this

◆ setMaxShipping()

$this setMaxShipping (   $max)
Parameters
null | number$max
Returns
$this

◆ setMinQuantity()

$this setMinQuantity ( ?int  $min)
Parameters
null | int$min
Returns
$this

◆ setMinSubtotal()

$this setMinSubtotal (   $min)
Parameters
null | number$min
Returns
$this

◆ setOncePerCustomer()

magic $this setOncePerCustomer ( bool  $once)
Returns
$this

◆ setPrerequisiteCollectionIds()

magic $this setPrerequisiteCollectionIds ( string[]  $ids)
Returns
$this

◆ setPrerequisiteCustomerIds()

magic $this setPrerequisiteCustomerIds ( string[]  $ids)
Returns
$this

◆ setPrerequisiteProductIds()

magic $this setPrerequisiteProductIds ( string[]  $ids)
Returns
$this

◆ setPrerequisiteSavedSearchIds()

magic $this setPrerequisiteSavedSearchIds ( string[]  $ids)
Returns
$this

◆ setPrerequisiteVariantIds()

magic $this setPrerequisiteVariantIds ( string[]  $ids)
Returns
$this

◆ setStartsAt()

magic $this setStartsAt ( string  $iso8601)
Returns
$this

◆ setTargetSelection()

magic $this setTargetSelection ( string  $selection)

see the constants

Returns
$this

◆ setTargetType()

magic $this setTargetType ( string  $type)

see the constants

Returns
$this

◆ setTitle()

magic $this setTitle ( string  $title)
Returns
$this

◆ setUsageLimit()

magic $this setUsageLimit ( string  $limit)
Returns
$this

◆ setValue()

magic $this setValue ( int  $value)

negative

Returns
$this

◆ setValueType()

magic $this setValueType ( string  $type)
Returns
$this