com.elasticpath.service.shoppingcart
Interface CheckoutService

All Superinterfaces:
EpService
All Known Implementing Classes:
CheckoutServiceImpl

public interface CheckoutService
extends EpService

Provides checkout-related services.


Method Summary
 void calculateTaxAndBeforeTaxValue(ShoppingCart shoppingCart)
          Complete the tax related calculation for the given shoppingCart.
 void checkout(ShoppingCart shoppingCart, OrderPayment orderPayment)
          Processes an order for the items in the specified shopping cart.
 void retrieveShippingOption(ShoppingCart shoppingCart)
          Retrieve the valid shippingServiceLevels based on the given shoppingCart, and set the first one of the valid shippingServiceLevels as the selected shipping option by default.
 void setCustomerService(CustomerService customerService)
          Set the customer service.
 void setOrderService(OrderService orderService)
          Set the order service.
 void setRuleService(RuleService ruleService)
          Set the rule service.
 void setShippingServiceLevelService(ShippingServiceLevelService shippingServiceLevelService)
          Set the shippingServiceLevel service.
 void setShoppingCartService(ShoppingCartService shoppingCartService)
          Set the shopping cart service.
 void setTaxJurisdictionService(TaxJurisdictionService taxJurisdictionService)
          Set the taxJurisdiction service.
 
Methods inherited from interface com.elasticpath.service.EpService
getElasticPath, setElasticPath
 

Method Detail

calculateTaxAndBeforeTaxValue

void calculateTaxAndBeforeTaxValue(ShoppingCart shoppingCart)
Complete the tax related calculation for the given shoppingCart.

Parameters:
shoppingCart - the current shopping cart.

checkout

void checkout(ShoppingCart shoppingCart,
              OrderPayment orderPayment)
Processes an order for the items in the specified shopping cart. This will create an order, update customer account information, and empty the shopping cart. This method currently requires that the order payment has been successfully processed.

Parameters:
shoppingCart - the cart to checkout
orderPayment - the orderPayment representing the payment detail information. Javadoc tags not used due to a Checkstyle processing error: throws CardDeclinedException if the card is declined throws CardExpiredException if the card has expired throws CardErrorException if there was an error processing the given information throws EpServiceException if the payment processing fails throws InsufficientInventoryException if there is not enough inventory to complete the order

retrieveShippingOption

void retrieveShippingOption(ShoppingCart shoppingCart)
Retrieve the valid shippingServiceLevels based on the given shoppingCart, and set the first one of the valid shippingServiceLevels as the selected shipping option by default.

Parameters:
shoppingCart - the current shopping cart.

setCustomerService

void setCustomerService(CustomerService customerService)
Set the customer service.

Parameters:
customerService - the customer service.

setOrderService

void setOrderService(OrderService orderService)
Set the order service.

Parameters:
orderService - the order service

setRuleService

void setRuleService(RuleService ruleService)
Set the rule service.

Parameters:
ruleService - the rule service

setShippingServiceLevelService

void setShippingServiceLevelService(ShippingServiceLevelService shippingServiceLevelService)
Set the shippingServiceLevel service.

Parameters:
shippingServiceLevelService - the shippingServiceLevel service.

setShoppingCartService

void setShoppingCartService(ShoppingCartService shoppingCartService)
Set the shopping cart service.

Parameters:
shoppingCartService - the shopping cart service

setTaxJurisdictionService

void setTaxJurisdictionService(TaxJurisdictionService taxJurisdictionService)
Set the taxJurisdiction service.

Parameters:
taxJurisdictionService - the taxJurisdiction service