lib/Api/Customer.php
public function getListCustomersByEmail(string $customerEmail): array
    {
        $cacheKey = sprintf('zoho_customer_%s', md5($customerEmail));
        $hit = $this->getFromCache($cacheKey);

        if (false === $hit) {
            $response = $this->sendRequest('GET', sprintf('customers?email=%s', $customerEmail));

            $result = $this->processResponse($response);

            $customers = $result['customers'];

            $this->saveToCache($cacheKey, $customers);

            return $customers;
        }

        return $hit;
    }
public function getListCustomersByEmail(string $customerEmail): array
    {
        $cacheKey = sprintf('zoho_customer_%s', md5($customerEmail));
        $hit = $this->getFromCache($cacheKey);

        if (false === $hit) {
            $response = $this->sendRequest('GET', sprintf('customers?email=%s', $customerEmail));

            $result = $this->processResponse($response);

            $customers = $result['customers'];

            $this->saveToCache($cacheKey, $customers);

            return $customers;
        }

        return $hit;
    }
public function getListCustomersByEmail ( string $ customerEmail ) : array { $ cacheKey = sprintf ( 'zoho_customer_%s' , md5 ( $ customerEmail ) ) ; $ hit = $ this -> getFromCache ( $ cacheKey ) ; if ( false === $ hit ) { $ response = $ this -> sendRequest ( 'GET' , sprintf ( 'customers?email=%s' , $ customerEmail ) ) ; $ result = $ this -> processResponse ( $ response ) ; $ customers = $ result [ 'customers' ] ; $ this -> saveToCache ( $ cacheKey , $ customers ) ; return $ customers ; } return $ hit ; }
@param string $customerEmail

@return array
@param string $customerEmail