Newer Version Available
OrderSummary Class
Namespace
OrderSummary Methods
createCreditMemo(orderSummaryId, creditMemoInput)
API Version
48.0
Requires Chatter
No
Signature
public static ConnectApi.CreateCreditMemoOutputRepresentation createCreditMemo(String orderSummaryId, ConnectApi.CreateCreditMemoInputRepresentation creditMemoInput)
Parameters
- orderSummaryId
- Type: String
- ID of the OrderSummary.
- creditMemoInput
- Type: ConnectApi.CreateCreditMemoInputRepresentation
- The list of change order IDs.
Return Value
ensureFundsAsync(orderSummaryId, ensureFundsInput)
API Version
48.0
Requires Chatter
No
Signature
public static ConnectApi.EnsureFundsAsyncOutputRepresentation ensureFundsAsync(String orderSummaryId, ConnectApi.EnsureFundsAsyncInputRepresentation ensureFundsInput)
Parameters
- orderSummaryId
- Type: String
- ID of the OrderSummary.
- ensureFundsInput
- Type: ConnectApi.EnsureFundsAsyncInputRepresentation
- The ID of the invoice.
Return Value
Usage
This method checks the OrderPaymentSummaries associated with the specified OrderSummary for funds to apply to the invoice balance as follows:
- Verify that the invoice balance doesn’t exceed the total amount of all the OrderPaymentSummaries.
- If an OrderPaymentSummary exists with an amount that matches the invoice balance, use it.
- Otherwise, if any OrderPaymentSummaries exist with an amount greater than the invoice balance, use the one with the smallest amount greater than the invoice balance.
- Otherwise, select OrderPaymentSummaries in order from largest amount to smallest until their amounts meet or exceed the invoice balance.
- If any selected funds are authorized, capture them.
- Apply the selected funds to the invoice.
ensureRefundsAsync(orderSummaryId, ensureRefundsInput)
API Version
48.0
Requires Chatter
No
Signature
public static ConnectApi.EnsureRefundsAsyncOutputRepresentation ensureRefundsAsync(String orderSummaryId, ConnectApi.EnsureRefundsAsyncInputRepresentation ensureRefundsInput)
Parameters
- orderSummaryId
- Type: String
- ID of the OrderSummary.
- ensureRefundsInput
- Type: ConnectApi.EnsureRefundsAsyncInputRepresentation
- Object that wraps the ID of the credit memo.
Return Value
previewCancel(orderSummaryId, changeInput)
API Version
48.0
Requires Chatter
No
Signature
public static ConnectApi.PreviewCancelOutputRepresentation previewCancel(String orderSummaryId, ConnectApi.ChangeInputRepresentation changeInput)
Parameters
- orderSummaryId
- Type: String
- ID of the OrderSummary.
- changeInput
- Type: ConnectApi.ChangeInputRepresentation
- A list of changes to OrderItemSummaries that make up an order change, such as a cancel or return.
Return Value
previewReturn(orderSummaryId, changeInput)
API Version
48.0
Requires Chatter
No
Signature
public static ConnectApi.PreviewReturnOutputRepresentation previewReturn(String orderSummaryId, ConnectApi.ChangeInputRepresentation changeInput)
Parameters
- orderSummaryId
- Type: String
- ID of the OrderSummary.
- changeInput
- Type: ConnectApi.ChangeInputRepresentation
- A list of changes to OrderItemSummaries that make up an order change, such as a cancel or return.
Return Value
submitCancel(orderSummaryId, changeInput)
API Version
48.0
Requires Chatter
No
Signature
public static ConnectApi.SubmitCancelOutputRepresentation submitCancel(String orderSummaryId, ConnectApi.ChangeInputRepresentation changeInput)
Parameters
- orderSummaryId
- Type: String
- ID of the OrderSummary.
- changeInput
- Type: ConnectApi.ChangeInputRepresentation
- A list of changes to OrderItemSummaries that make up an order change, such as a cancel or return.
Return Value
submitReturn(orderSummaryId, changeInput)
API Version
48.0
Requires Chatter
No
Signature
public static ConnectApi.SubmitReturnOutputRepresentation submitReturn(String orderSummaryId, ConnectApi.ChangeInputRepresentation changeInput)
Parameters
- orderSummaryId
- Type: String
- ID of the OrderSummary.
- changeInput
- Type: ConnectApi.ChangeInputRepresentation
- A list of changes to OrderItemSummaries that make up an order change, such as a cancel or return.
Return Value
Usage
After submitting a return, process a refund. Pass the changeOrderId from the output representation to the createCreditMemo() method, then pass the credit memo to the ensureRefundsAsync() method.