first commit
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace Gemini\AlfaBank\Requests\NominalAccounts\Identification;
|
||||
|
||||
use Gemini\AlfaBank\Data\NominalAccounts\Identification\UnidentifiedTransactionCollectionData;
|
||||
use Saloon\Enums\Method;
|
||||
use Saloon\Http\Request;
|
||||
use Saloon\Http\Response;
|
||||
|
||||
class GetUnidentifiedTransactionsRequest extends Request
|
||||
{
|
||||
protected Method $method = Method::GET;
|
||||
|
||||
public function __construct(
|
||||
protected string $accountNumber,
|
||||
protected ?int $limit = null,
|
||||
protected ?int $offset = null,
|
||||
) {}
|
||||
|
||||
public function resolveEndpoint(): string
|
||||
{
|
||||
return '/api/na/jp/v1/unidentified-transactions';
|
||||
}
|
||||
|
||||
protected function defaultQuery(): array
|
||||
{
|
||||
return array_filter([
|
||||
'accountNumber' => $this->accountNumber,
|
||||
'limit' => $this->limit,
|
||||
'offset' => $this->offset,
|
||||
]);
|
||||
}
|
||||
|
||||
public function createDtoFromResponse(Response $response): UnidentifiedTransactionCollectionData
|
||||
{
|
||||
return UnidentifiedTransactionCollectionData::from($response->json());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user