CartExtension.CartItem

This Apex object represents an in-memory CartItem record and its relationships with other records. All formula and roll-up summary standard fields are updated at runtime.
Loading and saving this object is not possible in Apex but is done by Salesforce.
See Object Reference: CartItem

Constructors 

global CartItem(SalesItemTypeEnum salesItemType, CartDeliveryGroup cartDeliveryGroup, String name) 

Constructor for CartItem object. All arguments are required.

Parameters 

ParamDescription
salesItemTypeInitial value for CartItem.Type.
cartDeliveryGroupInitial CartExtension.CartDeliveryGroup object related to this object. Its ID will be saved in CartItem.CartDeliveryGroupId.
nameInitial value for CartItem.Name.

Methods 

global CartDeliveryGroup getCartDeliveryGroup() 

Get the CartExtension.CartDeliveryGroup object whose ID was saved in CartItem.Id.

Returns 

TypeDescription
CartDeliveryGroupCartExtension.CartDeliveryGroup

global void setCartDeliveryGroup(CartDeliveryGroup cartDeliveryGroup) 

Set the related CartExtension.CartDeliveryGroup object whose ID is stored in CartItem.Id on save.

Returns 

TypeDescription
voidCartExtension.CartDeliveryGroup

global SalesItemTypeEnum getType() 

Get CartItem.Type.

Returns 

TypeDescription
SalesItemTypeEnumCartExtension.SalesItemTypeEnum

global String getName() 

Get CartItem.Name.

Returns 

TypeDescription
String

global void setName(String name) 

Set CartItem.Name.

Returns 

TypeDescription
void

global ID getProduct2Id() 

Get CartItem.Product2Id.

Returns 

TypeDescription
ID

global void setProduct2Id(ID productId) 

Set CartItem.Product2Id.

Returns 

TypeDescription
void

global String getSku() 

Get CartItem.Sku.

Returns 

TypeDescription
String

global void setSku(String sku) 

Set CartItem.Sku.

Returns 

TypeDescription
void

global Decimal getQuantity() 

Get CartItem.Quantity.

Returns 

TypeDescription
Decimal

global void setQuantity(Decimal quantity) 

Set CartItem.Quantity.

Returns 

TypeDescription
void

global Decimal getListPrice() 

Get CartItem.ListPrice.

Returns 

TypeDescription
Decimal

global void setListPrice(Decimal listPrice) 

Get CartItem.ListPrice.

Returns 

TypeDescription
void

global Decimal getSalesPrice() 

Get CartItem.SalesPrice.

Returns 

TypeDescription
Decimal

global void setSalesPrice(Decimal salesPrice) 

Set CartItem.SalesPrice.

Returns 

TypeDescription
void

global Decimal getUnitAdjustedPrice() 

Get CartItem.UnitAdjustedPrice.

Returns 

TypeDescription
Decimal

global void setUnitAdjustedPrice(Decimal unitAdjustedPrice) 

Set CartItem.UnitAdjustedPrice.

Returns 

TypeDescription
void

global void setUnitItemAdjustmentAmount(Decimal unitItemAdjustmentAmount) 

Set CartItem.UnitItemAdjustmentAmount.

Returns 

TypeDescription
void

global Decimal getUnitItemAdjustmentAmount() 

Get CartItem.UnitItemAdjustmentAmount.

Returns 

TypeDescription
Decimal

global void setUnitAdjustedPriceWithItemAdj(Decimal unitAdjustedPriceWithItemAdj) 

Set CartItem.UnitAdjustedPriceWithItemAdj.

Returns 

TypeDescription
void

global Decimal getUnitAdjustedPriceWithItemAdj() 

Get CartItem.UnitAdjustedPriceWithItemAdj.

Returns 

TypeDescription
Decimal

global void setTotalListPrice(Decimal totalListPrice) 

Set CartItem.TotalListPrice.

Returns 

TypeDescription
void

global Decimal getTotalListPrice() 

Get CartItem.TotalListPrice.

Returns 

TypeDescription
Decimal

global Decimal getTotalPrice() 

Get CartItem.TotalPrice.

Returns 

TypeDescription
Decimal

global void setTotalPrice(Decimal totalPrice) 

Set CartItem.TotalPrice.

Returns 

TypeDescription
void

global Decimal getNetUnitPrice() 

Get CartItem.NetUnitPrice.

Returns 

TypeDescription
Decimal

global void setNetUnitPrice(Decimal netUnitPrice) 

Set CartItem.NetUnitPrice.

Returns 

TypeDescription
void

global Decimal getGrossUnitPrice() 

Get CartItem.GrossUnitPrice.

Returns 

TypeDescription
Decimal

global void setGrossUnitPrice(Decimal grossUnitPrice) 

Set CartItem.GrossUnitPrice.

Returns 

TypeDescription
void

global Decimal getTotalLineTaxAmount() 

Get CartItem.TotalLineTaxAmount.

Returns 

TypeDescription
Decimal

global Decimal getItemizedAdjustmentAmount() 

Get CartItem.ItemizedAdjustmentAmount.

Returns 

TypeDescription
Decimal

global Decimal getDistributedAdjustmentAmount() 

Get CartItem.DistributedAdjustmentAmount.

Returns 

TypeDescription
Decimal

global Decimal getAdjustmentAmount() 

Get CartItem.AdjustmentAmount.

Returns 

TypeDescription
Decimal

global void setAdjustmentAmount(Decimal adjustmentAmount) 

Set CartItem.AdjustmentAmount.

Returns 

TypeDescription
void

global void setTotalPromoAdjustmentAmount(Decimal totalPromoAdjustmentAmount) 

Set CartItem.TotalPromoAdjustmentAmount.

Returns 

TypeDescription
void

global Decimal getTotalPromoAdjustmentAmount() 

Get CartItem.TotalPromoAdjustmentAmount.

Returns 

TypeDescription
Decimal

global Decimal getTotalTaxAmount() 

Get CartItem.TotalTaxAmount.

Returns 

TypeDescription
Decimal

global Decimal getTotalLineAmount() 

Get CartItem.TotalLineAmount.

Returns 

TypeDescription
Decimal

global void setTotalLineAmount(Decimal totalLineAmount) 

Set CartItem.TotalLineAmount.

Returns 

TypeDescription
void

global Decimal getTotalAmount() 

Get CartItem.TotalAmount.

Returns 

TypeDescription
Decimal

global Decimal getItemizedAdjustmentTaxAmount() 

Get CartItem.ItemizedAdjustmentTaxAmount.

Returns 

TypeDescription
Decimal

global Decimal getDistributedAdjustmentTaxAmount() 

Get CartItem.DistributedAdjustmentTaxAmount.

Returns 

TypeDescription
Decimal

global Decimal getAdjustmentTaxAmount() 

Get CartItem.AdjustmentTaxAmount.

Returns 

TypeDescription
Decimal

global void setAdjustmentTaxAmount(Decimal adjustmentTaxAmount) 

Set CartItem.AdjustmentTaxAmount.

Returns 

TypeDescription
void

global Decimal getTotalPriceAfterAllAdjustments() 

Get CartItem.TotalPriceAfterAllAdjustments.

Returns 

TypeDescription
Decimal

global void setTotalPriceAfterAllAdjustments(Decimal totalPriceAfterAllAdjustments) 

Set CartItem.TotalPriceAfterAllAdjustments.

Returns 

TypeDescription
void

global Decimal getUnitAdjustmentAmount() 

Get CartItem.UnitAdjustmentAmount.

Returns 

TypeDescription
Decimal

global void setUnitAdjustmentAmount(Decimal unitAdjustmentAmount) 

Set CartItem.UnitAdjustmentAmount.

Returns 

TypeDescription
void

global Decimal getTotalAdjustmentAmount() 

Get CartItem.TotalAdjustmentAmount.

Returns 

TypeDescription
Decimal

global void setTotalAdjustmentAmount(Decimal totalAdjustmentAmount) 

Set CartItem.TotalAdjustmentAmount.

Returns 

TypeDescription
void

global CartItemPriceAdjustmentList getCartItemPriceAdjustments() 

Get all related CartExtension.CartItemPriceAdjustment objects.

Returns 

TypeDescription
CartItemPriceAdjustmentListCartExtension.CartItemPriceAdjustmentList

global CartTaxList getCartTaxes() 

Get all related CartExtension.CartTax objects.

Returns 

TypeDescription
CartTaxListCartExtension.CartTaxList

global Decimal getTotalLineNetAmount() 

Get CartItem.TotalLineNetAmount.

Returns 

TypeDescription
Decimal

global Decimal getTotalLineGrossAmount() 

Get CartItem.TotalLineGrossAmount.

Returns 

TypeDescription
Decimal

global ID getProductSellingModelId() 

Get CartItem.ProductSellingModelId.

Returns 

TypeDescription
ID

global Integer getSubscriptionTerm() 

Get CartItem.SubscriptionTerm.

Returns 

TypeDescription
Integer

global BillingFrequencyEnum getBillingFrequency() 

Get CartItem.BillingFrequency.

Returns 

TypeDescription
BillingFrequencyEnumCartExtension.BillingFrequencyEnum

global void setBillingFrequency(BillingFrequencyEnum billingFrequency) 

Set CartItem.BillingFrequency.

Returns 

TypeDescription
void

global Decimal getPricingTermCount() 

Get CartItem.PricingTermCount.

Returns 

TypeDescription
Decimal

global void setPricingTermCount(Decimal pricingTermCount) 

Set CartItem.PricingTermCount.

Returns 

TypeDescription
void

global ID getPricebookEntryId() 

Get CartItem.PricebookEntryId.

Returns 

TypeDescription
ID

global void setPricebookEntryId(ID pricebookEntryId) 

Set CartItem.PricebookEntryId.

Returns 

TypeDescription
void

global ID getProrationPolicyId() 

Get CartItem.ProrationPolicyId.

Returns 

TypeDescription
ID

global void setProrationPolicyId(ID prorationPolicyId) 

Set CartItem.ProrationPolicyId.

Returns 

TypeDescription
void

global SellingModelType getSellingModelType() 

Get CartItem.SellingModelType.

Returns 

TypeDescription
SellingModelTypeCartExtension.SellingModelType

global void setSellingModelType(SellingModelType sellingModelType) 

Set CartItem.SellingModelType.

Returns 

TypeDescription
void

global Decimal getUnitPriceAfterAdjustments() 

Get CartItem.UnitPriceAfterAdjustments.

Returns 

TypeDescription
Decimal

global void setUnitPriceAfterAdjustments(Decimal unitPriceAfterAdjustments) 

Set CartItem.UnitPriceAfterAdjustments.

Returns 

TypeDescription
void

global Decimal getNetUnitPriceAfterAdjustments() 

Get CartItem.NetUnitPriceAfterAdjustments.

Returns 

TypeDescription
Decimal

global void setNetUnitPriceAfterAdjustments(Decimal netUnitPriceAfterAdjustments) 

Set CartItem.NetUnitPriceAfterAdjustments.

Returns 

TypeDescription
void

global Decimal getFirstPymtPriceAfterAdjustments() 

Get CartItem.FirstPymtPriceAfterAdjustments.

Returns 

TypeDescription
Decimal

global void setFirstPymtPriceAfterAdjustments(Decimal firstPymtPriceAfterAdjustments) 

Set CartItem.FirstPymtPriceAfterAdjustments.

Returns 

TypeDescription
void

global Decimal getFirstPymtTax() 

Get CartItem.FirstPymtTax.

Returns 

TypeDescription
Decimal

global void setFirstPymtTax(Decimal firstPymtTax) 

Set CartItem.FirstPymtTax.

Returns 

TypeDescription
void

global ID getId() 

Inherited

Get Id.

Returns 

TypeDescription
ID

global Datetime getCreatedDate() 

Inherited

Get System Field CreatedDate.

Returns 

TypeDescription
Datetime

global Datetime getLastModifiedDate() 

Inherited

Get System Field LastModifiedDate.

Returns 

TypeDescription
Datetime

global ID getCreatedById() 

Inherited

Get System Field CreatedById.

Returns 

TypeDescription
ID

global ID getLastModifiedById() 

Inherited

Get System Field LastModifiedById.

Returns 

TypeDescription
ID

global Object getCustomField(String fieldName) 

Inherited

Get value of the given custom field (needs to be api name)

Returns 

TypeDescription
Object

global void setCustomField(String fieldName, Object fieldValue) 

Inherited

Set the value of the given custom field (needs to be api name)

Returns 

TypeDescription
void

public Boolean equals(Object obj) 

Inherited

public Integer hashCode() 

Inherited


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!