ContractCreditedEffectResponse
extends EffectResponse
in package
Represents an effect when a Soroban smart contract receives funds
This effect occurs when assets are credited to a smart contract address in the Soroban environment. Contracts can hold and manage Stellar assets including native XLM and issued assets. Triggered by Soroban contract invocations that transfer assets.
Tags
Table of Contents
Properties
- $amount : string
- $assetCode : string|null
- $assetIssuer : string|null
- $assetType : string
- $contract : string
- $httpClient : Client|null
- $rateLimitLimit : int|null
- $rateLimitRemaining : int|null
- $rateLimitReset : int|null
Methods
- fromJson() : ContractCreditedEffectResponse
- Creates an instance from JSON data
- getAccount() : string
- Gets the account address affected by this effect
- getAccountMuxed() : string|null
- Gets the muxed account address if the account is multiplexed
- getAccountMuxedId() : string|null
- Gets the muxed account ID if the account is multiplexed
- getAmount() : string
- Gets the amount credited
- getAssetCode() : string|null
- Gets the asset code
- getAssetIssuer() : string|null
- Gets the asset issuer account ID
- getAssetType() : string
- Gets the asset type
- getContract() : string
- Gets the contract address that was credited
- getCreatedAt() : string
- Gets the timestamp when this effect was created
- getEffectId() : string
- Gets the unique identifier for this effect
- getEffectType() : int
- Gets the numeric effect type identifier
- getHttpClient() : Client|null
- Gets the HTTP client used for pagination requests
- getHumanReadableEffectType() : string
- Gets the human-readable description of the effect type
- getLinks() : EffectLinksResponse
- Gets the links to related resources for this effect
- getPagingToken() : string
- Gets the paging token for this effect in list results
- getRateLimitLimit() : int|null
- Returns X-RateLimit-Limit header from the response.
- getRateLimitRemaining() : int|null
- Returns X-RateLimit-Remaining header from the response.
- getRateLimitReset() : int|null
- Returns X-RateLimit-Reset header from the response. Seconds until a new window starts.
- setAmount() : void
- Sets the amount credited
- setAssetCode() : void
- Sets the asset code
- setAssetIssuer() : void
- Sets the asset issuer account ID
- setAssetType() : void
- Sets the asset type
- setContract() : void
- Sets the contract address
- setHeaders() : void
- Extracts and sets rate limiting information from HTTP response headers
- setHttpClient() : void
- Sets the HTTP client for making follow-up requests
- loadFromJson() : void
- Loads object data from JSON array
Properties
$amount
public
string
$amount
$assetCode
public
string|null
$assetCode
= null
$assetIssuer
public
string|null
$assetIssuer
= null
$assetType
public
string
$assetType
$contract
public
string
$contract
$httpClient
protected
Client|null
$httpClient
= null
$rateLimitLimit
protected
int|null
$rateLimitLimit
= null
$rateLimitRemaining
protected
int|null
$rateLimitRemaining
= null
$rateLimitReset
protected
int|null
$rateLimitReset
= null
Methods
fromJson()
Creates an instance from JSON data
public
static fromJson(array<string|int, mixed> $jsonData) : ContractCreditedEffectResponse
Parameters
- $jsonData : array<string|int, mixed>
-
JSON data array
Return values
ContractCreditedEffectResponsegetAccount()
Gets the account address affected by this effect
public
getAccount() : string
Return values
string —The account ID
getAccountMuxed()
Gets the muxed account address if the account is multiplexed
public
getAccountMuxed() : string|null
Return values
string|null —The muxed account address, or null if not multiplexed
getAccountMuxedId()
Gets the muxed account ID if the account is multiplexed
public
getAccountMuxedId() : string|null
Return values
string|null —The muxed account ID, or null if not multiplexed
getAmount()
Gets the amount credited
public
getAmount() : string
Return values
string —The amount
getAssetCode()
Gets the asset code
public
getAssetCode() : string|null
Return values
string|null —The asset code, or null for native assets
getAssetIssuer()
Gets the asset issuer account ID
public
getAssetIssuer() : string|null
Return values
string|null —The issuer's account ID, or null for native assets
getAssetType()
Gets the asset type
public
getAssetType() : string
Return values
string —The asset type
getContract()
Gets the contract address that was credited
public
getContract() : string
Return values
string —The contract address
getCreatedAt()
Gets the timestamp when this effect was created
public
getCreatedAt() : string
Return values
string —The creation time in ISO 8601 format
getEffectId()
Gets the unique identifier for this effect
public
getEffectId() : string
Return values
string —The effect ID
getEffectType()
Gets the numeric effect type identifier
public
getEffectType() : int
Return values
int —The effect type code as defined in EffectType constants
getHttpClient()
Gets the HTTP client used for pagination requests
public
getHttpClient() : Client|null
Return values
Client|null —The HTTP client instance, or null if not set
getHumanReadableEffectType()
Gets the human-readable description of the effect type
public
getHumanReadableEffectType() : string
Return values
string —The effect type name (e.g., "account_created", "trade")
getLinks()
Gets the links to related resources for this effect
public
getLinks() : EffectLinksResponse
Return values
EffectLinksResponse —The navigation links
getPagingToken()
Gets the paging token for this effect in list results
public
getPagingToken() : string
Return values
string —The paging token used for cursor-based pagination
getRateLimitLimit()
Returns X-RateLimit-Limit header from the response.
public
getRateLimitLimit() : int|null
This number represents the he maximum number of requests that the current client can make in one hour.
Tags
Return values
int|nullgetRateLimitRemaining()
Returns X-RateLimit-Remaining header from the response.
public
getRateLimitRemaining() : int|null
The number of remaining requests for the current window.
Tags
Return values
int|nullgetRateLimitReset()
Returns X-RateLimit-Reset header from the response. Seconds until a new window starts.
public
getRateLimitReset() : int|null
Tags
Return values
int|nullsetAmount()
Sets the amount credited
public
setAmount(string $amount) : void
Parameters
- $amount : string
-
The amount
setAssetCode()
Sets the asset code
public
setAssetCode(string|null $assetCode) : void
Parameters
- $assetCode : string|null
-
The asset code
setAssetIssuer()
Sets the asset issuer account ID
public
setAssetIssuer(string|null $assetIssuer) : void
Parameters
- $assetIssuer : string|null
-
The issuer's account ID
setAssetType()
Sets the asset type
public
setAssetType(string $assetType) : void
Parameters
- $assetType : string
-
The asset type
setContract()
Sets the contract address
public
setContract(string $contract) : void
Parameters
- $contract : string
-
The contract address
setHeaders()
Extracts and sets rate limiting information from HTTP response headers
public
setHeaders(array<string|int, mixed> $headers) : void
This method processes the X-Ratelimit-* headers from the HTTP response and stores them for client access.
Parameters
- $headers : array<string|int, mixed>
-
Associative array of HTTP headers from the response
setHttpClient()
Sets the HTTP client for making follow-up requests
public
setHttpClient([Client|null $httpClient = null ]) : void
Paginated responses contain links to next/previous pages. This HTTP client is used when following those links to fetch additional pages.
Parameters
- $httpClient : Client|null = null
-
The Guzzle HTTP client to use for pagination
loadFromJson()
Loads object data from JSON array
protected
loadFromJson(array<string|int, mixed> $json) : void
Parameters
- $json : array<string|int, mixed>
-
JSON data array