jp.gopay.sdk.builders.exchangerate.ExchangeRateBuilders Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gopay-java-sdk Show documentation
Show all versions of gopay-java-sdk Show documentation
Official Gyro-n Payments Java SDK
package jp.gopay.sdk.builders.exchangerate;
import jp.gopay.sdk.builders.exchangerate.AbstractExchangeRateBuilders.AbstractConvertMoneyBuilder;
import jp.gopay.sdk.models.common.MoneyLike;
import jp.gopay.sdk.models.request.exchangerate.ExchangeRateConversionReq;
import jp.gopay.sdk.resources.ExchangeRatesResource;
import retrofit2.Call;
import retrofit2.Retrofit;
public abstract class ExchangeRateBuilders {
public static class ConvertMoneyBuilder
extends AbstractConvertMoneyBuilder {
public ConvertMoneyBuilder(Retrofit retrofit, MoneyLike moneyToConvert, String targetCurrency) {
super(retrofit, moneyToConvert, targetCurrency);
}
@Override
protected Call getRequest(ExchangeRatesResource resource) {
return resource.convert(new ExchangeRateConversionReq(moneyToConvert, targetCurrency), idempotencyKey);
}
}
}