Documentation
¶
Index ¶
- Variables
- func OrderLinesEqual(first, second []OrderLine) bool
- type Batch
- func (b *Batch) Allocate(line OrderLine)
- func (b *Batch) AllocatedQuantity() int
- func (b *Batch) Allocations() []OrderLine
- func (b *Batch) AvailableQuantity() int
- func (b *Batch) CanAllocate(line OrderLine) bool
- func (b *Batch) Contain(line OrderLine) (bool, int)
- func (b *Batch) Deallocate(line OrderLine)
- func (b *Batch) DeallocateOne() *OrderLine
- func (b *Batch) EqualTo(other Batch) bool
- type OrderLine
- type Product
Constants ¶
This section is empty.
Variables ¶
View Source
var OutOfStockErr = errors.New("out of stock")
Functions ¶
func OrderLinesEqual ¶
Types ¶
type Batch ¶
type Batch struct { ID int64 Reference string SKU string PurchasedQuantity int ETA time.Time // contains filtered or unexported fields }
func (*Batch) AllocatedQuantity ¶
func (*Batch) Allocations ¶
func (*Batch) AvailableQuantity ¶
func (*Batch) CanAllocate ¶
func (*Batch) Deallocate ¶
func (*Batch) DeallocateOne ¶
type Product ¶
type Product struct { *domain.BaseEntity SKU string VersionNumber int Batches []*Batch }
func NewProduct ¶
func (*Product) AllocateDeprecated ¶
func (*Product) ChangeBatchQuantity ¶
func (*Product) HasOutOfStockEventAsLast ¶
Click to show internal directories.
Click to hide internal directories.