public class ClaimableBalancesRequestBuilder extends RequestBuilder
RequestBuilder.Order| Constructor and Description |
|---|
ClaimableBalancesRequestBuilder(okhttp3.OkHttpClient httpClient,
okhttp3.HttpUrl serverURI) |
| Modifier and Type | Method and Description |
|---|---|
ClaimableBalanceResponse |
claimableBalance(okhttp3.HttpUrl uri)
Requests specific
uri and returns ClaimableBalanceResponse. |
ClaimableBalanceResponse |
claimableBalance(java.lang.String id)
The claimable balance details endpoint provides information on a claimable balance.
|
ClaimableBalancesRequestBuilder |
cursor(java.lang.String token)
Sets
cursor parameter on the request. |
Page<ClaimableBalanceResponse> |
execute()
Build and execute request.
|
static Page<ClaimableBalanceResponse> |
execute(okhttp3.OkHttpClient httpClient,
okhttp3.HttpUrl uri)
|
ClaimableBalancesRequestBuilder |
forAsset(Asset asset)
Returns all claimable balances which hold a given asset.
|
ClaimableBalancesRequestBuilder |
forClaimant(java.lang.String claimant)
Returns all claimable balances which can be claimed by a given account id.
|
ClaimableBalancesRequestBuilder |
forSponsor(java.lang.String sponsor)
Returns all claimable balances sponsored by a given account.
|
ClaimableBalancesRequestBuilder |
limit(int number)
Sets
limit parameter on the request. |
ClaimableBalancesRequestBuilder |
order(RequestBuilder.Order direction)
Sets
order parameter on the request. |
setAssetParameter, setAssetsParameterpublic ClaimableBalancesRequestBuilder(okhttp3.OkHttpClient httpClient,
okhttp3.HttpUrl serverURI)
public ClaimableBalanceResponse claimableBalance(okhttp3.HttpUrl uri)
uri and returns ClaimableBalanceResponse. This method is
helpful for getting the links.ClaimableBalanceResponseNetworkException - All the exceptions below are subclasses of
NetworkErrorBadRequestException - if the request fails due to a bad request
(4xx)BadResponseException - if the request fails due to a bad
response from the server (5xx)TooManyRequestsException - if the request fails due to too many requests sent to the
serverRequestTimeoutException - When Horizon returns a Timeout
or connection timeout occurredUnknownResponseException - if the server returns an unknown
status codeConnectionErrorException - When the request cannot be executed due to cancellation or
connectivity problems, etc.public ClaimableBalanceResponse claimableBalance(java.lang.String id)
id - specifies which claimable balance to load.NetworkException - All the exceptions below are subclasses of
NetworkErrorBadRequestException - if the request fails due to a bad request
(4xx)BadResponseException - if the request fails due to a bad
response from the server (5xx)TooManyRequestsException - if the request fails due to too many requests sent to the
serverRequestTimeoutException - When Horizon returns a Timeout
or connection timeout occurredUnknownResponseException - if the server returns an unknown
status codeConnectionErrorException - When the request cannot be executed due to cancellation or
connectivity problems, etc.public ClaimableBalancesRequestBuilder forSponsor(java.lang.String sponsor)
sponsor - Account ID of the sponsor.ClaimableBalancesRequestBuilder instancepublic ClaimableBalancesRequestBuilder forAsset(Asset asset)
asset - The Asset held by the claimable balance.ClaimableBalancesRequestBuilder instancepublic ClaimableBalancesRequestBuilder forClaimant(java.lang.String claimant)
claimant - Account ID of the address which can claim the claimable balance.ClaimableBalancesRequestBuilder instancepublic static Page<ClaimableBalanceResponse> execute(okhttp3.OkHttpClient httpClient, okhttp3.HttpUrl uri)
uri and returns Page of ClaimableBalanceResponse. This method is helpful for getting the next set of results.httpClient - OkHttpClient to use to send the request.uri - HttpUrl URI to send the request to.Page of ClaimableBalanceResponseBadRequestException - if the request fails due to a bad request
(4xx)BadResponseException - if the request fails due to a bad
response from the server (5xx)ConnectionErrorException - if the request fails due to an IOException, including but not
limited to a timeout, connection failure etc.TooManyRequestsException - when too many requests were sent to the Horizon server.public Page<ClaimableBalanceResponse> execute()
Page of AssetResponseBadRequestException - if the request fails due to a bad request
(4xx)BadResponseException - if the request fails due to a bad
response from the server (5xx)ConnectionErrorException - if the request fails due to an IOException, including but not
limited to a timeout, connection failure etc.TooManyRequestsException - when too many requests were sent to the Horizon server.public ClaimableBalancesRequestBuilder cursor(java.lang.String token)
RequestBuildercursor parameter 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.cursor in class RequestBuildertoken - A cursor is a value that points to a specific location in a collection of
resources.public ClaimableBalancesRequestBuilder limit(int number)
RequestBuilderlimit parameter on the request. It defines maximum number of records to
return. For range and default values check documentation of the endpoint requested.limit in class RequestBuildernumber - maxium number of records to returnpublic ClaimableBalancesRequestBuilder order(RequestBuilder.Order direction)
RequestBuilderorder parameter on the request.order in class RequestBuilderdirection - RequestBuilder.Order