Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrProcessOrder ¶
type ErrProcessOrder struct {
// contains filtered or unexported fields
}
ErrProcessOrder represents a process order error
func NewErrProcessOrder ¶
func NewErrProcessOrder(message string) *ErrProcessOrder
NewErrProcessOrder constructor
func (*ErrProcessOrder) Error ¶
func (e *ErrProcessOrder) Error() string
type ErrProcessPayment ¶
type ErrProcessPayment struct {
// contains filtered or unexported fields
}
ErrProcessPayment represents a process payment error
func NewErrProcessPayment ¶
func NewErrProcessPayment(message string) *ErrProcessPayment
NewErrProcessPayment constructor
func (*ErrProcessPayment) Error ¶
func (e *ErrProcessPayment) Error() string
type ErrProcessRefund ¶
type ErrProcessRefund struct {
// contains filtered or unexported fields
}
ErrProcessRefund represents a process payment refund error
func NewErrProcessRefund ¶
func NewErrProcessRefund(message string) *ErrProcessRefund
NewErrProcessRefund constructor
func (*ErrProcessRefund) Error ¶
func (e *ErrProcessRefund) Error() string
type ErrReleaseInventory ¶
type ErrReleaseInventory struct {
// contains filtered or unexported fields
}
ErrReleaseInventory represents a inventory update reversal error
func NewErrReleaseInventory ¶
func NewErrReleaseInventory(message string) *ErrReleaseInventory
NewErrReleaseInventory constructor
func (*ErrReleaseInventory) Error ¶
func (e *ErrReleaseInventory) Error() string
type ErrReserveInventory ¶
type ErrReserveInventory struct {
// contains filtered or unexported fields
}
ErrReserveInventory represents a inventory update error
func NewErrReserveInventory ¶
func NewErrReserveInventory(message string) *ErrReserveInventory
NewErrReserveInventory constructor
func (*ErrReserveInventory) Error ¶
func (e *ErrReserveInventory) Error() string
type ErrUpdateOrderStatus ¶
type ErrUpdateOrderStatus struct {
// contains filtered or unexported fields
}
ErrUpdateOrderStatus represents a process order error
func NewErrUpdateOrderStatus ¶
func NewErrUpdateOrderStatus(message string) *ErrUpdateOrderStatus
NewErrUpdateOrderStatus constructor
func (*ErrUpdateOrderStatus) Error ¶
func (e *ErrUpdateOrderStatus) Error() string
type Inventory ¶
type Inventory struct { TransactionID string `json:"transaction_id,omitempty"` TransactionDate string `json:"transaction_date,omitempty"` OrderID string `json:"order_id,omitempty"` OrderItems []string `json:"items,omitempty"` TransactionType string `json:"transaction_type,omitempty"` }
Inventory represents the transaction on inventory
type Item ¶
type Item struct { ItemID string `json:"item_id,omitempty"` Qty float64 `json:"qty,omitempty"` Description string `json:"description,omitempty"` UnitPrice float64 `json:"unit_price,omitempty"` }
Item represents an item in the cart
type Order ¶
type Order struct { OrderID string `json:"order_id,omitempty"` OrderDate time.Time `json:"order_date,omitempty"` CustomerID string `json:"customer_id,omitempty"` OrderStatus string `json:"order_status,omitempty"` Items []Item `json:"items,omitempty"` Payment Payment `json:"payment,omitempty"` Inventory Inventory `json:"inventory,omitempty"` }
Order represents a customer order
type Payment ¶
type Payment struct { MerchantID string `json:"merchant_id,omitempty"` PaymentAmount float64 `json:"payment_amount,omitempty"` TransactionID string `json:"transaction_id,omitempty"` TransactionDate string `json:"transaction_date,omitempty"` OrderID string `json:"order_id,omitempty"` PaymentType string `json:"payment_type,omitempty"` }
Payment represents a customer credit card payment