forked from apoloz/alfa-bank-sdk
40 lines
877 B
PHP
40 lines
877 B
PHP
<?php
|
|
|
|
namespace Apoloz\AlfaBank\Sbp\Requests\Management;
|
|
|
|
use Apoloz\AlfaBank\Sbp\Data\Management\BlockQrRequestData;
|
|
use Saloon\Contracts\Body\HasBody;
|
|
use Saloon\Enums\Method;
|
|
use Saloon\Http\Request;
|
|
use Saloon\Traits\Body\HasJsonBody;
|
|
|
|
class UnblockQrRequest extends Request implements HasBody
|
|
{
|
|
use HasJsonBody;
|
|
|
|
protected Method $method = Method::POST;
|
|
|
|
public function __construct(
|
|
protected BlockQrRequestData $data
|
|
) {}
|
|
|
|
public function resolveEndpoint(): string
|
|
{
|
|
return '';
|
|
}
|
|
|
|
protected function defaultBody(): array
|
|
{
|
|
return [
|
|
'command' => 'UnblockQRcId',
|
|
'TermNo' => $this->data->TermNo,
|
|
'qrcId' => $this->data->qrcId,
|
|
];
|
|
}
|
|
|
|
public function createDtoFromResponse(\Saloon\Http\Response $response): array
|
|
{
|
|
return $response->json();
|
|
}
|
|
}
|