Улучшена документация, добавлена поддержка цифрового рубля и улучшена структура DTO
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
@@ -66,11 +66,11 @@ class GetQrSubStatusRequest extends Request implements HasBody
|
||||
}
|
||||
// </SECTION>
|
||||
|
||||
// <SECTION name="response_caster" intent="Return the raw JSON response as an array.">
|
||||
// <BELIEF_STATE "For this specific request, the response is currently returned as a raw array. A dedicated DTO could be created if a structured object is required.">
|
||||
public function createDtoFromResponse(\Saloon\Http\Response $response): array
|
||||
// <SECTION name="response_caster" intent="Map the JSON response to a DTO.">
|
||||
// <BELIEF_STATE "Casting the response to a `GetQrSubStatusResponseData` DTO provides a structured object for the status of the subscription.">
|
||||
public function createDtoFromResponse(\Saloon\Http\Response $response): \Apoloz\AlfaBank\Sbp\Data\Subscription\GetQrSubStatusResponseData
|
||||
{
|
||||
return $response->json();
|
||||
return \Apoloz\AlfaBank\Sbp\Data\Subscription\GetQrSubStatusResponseData::from($response->json());
|
||||
}
|
||||
// </SECTION>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user