"""
facilities for working with the Mandrill exports API
"""
import marshmallow
[docs]class MandrillExportResponseSchema(marshmallow.Schema):
"""
schema for Mandrill export API responses
"""
id = marshmallow.fields.String()
created_at = marshmallow.fields.DateTime(format='%Y-%m-%d %H:%M:%S')
type = marshmallow.fields.String(
validate=marshmallow.validate.OneOf(['activity', 'reject', 'whitelist']))
finished_at = marshmallow.fields.DateTime(
format='%Y-%m-%d %H:%M:%S', allow_none=True)
state = marshmallow.fields.String(
validate=marshmallow.validate.OneOf(
['waiting', 'working', 'complete', 'error', 'expired']))
result_url = marshmallow.fields.Url(allow_none=True)