commit
16e50a081b
|
@ -37,7 +37,7 @@ func (o Order) UpdateORStatus(p model.OrderUpdateORStatus) error {
|
||||||
|
|
||||||
// CancelDelivery ...
|
// CancelDelivery ...
|
||||||
func (o Order) CancelDelivery(p model.OrderCancelDelivery) error {
|
func (o Order) CancelDelivery(p model.OrderCancelDelivery) error {
|
||||||
msg, err := natsio.GetServer().Request(subject.Order.UpdateORStatus, toBytes(p))
|
msg, err := natsio.GetServer().Request(subject.Order.CancelDelivery, toBytes(p))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,3 +26,8 @@ func (e JSONEncoder) Subscribe(subject string, cb nats.Handler) (*nats.Subscript
|
||||||
func (e JSONEncoder) Publish(reply string, data interface{}) error {
|
func (e JSONEncoder) Publish(reply string, data interface{}) error {
|
||||||
return e.encConn.Publish(reply, data)
|
return e.encConn.Publish(reply, data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Request ...
|
||||||
|
func (e JSONEncoder) Request(subject string, data interface{}, res interface{}) error {
|
||||||
|
return e.encConn.Request(subject, data, res, requestTimeout)
|
||||||
|
}
|
||||||
|
|
|
@ -47,9 +47,9 @@ type WarehousePaymentMethod struct {
|
||||||
// WarehouseDelivery ...
|
// WarehouseDelivery ...
|
||||||
type WarehouseDelivery struct {
|
type WarehouseDelivery struct {
|
||||||
DeliveryMethods []string `json:"deliveryMethods"`
|
DeliveryMethods []string `json:"deliveryMethods"`
|
||||||
PriorityServiceCodes []string `json:"priorityDeliveryServiceCodes"`
|
PriorityServiceCodes []string `json:"priorityServiceCodes"`
|
||||||
EnabledSources []int `json:"enabledDeliverySources"`
|
EnabledSources []int `json:"enabledSources"`
|
||||||
Types []string `json:"type"`
|
Types []string `json:"types"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// WarehousePartner ...
|
// WarehousePartner ...
|
||||||
|
|
Loading…
Reference in New Issue