// use Apoloz\AlfaBank\Sbp\Data\DigitalRuble\CashLink\CreateCashUniQrRequestData; use Apoloz\AlfaBank\Sbp\Data\DigitalRuble\CashLink\CreateCashUniQrResponseData; use Saloon\Contracts\Body\HasBody; use Saloon\Enums\Method; use Saloon\Http\Request; use Saloon\Http\Response; // //
// class CreateCashUniQrRequest extends Request implements HasBody { use HasStringBody; //
// protected Method $method = Method::POST; //
//
// public function __construct( protected CreateCashUniQrRequestData $data ) {} //
// public function resolveEndpoint(): string { return ''; // Endpoint is determined by SbpConnector's base URL } //
//
// public function createDtoFromResponse(Response $response): CreateCashUniQrResponseData { return CreateCashUniQrResponseData::from($response->json()); } //
//
// protected function defaultBody(): string { $bodyArray = [ 'command' => 'ReqCashUniQr', 'TermNo' => $this->data->TermNo, ]; if ($this->data->messageID !== null) { $bodyArray['messageID'] = $this->data->messageID; } if ($this->data->redirectUrl !== null) { $bodyArray['redirectUrl'] = $this->data->redirectUrl; } if ($this->data->paymentPageUrl !== null) { $bodyArray['paymentPageUrl'] = $this->data->paymentPageUrl; } 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->qrcId !== null) { $bodyArray['qrcId'] = $this->data->qrcId; } if ($this->data->notificationUrl !== null) { $bodyArray['queryData'] = ['notificationUrl' => $this->data->notificationUrl]; } return CmsSigner::canonicalize($bodyArray); } //
}