コード例 #1
0
        private decimal CalculateMaxWeightPerPackage(DomesticServiceType s, DomesticPackageType packageType)
        {
            if (s == DomesticServiceType.FirstClass)
            {
                if (packageType == DomesticPackageType.FirstClassLetter)
                {
                    return(USPostalConstants.MaxFirstClassLetterWeightInPounds);
                }
                return(USPostalConstants.MaxFirstClassWeightInPounds);
            }

            return(USPostalConstants.MaxWeightInPounds);
        }
コード例 #2
0
        private decimal CalculateMaxWeightPerPackage(DomesticServiceType s, DomesticPackageType packageType)
        {
            if (s == DomesticServiceType.FirstClass)
            {
                if (packageType == DomesticPackageType.FirstClassLetter) return USPostalConstants.MaxFirstClassLetterWeightInPounds;
                return USPostalConstants.MaxFirstClassWeightInPounds;
            }

            return USPostalConstants.MaxWeightInPounds;            
        }
コード例 #3
0
        public string TranslateContainerCode(DomesticPackageType package)
        {
            switch (package)
            {
            case DomesticPackageType.FirstClassFlat:
                return("FLAT");

            case DomesticPackageType.FirstClassLetter:
                return("LETTER");

            case DomesticPackageType.FirstClassParcel:
                return("PARCEL");

            case DomesticPackageType.FirstClassPostCard:
                return("POSTCARD");

            case DomesticPackageType.FlatRateBox:
                return("FLAT RATE BOX");

            case DomesticPackageType.FlatRateBoxLarge:
                return("LG FLAT RATE BOX");

            case DomesticPackageType.FlatRateBoxMedium:
                return("MD FLAT RATE BOX");

            case DomesticPackageType.FlatRateBoxSmall:
                return("SM FLAT RATE BOX");

            case DomesticPackageType.FlatRateEnvelope:
                return("FLAT RATE ENVELOPE");

            case DomesticPackageType.FlatRateEnvelopePadded:
                return("PADDED FLAT RATE ENVELOPE");

            case DomesticPackageType.FlatRateEnvelopeLegal:
                return("LEGAL FLAT RATE ENVELOPE");

            case DomesticPackageType.FlatRateEnvelopeWindow:
                return("WINDOW FLAT RATE ENVELOPE");

            case DomesticPackageType.FlatRateEnvelopeGiftCard:
                return("GIFT CARD FLAT RATE ENVELOPE");

            case DomesticPackageType.RegionalBoxRateA:
                return("REGIONAL BOX RATE A");

            case DomesticPackageType.RegionalBoxRateB:
                return("REGIONAL BOX RATE B");

            case DomesticPackageType.Ignore:
                return("VARIABLE");

            case DomesticPackageType.NonRectangular:
                return("NONRECTANGULAR");

            case DomesticPackageType.Rectangular:
                return("RECTANGULAR");

            case DomesticPackageType.Variable:
                return("VARIABLE");
            }
            return("VARIABLE");
        }
コード例 #4
0
 public string TranslateContainerCode(DomesticPackageType package)
 {
     switch (package)
     {
         case DomesticPackageType.FirstClassFlat:
             return "FLAT";
         case DomesticPackageType.FirstClassLetter:
             return "LETTER";
         case DomesticPackageType.FirstClassParcel:
             return "PARCEL";
         case DomesticPackageType.FirstClassPostCard:
             return "POSTCARD";
         case DomesticPackageType.FlatRateBox:
             return "FLAT RATE BOX";
         case DomesticPackageType.FlatRateBoxLarge:
             return "LG FLAT RATE BOX";
         case DomesticPackageType.FlatRateBoxMedium:
             return "MD FLAT RATE BOX";
         case DomesticPackageType.FlatRateBoxSmall:
             return "SM FLAT RATE BOX";
         case DomesticPackageType.FlatRateEnvelope:
             return "FLAT RATE ENVELOPE";
         case DomesticPackageType.FlatRateEnvelopePadded:
             return "PADDED FLAT RATE ENVELOPE";
         case DomesticPackageType.FlatRateEnvelopeLegal:
             return "LEGAL FLAT RATE ENVELOPE";
         case DomesticPackageType.FlatRateEnvelopeWindow:
             return "WINDOW FLAT RATE ENVELOPE";
         case DomesticPackageType.FlatRateEnvelopeGiftCard:
             return "GIFT CARD FLAT RATE ENVELOPE";
         case DomesticPackageType.RegionalBoxRateA:
             return "REGIONAL BOX RATE A";
         case DomesticPackageType.RegionalBoxRateB:
             return "REGIONAL BOX RATE B";
         case DomesticPackageType.Ignore:
             return "VARIABLE";
         case DomesticPackageType.NonRectangular:
             return "NONRECTANGULAR";
         case DomesticPackageType.Rectangular:
             return "RECTANGULAR";
         case DomesticPackageType.Variable:
             return "VARIABLE";
     }
     return "VARIABLE";
 }