DHL-PHP-SDK  v0.4
A wrapper for the DHL-XML-API Version 2
Response Class Reference
Inheritance diagram for Response:
Version LabelResponse

Public Member Functions

 __construct ($version, $response=null)
 
 __destruct ()
 
 getShipmentNumber ()
 
 getPieceNumber ()
 
 getLabel ()
 
 getReturnLabel ()
 
 getExportDoc ()
 
 getManifestData ()
 
 getSequenceNumber ()
 
 getStatusCode ()
 
 getStatusText ()
 
 getStatusMessage ()
 
 getLabelData ($index=null)
 
 countLabelData ()
 
 getCodLabel ()
 
- Public Member Functions inherited from Version
 getVersion ()
 
 getMayor ()
 
 getMinor ()
 

Data Fields

const DHL_ERROR_NOT_SET = -1
 
const DHL_ERROR_NO_ERROR = 0
 
const DHL_ERROR_WEAK_WARNING = 1
 
const DHL_ERROR_SERVICE_TMP_NOT_AVAILABLE = 500
 
const DHL_ERROR_GENERAL = 1000
 
const DHL_ERROR_AUTH_FAILED = 1001
 
const DHL_ERROR_HARD_VAL_ERROR = 1101
 
const DHL_ERROR_UNKNOWN_SHIPMENT_NUMBER = 2000
 

Additional Inherited Members

- Protected Member Functions inherited from Version
 __construct ($version)
 
 __destruct ()
 
 setVersion ($version)
 
 getVersionClass ()
 

Detailed Description

Definition at line 21 of file Response.php.

Constructor & Destructor Documentation

§ __construct()

__construct (   $version,
  $response = null 
)

Response constructor.

Loads the correct Version and loads the Response if not null into this Object

Parameters
string$version- Current DHL-Version
null | Object$response- DHL-Response or null for none

Definition at line 95 of file Response.php.

§ __destruct()

__destruct ( )

Clears Memory

Definition at line 113 of file Response.php.

Member Function Documentation

§ countLabelData()

countLabelData ( )

Returns how many LabelData-Objects are in this List

Returns
int - LabelData Count

Definition at line 312 of file Response.php.

§ getCodLabel()

getCodLabel ( )

Getter for Cod-Label

Returns
null|string - Cod-Label-URL/Base64-Data or null if not requested/set

Implements LabelResponse.

Definition at line 329 of file Response.php.

§ getExportDoc()

getExportDoc ( )

Getter for Export-Document

Returns
null|string - Export-Document Label-URL/Base64-Label-Data or null if not requested/set

Implements LabelResponse.

Definition at line 176 of file Response.php.

§ getLabel()

getLabel ( )

Getter for Label

Returns
null|string - Label URL/Base64-Data (Can also contain the return label) or null if not set

Implements LabelResponse.

Definition at line 152 of file Response.php.

§ getLabelData()

getLabelData (   $index = null)

Getter for LabelData-Objects

Parameters
null | int$index- Index of the LabelData-Object or null for the array
Returns
LabelData[]|LabelData - LabelData-Object(-Array)

Definition at line 291 of file Response.php.

§ getManifestData()

getManifestData ( )

Get the Manifest PDF-Data as Base64-String

Returns
null|string - PDF-Data as Base64-String or null if empty/not requested

Definition at line 188 of file Response.php.

§ getPieceNumber()

getPieceNumber ( )

Getter for pieceNumber

Returns
null|string - null if not set else pieceNumber (just used in API-Version 1)
Deprecated:
  • DHL-API-Version 1 Method

Definition at line 141 of file Response.php.

§ getReturnLabel()

getReturnLabel ( )

Getter for ReturnLabel

Returns
null|string - Return Label-URL/Base64-Label-Data or null if not requested/set

Implements LabelResponse.

Definition at line 164 of file Response.php.

§ getSequenceNumber()

getSequenceNumber ( )

Getter for Sequence-Number

Returns
string|null - Sequence-Number of the Request or null if not set

Implements LabelResponse.

Definition at line 206 of file Response.php.

§ getShipmentNumber()

getShipmentNumber ( )

Getter for Shipment-Number

Returns
null|string - Shipment-Number or null if not set

Implements LabelResponse.

Definition at line 127 of file Response.php.

§ getStatusCode()

getStatusCode ( )

Getter for Status-Code

Returns
int - Status-Code

Implements LabelResponse.

Definition at line 227 of file Response.php.

§ getStatusMessage()

getStatusMessage ( )

Getter for Status-Message

Returns
string|null - Status-Message or null if not set

Implements LabelResponse.

Definition at line 272 of file Response.php.

§ getStatusText()

getStatusText ( )

Getter for Status-Text

Returns
string|null - Status-Text or null if not set

Implements LabelResponse.

Definition at line 254 of file Response.php.

Field Documentation

§ DHL_ERROR_AUTH_FAILED

const DHL_ERROR_AUTH_FAILED = 1001

Definition at line 39 of file Response.php.

§ DHL_ERROR_GENERAL

const DHL_ERROR_GENERAL = 1000

Definition at line 38 of file Response.php.

§ DHL_ERROR_HARD_VAL_ERROR

const DHL_ERROR_HARD_VAL_ERROR = 1101

Definition at line 40 of file Response.php.

§ DHL_ERROR_NO_ERROR

const DHL_ERROR_NO_ERROR = 0

Definition at line 35 of file Response.php.

§ DHL_ERROR_NOT_SET

const DHL_ERROR_NOT_SET = -1

Contains Status-Code-Values:

Definition at line 34 of file Response.php.

§ DHL_ERROR_SERVICE_TMP_NOT_AVAILABLE

const DHL_ERROR_SERVICE_TMP_NOT_AVAILABLE = 500

Definition at line 37 of file Response.php.

§ DHL_ERROR_UNKNOWN_SHIPMENT_NUMBER

const DHL_ERROR_UNKNOWN_SHIPMENT_NUMBER = 2000

Definition at line 41 of file Response.php.

§ DHL_ERROR_WEAK_WARNING

const DHL_ERROR_WEAK_WARNING = 1

Definition at line 36 of file Response.php.


The documentation for this class was generated from the following file: