forked from apoloz/alfa-bank-sdk
Улучшена документация, добавлена поддержка цифрового рубля и улучшена структура DTO
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
@@ -13,6 +13,9 @@ namespace Apoloz\AlfaBank\Sbp\Data\Reversal;
|
||||
|
||||
// <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\MapInputName;
|
||||
use Spatie\LaravelData\Attributes\MapName;
|
||||
use Spatie\LaravelData\Attributes\MapOutputName;
|
||||
use Spatie\LaravelData\Data;
|
||||
// </SECTION>
|
||||
|
||||
@@ -21,9 +24,10 @@ use Spatie\LaravelData\Data;
|
||||
class QrcReversalRequestData extends Data
|
||||
{
|
||||
// <SECTION name="constructor_properties" intent="Define the properties for the QR Code reversal request.">
|
||||
// <BELIEF_STATE "The constructor includes the mandatory `TermNo` and `currency`. Optional identifiers like `qrcId`, `payrrn`, `trxId`, `trxDT`, `amount`, `messageID`, `notificationUrl`, and `ReturnRestAmount` provide flexibility for various reversal scenarios.">
|
||||
// <BELIEF_STATE "The constructor includes the mandatory `termNo` and `currency`. Optional identifiers like `qrcId`, `payrrn`, `trxId`, `trxDT`, `amount`, `messageID`, `notificationUrl`, and `returnRestAmount` provide flexibility for various reversal scenarios.">
|
||||
public function __construct(
|
||||
public string $TermNo,
|
||||
#[MapName('TermNo')]
|
||||
public string $termNo,
|
||||
public ?string $qrcId = null,
|
||||
public ?string $payrrn = null,
|
||||
public ?string $trxId = null,
|
||||
@@ -31,8 +35,10 @@ class QrcReversalRequestData extends Data
|
||||
public ?string $amount = null,
|
||||
public string $currency = 'RUB',
|
||||
public ?string $messageID = null,
|
||||
#[MapOutputName('queryData.notificationUrl')]
|
||||
public ?string $notificationUrl = null,
|
||||
public ?bool $ReturnRestAmount = null,
|
||||
#[MapName('ReturnRestAmount')]
|
||||
public ?bool $returnRestAmount = null,
|
||||
// extJsonParams not fully implemented as it's optional and dynamic
|
||||
) {}
|
||||
// </SECTION>
|
||||
|
||||
Reference in New Issue
Block a user