CartExtension.CouponChange

Object that may contain data about a changed coupon (CartAdjustmentBasis), that can be used to optimize the business logic in custom calculators.

Constructors 

global CouponChange(OptionalCartAdjustmentBasis optionalCartAdjustmentBasis) 

Constructor for CouponChange object to be used only in Apex unit test. All arguments are required.

Parameters 

ParamDescription
OptionalCartAdjustmentBasisProvides the changed adjustment basis

Methods 

global OptionalCartAdjustmentBasis getChangedAdjustmentBasis() 

Get the changed CartAdjustmentBasis

Returns 

TypeDescription
OptionalCartAdjustmentBasisOptionalCartAdjustmentBasis

global Boolean isAdded() 

Checks whether a coupon has been added

Returns 

TypeDescription
BooleanBoolean

global Boolean isRemoved() 

Checks whether a coupon has been removed

Returns 

TypeDescription
BooleanBoolean

Classes 

Builder 

Builds an instance of CouponChange. This should only be used for Apex unit testing.

Constructors 

global Builder() 


Methods 

global Builder withChangedAdjustmentBasis(OptionalCartAdjustmentBasis optionalCartAdjustmentBasis) 

global Builder withAdded(boolean isAdded) 

global Builder withRemoved(boolean isRemoved) 

global CouponChange build() 



Newer Version Available

This content describes an older version of this product. View Latest

DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!