me.figo.models.CatalogBank Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdk Show documentation
Show all versions of sdk Show documentation
This SDK eases the development of Java applications and web services consuming the figo connect API.
Figo connect allows developers simple access to users bank data on a trustworthy basis. Users can grant your
application access to certain parts of their bank accounts and you can access them without worrying about the
inner workings of online banking.
/**
*
*/
package me.figo.models;
import java.util.List;
import java.util.Map;
import com.google.gson.annotations.Expose;
import com.google.gson.internal.LinkedTreeMap;
/**
* object representing the response of a /catalog/banks/{country_code} request
*
* @author Daniel
*
*/
public class CatalogBank {
@Expose
private String bank_name;
@Expose
private List> icon;
@Expose
private Language language;
@Expose
private String bank_code;
@Expose
private String bic;
@Expose
private List credentials;
@Expose
private String advice;
public String getBic() {
return bic;
}
public Language getLanguage() {
return language;
}
public List getCredentials() {
return credentials;
}
public String getAdvice() {
return advice;
}
public String getBankName() {
return bank_name;
}
public String getBankCode() {
return bank_code;
}
/**
* wrapper class holding the list of banks as returned by figo api
*
* @author Daniel
*
*/
public static class CatalogBanksResponse {
/**
* List of banks asked for
*/
@Expose
private List banks;
public List getBanks() {
return banks;
}
}
/**
* @return bank icon URL
*/
public String getIconUrl() {
if(icon!=null&&icon.size()>0){
return (String) icon.get(0);
}
return "";
}
/**
* @return the bank icon in other resolutions
*/
@SuppressWarnings("unchecked")
public Map getAdditionalIcons() {
if(icon!=null&&icon.size()>1){
return (LinkedTreeMap) icon.get(1);
}
return null;
}
}