Compare commits

..

No commits in common. "4de10ff71552c98edad921011d776209799f2a74" and "328662cc959a73be641725b317eb19875c127ca9" have entirely different histories.

3 changed files with 7 additions and 13 deletions

View File

@ -34,7 +34,7 @@ const (
baseURLStaging = "https://ext.stg.vnfai.com"
baseURLAuthProd = "https://auth.vnfai.com"
baseURLProd = "https://ext-api.vnfai.com"
baseURLProd = "https://ext.vnfai.com"
)
const (

View File

@ -46,13 +46,7 @@ type OutboundRequestPayload struct {
// UpdateORLogisticInfoPayload ...
type UpdateORLogisticInfoPayload struct {
OrID int `json:"orId"`
TPLCode string `json:"tplCode"`
TrackingCode string `json:"trackingCode"`
ShippingLabels []LogisticInfoLabel `json:"shippingLabels"`
}
type LogisticInfoLabel struct {
Caption string `json:"caption"`
URI string `json:"uri"`
ShippingLabel string `json:"shippingLabel"`
SlaShipDate string `json:"slaShipDate"`
}

View File

@ -67,6 +67,7 @@ func (c *Client) CreateOutboundRequest(p OutboundRequestPayload) (*OutboundReque
}
var (
r model.CommunicationHttpResponse
errRes Error
dataRes []OutboundRequestRes
)
if err = pjson.Unmarshal(msg.Data, &r); err != nil {
@ -77,7 +78,6 @@ func (c *Client) CreateOutboundRequest(p OutboundRequestPayload) (*OutboundReque
return nil, fmt.Errorf("tnc.Client.CreateOutboundRequest: empty_response")
}
if res.StatusCode >= http.StatusBadRequest {
var errRes Error
if err = r.ParseResponseData(&errRes); err != nil {
return nil, fmt.Errorf("tnc.Client.CreateOutboundRequest: parse_response_err: %v", err)
}
@ -92,7 +92,7 @@ func (c *Client) CreateOutboundRequest(p OutboundRequestPayload) (*OutboundReque
item := &dataRes[0]
e := item.Error
if e != nil {
return nil, e
return nil, errRes
}
return item, err