Table of Contents

Class BasketService

Namespace
Rescope.Commerce.Core.Services
Assembly
Rescope.Commerce.Core.dll
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 ISessionService
orderService IOrderService
currencyService ICurrencyService
paymentMethodService IPaymentMethodService
ordernumberGenerator IOrderNumberGenerator
paymentProcessorService IPaymentProcessorService
httpContextAccessor IHttpContextAccessor
shippingCalculatorService IShippingCalculatorService
storeService IStoreService
productStore IProductStore
countryService ICountryService
notificationService INotificationService
stockService IStockService

Methods

Create(Basket)

public override Task<Basket> Create(Basket entity)

Parameters

entity Basket

Returns

Task<Basket>

GetCurrentBasket(Guid)

public Task<Basket> GetCurrentBasket(Guid storeId)

Parameters

storeId Guid

Returns

Task<Basket>

GetOrCreateCurrentBasket(Guid)

public Task<Basket> GetOrCreateCurrentBasket(Guid storeId)

Parameters

storeId Guid

Returns

Task<Basket>

InitiatePayment(Basket, IPublishedContent)

public Task<(InitiatePaymentResult paymentResult, Order order)> InitiatePayment(Basket basket, IPublishedContent confirmationPage)

Parameters

basket Basket
confirmationPage IPublishedContent

Returns

Task<(InitiatePaymentResult paymentResult, Order order)>

RefreshPrices(Basket)

public Task RefreshPrices(Basket basket)

Parameters

basket Basket

Returns

Task

Update(Basket)

public override Task<IEnumerable<string>> Update(Basket entity)

Parameters

entity Basket

Returns

Task<IEnumerable<string>>