refactor(core): enhance SDK structure and documentation
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
@@ -1,11 +1,25 @@
|
||||
<?php
|
||||
/*
|
||||
// MODULE_CONTRACT: Defines the data structure for the status of a counterparty-related request.
|
||||
// RESPONSIBILITY: To hold and type-safely represent the outcome and details of an asynchronous operation involving counterparties (beneficiaries or universal recipients).
|
||||
// INPUTS: Raw JSON object from the API response.
|
||||
// OUTPUTS: A structured object containing request status information.
|
||||
// LINKS: Requests/NominalAccounts/GetCounterpartyRequestStatusRequest.php
|
||||
*/
|
||||
|
||||
namespace Apoloz\AlfaBank\Data\NominalAccounts;
|
||||
|
||||
// <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 other DTO benefits.">
|
||||
use Spatie\LaravelData\Data;
|
||||
// </SECTION>
|
||||
|
||||
// <SECTION name="class_definition" intent="Define a DTO for the status of a counterparty request.">
|
||||
// <BELIEF_STATE "This DTO provides a clear, type-safe contract for tracking the status of asynchronous operations, which is common in complex banking APIs.">
|
||||
class CounterpartyRequestStatusData extends Data
|
||||
{
|
||||
// <SECTION name="constructor_properties" intent="Define the properties of a counterparty request status.">
|
||||
// <BELIEF_STATE "The `requestId` and `status` are fundamental for tracking any asynchronous operation. Optional fields like `beneficiaryId`, `universalRecipientId`, `description`, and `resultData` provide granular details about the outcome and associated entities.">
|
||||
public function __construct(
|
||||
public string $requestId,
|
||||
public string $status,
|
||||
@@ -14,4 +28,5 @@ class CounterpartyRequestStatusData extends Data
|
||||
public ?string $description = null,
|
||||
public ?string $resultData = null,
|
||||
) {}
|
||||
// </SECTION>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user