Files
alfa-bank-sdk/src/Data/NominalAccounts/Deals/Steps/StepData.php

32 lines
1.5 KiB
PHP

<?php
/*
// MODULE_CONTRACT: Defines the data structure for a single step within a deal.
// RESPONSIBILITY: To hold and type-safely represent the details of a specific stage in a multi-step deal process.
// INPUTS: Raw JSON object from the API response.
// OUTPUTS: A structured object containing deal step details.
// LINKS: Requests/NominalAccounts/Deals/Steps/GetStepRequest.php
*/
namespace Apoloz\AlfaBank\Data\NominalAccounts\Deals\Steps;
// <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 single deal step.">
// <BELIEF_STATE "This DTO provides a clear, type-safe contract for a deal step, which is a critical component for defining and tracking complex business processes within a deal.">
class StepData extends Data
{
// <SECTION name="constructor_properties" intent="Define the properties of a deal step.">
// <BELIEF_STATE "The constructor includes key identifiers like `stepId` and `stepNumber`, along with `description`, `status`, and `isValid` to provide a comprehensive overview of the step's current state and details.">
public function __construct(
public string $stepId,
public int $stepNumber,
public string $description,
public string $status,
public bool $isValid,
) {}
// </SECTION>
}