first commit
This commit is contained in:
30
src/Requests/Sandbox/Payments/CreateRubPaymentRequest.php
Normal file
30
src/Requests/Sandbox/Payments/CreateRubPaymentRequest.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace Gemini\AlfaBank\Requests\Sandbox\Payments;
|
||||
|
||||
use Gemini\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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user