TradeLinksResponse
in package
HAL navigation links for trade resources
This response contains hypermedia links following the HAL (Hypertext Application Language) specification for navigating between trade-related resources in the Horizon API. Each link provides a URL to fetch additional information about the trade or related entities.
Available links:
- self: Link to this trade's detail endpoint
- base: Link to the base account involved in the trade
- counter: Link to the counter account involved in the trade
- operation: Link to the operation that created this trade
Tags
Table of Contents
Methods
- fromJson() : TradeLinksResponse
- Creates a TradeLinksResponse from JSON data
- getBase() : LinkResponse
- Gets the link to the base account in the trade
- getCounter() : LinkResponse
- Gets the link to the counter account in the trade
- getOperation() : LinkResponse
- Gets the link to the operation that created this trade
- getSelf() : LinkResponse
- Gets the link to this trade's detail endpoint
- loadFromJson() : void
Methods
fromJson()
Creates a TradeLinksResponse from JSON data
public
static fromJson(array<string|int, mixed> $json) : TradeLinksResponse
Parameters
- $json : array<string|int, mixed>
-
Associative array of parsed JSON response
Return values
TradeLinksResponse —The populated links response
getBase()
Gets the link to the base account in the trade
public
getBase() : LinkResponse
Return values
LinkResponse —The base account link
getCounter()
Gets the link to the counter account in the trade
public
getCounter() : LinkResponse
Return values
LinkResponse —The counter account link
getOperation()
Gets the link to the operation that created this trade
public
getOperation() : LinkResponse
Return values
LinkResponse —The operation link
getSelf()
Gets the link to this trade's detail endpoint
public
getSelf() : LinkResponse
Return values
LinkResponse —The self link
loadFromJson()
protected
loadFromJson(array<string|int, mixed> $json) : void
Parameters
- $json : array<string|int, mixed>