org.broadleafcommerce.pricing.service.module
Class USPSShippingCalculationModule
java.lang.Object
org.broadleafcommerce.pricing.service.module.USPSShippingCalculationModule
- All Implemented Interfaces:
- org.broadleafcommerce.core.pricing.service.module.ShippingModule
- Direct Known Subclasses:
- USPSSingleItemPerPackageShippingCalculationModule
public abstract class USPSShippingCalculationModule
- extends Object
- implements org.broadleafcommerce.core.pricing.service.module.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 |
| Methods inherited from interface org.broadleafcommerce.core.pricing.service.module.ShippingModule |
getServiceName |
name
protected String name
originationPostalCode
protected String originationPostalCode
isDefaultModule
protected Boolean isDefaultModule
shippingCalculationService
protected USPSShippingCalculationService shippingCalculationService
USPSShippingCalculationModule
public USPSShippingCalculationModule()
calculateShippingForFulfillmentGroup
public org.broadleafcommerce.core.order.domain.FulfillmentGroup calculateShippingForFulfillmentGroup(org.broadleafcommerce.core.order.domain.FulfillmentGroup fulfillmentGroup)
throws org.broadleafcommerce.common.vendor.service.exception.ShippingPriceException
- Specified by:
calculateShippingForFulfillmentGroup in interface org.broadleafcommerce.core.pricing.service.module.ShippingModule
- Throws:
org.broadleafcommerce.common.vendor.service.exception.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 org.broadleafcommerce.core.pricing.service.module.ShippingModule
setName
public void setName(String name)
- Specified by:
setName in interface org.broadleafcommerce.core.pricing.service.module.ShippingModule
createPackages
protected abstract List<USPSContainerItemRequest> createPackages(org.broadleafcommerce.core.order.domain.FulfillmentGroup fulfillmentGroup)
throws org.broadleafcommerce.common.vendor.service.exception.ShippingPriceException
- Throws:
org.broadleafcommerce.common.vendor.service.exception.ShippingPriceException
isValidModuleForService
public Boolean isValidModuleForService(String serviceName)
- Specified by:
isValidModuleForService in interface org.broadleafcommerce.core.pricing.service.module.ShippingModule
getOriginationPostalCode
public String getOriginationPostalCode()
setOriginationPostalCode
public void setOriginationPostalCode(String originationPostalCode)
isDefaultModule
public Boolean isDefaultModule()
- Specified by:
isDefaultModule in interface org.broadleafcommerce.core.pricing.service.module.ShippingModule
setDefaultModule
public void setDefaultModule(Boolean isDefaultModule)
- Specified by:
setDefaultModule in interface org.broadleafcommerce.core.pricing.service.module.ShippingModule
Copyright © 2012. All Rights Reserved.