SponsorkitMock
Mock-mode data for SponsorkitOptions.Mock.
On this page
Mock-mode data for SponsorkitOptions.Mock.
namespace Sponsorkit;
public sealed class SponsorkitMockProperties#
| Member | Description |
|---|---|
PresetNames | The built-in preset names. |
PresetName | The preset name, or null for custom contributions. |
Contributions | Custom contributions, or null for a preset. |
PresetNames#
public static IReadOnlyList<string> PresetNames { get; } = new[] { "signed-out", "none", "active-monthly", "one-time", "cancelled", "org" };The built-in preset names.
Type: IReadOnlyList<string> · Default: new[] { "signed-out", "none", "active-monthly", "one-time", "cancelled", "org" }
PresetName#
public string? PresetName { get; }The preset name, or null for custom contributions.
Type: string?
Contributions#
public IReadOnlyList<Contribution>? Contributions { get; }Custom contributions, or null for a preset.
Type: IReadOnlyList<Contribution>? (Contribution)
Methods#
| Member | Description |
|---|---|
Preset(string) | A built-in preset: signed-out, none, active-monthly, one-time, cancelled or org. |
WithContributions(IEnumerable<Contribution>) | Signed in, with exactly these contributions. |
Preset(string)#
public static SponsorkitMock Preset(string name)A built-in preset: signed-out, none, active-monthly, one-time, cancelled or org.
Parameters
namestring: The preset name. Unknown names make the client constructor throwinvalid_config.
Returns SponsorkitMock
WithContributions(IEnumerable<Contribution>)#
public static SponsorkitMock WithContributions(IEnumerable<Contribution> contributions)Signed in, with exactly these contributions.
Parameters
contributionsIEnumerable<Contribution>(Contribution): The contributions to return.
Returns SponsorkitMock
Operators#
| Member | Description |
|---|---|
implicit operator SponsorkitMock(string) | Converts a preset name. |
implicit operator SponsorkitMock(string)#
public static implicit operator SponsorkitMock(string preset)Converts a preset name.
Parameters
presetstring: The preset name.
Returns SponsorkitMock