com.checkout.forex.ForexClientImpl 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.forex;
import com.checkout.AbstractClient;
import com.checkout.ApiClient;
import com.checkout.CheckoutConfiguration;
import com.checkout.SdkAuthorizationType;
import com.checkout.common.CheckoutUtils;
import java.util.concurrent.CompletableFuture;
public class ForexClientImpl extends AbstractClient implements ForexClient {
public ForexClientImpl(final ApiClient apiClient, final CheckoutConfiguration configuration) {
super(apiClient, configuration, SdkAuthorizationType.OAUTH);
}
@Override
public CompletableFuture requestQuote(final QuoteRequest quoteRequest) {
CheckoutUtils.validateParams("quoteRequest", quoteRequest);
return apiClient.postAsync("forex/quotes", sdkAuthorization(), QuoteResponse.class, quoteRequest, null);
}
@Override
public CompletableFuture getRates(RatesQueryFilter ratesQuery) {
CheckoutUtils.validateParams("ratesQuery", ratesQuery);
return apiClient.queryAsync("forex/rates", sdkAuthorization(), ratesQuery, RatesQueryResponse.class);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy