diff --git a/src/ResourceGroup/CustomerInteraction.php b/src/ResourceGroup/CustomerInteraction.php index 7629570..871feb1 100644 --- a/src/ResourceGroup/CustomerInteraction.php +++ b/src/ResourceGroup/CustomerInteraction.php @@ -68,8 +68,8 @@ class CustomerInteraction extends AbstractApiResourceGroup * } * ``` * - * @param string|int $site * @param \RetailCrm\Api\Model\Request\CustomerInteraction\CustomerInteractionCartClearRequest $request + * @param string|int $site * * @return \RetailCrm\Api\Model\Response\SuccessResponse * @throws \RetailCrm\Api\Interfaces\ApiExceptionInterface @@ -82,7 +82,7 @@ class CustomerInteraction extends AbstractApiResourceGroup * @throws \RetailCrm\Api\Exception\Client\HandlerException * @throws \RetailCrm\Api\Exception\Client\HttpClientException */ - public function cartClear($site, CustomerInteractionCartClearRequest $request): SuccessResponse + public function cartClear(CustomerInteractionCartClearRequest $request, $site): SuccessResponse { /** @var SuccessResponse $response */ $response = $this->sendRequest( @@ -144,8 +144,8 @@ class CustomerInteraction extends AbstractApiResourceGroup * } * ``` * - * @param string|int $site * @param \RetailCrm\Api\Model\Request\CustomerInteraction\CustomerInteractionCartSetRequest $request + * @param string|int $site * * @return \RetailCrm\Api\Model\Response\SuccessResponse * @throws \RetailCrm\Api\Interfaces\ApiExceptionInterface @@ -158,7 +158,7 @@ class CustomerInteraction extends AbstractApiResourceGroup * @throws \RetailCrm\Api\Exception\Client\HandlerException * @throws \RetailCrm\Api\Exception\Client\HttpClientException */ - public function cartSet($site, CustomerInteractionCartSetRequest $request): SuccessResponse + public function cartSet(CustomerInteractionCartSetRequest $request, $site): SuccessResponse { /** @var SuccessResponse $response */ $response = $this->sendRequest( diff --git a/tests/src/ResourceGroup/CustomerInteractionTest.php b/tests/src/ResourceGroup/CustomerInteractionTest.php index ada4a06..69193cd 100644 --- a/tests/src/ResourceGroup/CustomerInteractionTest.php +++ b/tests/src/ResourceGroup/CustomerInteractionTest.php @@ -39,12 +39,13 @@ EOF; $mock = static::createApiMockBuilder('customer-interaction/testSite/cart/clear'); $mock->matchMethod(RequestMethod::POST) + ->matchPath('/api/v5/customer-interaction/testSite/cart/clear') ->matchBody(static::encodeForm($request)) ->reply(200) ->withBody($json); $client = TestClientFactory::createClient($mock->getClient()); - $response = $client->customerInteraction->cartClear('testSite', $request); + $response = $client->customerInteraction->cartClear($request, 'testSite'); self::assertModelEqualsToResponse($json, $response); } @@ -76,12 +77,13 @@ EOF; $mock = static::createApiMockBuilder('customer-interaction/testSite/cart/set'); $mock->matchMethod(RequestMethod::POST) + ->matchPath('/api/v5/customer-interaction/testSite/cart/set') ->matchBody(static::encodeForm($request)) ->reply(200) ->withBody($json); $client = TestClientFactory::createClient($mock->getClient()); - $response = $client->customerInteraction->cartSet('testSite', $request); + $response = $client->customerInteraction->cartSet($request, 'testSite'); self::assertModelEqualsToResponse($json, $response); } @@ -123,6 +125,7 @@ EOF; $mock = static::createApiMockBuilder('customer-interaction/testSite/cart/4770'); $mock->matchMethod(RequestMethod::GET) + ->matchPath('/api/v5/customer-interaction/testSite/cart/4770') ->matchQuery(static::encodeFormArray($request)) ->reply(200) ->withBody($json);