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 a single payoff within a deal.
|
||||
// RESPONSIBILITY: To hold and type-safely represent a specific payment made as part of a deal.
|
||||
// INPUTS: Raw JSON object from the API response.
|
||||
// OUTPUTS: A structured object containing deal payoff details.
|
||||
// LINKS: Requests/NominalAccounts/Deals/GetDealPayoffsRequest.php
|
||||
*/
|
||||
|
||||
namespace Apoloz\AlfaBank\Data\NominalAccounts\Deals;
|
||||
|
||||
// <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 a payoff associated with a deal.">
|
||||
// <BELIEF_STATE "This DTO provides a clear, type-safe contract for individual payment records related to a deal, crucial for tracking financial flows within deals.">
|
||||
class DealPayoffData extends Data
|
||||
{
|
||||
// <SECTION name="constructor_properties" intent="Define the properties of a deal payoff.">
|
||||
// <BELIEF_STATE "The constructor includes key identifiers like `stepId`, `payoffId`, `payoffType`, `deponentId`, `recipientId`, and financial details (`amount`, `status`). These fields are essential for understanding the specific payment within the context of a deal.">
|
||||
public function __construct(
|
||||
public string $stepId,
|
||||
public string $payoffId,
|
||||
@@ -15,4 +29,5 @@ class DealPayoffData extends Data
|
||||
public string $amount,
|
||||
public string $status,
|
||||
) {}
|
||||
// </SECTION>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user