forked from apoloz/alfa-bank-sdk
36 lines
1.8 KiB
PHP
36 lines
1.8 KiB
PHP
<?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,
|
|
public int $amount,
|
|
public ?string $currency = 'RUB',
|
|
public ?string $OrderNumber = null,
|
|
public ?string $paymentPurpose = null,
|
|
public ?string $notificationUrl = null,
|
|
public ?string $qrTtl = null,
|
|
public ?string $redirectUrl = null,
|
|
) {}
|
|
// </SECTION>
|
|
}
|