MambuPy.rest.mambutransactionchannel

Mambu Transaction Channel objects.

MambuTansactionChannel holds a transaction channel.

MambuTansactionChannels holds a list of transaction channels.

Uses mambugeturl.gettransactionchannelsurl as default urlfunc.

Classes

MambuTransactionChannel([urlfunc, entid])

A Transaction Channel from Mambu.

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

A list of Transaction Channels from Mambu.

class MambuPy.rest.mambutransactionchannel.MambuTransactionChannel(urlfunc=<function gettransactionchannelsurl>, 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 gettransactionchannelsurl>, entid='', *args, **kwargs)[source]

Tasks done here:

Just initializes the MambuStruct.

__module__ = 'MambuPy.rest.mambutransactionchannel'
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.mambutransactionchannel.MambuTransactionChannels(urlfunc=<function gettransactionchannelsurl>, entid='', itemclass=<class 'MambuPy.rest.mambutransactionchannel.MambuTransactionChannel'>, *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 gettransactionchannelsurl>, entid='', itemclass=<class 'MambuPy.rest.mambutransactionchannel.MambuTransactionChannel'>, *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.mambutransactionchannel'
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.