Enum Class AccessAction
- All Implemented Interfaces:
Serializable,Comparable<AccessAction>,Constable
This enum defines the specific actions that can be requested in an access grant for different types of payment resources. Access actions control what operations a client can perform on payment resources like incoming payments, outgoing payments, and quotes.
Actions are combined with resource types to create fine-grained access control for payment operations, ensuring that clients only have the minimum necessary permissions to perform their intended functions.
- Since:
- 1.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionPermission to complete a resource operation.Permission to create a new resource.Permission to list resources.Permission to list all resources of a specific type.Permission to read a specific resource.Permission to read all resources of a specific type. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic AccessActionCreates an AccessAction from its string value.getValue()Gets the JSON string value for this access action.toString()static AccessActionReturns the enum constant of this class with the specified name.static AccessAction[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
read
Permission to read a specific resource.Allows the client to retrieve information about a specific payment resource identified by its URI. This is used for reading individual payments, quotes, or other resources.
-
complete
Permission to complete a resource operation.Allows the client to finalize or complete a payment operation that was previously initiated. This is commonly used for completing outgoing payments after user authorization.
-
create
Permission to create a new resource.Allows the client to create new payment resources such as incoming payments, outgoing payments, or quotes. This is typically the first step in payment operations.
-
read_all
Permission to read all resources of a specific type.Allows the client to access all resources of a given type within the wallet address scope, not just specific resources. This is broader than the
readaction. -
list
Permission to list resources.Allows the client to retrieve a list of resources of a specific type. This is typically used for getting paginated lists of payments or quotes.
-
list_all
Permission to list all resources of a specific type.Allows the client to retrieve comprehensive lists of all resources of a specific type within the wallet address scope. This is broader than the
listaction.
-
-
Field Details
-
value
The string value used in JSON serialization.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
toString
- Overrides:
toStringin classEnum<AccessAction>
-
getValue
Gets the JSON string value for this access action.- Returns:
- the string value used in JSON serialization
-
fromValue
Creates an AccessAction from its string value.- Parameters:
value- the string value to convert- Returns:
- the corresponding AccessAction enum value
- Throws:
IllegalArgumentException- if the value doesn't match any known action
-