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