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 / CreateShipment.php

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

156 lines 2.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Class CreateShipment
4 *
5 * @package Packetery\Core\Api\Soap\Response
6 */
7
8 declare( strict_types=1 );
9
10 namespace Packetery\Core\Api\Soap\Response;
11
12 /**
13 * Class CreateShipment
14 *
15 * @package Packetery\Core\Api\Soap\Response
16 */
17 class CreateShipment extends BaseResponse {
18
19 /**
20 * Shipment ID.
21 *
22 * @var string
23 */
24 private $id;
25
26 /**
27 * Checksum.
28 *
29 * @var string
30 */
31 private $checksum;
32
33 /**
34 * Barcode.
35 *
36 * @var string
37 */
38 private $barcode;
39
40 /**
41 * Barcode text.
42 *
43 * @var string
44 */
45 private $barcodeText;
46
47 /**
48 * Invalid packet IDs.
49 *
50 * @var string[]
51 */
52 private $invalidPacketIds = [];
53
54 /**
55 * Gets ID.
56 *
57 * @return string
58 */
59 public function getId(): string {
60 return $this->id;
61 }
62
63 /**
64 * Sets ID.
65 *
66 * @param string $id ID.
67 */
68 public function setId( string $id ): void {
69 $this->id = $id;
70 }
71
72 /**
73 * Gets checksum.
74 *
75 * @return string
76 */
77 public function getChecksum(): string {
78 return $this->checksum;
79 }
80
81 /**
82 * Checksum.
83 *
84 * @param string $checksum Checksum.
85 */
86 public function setChecksum( string $checksum ): void {
87 $this->checksum = $checksum;
88 }
89
90 /**
91 * Barcode.
92 *
93 * @return string
94 */
95 public function getBarcode(): string {
96 return $this->barcode;
97 }
98
99 /**
100 * Sets barcode.
101 *
102 * @param string $barcode Barcode.
103 */
104 public function setBarcode( string $barcode ): void {
105 $this->barcode = $barcode;
106 }
107
108 /**
109 * Barcode text simplified.
110 *
111 * @return string
112 */
113 public function getSimpleBarcodeText(): string {
114 $exploded = explode( ':', $this->barcodeText );
115 $first = array_shift( $exploded );
116
117 return trim( (string) $first );
118 }
119
120 /**
121 * Barcode text.
122 *
123 * @return string
124 */
125 public function getBarcodeText(): string {
126 return $this->barcodeText;
127 }
128
129 /**
130 * Barcode text.
131 *
132 * @param string $barcodeText Barcode text.
133 */
134 public function setBarcodeText( string $barcodeText ): void {
135 $this->barcodeText = $barcodeText;
136 }
137
138 /**
139 * Gets invalid packet IDs.
140 *
141 * @return string[]
142 */
143 public function getInvalidPacketIds(): array {
144 return $this->invalidPacketIds;
145 }
146
147 /**
148 * Sets invalid packet IDs.
149 *
150 * @param string[] $invalidPacketIds Invalid packets.
151 */
152 public function setInvalidPacketIds( array $invalidPacketIds ): void {
153 $this->invalidPacketIds = $invalidPacketIds;
154 }
155 }
156