DHL-PHP-SDK
v0.4
A wrapper for the DHL-XML-API Version 2
|
Data Fields | |
const | DHL_WSDL_LIB_URL = 'https://cig.dhl.de/cig-wsdls/com/dpdhl/wsdl/geschaeftskundenversand-api/' |
const | DHL_SOAP_HEADER_URI = 'http://dhl.de/webservice/cisbase' |
const | DHL_SANDBOX_URL = 'https://cig.dhl.de/services/sandbox/soap' |
const | DHL_PRODUCTION_URL = 'https://cig.dhl.de/services/production/soap' |
const | NEWEST_VERSION = '2.2' |
const | RESPONSE_TYPE_URL = 'URL' |
const | RESPONSE_TYPE_B64 = 'B64' |
const | MAX_DHL_REQUESTS = 30 |
Protected Member Functions | |
getAPIUrl () | |
![]() | |
__construct ($version) | |
__destruct () | |
setVersion ($version) | |
getVersionClass () | |
Definition at line 26 of file BusinessShipment.php.
__construct | ( | $credentials, | |
$testMode = false , |
|||
$version = null |
|||
) |
BusinessShipment constructor.
Credentials | $credentials | - DHL-Credentials-Object |
bool | string | $testMode | - Use a specific Sandbox-Mode or Production-Mode Test-Mode (Normal): Credentials::TEST_NORMAL, 'test', true Test-Mode (Thermo-Printer): Credentials::TEST_THERMO_PRINTER, 'thermo' Live (No-Test-Mode): false - default |
null | string | $version | - Version to use or null for the newest |
Definition at line 253 of file BusinessShipment.php.
__destruct | ( | ) |
Clears Memory
Definition at line 281 of file BusinessShipment.php.
addShipmentOrder | ( | $shipmentOrder | ) |
Adds a Shipment-Order to the List
ShipmentOrder | $shipmentOrder | - Shipment-Order to add |
Definition at line 846 of file BusinessShipment.php.
clearShipmentOrders | ( | ) |
Clears the Shipment-Order list
Definition at line 853 of file BusinessShipment.php.
countShipmentOrders | ( | ) |
Returns how many Shipment-Orders are in this List
Definition at line 862 of file BusinessShipment.php.
createShipment | ( | ) |
Alias for createShipmentOrder
Creates the Shipment-Request
Definition at line 1205 of file BusinessShipment.php.
createShipmentOrder | ( | ) |
Creates the Shipment-Request
Definition at line 1214 of file BusinessShipment.php.
deleteShipment | ( | $shipmentNumbers | ) |
Alias for deleteShipmentOrder
Deletes a Shipment
string|string[] | $shipmentNumbers - Shipment-Number(s) of the Shipment(s) to delete (up to 30 Numbers) |
Definition at line 1382 of file BusinessShipment.php.
deleteShipmentOrder | ( | $shipmentNumbers | ) |
Deletes a Shipment
string|string[] | $shipmentNumbers - Shipment-Number(s) of the Shipment(s) to delete (up to 30 Numbers) |
Definition at line 1392 of file BusinessShipment.php.
doManifest | ( | $shipmentNumbers | ) |
Creates the doManifest-Request
string|string[] | $shipmentNumbers - Shipment-Number(s) for Manifest (up to 30 Numbers) |
Definition at line 1040 of file BusinessShipment.php.
|
protected |
Get the Business-API-URL for this Version
Definition at line 308 of file BusinessShipment.php.
getBank | ( | ) |
Get the Bank-Object
ShipmentDetails
Object, please do them there Definition at line 511 of file BusinessShipment.php.
getCustomAPIURL | ( | ) |
Get the Custom-API-URL
Definition at line 871 of file BusinessShipment.php.
getErrors | ( | ) |
getExportDoc | ( | $shipmentNumbers | ) |
Requests a Export-Document again
string|string[] | $shipmentNumbers - Shipment-Number(s) of the Export-Document(s) (up to 30 Numbers) |
Definition at line 1581 of file BusinessShipment.php.
getExportDocument | ( | ) |
Get the ExportDocument-Object
ShipmentOrder
Object, please do them there Definition at line 661 of file BusinessShipment.php.
getLabel | ( | $shipmentNumbers | ) |
Requests a Shipment-Label again
string|string[] | $shipmentNumbers - Shipment-Number(s) of the Label(s) (up to 30 Numbers) |
Definition at line 1491 of file BusinessShipment.php.
getLabelResponseType | ( | ) |
Get the Label-Response type
Definition at line 799 of file BusinessShipment.php.
getLastXML | ( | ) |
Returns the Last XML-Request or null
Definition at line 333 of file BusinessShipment.php.
getManifest | ( | $manifestDate, | |
$useIntTime = false |
|||
) |
Creates the getManifest-Request
string | int | $manifestDate | - Manifest-Date as String (YYYY-MM-DD) or the int time() value of the date |
bool | $useIntTime | - Use the int Time Value instead of a String |
Definition at line 1112 of file BusinessShipment.php.
getPrintOnlyIfReceiverIsValid | ( | ) |
Get if the label should only printed if the Receiver-Address is valid
ShipmentOrder
Object, please do them there Definition at line 763 of file BusinessShipment.php.
getReceiver | ( | ) |
Get the Receiver-Object
ShipmentOrder
Object, please do them there Definition at line 585 of file BusinessShipment.php.
getReceiverEmail | ( | ) |
Get the Receiver-Email
Definition at line 733 of file BusinessShipment.php.
getReturnReceiver | ( | ) |
Get the ReturnReceiver-Object
Usually only used for Re-Tour (In most cases the same Address like the Sender)
ShipmentOrder
Object, please do them there Definition at line 623 of file BusinessShipment.php.
getSender | ( | ) |
Get the Sender-Object
ShipmentOrder
Object, please do them there Definition at line 549 of file BusinessShipment.php.
getSequenceNumber | ( | ) |
Get the Sequence-Number
ShipmentOrder
Object, please do them there Definition at line 697 of file BusinessShipment.php.
getService | ( | ) |
Get the Service-Object
ShipmentDetails
Object, please do them there Definition at line 473 of file BusinessShipment.php.
getShipmentDetails | ( | ) |
Get Shipment-Details-Object
ShipmentOrder
Object, please do them there Definition at line 437 of file BusinessShipment.php.
getShipmentLabel | ( | $shipmentNumbers | ) |
Alias for getLabel
Requests a Shipment-Label again
string|string[] | $shipmentNumbers - Shipment-Number(s) of the Label(s) (up to 30 Numbers) |
Definition at line 1481 of file BusinessShipment.php.
getShipmentOrders | ( | ) |
Get the list with all Shipment-Orders Objects
Definition at line 817 of file BusinessShipment.php.
getVersion | ( | $viaSOAP = false , |
|
$getBuildNumber = false , |
|||
$returnAsArray = false |
|||
) |
Gets the current (local)-Version or Request it via SOAP from DHL
bool | $viaSOAP | - Request the Version from DHL (Default: false - get local-version as string) |
bool | $getBuildNumber | - Return the Build number as well (String look then like this: 2.2.12) Only possible via SOAP - Default false |
bool | $returnAsArray | - Return the Version as Array - Default: false |
Definition at line 961 of file BusinessShipment.php.
isLog | ( | ) |
Returns if log is enabled
Definition at line 399 of file BusinessShipment.php.
setBank | ( | $bank | ) |
Set the Bank-Object
BankData | null | $bank | - Bank-Object or null for none |
ShipmentDetails
Object, please do them there Definition at line 530 of file BusinessShipment.php.
setCredentials | ( | $credentials | ) |
Set Credentials-Object
Credentials | $credentials | - Credentials-Object |
Definition at line 426 of file BusinessShipment.php.
setCustomAPIURL | ( | $customAPIURL | ) |
Set the Custom-API-URL
null | string | $customAPIURL | - Custom-API-URL or null for none |
Definition at line 880 of file BusinessShipment.php.
setErrors | ( | $errors | ) |
Set Error-Array
string[] | $errors - Error-Array |
Definition at line 363 of file BusinessShipment.php.
setExportDocument | ( | $exportDocument | ) |
Set the ExportDocument-Object
ExportDocument | null | $exportDocument | - ExportDocument-Object or null for none |
ShipmentOrder
Object, please do them there Definition at line 679 of file BusinessShipment.php.
setLabelResponseType | ( | $labelResponseType | ) |
Set the Label-Response type
null | string | $labelResponseType | - Label-Response type | null uses DHL-Default |
Definition at line 808 of file BusinessShipment.php.
setLog | ( | $log | ) |
Set if log enabled
bool | $log | - Enable log |
Definition at line 408 of file BusinessShipment.php.
setPrintOnlyIfReceiverIsValid | ( | $printOnlyIfReceiverIsValid | ) |
Set if the label should only printed if the Receiver-Address is valid
WARNING: The Address-Validation can fail sometimes also on existing Addresses (for example new streets) use with care!
bool | null | $printOnlyIfReceiverIsValid | - Should the label only printed on a valid Address | null uses default from DHL |
ShipmentOrder
Object, please do them there Definition at line 783 of file BusinessShipment.php.
setReceiver | ( | $receiver | ) |
Set the Receiver-Object
Receiver | PackStation | Filial | null | $receiver | - Receiver-Object or null if none |
ShipmentOrder
Object, please do them there Definition at line 603 of file BusinessShipment.php.
setReceiverEmail | ( | $receiverEmail | ) |
Set the Receiver-Email
null | string | $receiverEmail | - Receiver-Email or null for none |
Definition at line 748 of file BusinessShipment.php.
setReturnReceiver | ( | $returnReceiver | ) |
Set the ReturnReceiver-Object
Usually only used for Re-Tour (In most cases the same Address like the Sender)
ReturnReceiver | null | $returnReceiver | - ReturnReceiver-Object or null for none |
ShipmentOrder
Object, please do them there Definition at line 643 of file BusinessShipment.php.
setSender | ( | $sender | ) |
Set the Sender-Object
Sender | null | $sender | - Sender-Object or null if none |
ShipmentOrder
Object, please do them there Definition at line 567 of file BusinessShipment.php.
setSequenceNumber | ( | $sequenceNumber | ) |
Set the Sequence-Number
string | $sequenceNumber | - sequence-Number |
ShipmentOrder
Object, please do them there Definition at line 715 of file BusinessShipment.php.
setService | ( | $service | ) |
Set the Service-Object
Service | null | $service | - Service-Object or null for none |
ShipmentDetails
Object, please do them there Definition at line 492 of file BusinessShipment.php.
setShipmentDetails | ( | $shipmentDetails | ) |
Set Shipment-Details-Object
ShipmentDetails | $shipmentDetails | - Shipment-Details-Object |
ShipmentOrder
Object, please do them there Definition at line 455 of file BusinessShipment.php.
setShipmentOrders | ( | $shipmentOrders | ) |
Set the list with all Shipment-Orders Objects
ShipmentOrder[]|ShipmentOrder | $shipmentOrders - Shipment-Order Object-Array or a Single Shipment-Order Object |
Definition at line 826 of file BusinessShipment.php.
validateShipment | ( | ) |
Validates a Shipment
Definition at line 1654 of file BusinessShipment.php.
const DHL_PRODUCTION_URL = 'https://cig.dhl.de/services/production/soap' |
DHL-Live SOAP-URL
Definition at line 45 of file BusinessShipment.php.
const DHL_SANDBOX_URL = 'https://cig.dhl.de/services/sandbox/soap' |
DHL-Sandbox SOAP-URL
Definition at line 40 of file BusinessShipment.php.
const DHL_SOAP_HEADER_URI = 'http://dhl.de/webservice/cisbase' |
DHL-Soap-Header URL
Definition at line 35 of file BusinessShipment.php.
const DHL_WSDL_LIB_URL = 'https://cig.dhl.de/cig-wsdls/com/dpdhl/wsdl/geschaeftskundenversand-api/' |
DHL Origin WSDL-Lib-URL
Definition at line 30 of file BusinessShipment.php.
const MAX_DHL_REQUESTS = 30 |
Maximum requests to DHL in one call
Definition at line 65 of file BusinessShipment.php.
const NEWEST_VERSION = '2.2' |
Newest-Version
Definition at line 50 of file BusinessShipment.php.
const RESPONSE_TYPE_B64 = 'B64' |
Response-Type Base64
Definition at line 60 of file BusinessShipment.php.
const RESPONSE_TYPE_URL = 'URL' |
Response-Type URL
Definition at line 55 of file BusinessShipment.php.