AppliedDiscount
+ Inheritance diagram for AppliedDiscount:

Description

A discount application.

See also
Order
Immutable:
Each instance has a permanent state.

Public Properties

const ALLOCATE_ACROSS = 'across'
 
const ALLOCATE_EACH = 'each'
 
const ALLOCATE_ONE = 'one'
 
const TARGET_SELECT_ALL = 'all'
 
const TARGET_SELECT_ENTITLED = 'entitled'
 
const TARGET_SELECT_EXPLICIT = 'explicit'
 
const TARGET_TYPE_LINE_ITEM = 'line_item'
 
const TARGET_TYPE_SHIPPING_LINE = 'shipping_line'
 
const TYPE_DISCOUNT_CODE = 'discount_code'
 
const TYPE_SCRIPT = 'script'
 
const VALUE_TYPE_FIXED_AMOUNT = 'fixed_amount'
 
const VALUE_TYPE_PERCENTAGE = 'percentage'
 
- Public Properties inherited from Data
const MAP = []
 
const PATCH = []
 

Public Methods

magic string getAllocationMethod ()
 
magic string getCode ()
 
magic string getDescription ()
 
magic string getTargetSelection ()
 
magic string getTargetType ()
 
magic string getTitle ()
 
magic string getType ()
 
magic number getValue ()
 
magic string getValueType ()
 
- 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
 
- 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...
 

Methods

◆ getAllocationMethod()

magic string getAllocationMethod ( )
Returns
string

◆ getCode()

magic string getCode ( )
Returns
string

◆ getDescription()

magic string getDescription ( )
Returns
string

◆ getTargetSelection()

magic string getTargetSelection ( )
Returns
string

◆ getTargetType()

magic string getTargetType ( )
Returns
string

◆ getTitle()

magic string getTitle ( )
Returns
string

◆ getType()

magic string getType ( )
Returns
string

◆ getValue()

magic number getValue ( )
Returns
number

◆ getValueType()

magic string getValueType ( )
Returns
string