tags:

views:

305

answers:

0

Hi,

I am trying to generate the label for Test Case# 22 which should return the Service Code 810 but I get 800. The description says - Home Delivery, Evening, AutoPOD, Prepaid.

ProcessShipmentRequest request = new ProcessShipmentRequest();
request.RequestedShipment.ServiceType = ServiceType.GROUND_HOME_DELIVERY;
request.RequestedShipment.SpecialServicesRequested.HomeDeliveryPremiumDetail = new HomeDeliveryPremiumDetail();
request.RequestedShipment.SpecialServicesRequested.HomeDeliveryPremiumDetail.HomeDeliveryPremiumType = HomeDeliveryPremiumType.EVENING;
request.RequestedShipment.SpecialServicesRequested.HomeDeliveryPremiumDetail.Date = DateTime.Now.AddDays(4);
request.RequestedShipment.SpecialServicesRequested.HomeDeliveryPremiumDetail.DateSpecified = true;
request.RequestedShipment.SpecialServicesRequested.HomeDeliveryPremiumDetail.PhoneNumber = "9012637906";

request.RequestedShipment.RequestedPackageLineItems = new RequestedPackageLineItem[1];
request.RequestedShipment.RequestedPackageLineItems[0] = new RequestedPackageLineItem();
request.RequestedShipment.RequestedPackageLineItems[0].SequenceNumber = "1";
request.RequestedShipment.RequestedPackageLineItems[0].Weight = new Weight(); // Package weight information
request.RequestedShipment.RequestedPackageLineItems[0].Weight.Value = Decimal.Parse(input[4]);
request.RequestedShipment.RequestedPackageLineItems[0].Weight.Units = WeightUnits.LB;
//
request.RequestedShipment.RequestedPackageLineItems[0].Dimensions = new Dimensions();
request.RequestedShipment.RequestedPackageLineItems[0].Dimensions.Length = "108";
request.RequestedShipment.RequestedPackageLineItems[0].Dimensions.Width = "5";
request.RequestedShipment.RequestedPackageLineItems[0].Dimensions.Height = "5";
request.RequestedShipment.RequestedPackageLineItems[0].Dimensions.Units = LinearUnits.IN;
//
request.RequestedShipment.RequestedPackageLineItems[0].CustomerReferences = new CustomerReference[3] { new CustomerReference(), new CustomerReference(), new CustomerReference() }; // Reference details
request.RequestedShipment.RequestedPackageLineItems[0].CustomerReferences[0].CustomerReferenceType = CustomerReferenceType.CUSTOMER_REFERENCE;
request.RequestedShipment.RequestedPackageLineItems[0].CustomerReferences[0].Value = "GR4567892";
request.RequestedShipment.RequestedPackageLineItems[0].CustomerReferences[1].CustomerReferenceType = CustomerReferenceType.INVOICE_NUMBER;
request.RequestedShipment.RequestedPackageLineItems[0].CustomerReferences[1].Value = "INV4567892";
request.RequestedShipment.RequestedPackageLineItems[0].CustomerReferences[2].CustomerReferenceType = CustomerReferenceType.P_O_NUMBER;
request.RequestedShipment.RequestedPackageLineItems[0].CustomerReferences[2].Value = "PO4567892";

request.RequestedShipment.RequestedPackageLineItems[0].SpecialServicesRequested = new PackageSpecialServicesRequested();
request.RequestedShipment.RequestedPackageLineItems[0].SpecialServicesRequested.SpecialServiceTypes = new PackageSpecialServiceType[1];
request.RequestedShipment.RequestedPackageLineItems[0].SpecialServicesRequested.SpecialServiceTypes[0] = PackageSpecialServiceType.SIGNATURE_OPTION;
request.RequestedShipment.RequestedPackageLineItems[0].SpecialServicesRequested.SignatureOptionDetail = new SignatureOptionDetail();
request.RequestedShipment.RequestedPackageLineItems[0].SpecialServicesRequested.SignatureOptionDetail.OptionType = SignatureOptionType.DIRECT;

Am I missing something?

Thanks