Documentation
¶
Index ¶
- type Client
- type Config
- type DHLError
- type GetTimeTableRequest
- type GetTimeTableResponse
- type GetTimeTableResult
- type Information
- type SCHTimeTable
- type SoapFault
- type SoapRequestBody
- type SoapRequestEnvelope
- type SoapResponseBody
- type SoapResponseEvelope
- type TimeTable
- type TimeTableOrg
- type TimeTableQuery
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
GetTimeTable(TimeTableQuery) (*GetTimeTableResponse, error)
}
Client interface for getting timetable
type GetTimeTableRequest ¶
type GetTimeTableRequest struct {
XMLName string `xml:"http://dhltimetable.dhl.com/ GetTimeTable"`
User string `xml:"strUser"`
Password string `xml:"strPwd"`
Type int `xml:"intType"` // 1 = styckesgods
CountryCode string `xml:"strCountryCode"`
PickupPostCode string `xml:"strPickupPostCode"`
PickupPlace string `xml:"strPickupPlace"`
DeliveryCountryCode string `xml:"strDeliveryCountryCode"` //SE or NO
DeliveryPostCode string `xml:"strDeliveryPostCode"`
DeliveryPlace string `xml:"strDeliveryPlace"`
EarliestSent bool `xml:"blnEarliestSent"`
Date string `xml:"dtDate"` // Datetime string YYYY-MM-DD
HolidayCheck bool `xml:"blnHolidayCheck"`
}
GetTimeTableRequest represents a request for TimeTable
type GetTimeTableResponse ¶
type GetTimeTableResponse struct {
XMLName string `xml:"http://dhltimetable.dhl.com/ GetTimeTableResponse"`
GetTimeTableResult *GetTimeTableResult `xml:"GetTimeTableResult,omitempty"`
}
GetTimeTableResponse represents a response with TimeTable
type GetTimeTableResult ¶
type GetTimeTableResult struct {
SCHTimeTable *SCHTimeTable `xml:"http://dhltimetable.dhl.com/schTimeTable.xsd schTimeTable,omitempty"`
}
GetTimeTableResult represents a result with TimeTable
type Information ¶
type Information struct {
PickupCountryCode string `xml:"PickupCountryCode,omitempty"`
PickupPostCode string `xml:"PickupPostCode,omitempty"`
PickupPlace string `xml:"PickupPlace,omitempty"`
DeliveryCountryCode string `xml:"DeliveryCountryCode,omitempty"`
DeliveryPostCode string `xml:"DeliveryPostCode,omitempty"`
DeliveryPlace string `xml:"DeliveryPlace,omitempty"`
}
Information represents pickup and delivery data
type SCHTimeTable ¶
type SCHTimeTable struct {
XMLName string `xml:"http://dhltimetable.dhl.com/schTimeTable.xsd schTimeTable"`
Information *Information `xml:"Information,omitempty"`
TimeTable []TimeTable `xml:"TimeTable,omitempty"`
TimeTableOrg []TimeTableOrg `xml:"TimeTableOrg,omitempty"`
}
SCHTimeTable ...
type SoapFault ¶
type SoapFault struct {
XMLName string `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault"`
FaultCode string `xml:"faultcode"`
FaultString string `xml:"faultstring"`
Detail string `xml:"detail"`
}
SoapFault is SOAP envelope for Fault
type SoapRequestBody ¶
type SoapRequestBody struct {
XMLName string `xml:"http://schemas.xmlsoap.org/soap/envelope/ Body"`
Request *GetTimeTableRequest
}
SoapRequestBody is SOAP envelope for RequestBody
type SoapRequestEnvelope ¶
type SoapRequestEnvelope struct {
XMLName string `xml:"http://schemas.xmlsoap.org/soap/envelope/ Envelope"`
XSINameSpace string `xml:"xmlns:xsi,attr"`
XSDNameSpace string `xml:"xmlns:xsd,attr"`
SOAPNameSpace string `xml:"xmlns:soap,attr"`
Body *SoapRequestBody
}
SoapRequestEnvelope is SOAP envelope for SoapRequestBody
type SoapResponseBody ¶
type SoapResponseBody struct {
XMLName string `xml:"http://schemas.xmlsoap.org/soap/envelope/ Body"`
Response *GetTimeTableResponse
Fault *SoapFault
}
SoapResponseBody is SOAP envelope for ResponseBody
type SoapResponseEvelope ¶
type SoapResponseEvelope struct {
XMLName string `xml:"http://schemas.xmlsoap.org/soap/envelope/ Envelope"`
XSINameSpace string `xml:"xmlns:xsi,attr"`
XSDNameSpace string `xml:"xmlns:xsd,attr"`
SOAPNameSpace string `xml:"xmlns:soap,attr"`
Body *SoapResponseBody
}
SoapResponseEvelope is SOAP envelope for SoapResponseBody
type TimeTable ¶
type TimeTable struct {
Product string `xml:"Product,omitempty"`
PickupDateString string `xml:"PickupDateString,omitempty"`
DeliveryDateString string `xml:"DeliveryDateString,omitempty"`
Options string `xml:"Options,omitempty"`
PickupDate string `xml:"PickupDate,omitempty"` // Datetime string
DeliveryDate string `xml:"DeliveryDate,omitempty"` // Datetime string
}
TimeTable represents pickup and delivery time
type TimeTableOrg ¶
type TimeTableOrg struct {
SAvgTerminal string `xml:"sAvgTerminal,omitempty"`
OPickup string `xml:"oPickup,omitempty"`
OAvgTerm string `xml:"oAvgTerm,omitempty"`
OAnkTerm string `xml:"oAnkTerm,omitempty"`
OAvgDistTerm string `xml:"oAvgDistTerm,omitempty"`
OLossar string `xml:"oLossar,omitempty"`
SGTjanst string `xml:"sGTjanst,omitempty"`
}
TimeTableOrg ...
type TimeTableQuery ¶
type TimeTableQuery struct {
OriginCountryCode string
OriginPostCode string
OriginPlace string
DestinationCountryCode string
DestinationPostCode string
DestinationPlace string
Date string
EarliestSent bool
HolidayCheck bool
}
TimeTableQuery used for doing GetTimeTable requests
func (*TimeTableQuery) Validate ¶
func (q *TimeTableQuery) Validate() error
Validate is used to validate query input