// use Apoloz\AlfaBank\Data\Statement\TransactionCollectionData; use Apoloz\AlfaBank\Traits\HasAlfaPagination; use Saloon\Enums\Method; use Saloon\Http\Request; use Saloon\Http\Response; class GetTransactionsRequest extends Request { use HasAlfaPagination; protected Method $method = Method::GET; public function __construct( protected string $accountNumber, protected string $statementDate, ?int $limit = 1000, ?int $offset = 0 ) { $this->limit = $limit; $this->offset = $offset; } public function resolveEndpoint(): string { return '/api/jp/v1/statement/transactions'; } // //
// public function createDtoFromResponse(Response $response): TransactionCollectionData { return TransactionCollectionData::from($response->json()); } protected function defaultQuery(): array { return array_merge([ 'accountNumber' => $this->accountNumber, 'statementDate' => $this->statementDate, ], $this->getPaginationQuery()); } //
}