Class CheckoutResponse
java.lang.Object
com.broadleafcommerce.cartoperation.web.endpoint.domain.checkout.CheckoutResponse
- All Implemented Interfaces:
Serializable
DTO for communicating the results of a checkout submission
- Author:
- Chris Kittrell (ckittrell)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.broadleafcommerce.cart.client.domain.CartgetCart()TheCartrelated to the checkout submission.Message intended to inform why the checkout submission failed ifisSuccess()is false.The type of checkout failure which can be used programmatically by the client application to react to the failure.Line item error messages used to describe issues with individual fields, cart items, etc.A collection ofPaymentNextActionsdescribing the required next steps for the payment.A collection ofPaymentSummariesrelated to theCart.A collection ofPaymentTransactionFailureDetailsdescribing how the transaction(s) failed.The id representing the customer's request to checkoutbooleanWhether or not the cart was submitted for checkout but awaiting payment result.booleanWhether or not the checkout submission was successful.voidsetAwaitingPaymentResult(boolean awaitingPaymentResult) Whether or not the cart was submitted for checkout but awaiting payment result.voidsetCart(com.broadleafcommerce.cart.client.domain.Cart cart) TheCartrelated to the checkout submission.voidsetFailureMessage(String failureMessage) Message intended to inform why the checkout submission failed ifisSuccess()is false.voidsetFailureType(String failureType) The type of checkout failure which can be used programmatically by the client application to react to the failure.voidsetItemFailureMessages(Map<String, String> itemFailureMessages) Line item error messages used to describe issues with individual fields, cart items, etc.voidsetPaymentNextActions(List<PaymentNextAction> paymentNextActions) A collection ofPaymentNextActionsdescribing the required next steps for the payment.voidsetPaymentSummaries(List<PaymentSummary> paymentSummaries) A collection ofPaymentSummariesrelated to theCart.voidsetPaymentTransactionFailureDetails(List<PaymentTransactionFailureDetail> paymentTransactionFailureDetails) A collection ofPaymentTransactionFailureDetailsdescribing how the transaction(s) failed.voidsetRequestId(String requestId) The id representing the customer's request to checkoutvoidsetSuccess(boolean success) Whether or not the checkout submission was successful.
-
Constructor Details
-
CheckoutResponse
public CheckoutResponse()
-
-
Method Details
-
getCart
public com.broadleafcommerce.cart.client.domain.Cart getCart()TheCartrelated to the checkout submission.- Returns:
- The Cart related to the checkout submission.
-
isSuccess
public boolean isSuccess()Whether or not the checkout submission was successful.- Returns:
- Whether or not the checkout submission was successful.
-
isAwaitingPaymentResult
public boolean isAwaitingPaymentResult()Whether or not the cart was submitted for checkout but awaiting payment result.- Returns:
- Whether or not the cart was submitted for checkout but awaiting payment result.
-
getFailureType
The type of checkout failure which can be used programmatically by the client application to react to the failure. Note: This should only be populated ifisSuccess()is false.- Returns:
- The type of checkout failure
- See Also:
-
getFailureMessage
Message intended to inform why the checkout submission failed ifisSuccess()is false.- Returns:
- Message intended to inform why the checkout submission failed if
isSuccess()is false.
-
getItemFailureMessages
Line item error messages used to describe issues with individual fields, cart items, etc. For example, this may consist of map entries where the key is a cart item id (or name) & the value is an explanation of why the item is misconfigured.- Returns:
- Line item error messages used to describe issues with individual fields, cart items, etc.
-
getPaymentSummaries
A collection ofPaymentSummariesrelated to theCart.- Returns:
- A collection of
PaymentSummariesrelated to theCart.
-
getPaymentNextActions
A collection ofPaymentNextActionsdescribing the required next steps for the payment.- Returns:
- A collection of
PaymentNextActionsdescribing the required next steps for the payment.
-
getPaymentTransactionFailureDetails
A collection ofPaymentTransactionFailureDetailsdescribing how the transaction(s) failed.- Returns:
- A collection of
PaymentTransactionFailureDetailsdescribing how the transaction(s) failed.
-
getRequestId
The id representing the customer's request to checkout- Returns:
- The id representing the customer's request to checkout
-
setCart
public void setCart(com.broadleafcommerce.cart.client.domain.Cart cart) TheCartrelated to the checkout submission.- Parameters:
cart- The Cart related to the checkout submission.
-
setSuccess
public void setSuccess(boolean success) Whether or not the checkout submission was successful.- Parameters:
success- Whether or not the checkout submission was successful.
-
setAwaitingPaymentResult
public void setAwaitingPaymentResult(boolean awaitingPaymentResult) Whether or not the cart was submitted for checkout but awaiting payment result.- Parameters:
awaitingPaymentResult- Whether or not the cart was submitted for checkout but awaiting payment result.
-
setFailureType
The type of checkout failure which can be used programmatically by the client application to react to the failure. Note: This should only be populated ifisSuccess()is false.- Parameters:
failureType- The type of checkout failure- See Also:
-
setFailureMessage
Message intended to inform why the checkout submission failed ifisSuccess()is false.- Parameters:
failureMessage- Message intended to inform why the checkout submission failed ifisSuccess()is false.
-
setItemFailureMessages
Line item error messages used to describe issues with individual fields, cart items, etc. For example, this may consist of map entries where the key is a cart item id (or name) & the value is an explanation of why the item is misconfigured.- Parameters:
itemFailureMessages- Line item error messages used to describe issues with individual fields, cart items, etc.
-
setPaymentSummaries
A collection ofPaymentSummariesrelated to theCart.- Parameters:
paymentSummaries- A collection ofPaymentSummariesrelated to theCart.
-
setPaymentNextActions
A collection ofPaymentNextActionsdescribing the required next steps for the payment.- Parameters:
paymentNextActions- A collection ofPaymentNextActionsdescribing the required next steps for the payment.
-
setPaymentTransactionFailureDetails
public void setPaymentTransactionFailureDetails(List<PaymentTransactionFailureDetail> paymentTransactionFailureDetails) A collection ofPaymentTransactionFailureDetailsdescribing how the transaction(s) failed.- Parameters:
paymentTransactionFailureDetails- A collection ofPaymentTransactionFailureDetailsdescribing how the transaction(s) failed.
-
setRequestId
The id representing the customer's request to checkout- Parameters:
requestId- The id representing the customer's request to checkout
-