application

package
v3.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 9 Imported by: 2

Documentation

Index

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL