Table of Contents

Class UpdateMembershipRequest

Namespace
Cloudflare.NET.User.Models
Assembly
Cloudflare.NET.dll

Request to update a membership status (accept or reject invitation).

Use this to accept or reject a pending invitation. Once accepted, the user gains access to the account.

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

Examples

// Accept an invitation
var accept = new UpdateMembershipRequest(MemberStatus.Accepted);
await client.User.UpdateMembershipAsync(membershipId, accept);

// Reject an invitation
var reject = new UpdateMembershipRequest(MemberStatus.Rejected);
await client.User.UpdateMembershipAsync(membershipId, reject);

Remarks

Accepting: Use Accepted to accept the invitation. This grants the user access to the account with the assigned permissions.

Rejecting: Use Rejected to decline the invitation. The user will not be added to the account.

Constructors

UpdateMembershipRequest(MemberStatus)

Request to update a membership status (accept or reject invitation).

Use this to accept or reject a pending invitation. Once accepted, the user gains access to the account.

public UpdateMembershipRequest(MemberStatus Status)

Parameters

Status MemberStatus

New status for the membership. Use Accepted to accept an invitation or Rejected to decline.

Examples

// Accept an invitation
var accept = new UpdateMembershipRequest(MemberStatus.Accepted);
await client.User.UpdateMembershipAsync(membershipId, accept);

// Reject an invitation
var reject = new UpdateMembershipRequest(MemberStatus.Rejected);
await client.User.UpdateMembershipAsync(membershipId, reject);

Remarks

Accepting: Use Accepted to accept the invitation. This grants the user access to the account with the assigned permissions.

Rejecting: Use Rejected to decline the invitation. The user will not be added to the account.

Properties

Status

New status for the membership. Use Accepted to accept an invitation or Rejected to decline.

[JsonPropertyName("status")]
public MemberStatus Status { get; init; }

Property Value

MemberStatus