Class AddressValidatorService
- Namespace
- Dynamicweb.Ecommerce.Orders.AddressValidation
- Assembly
- Dynamicweb.Ecommerce.dll
public class AddressValidatorService : ICacheStorage<int, AddressValidator>, ICacheStorage<int>, ICacheStorage
- Inheritance
-
AddressValidatorService
- Implements
- Inherited Members
Methods
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
keys
IEnumerable<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
key
int- Key to reset
Delete(int)
Deletes this instance.
public void Delete(int addressValidatorId)
Parameters
addressValidatorId
int- The address validator id.
GetActiveAddressValidators(Order, string)
Gets active AddressValidators for an order.
public IEnumerable<AddressValidator> GetActiveAddressValidators(Order order, string defaultCountryCode)
Parameters
Returns
GetAddressValidatorById(int)
Gets the Address validator by id.
public AddressValidator GetAddressValidatorById(int addressValidatorId)
Parameters
addressValidatorId
int- The address validator id.
Returns
GetAddressValidators()
Gets address validators.
public IEnumerable<AddressValidator> GetAddressValidators()
Returns
GetAddressValidators(string)
Gets address validators.
[Obsolete("Use the overload without languageId")]
public IEnumerable<AddressValidator> GetAddressValidators(string languageId)
Parameters
languageId
string- The language id.
Returns
GetAddressValidators(string, string)
Gets address validators with the suitable country code.
[Obsolete("Use the GetAddressValidatorsByCountryCode instead")]
public IEnumerable<AddressValidator> GetAddressValidators(string languageId, string countryCode)
Parameters
Returns
GetAddressValidatorsByCountryCode(string)
Gets address validators with the suitable country code.
public IEnumerable<AddressValidator> GetAddressValidatorsByCountryCode(string countryCode)
Parameters
countryCode
string- The country code.
Returns
Save(AddressValidator)
Saves this settings instance.
public void Save(AddressValidator addressValidator)
Parameters
addressValidator
AddressValidator- The address validator.
Validate(Order, string)
Validate the addresses.
public bool Validate(Order order, string defaultCountryCode)
Parameters
Returns
Validate(UserAddress, string)
Validate the addresses.
public bool Validate(UserAddress address, string languageId)
Parameters
address
UserAddress- The order.
languageId
string- The language ID.