Interface CartStateService
- All Known Implementing Classes:
CartStateServiceImpl
public interface CartStateService
Convenience methods for determining the state of the active cart
- Author:
- Chris Kittrell (ckittrell)
-
Method Summary
Modifier and TypeMethodDescriptionbooleanA helper method used to determine whether or not theCartState.getCart()is using a payment of typePaymentType.CREDIT_CARDbooleancartHasCreditCardPaymentWithSameToken(String paymentToken) booleanA helper method used to determine the validity of the payments on theCartState.getCart()booleanA helper method used to determine the validity of theCartState.getCart()'s order infobooleanA helper method used to determine the validity of theCartState.getCart()'s fulfillment groupsbooleanA helper method used to determine whether or not theCartState.getCart()contains a temporary credit card.booleanA helper method used to determine whether or not theCartState.getCart()is using a payment of typePaymentType.THIRD_PARTY_ACCOUNTbooleanA helper method used to determine whether or not theCartState.getCart()contains an unconfirmed credit card
-
Method Details
-
cartHasPopulatedOrderInfo
boolean cartHasPopulatedOrderInfo()A helper method used to determine the validity of theCartState.getCart()'s order info- Returns:
- boolean indicating whether or not the order has valid info
-
cartHasPopulatedBillingAddress
boolean cartHasPopulatedBillingAddress()A helper method used to determine the validity of the payments on theCartState.getCart()- Returns:
- boolean indicating whether or not the CREDIT_CARD order payment on the order has an address
-
cartHasPopulatedShippingAddress
boolean cartHasPopulatedShippingAddress()A helper method used to determine the validity of theCartState.getCart()'s fulfillment groups- Returns:
- boolean indicating whether or not the fulfillment groups on the cart have addresses.
-
cartHasCreditCardPaymentWithSameToken
- Parameters:
paymentToken-
-
cartHasCreditCardPayment
boolean cartHasCreditCardPayment()A helper method used to determine whether or not theCartState.getCart()is using a payment of typePaymentType.CREDIT_CARD- Returns:
- boolean
-
cartHasThirdPartyPayment
boolean cartHasThirdPartyPayment()A helper method used to determine whether or not theCartState.getCart()is using a payment of typePaymentType.THIRD_PARTY_ACCOUNT- Returns:
- boolean
-
cartHasTemporaryCreditCard
boolean cartHasTemporaryCreditCard()A helper method used to determine whether or not theCartState.getCart()contains a temporary credit card.Note: Temporary credit card
OrderPayments are created to store the payment's billing address prior to submitting the checkout if aCustomerPaymentis not used.- Returns:
- boolean
-
cartHasUnconfirmedCreditCard
boolean cartHasUnconfirmedCreditCard()A helper method used to determine whether or not theCartState.getCart()contains an unconfirmed credit card- Returns:
- boolean
-