Table of Contents

Class UpdateAccountSubscriptionRequest

Namespace
Cloudflare.NET.Subscriptions.Models
Assembly
Cloudflare.NET.dll

Request to update an existing account subscription.

Updates may affect billing. Only specified fields will be changed; null fields are left unchanged.

public record UpdateAccountSubscriptionRequest : IEquatable<UpdateAccountSubscriptionRequest>
Inheritance
UpdateAccountSubscriptionRequest
Implements
Inherited Members

Examples

// Update to yearly billing
var request = new UpdateAccountSubscriptionRequest(
  Frequency: SubscriptionFrequency.Yearly);

var updated = await client.Subscriptions.UpdateAccountSubscriptionAsync(
  accountId, subscriptionId, request);

Constructors

UpdateAccountSubscriptionRequest(RatePlanReference?, SubscriptionFrequency?, IReadOnlyList<SubscriptionComponentValue>?)

Request to update an existing account subscription.

Updates may affect billing. Only specified fields will be changed; null fields are left unchanged.

public UpdateAccountSubscriptionRequest(RatePlanReference? RatePlan = null, SubscriptionFrequency? Frequency = null, IReadOnlyList<SubscriptionComponentValue>? ComponentValues = null)

Parameters

RatePlan RatePlanReference

Optional new rate plan reference.

Frequency SubscriptionFrequency?

Optional new billing frequency.

ComponentValues IReadOnlyList<SubscriptionComponentValue>

Optional new component values.

Examples

// Update to yearly billing
var request = new UpdateAccountSubscriptionRequest(
  Frequency: SubscriptionFrequency.Yearly);

var updated = await client.Subscriptions.UpdateAccountSubscriptionAsync(
  accountId, 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