org.broadleafcommerce.pricing.service.module
Class USPSShippingCalculationModule
java.lang.Object
org.broadleafcommerce.pricing.service.module.USPSShippingCalculationModule
- All Implemented Interfaces:
- ShippingModule
- Direct Known Subclasses:
- USPSSingleItemPerPackageShippingCalculationModule
public abstract class USPSShippingCalculationModule
- extends Object
- implements ShippingModule
This module will utilize the USPSShippingCalculationService to take your fulfillment group
order items and calculate the total shipping rate. Developers must extend this class and
implement their own algorithm in the createPackages method for packaging individual items
into one or more boxes.
- Author:
- jfischer
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
name
protected String name
originationPostalCode
protected String originationPostalCode
isDefaultModule
protected Boolean isDefaultModule
shippingCalculationService
protected USPSShippingCalculationService shippingCalculationService
USPSShippingCalculationModule
public USPSShippingCalculationModule()
calculateShippingForFulfillmentGroup
public FulfillmentGroup calculateShippingForFulfillmentGroup(FulfillmentGroup fulfillmentGroup)
throws ShippingPriceException
- Specified by:
calculateShippingForFulfillmentGroup in interface ShippingModule
- Throws:
ShippingPriceException
deducePostage
protected USPSPostage deducePostage(USPSServiceResponseType responseType,
List<USPSContainerItemRequest> requestItems,
USPSContainerItemResponse itemResponse)
findRequestByPackageId
protected USPSContainerItemRequest findRequestByPackageId(String packageId,
List<USPSContainerItemRequest> requestItems)
getName
public String getName()
- Specified by:
getName in interface ShippingModule
setName
public void setName(String name)
- Specified by:
setName in interface ShippingModule
createPackages
protected abstract List<USPSContainerItemRequest> createPackages(FulfillmentGroup fulfillmentGroup)
throws ShippingPriceException
- Throws:
ShippingPriceException
isValidModuleForService
public Boolean isValidModuleForService(String serviceName)
- Specified by:
isValidModuleForService in interface ShippingModule
getOriginationPostalCode
public String getOriginationPostalCode()
setOriginationPostalCode
public void setOriginationPostalCode(String originationPostalCode)
isDefaultModule
public Boolean isDefaultModule()
- Specified by:
isDefaultModule in interface ShippingModule
setDefaultModule
public void setDefaultModule(Boolean isDefaultModule)
- Specified by:
setDefaultModule in interface ShippingModule
Copyright © 2012. All Rights Reserved.