Documentation
¶
Index ¶
- Constants
- type AFS
- type Address
- type AfsByType
- type Carrier
- type Country
- type Region
- type Release
- type Reservation
- type SKU
- type Shipment
- type ShipmentLineItem
- type ShipmentState
- type ShipmentTransaction
- type ShippingMethod
- type StatusChange
- type StockItem
- type StockItemSummary
- type StockItemTransaction
- type StockItemUnit
- type StockLocation
- type StringsArray
- type TransactionUpdates
- type UnitStatus
- type UnitType
Constants ¶
const ( TransactionCreditCard = "creditCard" TransactionGiftCard = "giftCard" TransactionStoreCredit = "storeCredit" )
const ( ShippingTypeFlat = iota ShippingTypeVariable )
const NumberOfUnitTypes = 4
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Carrier ¶
func (*Carrier) Identifier ¶
type Reservation ¶
func (Reservation) Identifier ¶
func (r Reservation) Identifier() uint
type SKU ¶
type SKU struct {
gormfox.Base
Scope string
Code string
UPC string
Title string
UnitCostCurrency string
UnitCostValue int
TaxClass string
RequiresShipping bool
ShippingClass string
IsReturnable bool
ReturnWindowValue float64
ReturnWindowUnits string
HeightValue float64
HeightUnits string
WeightValue float64
WeightUnits string
LengthValue float64
LengthUnits string
WidthValue float64
WidthUnits string
RequiresInventoryTracking bool
InventoryWarningLevelIsEnabled bool
InventoryWarningLevelValue int
MaximumQuantityInCartValue int
MaximumQuantityInCartIsEnabled bool
MinimumQuantityInCartValue int
MinimumQuantityInCartIsEnabled bool
AllowBackorder bool
AllowPreorder bool
RequiresLotTracking bool
LotExpirationThresholdValue float64
LotExpirationThresholdUnits string
LotExpirationWarningThresholdValue float64
LotExpirationWarningThresholdUnits string
}
type Shipment ¶
type Shipment struct {
gormfox.Base
ReferenceNumber string
ShippingMethodCode string
ShippingMethod ShippingMethod `gorm:"ForeignKey:ShippingMethodCode"`
OrderRefNum string
State ShipmentState
ShipmentDate sql.NullString
EstimatedArrival sql.NullString
DeliveredDate sql.NullString
AddressID uint
Address Address
ShipmentLineItems []ShipmentLineItem
TrackingNumber sql.NullString
ShippingPrice int
Scope string
}
type ShipmentLineItem ¶
type ShipmentLineItem struct {
gormfox.Base
ShipmentID uint
ReferenceNumbers StringsArray
StockItemUnitID uint
StockItemUnit StockItemUnit
SKU string
Name string
Price uint
ImagePath string
}
type ShipmentState ¶
type ShipmentState string
const ( ShipmentStatePending ShipmentState = "pending" ShipmentStateShipped ShipmentState = "shipped" ShipmentStateDelivered ShipmentState = "delivered" ShipmentStateCancelled ShipmentState = "cancelled" )
func (*ShipmentState) Scan ¶
func (u *ShipmentState) Scan(value interface{}) error
implement Scanner and Valuer interfaces to provide read/write for alias type
type ShipmentTransaction ¶
type ShippingMethod ¶
type ShippingMethod struct {
ID uint
CarrierID uint
Carrier Carrier
Name string
Code string
ShippingType int
Cost uint
Scope string
}
func (*ShippingMethod) Identifier ¶
func (shippingMethod *ShippingMethod) Identifier() uint
type StatusChange ¶
type StatusChange struct {
From UnitStatus
To UnitStatus
}
type StockItem ¶
type StockItem struct {
gormfox.Base
SKU string
StockLocation StockLocation
StockLocationID uint
DefaultUnitCost int
}
func (StockItem) Identifier ¶
type StockItemSummary ¶
type StockItemSummary struct {
gormfox.Base
StockItem StockItem
StockItemID uint
Type UnitType
OnHand int
OnHold int
Reserved int
Shipped int
AFS int
AFSCost int
}
func (StockItemSummary) Identifier ¶
func (sis StockItemSummary) Identifier() uint
type StockItemTransaction ¶
type StockItemUnit ¶
type StockItemUnit struct {
gormfox.Base
StockItemID uint
StockItem StockItem
Type UnitType
RefNum sql.NullString
UnitCost int
Status UnitStatus
}
func (StockItemUnit) Identifier ¶
func (siu StockItemUnit) Identifier() uint
type StockLocation ¶
type StringsArray ¶
type StringsArray []string
func (*StringsArray) Scan ¶
func (u *StringsArray) Scan(value interface{}) error
implement Scanner and Valuer interfaces to provide read/write for alias type
type TransactionUpdates ¶
type TransactionUpdates struct {
// contains filtered or unexported fields
}
TransactionUpdates is an aggregration of all the updates that are happening to a set of StockItems during a single transaction.
func NewTransactionUpdates ¶
func NewTransactionUpdates() *TransactionUpdates
func (*TransactionUpdates) AddUpdate ¶
func (t *TransactionUpdates) AddUpdate(stockItemID uint, txn *StockItemTransaction) error
AddUpdate adds a single StockItemTransaction to the list of updates. If an update to the specified stock item, unit type, and unit status is already specified, this update will get merged in. Otherwise, a new one will be created.
func (*TransactionUpdates) StockItemTransactions ¶
func (t *TransactionUpdates) StockItemTransactions() []*StockItemTransaction
StockItemTransactions retrieves the flat list of all StockItemTransactions that have been associated with this update.
type UnitStatus ¶
type UnitStatus string
const ( StatusOnHand UnitStatus = "onHand" StatusOnHold UnitStatus = "onHold" StatusReserved UnitStatus = "reserved" StatusShipped UnitStatus = "shipped" StatusEmpty UnitStatus = "" )
func (*UnitStatus) Scan ¶
func (u *UnitStatus) Scan(value interface{}) error
implement Scanner and Valuer interfaces to provide read/write for alias type
Source Files
¶
- address.go
- afs.go
- carrier.go
- country.go
- region.go
- release.go
- reservation.go
- shipment.go
- shipment_line_item.go
- shipment_state.go
- shipment_transaction.go
- shipping_method.go
- sku.go
- stock_item.go
- stock_item_summary.go
- stock_item_transaction.go
- stock_item_unit.go
- stock_item_unit_status.go
- stock_item_unit_type.go
- stock_location.go
- transaction_updates.go