status; } /** * Set status * * @param int $status Price status * * @return void * * @throws InvalidEnumValue * * @since 1.0.0 */ public function setStatus(int $status) : void { if (!ItemPriceStatus::isValidValue($status)) { throw new InvalidEnumValue((string) $status); } $this->status = $status; } /** * {@inheritdoc} */ public function toArray() : array { return [ 'id' => $this->id, 'name' => $this->name, 'currency' => $this->currency, 'price' => $this->price, 'status' => $this->status, 'minQuantity' => $this->minQuantity, 'relativeDiscount' => $this->relativeDiscount, 'absoluteDiscount' => $this->absoluteDiscount, 'relativeUnitDiscount' => $this->relativeUnitDiscount, 'absoluteUnitDiscount' => $this->absoluteUnitDiscount, 'promocode' => $this->promocode, 'start' => $this->start, 'end' => $this->end, ]; } /** * {@inheritdoc} */ public function jsonSerialize() : mixed { return $this->toArray(); } }