Class AccessItem

java.lang.Object
io.fliqa.client.interledger.model.AccessItem

public class AccessItem extends Object
Represents an access item that defines permissions for a specific resource type.

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 Details

    • accessType

      public AccessItemType 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

      public Set<AccessAction> 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

      public URI 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

      public Limits 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

      public AccessItem accessOutgoing(URI identifier, InterledgerAmount debitAmount)
      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 identifier
      debitAmount - the maximum amount that can be debited
      Returns:
      this AccessItem instance for method chaining