Skip to content

Commit

Permalink
feat: allow dhlforyou pickup locations (#316)
Browse files Browse the repository at this point in the history
INT-694
  • Loading branch information
GravendeelJochem authored Nov 7, 2024
1 parent e0a108a commit 58ae608
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 6 deletions.
1 change: 1 addition & 0 deletions config/platform/myparcel.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@
'packageTypes' => [
DeliveryOptions::PACKAGE_TYPE_PACKAGE_NAME,
DeliveryOptions::PACKAGE_TYPE_MAILBOX_NAME,
DeliveryOptions::PACKAGE_TYPE_PACKAGE_SMALL_NAME
],
'deliveryTypes' => [
DeliveryOptions::DELIVERY_TYPE_STANDARD_NAME,
Expand Down
2 changes: 1 addition & 1 deletion config/schema/myparcel/order/dhlforyou/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"enum": ["standard", "pickup", null]
},
"packageType": {
"enum": ["letter", "mailbox", "package", null]
"enum": ["letter", "mailbox", "package", "package_small", null]
},
"shipmentOptions": {
"properties": {
Expand Down
25 changes: 25 additions & 0 deletions config/schema/myparcel/order/dhlforyou/nl_package_small.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"description": "order/dhlforyou/nl_package_small",
"properties": {
"deliveryOptions": {
"properties": {
"deliveryType": {
"enum": ["standard", "pickup", null]
},
"shipmentOptions": {
"properties": {
"ageCheck": {
"enum": [0, 1]
},
"onlyRecipient": {
"enum": [0, 1]
},
"signature": {
"enum": [0, 1]
}
}
}
}
}
}
}
5 changes: 5 additions & 0 deletions config/validation/myparcel/order.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,11 @@
'name' => DeliveryOptions::PACKAGE_TYPE_LETTER_NAME,
'schema' => 'order/dhlforyou/letter',
],
[
'id' => DeliveryOptions::PACKAGE_TYPE_PACKAGE_SMALL_ID,
'name' => DeliveryOptions::PACKAGE_TYPE_PACKAGE_SMALL_NAME,
'schema' => 'order/dhlforyou/nl_package_small',
],
],
],
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,6 @@ private function calculateOptionsForCountry(): void
$this->order->deliveryOptions->shipmentOptions->ageCheck = TriStateService::DISABLED;
$this->order->deliveryOptions->shipmentOptions->onlyRecipient = TriStateService::DISABLED;
$this->order->deliveryOptions->shipmentOptions->sameDayDelivery = TriStateService::DISABLED;
$this->order->deliveryOptions->shipmentOptions->tracked = TriStateService::DISABLED;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"features": {
"labelDescriptionLength": 45
},
"packageTypes": ["package", "mailbox"],
"packageTypes": ["package", "mailbox", "package_small"],
"shipmentOptions": {
"ageCheck": true,
"largeFormat": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"features": {
"labelDescriptionLength": 45
},
"packageTypes": ["package", "mailbox"],
"packageTypes": ["package", "mailbox", "package_small"],
"shipmentOptions": {
"ageCheck": true,
"largeFormat": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"features": {
"labelDescriptionLength": 45
},
"packageTypes": ["package", "mailbox"],
"packageTypes": ["package", "mailbox", "package_small"],
"shipmentOptions": {
"ageCheck": true,
"largeFormat": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"features": {
"labelDescriptionLength": 45
},
"packageTypes": ["package", "mailbox"],
"packageTypes": ["package", "mailbox", "package_small"],
"shipmentOptions": {
"ageCheck": true,
"largeFormat": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
{
"name": "dhlforyou",
"capabilities": {
"packageTypes": ["package", "mailbox"],
"packageTypes": ["package", "mailbox", "package_small"],
"deliveryTypes": ["standard", "pickup"],
"shipmentOptions": {
"ageCheck": true,
Expand Down

0 comments on commit 58ae608

Please sign in to comment.