forked from apoloz/alfa-bank-sdk
fix(formating)
This commit is contained in:
@@ -17,6 +17,7 @@ use Apoloz\AlfaBank\Data\NominalAccounts\Beneficiaries\BeneficiaryTransactionCol
|
||||
use Saloon\Enums\Method;
|
||||
use Saloon\Http\Request;
|
||||
use Saloon\Http\Response;
|
||||
|
||||
// </SECTION>
|
||||
|
||||
// <SECTION name="class_definition" intent="Define the request for fetching beneficiary transactions.">
|
||||
@@ -47,6 +48,14 @@ class GetBeneficiaryTransactionsRequest extends Request
|
||||
}
|
||||
// </SECTION>
|
||||
|
||||
// <SECTION name="create_dto_from_response" intent="Transform the API response into a `BeneficiaryTransactionCollectionData` DTO.">
|
||||
// <BELIEF_STATE "This method is responsible for taking the raw JSON response from the API and converting it into a type-safe `BeneficiaryTransactionCollectionData` object. This ensures that the data consumed by the application is structured, validated, and easy to work with, adhering to the principle of strong typing.">
|
||||
public function createDtoFromResponse(Response $response): BeneficiaryTransactionCollectionData
|
||||
{
|
||||
return BeneficiaryTransactionCollectionData::from($response->json());
|
||||
}
|
||||
// </SECTION>
|
||||
|
||||
// <SECTION name="default_query_parameters" intent="Define the default query parameters for the request.">
|
||||
// <BELIEF_STATE "This method specifies the query parameters (`dateFrom`, `dateTo`, `limit`, `offset`) that will be appended to the request URL. These parameters are crucial for filtering and paginating the transaction data, directly influencing the scope and volume of the API response.">
|
||||
protected function defaultQuery(): array
|
||||
@@ -59,13 +68,5 @@ class GetBeneficiaryTransactionsRequest extends Request
|
||||
];
|
||||
}
|
||||
// </SECTION>
|
||||
|
||||
// <SECTION name="create_dto_from_response" intent="Transform the API response into a `BeneficiaryTransactionCollectionData` DTO.">
|
||||
// <BELIEF_STATE "This method is responsible for taking the raw JSON response from the API and converting it into a type-safe `BeneficiaryTransactionCollectionData` object. This ensures that the data consumed by the application is structured, validated, and easy to work with, adhering to the principle of strong typing.">
|
||||
public function createDtoFromResponse(Response $response): BeneficiaryTransactionCollectionData
|
||||
{
|
||||
return BeneficiaryTransactionCollectionData::from($response->json());
|
||||
}
|
||||
// </SECTION>
|
||||
}
|
||||
// </SECTION>
|
||||
|
||||
Reference in New Issue
Block a user