Skip to content

Commit

Permalink
feat(carriers): add dpd for platform myparcel (#211)
Browse files Browse the repository at this point in the history
  • Loading branch information
wthijmen authored Oct 11, 2023
1 parent fae32d4 commit 8928bdd
Show file tree
Hide file tree
Showing 2 changed files with 134 additions and 0 deletions.
19 changes: 19 additions & 0 deletions config/platform/myparcel.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,25 @@
],
],
],
[
'name' => Carrier::CARRIER_DPD_NAME,
'capabilities' => [
'packageTypes' => [
DeliveryOptions::PACKAGE_TYPE_PACKAGE_NAME,
],
'deliveryTypes' => [
DeliveryOptions::DELIVERY_TYPE_STANDARD_NAME,
],
'shipmentOptions' => [
'ageCheck' => false,
'onlyRecipient' => false,
'return' => false,
],
'features' => [
'labelDescriptionLength' => 45,
],
],
],
],
];

115 changes: 115 additions & 0 deletions config/schema/myparcel/order/dpd/base.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
{
"description": "myparcel/order/dpd/base",
"type": "object",
"allOf": [
{
"anyOf": [
{
"properties": {
"deliveryOptions": {
"required": ["deliveryType", "pickupLocation"],
"properties": {
"deliveryType": {
"enum": ["standard", "pickup"]
},
"pickupLocation": {
"properties": {
"locationCode": {
"type": "string",
"minLength": 1
}
}
}
}
}
}
},
{
"properties": {
"deliveryOptions": {
"properties": {
"deliveryType": {
"enum": ["standard", null]
}
}
}
}
},
{
"properties": {
"deliveryOptions": {
"required": ["date", "email"],
"properties": {
"date": {
"type": "string",
"pattern": "^(20\\d\\d)-(0[1-9]|1[012])-(0[1-9]|[12]\\d|3[01]) ([01]\\d|2[0123]):([012345]\\d):([012345]\\d)$"
},
"email": {
"type": "string",
"format": "email"
}
}
}
}
}
]
}
],
"properties": {
"physicalProperties": {
"properties": {
"weight": {
"note": "Do not put (low) maximum here, for it will be enforced regardless of largeFormat in anyOf"
}
}
},
"recipient": {
"properties": {
"cc": {
"enum": [
"AT",
"BE",
"BG",
"CZ",
"DE",
"DK",
"EE",
"ES",
"FI",
"FR",
"GR",
"HU",
"IT",
"LT",
"LU",
"LV",
"NL",
"PL",
"PT",
"RO",
"SE",
"SI",
"SK"
]
}
}
},
"deliveryOptions": {
"properties": {
"deliveryType": {
"enum": ["standard", null]
},
"packageType": {
"enum": ["package", null]
},
"shipmentOptions": {
"properties": {
"labelDescription": {
"maxLength": 50
}
}
}
}
}
}
}

0 comments on commit 8928bdd

Please sign in to comment.