Example #1
0
 /// <summary>
 /// The get ship rate table.
 /// </summary>
 /// <param name="gatewayProviderService">
 /// The gateway provider service.
 /// </param>
 /// <param name="runtimeCacheProvider">
 /// The runtime cache provider.
 /// </param>
 /// <param name="shipMethodKey">
 /// The ship method key.
 /// </param>
 /// <returns>
 /// The <see cref="ShippingFixedRateTable"/>.
 /// </returns>
 internal static ShippingFixedRateTable GetShipRateTable(IGatewayProviderService gatewayProviderService, IRuntimeCacheProvider runtimeCacheProvider, Guid shipMethodKey)
 {
     return((ShippingFixedRateTable)runtimeCacheProvider.GetCacheItem(
                CacheKeys.GatewayShipMethodCacheKey(shipMethodKey),
                delegate
     {
         var rows = gatewayProviderService.GetShipRateTiersByShipMethodKey(shipMethodKey);
         return new ShippingFixedRateTable(shipMethodKey, rows);
     }, TimeSpan.FromHours(6)));
 }
Example #2
0
 internal static UPSShippingRateTable GetShipRateTable(IGatewayProviderService gatewayProviderService, IRuntimeCacheProvider runtimeCacheProvider, Guid shipMethodKey)
 {
     var rows = gatewayProviderService.GetShipRateTiersByShipMethodKey(shipMethodKey);
     return new UPSShippingRateTable(shipMethodKey, rows);
 }
Example #3
0
        internal static UPSShippingRateTable GetShipRateTable(IGatewayProviderService gatewayProviderService, IRuntimeCacheProvider runtimeCacheProvider, Guid shipMethodKey)
        {
            var rows = gatewayProviderService.GetShipRateTiersByShipMethodKey(shipMethodKey);

            return(new UPSShippingRateTable(shipMethodKey, rows));
        }
 /// <summary>
 /// The get ship rate table.
 /// </summary>
 /// <param name="gatewayProviderService">
 /// The gateway provider service.
 /// </param>
 /// <param name="runtimeCacheProvider">
 /// The runtime cache provider.
 /// </param>
 /// <param name="shipMethodKey">
 /// The ship method key.
 /// </param>
 /// <returns>
 /// The <see cref="ShippingFixedRateTable"/>.
 /// </returns>
 internal static ShippingFixedRateTable GetShipRateTable(IGatewayProviderService gatewayProviderService, IRuntimeCacheProvider runtimeCacheProvider, Guid shipMethodKey)
 {
     return (ShippingFixedRateTable) runtimeCacheProvider.GetCacheItem(
         CacheKeys.GatewayShipMethodCacheKey(shipMethodKey),
         delegate
             {
                 var rows = gatewayProviderService.GetShipRateTiersByShipMethodKey(shipMethodKey);
                 return new ShippingFixedRateTable(shipMethodKey, rows);
             });
 }