Table of Contents

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

Id string

Rate plan identifier (e.g., "free", "pro", "business", "enterprise").

Name string

Human-readable plan name.

Currency string

Billing currency.

Duration int

Subscription duration in billing periods.

Frequency SubscriptionFrequency

Billing frequency (e.g., monthly, yearly).

Components IReadOnlyList<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

IReadOnlyList<RatePlanComponent>

Currency

Billing currency.

[JsonPropertyName("currency")]
public string Currency { get; init; }

Property Value

string

Duration

Subscription duration in billing periods.

[JsonPropertyName("duration")]
public int Duration { get; init; }

Property Value

int

Frequency

Billing frequency (e.g., monthly, yearly).

[JsonPropertyName("frequency")]
public SubscriptionFrequency Frequency { get; init; }

Property Value

SubscriptionFrequency

Id

Rate plan identifier (e.g., "free", "pro", "business", "enterprise").

[JsonPropertyName("id")]
public string Id { get; init; }

Property Value

string

Name

Human-readable plan name.

[JsonPropertyName("name")]
public string Name { get; init; }

Property Value

string