twiml-0.2.1.0: TwiML library for Haskell

Copyright(C) 2018 Mark Andrus Roberts
LicenseBSD-style (see the file LICENSE)
MaintainerMark Andrus Roberts <markandrusroberts@gmail.com>
Stabilityprovisional
Safe HaskellNone
LanguageHaskell98

Text.XML.Twiml.Verbs.Enqueue

Description

The example in this file assumes

{-# LANGUAGE RebindableSyntax #-}
{-# LANGUAGE RecordWildCards #-}

import Prelude
import Control.Lens
import Data.Default
import Text.XML.Twiml
import qualified Text.XML.Twiml.Syntax as Twiml

For more information, refer to Twilio's TwiML Reference for <Enqueue>.

Synopsis

Documentation

enqueue :: IsTwimlLike f Enqueue => String -> EnqueueAttributes -> TwimlLike f Enqueue () Source #

Enqueue a caller in a queue. Example:

>>> :{
let example :: VoiceTwiml
    example =
      voiceResponse $ do
        enqueue "support" $ def & waitURL .~ parseURL "wait-music.xml"
        end
      where Twiml.Syntax{..} = def
:}
>>> putStr $ show example
<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Enqueue waitUrl="wait-music.xml">support</Enqueue>
</Response>

data EnqueueF (i :: [Type]) a Source #

Instances

Functor (EnqueueF i) Source # 

Methods

fmap :: (a -> b) -> EnqueueF i a -> EnqueueF i b #

(<$) :: a -> EnqueueF i b -> EnqueueF i a #

Functor1 [Type] EnqueueF Source # 

Methods

fmap1 :: (a -> b) -> f i a -> f i b Source #

Show a => Show (EnqueueF i a) Source # 

Methods

showsPrec :: Int -> EnqueueF i a -> ShowS #

show :: EnqueueF i a -> String #

showList :: [EnqueueF i a] -> ShowS #

ToXML a => ToXML (EnqueueF i a) Source # 

Methods

toXML :: EnqueueF i a -> [Element] Source #

data EnqueueAttributes Source #

Instances

Eq EnqueueAttributes Source # 
Data EnqueueAttributes Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> EnqueueAttributes -> c EnqueueAttributes #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c EnqueueAttributes #

toConstr :: EnqueueAttributes -> Constr #

dataTypeOf :: EnqueueAttributes -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c EnqueueAttributes) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c EnqueueAttributes) #

gmapT :: (forall b. Data b => b -> b) -> EnqueueAttributes -> EnqueueAttributes #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> EnqueueAttributes -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> EnqueueAttributes -> r #

gmapQ :: (forall d. Data d => d -> u) -> EnqueueAttributes -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> EnqueueAttributes -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> EnqueueAttributes -> m EnqueueAttributes #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> EnqueueAttributes -> m EnqueueAttributes #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> EnqueueAttributes -> m EnqueueAttributes #

Ord EnqueueAttributes Source # 
Read EnqueueAttributes Source # 
Show EnqueueAttributes Source # 
Generic EnqueueAttributes Source # 
Default EnqueueAttributes Source # 
NFData EnqueueAttributes Source # 

Methods

rnf :: EnqueueAttributes -> () #

ToAttrs EnqueueAttributes Source # 
HasMethod EnqueueAttributes (Maybe Method) Source # 
HasAction EnqueueAttributes (Maybe URL) Source # 
HasWaitURL EnqueueAttributes (Maybe URL) Source # 
HasWaitMethod EnqueueAttributes (Maybe Method) Source # 
type Rep EnqueueAttributes Source # 
type Rep EnqueueAttributes = D1 * (MetaData "EnqueueAttributes" "Text.XML.Twiml.Internal.Twiml" "twiml-0.2.1.0-8vOgp92H6HZKjscJQqq5Ao" False) (C1 * (MetaCons "EnqueueAttributes" PrefixI True) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_enqueueAction") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe URL))) (S1 * (MetaSel (Just Symbol "_enqueueMethod") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Method)))) ((:*:) * (S1 * (MetaSel (Just Symbol "_enqueueWaitURL") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe URL))) (S1 * (MetaSel (Just Symbol "_enqueueWaitMethod") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Method))))))