Exemplo n.º 1
0
 public virtual TrackInfo TrackShipment(ShippingSession session, IShippingContext context, string carrierID, string trackingNumber)
 {
     return(new TrackInfo
     {
         TrackingURL = GetTrackingURL(session, context, carrierID, trackingNumber),
         TrackingNumber = trackingNumber,
         CarrierID = carrierID
     });
 }
Exemplo n.º 2
0
        public virtual string GetTrackingURL(ShippingSession session, IShippingContext context, string carrierID, string trackingNumber)
        {
            var carrier = GetShippingCarriers(session, context).FirstOrDefault(c => c.Name.EqualsIgnoreCase(carrierID));

            if (carrier != null &&
                carrier.TrackingURL.IsNotNullOrWhiteSpace() &&
                trackingNumber.IsNotNullOrWhiteSpace())
            {
                return(carrier.TrackingURL.Args(trackingNumber));
            }

            return(null);
        }
Exemplo n.º 3
0
 public abstract Financial.Amount?EstimateShippingCost(ShippingSession session, IShippingContext context, Shipment shipment);
Exemplo n.º 4
0
 public virtual IEnumerable <ShippingCarrier> GetShippingCarriers(ShippingSession session, IShippingContext context)
 {
     return(m_PreconfiguredShippingCarriers);
 }
Exemplo n.º 5
0
 public abstract Address ValidateAddress(ShippingSession session, IShippingContext context, Address address, out ValidateShippingAddressException error);
Exemplo n.º 6
0
 public abstract TrackInfo TrackShipment(ShippingSession session, IShippingContext context, string carrierID, string trackingNumber);
Exemplo n.º 7
0
 public abstract Label CreateLabel(ShippingSession session, IShippingContext context, Shipment shipment);
Exemplo n.º 8
0
 public abstract ShippingRate EstimateShippingCost(ShippingSession session, IShippingContext context, Shipment shipment);
Exemplo n.º 9
0
 public abstract Exception ValidateAddress(ShippingSession session, IShippingContext context, Address address);
Exemplo n.º 10
0
 public abstract Label CreateReturnLabel(ShippingSession session, IShippingContext context, Shipment shipment, object labelID);