forked from apoloz/alfa-bank-sdk
fix(formating)
This commit is contained in:
@@ -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 QR Code.">
|
||||
@@ -46,6 +47,14 @@ class GetQrcStatusRequest extends Request implements HasBody
|
||||
}
|
||||
// </SECTION>
|
||||
|
||||
// <SECTION name="response_caster" intent="Map the JSON response to a DTO.">
|
||||
// <BELIEF_STATE "Casting the response to a `GetQrcStatusResponseData` DTO provides a type-safe and structured object for the status of the QR Code.">
|
||||
public function createDtoFromResponse(Response $response): GetQrcStatusResponseData
|
||||
{
|
||||
return GetQrcStatusResponseData::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` is mandatory, and `qrcId`, `payrrn`, and `messageID` are optional filters to pinpoint the transaction.">
|
||||
protected function defaultBody(): array
|
||||
@@ -56,12 +65,4 @@ class GetQrcStatusRequest extends Request implements HasBody
|
||||
);
|
||||
}
|
||||
// </SECTION>
|
||||
|
||||
// <SECTION name="response_caster" intent="Map the JSON response to a DTO.">
|
||||
// <BELIEF_STATE "Casting the response to a `GetQrcStatusResponseData` DTO provides a type-safe and structured object for the status of the QR Code.">
|
||||
public function createDtoFromResponse(Response $response): GetQrcStatusResponseData
|
||||
{
|
||||
return GetQrcStatusResponseData::from($response->json());
|
||||
}
|
||||
// </SECTION>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user