Class RespondToInvitationRequest
- Namespace
- Cloudflare.NET.User.Models
- Assembly
- Cloudflare.NET.dll
Request to respond to an account invitation.
Use this to accept or reject a pending invitation. Once responded, the invitation status cannot be changed.
public record RespondToInvitationRequest : IEquatable<RespondToInvitationRequest>
- Inheritance
-
RespondToInvitationRequest
- Implements
- Inherited Members
Examples
// Accept an invitation
var acceptRequest = new RespondToInvitationRequest(MemberStatus.Accepted);
var result = await client.User.RespondToInvitationAsync(invitationId, acceptRequest);
// Reject an invitation
var rejectRequest = new RespondToInvitationRequest(MemberStatus.Rejected);
var result = await client.User.RespondToInvitationAsync(invitationId, rejectRequest);
Remarks
Accepting: Use Accepted to accept the invitation. This will add the user as a member of the account with the specified roles.
Rejecting: Use Rejected to decline the invitation. The user will not be added to the account.
Constructors
RespondToInvitationRequest(MemberStatus)
Request to respond to an account invitation.
Use this to accept or reject a pending invitation. Once responded, the invitation status cannot be changed.
public RespondToInvitationRequest(MemberStatus Status)
Parameters
StatusMemberStatusThe response status (accepted or rejected).
Examples
// Accept an invitation
var acceptRequest = new RespondToInvitationRequest(MemberStatus.Accepted);
var result = await client.User.RespondToInvitationAsync(invitationId, acceptRequest);
// Reject an invitation
var rejectRequest = new RespondToInvitationRequest(MemberStatus.Rejected);
var result = await client.User.RespondToInvitationAsync(invitationId, rejectRequest);
Remarks
Accepting: Use Accepted to accept the invitation. This will add the user as a member of the account with the specified roles.
Rejecting: Use Rejected to decline the invitation. The user will not be added to the account.
Properties
Status
The response status (accepted or rejected).
[JsonPropertyName("status")]
public MemberStatus Status { get; init; }