Class RatePlan
- Namespace
- Cloudflare.NET.Subscriptions.Models
- Assembly
- Cloudflare.NET.dll
Represents a rate plan for a subscription.
Rate plans define the features and pricing for Cloudflare subscriptions. Each plan has a scope (account, zone, etc.) and may be externally managed.
public record RatePlan : IEquatable<RatePlan>
- Inheritance
-
RatePlan
- Implements
- Inherited Members
Examples
if (subscription.RatePlan is not null)
{
Console.WriteLine($"Plan: {subscription.RatePlan.PublicName}");
if (subscription.RatePlan.ExternallyManaged)
Console.WriteLine(" (Managed by partner)");
}
Constructors
RatePlan(string, string, string, string?, bool)
Represents a rate plan for a subscription.
Rate plans define the features and pricing for Cloudflare subscriptions. Each plan has a scope (account, zone, etc.) and may be externally managed.
public RatePlan(string Id, string PublicName, string Currency, string? Scope = null, bool ExternallyManaged = false)
Parameters
IdstringRate plan identifier (used when creating subscriptions).
PublicNamestringHuman-readable name of the rate plan.
CurrencystringCurrency code for pricing (e.g., "USD").
ScopestringScope of the rate plan (e.g., "account", "zone").
ExternallyManagedboolWhether the plan is managed outside of Cloudflare (e.g., through partners).
Examples
if (subscription.RatePlan is not null)
{
Console.WriteLine($"Plan: {subscription.RatePlan.PublicName}");
if (subscription.RatePlan.ExternallyManaged)
Console.WriteLine(" (Managed by partner)");
}
Properties
Currency
Currency code for pricing (e.g., "USD").
[JsonPropertyName("currency")]
public string Currency { get; init; }
Property Value
ExternallyManaged
Whether the plan is managed outside of Cloudflare (e.g., through partners).
[JsonPropertyName("externally_managed")]
public bool ExternallyManaged { get; init; }
Property Value
Id
Rate plan identifier (used when creating subscriptions).
[JsonPropertyName("id")]
public string Id { get; init; }
Property Value
PublicName
Human-readable name of the rate plan.
[JsonPropertyName("public_name")]
public string PublicName { get; init; }
Property Value
Scope
Scope of the rate plan (e.g., "account", "zone").
[JsonPropertyName("scope")]
public string? Scope { get; init; }