merit

package module
v0.0.0-...-229c76f Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2022 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API_HOST

type API_HOST string
const (
	API_HOST_EST API_HOST = "aktiva.merit.ee"
	API_HOST_FIN API_HOST = "aktiva.meritaktiva.fi"
)

type Article

type Article struct {
	ItemCode         string  `json:"ItemCode"`
	EANCode          string  `json:"EANCode"`
	ItemName         string  `json:"ItemName"`
	LocName          string  `json:"LocName"`
	Quantity         float64 `json:"Quantity"`
	ReservedQuantity float64 `json:"ReservedQuantity"`
	UnitCode         string  `json:"UnitCode"`
	Amount           float64 `json:"Amount"`
	Price            float64 `json:"Price"`
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(apiID, apiKey string, apiHost API_HOST, logger *zap.Logger) *Client

func (*Client) GetInventoryReport

func (c *Client) GetInventoryReport(query GetInventoryReportQuery) ([]Article, error)

func (*Client) GetItemGroups

func (c *Client) GetItemGroups() ([]ItemGroup, error)

func (*Client) GetItems

func (c *Client) GetItems(query GetItemsQuery) ([]Item, error)

func (*Client) GetListOfLocations

func (c *Client) GetListOfLocations() ([]Location, error)

type GetInventoryReportQuery

type GetInventoryReportQuery struct {
	ArticleGroups    []string `json:"ArticleGroups,omitempty"`
	Location         string   `json:"Location,omitempty"`
	RepDate          string   `json:"RepDate,omitempty"`
	ShowZero         bool     `json:"ShowZero,omitempty"`
	WithReservations bool     `json:"WithReservations,omitempty"`
}

type GetItemsQuery

type GetItemsQuery struct {
	ID           string `json:"Id,omitempty"`
	Code         string `json:"Code,omitempty"`
	Description  string `json:"Description,omitempty"`
	LocationCode string `json:"LocationCode,omitempty"`
}

type Item

type Item struct {
	ID                   string  `json:"ItemId"`
	Code                 string  `json:"Code"`
	Name                 string  `json:"Name"`
	UnitofMeasureName    string  `json:"UnitofMeasureName"`
	Type                 string  `json:"Type"`
	SalesPrice           float64 `json:"SalesPrice"`
	InventoryQty         float64 `json:"InventoryQty"`
	ReservedQty          float64 `json:"ReservedQty"`
	VatTaxName           string  `json:"VatTaxName"`
	Usage                string  `json:"Usage"`
	SalesAccountCode     string  `json:"SalesAccountCode"`
	PurchaseAccountCode  string  `json:"PurchaseAccountCode"`
	InventoryAccountCode string  `json:"InventoryAccountCode"`
	ItemCostAccountCode  string  `json:"ItemCostAccountCode"`
	DiscountPct          float64 `json:"DiscountPct"`
	LastPurchasePrice    float64 `json:"LastPurchasePrice"`
	ItemUnitCost         float64 `json:"ItemUnitCost"`
	InventoryCost        float64 `json:"InventoryCost"`
	ItemGroupName        string  `json:"ItemGroupName"`
	DefLocName           string  `json:"DefLoc_Name"`
	EANCode              string  `json:"EANCode"`
}

type ItemGroup

type ItemGroup struct {
	Code string `json:"Code"`
	Name string `json:"Name"`
	ID   string `json:"Id"`
}

type Location

type Location struct {
	CompanyID     int    `json:"CompanyId"`
	LocationID    string `json:"LocationId"`
	Code          string `json:"Code"`
	Name          string `json:"Name"`
	InBPrefix     string `json:"InBPrefix"`
	InBNextNo     int    `json:"InBNextNo"`
	OutBPrefix    string `json:"OutBPrefix"`
	OutBNextNo    int    `json:"OutBNextNo"`
	Loc2LocPrefix string `json:"Loc2LocPrefix"`
	Loc2LocNextNo int    `json:"Loc2LocNextNo"`
	InvSetPrefix  string `json:"InvSetPrefix"`
	InvSetNextNo  int    `json:"InvSetNextNo"`
}

Jump to

Keyboard shortcuts

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