forked from apoloz/alfa-bank-sdk
28 lines
651 B
PHP
28 lines
651 B
PHP
<?php
|
|
|
|
namespace Apoloz\AlfaBank\Requests\NominalAccounts\Payouts;
|
|
|
|
use Apoloz\AlfaBank\Data\NominalAccounts\Payouts\DetailedPayoffData;
|
|
use Saloon\Enums\Method;
|
|
use Saloon\Http\Request;
|
|
use Saloon\Http\Response;
|
|
|
|
class GetPayoffRequest extends Request
|
|
{
|
|
protected Method $method = Method::GET;
|
|
|
|
public function __construct(
|
|
protected string $payoffId
|
|
) {}
|
|
|
|
public function resolveEndpoint(): string
|
|
{
|
|
return "/api/na/jp/v1/payoffs/{$this->payoffId}";
|
|
}
|
|
|
|
public function createDtoFromResponse(Response $response): DetailedPayoffData
|
|
{
|
|
return DetailedPayoffData::from($response->json());
|
|
}
|
|
}
|