stripe-haskell-0.1.4.2: Stripe API for Haskell

Copyright(c) David Johnson, 2014
Maintainerdjohnson.m@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Web.Stripe.Event

Contents

Description

https://stripe.com/docs/api#events

import Web.Stripe         
import Web.Stripe.Event

main :: IO ()
main = do
  let config = SecretKey "secret_key"
  result <- stripe config $ getEvents Nothing Nothing Nothing
  case result of
    Right events     -> print events
    Left stripeError -> print stripeError

Synopsis

API

getEvent Source

Arguments

:: EventId

The ID of the Event to retrieve

-> Stripe Event 

Event to retrieve by EventId

getEvents Source

Arguments

:: Maybe Limit

Defaults to 10 if Nothing specified

-> StartingAfter EventId

Paginate starting after the following EventId

-> EndingBefore EventId

Paginate ending before the following EventId

-> Stripe (StripeList Event) 

StripeList of Events to retrieve

Types

newtype EventId Source

Constructors

EventId Text 

Instances

data StripeList a Source

Generic handling of Stripe JSON arrays

Constructors

StripeList 

Fields

list :: [a]
 
stripeUrl :: Text
 
object :: Text
 
totalCount :: Maybe Int
 
hasMore :: Bool
 

Instances

Eq a => Eq (StripeList a) 
Show a => Show (StripeList a) 
FromJSON a => FromJSON (StripeList a)

JSON Instance for StripeList

type Limit = Maybe Int Source

Pagination Option for StripeList