fix(formating)

This commit is contained in:
Anatoliy Poloz
2026-01-28 03:36:26 +03:00
parent 1723177949
commit b15d29f8e9
313 changed files with 1863 additions and 1533 deletions

View File

@@ -27,6 +27,11 @@ class CreateUniQrRequest extends Request implements HasBody
return '';
}
public function createDtoFromResponse(Response $response): UniQrResponseData
{
return UniQrResponseData::from($response->json());
}
protected function defaultBody(): array
{
$body = [
@@ -35,31 +40,52 @@ class CreateUniQrRequest extends Request implements HasBody
'uniQrType' => $this->data->uniQrType,
];
if ($this->data->amount !== null) $body['amount'] = $this->data->amount;
if ($this->data->paymentPurpose !== null) $body['paymentPurpose'] = $this->data->paymentPurpose;
if ($this->data->redirectUrl !== null) $body['redirectUrl'] = $this->data->redirectUrl;
if ($this->data->paymentPageUrl !== null) $body['paymentPageUrl'] = $this->data->paymentPageUrl;
if ($this->data->mediaType !== null) $body['mediaType'] = $this->data->mediaType;
if ($this->data->width !== null) $body['width'] = $this->data->width;
if ($this->data->height !== null) $body['height'] = $this->data->height;
if ($this->data->qrTtl !== null) $body['qrTtl'] = $this->data->qrTtl;
if ($this->data->messageID !== null) $body['messageID'] = $this->data->messageID;
if ($this->data->amount !== null) {
$body['amount'] = $this->data->amount;
}
if ($this->data->paymentPurpose !== null) {
$body['paymentPurpose'] = $this->data->paymentPurpose;
}
if ($this->data->redirectUrl !== null) {
$body['redirectUrl'] = $this->data->redirectUrl;
}
if ($this->data->paymentPageUrl !== null) {
$body['paymentPageUrl'] = $this->data->paymentPageUrl;
}
if ($this->data->mediaType !== null) {
$body['mediaType'] = $this->data->mediaType;
}
if ($this->data->width !== null) {
$body['width'] = $this->data->width;
}
if ($this->data->height !== null) {
$body['height'] = $this->data->height;
}
if ($this->data->qrTtl !== null) {
$body['qrTtl'] = $this->data->qrTtl;
}
if ($this->data->messageID !== null) {
$body['messageID'] = $this->data->messageID;
}
$queryData = [];
if ($this->data->notificationUrl !== null) $queryData['notificationUrl'] = $this->data->notificationUrl;
if ($this->data->SenderFIO !== null) $queryData['SenderFIO'] = $this->data->SenderFIO;
if ($this->data->SenderID !== null) $queryData['SenderID'] = $this->data->SenderID;
if ($this->data->SenderBankBIC !== null) $queryData['SenderBankBIC'] = $this->data->SenderBankBIC;
if ($this->data->notificationUrl !== null) {
$queryData['notificationUrl'] = $this->data->notificationUrl;
}
if ($this->data->SenderFIO !== null) {
$queryData['SenderFIO'] = $this->data->SenderFIO;
}
if ($this->data->SenderID !== null) {
$queryData['SenderID'] = $this->data->SenderID;
}
if ($this->data->SenderBankBIC !== null) {
$queryData['SenderBankBIC'] = $this->data->SenderBankBIC;
}
if (!empty($queryData)) {
if (! empty($queryData)) {
$body['queryData'] = $queryData;
}
return $body;
}
public function createDtoFromResponse(Response $response): UniQrResponseData
{
return UniQrResponseData::from($response->json());
}
}
}