Interface IAccountAccessResource
- Namespace
- Mailtrap.AccountAccesses
- Assembly
- Mailtrap.Abstractions.dll
Represents account access resource.
public interface IAccountAccessResource : IRestResource
- Inherited Members
Methods
Delete(CancellationToken)
Removes account access, represented by the current resource instance.
Task<DeleteAccountAccessResponse> Delete(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenToken to control operation cancellation.
Returns
- Task<DeleteAccountAccessResponse>
Deleted account access details.
Remarks
If specifier type is User, it removes user permissions.
If specifier type is Invite or ApiToken, it removes specifier along with permissions.
You have to be an account admin/owner for this endpoint to work.
After deletion of the account access, represented by the current resource instance, it will be no longer available.
Thus any further operations on it will result in an error.
UpdatePermissions(UpdatePermissionsRequest, CancellationToken)
Manages user or token permissions for the account access, represented by the current resource instance.
Task<UpdatePermissionsResponse> UpdatePermissions(UpdatePermissionsRequest request, CancellationToken cancellationToken = default)
Parameters
requestUpdatePermissionsRequestPermission details for update.
cancellationTokenCancellationTokenToken to control operation cancellation.
Returns
- Task<UpdatePermissionsResponse>
Operation result details.
Remarks
This operation performs an upsert.
If you send a combination of resource_type and resource_id that already exists, the permission is updated.
Otherwise, if the combination doesn't exist, the permission is created.