module Network.API.Mandrill.Messages where
import qualified Data.Text as T
import Data.Time
import Network.API.Mandrill.HTTP
import Network.API.Mandrill.Messages.Types
import Network.API.Mandrill.Settings
import Network.API.Mandrill.Types
import Network.HTTP.Client
send :: MandrillKey
-> MandrillMessage
-> Maybe Bool
-> Maybe T.Text
-> Maybe UTCTime
-> Maybe Manager
-> IO (MandrillResponse [MessagesResponse])
send k msg async ip_pool send_at = toMandrillResponse MessagesSend (MessagesSendRq k msg async ip_pool send_at)
sendTemplate :: MandrillKey
-> MandrillTemplate
-> [MandrillTemplateContent]
-> MandrillMessage
-> Maybe Bool
-> Maybe T.Text
-> Maybe UTCTime
-> Maybe Manager
-> IO (MandrillResponse [MessagesResponse])
sendTemplate k template content msg async ip_pool send_at = toMandrillResponse MessagesSendTemplate (MessagesSendTemplateRq k template content msg async ip_pool send_at)