sumup / sumup-android-sdk

Sample App for the SumUp Android SDK
Other
100 stars 29 forks source link

TransactionInfo does not let you access products because Product is a nested private class #125

Open Bas94 opened 4 years ago

Bas94 commented 4 years ago

TransactionInfo returns you some information about one transaction you did. You can access every detail (like used card, transaction code, merchant code, amount, vat amount and tip amount) but one.

getProducts() seems to let you access all the products processed in this transaction. If you look closer, you see that Product is a private class of TransactionInfo:

public class TransactionInfo implements Parcelable {
...
    public List<TransactionInfo.Product> getProducts() {
        return this.mProducts;
    }
    ...
    private static class Product implements Parcelable {
    ...
    }
}

This way you get no access to the data behind Product. Please make this public like the Card class which is also nested within TransactionInfo.