This repository has been archived by the owner on Nov 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DHLEX-80: add waybill document flag to request | resolve #11
- Loading branch information
1 parent
0c05fa4
commit 2ae6ea9
Showing
13 changed files
with
366 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
/** | ||
* See LICENSE.md for license details. | ||
*/ | ||
|
||
namespace Dhl\Express\Api\Data\Request\Shipment; | ||
|
||
/** | ||
* LabelOptions Interface. | ||
* | ||
* DHL Express allows to pass label options with the shipment request: | ||
* - CustomerLogo | ||
* - CustomerBarcode | ||
* - PrinterDPI | ||
* - RequestWaybillDocument | ||
* - HideAccountInWaybillDocument | ||
* - NumberOfWaybillDocumentCopies | ||
* - RequestDHLCustomsInvoice | ||
* - DHLCustomsInvoiceLanguageCode | ||
* - DHLCustomsInvoiceType | ||
* - RequestShipmentReceipt | ||
* - DetachOptions | ||
* | ||
* Currently only the waybill document request flag is supported. | ||
* | ||
* @api | ||
* @author Daniel Fairbrother <dfairbrother@datto.com> | ||
* @link https://www.datto.com/ | ||
*/ | ||
interface LabelOptionsInterface | ||
{ | ||
/** | ||
* Returns whether a waybill document is requested or not. | ||
* | ||
* @return bool | ||
*/ | ||
public function isWaybillDocumentRequested(): bool; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
/** | ||
* See LICENSE.md for license details. | ||
*/ | ||
|
||
namespace Dhl\Express\Model\Request\Shipment; | ||
|
||
use Dhl\Express\Api\Data\Request\Shipment\LabelOptionsInterface; | ||
|
||
class LabelOptions implements LabelOptionsInterface | ||
{ | ||
/** | ||
* @var bool | ||
*/ | ||
private $waybillDocumentRequested; | ||
|
||
public function __construct(bool $waybillDocumentRequested) | ||
{ | ||
$this->waybillDocumentRequested = $waybillDocumentRequested; | ||
} | ||
|
||
public function isWaybillDocumentRequested(): bool | ||
{ | ||
return $this->waybillDocumentRequested; | ||
} | ||
} |
Oops, something went wrong.