Integrate global care #14

Merged
luuvansinh merged 5 commits from integrate-global-care into develop 2022-08-31 02:47:34 +00:00
6 changed files with 31 additions and 16 deletions
Showing only changes of commit 43aa67fa2e - Show all commits

View File

@ -5,6 +5,7 @@ type OrderUpdateORStatus struct {
OrderCode string `json:"orderCode"` OrderCode string `json:"orderCode"`
ORCode string `json:"orCode"` ORCode string `json:"orCode"`
Status string `json:"status"` Status string `json:"status"`
DeliveryStatus string `json:"deliveryStatus"`
Reason string `json:"reason"` Reason string `json:"reason"`
} }

View File

@ -63,3 +63,9 @@ type CancelOutboundRequest struct {
ORCode string `json:"orCode"` ORCode string `json:"orCode"`
Note string `json:"note"` Note string `json:"note"`
} }
// SyncORStatusRequest ...
type SyncORStatusRequest struct {
ORCode string `json:"orCode"`
OrderCode string `json:"orderCode"`
}

View File

@ -59,3 +59,11 @@ type WarehousePartner struct {
Enabled bool `json:"enabled"` Enabled bool `json:"enabled"`
Authentication string `json:"authentication"` Authentication string `json:"authentication"`
} }
// SyncORStatusResponse ...
type SyncORStatusResponse struct {
ORCode string `json:"orCode"`
OrderCode string `json:"orderCode"`
Status string `json:"status"`
DeliveryStatus string `json:"deliveryStatus"`
}

View File

@ -9,11 +9,7 @@ func getCommunicationValue(val string) string {
var Communication = struct { var Communication = struct {
RequestHTTP string RequestHTTP string
ResponseHTTP string ResponseHTTP string
WebhookTNC string
WebhookGlobalCare string
}{ }{
RequestHTTP: getCommunicationValue("request_http"), RequestHTTP: getCommunicationValue("request_http"),
ResponseHTTP: getCommunicationValue("response_http"), ResponseHTTP: getCommunicationValue("response_http"),
WebhookTNC: getCommunicationValue("webhook_tnc"),
WebhookGlobalCare: getCommunicationValue("webhook_global_care"),
} }

View File

@ -9,8 +9,6 @@ func getOrderValue(val string) string {
var Order = struct { var Order = struct {
UpdateORStatus string UpdateORStatus string
CancelDelivery string CancelDelivery string
WebhookTNC string
WebhookGlobalCare string
}{ }{
UpdateORStatus: getOrderValue("update_outbound_request_status"), UpdateORStatus: getOrderValue("update_outbound_request_status"),
CancelDelivery: getOrderValue("cancel_delivery"), CancelDelivery: getOrderValue("cancel_delivery"),

View File

@ -11,9 +11,15 @@ var Warehouse = struct {
UpdateOutboundRequestLogistic string UpdateOutboundRequestLogistic string
CancelOutboundRequest string CancelOutboundRequest string
GetConfiguration string GetConfiguration string
SyncORStatus string
WebhookTNC string
WebhookGlobalCare string
}{ }{
CreateOutboundRequest: getWarehouseValue("create_outbound_request"), CreateOutboundRequest: getWarehouseValue("create_outbound_request"),
UpdateOutboundRequestLogistic: getWarehouseValue("update_outbound_request_logistic_info"), UpdateOutboundRequestLogistic: getWarehouseValue("update_outbound_request_logistic_info"),
CancelOutboundRequest: getWarehouseValue("cancel_outbound_request"), CancelOutboundRequest: getWarehouseValue("cancel_outbound_request"),
GetConfiguration: getWarehouseValue("get_configuration"), GetConfiguration: getWarehouseValue("get_configuration"),
SyncORStatus: getWarehouseValue("sync_or_status"),
WebhookTNC: getWarehouseValue("webhook_tnc"),
WebhookGlobalCare: getWarehouseValue("webhook_global_care"),
} }