subscription = $subscription; $this->newOrder = $newOrder; $this->oldOrder = $oldOrder; $this->customer = $customer; } public function toArray(): array { return [ 'subscription' => $this->subscription ?? null, 'order' => $this->newOrder ?? null, 'main_order' => $this->oldOrder ?? null, 'customer' => $this->customer ?? null, ]; } public function beforeDispatch() { $this->newOrder = $this->newOrder->generateReceiptNumber(); } public function getActivityEventModel() { return $this->subscription; } }