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
func (f FakePaymentSelectionValidator) Validate(ctx context.Context, _ *decorator.DecoratedCart, _ cart.PaymentSelection) error
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
Click to show internal directories.
Click to hide internal directories.