| @@ 125-133 (lines=9) @@ | ||
| 122 | * @param string $status |
|
| 123 | * @throws BpostInvalidValueException |
|
| 124 | */ |
|
| 125 | public function setStatus($status) |
|
| 126 | { |
|
| 127 | $status = strtoupper($status); |
|
| 128 | if (!in_array($status, self::getPossibleStatusValues())) { |
|
| 129 | throw new BpostInvalidValueException('status', $status, self::getPossibleStatusValues()); |
|
| 130 | } |
|
| 131 | ||
| 132 | $this->status = $status; |
|
| 133 | } |
|
| 134 | ||
| 135 | /** |
|
| 136 | * @param string $barcode |
|
| @@ 74-83 (lines=10) @@ | ||
| 71 | * @param string $language |
|
| 72 | * @throws BpostInvalidValueException |
|
| 73 | */ |
|
| 74 | public function setLanguage($language) |
|
| 75 | { |
|
| 76 | $language = strtoupper($language); |
|
| 77 | ||
| 78 | if (!in_array($language, self::getPossibleLanguageValues())) { |
|
| 79 | throw new BpostInvalidValueException('language', $language, self::getPossibleLanguageValues()); |
|
| 80 | } |
|
| 81 | ||
| 82 | $this->language = $language; |
|
| 83 | } |
|
| 84 | ||
| 85 | /** |
|
| 86 | * @return string |
|
| @@ 80-93 (lines=14) @@ | ||
| 77 | * @param string $parcelReturnInstructions |
|
| 78 | * @throws BpostInvalidValueException |
|
| 79 | */ |
|
| 80 | public function setParcelReturnInstructions($parcelReturnInstructions) |
|
| 81 | { |
|
| 82 | $parcelReturnInstructions = strtoupper($parcelReturnInstructions); |
|
| 83 | ||
| 84 | if (!in_array($parcelReturnInstructions, self::getPossibleParcelReturnInstructionValues())) { |
|
| 85 | throw new BpostInvalidValueException( |
|
| 86 | 'parcelReturnInstructions', |
|
| 87 | $parcelReturnInstructions, |
|
| 88 | self::getPossibleParcelReturnInstructionValues() |
|
| 89 | ); |
|
| 90 | } |
|
| 91 | ||
| 92 | $this->parcelReturnInstructions = $parcelReturnInstructions; |
|
| 93 | } |
|
| 94 | ||
| 95 | /** |
|
| 96 | * @return string |
|
| @@ 151-160 (lines=10) @@ | ||
| 148 | * @param string $shipmentType |
|
| 149 | * @throws BpostInvalidValueException |
|
| 150 | */ |
|
| 151 | public function setShipmentType($shipmentType) |
|
| 152 | { |
|
| 153 | $shipmentType = strtoupper($shipmentType); |
|
| 154 | ||
| 155 | if (!in_array($shipmentType, self::getPossibleShipmentTypeValues())) { |
|
| 156 | throw new BpostInvalidValueException('shipmentType', $shipmentType, self::getPossibleShipmentTypeValues()); |
|
| 157 | } |
|
| 158 | ||
| 159 | $this->shipmentType = $shipmentType; |
|
| 160 | } |
|
| 161 | ||
| 162 | /** |
|
| 163 | * @return string |
|