Example #1
0
        public static WeightBasedShippingMethodPart BuildWeightBasedShippingMethod(
            decimal price,
            double minimumWeight = 0,
            double maximumWeight = double.PositiveInfinity)
        {
            var result = new WeightBasedShippingMethodPart();

            ContentHelpers.PreparePart <WeightBasedShippingMethodPart, WeightBasedShippingMethodPartRecord>(result,
                                                                                                            "WeightBasedShippingMethod", 0);
            result.Price         = price;
            result.MinimumWeight = minimumWeight;
            result.MaximumWeight = maximumWeight;
            return(result);
        }
Example #2
0
        public static SizeBasedShippingMethodPart BuildSizeBasedShippingMethod(
            decimal price,
            string size  = null,
            int priority = 0)
        {
            var result = new SizeBasedShippingMethodPart();

            ContentHelpers.PreparePart <SizeBasedShippingMethodPart, SizeBasedShippingMethodPartRecord>(result,
                                                                                                        "SizeBasedShippingMethod", 0);
            result.Price    = price;
            result.Size     = size;
            result.Priority = priority;
            return(result);
        }
Example #3
0
        public static UspsShippingMethodPart BuildUspsShippingMethod(
            string size         = null,
            int priority        = 0,
            int minimumQuantity = 0,
            int maximumQuantity = 0,
            bool countDistinct  = false)
        {
            var result = new UspsShippingMethodPart();

            ContentHelpers.PreparePart <UspsShippingMethodPart, UspsShippingMethodPartRecord>(result,
                                                                                              "UspsShippingMethod", 0);
            result.Size            = size;
            result.Priority        = priority;
            result.MinimumQuantity = minimumQuantity;
            result.MaximumQuantity = maximumQuantity;
            result.CountDistinct   = countDistinct;
            return(result);
        }