|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface FulfillmentPricingService
This service can be used in a couple of different ways. First, this is used in the pricing workflow and specifically
FulfillmentGroupMerchandiseTotalActivity to calculate costs for FulfillmentGroups in an Order. This can
also be injected in a controller to provide estimations for various FulfillmentOptions to display to the user
before an option is actually selected.
| Method Summary | |
|---|---|
FulfillmentGroup |
calculateCostForFulfillmentGroup(FulfillmentGroup fulfillmentGroup)
Called during the Pricing workflow to determine the cost for the FulfillmentGroup. |
FulfillmentEstimationResponse |
estimateCostForFulfillmentGroup(FulfillmentGroup fulfillmentGroup,
Set<FulfillmentOption> options)
This provides an estimation for a FulfillmentGroup with a FulfillmentOption. |
List<FulfillmentPricingProvider> |
getProviders()
|
| Method Detail |
|---|
FulfillmentGroup calculateCostForFulfillmentGroup(FulfillmentGroup fulfillmentGroup)
throws FulfillmentPriceException
FulfillmentGroup. This will loop through
#getProcessors() and call FulfillmentPricingProvider.calculateCostForFulfillmentGroup(FulfillmentGroup)
on the first processor that returns true from FulfillmentPricingProvider#canCalculateCostForFulfillmentGroup(FulfillmentGroup)
fulfillmentGroup -
FulfillmentPriceException - if fulfillmentGroup does not have a FulfillmentOption associated to it or
if there was no processor found to calculate costs for fulfillmentGroupFulfillmentPricingProvider}
FulfillmentEstimationResponse estimateCostForFulfillmentGroup(FulfillmentGroup fulfillmentGroup,
Set<FulfillmentOption> options)
throws FulfillmentPriceException
FulfillmentGroup with a FulfillmentOption. The main use case for this method
is in a view cart controller that wants to provide estimations for different FulfillmentOptions before the user
actually selects one. This uses getProviders() to allow third-party integrations to respond to
estimations, and returns the first processor that returns true from FulfillmentPricingProvider.canCalculateCostForFulfillmentGroup(FulfillmentGroup, FulfillmentOption).
fulfillmentGroup - options -
FulfillmentGroup with a candidate FulfillmentOption
FulfillmentPriceException - if no processor was found to estimate costs for fulfillmentGroup with the given optionFulfillmentPricingProvider}List<FulfillmentPricingProvider> getProviders()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||