Ejemplo n.º 1
0
 private static IEnumerable <string> GetEnabledInternationalService(Dictionary <string, string> items)
 {
     if (ShippingMethod.GetBooleanParam(items, UspsTemplate.GlobalExpressGuaranteed))
     {
         yield return(UspsTemplate.GlobalExpressGuaranteed);
     }
     if (ShippingMethod.GetBooleanParam(items, UspsTemplate.GlobalExpressGuaranteedNonDocumentRectangular))
     {
         yield return(UspsTemplate.GlobalExpressGuaranteedNonDocumentRectangular);
     }
     if (ShippingMethod.GetBooleanParam(items, UspsTemplate.GlobalExpressGuaranteedNonDocumentNonRectangular))
     {
         yield return(UspsTemplate.GlobalExpressGuaranteedNonDocumentNonRectangular);
     }
     if (ShippingMethod.GetBooleanParam(items, UspsTemplate.UspsGxgEnvelopes))
     {
         yield return(UspsTemplate.UspsGxgEnvelopes);
     }
     if (ShippingMethod.GetBooleanParam(items, UspsTemplate.ExpressMailInternationalFlatRateEnvelope))
     {
         yield return(UspsTemplate.ExpressMailInternationalFlatRateEnvelope);
     }
     if (ShippingMethod.GetBooleanParam(items, UspsTemplate.PriorityMailInternational))
     {
         yield return(UspsTemplate.PriorityMailInternational);
     }
     if (ShippingMethod.GetBooleanParam(items, UspsTemplate.PriorityMailInternationalLargeFlatRateBox))
     {
         yield return(UspsTemplate.PriorityMailInternationalLargeFlatRateBox);
     }
     if (ShippingMethod.GetBooleanParam(items, UspsTemplate.PriorityMailInternationalMediumFlatRateBox))
     {
         yield return(UspsTemplate.PriorityMailInternationalMediumFlatRateBox);
     }
     if (ShippingMethod.GetBooleanParam(items, UspsTemplate.PriorityMailInternationalSmallFlatRateBox))
     {
         yield return(UspsTemplate.PriorityMailInternationalSmallFlatRateBox);
     }
     if (ShippingMethod.GetBooleanParam(items, UspsTemplate.FirstClassMailInternationalLargeEnvelope))
     {
         yield return(UspsTemplate.FirstClassMailInternationalLargeEnvelope);
     }
     if (ShippingMethod.GetBooleanParam(items, UspsTemplate.ExpressMailInternational))
     {
         yield return(UspsTemplate.ExpressMailInternational);
     }
     if (ShippingMethod.GetBooleanParam(items, UspsTemplate.PriorityMailInternationalFlatRateEnvelope))
     {
         yield return(UspsTemplate.PriorityMailInternationalFlatRateEnvelope);
     }
     if (ShippingMethod.GetBooleanParam(items, UspsTemplate.FirstClassMailInternationalPackage))
     {
         yield return(UspsTemplate.FirstClassMailInternationalPackage);
     }
 }
Ejemplo n.º 2
0
        private static string GetEnabledService(Dictionary <string, string> items)
        {
            var res = new StringBuilder();

            if (ShippingMethod.GetBooleanParam(items, UpsTemplate.UpsNextDayAir))
            {
                res.Append(UpsTemplate.UpsNextDayAir + ";");
            }
            if (ShippingMethod.GetBooleanParam(items, UpsTemplate.Ups2NdDayAir))
            {
                res.Append(UpsTemplate.Ups2NdDayAir + ";");
            }
            if (ShippingMethod.GetBooleanParam(items, UpsTemplate.UpsGround))
            {
                res.Append(UpsTemplate.UpsGround + ";");
            }
            if (ShippingMethod.GetBooleanParam(items, UpsTemplate.UpsWorldwideExpress))
            {
                res.Append(UpsTemplate.UpsWorldwideExpress + ";");
            }
            if (ShippingMethod.GetBooleanParam(items, UpsTemplate.UpsWorldwideExpedited))
            {
                res.Append(UpsTemplate.UpsWorldwideExpedited + ";");
            }
            if (ShippingMethod.GetBooleanParam(items, UpsTemplate.UpsStandard))
            {
                res.Append(UpsTemplate.UpsStandard + ";");
            }
            if (ShippingMethod.GetBooleanParam(items, UpsTemplate.Ups3DaySelect))
            {
                res.Append(UpsTemplate.Ups3DaySelect + ";");
            }
            if (ShippingMethod.GetBooleanParam(items, UpsTemplate.UpsNextDayAirSaver))
            {
                res.Append(UpsTemplate.UpsNextDayAirSaver + ";");
            }
            if (ShippingMethod.GetBooleanParam(items, UpsTemplate.UpsNextDayAirEarlyAm))
            {
                res.Append(UpsTemplate.UpsNextDayAirEarlyAm + ";");
            }
            if (ShippingMethod.GetBooleanParam(items, UpsTemplate.UpsWorldwideExpressPlus))
            {
                res.Append(UpsTemplate.UpsWorldwideExpressPlus + ";");
            }
            if (ShippingMethod.GetBooleanParam(items, UpsTemplate.Ups2NdDayAirAm))
            {
                res.Append(UpsTemplate.Ups2NdDayAirAm + ";");
            }
            if (ShippingMethod.GetBooleanParam(items, UpsTemplate.UpsSaver))
            {
                res.Append(UpsTemplate.UpsSaver + ";");
            }
            if (ShippingMethod.GetBooleanParam(items, UpsTemplate.UpsTodayStandard))
            {
                res.Append(UpsTemplate.UpsTodayStandard + ";");
            }
            if (ShippingMethod.GetBooleanParam(items, UpsTemplate.UpsTodayDedicatedCourrier))
            {
                res.Append(UpsTemplate.UpsTodayDedicatedCourrier + ";");
            }
            if (ShippingMethod.GetBooleanParam(items, UpsTemplate.UpsTodayExpress))
            {
                res.Append(UpsTemplate.UpsTodayExpress + ";");
            }
            if (ShippingMethod.GetBooleanParam(items, UpsTemplate.UpsTodayExpressSaver))
            {
                res.Append(UpsTemplate.UpsTodayExpressSaver + ";");
            }

            return(res.ToString());
        }
Ejemplo n.º 3
0
        private static IEnumerable <string> GetEnabledDomesticService(Dictionary <string, string> items)
        {
            if (ShippingMethod.GetBooleanParam(items, UspsTemplate.FirstClass))
            {
                yield return(UspsTemplate.FirstClass);
            }
            if (ShippingMethod.GetBooleanParam(items, UspsTemplate.ExpressMailSundayHolidayGuarantee))
            {
                yield return(UspsTemplate.ExpressMailSundayHolidayGuarantee);
            }
            if (ShippingMethod.GetBooleanParam(items, UspsTemplate.ExpressMailFlatRateEnvelopeSundayHolidayGuarantee))
            {
                yield return(UspsTemplate.ExpressMailFlatRateEnvelopeSundayHolidayGuarantee);
            }
            if (ShippingMethod.GetBooleanParam(items, UspsTemplate.ExpressMailHoldForPickup))
            {
                yield return(UspsTemplate.ExpressMailHoldForPickup);
            }
            if (ShippingMethod.GetBooleanParam(items, UspsTemplate.ExpressMailFlatRateEnvelopeHoldForPickup))
            {
                yield return(UspsTemplate.ExpressMailFlatRateEnvelopeHoldForPickup);
            }
            if (ShippingMethod.GetBooleanParam(items, UspsTemplate.ExpresMail))
            {
                yield return(UspsTemplate.ExpresMail);
            }
            if (ShippingMethod.GetBooleanParam(items, UspsTemplate.ExpressMailFlatRateEnvelope))
            {
                yield return(UspsTemplate.ExpressMailFlatRateEnvelope);
            }
            if (ShippingMethod.GetBooleanParam(items, UspsTemplate.PriorityMail))
            {
                yield return(UspsTemplate.PriorityMail);
            }
            if (ShippingMethod.GetBooleanParam(items, UspsTemplate.PriorityMailFlatRateEnvelope))
            {
                yield return(UspsTemplate.PriorityMailFlatRateEnvelope);
            }
            if (ShippingMethod.GetBooleanParam(items, UspsTemplate.PriorityMailSmallFlatRateBox))
            {
                yield return(UspsTemplate.PriorityMailSmallFlatRateBox);
            }
            if (ShippingMethod.GetBooleanParam(items, UspsTemplate.PriorityMailMediumFlatRateBox))
            {
                yield return(UspsTemplate.PriorityMailMediumFlatRateBox);
            }
            if (ShippingMethod.GetBooleanParam(items, UspsTemplate.PriorityMailLargeFlatRateBox))
            {
                yield return(UspsTemplate.PriorityMailLargeFlatRateBox);
            }
            if (ShippingMethod.GetBooleanParam(items, UspsTemplate.ParcelPost))
            {
                yield return(UspsTemplate.ParcelPost);
            }

            if (ShippingMethod.GetBooleanParam(items, UspsTemplate.BoundPrintedMatter))
            {
                yield return(UspsTemplate.BoundPrintedMatter);
            }
            if (ShippingMethod.GetBooleanParam(items, UspsTemplate.MediaMail))
            {
                yield return(UspsTemplate.MediaMail);
            }
            if (ShippingMethod.GetBooleanParam(items, UspsTemplate.LibraryMail))
            {
                yield return(UspsTemplate.LibraryMail);
            }
        }
Ejemplo n.º 4
0
        private static string GetEnabledService(Dictionary <string, string> items)
        {
            var res = new StringBuilder();


            if (ShippingMethod.GetBooleanParam(items, FedExTemplate.EuropeFirstInternationalPriority))
            {
                res.Append(FedExTemplate.EuropeFirstInternationalPriority + ";");
            }
            if (ShippingMethod.GetBooleanParam(items, FedExTemplate.Fedex1DayFreight))
            {
                res.Append(FedExTemplate.Fedex1DayFreight + ";");
            }
            if (ShippingMethod.GetBooleanParam(items, FedExTemplate.Fedex2Day))
            {
                res.Append(FedExTemplate.Fedex2Day + ";");
            }
            if (ShippingMethod.GetBooleanParam(items, FedExTemplate.Fedex2DayFreight))
            {
                res.Append(FedExTemplate.Fedex2DayFreight + ";");
            }
            if (ShippingMethod.GetBooleanParam(items, FedExTemplate.Fedex3DayFreight))
            {
                res.Append(FedExTemplate.Fedex3DayFreight + ";");
            }
            if (ShippingMethod.GetBooleanParam(items, FedExTemplate.FedexExpressSaver))
            {
                res.Append(FedExTemplate.FedexExpressSaver + ";");
            }
            if (ShippingMethod.GetBooleanParam(items, FedExTemplate.FedexGround))
            {
                res.Append(FedExTemplate.FedexGround + ";");
            }
            if (ShippingMethod.GetBooleanParam(items, FedExTemplate.FirstOvernight))
            {
                res.Append(FedExTemplate.FirstOvernight + ";");
            }
            if (ShippingMethod.GetBooleanParam(items, FedExTemplate.GroundHomeDelivery))
            {
                res.Append(FedExTemplate.GroundHomeDelivery + ";");
            }
            if (ShippingMethod.GetBooleanParam(items, FedExTemplate.InternationalDistributionFreight))
            {
                res.Append(FedExTemplate.InternationalDistributionFreight + ";");
            }
            if (ShippingMethod.GetBooleanParam(items, FedExTemplate.InternationalEconomy))
            {
                res.Append(FedExTemplate.InternationalEconomy + ";");
            }
            if (ShippingMethod.GetBooleanParam(items, FedExTemplate.InternationalEconomyDistribution))
            {
                res.Append(FedExTemplate.InternationalEconomyDistribution + ";");
            }
            if (ShippingMethod.GetBooleanParam(items, FedExTemplate.InternationalEconomyFreight))
            {
                res.Append(FedExTemplate.InternationalEconomyFreight + ";");
            }
            if (ShippingMethod.GetBooleanParam(items, FedExTemplate.InternationalFirst))
            {
                res.Append(FedExTemplate.InternationalFirst + ";");
            }
            if (ShippingMethod.GetBooleanParam(items, FedExTemplate.InternationalPriority))
            {
                res.Append(FedExTemplate.InternationalPriority + ";");
            }
            if (ShippingMethod.GetBooleanParam(items, FedExTemplate.InternationalPriorityFreight))
            {
                res.Append(FedExTemplate.InternationalPriorityFreight + ";");
            }
            if (ShippingMethod.GetBooleanParam(items, FedExTemplate.PriorityOvernight))
            {
                res.Append(FedExTemplate.PriorityOvernight + ";");
            }
            if (ShippingMethod.GetBooleanParam(items, FedExTemplate.SmartPost))
            {
                res.Append(FedExTemplate.SmartPost + ";");
            }
            if (ShippingMethod.GetBooleanParam(items, FedExTemplate.StandardOvernight))
            {
                res.Append(FedExTemplate.StandardOvernight + ";");
            }
            if (ShippingMethod.GetBooleanParam(items, FedExTemplate.FedexFreight))
            {
                res.Append(FedExTemplate.FedexFreight + ";");
            }
            if (ShippingMethod.GetBooleanParam(items, FedExTemplate.FedexNationalFreight))
            {
                res.Append(FedExTemplate.FedexNationalFreight + ";");
            }

            return(res.ToString());
        }