PluginProbe
Packeta / 2.3.1
Packeta v2.3.1
2.3.2 2.3.1 trunk 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.3.0 1.3.1 1.3.2 1.4 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 All 56 releases
packeta / src / Packetery / Core / Api / Soap / Response / PacketStatus.php

PacketStatus.php in Packeta 2.3.1, at src/Packetery/Core/Api/Soap/Response/PacketStatus.php

82 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Class PacketStatus
4 *
5 * @package Packetery\Api\Soap\Request
6 */
7
8 declare( strict_types=1 );
9
10 namespace Packetery\Core\Api\Soap\Response;
11
12 use Packetery\Core\CoreHelper;
13
14 /**
15 * Class PacketStatus
16 *
17 * @package Packetery\Api\Soap\Request
18 */
19 class PacketStatus extends BaseResponse {
20
21 /**
22 * Code text.
23 *
24 * @var string
25 */
26 private $codeText;
27
28 /**
29 * The last possible day to pick up the packet.
30 *
31 * @var \DateTimeImmutable|null
32 */
33 private $storedUntil;
34
35 /**
36 * Gets code text.
37 *
38 * @return string
39 */
40 public function getCodeText(): string {
41 return $this->codeText;
42 }
43
44 /**
45 * Sets code text.
46 *
47 * @param string $codeText Code text.
48 *
49 * @return void
50 */
51 public function setCodeText( string $codeText ): void {
52 $this->codeText = $codeText;
53 }
54
55 /**
56 * Gets stored until.
57 *
58 * @return \DateTimeImmutable|null
59 */
60 public function getStoredUntil(): ?\DateTimeImmutable {
61 return $this->storedUntil;
62 }
63
64 /**
65 * Sets stored until.
66 *
67 * @param string|null $storedUntil Stored until.
68 *
69 * @return void
70 */
71 public function setStoredUntil( ?string $storedUntil ): void {
72 if ( $storedUntil === null ) {
73 $this->storedUntil = null;
74
75 return;
76 }
77
78 $formattedStoredUntil = \DateTimeImmutable::createFromFormat( CoreHelper::MYSQL_DATE_FORMAT, $storedUntil );
79 $this->storedUntil = $formattedStoredUntil instanceof \DateTimeImmutable ? $formattedStoredUntil : null;
80 }
81 }
82