Develop #22
|
@ -2,10 +2,11 @@ package model
|
||||||
|
|
||||||
// OrderUpdateORStatus ...
|
// OrderUpdateORStatus ...
|
||||||
type OrderUpdateORStatus struct {
|
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"`
|
||||||
Reason string `json:"reason"`
|
DeliveryStatus string `json:"deliveryStatus"`
|
||||||
|
Reason string `json:"reason"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// OrderCancelDelivery ...
|
// OrderCancelDelivery ...
|
||||||
|
|
|
@ -12,6 +12,19 @@ type OutboundRequestPayload struct {
|
||||||
TPLCode string `json:"tplCode"`
|
TPLCode string `json:"tplCode"`
|
||||||
Customer CustomerInfo `json:"customer"`
|
Customer CustomerInfo `json:"customer"`
|
||||||
Items []OutboundRequestItem `json:"items"`
|
Items []OutboundRequestItem `json:"items"`
|
||||||
|
Insurance *InsuranceOpts
|
||||||
|
}
|
||||||
|
|
||||||
|
// InsuranceOpts ...
|
||||||
|
type InsuranceOpts struct {
|
||||||
|
VehicleTypeID string `json:"vehicleTypeId"`
|
||||||
|
VehicleTypeName string `json:"vehicleTypeName"`
|
||||||
|
InsuranceTypeID string `json:"insuranceTypeId"`
|
||||||
|
YearsOfInsurance int `json:"yearsOfInsurance"`
|
||||||
|
License string `json:"license"`
|
||||||
|
Chassis string `json:"chassis"`
|
||||||
|
Engine string `json:"engine"`
|
||||||
|
BeginDate string `json:"beginDate"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// OutboundRequestItem ...
|
// OutboundRequestItem ...
|
||||||
|
@ -25,6 +38,7 @@ type OutboundRequestItem struct {
|
||||||
type CustomerInfo struct {
|
type CustomerInfo struct {
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
PhoneNumber string `json:"phoneNumber"`
|
PhoneNumber string `json:"phoneNumber"`
|
||||||
|
Email string `json:"email"`
|
||||||
Address AddressDetail `json:"address"`
|
Address AddressDetail `json:"address"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,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"`
|
||||||
|
}
|
||||||
|
|
|
@ -62,6 +62,14 @@ type WarehousePartner struct {
|
||||||
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"`
|
||||||
|
}
|
||||||
|
|
||||||
// ResponseWarehouseContact ...
|
// ResponseWarehouseContact ...
|
||||||
type ResponseWarehouseContact struct {
|
type ResponseWarehouseContact struct {
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
|
|
|
@ -7,13 +7,9 @@ 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"),
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,10 +7,8 @@ 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"),
|
||||||
|
|
|
@ -11,6 +11,9 @@ var Warehouse = struct {
|
||||||
UpdateOutboundRequestLogistic string
|
UpdateOutboundRequestLogistic string
|
||||||
CancelOutboundRequest string
|
CancelOutboundRequest string
|
||||||
GetConfiguration string
|
GetConfiguration string
|
||||||
|
SyncORStatus string
|
||||||
|
WebhookTNC string
|
||||||
|
WebhookGlobalCare string
|
||||||
FindOne string
|
FindOne string
|
||||||
FindByCondition string
|
FindByCondition string
|
||||||
Distinct string
|
Distinct string
|
||||||
|
@ -20,6 +23,9 @@ var Warehouse = struct {
|
||||||
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"),
|
||||||
FindOne: getWarehouseValue("find_one"),
|
FindOne: getWarehouseValue("find_one"),
|
||||||
FindByCondition: getWarehouseValue("find_all_by_condition"),
|
FindByCondition: getWarehouseValue("find_all_by_condition"),
|
||||||
Distinct: getWarehouseValue("distinct"),
|
Distinct: getWarehouseValue("distinct"),
|
||||||
|
|
Loading…
Reference in New Issue