public function Address() { $customerId = "8"; $customer = $this->customerRepository->getById($customerId); $addresses = $customer->getAddresses(); $billingAddress = $customer->getDefaultBilling(); $shippingAddress = $customer->getDefaultShipping(); return $billingAddress; } In this code is only getting the id I want the address as a string.please help me.