Add Specific Errors

Add more specific errors for Emarsys to throw.
Merge pull request #1 from DSmedley1989/change-errors

Add Specific Errors
SHOP-1007: BAU: Add timeout to emarsys

Added timepout param to call function
Added optional timeout param to __init__, defaults to None
Merge pull request #2 from danyilmaz/master

SHOP-1007: BAU: Add timeout to emarsys
HOTFIX[SHOP-1007]: BAU: Add timeout to emarsys

Added timeout param to call function so we can deal with situations
where Emarsys takes too long to respond
Added optional timeout param to __init__, defaults to None
Merge pull request #4 from danyilmaz/fixes

HOTFIX[SHOP-1007]: BAU: Add timeout to emarsys
Work around https://github.com/eugene-wee/python-emarsys/issues/1
Silence flake8
api.Emarsys.Error has been errors.EmarsysError

since 201a762cf1f81ef7204e468f1aab9dcb0842417e
Be reliable about the type of EmarsysError.code

Since code can be a string or an int, you'd usually save it as an int in
some kind of log. For Django ORM records, the value is coerced to a string
only when it's saved to the database, and then subsequently retrieved. As
long as you're using the same fresh object you initially assigned the code
to, it's still an int. So if you want to check for error code 2008, you
have to check for the int 2008 if you use the fresh object, and for the
string '2008' if it's an object retrieved from the database. Or you try to
convert to an int and have to handle ValueError. All that's a code smell.
Version 0.2