stripe-core-2.0.0: Stripe API for Haskell - Pure Core

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

{-# LANGUAGE OverloadedStrings #-}
import Web.Stripe
import Web.Stripe.Charge
import Web.Stripe.Dispute

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

Synopsis

API

updateDispute Source

Arguments

:: ChargeId

The ID of the Charge being disputed

-> StripeRequest UpdateDispute 

Dispute to be updated

closeDispute Source

Arguments

:: ChargeId

The ID of the Charge being disputed

-> StripeRequest CloseDispute 

Dispute to be closed

Types