PluginProbe
Packeta / 1.4
Packeta v1.4
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 1.4, at src/Packetery/Core/Api/Soap/Response/CreateShipment.php

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