MambuPy.rest1to2.mambuloan
Classes
|
|
|
- class MambuPy.rest1to2.mambuloan.MambuLoan(*args, **kwargs)[source]
Bases:
MambuStruct
,MambuLoan
- DEFAULTS = {'notes': ''}
- __module__ = 'MambuPy.rest1to2.mambuloan'
- _get_roles(fullDetails=True, *args, **kwargs)[source]
Get a list of roles and clients for the loan account.
The roles are mentionend in the holder of the loan account.
The holder acquires a “roles” property, a list of dictionaries with the following keys:
role (str): role name client (obj): MambuClient that has the mentioned role
- Parameters:
fullDetails (bool) – whether instantiate clients with full details or not
- Returns:
int - number of requests done to Mambu
- property feesBalance
- property feesPaid
- property interestBalance
- property penaltyBalance
- property penaltyPaid
- property principalBalance
- property repaymentInstallments
- property repaymentPeriodCount
- property repaymentPeriodUnit
- setActivities(*args, **kwargs)[source]
Adds the activities for this loan to a ‘activities’ field.
Activities are MambuActivity objects.
Activities get sorted by activity timestamp.
Returns the number of requests done to Mambu.
- setProduct(*args, **kwargs)[source]
Adds the product for this loan to a ‘product’ field.
Product is a MambuProduct object.
cache argument allows to use AllMambuProducts singleton to retrieve the products. See mambuproduct.AllMambuProducts code and pydoc for further information.
Returns the number of requests done to Mambu.
- setRepayments(*args, **kwargs)[source]
Adds the repayments for this loan to a ‘repayments’ field.
Repayments are MambuRepayment objects.
Repayments get sorted by due date.
Returns the number of requests done to Mambu.
Todo
since pagination logic was added, is not always true that just 1 request was done. It may be more! But since request counter singleton holds true information about how many requests were done to Mambu, in fact this return value may be obsolete
- setTransactions(*args, **kwargs)[source]
Adds the transactions for this loan to a ‘transactions’ field.
Transactions are MambuTransaction objects.
Transactions get sorted by transaction id.
Returns the number of requests done to Mambu.
Todo
since pagination logic was added, is not always true that just 1 request was done. It may be more! But since request counter singleton holds true information about how many requests were done to Mambu, in fact this return value may be obsolete