forked from apoloz/alfa-bank-sdk
36 lines
1.7 KiB
PHP
36 lines
1.7 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
/*
|
|
// MODULE_CONTRACT: Defines the data structure for payer information within an unidentified transaction.
|
|
// RESPONSIBILITY: To hold and type-safely represent the details of the party who initiated a transaction that needs identification.
|
|
// INPUTS: Raw JSON object from the API response.
|
|
// OUTPUTS: A structured object containing payer details.
|
|
// LINKS: UnidentifiedTransactionData.php (uses this DTO)
|
|
*/
|
|
|
|
namespace Apoloz\AlfaBank\Data\NominalAccounts\Identification;
|
|
|
|
// <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 payer details.">
|
|
// <BELIEF_STATE "This DTO provides a clear, type-safe contract for payer information, which is critical for identifying the origin of an unidentified transaction.">
|
|
class PayerData extends Data
|
|
{
|
|
// <SECTION name="constructor_properties" intent="Define the properties of a payer.">
|
|
// <BELIEF_STATE "The constructor includes various optional fields for identifying a payer, such as `inn`, `kpp`, `accountNumber`, `name`, and bank details (`bankAccount`, `bankBik`, `bankName`). All are optional as not all information may be available for an unidentified transaction.">
|
|
public function __construct(
|
|
public ?string $inn = null,
|
|
public ?string $kpp = null,
|
|
public ?string $accountNumber = null,
|
|
public ?string $name = null,
|
|
public ?string $bankAccount = null,
|
|
public ?string $bankBik = null,
|
|
public ?string $bankName = null,
|
|
) {}
|
|
// </SECTION>
|
|
}
|