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.
ShippingMethod Class
Namespace
Example
1public with sharing class MessagingShippingMethods {
2
3 @InvocableMethod
4 public static List<List<RichMessaging.ShippingMethod>> getShippingMethods(){
5 Double amount = 0.25;
6 List<List<RichMessaging.ShippingMethod>> result = new List<List<RichMessaging.ShippingMethod>>();
7
8 List<RichMessaging.ShippingMethod> options = new List<RichMessaging.ShippingMethod>{
9 new RichMessaging.ShippingMethod('doordash', amount, '1 hour delivery to your door', 'ddash'),
10 new RichMessaging.ShippingMethod('UPS', amount, '2 days delivery', 'UPS')
11 };
12 result.add(options);
13 return result;
14 }
15
16}ShippingMethod Constructors
The following are constructors for ShippingMethod.
ShippingMethod Properties
The following are properties for ShippingMethod.
amount
Signature
public Double amount {get; set;}
Property Value
Type: Double
amountValue
Signature
public Double amountValue {get; set;}
Property Value
Type: Double
detail
Signature
public String detail {get; set;}
Property Value
Type: String
detailValue
Signature
public String detailValue {get; set;}
Property Value
Type: String
identifier
Signature
public String identifier {get; set;}
Property Value
Type: String
identifierValue
Signature
public String identifierValue {get; set;}
Property Value
Type: String
label
Signature
public String label {get; set;}
Property Value
Type: String
labelValue
Signature
public String labelValue {get; set;}
Property Value
Type: String
shippingMethodType
Signature
public String shippingMethodType {get; set;}
Property Value
Type: String