forked from apoloz/alfa-bank-sdk
feat: Add Laravel tinker examples and update nominal accounts functionality
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
@@ -14,16 +14,19 @@ namespace Apoloz\AlfaBank\Data\NominalAccounts\Identification;
|
||||
// <SECTION name="module_imports" intent="Import necessary DTOs and Spatie Laravel Data components for complex nested structures.">
|
||||
// <BELIEF_STATE "This DTO orchestrates several other DTOs and collections (`AmountDistributionData`, `DigestSignatureData`), requiring `DataCollectionOf` for typed arrays.">
|
||||
use Apoloz\AlfaBank\Data\NominalAccounts\Payouts\DigestSignatureData;
|
||||
use Apoloz\AlfaBank\Traits\SignableData;
|
||||
use Spatie\LaravelData\Attributes\DataCollectionOf;
|
||||
use Spatie\LaravelData\Data;
|
||||
use Spatie\LaravelData\DataCollection;
|
||||
// </SECTION>
|
||||
|
||||
// <SECTION name="class_definition" intent="Define a DTO for identifying an unidentified transaction.">
|
||||
// <BELIEF_STATE "This DTO provides a robust contract for the complex payload required to identify a transaction. It ensures that critical financial and cryptographic data is correctly structured.">
|
||||
// <SECTION name="class_definition" intent="Define a DTO for identifying a transaction.">
|
||||
// <BELIEF_STATE "This DTO encapsulates the data required to link an incoming transaction to a specific beneficiary and distribute the funds. It serves as the payload for the IdentifyTransactionRequest. ">
|
||||
class IdentifyRequestData extends Data
|
||||
{
|
||||
// <SECTION name="constructor_properties" intent="Define all properties for the transaction identification request.">
|
||||
use SignableData;
|
||||
|
||||
// <SECTION name="constructor_properties" intent="Define the properties of the identification request.">
|
||||
// <BELIEF_STATE "The constructor meticulously lists all mandatory fields. `transactionId` and `accountNumber` pinpoint the transaction. `amountDistribution` and `digestSignatures` are critical for the financial and security aspects of the identification process, each being a typed collection.">
|
||||
public function __construct(
|
||||
public string $transactionId,
|
||||
@@ -31,7 +34,7 @@ class IdentifyRequestData extends Data
|
||||
#[DataCollectionOf(AmountDistributionData::class)]
|
||||
public DataCollection $amountDistribution,
|
||||
#[DataCollectionOf(DigestSignatureData::class)]
|
||||
public DataCollection $digestSignatures,
|
||||
public ?DataCollection $digestSignatures = null,
|
||||
) {}
|
||||
// </SECTION>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user