3pl/partnerapi/kiotviet/model_res.go

70 lines
1.8 KiB
Go

package kiotviet
import "time"
type AuthRes struct {
AccessToken string `json:"access_token"`
ExpiresIn int `json:"expires_in"`
TokenType string `json:"token_type"`
Scope string `json:"scope"`
}
type ListProductOnHandsRes struct {
Total int `json:"total"`
PageSize int `json:"pageSize"`
Data []ProductOnHand `json:"data"`
Timestamp time.Time `json:"timestamp"`
}
type ProductOnHand struct {
ID int `json:"id"`
Code string `json:"code"`
CreatedDate string `json:"createdDate"`
ModifiedDate string `json:"modifiedDate"`
Inventories []ProductOnHandInventory `json:"inventories"`
}
type ProductOnHandInventory struct {
BranchID int `json:"branchId"`
OnHand int `json:"onHand"`
Reserved int `json:"reserved"`
}
type ListBranchesRes struct {
Total int `json:"total"`
PageSize int `json:"pageSize"`
Data []Branch `json:"data"`
Timestamp time.Time `json:"timestamp"`
}
type Branch struct {
ID int `json:"id"`
BranchName string `json:"branchName"`
Address string `json:"address"`
LocationName string `json:"locationName"`
ContactNumber string `json:"contactNumber"`
RetailerID int `json:"retailerId"`
CreatedDate string `json:"createdDate"`
}
type RegisterWebhookRes struct {
ID int `json:"id"`
Type string `json:"type"`
Url string `json:"url"`
IsActive bool `json:"isActive"`
RetailerID int `json:"retailerId"`
}
type UnregisterWebhookRes struct {
Success bool
}
type ResponseError struct {
ResponseStatus RError `json:"responseStatus"`
}
type RError struct {
ErrorCode string `json:"errorCode"`
Message string `json:"message"`
}