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.Dispute

Contents

Description

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

import Web.Stripe         
import Web.Stripe.Charge
import Web.Stripe.Dispute

main :: IO ()
main = do
  let config = SecretKey "secret_key"
  result <- stripe config $ do
    Charge { chargeDispute = dispute } <- getCharge (ChargeId "charge_id")
    return dispute
  case result of
    Right (Just dispute) -> print dispute
    Right Nothing        -> print "no dispute on this charge"
    Left  stripeError    -> print stripeError

Synopsis

API

updateDispute Source

Arguments

:: ChargeId

The ID of the Charge being disputed

-> Maybe Evidence

Text-only evidence of the dispute

-> MetaData

MetaData associated with Dispute

-> Stripe Dispute 

Dispute to be updated

closeDispute Source

Arguments

:: ChargeId

The ID of the Charge being disputed

-> Stripe Dispute 

Dispute to be closed

Types

data ChargeId Source

ChargeId associated with a Charge

Instances

newtype Evidence Source

Evidence associated with a Dispute

Constructors

Evidence Text 

Instances