#[Route(defaults: ['_routeScope' => ['api'], '_acl' => ['system.plugin_maintain']])]
#[Package('merchant-services')]
class ExtensionStoreLicensesController extends AbstractController
{ public function __construct(private readonly AbstractExtensionStoreLicensesService
$extensionStoreLicensesService) { } #[Route(path: '/api/license/cancel/{licenseId}', name: 'api.license.cancel', methods: ['DELETE'])]
public function cancelSubscription(int
$licenseId, Context
$context): JsonResponse
{ $this->extensionStoreLicensesService->
cancelSubscription($licenseId,
$context);
return new JsonResponse(null, Response::HTTP_NO_CONTENT
);
} #[Route(path: '/api/license/rate/{extensionId}', name: 'api.license.rate', methods: ['POST'])]
public function rateLicensedExtension(int
$extensionId, Request
$request, Context
$context): JsonResponse
{ $this->extensionStoreLicensesService->
rateLicensedExtension( ReviewStruct::
fromRequest($extensionId,
$request),
$context );