id; } public function status(): ?string { return $this->status; } // public static function fromArray(array $payload): self { return new self( id: $payload['id'] ?? null, amount: $payload['amount'] ?? null, type: $payload['type'] ?? null, status: $payload['status'] ?? null, fee: $payload['fee'] ?? null, fundingDate: $payload['funding_date'] ?? null, fundingEstimatedDate: $payload['funding_estimated_date'] ?? null, bankAccount: $payload['bank_account'] ?? null, bankResponse: $payload['bank_response'] ?? null, createdAt: $payload['created_at'] ?? $payload['date_created'] ?? null, metadata: $payload['metadata'] ?? null, ); } public function toArray(): array { return [ 'id' => $this->id, 'amount' => $this->amount, 'type' => $this->type, 'status' => $this->status, 'fee' => $this->fee, 'funding_date' => $this->fundingDate, 'funding_estimated_date' => $this->fundingEstimatedDate, 'bank_account' => $this->bankAccount, 'bank_response' => $this->bankResponse, 'created_at' => $this->createdAt, 'metadata' => $this->metadata, ]; } }