Giter Site home page Giter Site logo

java-figo's People

Contributors

02strich avatar achimsen avatar alexkorotkikh avatar andreysaksonov avatar asbachb avatar berend avatar christianhuening avatar cyroxx avatar danielseligmann avatar figoproduct avatar halber avatar javaes avatar mrh-line avatar tobieiss avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

java-figo's Issues

web_demo: purpose text not shown

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>

Support /rest/catalog/banks

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"
      }
   ]

NumberFormatException: null - for additional_info.original_amount

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?

Allow to skip artifacts signing during build

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.

Deploy current version to maven

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

Remove eclipse artifacts and add them to gitignore

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.

Why is 'getTaskState(String tokenId,String pin)' deprecated

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.

Changed fingerprint

Hello, the changed fingerprint for SHA1 certificate is not listed in FigoTrustManager. API is currently not working

Support submission of payments in non-interactive mode

Currently FigoSession returns the URL to be opened in a web browser when submitPaymentis used to submit a Payment.

For non-browserclients it is necessary to return the TaskTokenResponseinstead of the url to be able to monitor the task state.

Improve error handling

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

  • missing exception message
    • often there is only a description and no message, which means the Exception.message is null (maybe have a fall back to the description?)
  • missing error code
    • handling is difficult as the error_code is often part of the message (404 = 1002 etc)
  • missing data
    • in case of schema errors there is no way to tell what is wrong based on the description

Most of these problems could be solved simply by returning the ErrorObject, and adding data to it.

NullPointerException in Error Logging

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();

Import of securities does not work

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;
        }
    }
}

Category names as enum

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?

Fingerprint of the Sandbox isn't listed

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.

Support of encryption

Hello, when will 'java-figo' support encrypted credentials? Like:

{
"bank_code": "90090042",
"country": "de",
"credentials":
{
"type": "encrypted",
"value": "eyJhbGciOiJSU0ExXzUiLCJlbmMi..."
},

"sync_tasks": [
"standingOrders"
]
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.