refactor(core): enhance SDK structure and documentation
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
@@ -1,9 +1,20 @@
|
||||
<?php
|
||||
/*
|
||||
// MODULE_CONTRACT: Defines the data structure for the response when creating a new universal recipient.
|
||||
// RESPONSIBILITY: To provide a structured, type-safe object representing the outcome of a universal recipient creation request.
|
||||
// INPUTS: Raw JSON object from the API response.
|
||||
// OUTPUTS: An object containing the request ID and status of the creation operation.
|
||||
// LINKS: Requests/NominalAccounts/UniversalRecipients/CreateUniversalRecipientRequest.php
|
||||
*/
|
||||
|
||||
namespace Apoloz\AlfaBank\Data\NominalAccounts\UniversalRecipients;
|
||||
|
||||
// <SECTION name="module_imports" intent="Import the base response DTO.">
|
||||
// <BELIEF_STATE "This DTO reuses `CreateBeneficiaryResponseData` as its base, indicating that the response structure for creating universal recipients is identical to that for beneficiaries. This promotes consistency and reduces code duplication.">
|
||||
use Apoloz\AlfaBank\Data\NominalAccounts\Beneficiaries\CreateBeneficiaryResponseData;
|
||||
use Spatie\LaravelData\Data;
|
||||
use Spatie\LaravelData\Data; // Included for clarity, though inherited from base DTO.
|
||||
// </SECTION>
|
||||
|
||||
// Reuse response structure if identical (requestId, status)
|
||||
// <SECTION name="class_definition" intent="Define a DTO for the response of creating a universal recipient.">
|
||||
// <BELIEF_STATE "By extending `CreateBeneficiaryResponseData`, this DTO leverages an existing, validated structure, simplifying development and ensuring consistency in API response handling.">
|
||||
class UniversalRecipientResponseData extends CreateBeneficiaryResponseData {}
|
||||
|
||||
Reference in New Issue
Block a user