Table of Contents

Class FeeService

Namespace
Dynamicweb.Ecommerce.Orders
Assembly
Dynamicweb.Ecommerce.dll
public class FeeService : ICacheStorage<string, Fee>, ICacheStorage<string>, ICacheStorage
Inheritance
FeeService
Implements
Inherited Members

Properties

Info

Information about the object cache

public virtual CacheInformation Info { get; }

Property Value

CacheInformation

Methods

ClearCache()

Resets all keys to the default value for objects stored in the object cache

public virtual void ClearCache()

ClearCache(IEnumerable<string>)

Resets the specified keys to the default value for objects stored in the object cache

public virtual void ClearCache(IEnumerable<string> keys)

Parameters

keys IEnumerable<string>

Keys to reset

ClearCache(string)

Resets the specified key to the default value for objects stored in the object cache

public virtual void ClearCache(string key)

Parameters

key string

Key to reset

Delete(Fee)

Deletes a given fee.

public virtual void Delete(Fee fee)

Parameters

fee Fee

Fee to delete.

DeleteByMethod(string, string)

Deletes all fees associated with a given method.

public virtual void DeleteByMethod(string method, string methodId)

Parameters

method string

Method type, e.g "PAY" or "SHIP".

methodId string

Method identifier, e.g. "PAY1" or "SHIP1".

GetAllFees()

Get all fees

public virtual IEnumerable<Fee> GetAllFees()

Returns

IEnumerable<Fee>

All existing fees regardless of method.

GetFeeById(string)

Gets a fee by id.

public virtual Fee GetFeeById(string id)

Parameters

id string

Id of the fee.

Returns

Fee

An instance of Fee, if found; otherwise, null.

GetFeesByMethod(string, string)

Gets all fees for a given method.

public virtual IEnumerable<Fee> GetFeesByMethod(string method, string methodId)

Parameters

method string

Method type, e.g "PAY" or "SHIP".

methodId string

Method identifier, e.g. "PAY1" or "SHIP1".

Returns

IEnumerable<Fee>

All fees associated with the specified method.

GetFeesByMethodAndCountryRegion(string, string, string, string)

Gets all fees for a given method, country and region.

public virtual IEnumerable<Fee> GetFeesByMethodAndCountryRegion(string method, string methodId, string countryCode, string regionCode)

Parameters

method string

Method type, e.g "PAY" or "SHIP".

methodId string

Method identifier, e.g. "PAY1" or "SHIP1".

countryCode string

Country code, e.g. "US".

regionCode string

Region code, e.g. "CA".

Returns

IEnumerable<Fee>

All fees associated with the specified method, country and region.

Save(Fee)

Saves a given fee.

public virtual void Save(Fee fee)

Parameters

fee Fee

Fee to save.

SetCacheType<TObjectCache>()

Changes the storage container

public virtual void SetCacheType<TObjectCache>() where TObjectCache : ServiceCache<string, Fee>

Type Parameters

TObjectCache
To top