Class MetaDataItem

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

public class MetaDataItem extends Object
Represents a single key-value pair in payment metadata.

This class provides a flexible structure for storing arbitrary metadata associated with Interledger payments. Each item consists of a required key and an optional value, allowing for both simple flags and descriptive key-value pairs.

Metadata items are commonly used for:

  • Payment descriptions (e.g., key="description", value="Coffee purchase")
  • Reference numbers (e.g., key="reference", value="REF-123456")
  • Category tags (e.g., key="category", value="food")
  • Boolean flags (e.g., key="urgent", value=null for simple presence)
Since:
1.0
  • Field Details

    • key

      public String key
      The metadata key identifier.

      This is a required field that identifies the type or category of metadata. Keys should be descriptive and follow a consistent naming convention within an application or organization.

      Examples of common keys:

      • "description" - Human-readable payment description
      • "reference" - Business reference number
      • "category" - Payment category or type
      • "customer_id" - Customer identifier
      • "merchant_id" - Merchant identifier
    • value

      public String value
      The metadata value.

      This is an optional field that contains the actual metadata value associated with the key. When null, the metadata item represents a simple flag or tag where the presence of the key is sufficient.

      Values are stored as strings but can represent various data types depending on the application's interpretation of the metadata.

  • Constructor Details

    • MetaDataItem

      public MetaDataItem()