Class AccessItem
An access item combines a resource type with a set of allowed actions to create specific access permissions. Access items are used in access grants to define what operations a client is authorized to perform on different types of payment resources.
The access item can optionally include limits to constrain the scope of operations and specific identifiers to restrict access to particular resources.
- Since:
- 1.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe type of resource this access item applies to.The set of actions that are permitted for this resource type.Optional identifier that restricts access to a specific resource.Optional limits that constrain the scope of operations. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccessOutgoing(URI identifier, InterledgerAmount debitAmount) Configures this access item for outgoing payment operations.
-
Field Details
-
accessType
The type of resource this access item applies to.Specifies whether this access item grants permissions for incoming payments, outgoing payments, or quotes. The resource type determines what kind of operations can be performed.
-
actions
The set of actions that are permitted for this resource type.Defines the specific operations that can be performed on the resource type. Actions can include create, read, complete, list, and others depending on the resource type and use case.
Actions are serialized in a consistent order to ensure deterministic JSON output.
-
identifier
Optional identifier that restricts access to a specific resource.When specified, this access item only applies to the resource identified by this URI. This is commonly used for outgoing payments where access should be limited to a specific payment resource.
This field is required for outgoing payment access items and optional for other resource types.
-
limits
Optional limits that constrain the scope of operations.Defines limits such as maximum amounts, specific receivers, or time intervals that apply to operations performed using this access item. Limits provide additional security and control over payment operations.
-
-
Constructor Details
-
AccessItem
public AccessItem()
-
-
Method Details
-
accessOutgoing
Configures this access item for outgoing payment operations.This convenience method sets up the access item with the specified identifier and debit amount limit for outgoing payment operations. It creates a new Limits object and configures it with the provided debit amount.
- Parameters:
identifier- the specific outgoing payment resource identifierdebitAmount- the maximum amount that can be debited- Returns:
- this AccessItem instance for method chaining
-