31 lines
678 B
PHP
31 lines
678 B
PHP
<?php
|
|
|
|
namespace Apoloz\AlfaBank\Requests\Sandbox\Payments;
|
|
|
|
use Apoloz\AlfaBank\Data\Sandbox\Payments\CreateRubPaymentRequestData;
|
|
use Saloon\Contracts\Body\HasBody;
|
|
use Saloon\Enums\Method;
|
|
use Saloon\Http\Request;
|
|
use Saloon\Traits\Body\HasJsonBody;
|
|
|
|
class CreateRubPaymentRequest extends Request implements HasBody
|
|
{
|
|
use HasJsonBody;
|
|
|
|
protected Method $method = Method::POST;
|
|
|
|
public function __construct(
|
|
protected CreateRubPaymentRequestData $data
|
|
) {}
|
|
|
|
public function resolveEndpoint(): string
|
|
{
|
|
return '/api/jp/v2/payments';
|
|
}
|
|
|
|
protected function defaultBody(): array
|
|
{
|
|
return $this->data->toArray();
|
|
}
|
|
}
|