diff --git a/doc/swagger.yml b/doc/swagger.yml index 55c025b4f..f04e98ef9 100644 --- a/doc/swagger.yml +++ b/doc/swagger.yml @@ -1547,6 +1547,19 @@ definitions: email: type: "string" example: "sherlock@holmes.com" + birthday: + type: "string" + example: "2017-08-12" + gender: + type: "string" + example: "m" + phoneNumber: + type: "string" + example: "+490000000000" + subscribedToNewsletter: + type: "integer" + example: 0 + LoggedInCustomerAddressBook: type: "array" items: diff --git a/src/Controller/Customer/LoggedInCustomerDetailsAction.php b/src/Controller/Customer/LoggedInCustomerDetailsAction.php index 521f19efb..d52c86844 100644 --- a/src/Controller/Customer/LoggedInCustomerDetailsAction.php +++ b/src/Controller/Customer/LoggedInCustomerDetailsAction.php @@ -39,6 +39,10 @@ public function __invoke(Request $request): Response 'firstName' => $customer->getFirstName(), 'lastName' => $customer->getLastName(), 'email' => $customer->getEmail(), + 'gender' => $customer->getGender(), + 'birthday' => $customer->getBirthday(), + 'phoneNumber' => $customer->getPhoneNumber(), + 'subscribedToNewsletter' => $customer->isSubscribedToNewsletter(), ], Response::HTTP_OK)); } } diff --git a/tests/Responses/Expected/customer/logged_in_customer_details_response.json b/tests/Responses/Expected/customer/logged_in_customer_details_response.json index 9e3e74acf..59b6f3612 100644 --- a/tests/Responses/Expected/customer/logged_in_customer_details_response.json +++ b/tests/Responses/Expected/customer/logged_in_customer_details_response.json @@ -1,5 +1,8 @@ { "firstName": "Oliver", "lastName": "Queen", - "email": "oliver@queen.com" + "email": "oliver@queen.com", + "gender": "m", + "phoneNumber": "0212115512", + "subscribedToNewsletter": false }