use of io.swagger.client.model.RequestRate in project android-client by GenesisVision.
the class RateManager method getRate.
public BehaviorSubject<Double> getRate(String from, String to) {
BehaviorSubject<Double> rateSubject = getRateSubject(from, to);
RequestRate model = new RequestRate();
model.setFrom(RequestRate.FromEnum.fromValue(from));
model.setTo(RequestRate.ToEnum.fromValue(to));
rateSubscription = rateApi.apiRatePost(model).observeOn(Schedulers.io()).subscribeOn(Schedulers.io()).subscribe(response -> handleGetRateResponse(response, rateSubject), this::handleGetRateError);
return rateSubject;
}
Aggregations