Class CreateZoneSubscriptionRequest
- Namespace
- Cloudflare.NET.Subscriptions.Models
- Assembly
- Cloudflare.NET.dll
Request to create a zone subscription (upgrade zone plan).
Use this to upgrade a zone from Free to a paid plan (Pro, Business, Enterprise). Creating subscriptions may incur charges.
public record CreateZoneSubscriptionRequest : IEquatable<CreateZoneSubscriptionRequest>
- Inheritance
-
CreateZoneSubscriptionRequest
- Implements
- Inherited Members
Examples
// Upgrade to Pro plan
var request = new CreateZoneSubscriptionRequest(
RatePlan: new RatePlanReference("pro"),
Frequency: SubscriptionFrequency.Monthly);
var subscription = await client.Subscriptions.CreateZoneSubscriptionAsync(zoneId, request);
Constructors
CreateZoneSubscriptionRequest(RatePlanReference, SubscriptionFrequency?, IReadOnlyList<SubscriptionComponentValue>?)
Request to create a zone subscription (upgrade zone plan).
Use this to upgrade a zone from Free to a paid plan (Pro, Business, Enterprise). Creating subscriptions may incur charges.
public CreateZoneSubscriptionRequest(RatePlanReference RatePlan, SubscriptionFrequency? Frequency = null, IReadOnlyList<SubscriptionComponentValue>? ComponentValues = null)
Parameters
RatePlanRatePlanReferenceReference to the rate plan for this subscription.
FrequencySubscriptionFrequency?Optional billing frequency (defaults to plan default).
ComponentValuesIReadOnlyList<SubscriptionComponentValue>Optional component values for configurable features.
Examples
// Upgrade to Pro plan
var request = new CreateZoneSubscriptionRequest(
RatePlan: new RatePlanReference("pro"),
Frequency: SubscriptionFrequency.Monthly);
var subscription = await client.Subscriptions.CreateZoneSubscriptionAsync(zoneId, request);
Properties
ComponentValues
Optional component values for configurable features.
[JsonPropertyName("component_values")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public IReadOnlyList<SubscriptionComponentValue>? ComponentValues { get; init; }
Property Value
Frequency
Optional billing frequency (defaults to plan default).
[JsonPropertyName("frequency")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public SubscriptionFrequency? Frequency { get; init; }
Property Value
RatePlan
Reference to the rate plan for this subscription.
[JsonPropertyName("rate_plan")]
public RatePlanReference RatePlan { get; init; }