Documentation
¶
Index ¶
- Constants
- type Coupon
- type Device
- type GetRevenueRequest
- type GlobalConfig
- type HttpErrorBody
- type Increment
- type PaymentDropInRequest
- type PaymentDropInResponse
- type Product
- type ProductAttribute
- type ProductType
- type ProductVariation
- type ProductVariationAttribute
- type PusherGroupEvent
- type PusherOrderEvent
- type PusherOrderPaymentEvent
- type Revenue
- type RevenueItem
- type Store
- type StoreConfiguration
- type Tax
Constants ¶
View Source
const ( CollectionCustomer = "customers" CollectionGlobalConfig = "globalconfigs" CollectionGroup = "groups" CollectionIncrement = "increments" CollectionOrder = "orders" CollectionProduct = "products" CollectionStore = "stores" CollectionTax = "taxes" CollectionUser = "users" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetRevenueRequest ¶
type GlobalConfig ¶
type GlobalConfig struct {
ID primitive.ObjectID `bson:"_id" json:"id"`
ProductAttributeOutOfStockIn int `bson:"productAttributeOutOfStockInId" json:"productAttributeOutOfStockInId"`
ProductAttributePfandId int `bson:"productAttributePfandId" json:"productAttributePfandId"`
PusherAPIKey string `json:"pusherApiKey"` // TODO: before provide PATCH method, add this to DB!!!
CreatedAt time.Time `bson:"createdAt" json:"createdAt"`
UpdatedAt time.Time `bson:"updatedAt" json:"updatedAt"`
}
type HttpErrorBody ¶
type PaymentDropInRequest ¶
type PaymentDropInRequest struct {
ReturnURL string `json:"returnUrl"`
}
type PaymentDropInResponse ¶
type Product ¶
type Product struct {
ID primitive.ObjectID `bson:"_id" json:"id"`
WPID int `bson:"id" json:"wpId"` // it's ok in patch request because we won't change this
Name string `bson:"name" json:"name"`
Permalink string `bson:"permalink" json:"permalink"`
Type ProductType `bson:"type" json:"type"`
SKU string `bson:"sku" json:"sku"`
Price string `bson:"price" json:"price"`
RegularPrice string `bson:"regularPrice" json:"regularPrice"`
SalePrice string `bson:"salePrice" json:"salePrice"`
TaxClass string `bson:"taxClass" json:"taxClass"`
Categories []string `bson:"categories" json:"categories"`
Images []string `bson:"images" json:"images"`
Attributes []ProductAttribute `bson:"attributes" json:"attributes"`
Variations []ProductVariation `bson:"variations" json:"variations"`
OutOfStockIn []string `bson:"outOfStockIn" json:"outOfStockIn"`
Pfand string `bson:"pfand" json:"pfand"`
CreatedAt time.Time `bson:"createdAt" json:"createdAt"`
UpdatedAt time.Time `bson:"updatedAt" json:"updatedAt"`
}
type ProductAttribute ¶
type ProductAttribute struct {
WPID int `bson:"id" json:"wpId"` // it's ok in patch request because we won't change this
Name string `bson:"name" json:"name"`
Position int `bson:"position" json:"position"`
Variation bool `bson:"variation" json:"variation"`
Visible bool `bson:"visible" json:"visible"`
Options []string `bson:"options" json:"options"`
}
type ProductType ¶
type ProductType string
const ( ProductTypeSimple ProductType = "simple" ProductTypeVariable ProductType = "variable" )
type ProductVariation ¶
type ProductVariation struct {
WPID int `bson:"id" json:"wpId"` // it's ok in patch request because we won't change this
Price string `bson:"price" json:"price"`
RegularPrice string `bson:"regularPrice" json:"regularPrice"`
SalePrice string `bson:"salePrice" json:"salePrice"`
Attributes []ProductVariationAttribute `bson:"attributes" json:"attributes"`
}
type PusherGroupEvent ¶
type PusherGroupEvent struct {
StoreID string `json:"storeId"`
}
type PusherOrderEvent ¶
type PusherOrderEvent struct {
StoreID string `json:"storeId"`
}
type PusherOrderPaymentEvent ¶
type PusherOrderPaymentEvent struct {
OrderID string `json:"orderId"`
}
type Revenue ¶
type Revenue struct {
Request GetRevenueRequest `json:"request"`
Items []RevenueItem `json:"items"`
}
type RevenueItem ¶
type RevenueItem struct {
Text string `json:"type"`
Total primitive.Decimal128 `json:"total"`
}
type Store ¶
type Store struct {
ID primitive.ObjectID `bson:"_id" json:"id"`
Email string `bson:"email" json:"email"`
Telephone string `bson:"telephone" json:"telephone"`
Name string `bson:"name" json:"name"`
Address string `bson:"address" json:"address"`
Company string `bson:"company" json:"company"`
Owner string `bson:"owner" json:"owner"`
Register string `bson:"register" json:"register"`
Tax string `bson:"tax" json:"tax"`
Configuration StoreConfiguration `bson:"configuration" json:"configuration"`
Drivers []string `bson:"drivers" json:"drivers"`
Devices []Device `bson:"devices" json:"devices"`
CreatedAt time.Time `bson:"createdAt" json:"createdAt"`
UpdatedAt time.Time `bson:"updatedAt" json:"updatedAt"`
}
type StoreConfiguration ¶
type StoreConfiguration struct {
EnablePrinterAddress bool `bson:"enablePrinterAddress" json:"enablePrinterAddress"`
EnablePrinterInternal bool `bson:"enablePrinterInternal" json:"enablePrinterInternal"`
EnablePrinterPositions bool `bson:"enablePrinterPositions" json:"enablePrinterPositions"`
POSID string `bson:"posId" json:"posId"`
EnableAutomaticPosPayment bool `bson:"enableAutomaticPosPayment" json:"enableAutomaticPosPayment"`
WPStoreKey string `bson:"wpStoreKey" json:"wpStoreKey"`
}
type Tax ¶
type Tax struct {
ID primitive.ObjectID `bson:"_id" json:"id"`
WPID int `bson:"id" json:"wpId"`
Rate string `bson:"rate" json:"rate"`
Name string `bson:"name" json:"name"`
TaxClass string `bson:"class" json:"taxClass"` // it's ok to have different names here because we don't provide PATCH request for this entity.
CreatedAt time.Time `bson:"createdAt" json:"createdAt"`
UpdatedAt time.Time `bson:"updatedAt" json:"updatedAt"`
}
Click to show internal directories.
Click to hide internal directories.