MambuPy.rest.mambusavingtransaction

Mambu Saving Transaction objects.

MambuSavingTransaction holds a transaction from one saving account.

MambuSavingTransactions holds a list of saving account transaction.

Uses mambugeturl.getsavingstransactionsurl and as default urlfunc and mambugeturl.getsavingstransactionssearchurl as default url for search.

Classes

MambuSavingTransaction([urlfunc, entid])

A Transaction Channel from Mambu.

MambuSavingTransactions([urlfunc, entid, ...])

A list of Transaction Channels from Mambu.

MambuSavingsTransactionSearch([urlfunc, ...])

A list of Saving Transactions as found using the filter defined in the POST data.

class MambuPy.rest.mambusavingtransaction.MambuSavingTransaction(urlfunc=<function getsavingstransactionsurl>, entid='', *args, **kwargs)[source]

Bases: MambuStruct

A Transaction Channel from Mambu.

With the default urlfunc, entid argument must be the ID of the transaction channel you wish to retrieve.

__init__(urlfunc=<function getsavingstransactionsurl>, entid='', *args, **kwargs)[source]

Tasks done here:

Just initializes the MambuStruct.

__module__ = 'MambuPy.rest.mambusavingtransaction'
preprocess()[source]

Preprocessing.

Each active custom field is given a ‘name’ key that holds the field name, and for each keyed name, the value of the custom field is assigned.

class MambuPy.rest.mambusavingtransaction.MambuSavingTransactions(urlfunc=<function getsavingstransactionsurl>, entid='', itemclass=<class 'MambuPy.rest.mambusavingtransaction.MambuSavingTransaction'>, *args, **kwargs)[source]

Bases: MambuStruct

A list of Transaction Channels from Mambu.

With the default urlfunc, entid argument must be empty at instantiation time to retrieve all the transaction channels according to any other filter you send to the urlfunc.

__init__(urlfunc=<function getsavingstransactionsurl>, entid='', itemclass=<class 'MambuPy.rest.mambusavingtransaction.MambuSavingTransaction'>, *args, **kwargs)[source]

By default, entid argument is empty. That makes perfect sense: you want several groups, not just one.

__iter__()[source]
__module__ = 'MambuPy.rest.mambusavingtransaction'
convert_dict_to_attrs(*args, **kwargs)[source]

The trick for iterable Mambu Objects comes here:

You iterate over each element of the responded List from Mambu, and create a TransactionChannel (or your own itemclass) object for each one, initializing them one at a time, and changing the attrs attribute (which just holds a list of plain dictionaries) with a TransactionChannel (or your own itemclass) just created.

Todo

pass a valid (perhaps default) urlfunc, and its corresponding id to entid to each itemclass, telling MambuStruct not to connect() by default. It’s desirable to connect at any other further moment to refresh some element in the list.

class MambuPy.rest.mambusavingtransaction.MambuSavingsTransactionSearch(urlfunc=<function getsavingstransactionssearchurl>, entid='', itemclass=<class 'MambuPy.rest.mambusavingtransaction.MambuSavingTransaction'>, *args, **kwargs)[source]

Bases: MambuStruct

A list of Saving Transactions as found using the filter defined in the POST data.

__init__(urlfunc=<function getsavingstransactionssearchurl>, entid='', itemclass=<class 'MambuPy.rest.mambusavingtransaction.MambuSavingTransaction'>, *args, **kwargs)[source]

By default, entid argument is empty. That makes perfect sense: you want several groups, not just one.

__iter__()[source]
__module__ = 'MambuPy.rest.mambusavingtransaction'
convert_dict_to_attrs(*args, **kwargs)[source]

The trick for iterable Mambu Objects comes here:

You iterate over each element of the responded List from Mambu, and create a TransactionChannel (or your own itemclass) object for each one, initializing them one at a time, and changing the attrs attribute (which just holds a list of plain dictionaries) with a TransactionChannel (or your own itemclass) just created.

Todo

pass a valid (perhaps default) urlfunc, and its corresponding id to entid to each itemclass, telling MambuStruct not to connect() by default. It’s desirable to connect at any other further moment to refresh some element in the list.