$this->id, 'billing_cycle' => $this->billing_cycle, 'months' => $this->months, 'server_name' => $this->server_name, 'os_id' => $this->os_id, 'price' => (float) $this->price, 'service' => $this->whenLoaded('service', fn () => [ 'id' => $this->service->id, 'uuid' => $this->service->uuid, 'type' => $this->service->type, 'status' => $this->service->status, 'status_text' => $this->service->status_label, 'retry_requested_at' => $this->service->retry_requested_at?->toISOString(), 'can_retry_provisioning' => $this->service->status === 'pending' && ! $this->service->retry_requested_at, ]), 'product' => $this->whenLoaded('product', fn () => [ 'id' => $this->product->id, 'uuid' => $this->product->uuid, 'name' => $this->product->name, 'product_type' => $this->product->product_type, 'specs' => [ 'cpu' => $this->product->cpu, 'ram' => $this->product->ram, 'disk' => $this->product->disk, 'bandwidth' => $this->product->bandwidth, ], ]), ]; } }