@@ -43,6 +43,7 @@ abstract class AbstractConsignment
43
43
public const SHIPMENT_OPTION_RETURN = 'return ' ;
44
44
public const SHIPMENT_OPTION_SAME_DAY_DELIVERY = 'same_day_delivery ' ;
45
45
public const SHIPMENT_OPTION_SIGNATURE = 'signature ' ;
46
+ public const SHIPMENT_OPTION_COLLECT = 'collect ' ;
46
47
public const SHIPMENT_OPTION_RECEIPT_CODE = 'receipt_code ' ;
47
48
/**
48
49
* @deprecated since jan 2023 extra_assurance is no longer supported
@@ -57,6 +58,7 @@ abstract class AbstractConsignment
57
58
self ::SHIPMENT_OPTION_ONLY_RECIPIENT ,
58
59
self ::SHIPMENT_OPTION_RETURN ,
59
60
self ::SHIPMENT_OPTION_SIGNATURE ,
61
+ self ::SHIPMENT_OPTION_COLLECT ,
60
62
self ::SHIPMENT_OPTION_RECEIPT_CODE ,
61
63
];
62
64
@@ -72,6 +74,7 @@ abstract class AbstractConsignment
72
74
public const DELIVERY_TYPE_STANDARD = 2 ;
73
75
public const DELIVERY_TYPE_EVENING = 3 ;
74
76
public const DELIVERY_TYPE_PICKUP = 4 ;
77
+ public const DELIVERY_TYPE_EXPRESS = 7 ;
75
78
76
79
/**
77
80
* @deprecated Since November 2019 is it no longer possible to use pickup express.
@@ -82,6 +85,7 @@ abstract class AbstractConsignment
82
85
public const DELIVERY_TYPE_STANDARD_NAME = 'standard ' ;
83
86
public const DELIVERY_TYPE_EVENING_NAME = 'evening ' ;
84
87
public const DELIVERY_TYPE_PICKUP_NAME = 'pickup ' ;
88
+ public const DELIVERY_TYPE_EXPRESS_NAME = 'express ' ;
85
89
86
90
/**
87
91
* @deprecated Since November 2019 is it no longer possible to use pickup express.
@@ -94,6 +98,7 @@ abstract class AbstractConsignment
94
98
self ::DELIVERY_TYPE_STANDARD ,
95
99
self ::DELIVERY_TYPE_EVENING ,
96
100
self ::DELIVERY_TYPE_PICKUP ,
101
+ self ::DELIVERY_TYPE_EXPRESS ,
97
102
self ::DELIVERY_TYPE_PICKUP_EXPRESS ,
98
103
];
99
104
@@ -103,6 +108,7 @@ abstract class AbstractConsignment
103
108
self ::DELIVERY_TYPE_STANDARD_NAME ,
104
109
self ::DELIVERY_TYPE_EVENING_NAME ,
105
110
self ::DELIVERY_TYPE_PICKUP_NAME ,
111
+ self ::DELIVERY_TYPE_EXPRESS_NAME ,
106
112
self ::DELIVERY_TYPE_PICKUP_EXPRESS_NAME ,
107
113
];
108
114
@@ -112,6 +118,7 @@ abstract class AbstractConsignment
112
118
self ::DELIVERY_TYPE_STANDARD_NAME => self ::DELIVERY_TYPE_STANDARD ,
113
119
self ::DELIVERY_TYPE_EVENING_NAME => self ::DELIVERY_TYPE_EVENING ,
114
120
self ::DELIVERY_TYPE_PICKUP_NAME => self ::DELIVERY_TYPE_PICKUP ,
121
+ self ::DELIVERY_TYPE_EXPRESS_NAME => self ::DELIVERY_TYPE_EXPRESS ,
115
122
self ::DELIVERY_TYPE_PICKUP_EXPRESS_NAME => self ::DELIVERY_TYPE_PICKUP_EXPRESS ,
116
123
];
117
124
@@ -399,6 +406,12 @@ abstract class AbstractConsignment
399
406
*/
400
407
protected $ receipt_code ;
401
408
409
+ /**
410
+ * @internal
411
+ * @var bool|null
412
+ */
413
+ protected $ collect ;
414
+
402
415
/**
403
416
* @internal
404
417
* @var bool|null
@@ -1507,6 +1520,17 @@ public function setReceiptCode(bool $receiptCode): self
1507
1520
return $ this ;
1508
1521
}
1509
1522
1523
+ /**
1524
+ * @param bool $collect
1525
+ * @return self
1526
+ */
1527
+ public function setCollect (bool $ collect ): self
1528
+ {
1529
+ $ this ->collect = $ collect && $ this ->canHaveShipmentOption (self ::SHIPMENT_OPTION_COLLECT );
1530
+
1531
+ return $ this ;
1532
+ }
1533
+
1510
1534
/**
1511
1535
* Return the package if the recipient is not home.
1512
1536
*
@@ -1577,6 +1601,11 @@ public function hasReceiptCode(): ?bool
1577
1601
return $ this ->receipt_code ;
1578
1602
}
1579
1603
1604
+ public function hasCollect (): ?bool
1605
+ {
1606
+ return $ this ->collect ;
1607
+ }
1608
+
1580
1609
/**
1581
1610
* @return boolean
1582
1611
*/
0 commit comments