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
FieldsFields inherited from class com.softslate.commerce.businessobjects.shipping.BaseShippingProcessor
currentDropShipperID, dropShipperIDs, dropShippers -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate com.fedex.rate.stub.RateRequestbuildRateRequest(Map parameters) com.fedex.rate.stub.RequestedShipmentbuildRequestedShipment(Map parameters) private com.fedex.rate.stub.ClientDetailprotected com.fedex.rate.stub.DropoffTypecom.fedex.rate.stub.RequestedPackageLineItemcreatePackage(Map parameters, OrderShippingRule osr, int count) protected CollectioncreatePackages(Map parameters) protected com.fedex.rate.stub.PackagingTypeprotected com.fedex.rate.stub.PartycreateRecipientParty(Map parameters) protected com.fedex.rate.stub.PartycreateShipperParty(Map parameters) protected com.fedex.rate.stub.Paymentprotected com.fedex.rate.stub.PackageSpecialServicesRequestedcom.fedex.rate.stub.SmartPostShipmentDetailcreateSmartPostShipmentDetail(String fedexSmartPostIndiciaType, String fedexSmartPostHubId) protected CalendarcreateTimestamp(boolean doOffsetWorkaround) protected Calendarprivate com.fedex.rate.stub.WebAuthenticationDetailprotected StringdeliveryDateFromTransitTimeType(com.fedex.rate.stub.TransitTimeType transitTimeType) doGlobalExtraCharge(Collection mergedRates) booleanisInCommaSeparatedString(String value, String commaSeparatedString) protected booleanisResponseBenignError(com.fedex.rate.stub.RateReply reply) private booleanisResponseOk(com.fedex.rate.stub.NotificationSeverityType notificationSeverityType) lookUpNameFromCode(String code) private MapprocessErrors(com.fedex.rate.stub.Notification[] notifications) private MapprocessRateResponse(Map parameters, com.fedex.rate.stub.RateReply reply) intrequestRates(Map parameters) protected inttransitTimeIntFromTransitTimeType(com.fedex.rate.stub.TransitTimeType transitTimeType) private voidupdateEndPoint(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, 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
-
log
static org.apache.commons.logging.Log log
-
-
Constructor Details
-
FedExShippingProcessor
public FedExShippingProcessor()
-
-
Method Details
-
loadShippingOptions
- Specified by:
loadShippingOptionsin classBaseShippingProcessor- Throws:
Exception
-
processShipping
- Specified by:
processShippingin 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)
-