mirror of
https://github.com/koel/koel
synced 2024-12-22 10:33:16 +00:00
34 lines
684 B
PHP
34 lines
684 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Http\Integrations\LemonSqueezy\Requests;
|
||
|
|
||
|
use Saloon\Contracts\Body\HasBody;
|
||
|
use Saloon\Enums\Method;
|
||
|
use Saloon\Http\Request;
|
||
|
use Saloon\Traits\Body\HasFormBody;
|
||
|
|
||
|
class ActivateLicenseRequest extends Request implements HasBody
|
||
|
{
|
||
|
use HasFormBody;
|
||
|
|
||
|
protected Method $method = Method::POST;
|
||
|
|
||
|
public function __construct(private string $key)
|
||
|
{
|
||
|
}
|
||
|
|
||
|
public function resolveEndpoint(): string
|
||
|
{
|
||
|
return '/licenses/activate';
|
||
|
}
|
||
|
|
||
|
/** @return array<mixed> */
|
||
|
protected function defaultBody(): array
|
||
|
{
|
||
|
return [
|
||
|
'license_key' => $this->key,
|
||
|
'instance_name' => 'Koel Plus',
|
||
|
];
|
||
|
}
|
||
|
}
|