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

@@ -19,6 +19,7 @@ use Saloon\Enums\Method;
use Saloon\Http\Request;
use Saloon\Http\Response;
use Saloon\Traits\Body\HasJsonBody;
// </SECTION>
// <SECTION name="class_definition" intent="Define the request to get the status of a CashLink Uni QR Code.">
@@ -46,6 +47,14 @@ class GetCashUniQrStatusRequest extends Request implements HasBody
}
// </SECTION>
// <SECTION name="response_caster" intent="Map the JSON response to a DTO.">
// <BELIEF_STATE "Casting the response to a `GetCashUniQrStatusResponseData` DTO provides a type-safe and structured object for the status of the CashLink Uni QR Code.">
public function createDtoFromResponse(Response $response): GetCashUniQrStatusResponseData
{
return GetCashUniQrStatusResponseData::from($response->json());
}
// </SECTION>
// <SECTION name="body_builder" intent="Construct the JSON body for the request.">
// <BELIEF_STATE "The `command` field specifies the operation to the SBP API. The `TermNo`, `uniQrId`, and `paramsId` identify the target. Optional fields like `messageID` and `payrrn` provide additional context.">
protected function defaultBody(): array
@@ -57,18 +66,14 @@ class GetCashUniQrStatusRequest extends Request implements HasBody
'paramsId' => $this->data->paramsId,
];
if ($this->data->messageID !== null) $body['messageID'] = $this->data->messageID;
if ($this->data->payrrn !== null) $body['payrrn'] = $this->data->payrrn;
if ($this->data->messageID !== null) {
$body['messageID'] = $this->data->messageID;
}
if ($this->data->payrrn !== null) {
$body['payrrn'] = $this->data->payrrn;
}
return $body;
}
// </SECTION>
// <SECTION name="response_caster" intent="Map the JSON response to a DTO.">
// <BELIEF_STATE "Casting the response to a `GetCashUniQrStatusResponseData` DTO provides a type-safe and structured object for the status of the CashLink Uni QR Code.">
public function createDtoFromResponse(Response $response): GetCashUniQrStatusResponseData
{
return GetCashUniQrStatusResponseData::from($response->json());
}
// </SECTION>
}