cart

package
v3.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2024 License: MIT Imports: 12 Imported by: 2

Documentation

Index

Constants

View Source
const FakePaymentSelectionValidatorCookie = "X-FakePaymentSelectionValidator"

FakePaymentSelectionValidatorCookie name to control behaviour

Variables

This section is empty.

Functions

This section is empty.

Types

type FakePaymentSelectionValidator added in v3.3.0

type FakePaymentSelectionValidator struct{}

FakePaymentSelectionValidator returns an error if the Cookie FakePaymentSelectionValidatorCookie is set

func (FakePaymentSelectionValidator) Validate added in v3.3.0

Validate is only a fake implementation which is controlled by the Cookie FakePaymentSelectionValidatorCookie. Always returns an error if the cookie is set

type FakeQtyRestrictor added in v3.3.0

type FakeQtyRestrictor struct{}

FakeQtyRestrictor used to restrict

func (FakeQtyRestrictor) Name added in v3.3.0

func (f FakeQtyRestrictor) Name() string

Name fake implementation

func (FakeQtyRestrictor) Restrict added in v3.3.0

func (f FakeQtyRestrictor) Restrict(ctx context.Context, session *web.Session, product domain.BasicProduct, cart *domainCart.Cart, deliveryCode string) *validation.RestrictionResult

Restrict fake implementation

type FakeVoucherHandler

type FakeVoucherHandler struct{}

FakeVoucherHandler used vouchers in integration tests

func (FakeVoucherHandler) ApplyVoucher

func (f FakeVoucherHandler) ApplyVoucher(ctx context.Context, cart *domainCart.Cart, couponCode string) (*domainCart.Cart, error)

ApplyVoucher fake implementation

func (FakeVoucherHandler) RemoveVoucher

func (f FakeVoucherHandler) RemoveVoucher(ctx context.Context, cart *domainCart.Cart, couponCode string) (*domainCart.Cart, error)

RemoveVoucher fake implementation

type Module

type Module struct{}

Module for integration testing

func (*Module) Configure

func (m *Module) Configure(injector *dingo.Injector)

Configure module

func (*Module) Depends

func (m *Module) Depends() []dingo.Module

Depends on other modules

Jump to

Keyboard shortcuts

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