3pl/partnerapi/kiotviet/model_req.go

64 lines
1.7 KiB
Go

package kiotviet
type AuthReq struct {
ClientID string
ClientSecret string
GrantType string
Scopes string
}
type ListProductOnHandsReq struct {
OrderBy string `json:"orderBy,omitempty"`
LastModifiedFrom string `json:"lastModifiedFrom,omitempty"`
PageSize int `json:"pageSize,omitempty"`
CurrentItem int `json:"currentItem,omitempty"`
}
type ListBranchesReq struct {
OrderBy string `json:"orderBy,omitempty"`
LastModifiedFrom string `json:"lastModifiedFrom,omitempty"`
PageSize int `json:"pageSize,omitempty"`
CurrentItem int `json:"currentItem,omitempty"`
OrderDirection string `json:"orderDirection,omitempty"` // Asc/ Desc. Default Desc
IncludeRemoveIDs string `json:"includeRemoveIds,omitempty"` // true/ false
}
type ListWebhookReq struct {
}
type WebhookReq struct {
Type string `json:"Type"`
Url string `json:"Url"`
IsActive bool `json:"IsActive"`
}
type RegisterWebhookReq struct {
Webhook WebhookReq `json:"webhook"`
}
type UnregisterWebhookReq struct {
ID int
}
type WebhookBody struct {
ID string `json:"Id"`
Attempt int `json:"Attempt"`
Notifications []WebhookNotification `json:"Notifications"`
}
type WebhookNotification struct {
Action string `json:"Action"`
Data []WebhookStockUpdateData `json:"Data"`
}
type WebhookStockUpdateData struct {
ProductID int64 `json:"ProductId"`
ProductCode string `json:"ProductCode"`
ProductName string `json:"ProductName"`
BranchID int `json:"BranchId"`
BranchName string `json:"BranchName"`
Cost int64 `json:"Cost"`
OnHand int `json:"OnHand"`
Reserved int `json:"Reserved"`
}