-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
371 additions
and
121 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
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,35 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace MyParcelNL\Sdk\src\Model\Carrier; | ||
|
||
use MyParcelNL\Sdk\src\Model\Consignment\DHLForYouConsignment; | ||
|
||
class CarrierDHLForYou extends AbstractCarrier | ||
{ | ||
public const CONSIGNMENT = DHLForYouConsignment::class; | ||
public const HUMAN = 'DHL For You Vandaag'; | ||
public const ID = 9; | ||
public const NAME = 'dhlforyou'; | ||
|
||
/** | ||
* @var class-string | ||
*/ | ||
protected $consignmentClass = self::CONSIGNMENT; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
protected $human = self::HUMAN; | ||
|
||
/** | ||
* @var int | ||
*/ | ||
protected $id = self::ID; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
protected $name = self::NAME; | ||
} |
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,66 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace MyParcelNL\Sdk\src\Model\Consignment; | ||
|
||
use MyParcelNL\Sdk\src\Model\Carrier\CarrierDHLForYou; | ||
use MyParcelNL\Sdk\src\Validator\Consignment\DHLForYouConsignmentValidator; | ||
|
||
class DHLForYouConsignment extends AbstractConsignment | ||
{ | ||
/** | ||
* @var string | ||
*/ | ||
protected $carrierClass = CarrierDHLForYou::class; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
protected $validatorClass = DHLForYouConsignmentValidator::class; | ||
|
||
/** | ||
* @return string[] | ||
*/ | ||
public function getAllowedDeliveryTypes(): array | ||
{ | ||
return [ | ||
self::DELIVERY_TYPE_STANDARD_NAME, | ||
self::DELIVERY_TYPE_PICKUP_NAME, | ||
]; | ||
} | ||
|
||
/** | ||
* @return string[] | ||
*/ | ||
public function getAllowedPackageTypes(): array | ||
{ | ||
return [ | ||
self::PACKAGE_TYPE_PACKAGE_NAME, | ||
self::PACKAGE_TYPE_MAILBOX_NAME, | ||
]; | ||
} | ||
|
||
/** | ||
* @return string[] | ||
*/ | ||
public function getAllowedShipmentOptions(): array | ||
{ | ||
return [ | ||
self::SHIPMENT_OPTION_AGE_CHECK, | ||
self::SHIPMENT_OPTION_HIDE_SENDER, | ||
self::SHIPMENT_OPTION_EXTRA_ASSURANCE, | ||
self::SHIPMENT_OPTION_ONLY_RECIPIENT, | ||
self::SHIPMENT_OPTION_SIGNATURE, | ||
self::SHIPMENT_OPTION_SAME_DAY_DELIVERY, | ||
]; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getLocalCountryCode(): string | ||
{ | ||
return self::CC_NL; | ||
} | ||
} |
Oops, something went wrong.