2023-10-06 10:12:11 +00:00
|
|
|
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"`
|
|
|
|
}
|
2023-10-12 09:24:02 +00:00
|
|
|
|
|
|
|
type Webhook struct {
|
|
|
|
Id int `json:"id"`
|
|
|
|
Type string `json:"type"`
|
|
|
|
Url string `json:"url"`
|
|
|
|
IsActive bool `json:"isActive"`
|
|
|
|
RetailerId int `json:"retailerId"`
|
|
|
|
ModifiedDate time.Time `json:"modifiedDate"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type ListWebhookRes struct {
|
|
|
|
Total int `json:"total"`
|
|
|
|
PageSize int `json:"pageSize"`
|
|
|
|
Data []Webhook `json:"data"`
|
|
|
|
Timestamp time.Time `json:"timestamp"`
|
|
|
|
}
|