@param array $parameters

@return \Omnipay\InterKassa\Message\CompletePurchaseRequest|\Omnipay\InterKassa\Message\OldCompletePurchaseRequest
164941
public function completePurchase(array $parameters = [])
    {
        if ($this->isOldApi()) {
            $requestClass = OldCompletePurchaseRequest::class;
        } else {
            $requestClass = CompletePurchaseRequest::class;
        }

        return $this->createRequest($requestClass, $parameters);
    }
797247
public function paginatedList($parameters = [])
    {
        return $this->sendRequest(
            self::METHOD_GET,
            self::$endPoints['list'] . '?' . http_build_query($parameters)
        );
    }
327367
protected function _params_filter($parameters = array()){
    $params = array();
    foreach($parameters as $key => $val) {
        if ($key == "Signature" ||$val === "" || $val === NULL){
          continue;
        } else {
          $params[$key] = $parameters[$key];
        }
    }
    ksort($params);
    reset($params);
    return $params;
  }
514025
public function updateRefund($parameters = [])
    {
        $response = $this->client->put('transactions/refunds/' . $parameters['transaction_id'], [
            'json' => $parameters,
        ]);
        return json_decode($response->getBody())->refund;
    }
1354421
protected function processRequest(array $parameters = [])
    {
        if ($this->nextToken) {
            $parameters['starting_after'] = $this->nextToken;
        }

        if (isset($parameters[0])) {
            $id = $parameters[0];

            unset($parameters[0]);

            if (isset($parameters[1])) {
                $parameters = $parameters[1];

                unset($parameters[1]);
            }

            $parameters = [ $id, $parameters ];
        } else {
            $parameters = [ $parameters ];
        }

        $result = call_user_func_array([ $this->api, 'all' ], $parameters);

        $this->nextToken = $result['has_more'] ? end($result['data'])['id'] : false;

        return $result['data'];
    }
935312
protected function createSendmailTransport(array $parameters) {
        $transport = Swift_SendmailTransport::newInstance();
        $command = array_get($parameters, 'command');

        if ($command !== null) {
            $transport->setCommand($command);
        }

        return $transport;
    }
1090432
public function getAutocompleteResults($parameters = [])
    {
        $path = $this->appendParametersToUrl('/v3/autocomplete', $parameters);
        $request = $this->getRequest('GET', $path, $this->getDefaultHeaders());

        return $this->processRequest($request);
    }
181245
public function addParameters(array $parameters)
    {
        self::$global_parameters = array_merge(self::$global_parameters, $parameters);

        return self::getInstance();
    }
1010141
public static function listAllPaymentTransactionsAsync(array $parameters = [])
    {
        return self::listAllPaymentTransactionsAsyncWithHttpInfo($page, $size, $sort)
            ->then(
                function ($response) {
                    return $response[0];
                }
            );
    }
731861
public function add(array $parameters)
    {
        foreach ($parameters as $identifier => $value) {
            $this->set($identifier, $value, false);
        }

        return $this;
    }
290927
private function createRequestBody(array $parameters): array
    {
        $resources = [];
        foreach ($parameters as $key => $values) {
            if (!is_array($values)) {
                $values = [$values];
            }
            foreach ($values as $value) {
                $resources[] = [
                    'name' => $key,
                    'content' => $value,
                ];
            }
        }

        return $resources;
    }
1343770
public static function listAllStoreCreditTransactionsAsync(array $parameters = [])
    {
        return self::listAllStoreCreditTransactionsAsyncWithHttpInfo($page, $size, $sort)
            ->then(
                function ($response) {
                    return $response[0];
                }
            );
    }
370670
private function buildRequestParameters($parameters)
    {
        if (NULL === $parameters || empty($parameters)) {
            return null;
        }

        if (is_string($parameters)) {
            return $parameters;
        }

        $paramOut = '';
        foreach ($parameters as $key=>$value) {
            $paramOut .= $key.'=';
            if (is_array($value)){
                $paramOut .= join(',', $value);
            }else{
                $paramOut .= $value;
            }
            $paramOut .= '&';
        }

        return $paramOut;
    }
1323176
public function toUrlParams(array $parameters)
    {
        $buff = "";
        foreach ($parameters as $k => $v) {
            if ($k != "sign" && $v != "" && !is_array($v)) {
                $buff .= $k . "=" . $v . "&";
            }
        }

        $buff = trim($buff, "&");
        return $buff;
    }
802040
public function buildUrlWithParameters(array $parameters = [])
    {
        $url = $this->url;

        if (!$this->hasParameters() && !$parameters) {
            return $url;
        }

        foreach ($parameters as $key => $value) {
            $url = str_replace('{' . $key . '}', $value, $url);
        }
        return $url;
    }
1180473
public static function listAllFreeShippingPromotionsAsync(array $parameters = [])
    {
        return self::listAllFreeShippingPromotionsAsyncWithHttpInfo($page, $size, $sort)
            ->then(
                function ($response) {
                    return $response[0];
                }
            );
    }
450372
protected function processFilters($parameters)
    {
        if (isset($parameters['filter'])) {
            $filters = $parameters['filter'];
            unset($parameters['filter']);
            foreach ($filters as $filter => $value) {
                $parameters['filter[' . $filter . ']'] = $value;
            }
        }

        return $parameters;
    }