28 lines
728 B
PHP
28 lines
728 B
PHP
<?php
|
|
|
|
namespace Apoloz\AlfaBank\Requests\NominalAccounts\Beneficiaries;
|
|
|
|
use Apoloz\AlfaBank\Data\NominalAccounts\Beneficiaries\CreateBeneficiaryResponseData;
|
|
use Saloon\Enums\Method;
|
|
use Saloon\Http\Request;
|
|
use Saloon\Http\Response;
|
|
|
|
class ScoreBeneficiaryRequest extends Request
|
|
{
|
|
protected Method $method = Method::POST;
|
|
|
|
public function __construct(
|
|
protected string $beneficiaryId
|
|
) {}
|
|
|
|
public function resolveEndpoint(): string
|
|
{
|
|
return "/api/na/jp/v1/beneficiaries/{$this->beneficiaryId}/scoring";
|
|
}
|
|
|
|
public function createDtoFromResponse(Response $response): CreateBeneficiaryResponseData
|
|
{
|
|
return CreateBeneficiaryResponseData::from($response->json());
|
|
}
|
|
}
|