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

37 lines
1.6 KiB
PHP

<?php
declare(strict_types=1);
/*
// MODULE_CONTRACT: Defines the data structure for an identification document.
// RESPONSIBILITY: To hold and type-safely represent details of a document like passport or ID card.
// INPUTS: Raw JSON object from the API response or internal input.
// OUTPUTS: A structured object containing document information.
// LINKS: CreateBeneficiaryRequestData.php (uses this DTO)
*/
namespace Apoloz\AlfaBank\Data\NominalAccounts\Beneficiaries;
// <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 identification document.">
// <BELIEF_STATE "This DTO provides a clear, type-safe contract for document data, critical for KYC (Know Your Customer) and AML (Anti-Money Laundering) compliance.">
class DocumentData extends Data
{
// <SECTION name="constructor_properties" intent="Define the properties of an identification document.">
// <BELIEF_STATE "The constructor includes fields common to identification documents, such as `type`, `number`, `issueDate`, and `organization`. Optional fields allow flexibility for various document types.">
public function __construct(
public string $type,
public string $number,
public string $issueDate,
public string $organization,
public ?string $serial = null,
public ?string $expireDate = null,
public ?string $division = null,
) {}
// </SECTION>
}