<?php

namespace App\Http\Integrations\Imake\Requests\BulkClix;

use Saloon\Enums\Method;
use Saloon\Http\Request;
use Saloon\Contracts\Body\HasBody;
use Saloon\Traits\Body\HasJsonBody;

class VerifyOTP extends Request implements HasBody
{
    use HasJsonBody;
    /**
     * The HTTP method of the request
     */
    protected Method $method = Method::POST;

    public function __construct(protected readonly string $phoneNumber, protected readonly string $requestId, protected readonly string $code)
    {
        //
    }

    protected function defaultBody(): array
    {
        return [
            'phoneNumber' => $this->phoneNumber,
            'requestId' => $this->requestId,
            'code' => $this->code,
        ];
    }

    public function resolveEndpoint(): string
    {
        return '/sms-api/otp/verify';
    }
}
