/// <summary> /// Create a new box /// </summary> /// <param name="carrier">The carrier</param> /// <param name="trackingNumber">The Tracking number.</param> /// <param name="lookup">The lookup value</param> /// <returns></returns> public static ShipItemBox CreateBox(string carrier, string trackingNumber, Dictionary <string, AutoGen.ItemShippingInformation> lookup) { ShipItemBox retVal = new ShipItemBox(carrier, trackingNumber); retVal._lookup = lookup; retVal.Carrier = carrier; retVal.TrackingNumber = trackingNumber; return(retVal); }
/// <summary> /// Add a new item based on a MerchantItemID /// </summary> /// <param name="carrier"> /// The <carrier> tag contains the name of the company /// responsible for shipping the item. Valid values for this /// tag are DHL, FedEx, UPS, USPS and Other. /// </param> /// <param name="trackingNumber"> /// The <tracking-number> tag contains the shipper's tracking /// number that is associated with an order. /// </param> /// <param name="merchantItemID"> /// The <merchant-item-id> tag contains a value, /// such as a stock keeping unit (SKU), /// that you use to uniquely identify an item. /// </param> public void AddMerchantItemId(string carrier, string trackingNumber, string merchantItemID) { ShipItemBox box = null; if (!_boxes.TryGetValue(trackingNumber, out box)) { box = ShipItemBox.CreateBox(carrier, trackingNumber, _items); _boxes[trackingNumber] = box; } box.AddMerchantItemID(merchantItemID); }
/// <summary> /// Add a new box to the order that items will be placed in. /// </summary> /// <param name="carrier"> /// The <carrier> tag contains the name of the company /// responsible for shipping the item. Valid values for this /// tag are DHL, FedEx, UPS, USPS and Other. /// </param> /// <param name="trackingNumber"> /// The <tracking-number> tag contains the shipper's tracking /// number that is associated with an order. /// </param> /// <returns></returns> public ShipItemBox AddBox(string carrier, string trackingNumber) { if (_boxes.ContainsKey(trackingNumber)) { throw new ApplicationException( "You attempted to add a duplicate tracking number."); } ShipItemBox retVal = ShipItemBox.CreateBox(carrier, trackingNumber, _items); _boxes.Add(trackingNumber, retVal); return(retVal); }
/// <summary> /// Create a new box /// </summary> /// <param name="carrier">The carrier</param> /// <param name="trackingNumber">The Tracking number.</param> /// <param name="lookup">The lookup value</param> /// <returns></returns> public static ShipItemBox CreateBox(string carrier, string trackingNumber, Dictionary<string, AutoGen.ItemShippingInformation> lookup) { ShipItemBox retVal = new ShipItemBox(carrier, trackingNumber); retVal._lookup = lookup; retVal.Carrier = carrier; retVal.TrackingNumber = trackingNumber; return retVal; }