Package org.stellar.sdk.requests
Class ClaimableBalancesRequestBuilder
java.lang.Object
org.stellar.sdk.requests.RequestBuilder
org.stellar.sdk.requests.ClaimableBalancesRequestBuilder
Builds requests connected to claimable balances.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.stellar.sdk.requests.RequestBuilder
RequestBuilder.Order -
Constructor Summary
ConstructorsConstructorDescriptionClaimableBalancesRequestBuilder(okhttp3.OkHttpClient httpClient, okhttp3.HttpUrl serverURI) -
Method Summary
Modifier and TypeMethodDescriptionThe claimable balance details endpoint provides information on a claimable balance.claimableBalance(okhttp3.HttpUrl uri) Requests specificuriand returnsClaimableBalanceResponse.Setscursorparameter on the request.execute()Build and execute request.static Page<ClaimableBalanceResponse> execute(okhttp3.OkHttpClient httpClient, okhttp3.HttpUrl uri) Returns all claimable balances which hold a given asset.forClaimant(String claimant) Returns all claimable balances which can be claimed by a given account id.forSponsor(String sponsor) Returns all claimable balances sponsored by a given account.limit(int number) Setslimitparameter on the request.order(RequestBuilder.Order direction) Setsorderparameter on the request.Methods inherited from class org.stellar.sdk.requests.RequestBuilder
setAssetParameter, setAssetsParameter
-
Constructor Details
-
ClaimableBalancesRequestBuilder
public ClaimableBalancesRequestBuilder(okhttp3.OkHttpClient httpClient, okhttp3.HttpUrl serverURI)
-
-
Method Details
-
claimableBalance
Requests specificuriand returnsClaimableBalanceResponse. This method is helpful for getting the links.- Throws:
IOException- if the request fails due to an IOException, including but not limited to a timeout, connection failure etc.
-
claimableBalance
The claimable balance details endpoint provides information on a claimable balance.- Parameters:
id- specifies which claimable balance to load.- Returns:
- The claimable balance details.
- Throws:
IOException- if the request fails due to an IOException, including but not limited to a timeout, connection failure etc.
-
forSponsor
Returns all claimable balances sponsored by a given account.- Parameters:
sponsor- Account ID of the sponsor.- Returns:
- current
ClaimableBalancesRequestBuilderinstance
-
forAsset
Returns all claimable balances which hold a given asset.- Parameters:
asset- The Asset held by the claimable balance.- Returns:
- current
ClaimableBalancesRequestBuilderinstance
-
forClaimant
Returns all claimable balances which can be claimed by a given account id.- Parameters:
claimant- Account ID of the address which can claim the claimable balance.- Returns:
- current
ClaimableBalancesRequestBuilderinstance
-
execute
public static Page<ClaimableBalanceResponse> execute(okhttp3.OkHttpClient httpClient, okhttp3.HttpUrl uri) throws IOException, TooManyRequestsException Requests specificuriand returnsPageofClaimableBalanceResponse. This method is helpful for getting the next set of results.- Returns:
PageofClaimableBalanceResponse- Throws:
TooManyRequestsException- when too many requests were sent to the Horizon server.IOException- if the request fails due to an IOException, including but not limited to a timeout, connection failure etc.
-
execute
Build and execute request.- Returns:
PageofClaimableBalanceResponse- Throws:
TooManyRequestsException- when too many requests were sent to the Horizon server.IOException- if the request fails due to an IOException, including but not limited to a timeout, connection failure etc.
-
cursor
Description copied from class:RequestBuilderSetscursorparameter on the request. A cursor is a value that points to a specific location in a collection of resources. The cursor attribute itself is an opaque value meaning that users should not try to parse it.- Overrides:
cursorin classRequestBuilder- Parameters:
token- A cursor is a value that points to a specific location in a collection of resources.- See Also:
-
limit
Description copied from class:RequestBuilderSetslimitparameter on the request. It defines maximum number of records to return. For range and default values check documentation of the endpoint requested.- Overrides:
limitin classRequestBuilder- Parameters:
number- maxium number of records to return
-
order
Description copied from class:RequestBuilderSetsorderparameter on the request.- Overrides:
orderin classRequestBuilder- Parameters:
direction-RequestBuilder.Order
-