forked from apoloz/alfa-bank-sdk
fix(formating)
This commit is contained in:
@@ -40,6 +40,14 @@ class GetTransactionsRequest extends Request
|
||||
{
|
||||
return '/api/jp/v1/statement/transactions';
|
||||
}
|
||||
// </SECTION>
|
||||
|
||||
// <SECTION name="response_dto_caster" intent="Transform the raw API JSON response into a structured collection DTO.">
|
||||
// <BELIEF_STATE "The API returns a list of transactions. Casting this directly to a `TransactionCollectionData` DTO provides a type-safe, iterable object for the end-user, which is a significant improvement over dealing with raw arrays.">
|
||||
public function createDtoFromResponse(Response $response): TransactionCollectionData
|
||||
{
|
||||
return TransactionCollectionData::from($response->json());
|
||||
}
|
||||
|
||||
protected function defaultQuery(): array
|
||||
{
|
||||
@@ -50,12 +58,4 @@ class GetTransactionsRequest extends Request
|
||||
], $this->getPaginationQuery());
|
||||
}
|
||||
// </SECTION>
|
||||
|
||||
// <SECTION name="response_dto_caster" intent="Transform the raw API JSON response into a structured collection DTO.">
|
||||
// <BELIEF_STATE "The API returns a list of transactions. Casting this directly to a `TransactionCollectionData` DTO provides a type-safe, iterable object for the end-user, which is a significant improvement over dealing with raw arrays.">
|
||||
public function createDtoFromResponse(Response $response): TransactionCollectionData
|
||||
{
|
||||
return TransactionCollectionData::from($response->json());
|
||||
}
|
||||
// </SECTION>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user