Class PermissionsImpl

java.lang.Object
io.mailtrap.api.apiresource.ApiResource
io.mailtrap.api.permissions.PermissionsImpl
All Implemented Interfaces:
Permissions

public class PermissionsImpl extends ApiResource implements Permissions
  • Constructor Details

  • Method Details

    • managePermissions

      public ManagePermissionsResponse managePermissions(long accountAccessId, long accountId, ManagePermissionsRequest request)
      Description copied from interface: Permissions
      Manage user or token permissions. If provided combination of resource_type and resource_id that already exists, the permission is updated. If the combination doesn't exist, the permission is created.
      Specified by:
      managePermissions in interface Permissions
      Parameters:
      accountAccessId - unique account access ID
      accountId - unique account ID
      request - request body
      Returns:
      message about successful update of permissions
    • getResources

      public List<Resource> getResources(long accountId)
      Description copied from interface: Permissions
      Get all resources in account (Inboxes, Projects, Domains, Billing and Account itself) to which the token has admin access
      Specified by:
      getResources in interface Permissions
      Parameters:
      accountId - unique account ID
      Returns:
      the resources nested according to their hierarchy.