lib/Api/Customer.php
public function getCustomerByEmail(string $customerEmail): array
    {
        $customers = $this->getListCustomersByEmail($customerEmail);

        if (count($customers) === 0) {
            throw new \LogicException(sprintf('customer with email %s not found', $customerEmail));
        }

        return $this->getCustomerById($customers[0]['customer_id']);
    }
public function getCustomerByEmail(string $customerEmail): array
    {
        $customers = $this->getListCustomersByEmail($customerEmail);

        if (count($customers) === 0) {
            throw new \LogicException(sprintf('customer with email %s not found', $customerEmail));
        }

        return $this->getCustomerById($customers[0]['customer_id']);
    }
@param string $customerEmail

@return array