/** * @param UpdateLicencesRequest $request * @return array */ public function updateLicences(UpdateLicencesRequest $request) { $response = $this->storeClient->doAuthPostRequestRaw($request->getToken(), '/licenseupgrades/simple', ['domain' => $request->getDomain(), 'shopwareVersion' => $request->getShopwareVersion(), 'locale' => $request->getLocale()]); return $response; }
/** * @param AccessTokenStruct $accessToken * @param OrderRequest $context * @throws \Exception * @return bool */ public function orderPlugin(AccessTokenStruct $accessToken, OrderRequest $context) { $data = ['origin' => ['name' => 'Shopware Backend'], 'shopwareId' => $accessToken->getShopwareId(), 'positions' => [['licenseShopDomain' => $context->getLicenceShop(), 'bookingShopDomain' => $context->getBookingShop(), 'orderNumber' => $context->getOrderNumber(), 'isArticle' => true, 'priceModel' => ['type' => $context->getPriceType(), 'price' => $context->getPrice()]]]]; $response = $this->storeClient->doAuthPostRequestRaw($accessToken, '/orders', $data); return $response->getStatusCode() == 204; }