/// <summary> /// Initializes the visitor. /// </summary> private void Initialize() { _taxationContext = MerchelloContext.Current.Gateways.Taxation; _productTaxationEnabled = _taxationContext.ProductPricingEnabled; // we do not want to modify data here _merchello = new MerchelloHelper(false); }
internal GatewayContext(IShippingContext shipping, ITaxationContext taxation, IPaymentContext payment) { Mandate.ParameterNotNull(shipping, "shipping"); Mandate.ParameterNotNull(taxation, "taxation"); Mandate.ParameterNotNull(payment, "payment"); _shipping = shipping; _taxation = taxation; _payment = payment; }
/// <summary> /// Initializes a new instance of the <see cref="TaxationGatewayApiController"/> class. /// </summary> /// <param name="merchelloContext"> /// The <see cref="IMerchelloContext"/> /// </param> public TaxationGatewayApiController(IMerchelloContext merchelloContext) : base(merchelloContext) { _taxationContext = MerchelloContext.Gateways.Taxation; }
/// <summary> /// Initializes a new instance of the <see cref="TaxationGatewayApiController"/> class. /// </summary> /// <param name="merchelloContext"> /// The <see cref="IMerchelloContext"/> /// </param> public TaxationGatewayApiController(IMerchelloContext merchelloContext) : base(merchelloContext) { _taxationContext = MerchelloContext.Gateways.Taxation; }
/// <summary> /// Initializes the visitor. /// </summary> private void Initialize() { _taxationContext = MerchelloContext.Current.Gateways.Taxation; _productTaxationEnabled = _taxationContext.ProductPricingEnabled; // we do not want to modify data here _merchello = new MerchelloHelper(false); }
/// <summary> /// Calculates taxes for a product variant. /// </summary> /// <param name="context"> /// The <see cref="ITaxationContext"/>. /// </param> /// <param name="productVariant"> /// The <see cref="IProductVariant"/>. /// </param> /// <returns> /// The <see cref="ITaxCalculationResult"/>. /// </returns> public static IProductTaxCalculationResult CalculateTaxesForProduct(this ITaxationContext context, IProductVariant productVariant) { return(context.CalculateTaxesForProduct(productVariant.ToProductVariantDisplay())); }