Contribution
A sponsorship (GitHub) or order (Open Collective) to one of the configured targets.
On this page
A sponsorship (GitHub) or order (Open Collective) to one of the configured targets.
namespace Sponsorkit;
public sealed class ContributionConstructors#
| Member | Description |
|---|---|
Contribution() | Creates an instance with every property at its default; set the properties with an object initializer. |
Contribution()#
public Contribution()Creates an instance with every property at its default; set the properties with an object initializer.
Properties#
| Member | Description |
|---|---|
Id | Stable id derived from the provider and the provider's external id. |
Provider | The provider (see Providers). |
Target | The target string, for example github:octocat. |
Sponsor | Who pays. |
Via | direct or organization. |
Kind | recurring or one_time (see ContributionKinds). |
Frequency | See Frequencies. |
Status | See ContributionStatuses. |
Amount | The amount per charge, in minor units. |
Tier | The provider tier, when known. |
Flags | Flags such as via_patreon. |
IsPrivate | Whether the provider marks the contribution private or incognito. |
StartedAt | When the contribution started. |
EndedAt | When the contribution ended, if it has. |
LastChargedAt | Open Collective only: the last charge. |
NextChargeAt | Open Collective only: the next charge. |
TotalContributed | Open Collective only: the total contributed so far. |
IsActive | true when Status is active. |
Id#
public string Id { get; set; } = "";Stable id derived from the provider and the provider's external id.
Type: string · Default: "" · JSON: id
Provider#
public string Provider { get; set; } = "";The provider (see Providers).
Type: string · Default: "" · JSON: provider
Target#
public string Target { get; set; } = "";The target string, for example github:octocat.
Type: string · Default: "" · JSON: target
Sponsor#
public SponsorEntity Sponsor { get; set; } = new();Who pays.
Type: SponsorEntity · Default: new() · JSON: sponsor
Via#
public string Via { get; set; } = "";direct or organization.
Type: string · Default: "" · JSON: via
Kind#
public string Kind { get; set; } = "";recurring or one_time (see ContributionKinds).
Type: string · Default: "" · JSON: kind
Frequency#
public string Frequency { get; set; } = "";See Frequencies.
Type: string · Default: "" · JSON: frequency
Status#
public string Status { get; set; } = "";See ContributionStatuses.
Type: string · Default: "" · JSON: status
Amount#
public Money Amount { get; set; } = new();The amount per charge, in minor units.
Type: Money · Default: new() · JSON: amount
Tier#
public Tier? Tier { get; set; }The provider tier, when known.
Type: Tier? · JSON: tier
Flags#
public IReadOnlyList<string> Flags { get; set; } = Array.Empty<string>();Flags such as via_patreon.
Type: IReadOnlyList<string> · Default: Array.Empty<string>() · JSON: flags
IsPrivate#
public bool IsPrivate { get; set; }Whether the provider marks the contribution private or incognito.
Type: bool · JSON: private
StartedAt#
public DateTimeOffset? StartedAt { get; set; }When the contribution started.
Type: DateTimeOffset? · JSON: startedAt
EndedAt#
public DateTimeOffset? EndedAt { get; set; }When the contribution ended, if it has.
Type: DateTimeOffset? · JSON: endedAt
LastChargedAt#
public DateTimeOffset? LastChargedAt { get; set; }Open Collective only: the last charge.
Type: DateTimeOffset? · JSON: lastChargedAt
NextChargeAt#
public DateTimeOffset? NextChargeAt { get; set; }Open Collective only: the next charge.
Type: DateTimeOffset? · JSON: nextChargeAt
TotalContributed#
public Money? TotalContributed { get; set; }Open Collective only: the total contributed so far.
Type: Money? · JSON: totalContributed
IsActive#
public bool IsActive { get; }true when Status is active.
Type: bool · Not serialized