Skip to content

Commit 54d7470

Browse files
Merge pull request #5391 from magento-borg/MC-30925
Fixed Issues: - MC-30925: Customer group API update
2 parents d52efeb + c7ac740 commit 54d7470

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

app/code/Magento/Customer/etc/webapi.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@
141141
</resources>
142142
<data>
143143
<parameter name="customer.id" force="true">%customer_id%</parameter>
144+
<parameter name="customer.group_id" force="true">null</parameter>
144145
</data>
145146
</route>
146147
<route url="/V1/customers/me" method="GET" soapOperation="getSelf">

dev/tests/api-functional/testsuite/Magento/Customer/Api/AccountManagementMeTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
/**
1717
* Class AccountManagementMeTest
1818
*
19+
* Tests involving the customer modifying their user information via web API.
20+
*
1921
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2022
* @magentoApiDataFixture Magento/Customer/_files/customer.php
2123
* @magentoApiDataFixture Magento/Customer/_files/customer_two_addresses.php
@@ -144,13 +146,14 @@ public function testUpdateCustomer()
144146
{
145147
$customerData = $this->_getCustomerData($this->customerData[CustomerInterface::ID]);
146148
$lastName = $customerData->getLastname();
147-
149+
$groupID = $customerData->getGroupId();
148150
$updatedCustomerData = $this->dataObjectProcessor->buildOutputDataArray(
149151
$customerData,
150152
\Magento\Customer\Api\Data\CustomerInterface::class
151153
);
152154
$updatedCustomerData[CustomerInterface::LASTNAME] = $lastName . 'Updated';
153155
$updatedCustomerData[CustomerInterface::ID] = 25;
156+
$updatedCustomerData[CustomerInterface::GROUP_ID] = $groupID . 1;
154157

155158
$serviceInfo = [
156159
'rest' => [
@@ -172,6 +175,7 @@ public function testUpdateCustomer()
172175

173176
$customerData = $this->_getCustomerData($this->customerData[CustomerInterface::ID]);
174177
$this->assertEquals($lastName . "Updated", $customerData->getLastname());
178+
$this->assertEquals($groupID, $customerData->getGroupId());
175179
}
176180

177181
public function testGetCustomerData()

0 commit comments

Comments
 (0)