// 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 ChangeAccountForCashQrRequest extends Request implements HasBody { use HasStringBody; //
// protected Method $method = Method::POST; //
//
// public function __construct( protected string $TermNo, protected string $qrcId, protected string $account, protected ?string $NewTermNo = null, protected ?string $NewMerchantId = null, protected ?string $redirectUrl = null, ) {} //
// public function resolveEndpoint(): string { return ''; // Endpoint is determined by SbpConnector's base URL } //
//
// public function createDtoFromResponse(Response $response): array { return $response->json(); } //
//
// protected function defaultBody(): string { $bodyArray = [ 'command' => 'ChangeAccForCashQRc', 'TermNo' => $this->TermNo, 'qrcId' => $this->qrcId, 'account' => $this->account, ]; if ($this->NewTermNo !== null) { $bodyArray['NewTermNo'] = $this->NewTermNo; } if ($this->NewMerchantId !== null) { $bodyArray['NewMerchantId'] = $this->NewMerchantId; } if ($this->redirectUrl !== null) { $bodyArray['redirectUrl'] = $this->redirectUrl; } return CmsSigner::canonicalize($bodyArray); } //
}