forked from apoloz/alfa-bank-sdk
refactor(core): enhance SDK structure and documentation
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
@@ -1,11 +1,25 @@
|
||||
<?php
|
||||
/*
|
||||
// MODULE_CONTRACT: Defines the data structure for a CashLink QR Code activation request payload.
|
||||
// RESPONSIBILITY: To hold and type-safely represent the parameters needed to activate a CashLink QR Code.
|
||||
// INPUTS: Terminal number (TermNo), QR Code ID, amount, and various optional payment/notification parameters.
|
||||
// OUTPUTS: A structured, type-safe object for the `ActivateCashQrRequest` payload.
|
||||
// LINKS: Sbp/Requests/CashLink/ActivateCashQrRequest.php
|
||||
*/
|
||||
|
||||
namespace Apoloz\AlfaBank\Sbp\Data\CashLink;
|
||||
|
||||
// <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 CashLink QR Code activation request.">
|
||||
// <BELIEF_STATE "This DTO ensures the activation payload is strictly typed and complete, supporting clear communication for managing CashLink QR Codes.">
|
||||
class ActivateCashQrRequestData extends Data
|
||||
{
|
||||
// <SECTION name="constructor_properties" intent="Define the properties for the CashLink QR Code activation request.">
|
||||
// <BELIEF_STATE "The constructor includes mandatory `TermNo`, `qrcId`, and `amount`. The `currency` defaults to 'RUB'. Optional fields cover `OrderNumber`, `paymentPurpose`, `notificationUrl`, `qrTtl`, and `redirectUrl`, allowing for flexible activation details.">
|
||||
public function __construct(
|
||||
public string $TermNo,
|
||||
public string $qrcId,
|
||||
@@ -17,4 +31,5 @@ class ActivateCashQrRequestData extends Data
|
||||
public ?string $qrTtl = null,
|
||||
public ?string $redirectUrl = null,
|
||||
) {}
|
||||
// </SECTION>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user