Retrieve a collection of Ontraport resources.

@param  array  $parameters
@return array
547920
public function get(array $parameters = array())
    {
        $response = $this->ontraport->get(
            $this->getNamespace(), $this->toArray($parameters)
        );

        return $this->ontraport->collection($this, $response);
    }
1255869
public static function listAllCancelOperationsAsync(array $parameters = [])
    {
        return self::listAllCancelOperationsAsyncWithHttpInfo($page, $size, $sort)
            ->then(
                function ($response) {
                    return $response[0];
                }
            );
    }
599427
protected function collectRenderingObstacles($parameters, $requirements = true)
    {
        if ( ! is_array($parameters)) {
            return ['Parameters should be an array'];
        }
        if (true === $requirements) {
            $requirements = $this->getRequiredParameters();
        }
        $obstacles = [];
        foreach ($requirements as $requiredParameterName) {
            if (empty($parameters[$requiredParameterName])) {
                $obstacles[] = "Parameter '".$requiredParameterName."' is required";
            }
        }
        return $obstacles;
    }
794982
protected static function getRequestData($parameters)
    {
        //work with objects
        if (!is_object($parameters) && is_array($parameters)) {
            $parameters = (object) $parameters;
        }

        //Require data
        Request::requireParameters($parameters, ['data']);

        return $parameters->data;
    }
1291403
private function makeParameters(array $parameters): array
    {
        return array_map(function (ReflectionParameter $parameter) {
            $class = $parameter->getClass();

            if ($class instanceof ReflectionClass) {
                return $this->make($class->getName());
            }

            if ($parameter->isDefaultValueAvailable()) {
                return $parameter->getDefaultValue();
            }

            return null;
        }, $parameters);
    }
536227
private function parametersToData(array $parameters)
    {
        $data = array();

        foreach ($parameters as $parameter) {
            $data[$parameter->getName()] = $this->parameterToData($parameter);
        }

        return (object) $data;
    }
329491
public function getBusinessesSearchResults($parameters = [])
    {
        $csvParams = ['attributes', 'categories', 'price'];

        $path = $this->appendParametersToUrl('/v3/businesses/search', $parameters, $csvParams);
        $request = $this->getRequest('GET', $path, $this->getDefaultHeaders());

        return $this->processRequest($request);
    }
1260326
public function getObjects(array $parameters = array())
    {
        $objects = array();

        foreach ($this->getObjectsInfo($parameters) as $record) {
            $objects[] = new Object($this, null, false, $record);
        }

        return $objects;
    }
475209
public function loadModuleByParameters(array $parameters)
    {
        if (!isset($parameters['module'])) {
            throw new \InvalidArgumentException('The routing provider expected parameter "module" but could not find it.');
        }

        if ($parameters['module'] instanceof ModuleInterface) {
            return $parameters['module'];
        }

        $identity = $parameters['module'];

        // Get the related module
        $module = $this->manager->findModuleByIdentity($identity);

        if (!$module instanceof ModuleInterface) {
            throw new ResourceNotFoundException(sprintf('Module with identity "%s" does not exist.', $identity));
        }

        return $module;
    }
1282380
public static function listAllPaymentSourcesAsync(array $parameters = [])
    {
        return self::listAllPaymentSourcesAsyncWithHttpInfo($page, $size, $sort)
            ->then(
                function ($response) {
                    return $response[0];
                }
            );
    }
782128
public function getAll($params = [])
    {
        $result = $this->connection()->get($this->getEndpoint(), $params, true);

        return $this->collectionFromResult($result);
    }
1180473
public static function listAllFreeShippingPromotionsAsync(array $parameters = [])
    {
        return self::listAllFreeShippingPromotionsAsyncWithHttpInfo($page, $size, $sort)
            ->then(
                function ($response) {
                    return $response[0];
                }
            );
    }
61410
private function castObjectsAsArrays(array $parameters)
    {
        foreach ($parameters as $key => $value) {
            if (is_object($value)) {
                $value = (array) $value;
                $parameters[$key] = $value;
            }
            if (is_array($value)) {
                $parameters[$key] = $this->castObjectsAsArrays($value);
            }
        }
        return $parameters;
    }
1093322
public function getRoutesFor($menuId, array $parameters = array())
    {
        $routes = array();
        $routeCollection = $this->container->get('router')->getRouteCollection();

        foreach ($routeCollection->all() as $routeKey => $route) {
            if ($route->hasOption('menus')) {
                if (array_key_exists($menuId, $route->getOption('menus'))) {
                    $route = $route->getOption('menus')[$menuId];

                    $route['key'] = $routeKey;

                    $order = $this->resolveOrder($routes, $route['order']);
                    //we do not want to duplicate order information
                    unset($route['order']);
                    $routes[$order] = $route;
                }
            }
        }

        ksort($routes);

        return $routes;
    }
1271239
public function getItems($parameters)
    {
        $parameters['action'] = 'get_items';

        $response = $this->sendRequest($parameters);

        // check and reorganize the data of the SMA response
        $data = $response->getData();
        if (!isset($data['items']) || !is_array($data['items'])) {
            throw new ShopgateLibraryException(
                ShopgateLibraryException::MERCHANT_API_INVALID_RESPONSE,
                '"items" is not set or not an array. Response: ' . var_export($data, true)
            );
        }

        $items = array();
        foreach ($data['items'] as $item) {
            $items[] = new ShopgateItem($item);
        }

        // put the reorganized data into the response object and return ist
        $response->setData($items);

        return $response;
    }
18040
protected function getConnectionAndTable($parameters)
    {
        $parts = explode('.', $this->getParameter($parameters, 0));

        $connection = isset($parts[1])
            ? $parts[0]
            : Config::get('database.default');

        $table = $parts[1] ?? $parts[0];

        return [$connection, $table];
    }
926791
public function search($parameters = [])
    {
        $parameters = array_merge([
            'term' => $this->defaultTerm,
            'location' => $this->defaultLocation,
            'limit' => $this->searchLimit
        ], $parameters);

        $path = $this->appendParametersToUrl('/v2/search', $parameters);
        $request = $this->getRequest('GET', $path);

        return $this->processRequest($request);
    }