public class PaymentTransactionCreationResultBuilder
extends java.lang.Object
| Modifier and Type | Method | Description |
|---|---|---|
PaymentTransactionCreationResult |
build() |
|
PaymentTransactionCreationResultBuilder |
exception(java.lang.Throwable exception) |
|
PaymentTransactionCreationResultBuilder |
handlingTask(HandlingTask task) |
Add information of the
HandlingTask the shop will recieve. |
static PaymentTransactionCreationResultBuilder |
of(OperationResult operationResult) |
Create the builder instance.
|
static PaymentTransactionCreationResult |
ofError(java.lang.String message) |
|
static PaymentTransactionCreationResult |
ofError(java.lang.String message,
java.lang.Throwable exception) |
|
static PaymentTransactionCreationResult |
ofError(java.lang.String message,
java.lang.Throwable exception,
io.sphere.sdk.payments.Payment payment) |
|
static PaymentTransactionCreationResultBuilder |
ofSuccess(io.sphere.sdk.payments.Payment payment) |
Default success action -
ShopAction.CONTINUE |
PaymentTransactionCreationResultBuilder |
payment(io.sphere.sdk.payments.Payment payment) |
Add a payment object to the result.
|
public static PaymentTransactionCreationResultBuilder of(OperationResult operationResult)
operationResult - operation result to parse in PaymentTransactionCreationResultBuilderpublic static PaymentTransactionCreationResultBuilder ofSuccess(io.sphere.sdk.payments.Payment payment)
ShopAction.CONTINUEpayment - payment reference to set in the result builder.OperationResult.SUCCESS and ShopAction.CONTINUEpublic static PaymentTransactionCreationResult ofError(java.lang.String message)
public static PaymentTransactionCreationResult ofError(java.lang.String message, java.lang.Throwable exception)
public static PaymentTransactionCreationResult ofError(java.lang.String message, java.lang.Throwable exception, io.sphere.sdk.payments.Payment payment)
public PaymentTransactionCreationResultBuilder payment(io.sphere.sdk.payments.Payment payment)
payment - the CTP Payment objectpublic PaymentTransactionCreationResultBuilder handlingTask(HandlingTask task)
HandlingTask the shop will recieve.task - the handling task describing the next action to be takenpublic PaymentTransactionCreationResultBuilder exception(java.lang.Throwable exception)
public PaymentTransactionCreationResult build()
PaymentCreationResult object.