restrictors

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: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Restrictor

type Restrictor struct {
	// contains filtered or unexported fields
}

Restrictor restricts qty based on available stock

func (*Restrictor) Inject

func (r *Restrictor) Inject(
	l flamingo.Logger,
	sourcingService application.SourcingApplication,
) *Restrictor

Inject dependencies

func (*Restrictor) Name

func (r *Restrictor) Name() string

Name returns the code of the restrictor

func (*Restrictor) Restrict

func (r *Restrictor) Restrict(ctx context.Context, session *web.Session, product productDomain.BasicProduct, _ *cart.Cart, deliveryCode string) *validation.RestrictionResult

Restrict qty based on product data

Jump to

Keyboard shortcuts

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