Android Open Source - android-sdk Rates






From Project

Back to project page android-sdk.

License

The source code is released under:

MIT License

If you think the Android project android-sdk listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.bitpay.sdk.model;
/*from   w w  w .  j  a  va 2  s  . com*/
import java.util.List;

/**
 * Hold information about rates for multiple currencies.
 */
public class Rates {

    private List<Rate> _rates;

    public Rates(List<Rate> rates) {
        _rates = rates;
    }

    public List<Rate> getRates()
    {
      return _rates;
    }

    public void update(List<Rate> rates) {
      _rates = rates;
    }

    public double getRate(String currencyCode) {
      double val = 0;
      for (Rate rateObj : _rates)
        {
        if (rateObj.getCode().equals(currencyCode))
            {
                val = rateObj.getValue();
                break;
        }
      }
    return val;
    }
}




Java Source Code List

com.bitpay.sdk.android.BitPayAndroid.java
com.bitpay.sdk.android.InvoiceActivity.java
com.bitpay.sdk.android.interfaces.BitpayPromiseCallback.java
com.bitpay.sdk.android.interfaces.InvoiceCreationCallback.java
com.bitpay.sdk.android.interfaces.InvoicePromiseCallback.java
com.bitpay.sdk.android.interfaces.PromiseCallback.java
com.bitpay.sdk.android.interfaces.RatesPromiseCallback.java
com.bitpay.sdk.android.promises.BitpayPromise.java
com.bitpay.sdk.controller.BitPayException.java
com.bitpay.sdk.controller.BitPay.java
com.bitpay.sdk.controller.KeyUtils.java
com.bitpay.sdk.model.BuyerInfo.java
com.bitpay.sdk.model.InvoicePaymentUrls.java
com.bitpay.sdk.model.InvoiceTransaction.java
com.bitpay.sdk.model.Invoice.java
com.bitpay.sdk.model.Policy.java
com.bitpay.sdk.model.Rate.java
com.bitpay.sdk.model.Rates.java
com.bitpay.sdk.model.Token.java