3pl/partnerapi/kiotviet/model_req.go

64 lines
1.7 KiB
Go
Raw Normal View History

2023-10-06 10:12:11 +00:00
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
}
2023-10-12 09:24:02 +00:00
type ListWebhookReq struct {
}
2023-10-06 10:12:11 +00:00
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 {
2023-10-12 04:04:46 +00:00
ID string `json:"Id"`
Attempt int `json:"Attempt"`
Notifications []WebhookNotification `json:"Notifications"`
2023-10-06 10:12:11 +00:00
}
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"`
}