@param string $id The ID of the charge.
@param array|string|null $options

@return Charge The reversed charge.
963024
public static function reverse($id, $options = null)
    {
        $url = static::classUrl().'/'.$id.'/reverse';
        $params = [];
        return static::_directRequest('post', $url, $params, $options);
    }
600648
protected function _find($id, $options = [])
    {
        $defaults = [
            'query'        => [],
            'fetchOptions' => []
        ];
        $options += $defaults;

        $fetchOptions = $options['fetchOptions'];
        unset($options['fetchOptions']);

        if ($this->link() !== static::LINK_KEY) {
            throw new ORMException("This relation is not based on a foreign key.");
        }
        $to = $this->to();
        $schema = $to::definition();

        if (!$id) {
            return $to::create([], ['type' => 'set']);
        }

        $ids = is_array($id) ? $id : [$id];
        $key = $schema->key();
        $column = $schema->column($key);

        foreach ($ids as $i => $value) {
            $ids[$i] = $schema->convert('cast', $column['type'], $value, $column);
        }

        if (count($ids) === 1) {
            $ids = reset($ids);
        }
        $conditions = [$this->keys('to') => $ids];
        if ($this->conditions()) {
            $conditions = [
                ':and()' => [
                    [$this->keys('to') => $ids],
                    $this->conditions()
                ]
            ];
        }
        $query = Set::extend($options['query'], ['conditions' => $conditions]);
        return $to::all($query, $fetchOptions);
    }
503857
public static function find($id = null, array $options = array())
	{
		$timestamp_end_name = static::temporal_property('end_column');
		$max_timestamp = static::temporal_property('max_timestamp');

		switch ($id)
		{
			case 'all':
			case 'first':
			case 'last':
				break;
			default:
				$id = (array) $id;
				$count = 0;
				foreach(static::getNonTimestampPks() as $key)
				{
					$options['where'][] = array($key, $id[$count]);

					$count++;
				}
				break;
		}

		$options['where'][] = array($timestamp_end_name, $max_timestamp);

		static::enable_id_only_primary_key();
		$result = parent::find($id, $options);
		static::disable_id_only_primary_key();

		return $result;
	}
581368
public function all($chargeId = null, array $parameters = [])
    {
        if (! $chargeId) {
            return $this->_get('refunds', $parameters);
        }

        return $this->_get("charges/{$chargeId}/refunds", $parameters);
    }
1223080
public static function update($id, $params = [], $options = [])
    {
        $url = static::classUrl() . '/' . $id;
        return static::_directRequest('put', $url, $params, $options);
    }
140681
protected function getPrestaShopValues($id, array $options)
    {
        $result = array();
        foreach ($options as $value => $label) {
            $result[] = array(
                'id' => $id . $value,
                'value' => $value,
                'label' => $label,
            );
        }
        return $result;
    }
279038
private function executeAction($id, array $options)
    {
        $action = $this->adapter->post(sprintf('%s/floating_ips/%s/actions', $this->endpoint, $id), $options);

        $action = json_decode($action);

        return new ActionEntity($action->action);
    }
84227
public function reverseCharge(string $idType, string $value)
    {
        if ($this->exists) {
            return $this->service->reverseCharge($idType ?? 'customerOrder', $value);
        }
        return false;
    }
544539
public function get_preference($id) {
        $request = array(
            "uri" => "/checkout/preferences/{$id}",
            "params" => array(
                "access_token" => $this->get_access_token()
            )
        );

        $preference_result = MPRestClient::get($request);
        return $preference_result;
    }
389697
public function getById($id, array $options = [])
    {
        $query = $this->createBaseBuilder($options);

        return $query->find($id);
    }
360809
public function create($chargeId, $amount = null, array $parameters = [])
    {
        $parameters = array_merge($parameters, array_filter(compact('amount')));

        return $this->_post("charges/{$chargeId}/refunds", $parameters);
    }
925952
private function getEnumById($id)
    {
        if (!$enum = SchemaStore::getEnumById($id, true)) {
            throw new \InvalidArgumentException(sprintf(
                'Cannot find an enum with id "%s"',
                $id
            ));
        }

        return $enum;
    }
323060
public function transChoice($id, $number, array $parameters = array(), $domain = 'messages', $locale = null)
	{
		return $this->choice($id, $number, $parameters, $locale);
	}
113913
public function childCount($id, array $options = [])
	{
		$options['for'] = $id;

		$query = $this->findChildren($this->_table->find(), $options);

		return $query->count();
	}
1023739
public static function retrieve($charge, $id, $opts = null)
    {
        $list = self::all(array('id' => $id), $opts);
        $nt = new Notification();
        $nt->install($list->data[0]->values, $list->opts);
        return $nt;
    }
116297
public function read($id, array $options = [], Closure $callback = null) {
        return $this->select()
            ->where($this->getPrimaryKey(), $id)
            ->bindCallback($callback)
            ->first($options);
    }
344792
public function getSeasonById($id, array $options = [])
    {
        $options['access_token'] = $this->blizzardClient->getAccessToken();

        return $this->request('/data/d3/season/'.(int) $id, $options);
    }