cart

package
v0.0.0-...-bb92df6 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2021 License: OSL-3.0 Imports: 11 Imported by: 0

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

type FakePaymentSelectionValidator struct{}

FakePaymentSelectionValidator returns an error if the Cookie FakePaymentSelectionValidatorCookie is set

func (FakePaymentSelectionValidator) Validate

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

type FakeQtyRestrictor

type FakeQtyRestrictor struct{}

FakeQtyRestrictor used to restrict

func (FakeQtyRestrictor) Name

func (f FakeQtyRestrictor) Name() string

Name fake implementation

func (FakeQtyRestrictor) Restrict

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