List refund transactions
https://developers.taxjar.com/api/?php#list-refund-transactions

@param array $parameters

@return object Refund collection.
760869
public function listRefunds($parameters = [])
    {
        $response = $this->client->get('transactions/refunds', [
            'query' => $parameters,
        ]);
        return json_decode($response->getBody())->refunds;
    }
683688
public static function listAllRefundTransactionsAsync(array $parameters = [])
    {
        return self::listAllRefundTransactionsAsyncWithHttpInfo($page, $size, $sort)
            ->then(
                function ($response) {
                    return $response[0];
                }
            );
    }
511096
public function refund($params)
	{
		$requestParams = $this->initRequestParams('refund', $params);
		$this->request('refund', $requestParams);

		return empty($this->error);
	}
29916
public static function listAllFixedRateShippingsAsync(array $parameters = [])
    {
        return self::listAllFixedRateShippingsAsyncWithHttpInfo($page, $size, $sort)
            ->then(
                function ($response) {
                    return $response[0];
                }
            );
    }
936012
public function getRefunds(CardPayments\Refund $refund = null, CardPayments\Filter $filter = null)
    {
        $queryStr = array();
        if($refund && $refund->merchantRefNum) {
            $queryStr['merchantRefNum'] = $refund->merchantRefNum;
        }
        if($filter) {
            if(isset($filter->limit)) {
                $queryStr['limit'] = $filter->limit;
            }
            if(isset($filter->offset)) {
                $queryStr['offset'] = $filter->offset;
            }
            if(isset($filter->startDate)) {
                $queryStr['startDate'] = $filter->startDate;
            }
            if(isset($filter->endDate)) {
                $queryStr['endDate'] = $filter->endDate;
            }
        }
        $request = new Request(array(
             'method' => Request::GET,
             'uri' => $this->prepareURI("/refunds"),
             'queryStr' => $queryStr
        ));

        $response = $this->client->processRequest($request);

        return new CardPayments\Pagerator($this->client, $response, '\Paysafe\CardPayments\Refund');
    }
1282380
public static function listAllPaymentSourcesAsync(array $parameters = [])
    {
        return self::listAllPaymentSourcesAsyncWithHttpInfo($page, $size, $sort)
            ->then(
                function ($response) {
                    return $response[0];
                }
            );
    }
797907
def list_refunds(self, params=None):
        """"""
        request = self._get('transactions/refunds', params)
        return self.responder(request)
279652
public function refund_payment($id) {
        $request = array(
            "uri" => "/v1/payments/{$id}/refunds",
            "params" => array(
                "access_token" => $this->get_access_token()
            )
        );

        $response = MPRestClient::post($request);
        return $response;
    }
82253
public function getCategories($parameters)
    {
        $parameters['action'] = 'get_categories';

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

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

        $categories = array();
        foreach ($data['categories'] as $category) {
            $categories[] = new ShopgateCategory($category);
        }

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

        return $response;
    }
1310951
public function getForId($paymentId, $refundId, array $parameters = [])
    {
        $this->parentId = $paymentId;

        return parent::rest_read($refundId, $parameters);
    }
389612
public static function listAllTaxRatesAsync(array $parameters = [])
    {
        return self::listAllTaxRatesAsyncWithHttpInfo($page, $size, $sort)
            ->then(
                function ($response) {
                    return $response[0];
                }
            );
    }
1128381
public function purchase(array $parameters = array())
    {
        /** @todo create customer before payment if none supplied */

        // schedule regular payment
        if (isset($parameters['frequency']) && $parameters['frequency'] !== 'once') {
            return $this->createRequest('\Omnipay\PaywayRest\Message\RegularPaymentRequest', $parameters);
        }

        // process once-off payment
        return $this->createRequest('\Omnipay\PaywayRest\Message\PurchaseRequest', $parameters);
    }
667480
public static function listAllRefundOperationsAsync(array $parameters = [])
    {
        return self::listAllRefundOperationsAsyncWithHttpInfo($page, $size, $sort)
            ->then(
                function ($response) {
                    return $response[0];
                }
            );
    }
38531
public function refund($amount = null)
    {
        return (new ManagementBuilder(TransactionType::REFUND))
            ->withPaymentMethod($this->transactionReference)
            ->withAmount($amount);
    }
1217726
public function refund($params = null, $opts = null)
    {
        $this->refunds->create($params, $opts);
        $this->refresh();
        return $this;
    }
414679
public static function listAllOptionsAsync(array $parameters = [])
    {
        return self::listAllOptionsAsyncWithHttpInfo($page, $size, $sort)
            ->then(
                function ($response) {
                    return $response[0];
                }
            );
    }
1252145
public static function listAllCategoriesAsync(array $parameters = [])
    {
        return self::listAllCategoriesAsyncWithHttpInfo($page, $size, $sort)
            ->then(
                function ($response) {
                    return $response[0];
                }
            );
    }