Skip to content
This repository has been archived by the owner on Sep 21, 2023. It is now read-only.

Commit

Permalink
Added alias for DHL-Request function (more DHL like)
Browse files Browse the repository at this point in the history
  • Loading branch information
Petschko committed Sep 7, 2018
1 parent b8a1760 commit b240ba0
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions includes/BusinessShipment.php
Original file line number Diff line number Diff line change
Expand Up @@ -1196,11 +1196,22 @@ private function sendCreateRequest($data) {
}

/**
* Alias for createShipmentOrder
*
* Creates the Shipment-Request
*
* @return bool|Response - false on error or DHL-Response Object
*/
public function createShipment() {
return $this->createShipmentOrder();
}

/**
* Creates the Shipment-Request
*
* @return bool|Response - false on error or DHL-Response Object
*/
public function createShipmentOrder() {
switch($this->getMayor()) {
case 1:
$data = $this->createShipmentClass_v1();
Expand Down Expand Up @@ -1361,12 +1372,24 @@ private function sendDeleteRequest($data) {
}

/**
* Alias for deleteShipmentOrder
*
* Deletes a Shipment
*
* @param string|string[] $shipmentNumbers - Shipment-Number(s) of the Shipment(s) to delete (up to 30 Numbers)
* @return bool|Response - Response
*/
public function deleteShipment($shipmentNumbers) {
return $this->deleteShipmentOrder($shipmentNumbers);
}

/**
* Deletes a Shipment
*
* @param string|string[] $shipmentNumbers - Shipment-Number(s) of the Shipment(s) to delete (up to 30 Numbers)
* @return bool|Response - Response
*/
public function deleteShipmentOrder($shipmentNumbers) {
switch($this->getMayor()) {
case 1:
$data = $this->createDeleteClass_v1($shipmentNumbers);
Expand Down

0 comments on commit b240ba0

Please sign in to comment.