Newer Version Available

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

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

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

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.