Retrieves the plan with the given ID.
175771
public static Plan retrieve(String plan) throws StripeException {
    return retrieve(plan, (Map<String, Object>) null, (RequestOptions) null);
  }
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;
  }
1117505
def get(self, id):
        
        id = self.key_name(id)
        session_json = self.redis.get(id) or '{}'
        return json_loads(session_json)
642002
public <P extends ParaObject> P findById(String id) {
		MultivaluedMap<String, String> params = new MultivaluedHashMap<>();
		params.putSingle(Config._ID, id);
		List<P> list = getItems(find("id", params));
		return list.isEmpty() ? null : list.get(0);
	}
595223
def get(cls, id):
        '''
        
        '''
        client = cls._new_api_client()
        return client.make_request(cls, 'get', url_params={'id': id})
865521
public static Event retrieve(String id, RequestOptions options) throws StripeException {
    return retrieve(id, null, options);
  }
1036017
public T getDynamic(String id) {
        // by ID
        for (T t : data)
            if(t.getDescriptor().getId().equals(id))
                return t;

        // by position
        try {
            return data.get(Integer.parseInt(id));
        } catch (NumberFormatException e) {
            // fall through
        }

        return null;
    }
933907
def get(self, id):
        
        for obj in self.model.db:
            if obj["id"] == id:
                return self._cast_model(obj)

        return None
976635
def get(cls, id):
        

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

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

        _cache['Prefix'][id] = prefix
        return prefix
734346
public Point getPoint(String id) {
        for (Point point : points)
            if (id.equals(point.getId()))
                return point;
        return null;
    }
717214
public Optional<LinkedResource> getById(String id)
  {
    return Optional.fromNullable(resourcesById.get(id));
  }
824482
def find_by_id(cls, id):
        
        obj = cls.find_one(cls._id_spec(id))
        if not obj:
            raise NotFoundException(cls.collection, id)
        return obj
507130
def get_plan(self, plan_code):
        
        return self.client._get(self.url + 'plans/{}'.format(plan_code), headers=self.get_headers())
179389
def get_or_create(cls, **kwargs):
		

		try:
			return Plan.objects.get(id=kwargs["id"]), False
		except Plan.DoesNotExist:
			return cls.create(**kwargs), True
793596
private function _fetch_site_plan( $plan_id = false ) {
            $this->_logger->entrance();
            $api = $this->get_api_site_scope();

            if ( ! is_numeric( $plan_id ) ) {
                $plan_id = $this->_site->plan_id;
            }

            $plan = $api->get( "/plans/{$plan_id}.json", true );

            return ! isset( $plan->error ) ? new FS_Plugin_Plan( $plan ) : $plan;
        }
1112704
def get(self, id):
        
        cur = self.conn.cursor()
        cur.execute("SELECT value FROM WeRoBot WHERE id=%s LIMIT 1;", (id, ))
        session_json = cur.fetchone()
        if session_json is None:
            return {}
        return json_loads(session_json[0])
175461
def get_plan_id(kwargs=None, call=None):
    '''
    
    '''
    if call == 'action':
        raise SaltCloudException(
            'The show_instance action must be called with -f or --function.'
        )

    if kwargs is None:
        kwargs = {}

    label = kwargs.get('label', None)
    if label is None:
        raise SaltCloudException(
            'The get_plan_id function requires a \'label\'.'
        )

    label = _decode_linode_plan_label(label)

    return label