Example #1
0
        public static API3DTO ConvertToDTO(Implementations.Pack pack)
        {
            if (pack.source == null)
            {
                return(null);
            }

            var dto = new API3DTO();

            dto.source = new Address(pack.source.post, pack.source.country, pack.source.region, pack.source.city);

            dto.destination = new Address(pack.destination.post, pack.destination.country, pack.destination.region, pack.destination.city);

            dto.packages = ToADimensionsDTOMap(pack.dimensions);

            return(dto);
        }
Example #2
0
        public static decimal getQuote(Implementations.Pack packing)
        {
            API3DTO api3 = API3DTO.ConvertToDTO(packing);

            return(getQuote(api3.source, api3.destination, api3.packages));
        }
Example #3
0
        public static decimal getTotal(Implementations.Pack packing)
        {
            API1DTO api1 = API1DTO.ConvertToDTO(packing);

            return(getTotal(api1.contact, api1.warehouse, api1.dimensions));
        }
Example #4
0
        public static decimal getAmout(Implementations.Pack packing)
        {
            API2DTO api2 = API2DTO.ConvertToDTO(packing);

            return(getAmout(api2.consignor, api2.consignee, api2.cartons));
        }