Class USPSShippingProcessor
java.lang.Object
com.softslate.commerce.businessobjects.core.BaseBusinessObject
com.softslate.commerce.businessobjects.core.BaseBusinessProcessor
com.softslate.commerce.businessobjects.shipping.BaseShippingProcessor
com.softslate.commerce.businessobjects.shipping.USPSShippingProcessor
- All Implemented Interfaces:
BusinessObject
,BusinessProcessor
,ShippingProcessor
Connects to the USPS server for live online rates. Sends XML rate requests to
the USPS server and reads the XML responses from it. From the XML Response,
it builds a set of shipping options which get presented to the customer
during checkout.
- Author:
- ajain, dtobey
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionboolean
double
boolean
static final String
boolean
(package private) static org.apache.commons.logging.Log
boolean
Fields inherited from class com.softslate.commerce.businessobjects.shipping.BaseShippingProcessor
currentDropShipperID, dropShipperIDs, dropShippers
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreatePackageNode
(Document document1, OrderShippingRule osr) protected boolean
doDimensions
(Document document1, Element p1, OrderShippingRule osr) boolean
formatIntlV2Rates
(String xml) formatRateV4Rates
(String xml) getCountryFromCode
(String country) getWeightInOunces
(Double weight) getWeightInPounds
(Double weight) getXmlFromUsps
(boolean isDomestic) boolean
isInCommaSeparatedString
(String value, String commaSeparatedString) int
void
Methods inherited from class com.softslate.commerce.businessobjects.shipping.BaseShippingProcessor
doEstimatedDeliveryDate, doEstimatedDeliveryDateWithShipDateToday, findPackageWeight, formatDeliveryDate, getAvailableOptions, getShippingOption, isBlackedOutHoliday, isPackageOkToCreate, loadShippingOptions, mergeRates, orderHasGiftCertificatesOnly, processShipping, pushPastWeekendsAndHolidays, retrieveDropShippersFromOrder, setAvailableOptions, setShippingOption, updateOrderDeliveryAddressIfPickUp, updateOrderWithOption, updateOrderWithOptionPrice, updateTotalsAndStatuses, updateTotalsAndStatusesInDatabase, verifyOption
Methods inherited from class com.softslate.commerce.businessobjects.core.BaseBusinessProcessor
formatDateTime, formatPrice, getAppComponents, getAppSettings, getAttributeIDs, getBusinessObjectFactory, getDaoFactory, getEventBus, getInjector, getProductIDs, getSettings, getUser, initialize, isProcessorClassActive, loadMatchingSkus, parseDateTime, parseResponseData, prepareRequestData, sendHTTPGet, sendHTTPPost, sendHTTPPost, setAppComponents, setAppSettings, setBusinessObjectFactory, setDaoFactory, setEventBus, setInjector, setSettings, setUser, updateOrderTotals, updateOrderTotals, updateOrderTotals, utils
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.softslate.commerce.businessobjects.core.BusinessObject
initialize
Methods inherited from interface com.softslate.commerce.businessobjects.shipping.ShippingProcessor
loadShippingOptions, processShipping
-
Field Details
-
FIRST_CLASS_MAIL_PACKAGE
- See Also:
-
log
static org.apache.commons.logging.Log log -
totalShipmentWeight
-
URL
-
USERID
-
SHIPPER_ZIP
-
machinable
-
uspsExtraCharge
-
uspsExtraWeight
-
default_Weight_Pounds
-
default_Weight_Ounces
-
package_Size
-
USPS_PackageUseDimensions
public boolean USPS_PackageUseDimensions -
default_Width
-
default_Length
-
default_Height
-
USPS_Destination
-
uspsDomesticServices
-
uspsInternationalServices
-
domesticService
public boolean domesticService -
internationalService
public boolean internationalService -
addInsuranceInternational
public boolean addInsuranceInternational -
default_Girth
-
stateAndCountries
-
default_Insurance
-
default_Insurance_double
public double default_Insurance_double
-
-
Constructor Details
-
USPSShippingProcessor
public USPSShippingProcessor()
-
-
Method Details
-
loadShippingOptions
- Specified by:
loadShippingOptions
in classBaseShippingProcessor
- Throws:
Exception
-
getXmlFromUsps
- Throws:
Exception
-
processShipping
- Specified by:
processShipping
in classBaseShippingProcessor
- Throws:
Exception
-
createRateV4Request
- Throws:
Exception
-
createIntlRateV2Request
- Throws:
Exception
-
createPackageNode
-
doDimensions
-
formatRateV4Rates
- Throws:
Exception
-
formatIntlV2Rates
- Throws:
Exception
-
doErrors
-
setUSPSSettings
- Throws:
Exception
-
getCountryFromCode
-
getWeightInOunces
-
getWeightInPounds
-
doSize
-
doGirth
-
isInCommaSeparatedString
-