doAuthPostRequestRaw example

 {
        $this->connection = $connection;
        $this->storeClient = $storeClient;
        $this->unpackService = $unpackService;
    }

    /** * @return \Shopware\Components\HttpClient\Response */
    public function updateLicences(UpdateLicencesRequest $request)
    {
        $response = $this->storeClient->doAuthPostRequestRaw(
            $request->getToken(),
            '/licenseupgrades/simple',
            [
                'domain' => $request->getDomain(),
                'shopwareVersion' => $request->getShopwareVersion(),
                'locale' => $request->getLocale(),
            ]
        );

        return $response;
    }

    
'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;
    }
}
Home | Imprint | This part of the site doesn't use cookies.