update onpoint webhook payload

This commit is contained in:
Sinh 2022-10-14 14:39:57 +07:00
parent 4380f5339b
commit 00d2d0f895
2 changed files with 17 additions and 14 deletions

View File

@ -1,5 +1,11 @@
package onpoint
const (
CodeSuccess = "SUCCESS"
TimeLayout = "2006-01-02T15:04:05Z"
)
const (
baseURLStaging = "https://dev-selly-api.onpoint.vn"
baseURLProd = "https://selly-api.onpoint.vn"
@ -15,8 +21,6 @@ const (
webhookEventUpdateOrderStatus = "update_order_status"
webhookEventUpdateInventory = "update_inventory"
CodeSuccess = "SUCCESS"
)
var (

View File

@ -59,16 +59,15 @@ type WebhookDataUpdateInventory struct {
AvailableQuantity int `json:"available_quantity"`
CommittedQuantity int `json:"committed_quantity"`
TotalQuantity int `json:"total_quantity"`
UpdatedAt time.Time `json:"updated_at"`
UpdatedAt string `json:"updated_at"`
}
// WebhookDataUpdateOrderStatus ...
type WebhookDataUpdateOrderStatus struct {
PartnerOrderCode string `json:"partner_order_code"`
OrderNo string `json:"order_no"`
OrderCode string `json:"order_code"`
OnpointOrderCode string `json:"onpoint_order_code"`
Status string `json:"status"`
DeliveryStatus string `json:"delivery_status"`
UpdatedAt time.Time `json:"updated_at"`
UpdatedAt string `json:"updated_at"`
}
// WebhookPayload ...