/// <summary>
        /// Returns a collection of ship methods assigned for this specific provider configuration (associated with the ShipCountry)
        /// </summary>
        /// <returns></returns>
        public override IEnumerable <IShippingGatewayMethod> GetAllShippingGatewayMethods(IShipCountry shipCountry)
        {
            var methods = GatewayProviderService.GetShipMethodsByShipCountryKey(GatewayProviderSettings.Key, shipCountry.Key);

            return(methods
                   .Select(
                       shipMethod => new FixedRateShippingGatewayMethod(AvailableResources.FirstOrDefault(x => shipMethod.ServiceCode.StartsWith(x.ServiceCode)), shipMethod, shipCountry, ShippingFixedRateTable.GetShipRateTable(GatewayProviderService, RuntimeCache, shipMethod.Key))
                       ).OrderBy(x => x.ShipMethod.Name));
        }
Ejemplo n.º 2
0
        public override IEnumerable <IShippingGatewayMethod> GetAllShippingGatewayMethods(IShipCountry shipCountry)
        {
            var methods = GatewayProviderService.GetShipMethodsByShipCountryKey(GatewayProviderSettings.Key, shipCountry.Key);

            return(methods
                   .Select(
                       shipMethod =>
                       new FoaShippingGatewayMethod(
                           GatewayResource,
                           shipMethod, shipCountry, GatewayProviderSettings)
                       ).OrderBy(x => x.ShipMethod.Name));
        }
        /// <summary>
        /// Returns a collection of ship methods assigned for this specific provider configuration (associated with the ShipCountry)
        /// </summary>
        /// <returns></returns>
        public override IEnumerable <IShippingGatewayMethod> GetAllShippingGatewayMethods(IShipCountry shipCountry)
        {
            var methods = GatewayProviderService.GetShipMethodsByShipCountryKey(GatewayProviderSettings.Key, shipCountry.Key);

            return(methods
                   .Select(
                       shipMethod =>
                       new UPSShippingGatewayMethod(
                           AvailableResources.FirstOrDefault(x => shipMethod.ServiceCode.StartsWith(x.ServiceCode)),
                           shipMethod, shipCountry,
                           new ExtendedDataCollection())
                       ).OrderBy(x => x.ShipMethod.Name));
        }