All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jp.gopay.sdk.builders.exchangerate.ExchangeRateBuilders Maven / Gradle / Ivy

There is a newer version: 0.11.17
Show newest version
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);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy