@param array|null $params
@param array|string|null $opts

@return \Stripe\Collection of ApiResources
975268
public static function all($params = null, $opts = null)
    {
        self::_validateParams($params);
        $url = static::classUrl();

        list($response, $opts) = static::_staticRequest('get', $url, $params, $opts);
        $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
        if (!is_a($obj, 'Stripe\\Collection')) {
            $class = get_class($obj);
            $message = "Expected type \"Stripe\\Collection\", got \"$class\" instead";
            throw new \Stripe\Error\Api($message);
        }
        $obj->setLastResponse($response);
        $obj->setRequestParams($params);
        return $obj;
    }
29343
final protected function curlFilterOpts(array &$opts = array())
	{
		$keys = array_keys($opts);
		$values = array_values($opts);
		array_filter($keys, [$this, 'curlFilterOpt']);
		foreach (array_diff(array_keys($opts), $keys) as $key) {
			unset($values[array_search($key, array_keys($opts))]);
		}
		$opts = array_combine($keys, $values);
	}
1194760
public function rename($params, $optParams = [])
    {
        return $this->sendRequest(['cloudId', 'publicId', 'newPublicId'], [
            'restAction' => 'update',
            'uri' => '/c/<cloudId>/o/<publicId>/rename/o/<newPublicId>',
            'params' => $params,
            'getParams' => $optParams,
        ], function ($response) use ($params) {
            if ($response->data && !isset($response->data['cloudId'])) {
                $response->data['cloudId'] = $this->client->getParam($params, 'cloudId');
            }

            return isset($response->data) ? new Image($response->data) : $response;
        });
    }
729423
public function delete($params, $optParams = [])
    {
        if (is_string($params)) {
            $params = ['publicId' => $params];
        }

        return $this->sendRequest(['cloudId', 'publicId'], [
            'restAction' => 'delete',
            'uri' => '/c/<cloudId>/o/<publicId>',
            'params' => $params,
            'getParams' => $optParams,
        ], function ($response) {
            return $response->success;
        });
    }
1060019
public static function createExternalAccount($id, $params = null, $opts = null)
    {
        return self::_createNestedResource($id, static::PATH_EXTERNAL_ACCOUNTS, $params, $opts);
    }
430957
public static function getToken($params = null)
    {
        if (!$params) {
            $params = array();
        }
        $requestor = new ApiRequestor(Sumup::$connectBase, true);
        $params['client_id'] = self::_getConnectParam('client_id', $params);
        $params['client_secret'] = self::_getConnectParam('client_secret', $params);
        $response = $requestor->request('post', '/token', $params);

        if ($response->raw->getStatusCode() !== 200) {
            throw new Error\AuthenticationError('Token request error');
        }

        return new AccessToken($response);
    }
362603
public static function all($params, $opts = null)
    {
        $list = parent::all($params, $opts);
        $ntList = new NotificationCollection();
        $ntList->install($list->values, $list->opts);
        return $ntList;
    }
1120136
public function get($method, array $params, array $options = array())
    {
        $this->parseOptions($options);

        $params = array_merge($params, $this->apiKeys);

        $response = $this->httpAdapter->getContent(
            sprintf(self::API_ENDPOINT, $this->scheme, $this->outputFormat, $method .'?'. http_build_query($params)),
            $this->headers
        );

        return $this->responseHandler($response);
    }
61055
public static function createLoginLink($id, $params = null, $opts = null)
    {
        return self::_createNestedResource($id, static::PATH_LOGIN_LINKS, $params, $opts);
    }
1013100
public function invoiceItems($params = null)
    {
        $params = $params ?: [];
        $params['customer'] = $this->id;
        $iis = InvoiceItem::all($params, $this->_opts);
        return $iis;
    }
999987
public static function create($params = null, $options = null)
    {
        $opts = \Stripe\Util\RequestOptions::parse($options);
        if (is_null($opts->apiBase)) {
            $opts->apiBase = Stripe::$apiUploadBase;
        }
        // Manually flatten params, otherwise curl's multipart encoder will
        // choke on nested arrays.
        // TODO: use array_column() once we drop support for PHP 5.4
        $flatParams = [];
        foreach (\Stripe\Util\Util::flattenParams($params) as $pair) {
            $flatParams[$pair[0]] = $pair[1];
        }
        return static::_create($flatParams, $opts);
    }
969967
public function reset($optParams = array()) {
      $params = array();
      $params = array_merge($params, $optParams);
      $data = $this->__call('reset', array($params));
      return $data;
    }
1216429
public function delete($params, $optParams = [])
    {
        if ($params instanceof SuperBackup) {
            $params = $params->id;
        }
        if(!isset($optParams['cloud'])){
            $optParams['cloud'] = [];
        }
        $optParams['cloud']['id'] = $params;
        return $this->sendRequest([], [
            'restAction' => 'delete',
            'uri' => '/c/<cloud.id>',
            'restId' => $params,
            'getParams' => $optParams,
        ], function ($response) {
            return $response->success;
        });
    }
828378
protected function _extractOptionsForFetch(array $params) {
        if (!isset($params['options'])) {
            $params['options'] = array();
        }
        try {
            $options = is_string($params['options']) ?
                Zend_Json::decode(urldecode($params['options'])) :
                $params['options'];
        } catch (Zend_Json_Exception $e) {
            throw new Garp_Content_Api_Rest_Exception(
                sprintf(self::EXCEPTION_INVALID_JSON, $e->getMessage())
            );
        }

        $options = array_get_subset(
            $options,
            array(
                'sort', 'start', 'limit', 'fields', 'query', 'group', 'with'
            )
        );
        if (!isset($options['limit'])) {
            $options['limit'] = self::DEFAULT_PAGE_LIMIT;
        }
        if (isset($options['with'])) {
            // Normalize into an array
            $options['with'] = (array)$options['with'];
        }
        if (array_get($params, 'id')) {
            $options['query']['id'] = $params['id'];
        }
        return $options;
    }
1215436
public static function create($params = null, $options = null)
    {
        self::_validateParams($params);
        if (!array_key_exists('subscription_item', $params)) {
            throw new Error\InvalidRequest("Missing subscription_item param in request", null);
        }
        $subscription_item = $params['subscription_item'];
        $url = "/v1/subscription_items/$subscription_item/usage_records";
        $request_params = $params;
        unset($request_params['subscription_item']);

        list($response, $opts) = static::_staticRequest('post', $url, $request_params, $options);
        $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
        $obj->setLastResponse($response);
        return $obj;
    }
720754
protected static function _staticRequest($method, $url, $params, $options)
    {
        $opts = \Stripe\Util\RequestOptions::parse($options);
        $baseUrl = isset($opts->apiBase) ? $opts->apiBase : static::baseUrl();
        $requestor = new \Stripe\ApiRequestor($opts->apiKey, $baseUrl);
        list($response, $opts->apiKey) = $requestor->request($method, $url, $params, $opts->headers);
        $opts->discardNonPersistentHeaders();
        return [$response, $opts];
    }
210761
private static function getSelfUrlParams($requestParams, $paramsNew, $opts)
    {
        $params = $requestParams;
        $paramsQuery = Str::parse($_SERVER['QUERY_STRING']);    // params from QUERY_STRING
        // compare $_GET with QUERY_STRING & REQUEST_URI to see what's been added/removed/changed
        //  if a param has changed between QUERY_STRING & $_GET, it will be added as a default
        //  if in QUERY_STRING, but not in REQUEST_URI, it will NOT be added as a default
        $cor = array_diff_assoc($paramsQuery, $_GET);   // Changed Or Removed params
        $coa = array_diff_assoc($_GET, $paramsQuery);   // Changed Or Added params
        foreach ($cor as $k => $v) {
            if (!isset($coa[$k])) {
                unset($params[$k]); // it's a remove
            } elseif (isset($coa[$k]) && $coa[$k] != $v) {
                continue;   // $_GET[param] has changed in code
            } elseif (!isset($requestParams[$k])) {
                // $k is in QUERY_STRING, but not REQUEST_URI (mod_rewrite created)
                unset($coa[$k]);
            }
        }
        foreach ($coa as $k => $v) {
            $params[$k] = $v;       // it's a change or add
        }
        if (!empty($opts['getLock'])) {
            foreach ($opts['getLock'] as $k) {
                if (isset($params[$k])) {
                    $params[$k] = isset($requestParams[$k])
                        ? $requestParams[$k]    // use REQUEST_URI val
                        : null;                         // not in REQUEST_URI
                }
            }
        }
        if (!$opts['keepParams']) {
            // keep default params only if in getProp
            foreach ($params as $k => $v) {
                if (!in_array($k, $opts['getProp'])) {
                    unset($params[$k]);
                }
            }
        }
        foreach ($paramsNew as $k => $v) {
            $params[$k] = $v;
        }
        return $params;
    }