Skip to content

Commit

Permalink
Merge pull request #8 from atcdot/fix/tracking
Browse files Browse the repository at this point in the history
fix tracking namespace
  • Loading branch information
seacomandor authored Apr 15, 2020
2 parents 8d3cc5a + d0e19bc commit 85fa3a3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
11 changes: 8 additions & 3 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ import (
"github.com/fiorix/wsdl2go/soap"
)

//CityCODPaymentLimit represents default C.O.D. payment limit for all dpd cities in which C.O.D. is available
const CityCODPaymentLimit = 250000
const (
trackingByDPDOrderNamespace = "http://dpd.ru/ws/tracing/2012-06-25"

//CityCODPaymentLimit represents default C.O.D. payment limit for all dpd cities in which C.O.D. is available
CityCODPaymentLimit = 250000
)

//Client for DPD soap api
type Client struct {
Expand Down Expand Up @@ -343,7 +347,8 @@ func (cl *Client) GetStatesByDPDOrder(req *TrackByDPDOrderRequest) (*ParcelsStat
}{
operationGetStatesByDPDOrder{
&getStatesByDPDOrder{
req,
Namespace: trackingByDPDOrderNamespace,
Request: req,
},
},
}
Expand Down
4 changes: 3 additions & 1 deletion tracking.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,13 @@ type operationGetStatesByDPDOrder struct {
}

type getStatesByDPDOrder struct {
Request *TrackByDPDOrderRequest `xml:"request,omitempty"`
Namespace string `xml:"xmlns,attr"`
Request *TrackByDPDOrderRequest `xml:"request,omitempty"`
}

//TrackByDPDOrderRequest GetStatesByDPDOrder request body
type TrackByDPDOrderRequest struct {
Namespace string `xml:"xmlns,attr"`
Auth *Auth `xml:"auth,omitempty"`
DpdOrderNr *string `xml:"dpdOrderNr,omitempty"`
PickupYear *int `xml:"pickupYear,omitempty"`
Expand Down

0 comments on commit 85fa3a3

Please sign in to comment.