SponsorEntity
Who pays: the signed-in user or an organization they belong to.
Class in sponsorkit.models.
from sponsorkit import SponsorEntityAlso importable from sponsorkit.models.
@dataclass(frozen=True)
class SponsorEntity:
...Who pays: the signed-in user or an organization they belong to.
Constructor#
SponsorEntity(
type: Literal['user', 'organization'],
provider: Provider,
id: str,
handle: str | None,
) -> NoneInstances are immutable; every field below is a constructor parameter.
Fields#
type#
type: Literal['user', 'organization']user or organization.
provider#
provider: Providergithub or open-collective.
id#
id: strThe provider's id for the account.
handle#
handle: str | NoneThe provider login or slug, when known.
Methods#
from_dict()#
@classmethod
def from_dict(cls, d: Mapping[str, Any]) -> SponsorEntityParse the JSON form.
to_dict()#
def to_dict(self) -> dict[str, Any]The JSON form.