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
FieldsModifier and TypeFieldDescriptionbooleandoublebooleanstatic final Stringboolean(package private) static org.apache.commons.logging.LogbooleanFields inherited from class com.softslate.commerce.businessobjects.shipping.BaseShippingProcessor
currentDropShipperID, dropShipperIDs, dropShippers -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreatePackageNode(Document document1, OrderShippingRule osr) protected booleandoDimensions(Document document1, Element p1, OrderShippingRule osr) booleanformatIntlV2Rates(String xml) formatRateV4Rates(String xml) getCountryFromCode(String country) getWeightInOunces(Double weight) getWeightInPounds(Double weight) getXmlFromUsps(boolean isDomestic) booleanisInCommaSeparatedString(String value, String commaSeparatedString) intvoidMethods 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, verifyOptionMethods 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, utilsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.softslate.commerce.businessobjects.core.BusinessObject
initializeMethods 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:
loadShippingOptionsin classBaseShippingProcessor- Throws:
Exception
-
getXmlFromUsps
- Throws:
Exception
-
processShipping
- Specified by:
processShippingin 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
-