figo-connect / java-figo Goto Github PK
View Code? Open in Web Editor NEWJava binding for the figo Connect API.
Home Page: http://figo.io
Java binding for the figo Connect API.
Home Page: http://figo.io
Problem:
The web_demo does not show the purpose text.
Reason:
This is due to an incorrect method name in index.wm.
Sollution:
Within index.wm, change line #85
from: <td>$transaction.getPurpose()</td>
to: <td>$transaction.getPurposeText()</td>
When using sdk-1.3.10.jar in an android application the programm throws a NoSuchMethodError see
http://stackoverflow.com/questions/2047706/apache-commons-codec-with-android-could-not-find-method
Currently it is supported to use /rest/catalog/banks/{countryCode}/{bankCode}
. Unfortunately this request returns something different when called without parameters (returning all supported banks).
Especially mapping this is real pain since static typed languages normally do not allow you to put different types in the same list. Is there a chance for a server API fix soon? I'd be glad to provide a PR after this is resolved, but I currently don't want to build a custom deserializer to fix this.
"icon":[
"https://api.figo.me/assets/images/accounts/bundesbank.png",
{
"120x120":"https://api.figo.me/assets/images/accounts/bundesbank_120.png",
"144x144":"https://api.figo.me/assets/images/accounts/bundesbank_144.png",
"192x192":"https://api.figo.me/assets/images/accounts/bundesbank_192.png",
"256x256":"https://api.figo.me/assets/images/accounts/bundesbank_256.png",
"48x48":"https://api.figo.me/assets/images/accounts/bundesbank_48.png",
"60x60":"https://api.figo.me/assets/images/accounts/bundesbank_60.png",
"72x72":"https://api.figo.me/assets/images/accounts/bundesbank_72.png",
"84x84":"https://api.figo.me/assets/images/accounts/bundesbank_84.png",
"96x96":"https://api.figo.me/assets/images/accounts/bundesbank_96.png"
}
]
I'm getting a NumberFormatException when deserializing the TransactionsResponse
response from /rest/accounts/${id}/transactions
for some users.
AdditionalTransactionInfo
expects BigDecimal. But the response I'm getting looks like this:
"additional_info": {
"compensation_amount": "6,10",
"original_amount": "575,40"
}
I assume this is a bug?
For example:
public class AccountBalance {
/**
* Account balance or None if the balance is not yet known
*/
@Expose(serialize = false)
private float balance;
Try values like 131072.01 or 16777217.
FYI:
https://blogs.oracle.com/CoreJavaTechTips/entry/the_need_for_bigdecimal
http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html
Payments class does not yet expose an attribute for iban which is needed for sepa transfers.
The travis builds fail due to missing environment configuration required to sign the artifacts.
Since signing is not necessary for builds I'd recommend to make the artifact signing optional.
E.g.:
<properties>
...
<skip.artifacts.signing>true</skip.artifacts.signing>
</properties>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<configuration>
<skip>${skip.artifacts.signing}</skip>
</configuration>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
if you want to sign the artifacts for release simply run the build with the System Property -Dskip.artifacts.signing=false
.
FigoException
should contain the HTTP response code - if any - to enable client code to distinguish between different error situations.
Hi,
would be great if someone could deploy the current version (1.2.4?) to maven. The current version on maven (1.2.1) has some (quite nasty :-)) bugs (e.g., not returning "expires_in" when authenticating).
thanks!
Manuel
Eclipse specific artifacts like .project
, .classpath
shouldn't be included
since it messes up with local configurations.
The metadata from maven pom.xml
is enough to setup everything required for the project.
Hello. I recognized that the 'getTaskState(String tokenId,String pin) method is declared deprecated. The method seems essential to send the pin when a synchronisation-task was started and the pin is not saved with the bank contact. Is there a reason why it was declared deprecated and do you plan to 'replace' it with another version, that has the pin as a parameter?
Thanks in advance.
Hello, the changed fingerprint for SHA1 certificate is not listed in FigoTrustManager. API is currently not working
Currently FigoSession
returns the URL to be opened in a web browser when submitPayment
is used to submit a Payment
.
For non-browserclients it is necessary to return the TaskTokenResponse
instead of the url to be able to monitor the task state.
Hey, with the api v3 changes the error handling seems to have changed somehow, we are seeing lots of FigoExceptions
now.
Sadly, this exception isn't helpful in some cases where the underlying ErrorObject
of the api returns meaningful information that is not propagated.
Problems:
FigoException
Exception.message
is null (maybe have a fall back to the description
?)error_code
is often part of the message (404 = 1002 etc)data
Most of these problems could be solved simply by returning the ErrorObject
, and adding data
to it.
We use travis for testing, according to travis-ci/travis-ci#7964 and travis-ci/travis-ci#7884 oraclejdk7 is no longer supported. For now we need to rely testing openjdk7
.
When no error is specified, error logging will throw a NPE at me.figo.FigoApi.logError(FigoApi.java:197)
Probably happens only when figo API has issues.
Easiest Solution:
String errorString = errorResponse.getError() == null ? null : errorResponse.getError().toString();
Dear Figo Team,
Thanks for the great Java API.
I found an issue when importing securities. The FigoSession.getSecurities() functions do not return any data. I have an implementation of the Security Model which I did when importing securities was not yet supported by the API.
When I exchange your implementation with mine, everything works :)
I did not find a lot of differences, so this might need a bit of debugging.
Some floats are Bigints in the figo implementation.
A default constructor is missing from the figo implementation, but this was not the issue.
My implementation is:
//
// Copyright (c) 2013 figo GmbH
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
package me.figo.models;
import java.util.Date;
import java.util.List;
import com.google.gson.annotations.Expose;
/**
* Object representing one security on a certain depot of the user
*
* @author Wolfram Stacklies (aktienfreunde.net)
*/
public class Security {
/**
* Internal figo Connect transaction ID
*/
@Expose(serialize = false)
private String security_id;
/**
* Internal figo Connect account ID
*/
@Expose(serialize = false)
private String account_id;
/**
* Name of the security
*/
@Expose(serialize = false)
private String name;
/**
* International Securities Identification Number
*/
@Expose(serialize = false)
private String isin;
/**
* Wertpapierkennnummer (if available)
*/
@Expose(serialize = false)
private String wkn;
/**
* Three-character currency code
*/
@Expose(serialize = false)
private String currency;
/**
* Number of pieces or value
*/
@Expose(serialize = false)
private int quantity;
/**
* Monetary value in account currency
*/
@Expose(serialize = false)
private float amount;
/**
* Monetary value in trading currency
*/
@Expose(serialize = false)
private float amount_original_currency;
/**
* Exchange rate between trading and account currency
*/
@Expose(serialize = false)
private float exchange_rate;
/**
* Current price
*/
@Expose(serialize = false)
private float price;
/**
* Currency of current price
*/
@Expose(serialize = false)
private String price_currency;
/**
* Purchase price
*/
@Expose(serialize = false)
private float purchase_price;
/**
* Currency of purchase price
*/
@Expose(serialize = false)
private String purchase_price_currency;
/**
* This flag indicates whether the security has already been marked as visited by the user
*/
@Expose(serialize = false)
private boolean visited;
/**
* Trading timestamp
*/
@Expose(serialize = false)
private Date trade_timestamp;
/**
* Internal creation timestamp on the figo Connect server
*/
@Expose(serialize = false)
private Date creation_timestamp;
/**
* Internal modification timestamp on the figo Connect server
*/
@Expose(serialize = false)
private Date modification_timestamp;
/**
* The default constructor
*/
public Security() {
}
/**
* @return the internal figo Connect security ID
*/
public String getSecurityId() {
return security_id;
}
/**
* @return the internal figo Connect account ID
*/
public String getAccountId() {
return account_id;
}
/**
* @return the name of the security
*/
public String getName() {
return name;
}
/**
* @return the ISIN of the security
*/
public String getISIN() {
return isin;
}
/**
* @return the WKN (if available)
*/
public String getWKN() {
return wkn;
}
/**
* @return the three-character currency code
*/
public String getCurrency() {
return currency;
}
/**
* @return the number of pieces or value
*/
public int getQuantity() {
return quantity;
}
/**
* @return Monetary value in account currency
*/
public float getAmount() {
return amount;
}
/**
* @return Monetary value in trading currency
*/
public float getAmountOriginalCurrency() {
return amount_original_currency;
}
/**
* @return Exchange rate between trading and account currency
*/
public float getExchangeRate() {
return exchange_rate;
}
/**
* @return Current price
*/
public float getCurrentPrice() {
return price;
}
/**
* @return Currency of current price
*/
public String getPriceCurrency() {
return price_currency;
}
/**
* @return Purchase price
*/
public float getPurchasePrice() {
return purchase_price;
}
/**
* @return Currency of purchase price
*/
public String getPurchasePriceCurrency() {
return purchase_price_currency;
}
/**
* @return This flag indicates whether the security has already been marked as visited by the user
*/
public boolean isVisited() {
return visited;
}
/**
* @return Trading timestamp
*/
public Date getTradeTimestamp() {
return trade_timestamp;
}
/**
* @return Internal creation timestamp on the figo Connect server
*/
public Date getCreationTimestamp() {
return creation_timestamp;
}
/**
* @return Internal modification timestamp on the figo Connect server
*/
public Date getModificationTimestamp() {
return modification_timestamp;
}
/**
* Helper type to represent the actual answer from the figo API
*/
public class SecurityResponse {
/**
* List of transactions asked for
*/
@Expose
private List<Security> securities;
/**
* Synchronization status between figo and bank servers
*/
@Expose
private SynchronizationStatus status;
public SecurityResponse() {
}
/**
* @return the list of transactions asked for
*/
public List<Security> getSecurities() {
return securities;
}
/**
* @return the synchronization status between figo and bank servers
*/
public SynchronizationStatus getStatus() {
return status;
}
}
}
Neither in the docs.figo.io, nor in this SDK I can find information about possible names for categories. Have you thought about providing possible names as enum, and not just as strings?
FigoConnection.java
Base64.encodeBase64String(authInfo.getBytes());
FigoConnection.credentialLogin()
is supposed to take a username
as a parameter. For me, it only works with an email address. If the username is always an email address, this should be clearly documented.
Hi, the fingerprint of the Sandbox Endpoint isn't listed.
Please mention in the Sandbox Documentation that useres need to call
FigoTrustManager.addTrustedFingerprint("137AE242722970D5793F94192F1694083AAAED7B");
Or add the Key to the FigoTrustManager.
Thanks a lot.
Best Regards,
Christian.
Hello, when will 'java-figo' support encrypted credentials? Like:
{
"bank_code": "90090042",
"country": "de",
"credentials":
{
"type": "encrypted",
"value": "eyJhbGciOiJSU0ExXzUiLCJlbmMi..."
},
"sync_tasks": [
"standingOrders"
]
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.