@param string|null $id The ID of the transfer to which the reversal belongs.
@param array|null $reversalId The ID of the reversal to retrieve.
@param array|null $params
@param array|string|null $opts

@return TransferReversal
503980
public static function retrieveReversal($id, $reversalId, $params = null, $opts = null)
    {
        return self::_retrieveNestedResource($id, static::PATH_REVERSALS, $reversalId, $params, $opts);
    }
465880
public static function all(array $ids = [], $reverse = false): array
    {
        $all = array_values(self::getReflection()->getConstants());

        if (!$ids) {
            $ids = $all;
        } else {
            $ids = $reverse ? array_diff($all, $ids) : $ids;
        }

        return array_map(function (int $id) {
            return new static($id);
        }, $ids);
    }
636430
public static function cancel($id, $params = null, $options = null)
    {
        $url = static::classUrl().'/'.$id;
        if (empty($params)) {
            $params = ['status' => 'canceled'];
        } else {
            $params = array_merge($params, ['status' => 'canceled']);
        }
        return static::_directRequest('put', $url, $params, $options);
    }
323060
public function transChoice($id, $number, array $parameters = array(), $domain = 'messages', $locale = null)
	{
		return $this->choice($id, $number, $parameters, $locale);
	}
1193834
public static function allTaxIds($id, $params = null, $opts = null)
    {
        return self::_allNestedResources($id, static::PATH_TAX_IDS, $params, $opts);
    }
529982
public function get($changeId, $optParams = array()) {
      $params = array('changeId' => $changeId);
      $params = array_merge($params, $optParams);
      $data = $this->__call('get', array($params));
      if ($this->useObjects()) {
        return new Change($data);
      } else {
        return $data;
      }
    }
203132
public static function retrieveRefund($id, $refundId, $params = null, $opts = null)
    {
        return self::_retrieveNestedResource($id, static::PATH_REFUNDS, $refundId, $params, $opts);
    }
567663
public static function retrieveTaxId($id, $taxIdId, $params = null, $opts = null)
    {
        return self::_retrieveNestedResource($id, static::PATH_TAX_IDS, $taxIdId, $params, $opts);
    }
214496
public static function retrieve($user_id, $settle_account_id, $params = null, $options = null)
    {
        $url = static::instanceUrlWithSettleAccountId($user_id, $settle_account_id);
        return static::_directRequest('get', $url, $params, $options);
    }
1163829
public static function batchCreateCoupons($id, $params = null, $options = null)
    {
        $url = static::classUrl() . '/' . $id . '/coupons';
        return static::_directRequest('post', $url, $params, $options);
    }
973562
public static function token($params = null, $opts = null)
    {
        $base = ($opts && array_key_exists('connect_base', $opts)) ? $opts['connect_base'] : Stripe::$connectBase;
        $requestor = new ApiRequestor(null, $base);
        list($response, $apiKey) = $requestor->request(
            'post',
            '/oauth/token',
            $params,
            null
        );
        return Util\Util::convertToStripeObject($response->json, $opts);
    }
280270
public function getByIds($entityType, array $ids, array $params = [])
    {
        $validIds = array_values(array_unique(array_filter($ids, [__CLASS__, 'isIdValid'])));

        if (count($validIds) === 0) {
            return [];
        }

        $doSortByIds = empty($params['sort']);
        $results = $this->search($entityType, ['_id' => ['$in' => $validIds]], $params);
        if (!$doSortByIds) {
            return $results;
        }

        $flipped = array_flip($validIds);
        foreach ($results as $result) {
            $flipped[$result['_id']] = $result;
        }
        return array_filter(array_values($flipped), function ($result) {
            return is_array($result) && count($result) > 0;
        });

    }
344032
public function reverseTransform($id)
    {
        if (!$id) {
            return null;
        }
        if($this->sinDigito) {
            $id=trim(substr($id,0,-1));
        }
        $id=intval($id);
        $object = $this->om
            ->getRepository($this->objectClass)
            ->find($id);

        if (null === $object) {
            throw new TransformationFailedException(sprintf(
                'Object class %s con id "%s" no existe!',
                $this->objectClass, $id
            ));
        }

        return $object;
    }
1336979
public static function cancel($order_id, $params = null, $opts = null)
    {
        $url = static::instanceUrlWithId($order_id);
        if (empty($params)) {
            $params = ['status' => 'canceled'];
        } else {
            $params = array_merge($params, ['status' => 'canceled']);
        }
        return static::_directRequest('put', $url, $params, $opts);
    }
1161811
@Override
  public TransferReversal update(Map<String, Object> params, RequestOptions options)
      throws StripeException {
    String url;
    if (this.getTransfer() != null) {
      url =
          String.format(
              "%s%s",
              Stripe.getApiBase(),
              String.format(
                  "/v1/transfers/%s/reversals/%s",
                  ApiResource.urlEncodeId(this.getTransfer()),
                  ApiResource.urlEncodeId(this.getId())));
    } else {
      throw new InvalidRequestException(
          "Unable to construct url because [transfer] field(s) are all null",
          null,
          null,
          null,
          0,
          null);
    }
    return request(ApiResource.RequestMethod.POST, url, params, TransferReversal.class, options);
  }
529190
public function insert($itemId, $optParams = array())
  {
    $params = array('itemId' => $itemId);
    $params = array_merge($params, $optParams);
    return $this->call('insert', array($params), "Mirror_Attachment");
  }
543810
public static function delete($id, $options = [])
    {
        $url = static::classUrl() . '/' . $id;
        return static::_directRequest('delete', $url, null, $options);
    }