OrderPaymentSummary Class

Work with payments in Order Management.

Namespace

ConnectApi

OrderPaymentSummary Methods

The following are methods for OrderPaymentSummary. All methods are static.

createOrderPaymentSummary(orderPaymentSummaryInput)

Create an OrderPaymentSummary for an OrderSummary. Specify a payment authorization or payments that share the same payment method. In an org with the multicurrency feature enabled, the OrderPaymentSummary inherits the CurrencyIsoCode value from the OrderSummary.

API Version

48.0

Requires Chatter

No

Signature

public static ConnectApi.CreateOrderPaymentSummaryOutputRepresentation createOrderPaymentSummary(ConnectApi.CreateOrderPaymentSummaryInputRepresentation orderPaymentSummaryInput)

Parameters

orderPaymentSummaryInput
Type: ConnectApi.CreateOrderPaymentSummaryInputRepresentation
The OrderSummary and payment authorization or payments.

Example

String orderSummaryId = '1Osxx0000004CCG';
String paymentId1 = '0a3xx0000000085AAA';
String paymentId2 = '0a3xx0000000085BBB';

ConnectApi.CreateOrderPaymentSummaryInputRepresentation orderPaymentSummaryInput = new ConnectApi.CreateOrderPaymentSummaryInputRepresentation();
orderPaymentSummaryInput.orderSummaryId = orderSummaryId;
List<String> paymentList = new List<String>();
paymentList.add(paymentId1);
paymentList.add(paymentId2);
orderPaymentSummaryInput.paymentIds = paymentList;

ConnectApi.CreateOrderPaymentSummaryOutputRepresentation result = ConnectAPI.OrderPaymentSummary.createOrderPaymentSummary(orderPaymentSummaryInput);