Class ZoneRatePlan
- Namespace
- Cloudflare.NET.Subscriptions.Models
- Assembly
- Cloudflare.NET.dll
Represents an available rate plan for a zone.
Rate plans define the pricing and features available for zone subscriptions. Use ListAvailableRatePlansAsync(string, CancellationToken) to discover available plans.
public record ZoneRatePlan : IEquatable<ZoneRatePlan>
- Inheritance
-
ZoneRatePlan
- Implements
- Inherited Members
Examples
var plans = await client.Subscriptions.ListAvailableRatePlansAsync(zoneId);
foreach (var plan in plans)
{
Console.WriteLine($"{plan.Name}: {plan.Currency} {plan.Frequency}");
if (plan.Components != null)
{
foreach (var component in plan.Components)
{
Console.WriteLine($" - {component.Name}: {component.UnitPrice}/unit");
}
}
}
Constructors
ZoneRatePlan(string, string, string, int, SubscriptionFrequency, IReadOnlyList<RatePlanComponent>?)
Represents an available rate plan for a zone.
Rate plans define the pricing and features available for zone subscriptions. Use ListAvailableRatePlansAsync(string, CancellationToken) to discover available plans.
public ZoneRatePlan(string Id, string Name, string Currency, int Duration, SubscriptionFrequency Frequency, IReadOnlyList<RatePlanComponent>? Components = null)
Parameters
IdstringRate plan identifier (e.g., "free", "pro", "business", "enterprise").
NamestringHuman-readable plan name.
CurrencystringBilling currency.
DurationintSubscription duration in billing periods.
FrequencySubscriptionFrequencyBilling frequency (e.g., monthly, yearly).
ComponentsIReadOnlyList<RatePlanComponent>Plan components with pricing details.
Examples
var plans = await client.Subscriptions.ListAvailableRatePlansAsync(zoneId);
foreach (var plan in plans)
{
Console.WriteLine($"{plan.Name}: {plan.Currency} {plan.Frequency}");
if (plan.Components != null)
{
foreach (var component in plan.Components)
{
Console.WriteLine($" - {component.Name}: {component.UnitPrice}/unit");
}
}
}
Properties
Components
Plan components with pricing details.
[JsonPropertyName("components")]
public IReadOnlyList<RatePlanComponent>? Components { get; init; }
Property Value
Currency
Billing currency.
[JsonPropertyName("currency")]
public string Currency { get; init; }
Property Value
Duration
Subscription duration in billing periods.
[JsonPropertyName("duration")]
public int Duration { get; init; }
Property Value
Frequency
Billing frequency (e.g., monthly, yearly).
[JsonPropertyName("frequency")]
public SubscriptionFrequency Frequency { get; init; }
Property Value
Id
Rate plan identifier (e.g., "free", "pro", "business", "enterprise").
[JsonPropertyName("id")]
public string Id { get; init; }
Property Value
Name
Human-readable plan name.
[JsonPropertyName("name")]
public string Name { get; init; }