products

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2020 License: MIT Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*common.Client
}

func NewClient

func NewClient(client *common.Client) *Client

func (*Client) GetProductBrands

func (cli *Client) GetProductBrands(ctx context.Context, filters map[string]string) ([]ProductBrand, error)

func (*Client) GetProductCategories

func (cli *Client) GetProductCategories(ctx context.Context, filters map[string]string) ([]ProductCategory, error)

func (*Client) GetProductGroups

func (cli *Client) GetProductGroups(ctx context.Context, filters map[string]string) ([]ProductGroup, error)

func (*Client) GetProductUnits

func (cli *Client) GetProductUnits(ctx context.Context, filters map[string]string) ([]ProductUnit, error)

func (*Client) GetProducts

func (cli *Client) GetProducts(ctx context.Context, filters map[string]string) ([]Product, error)

type GetProductUnitsResponse

type GetProductUnitsResponse struct {
	Status       common.Status `json:"status"`
	ProductUnits []ProductUnit `json:"records"`
}

GetProductUnitsResponse ...

type GetProductsResponse

type GetProductsResponse struct {
	Status   common.Status `json:"status"`
	Products []Product     `json:"records"`
}

type Manager

type Manager interface {
	GetProducts(ctx context.Context, filters map[string]string) ([]Product, error)
	GetProductUnits(ctx context.Context, filters map[string]string) ([]ProductUnit, error)
	GetProductCategories(ctx context.Context, filters map[string]string) ([]ProductCategory, error)
	GetProductBrands(ctx context.Context, filters map[string]string) ([]ProductBrand, error)
	GetProductGroups(ctx context.Context, filters map[string]string) ([]ProductGroup, error)
}

type Product

type Product struct {
	ProductID          int                `json:"productID"`
	ParentProductID    int                `json:"parentProductID"`
	Type               string             `json:"type"`
	Name               string             `json:"name"`
	NameEng            string             `json:"nameENG"`
	Description        string             `json:"description"`
	DescriptionEng     string             `json:"descriptionENG"`
	DescriptionLong    string             `json:"longdesc"`
	DescriptionLongEng string             `json:"longdescENG"`
	Status             string             `json:"status"`
	Code               string             `json:"code"`
	Code2              string             `json:"code2"`
	Code3              *string            `json:"code3"`
	Price              float64            `json:"price"`
	PriceWithVat       float32            `json:"priceWithVat"`
	UnitName           *string            `json:"unitName"`
	Images             []ProductImage     `json:"images"`
	DisplayedInWebshop byte               `json:"displayedInWebshop"`
	CategoryId         uint               `json:"categoryID"`
	CategoryName       string             `json:"categoryName"`
	BrandID            uint               `json:"brandID"`
	BrandName          string             `json:"brandName"`
	GroupID            uint               `json:"groupID"`
	GroupName          string             `json:"groupName"`
	Warehouses         map[uint]StockInfo `json:"warehouses"`
	RelatedProducts    []string           `json:"relatedProducts"`
	Vatrate            float64            `json:"vatrate"`
	ProductVariations  []string           `json:"productVariations"` // Variations of matrix product
	VariationList      []ProductVariaton  `json:"variationList"`
}

Product ...

type ProductBrand

type ProductBrand struct {
	ID           uint   `json:"brandID"`
	Name         string `json:"name"`
	Added        uint64 `json:"added"`
	LastModified uint64 `json:"lastModified"`
}

type ProductCategory

type ProductCategory struct {
	ProductCategoryID   uint   `json:"productCategoryID"`
	ParentCategoryID    uint   `json:"parentCategoryID"`
	ProductCategoryName string `json:"productCategoryName"`
	Added               uint64 `json:"added"`
	LastModified        uint64 `json:"lastModified"`
}

type ProductDimensions

type ProductDimensions struct {
	Name             string `json:"name"`
	Value            string `json:"value"`
	Order            int    `json:"order"`
	DimensionID      int    `json:"dimensionID"`
	DimensionValueID int    `json:"dimensionValueID"`
}

type ProductGroup

type ProductGroup struct {
	ID              uint           `json:"productGroupID"`
	Name            string         `json:"name"`
	ShowInWebshop   string         `json:"showInWebshop"`
	NonDiscountable byte           `json:"nonDiscountable"`
	PositionNo      int            `json:"positionNo"`
	ParentGroupID   string         `json:"parentGroupID"`
	Added           uint64         `json:"added"`
	LastModified    uint64         `json:"lastModified"`
	SubGroups       []ProductGroup `json:"subGroups"`
}

type ProductImage

type ProductImage struct {
	PictureID       string  `json:"pictureID"`
	Name            string  `json:"name"`
	ThumbURL        string  `json:"thumbURL"`
	SmallURL        string  `json:"smallURL"`
	LargeURL        string  `json:"largeURL"`
	FullURL         string  `json:"fullURL"`
	External        byte    `json:"external"`
	HostingProvider string  `json:"hostingProvider"`
	Hash            *string `json:"hash"`
	Tenant          *string `json:"tenant"`
}

type ProductUnit

type ProductUnit struct {
	UnitID string `json:"unitID"`
	Name   string `json:"name"`
}

ProductUnit ...

type ProductVariaton

type ProductVariaton struct {
	ProductID  string              `json:"productID"`
	Name       string              `json:"name"`
	Code       string              `json:"code"`
	Code2      string              `json:"code2"`
	Dimensions []ProductDimensions `json:"dimensions"`
}

type StockInfo

type StockInfo struct {
	WarehouseID   uint    `json:"warehouseID"`
	Free          int     `json:"free"`
	OrderPending  int     `json:"orderPending"`
	ReorderPoint  int     `json:"reorderPoint"`
	RestockLevel  int     `json:"restockLevel"`
	FifoCost      float32 `json:"FIFOCost"`
	PurchasePrice float32 `json:"purchasePrice"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL