List hosted accounts associated with this AdSense account by ad client id.
(accounts.listAccounts)

@param string $filterAdClientId Ad clients to list accounts for.
@param array $optParams Optional parameters.
@return AdSenseHost_Accounts
490779
public function listAccounts($filterAdClientId, $optParams = array())
  {
    $params = array('filterAdClientId' => $filterAdClientId);
    $params = array_merge($params, $optParams);
    return $this->call('list', array($params), "AdSenseHost_Accounts");
  }
703927
public function listAccountsContainers($accountId, $optParams = array())
  {
    $params = array('accountId' => $accountId);
    $params = array_merge($params, $optParams);
    return $this->call('list', array($params), "Google_Service_TagManager_ListContainersResponse");
  }
220455
public function listAccountsContainersTags($accountId, $containerId, $optParams = array())
  {
    $params = array('accountId' => $accountId, 'containerId' => $containerId);
    $params = array_merge($params, $optParams);
    return $this->call('list', array($params), "TagManager_ListTagsResponse");
  }
886239
public function authorize(array $devices, string $productId, int $opType = 0)
    {
        $params = [
            'device_num' => count($devices),
            'device_list' => $devices,
            'op_type' => $opType,
            'product_id' => $productId,
        ];

        return $this->httpPostJson('device/authorize_device', $params);
    }
570804
public function view($params, $optParams = [])
    {
        if (!$params instanceof AccessToken) {
            throw new InvalidParamException(AccessToken::class . ' is required!');
        }
        $class = get_class($params);

        return $this->sendRequest([], [
            'restAction' => 'view',
            'restId' => $params->id,
            'getParams' => $optParams,
        ], function ($response) use ($class) {
            return isset($response->data) ? new $class($response->data) : $response;
        });
    }
898804
public function insert(AdExchangeBuyer_ClientAccessCapabilities $postBody, $optParams = array())
  {
    $params = array('postBody' => $postBody);
    $params = array_merge($params, $optParams);
    return $this->call('insert', array($params), "AdExchangeBuyer_ClientAccessCapabilities");
  }
1218281
public function listPostalCodes($profileId, $optParams = array())
  {
    $params = array('profileId' => $profileId);
    $params = array_merge($params, $optParams);
    return $this->call('list', array($params), "Dfareporting_PostalCodesListResponse");
  }
850294
private function applyFilters($filters = [], $returnCount = false)
    {
        $result = null;
        // Convert our filters into a query.
        if ($filters) {
            $alias = $this->getTableAlias();
            $query = $this->slaveQueryBuilder();
            if ($returnCount) {
                $query->select('COUNT(*)');
            } else {
                // Selecting only the id and contact_id for covering index benefits.
                $query->select($alias.'.id, '.$alias.'.contact_id');
                $query->setMaxResults(1);
            }
            $query->from(MAUTIC_TABLE_PREFIX.$this->getTableName(), $alias);

            foreach ($filters as $k => $set) {
                // Expect orx, anx, or neither.
                if (isset($set['orx'])) {
                    if (!empty($set['orx'])) {
                        $expr = $query->expr()->orX();
                    }
                    $properties = $set['orx'];
                } elseif (isset($set['andx'])) {
                    if (!empty($set['andx'])) {
                        $expr = $query->expr()->andX();
                    }
                    $properties = $set['andx'];
                } else {
                    if (!isset($expr)) {
                        $expr = $query->expr()->andX();
                    }
                    $properties = $set;
                }
                if (isset($expr) && !empty($properties)) {
                    foreach ($properties as $property => $value) {
                        if (is_array($value)) {
                            $expr->add(
                                $query->expr()->andX(
                                    $query->expr()->isNotNull($alias.'.'.$property),
                                    $query->expr()->in($alias.'.'.$property, $value)
                                )
                            );
                        } elseif (is_int($value) || is_string($value)) {
                            if (!empty($value)) {
                                $expr->add(
                                    $query->expr()->andX(
                                        $query->expr()->isNotNull($alias.'.'.$property),
                                        $query->expr()->eq($alias.'.'.$property, ':'.$property.$k)
                                    )
                                );
                            } else {
                                $expr->add(
                                    $query->expr()->eq($alias.'.'.$property, ':'.$property.$k)
                                );
                            }
                            if (in_array($property, ['category_id', 'contact_id', 'campaign_id', 'contactclient_id'])) {
                                // Explicit integers for faster queries.
                                $query->setParameter($property.$k, (int) $value, \PDO::PARAM_INT);
                            } else {
                                $query->setParameter($property.$k, $value);
                            }
                        }
                    }
                }
                if (isset($set['exclusive_expire_date'])) {
                    // Expiration/Exclusions will require an extra outer AND expression.
                    if (!isset($exprOuter)) {
                        $exprOuter  = $query->expr()->orX();
                        $expireDate = $set['exclusive_expire_date'];
                    }
                    if (isset($expr)) {
                        $exprOuter->add(
                            $query->expr()->orX($expr)
                        );
                    }
                } elseif (isset($set['contactclient_id']) && isset($set['date_added'])) {
                    $query->add(
                        'where',
                        $query->expr()->andX(
                            $query->expr()->eq($alias.'.contactclient_id', ':contactClientId'.$k),
                            $query->expr()->gte($alias.'.date_added', 'FROM_UNIXTIME(:dateAdded'.$k.')'),
                            (isset($expr) ? $expr : null)
                        )
                    );
                    $query->setParameter('contactClientId'.$k, (int) $set['contactclient_id'], \PDO::PARAM_INT);
                    $query->setParameter('dateAdded'.$k, $set['date_added']);
                }
            }
            // Expiration can always be applied globally.
            if (isset($exprOuter) && isset($expireDate)) {
                $query->add(
                    'where',
                    $query->expr()->andX(
                        $query->expr()->isNotNull($alias.'.exclusive_expire_date'),
                        $query->expr()->gte($alias.'.exclusive_expire_date', 'FROM_UNIXTIME(:exclusiveExpireDate)'),
                        $exprOuter
                    )
                );
                $query->setParameter('exclusiveExpireDate', $expireDate);
            }

            $result = $query->execute()->fetch();
            if ($returnCount) {
                $result = intval(reset($result));
            }
        }

        return $result;
    }
1200339
public function listThreatLists($optParams = array())
  {
    $params = array();
    $params = array_merge($params, $optParams);
    return $this->call('list', array($params), "Google_Service_Safebrowsing_ListThreatListsResponse");
  }
1095146
public function addFilters($position, $filters)
    {
        // oops, invalid position
        if (!in_array($position, array('pre', 'post'))) {
            throw new \InvalidArgumentException("Cannot add filters to '$position'. Use 'pre' or 'post'");
        }

        // single filter
        if (is_callable($filters)) {
            $filters = array($filters);
        }

        // determine accessor
        $var = $position. 'Filters';
        if (!$this->$var) {
            $this->$var = array();
        }

        // add all filters
        foreach ($filters as $num => $filter) {

            // callable, not clsure
            if (is_callable($filter) && is_array($filter)) { // && !($filter instanceof \Closure)) {
                $cb = $filter;
                $filter = function($in) use($cb) {
                    return call_user_func_array($cb, array($in));
                };
            }

            // from string (predefined filter)
            elseif (is_string($filter)) {
                $method = 'filter'. $filter;
                $df = $this instanceof \DataFilter\Profile ? $this : $this->dataFilter;
                $foundFilter = false;
                $args = $this instanceof \DataFilter\Profile
                    ? array(null, $this)               // data filter
                    : array($this, $this->dataFilter); // attribute
                foreach ($df->getPredefinedFilterClasses() as $className) {
                    if (is_callable($className, $method) && method_exists($className, $method)) {
                        $foundFilter = true;
                        $filter = call_user_func_array(array($className, $method), $args);
                        break;
                    }
                }
                if (!$foundFilter) {
                    $filterName = $this instanceof \DataFilter\Profile
                        ? 'global '. $position. '-filter'
                        : 'rule "'. $this->name. '", attrib "'. $this->attrib->getName(). '"'
                            . ' as '. $position. '-filter';
                    throw new \InvalidArgumentException(
                        'Could not use filter "'. $filter. '" for '. $filterName. ' because no '
                        . 'predefined filter class found implementing "'. $method. '()"'
                    );
                }
            }

            // oops, invalild filter
            if (!is_callable($filter)) {
                throw new \InvalidArgumentException(
                    "Filter '$num' for attribute '". $this->name. "' is not a callable!"
                );
            }
            // convert oldschool filter to closure
            if (!($filter instanceof \Closure)) {
                $args = $this instanceof \DataFilter\Profile
                    ? array(null, $this)               // data filter
                    : array($this, $this->dataFilter); // attribute
                $filter =  call_user_func_array($filter, $args);
            }

            // add filter
            array_push($this->$var, $filter);
        }
    }
570376
public function createAccountTicket(Analytics_AccountTicket $postBody, $optParams = array())
  {
    $params = array('postBody' => $postBody);
    $params = array_merge($params, $optParams);
    return $this->call('createAccountTicket', array($params), "Analytics_AccountTicket");
  }
324870
public function listUserProfiles($optParams = array()) {
      $params = array();
      $params = array_merge($params, $optParams);
      $data = $this->__call('list', array($params));
      if ($this->useObjects()) {
        return new UserProfileList($data);
      } else {
        return $data;
      }
    }
1205253
public function listMarketplacedeals($orderId, $optParams = array())
  {
    $params = array('orderId' => $orderId);
    $params = array_merge($params, $optParams);
    return $this->call('list', array($params), "Google_Service_AdExchangeBuyer_GetOrderDealsResponse");
  }
902497
public function listPermissions($fileId, $optParams = array())
  {
    $params = array('fileId' => $fileId);
    $params = array_merge($params, $optParams);
    return $this->call('list', array($params), "Drive_PermissionList");
  }
323710
public function listUsersAliases($userKey, $optParams = array()) {
      $params = array('userKey' => $userKey);
      $params = array_merge($params, $optParams);
      $data = $this->__call('list', array($params));
      if ($this->useObjects()) {
        return new Google_Aliases($data);
      } else {
        return $data;
      }
    }
753510
public function listDomains($customer, $optParams = array())
  {
    $params = array('customer' => $customer);
    $params = array_merge($params, $optParams);
    return $this->call('list', array($params), "Directory_Domains2");
  }
937108
public function listDirectDeals($optParams = array()) {
      $params = array();
      $params = array_merge($params, $optParams);
      $data = $this->__call('list', array($params));
      if ($this->useObjects()) {
        return new DirectDealsList($data);
      } else {
        return $data;
      }
    }