integrate-onpoint #5
|
@ -1,5 +1,11 @@
|
||||||
package onpoint
|
package onpoint
|
||||||
|
|
||||||
|
const (
|
||||||
|
CodeSuccess = "SUCCESS"
|
||||||
|
|
||||||
|
TimeLayout = "2006-01-02T15:04:05Z"
|
||||||
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
baseURLStaging = "https://dev-selly-api.onpoint.vn"
|
baseURLStaging = "https://dev-selly-api.onpoint.vn"
|
||||||
baseURLProd = "https://selly-api.onpoint.vn"
|
baseURLProd = "https://selly-api.onpoint.vn"
|
||||||
|
@ -15,8 +21,6 @@ const (
|
||||||
|
|
||||||
webhookEventUpdateOrderStatus = "update_order_status"
|
webhookEventUpdateOrderStatus = "update_order_status"
|
||||||
webhookEventUpdateInventory = "update_inventory"
|
webhookEventUpdateInventory = "update_inventory"
|
||||||
|
|
||||||
CodeSuccess = "SUCCESS"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -59,16 +59,15 @@ type WebhookDataUpdateInventory struct {
|
||||||
AvailableQuantity int `json:"available_quantity"`
|
AvailableQuantity int `json:"available_quantity"`
|
||||||
CommittedQuantity int `json:"committed_quantity"`
|
CommittedQuantity int `json:"committed_quantity"`
|
||||||
TotalQuantity int `json:"total_quantity"`
|
TotalQuantity int `json:"total_quantity"`
|
||||||
UpdatedAt time.Time `json:"updated_at"`
|
UpdatedAt string `json:"updated_at"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// WebhookDataUpdateOrderStatus ...
|
// WebhookDataUpdateOrderStatus ...
|
||||||
type WebhookDataUpdateOrderStatus struct {
|
type WebhookDataUpdateOrderStatus struct {
|
||||||
PartnerOrderCode string `json:"partner_order_code"`
|
OrderCode string `json:"order_code"`
|
||||||
OrderNo string `json:"order_no"`
|
OnpointOrderCode string `json:"onpoint_order_code"`
|
||||||
Status string `json:"status"`
|
Status string `json:"status"`
|
||||||
DeliveryStatus string `json:"delivery_status"`
|
UpdatedAt string `json:"updated_at"`
|
||||||
UpdatedAt time.Time `json:"updated_at"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// WebhookPayload ...
|
// WebhookPayload ...
|
||||||
|
|
Loading…
Reference in New Issue