twilio-0.3.0.0: Twilio REST API library for Haskell

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

Twilio.Accounts

Contents

Description

 
Synopsis

Resource

get :: MonadThrow m => TwilioT m Accounts Source #

Get Accounts.

For example, you can fetch the Accounts resource in the IO monad as follows:

module Main where import Control.Monad.IO.Class (liftIO) import System.Environment (getEnv) import Twilio.Accounts as Accounts import Twilio.Types -- | Print accounts. main :: IO () main = runTwilio' (getEnv "ACCOUNT_SID") (getEnv "AUTH_TOKEN") $ Accounts.get >>= liftIO . print

createSubAccount Source #

Arguments

:: MonadThrow m 
=> Maybe Text

A human readable description of the new subaccount, up to 64 characters. Defaults to "SubAccount Created at {YYYY-MM-DD HH:MM meridian}".

-> TwilioT m Account 

Create a new Account instance resource as a subaccount of the one used to make the request.

For example, you can create a subaccount, "foo", as follows:

module Main where import Control.Monad.IO.Class (liftIO) import System.Environment (getEnv) import Twilio.Accounts (createSubAccount) import Twilio.Types -- | Create and print a subaccount, "foo". main :: IO () main = runTwilio' (getEnv "ACCOUNT_SID") (getEnv "AUTH_TOKEN") $ createSubAccount (Just "foo") >>= liftIO . print

Orphan instances

Post0 Account Source # 
Instance details

Post1 Text Account Source # 
Instance details

Post1 (Maybe Text) Account Source # 
Instance details