Retrieves the dispute with the given ID.
320082
public static Dispute retrieve(String dispute) throws StripeException {
    return retrieve(dispute, (Map<String, Object>) null, (RequestOptions) null);
  }
965458
def assert_valid_id(id):
    
    if id is None:
        return
    if not ID_PATTERN.match(id.strip('/')):
        raise ValueError(
            'invalid id (allowed: lowercase letters, digits, hyphen, ".", ".."): %r' % id)
    return id
22118
def get_record(cls, id_, with_deleted=False):
        
        with db.session.no_autoflush:
            query = RecordMetadata.query.filter_by(id=id_)
            if not with_deleted:
                query = query.filter(RecordMetadata.json != None)  # noqa
            obj = query.one()
            return cls(obj.json, model=obj)
1020368
def status(self, id):
        
        id = self.__unpack_id(id)
        url = '/api/v1/statuses/{0}'.format(str(id))
        return self.__api_request('GET', url)
200238
def update_dispute(self, idempotency_key=None, **params):
        """"""
        url = self.instance_url() + '/dispute'
        headers = populate_headers(idempotency_key)
        d = self.request('post', url, params, headers)
        d.addCallback(lambda response: self.refresh_from(
            {'dispute': response}, api_key, True))
        return d.addCallback(lambda _: self.dispute)
594407
public static synchronized boolean denyID(String id) {
		boolean rv = false;
		if(deniedID==null) {
			deniedID = new HashMap<String,Counter>();
			deniedID.put(id, new Counter(id)); // Noted duplicated for minimum time spent
			rv = true;
		} else if(deniedID.get(id)==null) {
			deniedID.put(id, new Counter(id));
			rv = true;
		}
		if(rv) {
			writeID();
		}
		return rv;

	}
493555
def get_by_id(self, id):
        """"""
        with contextlib.closing(self.database.cursor()) as cursor:
            cursor.execute('SELECT id, name FROM users WHERE id=?', (id,))
            return cursor.fetchone()
1140860
def get(self, id):
        
        url = self._url('%s' % (id))
        return self.client.get(url)
654100
def _get_id(self, id_, pkg_name):
        
        collection = JSONClientValidated('id',
                                         collection=pkg_name + 'Ids',
                                         runtime=self._runtime)
        try:
            result = collection.find_one({'aliasIds': {'$in': [str(id_)]}})
        except errors.NotFound:
            return id_
        else:
            return Id(result['_id'])
1156467
def getRequest(self, id_):
        
        for request in self.requests:
            if request.id == id_:
                return request

        raise LookupError("Request %r not found" % (id_,))
1174243
def get_by_id(id)
      accts = @accounts.select {|acct| acct.uuid == id }

      if accts.size == 0
        raise KeyError, "account with id #{id} unknown"
      elsif accts.size > 1
        logger.warn "multiple accounts with same UUID found", uuid: id
      end

      accts[0]
    end
52456
public TResult queryForId(long id) {
		String where = getPkWhere(id);
		String[] whereArgs = getPkWhereArgs(id);
		TResult result = userDb.query(getTableName(), table.getColumnNames(),
				where, whereArgs, null, null, null);
		prepareResult(result);
		return result;
	}
1317953
def delete(self, id):
        
        try:
            response = yield self.client.delete(id)

            if response.get("n") > 0:
                self.write({"message": "Deleted %s object: %s" % (self.object_name, id) })
                return

            self.raise_error(404, "Resource not found")

        except InvalidId as ex:
            self.raise_error(400, message="Your ID is malformed: %s" % id)
        except:
            self.raise_error()

        self.finish()
1071423
def find(id)
      raise ArgumentError.new("Missing id/slug") unless id

      result = access_token.get("#{API_BASE}#{self.class::API_PATH}#{id}")
      raise ServiceError.new(result.code, result.body) unless result.code == "200"

      self.class::ITEM_CLASS.new(result.body)
    end
1330990
def get(cls, id):
        

        # cached?
        if CACHE:
            if id in _cache['VRF']:
                log.debug('cache hit for VRF %d' % id)
                return _cache['VRF'][id]
            log.debug('cache miss for VRF %d' % id)

        try:
            vrf = VRF.list({ 'id': id })[0]
        except IndexError:
            raise NipapNonExistentError('no VRF with ID ' + str(id) + ' found')

        _cache['VRF'][id] = vrf
        return vrf
1178605
def get_issues_event(self, id):
        
        assert isinstance(id, (int, long)), id
        headers, data = self._requester.requestJsonAndCheck(
            "GET",
            self.url + "/issues/events/" + str(id),
            headers={'Accept': Consts.mediaTypeLockReasonPreview}
        )
        return github.IssueEvent.IssueEvent(self._requester, headers, data, completed=True)
735148
@SuppressWarnings({"TypeParameterUnusedInFormals", "unchecked"})
  private <T> T fetch(final String id) {
    checkNotNull(id);
    checkArgument(!id.isEmpty());
    final T ret = (T) idMap.get(id);
    if (ret == null) {
      throw new EREException(String.format("Lookup failed for id %s.", id));
    }
    return ret;
  }