code: private function findCustomer($mail)
      {
          $customerResult = $this->client->request('GET', 'accounts/contacts', [
              'contactEmail' => $mail,
          ]);
  
          if (empty($customerResult)) {
              return null;
          }
  
          $possibleCustomers = array_filter($customerResult, function ($entry) {
              return $entry['singleAccess'] !== '1';
          });
  
          if (empty($possibleCustomers)) {
              return null;
          }
  
          return array_shift($possibleCustomers);
      }
docs: @param string $mail
  
  @return null|array