IShippingMethodService
Defines the Vendr Shipping Method service
public interface IShippingMethodService : ICachedEntityService<ShippingMethodReadOnly>, IService
Inheritance
- interface ICachedEntityService<TEntityType>
- interface IService
Namespace
Methods
DeleteShippingMethod (1 of 2)
Deletes a ShippingMethod
public void DeleteShippingMethod(Guid id)
Parameters
Parameter | Description |
---|---|
id
|
The ID of the
ShippingMethod to delete |
DeleteShippingMethod (2 of 2)
Deletes a ShippingMethod
public void DeleteShippingMethod(ShippingMethod entity)
Parameters
Parameter | Description |
---|---|
entity
|
The
ShippingMethod to delete |
GetShippingMethod (1 of 2)
Get a ShippingMethodReadOnly
entity by ID
public ShippingMethodReadOnly GetShippingMethod(Guid id)
Parameters
Parameter | Description |
---|---|
id
|
The ID of the
ShippingMethodReadOnly entity to fetch |
Returns
A ShippingMethodReadOnly
entity
GetShippingMethod (2 of 2)
Get a ShippingMethodReadOnly
entity by Store
and Alias
public ShippingMethodReadOnly GetShippingMethod(Guid storeId, string alias)
Parameters
Parameter | Description |
---|---|
storeId
|
The ID of the
Store the ShippingMethodReadOnly entity belongs to |
alias
|
The Alias of the
ShippingMethodReadOnly entity to fetch |
Returns
A ShippingMethodReadOnly
entity
GetShippingMethods
Get a list of all ShippingMethodReadOnly
entities from the given Store
public IEnumerable<ShippingMethodReadOnly> GetShippingMethods(Guid storeId)
Parameters
Parameter | Description |
---|---|
storeId
|
The ID of the
Store the ShippingMethodReadOnly entities belong to |
Returns
A list of ShippingMethodReadOnly
entities
GetShippingMethodsAllowedIn
Get a list of all ShippingMethodReadOnly
entities allowed in the given Country
and Region
public IEnumerable<ShippingMethodReadOnly> GetShippingMethodsAllowedIn(Guid countryId,
Guid? regionId = default(Guid?))
Parameters
Parameter | Description |
---|---|
countryId
|
The ID of the
Country the ShippingMethodReadOnly entities should be allowed in |
regionId
|
The ID of the
Region the ShippingMethodReadOnly entities should be allowed in |
Returns
A list of ShippingMethodReadOnly
entities
SaveShippingMethod
Saves a ShippingMethod
public void SaveShippingMethod(ShippingMethod entity)
Parameters
Parameter | Description |
---|---|
entity
|
The
ShippingMethod to save |
ShippingMethodExists
Check to see if a ShippingMethodReadOnly
exists in the given Store
with the given Alias
public bool ShippingMethodExists(Guid storeId, string alias)
Parameters
Parameter | Description |
---|---|
storeId
|
The ID of the
Store the ShippingMethodReadOnly entity belongs to |
alias
|
The Alias of the
ShippingMethodReadOnly entity to check |
Returns
Returns true
if the ShippingMethodReadOnly
exists, otherwise returns false
.
SortShippingMethods
Sorts a list of ShippingMethod
entities by ID according to the order of those IDs
public void SortShippingMethods(Guid[] sortedIds)
Parameters
Parameter | Description |
---|---|
sortedIds
|
The IDs of the
ShippingMethod entities to sort, in the order by which to sort them |