MangoPay/mangopay2-python-sdk — pull request #7 by dulaccc (2014-03-26 15:01:34+00:00)
Title: Enable the `RestTool` class to be customized

Add a proxy around the `RestTool` class to let the user swap it.

So with this Pull Request we can do something like

```python
from mangopaysdk.tools.resttool import BaseRestTool

class MyOwnRestTool(BaseRestTool):
def Request(self, *args, **kwargs):
logger.info("pre-request ...")
response = super(MyOwnRestTool, self).Request(*args, **kwargs
logger.info("post-request ...")
return response

Configuration.ClientID = '...'
Configuration.ClientPassword = '...'
Configuration.RestToolClass = MyOwnRestTool
```

An example of use case is if you want to log every request made and every response ever made by the mangopaysdk, now you can subclass the `BaseRestTool` like shown above and implement your logic.

I'll add some commits in this PR to improve the possible customizations.

Cheers