// use Apoloz\AlfaBank\Sbp\Data\CashLink\RegCashQrRequestData; use Apoloz\AlfaBank\Sbp\Data\CashLink\RegCashQrResponseData; use Apoloz\AlfaBank\Utils\CmsSigner; use Saloon\Contracts\Body\HasBody; use Saloon\Enums\Method; use Saloon\Http\Request; use Saloon\Http\Response; use Saloon\Traits\Body\HasStringBody; // //
// class RegCashQrRequest extends Request implements HasBody { use HasStringBody; //
// protected Method $method = Method::POST; //
//
// public function __construct( protected RegCashQrRequestData $data ) {} //
// public function resolveEndpoint(): string { return ''; // Endpoint is determined by SbpConnector's base URL } //
//
// public function createDtoFromResponse(Response $response): RegCashQrResponseData { return RegCashQrResponseData::from($response->json()); } //
//
// protected function defaultBody(): string { $bodyArray = [ 'command' => 'RegCashQRc', 'TermNo' => $this->data->TermNo, ]; if ($this->data->mediaType !== null) { $bodyArray['mediaType'] = $this->data->mediaType; } if ($this->data->width !== null) { $bodyArray['width'] = $this->data->width; } if ($this->data->height !== null) { $bodyArray['height'] = $this->data->height; } if ($this->data->redirectUrl !== null) { $bodyArray['redirectUrl'] = $this->data->redirectUrl; } if ($this->data->qrcId !== null) { $bodyArray['qrcId'] = $this->data->qrcId; } return CmsSigner::canonicalize($bodyArray); } //
}