refactor(core): enhance SDK structure and documentation

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
2026-01-18 21:48:25 +03:00
parent 3da69c03e1
commit d214eecebe
378 changed files with 10514 additions and 496 deletions

View File

@@ -1,11 +1,25 @@
<?php
/*
// MODULE_CONTRACT: Defines the data structure for a Digital Ruble payment notification payload.
// RESPONSIBILITY: To hold and type-safely represent the details of an incoming Digital Ruble payment event.
// INPUTS: Raw array from a Digital Ruble payment webhook.
// OUTPUTS: A structured object containing payment notification details.
// LINKS: Sbp/Requests/DigitalRuble/Notifications/ParsePaymentDrNotification.php
*/
namespace Apoloz\AlfaBank\Sbp\Data\DigitalRuble\Notifications;
// <SECTION name="module_imports" intent="Import the base Spatie Laravel Data class.">
// <BELIEF_STATE "Extending `Spatie\LaravelData\Data` enables automatic casting from arrays and provides DTO benefits.">
use Spatie\LaravelData\Data;
// </SECTION>
// <SECTION name="class_definition" intent="Define a DTO for Digital Ruble payment notification.">
// <BELIEF_STATE "This DTO provides a clear, type-safe contract for Digital Ruble payment notifications, crucial for reliably processing incoming payment events.">
class PaymentDrNotificationData extends Data
{
// <SECTION name="constructor_properties" intent="Define the properties of a Digital Ruble payment notification.">
// <BELIEF_STATE "The constructor includes mandatory fields such as `command`, `payrrn`, `BatchId`, `TermNo`, `CreditDatePos`, and `merchantName`. Optional fields provide additional context like `uniQrId`, `operationId`, `status`, `amount`, `timestamp`, and `purpose`, essential for a comprehensive payment record.">
public function __construct(
public string $command,
public string $payrrn,
@@ -20,4 +34,5 @@ class PaymentDrNotificationData extends Data
public ?string $timestamp = null,
public ?string $purpose = null,
) {}
// </SECTION>
}