You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
655 B
32 lines
655 B
|
4 months ago
|
<?php
|
||
|
|
|
||
|
|
namespace App\Services\Sms;
|
||
|
|
|
||
|
|
use App\Models\SmsVerification;
|
||
|
|
|
||
|
|
class ParticipantSmsVerificationResult
|
||
|
|
{
|
||
|
|
public function __construct(
|
||
|
|
public readonly bool $success,
|
||
|
|
public readonly SmsVerification $verification,
|
||
|
|
public readonly string $message,
|
||
|
|
public readonly ?string $debugCode = null,
|
||
|
|
) {}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @return array<string, string>
|
||
|
|
*/
|
||
|
|
public function toHttpPayload(): array
|
||
|
|
{
|
||
|
|
$payload = [
|
||
|
|
'message' => $this->message,
|
||
|
|
];
|
||
|
|
|
||
|
|
if ($this->debugCode !== null) {
|
||
|
|
$payload['debug_code'] = $this->debugCode;
|
||
|
|
}
|
||
|
|
|
||
|
|
return $payload;
|
||
|
|
}
|
||
|
|
}
|