Files
alfa-bank-sdk/src/Sbp/Data/Status/GetQrcStatusRequestData.php

35 lines
1.6 KiB
PHP

<?php
declare(strict_types=1);
/*
// MODULE_CONTRACT: Defines the data structure for an SBP QR Code status request payload.
// RESPONSIBILITY: To hold and type-safely represent the parameters needed to query the status of a specific QR Code.
// INPUTS: Terminal number (TermNo) and various optional QR Code identifiers.
// OUTPUTS: A structured, type-safe object for the `GetQrcStatusRequest` payload.
// LINKS: Sbp/Requests/Status/GetQrcStatusRequest.php
*/
namespace Apoloz\AlfaBank\Sbp\Data\Status;
// <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\Attributes\MapName;
use Spatie\LaravelData\Data;
// </SECTION>
// <SECTION name="class_definition" intent="Define a DTO for SBP QR Code status request.">
// <BELIEF_STATE "This DTO ensures the status request payload is strictly typed and complete, supporting clear communication with the SBP API.">
class GetQrcStatusRequestData extends Data
{
// <SECTION name="constructor_properties" intent="Define the properties for the QR Code status request.">
// <BELIEF_STATE "The constructor includes the mandatory `termNo` and optional identifiers like `qrcId`, `payrrn`, and `messageID`. These allow for flexible and precise querying of a QR Code's status.">
public function __construct(
#[MapName('TermNo')]
public string $termNo,
public ?string $qrcId = null,
public ?string $payrrn = null,
public ?string $messageID = null,
) {}
// </SECTION>
}