Files
alfa-bank-sdk/src/Data/NominalAccounts/Deals/Steps/ContractorAmountData.php
Anatoliy Poloz b15d29f8e9 fix(formating)
2026-01-28 03:36:26 +03:00

32 lines
1.7 KiB
PHP

<?php
declare(strict_types=1);
/*
// MODULE_CONTRACT: Defines the data structure for a specific amount allocated to a contractor's wallet.
// RESPONSIBILITY: To hold and type-safely represent an amount designated for a particular wallet type (e.g., nominal, tax).
// INPUTS: Raw JSON object or internal input.
// OUTPUTS: A structured object containing amount and wallet type.
// LINKS: ContractorActionRequestData.php (uses this DTO)
*/
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 an amount allocated to a contractor's wallet.">
// <BELIEF_STATE "This DTO provides a precise, type-safe contract for specifying how funds are distributed across different wallet types for a contractor within a deal step, ensuring granular control over financial flows.">
class ContractorAmountData extends Data
{
// <SECTION name="constructor_properties" intent="Define the properties of a contractor amount allocation.">
// <BELIEF_STATE "The constructor includes optional fields for `walletType` (e.g., 'NOMINAL', 'TAX') and the `amount` to be allocated. Both are optional to allow for flexible usage, potentially being part of a larger distribution scheme where these properties might be inferred or contextually dependent.">
public function __construct(
public ?string $walletType = null,
public ?string $amount = null,
) {}
// </SECTION>
}