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

Fields

MethodTypeAddressValidator

public const string MethodTypeAddressValidator = "ADDRESSVALIDATOR"

Field Value

string

MethodTypePayment

public const string MethodTypePayment = "PAY"

Field Value

string

MethodTypeShipment

public const string MethodTypeShipment = "SHIP"

Field Value

string

Methods

ClearCache()

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

public void ClearCache()

Delete(Fee)

Deletes a given fee.

public void Delete(Fee fee)

Parameters

fee Fee

Fee to delete.

DeleteByMethod(string, string)

Deletes all fees associated with a given method.

public 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 IEnumerable<Fee> GetAllFees()

Returns

IEnumerable<Fee>

All existing fees regardless of method.

GetFeeById(string)

Gets a fee by id.

public 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 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 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>

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

Save(Fee)

Saves a given fee.

public void Save(Fee fee)

Parameters

fee Fee

Fee to save.

To top