prices

package
v1.27.3 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangeProductToPriceListResponse added in v1.14.0

type ChangeProductToPriceListResponse struct {
	Status                          sharedCommon.Status              `json:"status"`
	ChangeProductToPriceListResults []ChangeProductToPriceListResult `json:"records"`
}

type ChangeProductToPriceListResponseBulk added in v1.14.0

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

type ChangeProductToPriceListResult added in v1.14.0

type ChangeProductToPriceListResult struct {
	PriceListProductID int `json:"priceListProductID"`
}

type ChangeProductToPriceListResultBulkItem added in v1.14.0

type ChangeProductToPriceListResultBulkItem struct {
	Status  sharedCommon.StatusBulk          `json:"status"`
	Records []ChangeProductToPriceListResult `json:"records"`
}

type ChangeProductToSupplierPriceListResponse

type ChangeProductToSupplierPriceListResponse struct {
	Status                                 sharedCommon.Status                      `json:"status"`
	ChangeProductToSupplierPriceListResult []ChangeProductToSupplierPriceListResult `json:"records"`
}

type ChangeProductToSupplierPriceListResponseBulk

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

type ChangeProductToSupplierPriceListResult

type ChangeProductToSupplierPriceListResult struct {
	SupplierPriceListProductID int `json:"supplierPriceListProductID"`
}

type ChangeProductToSupplierPriceListResultBulkItem

type ChangeProductToSupplierPriceListResultBulkItem struct {
	Status  sharedCommon.StatusBulk                  `json:"status"`
	Records []ChangeProductToSupplierPriceListResult `json:"records"`
}

type Client

type Client struct {
	*common.Client
}

func NewClient

func NewClient(client *common.Client) *Client

func (*Client) AddProductToPriceList added in v1.14.0

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

func (*Client) AddProductToSupplierPriceList

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

func (*Client) ChangeProductToPriceListBulk added in v1.14.0

func (cli *Client) ChangeProductToPriceListBulk(ctx context.Context, bulkRequest []map[string]interface{}, baseFilters map[string]string) (ChangeProductToPriceListResponseBulk, error)

func (*Client) ChangeProductToSupplierPriceListBulk

func (cli *Client) ChangeProductToSupplierPriceListBulk(ctx context.Context, bulkRequest []map[string]interface{}, baseFilters map[string]string) (ChangeProductToSupplierPriceListResponseBulk, error)

ChangeProductToSupplierPriceListBulk wraps both additions and edits as addProductToSupplierPriceList or editProductInSupplierPriceList

func (*Client) DeleteProductsFromPriceList added in v1.14.0

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

func (*Client) DeleteProductsFromPriceListBulk added in v1.14.0

func (cli *Client) DeleteProductsFromPriceListBulk(
	ctx context.Context,
	bulkRequest []map[string]interface{}, baseFilters map[string]string,
) (DeleteProductsFromPriceListResponseBulk, error)

func (*Client) DeleteProductsFromSupplierPriceList

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

func (*Client) DeleteProductsFromSupplierPriceListBulk

func (cli *Client) DeleteProductsFromSupplierPriceListBulk(ctx context.Context, bulkRequest []map[string]interface{}, baseFilters map[string]string) (DeleteProductsFromSupplierPriceListResponseBulk, error)

func (*Client) EditProductToPriceList added in v1.14.0

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

func (*Client) EditProductToSupplierPriceList

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

func (*Client) GetPriceLists added in v1.21.0

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

func (*Client) GetPriceListsBulk added in v1.22.0

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

func (*Client) GetProductPrices added in v1.26.0

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

func (*Client) GetProductPricesInPriceLists added in v1.26.0

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

func (*Client) GetProductsInPriceList added in v1.6.0

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

func (*Client) GetProductsInPriceListBulk added in v1.6.0

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

func (*Client) GetProductsInPriceListWithStatus added in v1.15.0

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

func (*Client) GetProductsInSupplierPriceList added in v1.6.0

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

func (*Client) GetProductsInSupplierPriceListBulk added in v1.6.0

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

func (*Client) GetProductsWithChangedPrices added in v1.26.0

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

func (*Client) GetSupplierPriceLists

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

func (*Client) GetSupplierPriceListsBulk

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

func (*Client) SavePriceList added in v1.14.0

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

func (*Client) SavePriceListBulk added in v1.14.0

func (cli *Client) SavePriceListBulk(ctx context.Context, bulkRequest []map[string]interface{}, baseFilters map[string]string) (SavePriceListResponseBulk, error)

func (*Client) SaveSupplierPriceList

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

func (*Client) SaveSupplierPriceListBulk

func (cli *Client) SaveSupplierPriceListBulk(ctx context.Context, bulkRequest []map[string]interface{}, baseFilters map[string]string) (SaveSupplierPriceListResponseBulk, error)

type DeleteProductsFromPriceListBulkItem added in v1.14.0

type DeleteProductsFromPriceListBulkItem struct {
	Status  sharedCommon.StatusBulk             `json:"status"`
	Records []DeleteProductsFromPriceListResult `json:"records"`
}

type DeleteProductsFromPriceListResponse added in v1.14.0

type DeleteProductsFromPriceListResponse struct {
	Status                             sharedCommon.Status                 `json:"status"`
	DeleteProductsFromPriceListResults []DeleteProductsFromPriceListResult `json:"records"`
}

type DeleteProductsFromPriceListResponseBulk added in v1.14.0

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

type DeleteProductsFromPriceListResult added in v1.14.0

type DeleteProductsFromPriceListResult struct {
	DeletedIDs     string `json:"deletedIDs"`
	NonExistingIDs string `json:"nonExistingIDs"`
}

type DeleteProductsFromSupplierPriceListBulkItem

type DeleteProductsFromSupplierPriceListBulkItem struct {
	Status  sharedCommon.StatusBulk                     `json:"status"`
	Records []DeleteProductsFromSupplierPriceListResult `json:"records"`
}

type DeleteProductsFromSupplierPriceListResponse

type DeleteProductsFromSupplierPriceListResponse struct {
	Status                                    sharedCommon.Status                         `json:"status"`
	DeleteProductsFromSupplierPriceListResult []DeleteProductsFromSupplierPriceListResult `json:"records"`
}

type DeleteProductsFromSupplierPriceListResponseBulk

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

type DeleteProductsFromSupplierPriceListResult

type DeleteProductsFromSupplierPriceListResult struct {
	DeletedIDs     string `json:"deletedIDs"`
	NonExistingIDs string `json:"nonExistingIDs"`
}

type GetPriceListsResponse

type GetPriceListsResponse struct {
	Status     sharedCommon.Status `json:"status"`
	PriceLists []PriceList         `json:"records"`
}

type GetPriceListsResponseBulk

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

type GetPriceListsResponseBulkItem

type GetPriceListsResponseBulkItem struct {
	Status     sharedCommon.StatusBulk `json:"status"`
	PriceLists []PriceList             `json:"records"`
}

type GetProductPricesInPriceListsResponse added in v1.26.0

type GetProductPricesInPriceListsResponse struct {
	Status  sharedCommon.Status         `json:"status"`
	Records []ProductPricesInPriceLists `json:"records"`
}

type GetProductPricesResponse added in v1.26.0

type GetProductPricesResponse struct {
	Status  sharedCommon.Status `json:"status"`
	Records []ProductPrice      `json:"records"`
}

type GetProductsInPriceListResponse added in v1.6.0

type GetProductsInPriceListResponse struct {
	Status     sharedCommon.Status   `json:"status"`
	PriceLists []ProductsInPriceList `json:"records"`
}

type GetProductsInPriceListResponseBulk added in v1.6.0

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

type GetProductsInPriceListResponseBulkItem added in v1.6.0

type GetProductsInPriceListResponseBulkItem struct {
	Status     sharedCommon.StatusBulk `json:"status"`
	PriceLists []ProductsInPriceList   `json:"records"`
}

type GetProductsWithChangedPricesResponse added in v1.26.0

type GetProductsWithChangedPricesResponse struct {
	Status  sharedCommon.Status         `json:"status"`
	Records []ProductsWithChangedPrices `json:"records"`
}

type GetRegularPriceListResponseBulk added in v1.22.0

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

type GetRegularPriceListResponseBulkItem added in v1.22.0

type GetRegularPriceListResponseBulkItem struct {
	Status     sharedCommon.StatusBulk `json:"status"`
	PriceLists []RegularPriceList      `json:"records"`
}

type GetRegularPriceListResult added in v1.21.0

type GetRegularPriceListResult struct {
	Status     sharedCommon.Status `json:"status"`
	PriceLists []RegularPriceList  `json:"records"`
}

type Manager

type Manager interface {
	GetSupplierPriceLists(ctx context.Context, filters map[string]string) ([]PriceList, error)
	AddProductToSupplierPriceList(ctx context.Context, filters map[string]string) (*ChangeProductToSupplierPriceListResult, error)
	EditProductToSupplierPriceList(ctx context.Context, filters map[string]string) (*ChangeProductToSupplierPriceListResult, error)
	ChangeProductToSupplierPriceListBulk(ctx context.Context, bulkRequest []map[string]interface{}, baseFilters map[string]string) (ChangeProductToSupplierPriceListResponseBulk, error)
	GetSupplierPriceListsBulk(ctx context.Context, bulkFilters []map[string]interface{}, baseFilters map[string]string) (GetPriceListsResponseBulk, error)
	GetProductsInPriceList(ctx context.Context, filters map[string]string) ([]ProductsInPriceList, error)
	GetProductsInPriceListWithStatus(ctx context.Context, filters map[string]string) (GetProductsInPriceListResponse, error)
	GetProductsInPriceListBulk(ctx context.Context, bulkFilters []map[string]interface{}, baseFilters map[string]string) (GetProductsInPriceListResponseBulk, error)
	GetProductsInSupplierPriceList(ctx context.Context, filters map[string]string) ([]ProductsInSupplierPriceList, error)
	GetProductsInSupplierPriceListBulk(ctx context.Context, bulkFilters []map[string]interface{}, baseFilters map[string]string) (ProductsInSupplierPriceListResponseBulk, error)
	DeleteProductsFromSupplierPriceList(ctx context.Context, filters map[string]string) (*DeleteProductsFromSupplierPriceListResult, error)
	DeleteProductsFromSupplierPriceListBulk(ctx context.Context, bulkFilters []map[string]interface{}, baseFilters map[string]string) (DeleteProductsFromSupplierPriceListResponseBulk, error)
	SaveSupplierPriceList(ctx context.Context, filters map[string]string) (*SaveSupplierPriceListResult, error)
	SaveSupplierPriceListBulk(ctx context.Context, bulkRequest []map[string]interface{}, baseFilters map[string]string) (SaveSupplierPriceListResponseBulk, error)
	GetPriceLists(ctx context.Context, filters map[string]string) (*GetRegularPriceListResult, error)
	GetPriceListsBulk(ctx context.Context, bulkFilters []map[string]interface{}, baseFilters map[string]string) (GetRegularPriceListResponseBulk, error)
	SavePriceList(ctx context.Context, filters map[string]string) (*SavePriceListResult, error)
	SavePriceListBulk(ctx context.Context, bulkRequest []map[string]interface{}, baseFilters map[string]string) (SavePriceListResponseBulk, error)
	AddProductToPriceList(ctx context.Context, filters map[string]string) (*ChangeProductToPriceListResult, error)
	EditProductToPriceList(ctx context.Context, filters map[string]string) (*ChangeProductToPriceListResult, error)
	ChangeProductToPriceListBulk(ctx context.Context, bulkRequest []map[string]interface{}, baseFilters map[string]string) (ChangeProductToPriceListResponseBulk, error)
	DeleteProductsFromPriceList(ctx context.Context, filters map[string]string) (*DeleteProductsFromPriceListResult, error)
	DeleteProductsFromPriceListBulk(ctx context.Context, bulkFilters []map[string]interface{}, baseFilters map[string]string) (DeleteProductsFromPriceListResponseBulk, error)
	GetProductPrices(ctx context.Context, filters map[string]string) ([]ProductPrice, error)
	GetProductPricesInPriceLists(ctx context.Context, filters map[string]string) ([]ProductPricesInPriceLists, error)
	GetProductsWithChangedPrices(ctx context.Context, filters map[string]string) ([]int, error)
}

type NotAddedPriceItem added in v1.14.0

type NotAddedPriceItem struct {
	Type string `json:"type"`
	ID   int    `json:"id"`
}

type PriceCalculationStep added in v1.26.0

type PriceCalculationStep struct {
	PriceListID   int     `json:"priceListID"`
	PriceListName string  `json:"priceListName"`
	Price         float64 `json:"price"`
	Discount      float64 `json:"discount"`
	Type          string  `json:"type"`
	Percentage    float64 `json:"percentage"`
}

type PriceList

type PriceList struct {
	ID                     int                         `json:"supplierPriceListID"`
	SupplierID             int                         `json:"supplierID"`
	SupplierName           string                      `json:"supplierName"`
	Name                   string                      `json:"name"`
	ValidFrom              string                      `json:"startDate"`
	ValidTo                string                      `json:"endDate"`
	Active                 string                      `json:"active"`
	AddedTimestamp         int                         `json:"added"`
	LastModifiedTimestamp  int                         `json:"lastModified"`
	AddedByUserName        string                      `json:"addedByUserName"`
	LastModifiedByUserName string                      `json:"lastModifiedByUserName"`
	Rules                  []PriceListRule             `json:"pricelistRules"`
	Attributes             []sharedCommon.ObjAttribute `json:"attributes"`
}

type PriceListRule

type PriceListRule struct {
	ProductID       int     `json:"productID"`
	Price           float32 `json:"price,string"`
	Type            string  `json:"type"`
	DiscountPercent int     `json:"discountPercent,string"`
	Amount          int     `json:"amount"`
}

type ProductPrice added in v1.26.0

type ProductPrice struct {
	ProductID             string                 `json:"productID"`
	DefaultPrice          string                 `json:"defaultPrice"`
	DefaultPriceWithVAT   float64                `json:"defaultPriceWithVAT"`
	SpecialPrice          string                 `json:"specialPrice"`
	SpecialPriceWithVAT   float64                `json:"specialPriceWithVAT"`
	PriceCalculationSteps []PriceCalculationStep `json:"priceCalculationSteps"`
}

type ProductPricesInPriceLists added in v1.26.0

type ProductPricesInPriceLists struct {
	ProductID     int    `json:"productID"`
	PricelistID   int    `json:"pricelistID"`
	PricelistName string `json:"pricelistName"`
	Price         string `json:"price"`
}

type ProductsInPriceList added in v1.6.0

type ProductsInPriceList struct {
	PriceListProductID int     `json:"priceListProductID"`
	ProductID          int     `json:"productID"`
	Price              float32 `json:"price"`
	Amount             int     `json:"amount"`
	Subsidy            float32 `json:"subsidy"`
	SubsidyTypeID      int     `json:"subsidyTypeID"`
	Page               int     `json:"page"`
	ForecastUnits      int     `json:"forecastUnits"`
}

type ProductsInSupplierPriceList added in v1.6.0

type ProductsInSupplierPriceList struct {
	SupplierPriceListProductID int     `json:"supplierPriceListProductID"`
	ProductID                  int     `json:"productID"`
	Price                      float32 `json:"price"`
	Amount                     int     `json:"amount"`
	CountryID                  int     `json:"countryID"`
	ProductSupplierCode        string  `json:"supplierCode"`
	ImportCode                 string  `json:"importCode"`
	MasterPackQuantity         int     `json:"masterPackQuantity"`
	MinimumOrderQuantity       int     `json:"minimumOrderQuantity"`
}

type ProductsInSupplierPriceListResponse added in v1.6.0

type ProductsInSupplierPriceListResponse struct {
	Status                      sharedCommon.Status           `json:"status"`
	ProductsInSupplierPriceList []ProductsInSupplierPriceList `json:"records"`
}

type ProductsInSupplierPriceListResponseBulk added in v1.6.0

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

type ProductsInSupplierPriceListResponseBulkItem added in v1.6.0

type ProductsInSupplierPriceListResponseBulkItem struct {
	Status                      sharedCommon.StatusBulk       `json:"status"`
	ProductsInSupplierPriceList []ProductsInSupplierPriceList `json:"records"`
}

type ProductsWithChangedPrices added in v1.26.0

type ProductsWithChangedPrices struct {
	ProductIDs []int `json:"productIDs"`
}

type RegularPriceList added in v1.21.0

type RegularPriceList struct {
	PricelistID            int                         `json:"pricelistID"`
	Name                   string                      `json:"name"`
	ValidFrom              string                      `json:"startDate"`
	ValidTo                string                      `json:"endDate"`
	Active                 string                      `json:"active"`
	AddedTimestamp         int                         `json:"added"`
	LastModifiedTimestamp  int                         `json:"lastModified"`
	AddedByUserName        string                      `json:"addedByUserName"`
	LastModifiedByUserName string                      `json:"lastModifiedByUserName"`
	Rules                  []RegularPriceListRule      `json:"pricelistRules"`
	Attributes             []sharedCommon.ObjAttribute `json:"attributes"`
}

type RegularPriceListRule added in v1.22.0

type RegularPriceListRule struct {
	ID              int     `json:"id"`
	Price           float32 `json:"price,string"`
	Type            string  `json:"type"`
	DiscountPercent int     `json:"discountPercent,string"`
}

type SavePriceListBulkItem added in v1.14.0

type SavePriceListBulkItem struct {
	Status  sharedCommon.StatusBulk `json:"status"`
	Records []SavePriceListResult   `json:"records"`
}

type SavePriceListResponseBulk added in v1.14.0

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

type SavePriceListResult added in v1.14.0

type SavePriceListResult struct {
	PriceListID              int                 `json:"pricelistID"`
	ItemsNotAddedToPriceList []NotAddedPriceItem `json:"itemsNotAddedToPriceList"`
}

type SavePriceListResultResponse added in v1.14.0

type SavePriceListResultResponse struct {
	Status               sharedCommon.Status   `json:"status"`
	SavePriceListResults []SavePriceListResult `json:"records"`
}

type SaveSupplierPriceListBulkItem

type SaveSupplierPriceListBulkItem struct {
	Status  sharedCommon.StatusBulk       `json:"status"`
	Records []SaveSupplierPriceListResult `json:"records"`
}

type SaveSupplierPriceListResponseBulk

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

type SaveSupplierPriceListResult

type SaveSupplierPriceListResult struct {
	SupplierPriceListID int `json:"supplierPriceListID"`
}

type SaveSupplierPriceListResultResponse

type SaveSupplierPriceListResultResponse struct {
	Status                      sharedCommon.Status           `json:"status"`
	SaveSupplierPriceListResult []SaveSupplierPriceListResult `json:"records"`
}

Jump to

Keyboard shortcuts

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