Compare commits

..

No commits in common. "c19ab6b61e19d67a04340cf89d3bfa23cdf8a3ed" and "07c8a4b7d0a1c0f790ced79deade484ba43a7f31" have entirely different histories.

2 changed files with 3 additions and 4 deletions

View File

@ -14,7 +14,7 @@ type AuthRes struct {
type UpdateLogisticInfoPayload struct { type UpdateLogisticInfoPayload struct {
PrintLabelLink string `json:"print_label_link"` PrintLabelLink string `json:"print_label_link"`
TrackingCode string `json:"tracking_code"` TrackingCode string `json:"tracking_code"`
OrCode string `json:"or_code,omitempty"` OrID int `json:"or_id,omitempty"`
} }
type CancelORPayload struct { type CancelORPayload struct {

View File

@ -25,7 +25,7 @@ const (
baseURLAuthProd = "" baseURLAuthProd = ""
pathAuth = "/realms/wms/protocol/openid-connect/token" pathAuth = "/realms/wms/protocol/openid-connect/token"
pathUpdateORLogisticInfo = "/wms-core/api/v1/obms/outbound-request/outbound-request-partner/%s" pathUpdateORLogisticInfo = "/wms-core/api/v1/obms/outbound-request/outbound-request-partner/%d"
pathCreateOR = "/wms-core/api/v1/obms/outbound-request/outbound-request-partner/hab" pathCreateOR = "/wms-core/api/v1/obms/outbound-request/outbound-request-partner/hab"
pathCancelOR = "/wms-core/api/v1/obms/outbound-request/cancel" pathCancelOR = "/wms-core/api/v1/obms/outbound-request/cancel"
@ -98,8 +98,7 @@ func (c *Client) CreateOR(p ORPayload) (*ORResult, error) {
} }
func (c *Client) UpdateORLogisticInfo(p UpdateLogisticInfoPayload) error { func (c *Client) UpdateORLogisticInfo(p UpdateLogisticInfoPayload) error {
apiURL := c.getBaseURL() + fmt.Sprintf(pathUpdateORLogisticInfo, p.OrCode) apiURL := c.getBaseURL() + fmt.Sprintf(pathUpdateORLogisticInfo, p.OrID)
p.OrCode = ""
token, err := c.getToken() token, err := c.getToken()
if err != nil { if err != nil {
return err return err