Files
alfa-bank-sdk/src/Sbp/Data/CashLink/RegCashQrRequestData.php

33 lines
1.6 KiB
PHP

<?php
/*
// MODULE_CONTRACT: Defines the data structure for a CashLink QR Code registration request payload.
// RESPONSIBILITY: To hold and type-safely represent the parameters needed to register a CashLink QR Code.
// INPUTS: Terminal number (TermNo) and various optional display parameters.
// OUTPUTS: A structured, type-safe object for the `RegCashQrRequest` payload.
// LINKS: Sbp/Requests/CashLink/RegCashQrRequest.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 registration request.">
// <BELIEF_STATE "This DTO ensures the registration payload is strictly typed and complete, supporting clear communication for generating CashLink QR Codes.">
class RegCashQrRequestData extends Data
{
// <SECTION name="constructor_properties" intent="Define the properties for the CashLink QR Code registration request.">
// <BELIEF_STATE "The constructor includes the mandatory `TermNo`. Optional fields cover `mediaType`, `width`, `height` (for QR image customization), `redirectUrl`, and an explicit `qrcId` if pre-defined.">
public function __construct(
public string $TermNo,
public ?string $mediaType = null,
public ?string $width = null,
public ?string $height = null,
public ?string $redirectUrl = null,
public ?string $qrcId = null,
) {}
// </SECTION>
}