stripe-haskell-0.1.3.0: Stripe API for Haskell

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

Web.Stripe.Balance

Contents

Description

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

import Web.Stripe         
import Web.Stripe.Balance (getBalance)

main :: IO ()
main = do
  let config = SecretKey "secret_key"
  result <- stripe config getBalance
  case result of
    Right balance    -> print balance 
    Left stripeError -> print stripeError

Synopsis

API

getBalance :: Stripe Balance Source

Retrieve the current Balance for your Stripe account

getBalanceTransactionExpandable Source

Arguments

:: TransactionId

The TransactionId of the Transaction to retrieve

-> ExpandParams

The ExpandParams of the object to be expanded

-> Stripe BalanceTransaction 

getBalanceTransactionHistory Source

Arguments

:: Limit

Defaults to 10 if Nothing specified

-> StartingAfter TransactionId

Paginate starting after the following TransactionId

-> EndingBefore TransactionId

Paginate ending before the following TransactionId

-> Stripe (StripeList BalanceTransaction) 

Retrieve the history of BalanceTransactions

Types

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 EndingBefore a = Maybe a Source

Pagination Option for StripeList

type StartingAfter a = Maybe a Source

Pagination Option for StripeList

type Limit = Maybe Int Source

Pagination Option for StripeList