Package io.mailtrap.api.permissions
Class PermissionsImpl
java.lang.Object
io.mailtrap.api.apiresource.ApiResource
io.mailtrap.api.permissions.PermissionsImpl
- All Implemented Interfaces:
Permissions
-
Field Summary
Fields inherited from class io.mailtrap.api.apiresource.ApiResource
apiHost, httpClient, token -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetResources(long accountId) Get all resources in account (Inboxes, Projects, Domains, Billing and Account itself) to which the token has admin accessmanagePermissions(long accountAccessId, long accountId, ManagePermissionsRequest request) Manage user or token permissions.
-
Constructor Details
-
PermissionsImpl
-
-
Method Details
-
managePermissions
public ManagePermissionsResponse managePermissions(long accountAccessId, long accountId, ManagePermissionsRequest request) Description copied from interface:PermissionsManage 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:
managePermissionsin interfacePermissions- Parameters:
accountAccessId- unique account access IDaccountId- unique account IDrequest- request body- Returns:
- message about successful update of permissions
-
getResources
Description copied from interface:PermissionsGet all resources in account (Inboxes, Projects, Domains, Billing and Account itself) to which the token has admin access- Specified by:
getResourcesin interfacePermissions- Parameters:
accountId- unique account ID- Returns:
- the resources nested according to their hierarchy.
-