@param array|null $params

@return array An array of the customer's Charges.
345638
public function charges($params = null)
    {
        $params = $params ?: [];
        $params['customer'] = $this->id;
        $charges = Charge::all($params, $this->_opts);
        return $charges;
    }
616084
protected function evaluateParams($params)
    {
        foreach ($params as $name => $value)
        {
            if (is_callable($value))
                $params[$name] = $this->evaluateExpression($value, array('data' => $this->owner));
        }
        return $params;
    }
882711
public function create(array $params)
    {
        if (!array_key_exists('amount', $params) ||
            !array_key_exists('currency', $params) ||
            !array_key_exists('description', $params) ||
            !array_key_exists('order_id', $params) ||
            !array_key_exists('payment_options', $params) ||
            !array_key_exists('type', $params)
        ) {
            throw new \InvalidArgumentException('Invalid data provided.');
        }

        return $this->post('/orders', [], $params);
    }
761992
public function getQuery($queryParams)
    {
        return array_key_exists($queryParams, $this->query) ? $this->query[$queryParams] : null;
    }
206722
public function all(array $params = array())
    {
        $endpoint = '/admin/marketing_events.json';
        $response = $this->request($endpoint, 'GET', $params);
        return $this->createCollection(MarketingEvent::class, $response['marketing_events']);
    }
1157065
public function getTransactionData($params)
    {
        $supportedParams = [
            'AllPayLogisticsID' => '',
            'PlatformID' => '',
        ];

        $this->sdk->Send = array_merge($this->sdk->Send, $supportedParams);

        $this->sdk->Send = array_replace(
            $this->sdk->Send,
            array_intersect_key($params, $this->sdk->Send)
        );

        return $this->sdk->QueryLogisticsInfo();
    }
882932
public function findOneBy (array $params)
    {
        $entity = $this->er->findOneBy($params);

        if (NULL == $entity) {
            return NULL;
        }

        return $this->getModel($entity);
    }
607961
public function all(array $params = array())
    {
        $endpoint = '/admin/gift_cards.json';
        $response = $this->request($endpoint, 'GET', $params);
        return $this->createCollection(GiftCard::class, $response['gift_cards']);
    }
581368
public function all($chargeId = null, array $parameters = [])
    {
        if (! $chargeId) {
            return $this->_get('refunds', $parameters);
        }

        return $this->_get("charges/{$chargeId}/refunds", $parameters);
    }
865258
public function buildPaymentParameter($params = [])
    {
        $defaultParams = [
            'appid' => $this->appId,
            'mch_id' => $this->mchId,
            'nonce_str' => bin2hex(openssl_random_pseudo_bytes(8)),
            'notify_url' => $this->getNoticeUrl(),
            'device_info' => isset($this->deviceInfoMap[$params['trade_type']]) ? $this->deviceInfoMap[$params['trade_type']] : 'WEB',
        ];
        return array_merge($defaultParams, $params);
    }
398036
private function addDefaultParametersToRequest($params)
	{
		// check if merchantAccount is setup in client and request is missing merchantAccount then add it
		if (!isset($params['merchantAccount']) && $this->service->getClient()->getConfig()->getMerchantAccount()) {
			$params['merchantAccount'] = $this->service->getClient()->getConfig()->getMerchantAccount();
		}

		return $params;
	}
742542
public function pay(array $params)
    {
        $params['appid'] = $this->app['config']->app_id;

        return $this->request($this->wrap('pay/micropay'), $params);
    }
1341880
public function pay($params)
	{
		$requestParams = $this->initRequestParams('pay', $params);
		$this->request('pay', $requestParams);

		return empty($this->error);
	}
790959
protected static function getParams(array $arg_params)
    {
        $return = array();
        //validate params
        $data = array(
            'amount',
            'transaction_id',
            'customer_id',
            'security_token',
            'customer_ip'
        );
        foreach ($data as $key) {
            if(!empty($arg_params[$key])){
                $return[$key] = $arg_params[$key];
            }
        }

        return $return;
    }
895999
public function all(array $params = array())
    {
        $data = $this->request('/admin/checkouts.json', 'GET', $params);
        return $this->createCollection(AbandonedCheckout::class, $data['checkouts']);
    }
1061654
public function all(array $params = array())
    {
        $data = $this->request('/admin/application_credits.json', 'GET', $params);
        return $this->createCollection(ApplicationCredit::class, $data['application_credits']);
    }
1168862
public function info($params = [])
    {
        $params = array_merge($this->auth->getCredentials(), $params);

        return $this->client->get(self::ACTION_NAME, $params);
    }