<?php

namespace App\Http\Resources;

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

class ProviderPaymentMethodResource extends JsonResource
{
    public function toArray(Request $request): array
    {
        return [
            'id'                => $this->id,
            'provider_id'       => $this->provider_id,
            'account_type'      => $this->account_type?->value,
            'pix_key'           => $this->pix_key,
            'bank_account_type' => $this->bank_account_type?->value,
            'agency'            => $this->agency,
            'account'           => $this->account,
            'digit'             => $this->digit,
        ];
    }
}
