Class TaxService
- Namespace
- Dynamicweb.Ecommerce.Products.Taxes
- Assembly
- Dynamicweb.Ecommerce.dll
public class TaxService : ICacheStorage<int, TaxSetting>, ICacheStorage<int>, ICacheStorage
- Inheritance
-
TaxService
- Implements
- Inherited Members
Methods
AddTaxesToOrder(Order)
Adds taxes to order.
public virtual void AddTaxesToOrder(Order order)
Parameters
orderOrderThe order.
AddTaxesToOrder(Order, bool)
Adds taxes to order.
public virtual void AddTaxesToOrder(Order order, bool forceCalculations)
Parameters
AddTaxesToProducts(IEnumerable<Product>, Order, string?)
Adds taxes to products.
public virtual void AddTaxesToProducts(IEnumerable<Product> products, Order order, string? defaultCountryCode)
Parameters
productsIEnumerable<Product>The products.
orderOrderThe order.
defaultCountryCodestringThe default country code.
AddTaxesToProducts(IEnumerable<Product>, string, string)
Adds taxes to products.
public virtual void AddTaxesToProducts(IEnumerable<Product> products, string countryCode, string regionCode)
Parameters
productsIEnumerable<Product>The products.
countryCodestringThe country code.
regionCodestringThe region code.
CancelTaxes(Order)
Cancel the taxes.
public virtual void CancelTaxes(Order order)
Parameters
orderOrderThe order.
ClearCache()
Clears the cache.
public void ClearCache()
ClearCache(IEnumerable<int>)
Resets the specified keys to the default value for objects stored in the object cache
public void ClearCache(IEnumerable<int> keys)
Parameters
keysIEnumerable<int>Keys to reset
ClearCache(int)
Resets the specified key to the default value for objects stored in the object cache
public void ClearCache(int key)
Parameters
keyintKey to reset
CommitTaxesToOrder(Order)
Commit the taxes.
public virtual void CommitTaxesToOrder(Order order)
Parameters
orderOrderThe order.
CopyTaxSetting(TaxSetting)
public virtual TaxSetting CopyTaxSetting(TaxSetting taxSetting)
Parameters
taxSettingTaxSetting
Returns
Delete(int)
Deletes this instance.
public virtual void Delete(int taxSettingId)
Parameters
taxSettingIdintThe tax setting id.
GetActiveTaxSettings(Order)
Gets active TaxSettings for an order.
public virtual IEnumerable<TaxSetting> GetActiveTaxSettings(Order order)
Parameters
orderOrderThe order.
Returns
GetActiveTaxSettings(Order, string?)
Gets active TaxSettings for an order.
public virtual IEnumerable<TaxSetting> GetActiveTaxSettings(Order order, string? defaultCountryCode)
Parameters
Returns
GetAllTaxSettings()
Gets all TaxSettings.
public virtual IEnumerable<TaxSetting> GetAllTaxSettings()
Returns
GetTaxSettingById(int)
Gets the tax setting by id.
public virtual TaxSetting? GetTaxSettingById(int taxSettingId)
Parameters
taxSettingIdintThe tax setting id.
Returns
HandleProductReturns(Order, Order)
Handle product returns.
public virtual bool HandleProductReturns(Order order, Order originalOrder)
Parameters
Returns
Save(TaxSetting)
Saves this settings instance.
public virtual void Save(TaxSetting taxSetting)
Parameters
taxSettingTaxSettingThe tax setting.