Compare commits

...

2 Commits

Author SHA1 Message Date
Sinh c19ab6b61e Merge branch 'viettel-ffm' into develop 2024-06-25 14:54:10 +07:00
Sinh 624cb96239 update VTP FFM model 2024-06-25 14:53:10 +07:00
2 changed files with 4 additions and 3 deletions

View File

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

View File

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