<?php

namespace Modules\Payment\Http\Resources;

use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;

class RefundResource extends JsonResource
{
    /**
     * Transform the resource into an array.
     *
     * @return array<string, mixed>
     */
    public function toArray(Request $request): array
    {
        return [
            'id' => $this->id,
            'payment_id' => $this->payment_id,
            'status' => $this->status,
            'amount' => $this->amount,
            'reason' => $this->reason,
            'gateway_refund_id' => $this->gateway_refund_id,
            'requested_by' => $this->requested_by,
            'requested_at' => $this->requested_at,
            'completed_at' => $this->completed_at,
        ];
    }
}
