dw.order
Class CouponLineItem
The CouponLineItem class is used to store redeemed coupons in the Basket.
Properties
applied
:
boolean
(Read Only)
Identifies if the coupon is currently applied in the basket. A coupon
line is applied if there exists at least one price adjustment related
to the coupon line item.
basedOnCampaign
:
boolean
(Read Only)
Returns true if the line item represents a coupon of a campaign. If the coupon line item represents a custom
coupon code, the method returns false.
bonusDiscountLineItems
:
Collection
(Read Only)
The bonus discount line items of the line item container triggered
by this coupon.
couponCode
:
String
(Read Only)
The coupon code.
priceAdjustments
:
Collection
(Read Only)
The price adjustments of the line item container triggered
by this coupon.
promotion
:
Promotion
(Read Only)
The promotion related to the coupon line item.
Deprecated:
A coupon code and its coupon can be associated with multiple promotions. Therefore, this method is not appropriate anymore. For backward-compatibility, the method returns one of the promotions associated with the coupon code.
promotionID
:
String
(Read Only)
The id of the related promotion.
Deprecated:
A coupon code and it's coupon can be associated with multiple promotions. Therefore, this method is not appropriate anymore. For backward-compatibility, the method returns the ID of one of the promotions associated with the coupon code.
statusCode
:
String
(Read Only)
This method provides a detailed error status in case the coupon code of
this coupon line item instance became invalid.
Constructor Summary
This class does not have a constructor, so you cannot create it directly.
Method Summary
associatePriceAdjustment(priceAdjustment
:
PriceAdjustment)
:
void
Associates the specified price adjustment with the coupon line item.
getBonusDiscountLineItems()
:
Collection
Returns the bonus discount line items of the line item container triggered by this coupon.
getCouponCode()
:
String
Returns the coupon code.
getPriceAdjustments()
:
Collection
Returns the price adjustments of the line item container triggered by this coupon.
getPromotion()
:
Promotion
Returns the promotion related to the coupon line item.
getPromotionID()
:
String
Returns the id of the related promotion.
getStatusCode()
:
String
This method provides a detailed error status in case the coupon code of this coupon line item instance became invalid.
isApplied()
:
boolean
Identifies if the coupon is currently applied in the basket.
isBasedOnCampaign()
:
boolean
Returns true if the line item represents a coupon of a campaign.
isValid()
:
boolean
Allows to check whether the coupon code of this coupon line item instance is valid.
Methods inherited from class
ExtensibleObject
Salesforce Commerce Cloud Courses
Salesforce B2C Commerce Developer - Certification Tests
Why risk failing the SFCC exam? Get 180 real questions, killer content, and everything you need to crush the Salesforce B2C Commerce Developer certification.
Becoming a Salesforce B2C Commerce Developer is your ticket to higher salaries, better job opportunities, and the credibility to stand out from the competition. But let's be honestβpassing the certification exam isn't easy. That's where we come in.
Becoming a Salesforce B2C Commerce Developer is your ticket to higher salaries, better job opportunities, and the credibility to stand out from the competition. But let's be honestβpassing the certification exam isn't easy. That's where we come in.
Salesforce Javascript Developer I - Certification Tests
Not just another prep courseβthis is your shortcut to passing. Master JavaScript for Salesforce and go from 'hoping to pass' to knowing you will. Ready to start?
This isn't just another prep courseβit's your shortcut to mastering the skills and confidence you need to pass. With multiple practice tests covering every section and a final exam simulation designed to mirror the real thing, you'll feel like you've already aced it before test day.
This isn't just another prep courseβit's your shortcut to mastering the skills and confidence you need to pass. With multiple practice tests covering every section and a final exam simulation designed to mirror the real thing, you'll feel like you've already aced it before test day.
Salesforce B2C Commerce Architect - Certification Tests
Think the Developer exam was hard? Welcome to the next level.
The Salesforce B2C Commerce Architect certification is a whole different gameβcomplex solutions, elevated difficulty, and skills that set you apart in the eCommerce industry. That's why we're including 11 downloadable PDF guides, packed with best practices and strategies to help you prepare for the exam and build confidence in every topic.
The Salesforce B2C Commerce Architect certification is a whole different gameβcomplex solutions, elevated difficulty, and skills that set you apart in the eCommerce industry. That's why we're including 11 downloadable PDF guides, packed with best practices and strategies to help you prepare for the exam and build confidence in every topic.
Methods inherited from class
PersistentObject
Methods inherited from class
Object
assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values
Method Detail
associatePriceAdjustment
associatePriceAdjustment(priceAdjustment
:
PriceAdjustment)
:
void
Associates the specified price adjustment with the coupon line item. This method is only applicable if used for
price adjustments and coupon line items NOT based on B2C Commerce campaigns.
Parameters:
priceAdjustment
-
Price adjustment to be associated with coupon line item.
getBonusDiscountLineItems
getBonusDiscountLineItems()
:
Collection
Returns the bonus discount line items of the line item container triggered
by this coupon.
Returns:
Price adjustments triggered by the coupon
getPriceAdjustments
getPriceAdjustments()
:
Collection
Returns the price adjustments of the line item container triggered
by this coupon.
Returns:
Price adjustments triggered by the coupon
getPromotion
getPromotion()
:
Promotion
Returns the promotion related to the coupon line item.
Deprecated:
A coupon code and its coupon can be associated with multiple promotions. Therefore, this method is not appropriate anymore. For backward-compatibility, the method returns one of the promotions associated with the coupon code.
Returns:
Promotion related to coupon represented by line item
getPromotionID
getPromotionID()
:
String
Returns the id of the related promotion.
Deprecated:
A coupon code and it's coupon can be associated with multiple promotions. Therefore, this method is not appropriate anymore. For backward-compatibility, the method returns the ID of one of the promotions associated with the coupon code.
Returns:
the id of the related promotion.
getStatusCode
getStatusCode()
:
String
This method provides a detailed error status in case the coupon code of
this coupon line item instance became invalid.
Returns:
Returns APPLIED if coupon is applied, and otherwise one of the codes defined in CouponStatusCodes
isApplied
isApplied()
:
boolean
Identifies if the coupon is currently applied in the basket. A coupon
line is applied if there exists at least one price adjustment related
to the coupon line item.
Returns:
true if the coupon is currently applied in the basket.
isBasedOnCampaign
isBasedOnCampaign()
:
boolean
Returns true if the line item represents a coupon of a campaign. If the coupon line item represents a custom
coupon code, the method returns false.