com.checkout.balances.BalancesClientImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of checkout-sdk-java Show documentation
Show all versions of checkout-sdk-java Show documentation
Checkout SDK for Java https://checkout.com
package com.checkout.balances;
import com.checkout.AbstractClient;
import com.checkout.ApiClient;
import com.checkout.CheckoutConfiguration;
import com.checkout.SdkAuthorizationType;
import java.util.concurrent.CompletableFuture;
import static com.checkout.common.CheckoutUtils.validateParams;
public class BalancesClientImpl extends AbstractClient implements BalancesClient {
private static final String BALANCES_PATH = "balances";
public BalancesClientImpl(final ApiClient apiClient,
final CheckoutConfiguration configuration) {
super(apiClient, configuration, SdkAuthorizationType.SECRET_KEY_OR_OAUTH);
}
@Override
public CompletableFuture retrieveEntityBalances(final String entityId, final BalancesQuery balancesQuery) {
validateParams("entityId", entityId, "balancesQuery", balancesQuery);
return apiClient.queryAsync(buildPath(BALANCES_PATH, entityId), sdkAuthorization(), balancesQuery, BalancesResponse.class);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy