fineract-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nazeer Shaik <nazeer.sh...@confluxtechnologies.com>
Subject Re: All Share Accounts
Date Fri, 13 May 2016 11:14:03 GMT
Hi Terence,

Can you tell me what is the use case to have all share accounts? Currently
it is implemented per client basis as I don't really find use of returning
all share accounts.

We are returning truncated data as data size will be more in case of
returning all share products and client is not really going to use entire
available data. In case of single product we are returning the complete
data.

Thanks,
Nazeer


On Fri, May 13, 2016 at 4:31 PM, Terence Monteiro <
terence@sanjosesolutions.in> wrote:

> Hi Nazeer,
>
> Thanks for your response. I'm aware this is one way of getting the share
> accounts for an individual client. I wanted to know if there is a way to
> get for all clients. For instance if I GET
> /fineract-provider/api/v1/savingsaccounts, I get all the savings accounts.
> One use case of this is where say out of 5000 clients 5 have share
> accounts. If I had to do a per client method, I'd have to make 5000
> requests. But I'd like a way to query all share accounts of all clients in
> a single query - in this case I should get 5 share accounts returned and
> since each has a clientId. Also considering the REST pattern, if
> /path/to/resource/<resourceId> gives me a single resource object, then
> /path/to/resource should give me all the objects of that resource.
>
> A second question I have is regarding the get all share products API. This
> currently returns a truncated set of fields. Let's say I have 1 share
> product only on the server. If I do GET
> /fineract-provider/api/v1/products/share I get:
>
> {
>     "totalFilteredRecords": 1,
>     "pageItems": [
>         {
>             "id": 2,
>             "name": "SACCO Shares",
>             "shortName": "SAS",
>             "totalShares": 100000
>         }
>     ]
> }
>
> However, if I do /fineract-provider/api/v1/products/share/2 , I get the
> full product:
>
> {
>     "id": 2,
>     "name": "SACCO Shares",
>     "shortName": "SAS",
>     "description": "k-Mayra SACCO Shares",
>     "currency": {
>         "code": "ETB",
>         "name": "Ethiopian Birr",
>         "decimalPlaces": 2,
>         "inMultiplesOf": 10,
>         "nameCode": "currency.ETB",
>         "displayLabel": "Ethiopian Birr [ETB]"
>     },
>     "totalShares": 100000,
>     "totalSharesIssued": 10000,
>     "unitPrice": 5,
>     "shareCapital": 50000,
>     "minimumShares": 1,
>     "nominalShares": 10,
>     "maximumShares": 1000,
>     "marketPrice": [],
>     "charges": [],
>     "allowDividendCalculationForInactiveClients": false,
>     "lockinPeriod": 0,
>     "lockPeriodTypeEnum": {
>         "id": 4,
>         "code": "savingsPeriodFrequencyType.invalid",
>         "value": "Invalid"
>     },
>     "minimumActivePeriod": 0,
>     "minimumActivePeriodForDividendsTypeEnum": {
>         "id": 0,
>         "code": "savings.lockin.savingsPeriodFrequencyType.days",
>         "value": "Days"
>     },
>     "accountingRule": {
>         "id": 1,
>         "code": "accountingRuleType.none",
>         "value": "NONE"
>     }
> }
>
> So in the former query, lot of information is missing.
>
> --
> Best Regards,
> Terence Monteiro,
> Mob: +91 96633 13728
> www.sanjosesol.com
>
> <http://goog_1610728024>
> "Providence", No. 36,
> Ahmed Sait Road,
> Frazer Town, Bangalore - 5.
>
> On Fri, May 13, 2016 at 4:19 PM, Nazeer Shaik <
> nazeer.shaik@confluxtechnologies.com> wrote:
>
> > Hi Terrence,
> >
> > As part of existing API, you can get share accounts along with other
> > accounts for selected client.
> >
> > https://localhost:8443/fineract-provider/api/v1/clients/1/accounts
> >
> > The response :
> >
> > {
> >     "loanAccounts": [],
> >     "savingsAccounts": [],
> >     "shareAccounts": []
> > }
> >
> > Thanks,
> > Nazeer
> >
> > On Fri, May 13, 2016 at 4:08 PM, Terence Monteiro <
> > terence@sanjosesolutions.in> wrote:
> >
> > > Hi Devs,
> > >
> > > Is there a way to get all the share accounts similar to the savings and
> > > loan accounts if I don't have the share account id and I want to full
> > list?
> > > I'm able to get a single share account with:
> > >
> > > GET /accounts/share/<accountId>
> > >
> > > However, if I skip the accountId, I get:
> > >
> > > {
> > >     "timestamp": 1463135795016,
> > >     "status": 500,
> > >     "error": "Internal Server Error",
> > >     "exception": "java.lang.NullPointerException",
> > >     "message": null
> > > }
> > >
> > > Can you confirm whether this is issue is known or whether it needs to
> be
> > > tracked.
> > >
> > > --
> > > Best Regards,
> > > Terence Monteiro,
> > > Mob: +91 96633 13728
> > > www.sanjosesol.com
> > >
> > > <http://goog_1610728024>
> > > "Providence", No. 36,
> > > Ahmed Sait Road,
> > > Frazer Town, Bangalore - 5.
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message