public class PaymentCreationResultBuilder
extends java.lang.Object
PaymentCreationResult
object.
Created by mgatz on 7/20/16.Modifier and Type | Method and Description |
---|---|
PaymentCreationResult |
build() |
PaymentCreationResultBuilder |
exception(java.lang.Throwable exception) |
PaymentCreationResultBuilder |
handlingTask(HandlingTask task)
Add information of the
HandlingTask the shop will recieve. |
PaymentCreationResultBuilder |
message(java.lang.String message) |
static PaymentCreationResultBuilder |
of(OperationResult operationResult)
Create the builder instance.
|
static PaymentCreationResult |
ofError(java.lang.String message) |
static PaymentCreationResult |
ofError(java.lang.String message,
java.lang.Throwable exception) |
PaymentCreationResultBuilder |
payment(io.sphere.sdk.payments.Payment payment)
Add a payment object to the result.
|
public static PaymentCreationResultBuilder of(OperationResult operationResult)
operationResult
- operation result to parse in PaymentCreationResultBuilder
public static PaymentCreationResult ofError(java.lang.String message)
public static PaymentCreationResult ofError(java.lang.String message, java.lang.Throwable exception)
public PaymentCreationResultBuilder payment(io.sphere.sdk.payments.Payment payment)
payment
- the CTP Payment
objectpublic PaymentCreationResultBuilder handlingTask(HandlingTask task)
HandlingTask
the shop will recieve.task
- the handling task describing the next action to be takenpublic PaymentCreationResultBuilder exception(java.lang.Throwable exception)
public PaymentCreationResultBuilder message(java.lang.String message)
public PaymentCreationResult build()
PaymentCreationResult
object.