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 Details

    • cartHasPopulatedOrderInfo

      boolean cartHasPopulatedOrderInfo()
      A helper method used to determine the validity of the CartState.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 the CartState.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 the CartState.getCart()'s fulfillment groups
      Returns:
      boolean indicating whether or not the fulfillment groups on the cart have addresses.
    • cartHasCreditCardPaymentWithSameToken

      boolean cartHasCreditCardPaymentWithSameToken(String paymentToken)
      Parameters:
      paymentToken -
    • cartHasCreditCardPayment

      boolean cartHasCreditCardPayment()
      A helper method used to determine whether or not the CartState.getCart() is using a payment of type PaymentType.CREDIT_CARD
      Returns:
      boolean
    • cartHasThirdPartyPayment

      boolean cartHasThirdPartyPayment()
      A helper method used to determine whether or not the CartState.getCart() is using a payment of type PaymentType.THIRD_PARTY_ACCOUNT
      Returns:
      boolean
    • cartHasTemporaryCreditCard

      boolean cartHasTemporaryCreditCard()
      A helper method used to determine whether or not the CartState.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 a CustomerPayment is not used.

      Returns:
      boolean
    • cartHasUnconfirmedCreditCard

      boolean cartHasUnconfirmedCreditCard()
      A helper method used to determine whether or not the CartState.getCart() contains an unconfirmed credit card
      Returns:
      boolean