public EntityShipment SimplePullMethodOLD(EntityShipment objRequest)
        {
            var retVal = objRequest;
            if (retVal != null)
            {


                string orderStatus = "";
                string orderNum = "";

                try
                {
                    orderStatus = "Completed";
                    orderNum = objRequest.strDeliveryDocNumber;
                    if (!string.IsNullOrEmpty(objRequest.strDeliveryDocNumber) && objRequest.ToolKit.ID != null && objRequest.ToolKit.ID.ToLower() == "select")
                    {
                        orderDetailsResult = databaseHelper.GetOrderDetails(orderNum);

                    }
                }
                catch (Exception e) { }


                if (orderStatus != "Deleted" && orderStatus != "")
                {



                    #region Process Data


                    string CompName;
                    string ContactName;
                    string Region = "";
                    string payorTerms = "";
                    string payorAcct = "";


                    CompName = orderDetailsResult.ORGANIZATION;
                    ContactName = orderDetailsResult.NAME;


                    payorTerms = "THIRDPARTY";
                    payorAcct = "251144621";//package.LineItems[0].LineItem.ShipToAddress.ShipperAccount;

                    #endregion

                    //Add shipping information to the return object

                    #region Add Shipping Information

                    retVal.objShipTo = new EntityAddress();

                    retVal.objShipTo.strCompanyName = CompName;
                    //retVal.objShipTo.strCustomerID = 
                    retVal.objShipTo.strContactName = ContactName;
                    retVal.objShipTo.strAddressLine1 = orderDetailsResult.LABEL_LINE_1; //"1915 ARCH STREET"; 
                    retVal.objShipTo.strAddressLine2 = orderDetailsResult.LABEL_LINE_2; //"Suite 456";
                    retVal.objShipTo.strAddressLine3 = orderDetailsResult.LABEL_LINE_3 + " " + orderDetailsResult.LABEL_LINE_4 + " " +
                        orderDetailsResult.LABEL_LINE_5 + " " + orderDetailsResult.LABEL_LINE_6 + " " + orderDetailsResult.LABEL_LINE_7;
                    retVal.objShipTo.strCity = orderDetailsResult.CITY; //"PHILADELPHIA";
                    retVal.objShipTo.strState = orderDetailsResult.STATE;//"PA";
                    retVal.objShipTo.strPostalCode = orderDetailsResult.ZIP;
                    retVal.objShipTo.strCountryCode = orderDetailsResult.COUNTRY;//"US";
                    retVal.objDetails.strPONumber = orderNum;
                    retVal.objDetails.strInvoiceNumber = orderNum;
                    retVal.strCustomerRefernceValue = orderNum;
                    retVal.objShipTo.strPhoneNumber = orderDetailsResult.PHONE;

                    //retVal.strAdditionalIdentifier = orderNum;
                    retVal.strInvoiceNumber = orderNum;

                    retVal.objShipMethod = new EntityShipMethod();

                    retVal.objShipMethod.strShipViaCode = "12345"; //package.LineItems[0].LineItem.ShipToAddress.CarrierMethod.SLCode;
                    retVal.objShipMethod.strPaymentTerms = payorTerms;
                    retVal.objShipMethod.strPayorAccountNumber = payorAcct;

                   
                        retVal.objShipMethod.PaymentTermType = ePaymentTerms.ThirdParty;
                        retVal.objBillTo = new EntityAddress();
                        retVal.objBillTo.strAccountNumber = payorAcct;
                        retVal.objBillTo.strCountryCode = orderDetailsResult.COUNTRY;
                        retVal.objBillTo.strPostalCode = orderDetailsResult.ZIP;


                  
                    //Add the line items
                    List<OrderItemResult> orderItemResult = databaseHelper.GetOrderItems(objRequest.strDeliveryDocNumber);

                    int maxRecords = 50;
                    EntityPackageGroup EPG = new EntityPackageGroup();
                    EPG.lstLineItem = new List<EntityLineItem>(); ;

                    foreach (var  line in orderItemResult.Take(maxRecords))
                    {
                        EntityLineItem lineItem = new EntityLineItem();
                        lineItem.strItemNumber = line.order_address_id;
                        lineItem.intOrderedQuantity = string.IsNullOrEmpty(line.Quantity) ? 0 : Convert.ToInt32(line.Quantity); ;
                        lineItem.strItemDescription = (line.BookTitle ?? "") + " " + (line.ISBN ?? ""); ;

                        lineItem.dblPieceWeight = 2;
                        lineItem.dblPieceValue = 100;       // recommended
                        lineItem.DistributionType = 0;
                        lineItem.blnHazardousMaterial = false;
                        EPG.lstLineItem.Add(lineItem);

                        EPG.lstLineItem.Add(lineItem);
                    }

                    EntityContainer EC = new EntityContainer();
                    EC.lstPackageGroup = new List<EntityPackageGroup>();
                    EC.lstPackageGroup.Add(EPG);
                    EC.objPackageWeight = new PackageWeight();
                    EC.strAlternatePackageID = "9876"; //package.Id.ToString();

                    retVal.lstContainer = new List<EntityContainer>();
                    retVal.lstContainer.Add(EC);

                    

                    #endregion

                }



            }
            string jsonRequest = System.Text.Json.JsonSerializer.Serialize(
             retVal,
             new JsonSerializerOptions
             {
                 WriteIndented = true,
                 DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull
             });

            LogRequestMessage("STEP 10: JSON serialized, logging result");
            LogRequestMessage(jsonRequest);

            return retVal;
        }
