ICurrencyService
Defines the Vendr Currency service
public interface ICurrencyService : ICachedEntityService<CurrencyReadOnly>, IService
Inheritance
- interface ICachedEntityService<TEntityType>
- interface IService
Namespace
Methods
CurrencyExists
Check to see if a CurrencyReadOnly
exists in the given Store
with the given ISO Code
public bool CurrencyExists(Guid storeId, string code)
Parameters
Parameter | Description |
---|---|
storeId
|
The ID of the
Store the CurrencyReadOnly entity belongs to |
code
|
The ISO Code of the
CurrencyReadOnly entity to check |
Returns
Returns true
if the CurrencyReadOnly
exists, otherwise returns false
.
DeleteCurrency (1 of 2)
Deletes a Currency
public void DeleteCurrency(Guid id)
Parameters
Parameter | Description |
---|---|
id
|
The ID of the
Currency to delete |
DeleteCurrency (2 of 2)
Deletes a Currency
public void DeleteCurrency(Currency entity)
Parameters
Parameter | Description |
---|---|
entity
|
The
Currency to delete |
GetCurrencies
Get a list of all CurrencyReadOnly
entities from the given Store
public IEnumerable<CurrencyReadOnly> GetCurrencies(Guid storeId)
Parameters
Parameter | Description |
---|---|
storeId
|
The ID of the
Store the CurrencyReadOnly entities belong to |
Returns
A list of CurrencyReadOnly
entities
GetCurrenciesAllowedIn
Get a list of all CurrencyReadOnly
entities allowed in the given Country
public IEnumerable<CurrencyReadOnly> GetCurrenciesAllowedIn(Guid countryId)
Parameters
Parameter | Description |
---|---|
countryId
|
The ID of the
Country the CurrencyReadOnly entity should be allowed in |
Returns
A list of CurrencyReadOnly
entities
GetCurrency (1 of 2)
Get a CurrencyReadOnly
entity by ID
public CurrencyReadOnly GetCurrency(Guid id)
Parameters
Parameter | Description |
---|---|
id
|
The ID of the
CurrencyReadOnly entity to fetch |
Returns
A CurrencyReadOnly
entity
GetCurrency (2 of 2)
Get a CurrencyReadOnly
entity by Store
and ISO Code
public CurrencyReadOnly GetCurrency(Guid storeId, string code)
Parameters
Parameter | Description |
---|---|
storeId
|
The ID of the
Store the CurrencyReadOnly entity belongs to |
code
|
The ISO Code of the
CurrencyReadOnly entity to fetch |
Returns
A CurrencyReadOnly
entity
SaveCurrency
Saves a Currency
public void SaveCurrency(Currency entity)
Parameters
Parameter | Description |
---|---|
entity
|
The
Currency to save |
SortCurrencies
Sorts a list of Currency
entities by ID according to the order of those IDs
public void SortCurrencies(Guid[] sortedIds)
Parameters
Parameter | Description |
---|---|
sortedIds
|
The IDs of the
Currency entities to sort, in the order by which to sort them |