Interface IStoreService
Get or manage store information. Store information can also be edited from corporate admin page "Manage Stores".
Namespace: DirectScale.Disco.Extension.Services
Assembly: DirectScale.Disco.Extension.Abstractions.dll
Syntax
public interface IStoreService
Remarks
Stores can be used to set different products, prices, or payment methods. For example, there can be a different Store for enrollment orders, one time orders, and autoship orders.
Also see PriceGroup and inventory item "Price and Discounts" page for more informaton on setting different prices.
Methods
CreateStore(Store)
Creates a new Custom store.
Declaration
Task<Store> CreateStore(Store store)
Parameters
| Type | Name | Description |
|---|---|---|
| Store | store | New store. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<Store> | Same object, but with Id populated. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Null value supplied. |
| System.ArgumentException | Store has no name or is not Custom. |
| System.InvalidOperationException | No default store is set or |
See Also
DeleteStore(Int32)
Deletes the storeId record, if it exists.
Declaration
Task DeleteStore(int storeId)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | storeId | The store's DB recordnumber. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
Remarks
Does nothing if storeId doesn't exist.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentOutOfRangeException | Invalid |
GetStore(Int32)
Gets the storeId record.
Declaration
Task<Store> GetStore(int storeId)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | storeId | The store's DB recordnumber. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<Store> | The store details for specified |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentOutOfRangeException | Invalid |
| System.InvalidOperationException | No store found for |
See Also
GetStoreByType(StoreType)
Gets the store used for specified storeType.
Declaration
Task<Store> GetStoreByType(StoreType storeType)
Parameters
| Type | Name | Description |
|---|---|---|
| StoreType | storeType | The type to get. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<Store> | The store details for specified |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentException | If |
| System.InvalidOperationException | If no store is configured with specified |
See Also
GetStores()
Gets all store details set up.
Declaration
Task<Store[]> GetStores()
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<Store[]> | Array of Stores. |
See Also
UpdateStore(Store)
Modify an existing store record.
Declaration
Task<Store> UpdateStore(Store store)
Parameters
| Type | Name | Description |
|---|---|---|
| Store | store | Store to modify. Type cannot be changed. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<Store> |
|
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Null value supplied. |
| System.ArgumentOutOfRangeException | Invalid Id. |
| System.ArgumentException | Store has no name. |
| System.InvalidOperationException | No default store is set or |