class Adjustment implements AdjustmentInterface, PrimaryKeyInterface

Class Adjustment

Properties

protected int $id
protected Order $order
protected OrderItem $orderItem
protected string $label
protected string $description
protected float $amount
protected bool $neutral
protected bool $locked
protected bool $isFixedValue
protected DateTime $createdAt
protected DateTime $updatedAt

Methods

integer
getId()

Get id

getAdjustable()

Get adjustment subject.

setAdjustable(AdjustableInterface $adjustable = null)

Set adjustable.

string
getLabel()

Get the label.

setLabel(string $label)

Set label.

string
getDescription()

Get short description of adjustment.

setDescription(string $description)

Set short description of adjustment.

int
getAmount()

Get the adjustment amount.

setAmount(int $amount)

Set the amount.

bool
isNeutral()

Is adjustment neutral?

setNeutral(bool $neutral)

Modify the neutrality of the adjustment.

bool
isLocked()

Is adjustment locked?

lock()

Lock the adjustment.

unlock()

Unlock the adjustment.

bool
isCharge()

Is charge?

bool
isCredit()

Is credit?

getCreatedAt()

{@inheritdoc}

setCreatedAt(DateTime $createdAt)

{@inheritdoc}

getUpdatedAt()

{@inheritdoc}

setUpdatedAt(DateTime $updatedAt)

{@inheritdoc}

bool
isFixedValue()

No description

setIsFixedValue(bool $isFixedValue)

No description

string
serialize()

(PHP 5 >= 5.1.0)
String representation of object

void
unserialize(string $serialized)

(PHP 5 >= 5.1.0)
Constructs the object

Details

at line 145
integer getId()

Get id

Return Value

integer

at line 154
AdjustableInterface getAdjustable()

Get adjustment subject.

Return Value

AdjustableInterface

at line 170
setAdjustable(AdjustableInterface $adjustable = null)

Set adjustable.

Parameters

AdjustableInterface $adjustable

at line 188
string getLabel()

Get the label.

Return Value

string

at line 196
setLabel(string $label)

Set label.

Parameters

string $label

at line 206
string getDescription()

Get short description of adjustment.

Return Value

string

at line 214
setDescription(string $description)

Set short description of adjustment.

Parameters

string $description

at line 224
int getAmount()

Get the adjustment amount.

Return Value

int

at line 232
setAmount(int $amount)

Set the amount.

Parameters

int $amount

at line 242
bool isNeutral()

Is adjustment neutral?

Return Value

bool

at line 250
setNeutral(bool $neutral)

Modify the neutrality of the adjustment.

Parameters

bool $neutral

at line 260
bool isLocked()

Is adjustment locked?

Return Value

bool

at line 268
lock()

Lock the adjustment.

at line 278
unlock()

Unlock the adjustment.

at line 288
bool isCharge()

Is charge?

Adjustments with amount < 0 are called "charges".

Return Value

bool

at line 296
bool isCredit()

Is credit?

Adjustments with amount > 0 are called "credits".

Return Value

bool

at line 305
getCreatedAt()

{@inheritdoc}

at line 313
setCreatedAt(DateTime $createdAt)

{@inheritdoc}

Parameters

DateTime $createdAt

at line 323
getUpdatedAt()

{@inheritdoc}

at line 331
setUpdatedAt(DateTime $updatedAt)

{@inheritdoc}

Parameters

DateTime $updatedAt

at line 341
bool isFixedValue()

Return Value

bool

at line 351
Adjustment setIsFixedValue(bool $isFixedValue)

Parameters

bool $isFixedValue

Return Value

Adjustment

at line 366
string serialize()

(PHP 5 >= 5.1.0)
String representation of object

Return Value

string the string representation of the object or null

at line 391
void unserialize(string $serialized)

(PHP 5 >= 5.1.0)
Constructs the object

Parameters

string $serialized The string representation of the object.

Return Value

void