MambuPy.api.interfaces
Interfaces for Mambu Objects.
Classes
An entity which can attach documents |
|
An entity which allows comments endpoints |
|
An entity which allows to be 'owned' by another. |
|
An entity which allows searching endpoint |
|
An entity which allows basic write operations |
- class MambuPy.api.interfaces.MambuAttachable[source]
Bases:
ABC
An entity which can attach documents
- __abstractmethods__ = frozenset({'attach_document'})
- __dict__ = mappingproxy({'__module__': 'MambuPy.api.interfaces', '__doc__': 'An entity which can attach documents', 'attach_document': <function MambuAttachable.attach_document>, '__dict__': <attribute '__dict__' of 'MambuAttachable' objects>, '__weakref__': <attribute '__weakref__' of 'MambuAttachable' objects>, '__abstractmethods__': frozenset({'attach_document'}), '_abc_impl': <_abc_data object>, '__annotations__': {}})
- __module__ = 'MambuPy.api.interfaces'
- __weakref__
list of weak references to the object (if defined)
- _abc_impl = <_abc_data object>
- class MambuPy.api.interfaces.MambuCommentable[source]
Bases:
ABC
An entity which allows comments endpoints
- __abstractmethods__ = frozenset({})
- __dict__ = mappingproxy({'__module__': 'MambuPy.api.interfaces', '__doc__': 'An entity which allows comments endpoints', 'get_comments': <function MambuCommentable.get_comments>, 'comment': <function MambuCommentable.comment>, '__dict__': <attribute '__dict__' of 'MambuCommentable' objects>, '__weakref__': <attribute '__weakref__' of 'MambuCommentable' objects>, '__abstractmethods__': frozenset(), '_abc_impl': <_abc_data object>, '__annotations__': {}})
- __module__ = 'MambuPy.api.interfaces'
- __weakref__
list of weak references to the object (if defined)
- _abc_impl = <_abc_data object>
- class MambuPy.api.interfaces.MambuHolder[source]
Bases:
ABC
- __abstractmethods__ = frozenset({})
- __dict__ = mappingproxy({'__module__': 'MambuPy.api.interfaces', '__doc__': '', '__dict__': <attribute '__dict__' of 'MambuHolder' objects>, '__weakref__': <attribute '__weakref__' of 'MambuHolder' objects>, '__abstractmethods__': frozenset(), '_abc_impl': <_abc_data object>, '__annotations__': {}})
- __module__ = 'MambuPy.api.interfaces'
- __weakref__
list of weak references to the object (if defined)
- _abc_impl = <_abc_data object>
- class MambuPy.api.interfaces.MambuOwnable[source]
Bases:
ABC
An entity which allows to be ‘owned’ by another.
An owned entity has an ‘accountHolderKey’ and ‘accountHolderType’ fields.
Because of that, you may call get_accountHolder on the owned entity to instantiate the MambuEntity who owns it.
- __abstractmethods__ = frozenset({})
- __dict__ = mappingproxy({'__module__': 'MambuPy.api.interfaces', '__doc__': "An entity which allows to be 'owned' by another.\n\n An owned entity has an 'accountHolderKey' and 'accountHolderType'\n fields.\n\n Because of that, you may call get_accountHolder on the owned\n entity to instantiate the MambuEntity who owns it.\n ", '_assignEntObjs': <function MambuOwnable._assignEntObjs>, '__dict__': <attribute '__dict__' of 'MambuOwnable' objects>, '__weakref__': <attribute '__weakref__' of 'MambuOwnable' objects>, '__abstractmethods__': frozenset(), '_abc_impl': <_abc_data object>, '__annotations__': {}})
- __module__ = 'MambuPy.api.interfaces'
- __weakref__
list of weak references to the object (if defined)
- _abc_impl = <_abc_data object>
- class MambuPy.api.interfaces.MambuOwner[source]
Bases:
ABC
- __abstractmethods__ = frozenset({})
- __dict__ = mappingproxy({'__module__': 'MambuPy.api.interfaces', '__doc__': '', '__dict__': <attribute '__dict__' of 'MambuOwner' objects>, '__weakref__': <attribute '__weakref__' of 'MambuOwner' objects>, '__abstractmethods__': frozenset(), '_abc_impl': <_abc_data object>, '__annotations__': {}})
- __module__ = 'MambuPy.api.interfaces'
- __weakref__
list of weak references to the object (if defined)
- _abc_impl = <_abc_data object>
- class MambuPy.api.interfaces.MambuSearchable[source]
Bases:
ABC
An entity which allows searching endpoint
- __abstractmethods__ = frozenset({'search'})
- __dict__ = mappingproxy({'__module__': 'MambuPy.api.interfaces', '__doc__': 'An entity which allows searching endpoint', 'search': <classmethod object>, '__dict__': <attribute '__dict__' of 'MambuSearchable' objects>, '__weakref__': <attribute '__weakref__' of 'MambuSearchable' objects>, '__abstractmethods__': frozenset({'search'}), '_abc_impl': <_abc_data object>, '__annotations__': {}})
- __module__ = 'MambuPy.api.interfaces'
- __weakref__
list of weak references to the object (if defined)
- _abc_impl = <_abc_data object>
- abstract classmethod search(filterCriteria=None, sortingCriteria=None, offset=None, limit=None, paginationDetails='OFF', detailsLevel='BASIC')[source]
search, several entities, filtering criteria allowed
- Parameters:
filterCriteria (list of dicts) – fields according to LoanAccountFilterCriteria schema
sortingCriteria (dict) – fields according to LoanAccountSortingCriteria
offset (int) – pagination, index to start searching
limit (int) – pagination, number of elements to retrieve
paginationDetails (str ON/OFF) – ask for details on pagination
detailsLevel (str BASIC/FULL) – ask for extra details or not
- Returns:
list of instances of an entity with data from Mambu
- class MambuPy.api.interfaces.MambuWritable[source]
Bases:
ABC
An entity which allows basic write operations
- __abstractmethods__ = frozenset({'create', 'patch', 'update'})
- __dict__ = mappingproxy({'__module__': 'MambuPy.api.interfaces', '__doc__': 'An entity which allows basic write operations', 'update': <function MambuWritable.update>, 'create': <function MambuWritable.create>, 'patch': <function MambuWritable.patch>, '__dict__': <attribute '__dict__' of 'MambuWritable' objects>, '__weakref__': <attribute '__weakref__' of 'MambuWritable' objects>, '__abstractmethods__': frozenset({'update', 'patch', 'create'}), '_abc_impl': <_abc_data object>, '__annotations__': {}})
- __module__ = 'MambuPy.api.interfaces'
- __weakref__
list of weak references to the object (if defined)
- _abc_impl = <_abc_data object>
- abstract create()[source]
creates a mambu entity
Uses the current values of the _attrs to send to Mambu. Pre-requires that CustomFields are updated previously. Post-requires that CustomFields are extracted again.
- abstract patch(fields=None, autodetect_remove=False)[source]
patches a mambu entity
Allows patching of parts of the entity up to Mambu.
fields is a list of the values in the _attrs that will be sent to Mambu
autodetect automatically searches for deleted fields and patches a remove in Mambu.
Pre-requires that CustomFields are updated previously. Post-requires that CustomFields are extracted again.
- Parameters:
fields (list of str) – list of ids of fields to explicitly patch
autodetect_remove (bool) – False: if deleted fields, don’t remove them True: if delete field, remove them
Autodetect operation, for any field (every field if fields param is None):
ADD: in attrs, but not in resp
REPLACE: in attrs, and in resp
REMOVE: not in attrs, but in resp
MOVE: not yet implemented (how to autodetect? request needs ‘from’ element)
- Raises:
MambuPyError – if field not in attrrs, and not in resp