Table of Contents

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

Frequency SubscriptionFrequency?

Optional new billing frequency.

RatePlan RatePlanReference

Optional new rate plan reference.

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

IReadOnlyList<SubscriptionComponentValue>

Frequency

Optional new billing frequency.

[JsonPropertyName("frequency")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public SubscriptionFrequency? Frequency { get; init; }

Property Value

SubscriptionFrequency?

RatePlan

Optional new rate plan reference.

[JsonPropertyName("rate_plan")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public RatePlanReference? RatePlan { get; init; }

Property Value

RatePlanReference