forked from apoloz/alfa-bank-sdk
33 lines
1.7 KiB
PHP
33 lines
1.7 KiB
PHP
<?php
|
|
/*
|
|
// MODULE_CONTRACT: Defines the data structure for the response of a step action request within a deal.
|
|
// RESPONSIBILITY: To hold and type-safely represent the outcome and status of an action performed on a deal step.
|
|
// INPUTS: Raw JSON object from the API response.
|
|
// OUTPUTS: A structured object containing step action status information.
|
|
// LINKS: Requests/NominalAccounts/Deals/Steps/ManageStepRequest.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 the response of a step action request.">
|
|
// <BELIEF_STATE "This DTO provides a clear, type-safe contract for tracking the status of actions performed on deal steps, which can be asynchronous operations.">
|
|
class StepActionResponseData extends Data
|
|
{
|
|
// <SECTION name="constructor_properties" intent="Define the properties of a step action response.">
|
|
// <BELIEF_STATE "The constructor includes key identifiers such as `dealId`, `stepId`, `stepNumber`, and `requestId`. The `status` and `description` provide details about the action's outcome. All fields are optional to accommodate various response scenarios.">
|
|
public function __construct(
|
|
public ?string $dealId = null,
|
|
public ?string $stepId = null,
|
|
public ?int $stepNumber = null,
|
|
public ?string $description = null,
|
|
public ?string $status = null,
|
|
public ?string $requestId = null,
|
|
) {}
|
|
// </SECTION>
|
|
}
|