Skip to content

Commit 2699ed7

Browse files
committed
GLUE-10957 AA review fixes.
1 parent b3088d0 commit 2699ed7

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/Spryker/Glue/CustomersRestApi/Processor/Activator/CustomerActivator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ public function confirmCustomer(RestRequestInterface $restRequest): RestResponse
4747
/** @var \Generated\Shared\Transfer\RestCustomerConfirmationAttributesTransfer $restCustomerConfirmationAttributesTransfer */
4848
$restCustomerConfirmationAttributesTransfer = $restRequest->getResource()->getAttributes();
4949

50-
if (!$restCustomerConfirmationAttributesTransfer->getConfirmationCode()) {
50+
if (!$restCustomerConfirmationAttributesTransfer->getRegistrationKey()) {
5151
return $this->customerRestResponseBuilder->createCustomerConfirmationCodeMissingErrorResponse();
5252
}
5353

5454
$customerTransfer = (new CustomerTransfer())
55-
->setRegistrationKey($restCustomerConfirmationAttributesTransfer->getConfirmationCode());
55+
->setRegistrationKey($restCustomerConfirmationAttributesTransfer->getRegistrationKey());
5656

5757
$customerResponseTransfer = $this->customerClient->confirmCustomerRegistration($customerTransfer);
5858

src/Spryker/Glue/CustomersRestApi/Processor/RestResponseBuilder/CustomerRestResponseBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public function createCustomerConfirmationErrorResponse(ArrayObject $customerErr
8787
$restResponse = $this->mapCustomerErrorsToRestResponse($customerErrorTransfers, $restResponse);
8888

8989
if (!count($restResponse->getErrors())) {
90-
$this->addDefaultCustomerConfirmationError($restResponse);
90+
$this->addCustomerConfirmationFailedError($restResponse);
9191
}
9292

9393
return $restResponse;
@@ -111,7 +111,7 @@ public function createCustomerConfirmationCodeMissingErrorResponse(): RestRespon
111111
*
112112
* @return \Spryker\Glue\GlueApplication\Rest\JsonApi\RestResponseInterface
113113
*/
114-
protected function addDefaultCustomerConfirmationError(RestResponseInterface $restResponse): RestResponseInterface
114+
protected function addCustomerConfirmationFailedError(RestResponseInterface $restResponse): RestResponseInterface
115115
{
116116
$restErrorMessageTransfer = (new RestErrorMessageTransfer())
117117
->setCode(CustomersRestApiConfig::RESPONSE_CODE_CONFIRMATION_FAILED)

src/Spryker/Glue/CustomersRestApi/Validation/customers.validation.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,5 +212,5 @@ customer-restore-password:
212212

213213
customer-confirmation:
214214
post:
215-
confirmationCode:
215+
registrationKey:
216216
- NotBlank

src/Spryker/Shared/CustomersRestApi/Transfer/customers_rest_api.transfer.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
</transfer>
6363

6464
<transfer name="RestCustomerConfirmationAttributes">
65-
<property name="confirmationCode" type="string" restRequestParameter="required"/>
65+
<property name="registrationKey" type="string" restRequestParameter="required"/>
6666
</transfer>
6767

6868
<transfer name="Address">

0 commit comments

Comments
 (0)