public void ManifestShipment() { ShippingManifestRequest manifestRequest = CreateManifestRequest("0405510200882103615281"); VisibleRequest visibleRequest = new VisibleRequest(manifestRequest, "ShippingManifest/Create"); ShippingManifestResponse manifestResponse = visibleRequest.Execute <ShippingManifestResponse>(); Assert.AreEqual(0, manifestResponse.ResultCode); }
public void CreateAndManifestShipment() { // Create label LabelRequest labelRequest = CreateLabelRequest(); VisibleRequest visibleRequest = new VisibleRequest(labelRequest, "Label/Create"); LabelResponse labelResponse = visibleRequest.Execute <LabelResponse>(); Assert.AreEqual(0, labelResponse.ResultCode); // Manifest Shipment ShippingManifestRequest manifestRequest = CreateManifestRequest(labelResponse.TrackingNumber); visibleRequest = new VisibleRequest(manifestRequest, "ShippingManifest/Create"); ShippingManifestResponse manifestResponse = visibleRequest.Execute <ShippingManifestResponse>(); Assert.AreEqual(0, manifestResponse.ResultCode); }
private ShippingManifestRequest CreateManifestRequest(string trackingNumber = "") { ShippingManifestRequest manifestRequest = new ShippingManifestRequest(); manifestRequest.ClientName = "ProStar"; manifestRequest.SubClientName = ""; manifestRequest.SecurityToken = SecurityToken; manifestRequest.Carrier = "USPS"; manifestRequest.Manifest = new ShippingManifest() { TrackingNumbers = new List <string>() { trackingNumber }, InductionPostalCode = FromAddress.PostalCode, ShipFromAddress = FromAddress, NumberOfPallets = 1, }; return(manifestRequest); }