| @@ 120-133 (lines=14) @@ | ||
| 117 | * @param string $shipNotes |
|
| 118 | * @return self |
|
| 119 | */ |
|
| 120 | public function setShipNotes(string $shipNotes): self |
|
| 121 | { |
|
| 122 | if (isset($this->params['Order']['Ship']['ShipNotes'])) { |
|
| 123 | throw new LogicException('ShipNotes is already set.'); |
|
| 124 | } |
|
| 125 | ||
| 126 | if(strlen($shipNotes) > 500){ |
|
| 127 | throw new InvalidArgumentException('ShipNotes is invalid.'); |
|
| 128 | } |
|
| 129 | ||
| 130 | $this->params['Order']['Ship']['ShipNotes'] = $shipNotes; |
|
| 131 | ||
| 132 | return $this; |
|
| 133 | } |
|
| 134 | ||
| 135 | /** |
|
| 136 | * @param string $shipInvoiceNumber1 |
|
| @@ 184-195 (lines=12) @@ | ||
| 181 | * @param \DateTimeImmutable $shipDate |
|
| 182 | * @return self |
|
| 183 | */ |
|
| 184 | public function setShipDate(\DateTimeImmutable $shipDate): self |
|
| 185 | { |
|
| 186 | if (isset($this->params['Order']['Ship']['ShipDate'])) { |
|
| 187 | throw new LogicException('ShipDate is already set.'); |
|
| 188 | } |
|
| 189 | ||
| 190 | $this->params['Order']['Ship']['ShipDate'] = $shipDate |
|
| 191 | ->setTimeZone(new DateTimeZone('Asia/Tokyo')) |
|
| 192 | ->format('Ymd'); |
|
| 193 | ||
| 194 | return $this; |
|
| 195 | } |
|
| 196 | ||
| 197 | /** |
|
| 198 | * @param \DateTimeImmutable $arrivalDate |
|
| @@ 201-212 (lines=12) @@ | ||
| 198 | * @param \DateTimeImmutable $arrivalDate |
|
| 199 | * @return self |
|
| 200 | */ |
|
| 201 | public function setArrivalDate(\DateTimeImmutable $arrivalDate): self |
|
| 202 | { |
|
| 203 | if (isset($this->params['Order']['Ship']['ArrivalDate'])) { |
|
| 204 | throw new LogicException('ArrivalDate is already set.'); |
|
| 205 | } |
|
| 206 | ||
| 207 | $this->params['Order']['Ship']['ArrivalDate'] = $arrivalDate |
|
| 208 | ->setTimeZone(new DateTimeZone('Asia/Tokyo')) |
|
| 209 | ->format('Ymd'); |
|
| 210 | ||
| 211 | return $this; |
|
| 212 | } |
|
| 213 | ||
| 214 | /** |
|
| 215 | * @return string |
|