Class CountryRelationService
- Namespace
- Dynamicweb.Ecommerce.International
- Assembly
- Dynamicweb.Ecommerce.dll
public class CountryRelationService : ICacheStorage<CountryRelationKey, IList<CountryRelation>>, ICacheStorage<CountryRelationKey>, ICacheStorage
- Inheritance
-
CountryRelationService
- Implements
- Inherited Members
Methods
ClearCache()
Clears cached countries.
public void ClearCache()
ClearCache(CountryRelationKey)
Resets the specified key to the default value for objects stored in the object cache
public void ClearCache(CountryRelationKey key)
Parameters
keyCountryRelationKey- Key to reset
ClearCache(IEnumerable<CountryRelationKey>)
Resets the specified keys to the default value for objects stored in the object cache
public void ClearCache(IEnumerable<CountryRelationKey> keys)
Parameters
keysIEnumerable<CountryRelationKey>- Keys to reset
Delete(string)
Deletes an instance with the specified code.
public void Delete(string code2)
Parameters
code2string- The country relation code.
Delete(string, string)
Deletes an instance with the specified parameters.
public void Delete(string methodType, string methodId)
Parameters
Delete(string, string, string)
Deletes an instance with the specified parameters.
[Obsolete("Use the overload without languageId")]
public void Delete(string methodType, string methodId, string languageId)
Parameters
methodTypestring- The method type.
methodIdstring- The method id.
languageIdstring- The language id.
GetCountryRelation(string, string, string, string)
Gets the country relations.
public CountryRelation GetCountryRelation(string methodType, string methodId, string countryId, string regionCode)
Parameters
methodTypestring- The method type.
methodIdstring- The method id.
countryIdstring- The country id.
regionCodestring- The region code.
Returns
- CountryRelation
- A collection of the CountryRelation.
Remarks
1) Return any match on both country AND region.
2) Return any match on country where countryRelation.RegionCode Is null Or empty.
3) No match was found. Return Nothing.
GetCountryRelation(string, string, string, string, string)
Gets the country relations.
[Obsolete("Use the overload without languageId")]
public CountryRelation GetCountryRelation(string methodType, string methodId, string languageId, string countryId, string regionCode)
Parameters
methodTypestring- The method type.
methodIdstring- The method id.
languageIdstring- The language id.
countryIdstring- The country id.
regionCodestring- The region code.
Returns
- CountryRelation
- A collection of the CountryRelation.
Remarks
1) Return any match on both country AND region.
2) Return any match on country where countryRelation.RegionCode Is null Or empty.
3) No match was found. Return Nothing.
GetCountryRelations(string, string)
Gets the country relations.
public IEnumerable<CountryRelation> GetCountryRelations(string methodType, string methodId)
Parameters
Returns
- IEnumerable<CountryRelation>
- A collection of the CountryRelation.
GetCountryRelations(string, string, string)
Gets the country relations.
[Obsolete("Use the overload without languageId")]
public IEnumerable<CountryRelation> GetCountryRelations(string methodType, string methodId, string languageId)
Parameters
methodTypestring- The method type.
methodIdstring- The method id.
languageIdstring- The language id.
Returns
- IEnumerable<CountryRelation>
- A collection of the CountryRelation.
Save(CountryRelation)
Saves an instance with the specified parameters.
public void Save(CountryRelation relation)
Parameters
relationCountryRelation- The country relation.
UpdateDefaultCountryRelation(string, string, string)
Update default country relation
public void UpdateDefaultCountryRelation(string methodType, string countryId, string defaultId)
Parameters
methodTypestring- Type of the method. (PAY / SHIP)
countryIdstring- The country ID.
defaultIdstring- The default method ID.
UpdateDefaultCountryRelation(string, string, string, string)
Update default country relation
[Obsolete("Use the overload without languageId")]
public void UpdateDefaultCountryRelation(string methodType, string countryId, string languageId, string defaultId)