products

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2020 License: MIT Imports: 7 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) GetBrands added in v1.4.1

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

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)

func (*Client) GetProductsBulk added in v1.5.0

func (cli *Client) GetProductsBulk(ctx context.Context, bulkFilters []map[string]interface{}, baseFilters map[string]string) (GetProductsResponseBulk, error)

GetProductsBulk will list suppliers according to specified filters sending a bulk request to fetch more products than the default limit

type GetProductUnitsResponse

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

GetProductUnitsResponse ...

type GetProductsResponse

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

type GetProductsResponseBulk added in v1.5.0

type GetProductsResponseBulk struct {
	Status    sharedCommon.Status           `json:"status"`
	BulkItems []GetProductsResponseBulkItem `json:"requests"`
}

type GetProductsResponseBulkItem added in v1.5.0

type GetProductsResponseBulkItem struct {
	Status   sharedCommon.StatusBulk `json:"status"`
	Products []Product               `json:"records"`
}

type Manager

type Manager interface {
	GetProducts(ctx context.Context, filters map[string]string) ([]Product, error)
	GetProductsBulk(ctx context.Context, bulkFilters []map[string]interface{}, baseFilters map[string]string) (GetProductsResponseBulk, 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)
	GetBrands(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"`
	Name               string             `json:"name"`
	NameEng            string             `json:"nameENG"`
	Code               string             `json:"code"`
	Code2              string             `json:"code2"`
	Code3              *string            `json:"code3"`
	GroupID            uint               `json:"groupID"`
	Price              float64            `json:"price"`
	DisplayedInWebshop byte               `json:"displayedInWebshop"`
	BrandID            uint               `json:"brandID"`
	Description        string             `json:"description"`
	DescriptionLong    string             `json:"longdesc"`
	DescriptionEng     string             `json:"descriptionENG"`
	DescriptionLongEng string             `json:"longdescENG"`
	Added              uint64             `json:"added"`
	LastModified       uint64             `json:"lastModified"`
	Vatrate            float64            `json:"vatrate"`
	PriceWithVat       float32            `json:"priceWithVat"`
	UnitName           *string            `json:"unitName"`
	BrandName          string             `json:"brandName"`
	GroupName          string             `json:"groupName"`
	CategoryId         uint               `json:"categoryID"`
	CategoryName       string             `json:"categoryName"`
	Status             string             `json:"status"`
	Images             []ProductImage     `json:"images"`
	ProductVariations  []string           `json:"productVariations"` // Variations of matrix product
	ParentProductID    int                `json:"parentProductID"`
	Type               string             `json:"type"`
	Warehouses         map[uint]StockInfo `json:"warehouses"`

	RelatedProducts []string          `json:"relatedProducts"`
	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