/// <summary>
 /// Constructor
 /// </summary>
 /// <param name="merchelloContext"></param>
 public CatalogFixedRateShippingApiController(MerchelloContext merchelloContext)
     : base(merchelloContext)
 {
     _shipCountryService = ((ServiceContext) MerchelloContext.Services).ShipCountryService;
     _fixedRateShippingGatewayProvider = (FixedRateShippingGatewayProvider)MerchelloContext.Gateways.Shipping.GetProviderByKey(Constants.ProviderKeys.Shipping.FixedRateShippingProviderKey);
     _shippingContext = MerchelloContext.Gateways.Shipping;
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="merchelloContext"></param>
 public CatalogFixedRateShippingApiController(MerchelloContext merchelloContext)
     : base(merchelloContext)
 {
     _shipCountryService = ((ServiceContext)MerchelloContext.Services).ShipCountryService;
     _fixedRateShippingGatewayProvider = (FixedRateShippingGatewayProvider)MerchelloContext.Gateways.Shipping.GetProviderByKey(Constants.ProviderKeys.Shipping.FixedRateShippingProviderKey);
     _shippingContext = MerchelloContext.Gateways.Shipping;
 }
Exemplo n.º 3
0
        public override void FixtureSetup()
        {
            base.FixtureSetup();

            var warehouseService = PreTestDataWorker.WarehouseService;

            _warehouse = warehouseService.GetDefaultWarehouse();

            _warehouseCatalog = _warehouse.DefaultCatalog();

            var key = Constants.ProviderKeys.Shipping.FixedRateShippingProviderKey;

            _fixedRateProvider = (FixedRateShippingGatewayProvider)MerchelloContext.Current.Gateways.Shipping.CreateInstance(key);

            var shipCountryService = PreTestDataWorker.ShipCountryService;

            _shipCountry = shipCountryService.GetShipCountryByCountryCode(_warehouseCatalog.Key, "US");
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="FixedRateShippingApiController"/> class.
 /// </summary>
 /// <param name="merchelloContext">
 /// The merchello context.
 /// </param>
 public FixedRateShippingApiController(MerchelloContext merchelloContext)
     : base(merchelloContext)
 {
     _fixedRateShippingGatewayProvider = (FixedRateShippingGatewayProvider)MerchelloContext.Gateways.Shipping.GetProviderByKey(Constants.ProviderKeys.Shipping.FixedRateShippingProviderKey);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="FixedRateShippingApiController"/> class.
 /// </summary>
 /// <param name="merchelloContext">
 /// The merchello context.
 /// </param>
 public FixedRateShippingApiController(MerchelloContext merchelloContext)
     : base(merchelloContext)
 {
     _fixedRateShippingGatewayProvider = (FixedRateShippingGatewayProvider)MerchelloContext.Gateways.Shipping.GetProviderByKey(Constants.ProviderKeys.Shipping.FixedRateShippingProviderKey);
 }