Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
PaymentLineItem Class
Namespace
Example
1public with sharing class MessagingPaymentLineItems {
2
3 @InvocableMethod
4 public static List<List<RichMessaging.PaymentLineItem>> getLineItems() {
5 Double amount = 0.25;
6 List<List<RichMessaging.PaymentLineItem>> result = new List<List<RichMessaging.PaymentLineItem>>();
7 RichMessaging.PaymentLineItem pizza = new RichMessaging.PaymentLineItem('pizza', amount);
8 RichMessaging.PaymentLineItem pasta = new RichMessaging.PaymentLineItem('pasta', amount);
9 pizza.statusValue = RichMessaging.PaymentItemStatus.FinalCost;
10 pasta.statusValue = RichMessaging.PaymentItemStatus.FinalCost;
11
12 List<RichMessaging.PaymentLineItem> options = new List<RichMessaging.PaymentLineItem>{
13 pizza, pasta
14 };
15 result.add(options);
16 return result;
17 }
18
19}PaymentLineItem Constructors
The following are constructors for PaymentLineItem.
PaymentLineItem(label, amount, timing)
Signature
public PaymentLineItem(String label, Double amount, RichMessaging.AbstractTiming timing)
Parameters
- label: Type: String The label of the payment line item.
- amount: Type: Double The amount of the payment line item.
- timing: Type: RichMessaging.AbstractTiming The timing of the payment line item.
PaymentLineItem Properties
The following are properties for PaymentLineItem.
amount
Signature
public Double amount {get; set;}
Property Value
Type: Double
amountValue
Signature
public Double amountValue {get; set;}
Property Value
Type: Double
automaticReloadPaymentThresholdAmount
Signature
public Double automaticReloadPaymentThresholdAmount {get; set;}
Property Value
Type: Double
automaticReloadPaymentThresholdAmountValue
Signature
public Double automaticReloadPaymentThresholdAmountValue {get; set;}
Property Value
Type: Double
commerce
Signature
public RichMessaging.OrderItemCommerceAttributes commerce {get; set;}
Property Value
commerceValue
Signature
public RichMessaging.OrderItemCommerceAttributes commerceValue {get; set;}
Property Value
discount
Signature
public RichMessaging.Discount discount {get; set;}
Property Value
Type: RichMessaging.Discount
discountValue
Signature
public RichMessaging.Discount discountValue {get; set;}
Property Value
Type: RichMessaging.Discount
label
Signature
public String label {get; set;}
Property Value
Type: String
labelValue
Signature
public String labelValue {get; set;}
Property Value
Type: String
lineItemType
Signature
public String lineItemType {get; set;}
Property Value
Type: String
quantity
Signature
public Integer quantity {get; set;}
Property Value
Type: Integer
quantityValue
Signature
public Integer quantityValue {get; set;}
Property Value
Type: Integer
saleAmount
Signature
public Double saleAmount {get; set;}
Property Value
Type: Double
saleAmountValue
Signature
public Double saleAmountValue {get; set;}
Property Value
Type: Double
status
Signature
public String status {get; set;}
Property Value
Type: String
statusValue
Signature
public RichMessaging.PaymentItemStatus statusValue {get; set;}
Property Value
timing
Signature
public RichMessaging.AbstractTiming timing {get; set;}