Documentation ¶
Overview ¶
Package basket provides a representation for a online eshop basket
Package promotion declares cabify promotion strategies
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Basket ¶
type Basket struct {
// contains filtered or unexported fields
}
func (*Basket) AddProduct ¶
func (*Basket) GetAllProducts ¶
func (*Basket) GetDiscountAmmount ¶
func (*Basket) GetTotalAmmount ¶
func (*Basket) RefreshDiscount ¶
func (b *Basket) RefreshDiscount()
func (*Basket) RemoveProduct ¶
type BasketHelper ¶
type BasketHelper struct {
// contains filtered or unexported fields
}
type BasketProduct ¶
type BasketProduct struct {
// contains filtered or unexported fields
}
type BulkDiscount ¶
func (*BulkDiscount) CalculateAmmount ¶
func (bd *BulkDiscount) CalculateAmmount(b *Basket)
type DiscountCalculator ¶
type DiscountCalculator interface {
CalculateAmmount(b *Basket)
}
type FreeProduct ¶
type FreeProduct struct {
Code string
}
freeProduct specifies promotions of the type 2x1
func (*FreeProduct) CalculateAmmount ¶
func (fp *FreeProduct) CalculateAmmount(b *Basket)
Click to show internal directories.
Click to hide internal directories.