refactor(core): enhance SDK structure and documentation

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
2026-01-18 21:48:25 +03:00
parent 3da69c03e1
commit d214eecebe
378 changed files with 10514 additions and 496 deletions

View File

@@ -1,11 +1,25 @@
<?php
/*
// MODULE_CONTRACT: Defines the data structure for the response of a QR Code reversal data request.
// RESPONSIBILITY: To hold and type-safely represent detailed information about an SBP QR Code reversal.
// INPUTS: Raw JSON object from the API response.
// OUTPUTS: A structured object containing detailed reversal data.
// LINKS: Sbp/Requests/Reversal/GetQrcReversalDataRequest.php
*/
namespace Apoloz\AlfaBank\Sbp\Data\Reversal;
// <SECTION name="module_imports" intent="Import the base Spatie Laravel Data class.">
// <BELIEF_STATE "Extending `Spatie\LaravelData\Data` enables automatic casting from JSON and provides DTO benefits.">
use Spatie\LaravelData\Data;
// </SECTION>
// <SECTION name="class_definition" intent="Define a DTO for detailed SBP QR Code reversal data response.">
// <BELIEF_STATE "This DTO provides a clear, type-safe contract for the detailed outcome of a reversal data query, crucial for reconciliation and error analysis.">
class GetQrcReversalDataResponseData extends Data
{
// <SECTION name="constructor_properties" intent="Define the properties of the QR Code reversal data response.">
// <BELIEF_STATE "The constructor includes mandatory error codes and messages, along with optional detailed information about the reversal such as `TermNo`, `messageID`, payer details, `payrrn`, `qrcId`, `trxDT`, `trxId`, and `restAmount`.">
public function __construct(
public int $ErrorCode,
public string $message,
@@ -21,4 +35,5 @@ class GetQrcReversalDataResponseData extends Data
public ?string $trxId = null,
public ?string $restAmount = null,
) {}
// </SECTION>
}