Documentation ¶
Index ¶
- type CartReceiver
- func (_m *CartReceiver) GetCart(ctx context.Context, session *web.Session) (*cart.Cart, cart.ModifyBehaviour, error)
- func (_m *CartReceiver) GetCartWithoutCache(ctx context.Context, session *web.Session) (*cart.Cart, error)
- func (_m *CartReceiver) ModifyBehaviour(ctx context.Context) (cart.ModifyBehaviour, error)
- func (_m *CartReceiver) ShouldHaveCart(ctx context.Context, session *web.Session) bool
- func (_m *CartReceiver) ShouldHaveGuestCart(session *web.Session) bool
- func (_m *CartReceiver) ViewCart(ctx context.Context, session *web.Session) (*cart.Cart, error)
- func (_m *CartReceiver) ViewGuestCart(ctx context.Context, session *web.Session) (*cart.Cart, error)
- type CartService
- func (_m *CartService) AddProduct(ctx context.Context, session *web.Session, deliveryCode string, ...) (domain.BasicProduct, error)
- func (_m *CartService) AdjustItemsToRestrictedQty(ctx context.Context, session *web.Session) (application.QtyAdjustmentResults, error)
- func (_m *CartService) ApplyAny(ctx context.Context, session *web.Session, anyCode string) (*cart.Cart, error)
- func (_m *CartService) ApplyGiftCard(ctx context.Context, session *web.Session, couponCode string) (*cart.Cart, error)
- func (_m *CartService) ApplyVoucher(ctx context.Context, session *web.Session, couponCode string) (*cart.Cart, error)
- func (_m *CartService) BuildAddRequest(ctx context.Context, marketplaceCode string, variantMarketplaceCode string, ...) cart.AddRequest
- func (_m *CartService) CancelOrder(ctx context.Context, session *web.Session, ...) (*cart.Cart, error)
- func (_m *CartService) CancelOrderWithoutRestore(ctx context.Context, session *web.Session, ...) error
- func (_m *CartService) Clean(ctx context.Context, session *web.Session) error
- func (_m *CartService) CompleteCurrentCart(ctx context.Context) (*cart.Cart, error)
- func (_m *CartService) CreateInitialDeliveryIfNotPresent(ctx context.Context, session *web.Session, deliveryCode string) (*cart.Cart, error)
- func (_m *CartService) DeleteAllItems(ctx context.Context, session *web.Session) error
- func (_m *CartService) DeleteCartInCache(ctx context.Context, session *web.Session, _a2 *cart.Cart)
- func (_m *CartService) DeleteDelivery(ctx context.Context, session *web.Session, deliveryCode string) (*cart.Cart, error)
- func (_m *CartService) DeleteItem(ctx context.Context, session *web.Session, itemID string, deliveryCode string) error
- func (_m *CartService) ForceReserveOrderIDAndSave(ctx context.Context, session *web.Session) (*cart.Cart, error)
- func (_m *CartService) GetCartReceiverService() *application.CartReceiverService
- func (_m *CartService) GetDefaultDeliveryCode() string
- func (_m *CartService) GetInitialDelivery(deliveryCode string) (*cart.DeliveryInfo, error)
- func (_m *CartService) PlaceOrder(ctx context.Context, session *web.Session, payment *placeorder.Payment) (placeorder.PlacedOrderInfos, error)
- func (_m *CartService) PlaceOrderWithCart(ctx context.Context, session *web.Session, _a2 *cart.Cart, ...) (placeorder.PlacedOrderInfos, error)
- func (_m *CartService) RemoveGiftCard(ctx context.Context, session *web.Session, couponCode string) (*cart.Cart, error)
- func (_m *CartService) RemoveVoucher(ctx context.Context, session *web.Session, couponCode string) (*cart.Cart, error)
- func (_m *CartService) ReserveOrderIDAndSave(ctx context.Context, session *web.Session) (*cart.Cart, error)
- func (_m *CartService) RestoreCart(ctx context.Context, _a1 *cart.Cart) (*cart.Cart, error)
- func (_m *CartService) UpdateAdditionalData(ctx context.Context, session *web.Session, additionalData map[string]string) (*cart.Cart, error)
- func (_m *CartService) UpdateBillingAddress(ctx context.Context, session *web.Session, billingAddress *cart.Address) error
- func (_m *CartService) UpdateDeliveryAdditionalData(ctx context.Context, session *web.Session, deliveryCode string, ...) (*cart.Cart, error)
- func (_m *CartService) UpdateDeliveryInfo(ctx context.Context, session *web.Session, deliveryCode string, ...) error
- func (_m *CartService) UpdateItemQty(ctx context.Context, session *web.Session, itemID string, deliveryCode string, ...) error
- func (_m *CartService) UpdateItemSourceID(ctx context.Context, session *web.Session, itemID string, sourceID string) error
- func (_m *CartService) UpdateItems(ctx context.Context, session *web.Session, ...) error
- func (_m *CartService) UpdatePaymentSelection(ctx context.Context, session *web.Session, ...) error
- func (_m *CartService) UpdatePurchaser(ctx context.Context, session *web.Session, purchaser *cart.Person, ...) error
- func (_m *CartService) ValidateCart(ctx context.Context, session *web.Session, ...) validation.Result
- func (_m *CartService) ValidateCurrentCart(ctx context.Context, session *web.Session) (validation.Result, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CartReceiver ¶ added in v3.6.0
CartReceiver is an autogenerated mock type for the Receiver type
func NewCartReceiver ¶ added in v3.6.0
func NewCartReceiver(t mockConstructorTestingTNewCartReceiver) *CartReceiver
NewCartReceiver creates a new instance of CartReceiver. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*CartReceiver) GetCart ¶ added in v3.6.0
func (_m *CartReceiver) GetCart(ctx context.Context, session *web.Session) (*cart.Cart, cart.ModifyBehaviour, error)
GetCart provides a mock function with given fields: ctx, session
func (*CartReceiver) GetCartWithoutCache ¶ added in v3.6.0
func (_m *CartReceiver) GetCartWithoutCache(ctx context.Context, session *web.Session) (*cart.Cart, error)
GetCartWithoutCache provides a mock function with given fields: ctx, session
func (*CartReceiver) ModifyBehaviour ¶ added in v3.6.0
func (_m *CartReceiver) ModifyBehaviour(ctx context.Context) (cart.ModifyBehaviour, error)
ModifyBehaviour provides a mock function with given fields: ctx
func (*CartReceiver) ShouldHaveCart ¶ added in v3.6.0
ShouldHaveCart provides a mock function with given fields: ctx, session
func (*CartReceiver) ShouldHaveGuestCart ¶ added in v3.6.0
func (_m *CartReceiver) ShouldHaveGuestCart(session *web.Session) bool
ShouldHaveGuestCart provides a mock function with given fields: session
func (*CartReceiver) ViewCart ¶ added in v3.6.0
ViewCart provides a mock function with given fields: ctx, session
func (*CartReceiver) ViewGuestCart ¶ added in v3.6.0
func (_m *CartReceiver) ViewGuestCart(ctx context.Context, session *web.Session) (*cart.Cart, error)
ViewGuestCart provides a mock function with given fields: ctx, session
type CartService ¶
CartService is an autogenerated mock type for the Service type
func NewCartService ¶ added in v3.6.0
func NewCartService(t mockConstructorTestingTNewCartService) *CartService
NewCartService creates a new instance of CartService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*CartService) AddProduct ¶
func (_m *CartService) AddProduct(ctx context.Context, session *web.Session, deliveryCode string, addRequest cart.AddRequest) (domain.BasicProduct, error)
AddProduct provides a mock function with given fields: ctx, session, deliveryCode, addRequest
func (*CartService) AdjustItemsToRestrictedQty ¶
func (_m *CartService) AdjustItemsToRestrictedQty(ctx context.Context, session *web.Session) (application.QtyAdjustmentResults, error)
AdjustItemsToRestrictedQty provides a mock function with given fields: ctx, session
func (*CartService) ApplyAny ¶
func (_m *CartService) ApplyAny(ctx context.Context, session *web.Session, anyCode string) (*cart.Cart, error)
ApplyAny provides a mock function with given fields: ctx, session, anyCode
func (*CartService) ApplyGiftCard ¶
func (_m *CartService) ApplyGiftCard(ctx context.Context, session *web.Session, couponCode string) (*cart.Cart, error)
ApplyGiftCard provides a mock function with given fields: ctx, session, couponCode
func (*CartService) ApplyVoucher ¶
func (_m *CartService) ApplyVoucher(ctx context.Context, session *web.Session, couponCode string) (*cart.Cart, error)
ApplyVoucher provides a mock function with given fields: ctx, session, couponCode
func (*CartService) BuildAddRequest ¶
func (_m *CartService) BuildAddRequest(ctx context.Context, marketplaceCode string, variantMarketplaceCode string, qty int, additionalData map[string]string) cart.AddRequest
BuildAddRequest provides a mock function with given fields: ctx, marketplaceCode, variantMarketplaceCode, qty, additionalData
func (*CartService) CancelOrder ¶
func (_m *CartService) CancelOrder(ctx context.Context, session *web.Session, orderInfos placeorder.PlacedOrderInfos, _a3 cart.Cart) (*cart.Cart, error)
CancelOrder provides a mock function with given fields: ctx, session, orderInfos, _a3
func (*CartService) CancelOrderWithoutRestore ¶
func (_m *CartService) CancelOrderWithoutRestore(ctx context.Context, session *web.Session, orderInfos placeorder.PlacedOrderInfos) error
CancelOrderWithoutRestore provides a mock function with given fields: ctx, session, orderInfos
func (*CartService) CompleteCurrentCart ¶
CompleteCurrentCart provides a mock function with given fields: ctx
func (*CartService) CreateInitialDeliveryIfNotPresent ¶
func (_m *CartService) CreateInitialDeliveryIfNotPresent(ctx context.Context, session *web.Session, deliveryCode string) (*cart.Cart, error)
CreateInitialDeliveryIfNotPresent provides a mock function with given fields: ctx, session, deliveryCode
func (*CartService) DeleteAllItems ¶
DeleteAllItems provides a mock function with given fields: ctx, session
func (*CartService) DeleteCartInCache ¶
DeleteCartInCache provides a mock function with given fields: ctx, session, _a2
func (*CartService) DeleteDelivery ¶
func (_m *CartService) DeleteDelivery(ctx context.Context, session *web.Session, deliveryCode string) (*cart.Cart, error)
DeleteDelivery provides a mock function with given fields: ctx, session, deliveryCode
func (*CartService) DeleteItem ¶
func (_m *CartService) DeleteItem(ctx context.Context, session *web.Session, itemID string, deliveryCode string) error
DeleteItem provides a mock function with given fields: ctx, session, itemID, deliveryCode
func (*CartService) ForceReserveOrderIDAndSave ¶
func (_m *CartService) ForceReserveOrderIDAndSave(ctx context.Context, session *web.Session) (*cart.Cart, error)
ForceReserveOrderIDAndSave provides a mock function with given fields: ctx, session
func (*CartService) GetCartReceiverService ¶
func (_m *CartService) GetCartReceiverService() *application.CartReceiverService
GetCartReceiverService provides a mock function with given fields:
func (*CartService) GetDefaultDeliveryCode ¶
func (_m *CartService) GetDefaultDeliveryCode() string
GetDefaultDeliveryCode provides a mock function with given fields:
func (*CartService) GetInitialDelivery ¶
func (_m *CartService) GetInitialDelivery(deliveryCode string) (*cart.DeliveryInfo, error)
GetInitialDelivery provides a mock function with given fields: deliveryCode
func (*CartService) PlaceOrder ¶
func (_m *CartService) PlaceOrder(ctx context.Context, session *web.Session, payment *placeorder.Payment) (placeorder.PlacedOrderInfos, error)
PlaceOrder provides a mock function with given fields: ctx, session, payment
func (*CartService) PlaceOrderWithCart ¶
func (_m *CartService) PlaceOrderWithCart(ctx context.Context, session *web.Session, _a2 *cart.Cart, payment *placeorder.Payment) (placeorder.PlacedOrderInfos, error)
PlaceOrderWithCart provides a mock function with given fields: ctx, session, _a2, payment
func (*CartService) RemoveGiftCard ¶
func (_m *CartService) RemoveGiftCard(ctx context.Context, session *web.Session, couponCode string) (*cart.Cart, error)
RemoveGiftCard provides a mock function with given fields: ctx, session, couponCode
func (*CartService) RemoveVoucher ¶
func (_m *CartService) RemoveVoucher(ctx context.Context, session *web.Session, couponCode string) (*cart.Cart, error)
RemoveVoucher provides a mock function with given fields: ctx, session, couponCode
func (*CartService) ReserveOrderIDAndSave ¶
func (_m *CartService) ReserveOrderIDAndSave(ctx context.Context, session *web.Session) (*cart.Cart, error)
ReserveOrderIDAndSave provides a mock function with given fields: ctx, session
func (*CartService) RestoreCart ¶
RestoreCart provides a mock function with given fields: ctx, _a1
func (*CartService) UpdateAdditionalData ¶
func (_m *CartService) UpdateAdditionalData(ctx context.Context, session *web.Session, additionalData map[string]string) (*cart.Cart, error)
UpdateAdditionalData provides a mock function with given fields: ctx, session, additionalData
func (*CartService) UpdateBillingAddress ¶
func (_m *CartService) UpdateBillingAddress(ctx context.Context, session *web.Session, billingAddress *cart.Address) error
UpdateBillingAddress provides a mock function with given fields: ctx, session, billingAddress
func (*CartService) UpdateDeliveryAdditionalData ¶
func (_m *CartService) UpdateDeliveryAdditionalData(ctx context.Context, session *web.Session, deliveryCode string, additionalData map[string]string) (*cart.Cart, error)
UpdateDeliveryAdditionalData provides a mock function with given fields: ctx, session, deliveryCode, additionalData
func (*CartService) UpdateDeliveryInfo ¶
func (_m *CartService) UpdateDeliveryInfo(ctx context.Context, session *web.Session, deliveryCode string, deliveryInfo cart.DeliveryInfoUpdateCommand) error
UpdateDeliveryInfo provides a mock function with given fields: ctx, session, deliveryCode, deliveryInfo
func (*CartService) UpdateItemQty ¶
func (_m *CartService) UpdateItemQty(ctx context.Context, session *web.Session, itemID string, deliveryCode string, qty int) error
UpdateItemQty provides a mock function with given fields: ctx, session, itemID, deliveryCode, qty
func (*CartService) UpdateItemSourceID ¶
func (_m *CartService) UpdateItemSourceID(ctx context.Context, session *web.Session, itemID string, sourceID string) error
UpdateItemSourceID provides a mock function with given fields: ctx, session, itemID, sourceID
func (*CartService) UpdateItems ¶
func (_m *CartService) UpdateItems(ctx context.Context, session *web.Session, updateCommands []cart.ItemUpdateCommand) error
UpdateItems provides a mock function with given fields: ctx, session, updateCommands
func (*CartService) UpdatePaymentSelection ¶
func (_m *CartService) UpdatePaymentSelection(ctx context.Context, session *web.Session, paymentSelection cart.PaymentSelection) error
UpdatePaymentSelection provides a mock function with given fields: ctx, session, paymentSelection
func (*CartService) UpdatePurchaser ¶
func (_m *CartService) UpdatePurchaser(ctx context.Context, session *web.Session, purchaser *cart.Person, additionalData *cart.AdditionalData) error
UpdatePurchaser provides a mock function with given fields: ctx, session, purchaser, additionalData
func (*CartService) ValidateCart ¶
func (_m *CartService) ValidateCart(ctx context.Context, session *web.Session, decoratedCart *decorator.DecoratedCart) validation.Result
ValidateCart provides a mock function with given fields: ctx, session, decoratedCart
func (*CartService) ValidateCurrentCart ¶
func (_m *CartService) ValidateCurrentCart(ctx context.Context, session *web.Session) (validation.Result, error)
ValidateCurrentCart provides a mock function with given fields: ctx, session