Documentation ¶
Index ¶
- type Service
- func (s *Service) GetAvailableSources(ctx context.Context, session *web.Session, product productDomain.BasicProduct, ...) (domain.AvailableSourcesPerProduct, error)
- func (s *Service) GetAvailableSourcesDeductedByCurrentCart(ctx context.Context, session *web.Session, product productDomain.BasicProduct, ...) (domain.AvailableSourcesPerProduct, error)
- func (s *Service) Inject(l flamingo.Logger, cartReceiverService *application.CartReceiverService, ...) *Service
- type SourcingApplication
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service to access the sourcing based on current cart
func (*Service) GetAvailableSources ¶
func (s *Service) GetAvailableSources(ctx context.Context, session *web.Session, product productDomain.BasicProduct, deliveryCode string) (domain.AvailableSourcesPerProduct, error)
GetAvailableSources without evaluating current cart items
func (*Service) GetAvailableSourcesDeductedByCurrentCart ¶
func (s *Service) GetAvailableSourcesDeductedByCurrentCart(ctx context.Context, session *web.Session, product productDomain.BasicProduct, deliveryCode string) (domain.AvailableSourcesPerProduct, error)
GetAvailableSourcesDeductedByCurrentCart fetches available sources minus those already allocated to the cart
func (*Service) Inject ¶
func (s *Service) Inject( l flamingo.Logger, cartReceiverService *application.CartReceiverService, sourcingService domain.SourcingService, deliveryInfoBuilder cart.DeliveryInfoBuilder, ) *Service
Inject dependencies
type SourcingApplication ¶
type SourcingApplication interface { GetAvailableSourcesDeductedByCurrentCart(ctx context.Context, session *web.Session, product productDomain.BasicProduct, deliveryCode string) (domain.AvailableSourcesPerProduct, error) GetAvailableSources(ctx context.Context, session *web.Session, product productDomain.BasicProduct, deliveryCode string) (domain.AvailableSourcesPerProduct, error) }
SourcingApplication interface
Click to show internal directories.
Click to hide internal directories.