Class CheckoutResponse
- java.lang.Object
-
- com.broadleafcommerce.cartoperation.web.endpoint.domain.checkout.CheckoutResponse
-
- All Implemented Interfaces:
Serializable
public class CheckoutResponse extends Object implements Serializable
DTO for communicating the results of a checkout submission- Author:
- Chris Kittrell (ckittrell)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CheckoutResponse()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.broadleafcommerce.cart.client.domain.Cart
getCart()
TheCart
related to the checkout submission.String
getFailureMessage()
Message intended to inform why the checkout submission failed ifisSuccess()
is false.String
getFailureType()
The type of checkout failure which can be used programmatically by the client application to react to the failure.Map<String,String>
getItemFailureMessages()
Line item error messages used to describe issues with individual fields, cart items, etc.List<PaymentSummary>
getPaymentSummaries()
A collection ofPaymentSummaries
related to theCart
.List<PaymentTransactionFailureDetail>
getPaymentTransactionFailureDetails()
A collection ofPaymentTransactionFailureDetails
describing how the transaction(s) failed.String
getRequestId()
The id representing the customer's request to checkoutboolean
isAwaitingPaymentResult()
Whether or not the cart was submitted for checkout but awaiting payment result.boolean
isSuccess()
Whether or not the checkout submission was successful.void
setAwaitingPaymentResult(boolean awaitingPaymentResult)
Whether or not the cart was submitted for checkout but awaiting payment result.void
setCart(com.broadleafcommerce.cart.client.domain.Cart cart)
TheCart
related to the checkout submission.void
setFailureMessage(String failureMessage)
Message intended to inform why the checkout submission failed ifisSuccess()
is false.void
setFailureType(String failureType)
The type of checkout failure which can be used programmatically by the client application to react to the failure.void
setItemFailureMessages(Map<String,String> itemFailureMessages)
Line item error messages used to describe issues with individual fields, cart items, etc.void
setPaymentSummaries(List<PaymentSummary> paymentSummaries)
A collection ofPaymentSummaries
related to theCart
.void
setPaymentTransactionFailureDetails(List<PaymentTransactionFailureDetail> paymentTransactionFailureDetails)
A collection ofPaymentTransactionFailureDetails
describing how the transaction(s) failed.void
setRequestId(String requestId)
The id representing the customer's request to checkoutvoid
setSuccess(boolean success)
Whether or not the checkout submission was successful.
-
-
-
Method Detail
-
getCart
public com.broadleafcommerce.cart.client.domain.Cart getCart()
TheCart
related 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
public String 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:
CheckoutFailureType
-
getFailureMessage
public String 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
public Map<String,String> 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
public List<PaymentSummary> getPaymentSummaries()
A collection ofPaymentSummaries
related to theCart
.- Returns:
- A collection of
PaymentSummaries
related to theCart
.
-
getPaymentTransactionFailureDetails
public List<PaymentTransactionFailureDetail> getPaymentTransactionFailureDetails()
A collection ofPaymentTransactionFailureDetails
describing how the transaction(s) failed.- Returns:
- A collection of
PaymentTransactionFailureDetails
describing how the transaction(s) failed.
-
getRequestId
public String 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)
TheCart
related 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
public void setFailureType(String failureType)
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:
CheckoutFailureType
-
setFailureMessage
public void setFailureMessage(String failureMessage)
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
public void setItemFailureMessages(Map<String,String> itemFailureMessages)
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
public void setPaymentSummaries(List<PaymentSummary> paymentSummaries)
A collection ofPaymentSummaries
related to theCart
.- Parameters:
paymentSummaries
- A collection ofPaymentSummaries
related to theCart
.
-
setPaymentTransactionFailureDetails
public void setPaymentTransactionFailureDetails(List<PaymentTransactionFailureDetail> paymentTransactionFailureDetails)
A collection ofPaymentTransactionFailureDetails
describing how the transaction(s) failed.- Parameters:
paymentTransactionFailureDetails
- A collection ofPaymentTransactionFailureDetails
describing how the transaction(s) failed.
-
setRequestId
public void setRequestId(String requestId)
The id representing the customer's request to checkout- Parameters:
requestId
- The id representing the customer's request to checkout
-
-