placeorder

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

View Source
const (
	// CustomAttributesKeyPlaceOrderError can be used to force an error during place order
	CustomAttributesKeyPlaceOrderError = "place-order-error"
	// CustomAttributesKeyReserveOrderIDError can be used to force an error during reserve order id
	CustomAttributesKeyReserveOrderIDError = "reserve-order-id-error"
)

Variables

View Source
var (

	// NextCancelFails can be set to let the next call to any FakeAdapter's instance fail
	NextCancelFails bool
)

Functions

This section is empty.

Types

type FakeAdapter

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

FakeAdapter provides fake place order adapter

func (*FakeAdapter) CancelCustomerOrder

func (f *FakeAdapter) CancelCustomerOrder(_ context.Context, orderInfos placeorder.PlacedOrderInfos, _ auth.Identity) error

CancelCustomerOrder cancels a customer order

func (*FakeAdapter) CancelGuestOrder

func (f *FakeAdapter) CancelGuestOrder(_ context.Context, orderInfos placeorder.PlacedOrderInfos) error

CancelGuestOrder cancels a guest order

func (*FakeAdapter) Inject

func (f *FakeAdapter) Inject() *FakeAdapter

Inject dependencies

func (*FakeAdapter) PlaceCustomerCart

PlaceCustomerCart places a customer cart

func (*FakeAdapter) PlaceGuestCart

PlaceGuestCart places a guest cart order

func (*FakeAdapter) ReserveOrderID

func (f *FakeAdapter) ReserveOrderID(_ context.Context, cart *cartDomain.Cart) (string, error)

ReserveOrderID returns the reserved order id

type Module

type Module struct {
}

Module registers our fake place order module

func (*Module) Configure

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

Configure module

Jump to

Keyboard shortcuts

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