/// <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))); }
internal static UPSShippingRateTable GetShipRateTable(IGatewayProviderService gatewayProviderService, IRuntimeCacheProvider runtimeCacheProvider, Guid shipMethodKey) { var rows = gatewayProviderService.GetShipRateTiersByShipMethodKey(shipMethodKey); return new UPSShippingRateTable(shipMethodKey, rows); }
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); }); }