Documentation
¶
Index ¶
- type Client
- func (cli *Client) GetBrands(ctx context.Context, filters map[string]string) ([]ProductBrand, error)
- func (cli *Client) GetProductBrands(ctx context.Context, filters map[string]string) ([]ProductBrand, error)
- func (cli *Client) GetProductCategories(ctx context.Context, filters map[string]string) ([]ProductCategory, error)
- func (cli *Client) GetProductGroups(ctx context.Context, filters map[string]string) ([]ProductGroup, error)
- func (cli *Client) GetProductUnits(ctx context.Context, filters map[string]string) ([]ProductUnit, error)
- func (cli *Client) GetProducts(ctx context.Context, filters map[string]string) ([]Product, error)
- func (cli *Client) GetProductsBulk(ctx context.Context, bulkFilters []map[string]interface{}, ...) (GetProductsResponseBulk, error)
- type GetProductUnitsResponse
- type GetProductsResponse
- type GetProductsResponseBulk
- type GetProductsResponseBulkItem
- type ListingDataProvider
- type Manager
- type Product
- type ProductBrand
- type ProductCategory
- type ProductDimensions
- type ProductGroup
- type ProductImage
- type ProductUnit
- type ProductVariaton
- type StockInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func (*Client) GetProductBrands ¶
func (*Client) GetProductCategories ¶
func (*Client) GetProductGroups ¶
func (*Client) GetProductUnits ¶
func (*Client) GetProducts ¶
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 products 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 ListingDataProvider ¶ added in v1.6.1
type ListingDataProvider struct {
// contains filtered or unexported fields
}
func NewListingDataProvider ¶ added in v1.6.1
func NewListingDataProvider(erplyClient Manager) *ListingDataProvider
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"`
Active int `json:"active"`
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"`
GrossWeight string `json:"grossWeight"`
NetWeight string `json:"netWeight"`
UnitName *string `json:"unitName"`
BrandName string `json:"brandName"`
GroupName string `json:"groupName"`
CategoryId uint `json:"categoryID"`
CategoryName string `json:"categoryName"`
Status string `json:"status"`
SupplierID int `json:"supplierID"`
Images []ProductImage `json:"images"`
ProductVariations []string `json:"productVariations"` // Variations of matrix product
ParentProductID int `json:"parentProductID"`
NonStockProduct int `json:"nonStockProduct"`
TaxFree int `json:"taxFree"`
Type string `json:"type"`
Warehouses map[uint]StockInfo `json:"warehouses"`
RelatedProducts []string `json:"relatedProducts"`
VariationList []ProductVariaton `json:"variationList"`
}
Payload ...
type ProductBrand ¶
type ProductCategory ¶
type ProductDimensions ¶
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"`
Attributes []map[string]string `json:"attributes,omitempty"`
}
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 ¶
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"`
}
Click to show internal directories.
Click to hide internal directories.