FeeEndpointInfo
in package
Configuration information for the SEP-24 fee calculation endpoint
The fee endpoint is deprecated in favor of SEP-38 GET /price
This class indicates whether the anchor provides a fee calculation endpoint and if authentication is required to access it. The fee endpoint allows precise fee calculations for complex fee structures that cannot be expressed using the static fee fields in the /info response.
Tags
Table of Contents
Properties
- $authenticationRequired : bool
- $enabled : bool
Methods
- fromJson() : FeeEndpointInfo
- Constructs a new FeeEndpointInfo object from the given data array.
- isAuthenticationRequired() : bool
- isEnabled() : bool
- setAuthenticationRequired() : void
- setEnabled() : void
- loadFromJson() : void
- Loads the needed data from a json array.
Properties
$authenticationRequired
public
bool
$authenticationRequired
true if the anchor requests sep-10 authentication for calling the fee endpoint
$enabled
public
bool
$enabled
true if the anchor offers a fee endpoint
Methods
fromJson()
Constructs a new FeeEndpointInfo object from the given data array.
public
static fromJson(array<string|int, mixed> $json) : FeeEndpointInfo
Parameters
- $json : array<string|int, mixed>
-
the data array to extract the needed values from.
Return values
FeeEndpointInfo —the constructed FeeEndpointInfo object.
isAuthenticationRequired()
public
isAuthenticationRequired() : bool
Return values
bool —true if the anchor requests sep-10 authentication for calling the fee endpoint.
isEnabled()
public
isEnabled() : bool
Return values
bool —true if the anchor offers a fee endpoint.
setAuthenticationRequired()
public
setAuthenticationRequired(bool $authenticationRequired) : void
Parameters
- $authenticationRequired : bool
-
true if the anchor requests sep-10 authentication for calling the fee endpoint.
setEnabled()
public
setEnabled(bool $enabled) : void
Parameters
- $enabled : bool
-
true if the anchor offers a fee endpoint.
loadFromJson()
Loads the needed data from a json array.
protected
loadFromJson(array<string|int, mixed> $json) : void
Parameters
- $json : array<string|int, mixed>
-
the data array to read from.