Class BasketService
Note
For comments, please see IBasketService
public class BasketService : ServiceBase<Basket>, IBasketService, IService<Basket>, IServiceCreatable<Basket>
- Inheritance
-
BasketService
- Implements
- Inherited Members
Constructors
BasketService(IEFCoreScopeProvider<CommerceDbContext>, ISessionService, IOrderService, ICurrencyService, IPaymentMethodService, IOrderNumberGenerator, IPaymentProcessorService, IHttpContextAccessor, IShippingCalculatorService, IStoreService, IProductStore, ICountryService, INotificationService, IStockService)
public BasketService(IEFCoreScopeProvider<CommerceDbContext> efCoreScopeProvider, ISessionService sessionService, IOrderService orderService, ICurrencyService currencyService, IPaymentMethodService paymentMethodService, IOrderNumberGenerator ordernumberGenerator, IPaymentProcessorService paymentProcessorService, IHttpContextAccessor httpContextAccessor, IShippingCalculatorService shippingCalculatorService, IStoreService storeService, IProductStore productStore, ICountryService countryService, INotificationService notificationService, IStockService stockService)
Parameters
efCoreScopeProvider
IEFCoreScopeProvider<CommerceDbContext>sessionService
ISessionServiceorderService
IOrderServicecurrencyService
ICurrencyServicepaymentMethodService
IPaymentMethodServiceordernumberGenerator
IOrderNumberGeneratorpaymentProcessorService
IPaymentProcessorServicehttpContextAccessor
IHttpContextAccessorshippingCalculatorService
IShippingCalculatorServicestoreService
IStoreServiceproductStore
IProductStorecountryService
ICountryServicenotificationService
INotificationServicestockService
IStockService
Methods
Create(Basket)
public override Task<Basket> Create(Basket entity)
Parameters
entity
Basket
Returns
GetCurrentBasket(Guid)
public Task<Basket> GetCurrentBasket(Guid storeId)
Parameters
storeId
Guid
Returns
GetOrCreateCurrentBasket(Guid)
public Task<Basket> GetOrCreateCurrentBasket(Guid storeId)
Parameters
storeId
Guid
Returns
InitiatePayment(Basket, IPublishedContent)
public Task<(InitiatePaymentResult paymentResult, Order order)> InitiatePayment(Basket basket, IPublishedContent confirmationPage)
Parameters
basket
BasketconfirmationPage
IPublishedContent
Returns
RefreshPrices(Basket)
public Task RefreshPrices(Basket basket)
Parameters
basket
Basket
Returns
Update(Basket)
public override Task<IEnumerable<string>> Update(Basket entity)
Parameters
entity
Basket