diff --git a/model/order_request.go b/model/order_request.go index da9d4fe..f8dfde0 100644 --- a/model/order_request.go +++ b/model/order_request.go @@ -2,10 +2,11 @@ package model // OrderUpdateORStatus ... type OrderUpdateORStatus struct { - OrderCode string `json:"orderCode"` - ORCode string `json:"orCode"` - Status string `json:"status"` - Reason string `json:"reason"` + OrderCode string `json:"orderCode"` + ORCode string `json:"orCode"` + Status string `json:"status"` + DeliveryStatus string `json:"deliveryStatus"` + Reason string `json:"reason"` } // OrderCancelDelivery ... diff --git a/model/warehouse_request.go b/model/warehouse_request.go index 51bc667..f63b135 100644 --- a/model/warehouse_request.go +++ b/model/warehouse_request.go @@ -63,3 +63,9 @@ type CancelOutboundRequest struct { ORCode string `json:"orCode"` Note string `json:"note"` } + +// SyncORStatusRequest ... +type SyncORStatusRequest struct { + ORCode string `json:"orCode"` + OrderCode string `json:"orderCode"` +} diff --git a/model/warehouse_response.go b/model/warehouse_response.go index 493a921..cb78ae0 100644 --- a/model/warehouse_response.go +++ b/model/warehouse_response.go @@ -59,3 +59,11 @@ type WarehousePartner struct { Enabled bool `json:"enabled"` Authentication string `json:"authentication"` } + +// SyncORStatusResponse ... +type SyncORStatusResponse struct { + ORCode string `json:"orCode"` + OrderCode string `json:"orderCode"` + Status string `json:"status"` + DeliveryStatus string `json:"deliveryStatus"` +} diff --git a/subject/communication.go b/subject/communication.go index bcbbe31..80926f2 100644 --- a/subject/communication.go +++ b/subject/communication.go @@ -7,13 +7,9 @@ func getCommunicationValue(val string) string { } var Communication = struct { - RequestHTTP string - ResponseHTTP string - WebhookTNC string - WebhookGlobalCare string + RequestHTTP string + ResponseHTTP string }{ - RequestHTTP: getCommunicationValue("request_http"), - ResponseHTTP: getCommunicationValue("response_http"), - WebhookTNC: getCommunicationValue("webhook_tnc"), - WebhookGlobalCare: getCommunicationValue("webhook_global_care"), + RequestHTTP: getCommunicationValue("request_http"), + ResponseHTTP: getCommunicationValue("response_http"), } diff --git a/subject/order.go b/subject/order.go index 846cee5..309f76f 100644 --- a/subject/order.go +++ b/subject/order.go @@ -7,10 +7,8 @@ func getOrderValue(val string) string { } var Order = struct { - UpdateORStatus string - CancelDelivery string - WebhookTNC string - WebhookGlobalCare string + UpdateORStatus string + CancelDelivery string }{ UpdateORStatus: getOrderValue("update_outbound_request_status"), CancelDelivery: getOrderValue("cancel_delivery"), diff --git a/subject/warehouse.go b/subject/warehouse.go index b0801b9..b6e5878 100644 --- a/subject/warehouse.go +++ b/subject/warehouse.go @@ -11,9 +11,15 @@ var Warehouse = struct { UpdateOutboundRequestLogistic string CancelOutboundRequest string GetConfiguration string + SyncORStatus string + WebhookTNC string + WebhookGlobalCare string }{ CreateOutboundRequest: getWarehouseValue("create_outbound_request"), UpdateOutboundRequestLogistic: getWarehouseValue("update_outbound_request_logistic_info"), CancelOutboundRequest: getWarehouseValue("cancel_outbound_request"), GetConfiguration: getWarehouseValue("get_configuration"), + SyncORStatus: getWarehouseValue("sync_or_status"), + WebhookTNC: getWarehouseValue("webhook_tnc"), + WebhookGlobalCare: getWarehouseValue("webhook_global_care"), }