Class FedExShippingProcessor
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.FedExShippingProcessor
- All Implemented Interfaces:
BusinessObject
,BusinessProcessor
,ShippingProcessor
Connects to the FedEx server for live online rates. Sends Web Service rate
requests to the FedEx server and reads the responses from it. From the
response, it builds a set of shipping options which get presented to the
customer during checkout.
- Author:
- David Tobey
- See Also:
-
Field Summary
Fields inherited from class com.softslate.commerce.businessobjects.shipping.BaseShippingProcessor
currentDropShipperID, dropShipperIDs, dropShippers
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate com.fedex.rate.stub.RateRequest
buildRateRequest
(Map parameters) com.fedex.rate.stub.RequestedShipment
buildRequestedShipment
(Map parameters) private com.fedex.rate.stub.ClientDetail
protected com.fedex.rate.stub.DropoffType
com.fedex.rate.stub.RequestedPackageLineItem
createPackage
(Map parameters, OrderShippingRule osr, int count) protected Collection
createPackages
(Map parameters) protected com.fedex.rate.stub.PackagingType
protected com.fedex.rate.stub.Party
createRecipientParty
(Map parameters) protected com.fedex.rate.stub.Party
createShipperParty
(Map parameters) protected com.fedex.rate.stub.Payment
protected com.fedex.rate.stub.PackageSpecialServicesRequested
com.fedex.rate.stub.SmartPostShipmentDetail
createSmartPostShipmentDetail
(String fedexSmartPostIndiciaType, String fedexSmartPostHubId) protected Calendar
createTimestamp
(boolean doOffsetWorkaround) protected Calendar
private com.fedex.rate.stub.WebAuthenticationDetail
protected String
deliveryDateFromTransitTimeType
(com.fedex.rate.stub.TransitTimeType transitTimeType) doGlobalExtraCharge
(Collection mergedRates) boolean
isInCommaSeparatedString
(String value, String commaSeparatedString) protected boolean
isResponseBenignError
(com.fedex.rate.stub.RateReply reply) private boolean
isResponseOk
(com.fedex.rate.stub.NotificationSeverityType notificationSeverityType) lookUpNameFromCode
(String code) private Map
processErrors
(com.fedex.rate.stub.Notification[] notifications) private Map
processRateResponse
(Map parameters, com.fedex.rate.stub.RateReply reply) int
requestRates
(Map parameters) protected int
transitTimeIntFromTransitTimeType
(com.fedex.rate.stub.TransitTimeType transitTimeType) private void
updateEndPoint
(com.fedex.rate.stub.RateServiceLocator serviceLocator) 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
-
log
static org.apache.commons.logging.Log log
-
-
Constructor Details
-
FedExShippingProcessor
public FedExShippingProcessor()
-
-
Method Details
-
loadShippingOptions
- Specified by:
loadShippingOptions
in classBaseShippingProcessor
- Throws:
Exception
-
processShipping
- Specified by:
processShipping
in classBaseShippingProcessor
- Throws:
Exception
-
requestRates
- Throws:
Exception
-
buildRateRequest
-
buildRequestedShipment
-
createTimestampWithOffsetWorkaround
-
createTimestamp
-
createDropoffType
protected com.fedex.rate.stub.DropoffType createDropoffType() -
createPackagingType
protected com.fedex.rate.stub.PackagingType createPackagingType() -
createShipperParty
-
createRecipientParty
-
createShippingChargesPayment
protected com.fedex.rate.stub.Payment createShippingChargesPayment() -
createSignatureOption
protected com.fedex.rate.stub.PackageSpecialServicesRequested createSignatureOption() -
createPackages
-
createPackage
public com.fedex.rate.stub.RequestedPackageLineItem createPackage(Map parameters, OrderShippingRule osr, int count) -
createSmartPostShipmentDetail
-
processRateResponse
private Map processRateResponse(Map parameters, com.fedex.rate.stub.RateReply reply) throws Exception - Throws:
Exception
-
isResponseOk
private boolean isResponseOk(com.fedex.rate.stub.NotificationSeverityType notificationSeverityType) -
isResponseBenignError
protected boolean isResponseBenignError(com.fedex.rate.stub.RateReply reply) -
createClientDetail
private com.fedex.rate.stub.ClientDetail createClientDetail() -
createWebAuthenticationDetail
private com.fedex.rate.stub.WebAuthenticationDetail createWebAuthenticationDetail() -
processErrors
-
updateEndPoint
private void updateEndPoint(com.fedex.rate.stub.RateServiceLocator serviceLocator) -
isInCommaSeparatedString
-
doGlobalExtraCharge
-
missingRequiredSettings
-
lookUpNameFromCode
-
deliveryDateFromTransitTimeType
protected String deliveryDateFromTransitTimeType(com.fedex.rate.stub.TransitTimeType transitTimeType) -
transitTimeIntFromTransitTimeType
protected int transitTimeIntFromTransitTimeType(com.fedex.rate.stub.TransitTimeType transitTimeType)
-