PaymentLineItem Class

Represents a payment line item in payment requests sent in enhanced Messaging channels. 

Namespace

RichMessaging

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)

Creates a new instance of the RichMessaging.PaymentLineItem class.

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(label, amount)

Creates a new instance of the RichMessaging.PaymentLineItem class.

Signature

public PaymentLineItem(String label, Double amount)

Parameters

label
Type: String
The label of the payment line item.
amount
Type: Double
The amount of the payment line item.

PaymentLineItem()

Creates a new instance of the RichMessaging.PaymentLineItem class.

Signature

public PaymentLineItem()

PaymentLineItem Properties

The following are properties for PaymentLineItem.

amount

The amount of the payment line item.

Signature

public Double amount {get; set;}

Property Value

Type: Double

amountValue

The amount value of the payment line item.

Signature

public Double amountValue {get; set;}

Property Value

Type: Double

automaticReloadPaymentThresholdAmount

The automatic reload payment threshold amount of the payment line item.

Signature

public Double automaticReloadPaymentThresholdAmount {get; set;}

Property Value

Type: Double

automaticReloadPaymentThresholdAmountValue

The automatic reload payment threshold amount value of the payment line item.

Signature

public Double automaticReloadPaymentThresholdAmountValue {get; set;}

Property Value

Type: Double

commerce

The commerce attributes of the payment line item.

Signature

public RichMessaging.OrderItemCommerceAttributes commerce {get; set;}

commerceValue

The commerce attributes variable for the payment line item.

Signature

public RichMessaging.OrderItemCommerceAttributes commerceValue {get; set;}

discount

The discount applied to the payment line item.

Signature

public RichMessaging.Discount discount {get; set;}

Property Value

Type: RichMessaging.Discount

discountValue

The discount variable for the payment line item.

Signature

public RichMessaging.Discount discountValue {get; set;}

Property Value

Type: RichMessaging.Discount

label

The label of the payment line item.

Signature

public String label {get; set;}

Property Value

Type: String

labelValue

The label value of the payment line item.

Signature

public String labelValue {get; set;}

Property Value

Type: String

lineItemType

The line item type of the payment line item. Read-only variable.

Signature

public String lineItemType {get; set;}

Property Value

Type: String

quantity

The quantity of the payment line item.

Signature

public Integer quantity {get; set;}

Property Value

Type: Integer

quantityValue

The quantity variable for the payment line item.

Signature

public Integer quantityValue {get; set;}

Property Value

Type: Integer

saleAmount

The sale amount of the payment line item.

Signature

public Double saleAmount {get; set;}

Property Value

Type: Double

saleAmountValue

The sale amount variable for the payment line item.

Signature

public Double saleAmountValue {get; set;}

Property Value

Type: Double

status

The status of the payment line item.

Signature

public String status {get; set;}

Property Value

Type: String

statusValue

The status value of the payment line item.

Signature

public RichMessaging.PaymentItemStatus statusValue {get; set;}

Property Value

Type: RichMessaging.PaymentItemStatus

timing

The timing of the payment line item.

Signature

public RichMessaging.AbstractTiming timing {get; set;}

Property Value

Type: RichMessaging.AbstractTiming

timingValue

The timing value of the payment line item.

Signature

public RichMessaging.AbstractTiming timingValue {get; set;}

Property Value

Type: RichMessaging.AbstractTiming

PaymentLineItem Methods

The following are methods for PaymentLineItem.