Class UpdateUserSubscriptionRequest
- Namespace
- Cloudflare.NET.Subscriptions.Models
- Assembly
- Cloudflare.NET.dll
Request to update an existing user subscription.
Updates may affect billing. Only specified fields will be changed; null fields are left unchanged.
public record UpdateUserSubscriptionRequest : IEquatable<UpdateUserSubscriptionRequest>
- Inheritance
-
UpdateUserSubscriptionRequest
- Implements
- Inherited Members
Examples
// Update to yearly billing
var request = new UpdateUserSubscriptionRequest(
Frequency: SubscriptionFrequency.Yearly);
var updated = await client.Subscriptions.UpdateUserSubscriptionAsync(
subscriptionId, request);
Constructors
UpdateUserSubscriptionRequest(SubscriptionFrequency?, RatePlanReference?, IReadOnlyList<SubscriptionComponentValue>?)
Request to update an existing user subscription.
Updates may affect billing. Only specified fields will be changed; null fields are left unchanged.
public UpdateUserSubscriptionRequest(SubscriptionFrequency? Frequency = null, RatePlanReference? RatePlan = null, IReadOnlyList<SubscriptionComponentValue>? ComponentValues = null)
Parameters
FrequencySubscriptionFrequency?Optional new billing frequency.
RatePlanRatePlanReferenceOptional new rate plan reference.
ComponentValuesIReadOnlyList<SubscriptionComponentValue>Optional new component values.
Examples
// Update to yearly billing
var request = new UpdateUserSubscriptionRequest(
Frequency: SubscriptionFrequency.Yearly);
var updated = await client.Subscriptions.UpdateUserSubscriptionAsync(
subscriptionId, request);
Properties
ComponentValues
Optional new component values.
[JsonPropertyName("component_values")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public IReadOnlyList<SubscriptionComponentValue>? ComponentValues { get; init; }
Property Value
Frequency
Optional new billing frequency.
[JsonPropertyName("frequency")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public SubscriptionFrequency? Frequency { get; init; }
Property Value
RatePlan
Optional new rate plan reference.
[JsonPropertyName("rate_plan")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public RatePlanReference? RatePlan { get; init; }