stripe-core-2.6.1: 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

newtype ChargeId Source #

ChargeId associated with a Charge

Constructors

ChargeId Text 
Instances
Eq ChargeId Source # 
Instance details

Defined in Web.Stripe.Types

Data ChargeId Source # 
Instance details

Defined in Web.Stripe.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ChargeId -> c ChargeId #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ChargeId #

toConstr :: ChargeId -> Constr #

dataTypeOf :: ChargeId -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ChargeId) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ChargeId) #

gmapT :: (forall b. Data b => b -> b) -> ChargeId -> ChargeId #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ChargeId -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ChargeId -> r #

gmapQ :: (forall d. Data d => d -> u) -> ChargeId -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ChargeId -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ChargeId -> m ChargeId #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ChargeId -> m ChargeId #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ChargeId -> m ChargeId #

Ord ChargeId Source # 
Instance details

Defined in Web.Stripe.Types

Read ChargeId Source # 
Instance details

Defined in Web.Stripe.Types

Show ChargeId Source # 
Instance details

Defined in Web.Stripe.Types

FromJSON ChargeId Source #

JSON Instance for ChargeId

Instance details

Defined in Web.Stripe.Types

ToStripeParam ChargeId Source # 
Instance details

Defined in Web.Stripe.StripeRequest

StripeHasParam GetApplicationFees ChargeId Source # 
Instance details

Defined in Web.Stripe.ApplicationFee

StripeHasParam GetCharges (EndingBefore ChargeId) Source # 
Instance details

Defined in Web.Stripe.Charge

StripeHasParam GetCharges (StartingAfter ChargeId) Source # 
Instance details

Defined in Web.Stripe.Charge

type ExpandsTo ChargeId Source # 
Instance details

Defined in Web.Stripe.Types

data Dispute Source #

Dispute Object

Instances
Eq Dispute Source # 
Instance details

Defined in Web.Stripe.Types

Methods

(==) :: Dispute -> Dispute -> Bool #

(/=) :: Dispute -> Dispute -> Bool #

Data Dispute Source # 
Instance details

Defined in Web.Stripe.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Dispute -> c Dispute #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Dispute #

toConstr :: Dispute -> Constr #

dataTypeOf :: Dispute -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Dispute) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Dispute) #

gmapT :: (forall b. Data b => b -> b) -> Dispute -> Dispute #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Dispute -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Dispute -> r #

gmapQ :: (forall d. Data d => d -> u) -> Dispute -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Dispute -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Dispute -> m Dispute #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Dispute -> m Dispute #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Dispute -> m Dispute #

Ord Dispute Source # 
Instance details

Defined in Web.Stripe.Types

Read Dispute Source # 
Instance details

Defined in Web.Stripe.Types

Show Dispute Source # 
Instance details

Defined in Web.Stripe.Types

FromJSON Dispute Source #

JSON Instance for Dispute

Instance details

Defined in Web.Stripe.Types

data DisputeReason Source #

Reason of a Dispute

Instances
Eq DisputeReason Source # 
Instance details

Defined in Web.Stripe.Types

Data DisputeReason Source # 
Instance details

Defined in Web.Stripe.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DisputeReason -> c DisputeReason #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DisputeReason #

toConstr :: DisputeReason -> Constr #

dataTypeOf :: DisputeReason -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DisputeReason) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DisputeReason) #

gmapT :: (forall b. Data b => b -> b) -> DisputeReason -> DisputeReason #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DisputeReason -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DisputeReason -> r #

gmapQ :: (forall d. Data d => d -> u) -> DisputeReason -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DisputeReason -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DisputeReason -> m DisputeReason #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DisputeReason -> m DisputeReason #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DisputeReason -> m DisputeReason #

Ord DisputeReason Source # 
Instance details

Defined in Web.Stripe.Types

Read DisputeReason Source # 
Instance details

Defined in Web.Stripe.Types

Show DisputeReason Source # 
Instance details

Defined in Web.Stripe.Types

FromJSON DisputeReason Source #

JSON Instance for DisputeReason

Instance details

Defined in Web.Stripe.Types

data DisputeStatus Source #

Status of a Dispute

Instances
Eq DisputeStatus Source # 
Instance details

Defined in Web.Stripe.Types

Data DisputeStatus Source # 
Instance details

Defined in Web.Stripe.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DisputeStatus -> c DisputeStatus #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DisputeStatus #

toConstr :: DisputeStatus -> Constr #

dataTypeOf :: DisputeStatus -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DisputeStatus) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DisputeStatus) #

gmapT :: (forall b. Data b => b -> b) -> DisputeStatus -> DisputeStatus #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DisputeStatus -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DisputeStatus -> r #

gmapQ :: (forall d. Data d => d -> u) -> DisputeStatus -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DisputeStatus -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DisputeStatus -> m DisputeStatus #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DisputeStatus -> m DisputeStatus #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DisputeStatus -> m DisputeStatus #

Ord DisputeStatus Source # 
Instance details

Defined in Web.Stripe.Types

Read DisputeStatus Source # 
Instance details

Defined in Web.Stripe.Types

Show DisputeStatus Source # 
Instance details

Defined in Web.Stripe.Types

FromJSON DisputeStatus Source #

JSON Instance for DisputeStatus

Instance details

Defined in Web.Stripe.Types

newtype Evidence Source #

Evidence associated with a Dispute

Constructors

Evidence Text 
Instances
Eq Evidence Source # 
Instance details

Defined in Web.Stripe.Types

Data Evidence Source # 
Instance details

Defined in Web.Stripe.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Evidence -> c Evidence #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Evidence #

toConstr :: Evidence -> Constr #

dataTypeOf :: Evidence -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Evidence) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Evidence) #

gmapT :: (forall b. Data b => b -> b) -> Evidence -> Evidence #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Evidence -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Evidence -> r #

gmapQ :: (forall d. Data d => d -> u) -> Evidence -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Evidence -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Evidence -> m Evidence #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Evidence -> m Evidence #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Evidence -> m Evidence #

Ord Evidence Source # 
Instance details

Defined in Web.Stripe.Types

Read Evidence Source # 
Instance details

Defined in Web.Stripe.Types

Show Evidence Source # 
Instance details

Defined in Web.Stripe.Types

ToStripeParam Evidence Source # 
Instance details

Defined in Web.Stripe.StripeRequest

StripeHasParam UpdateDispute Evidence Source # 
Instance details

Defined in Web.Stripe.Dispute

newtype MetaData Source #

Type of MetaData for use on Stripe objects

Constructors

MetaData [(Text, Text)] 
Instances
Eq MetaData Source # 
Instance details

Defined in Web.Stripe.Types

Data MetaData Source # 
Instance details

Defined in Web.Stripe.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MetaData -> c MetaData #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c MetaData #

toConstr :: MetaData -> Constr #

dataTypeOf :: MetaData -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c MetaData) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c MetaData) #

gmapT :: (forall b. Data b => b -> b) -> MetaData -> MetaData #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MetaData -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MetaData -> r #

gmapQ :: (forall d. Data d => d -> u) -> MetaData -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> MetaData -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> MetaData -> m MetaData #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MetaData -> m MetaData #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MetaData -> m MetaData #

Ord MetaData Source # 
Instance details

Defined in Web.Stripe.Types

Read MetaData Source # 
Instance details

Defined in Web.Stripe.Types

Show MetaData Source # 
Instance details

Defined in Web.Stripe.Types

FromJSON MetaData Source # 
Instance details

Defined in Web.Stripe.Types

ToStripeParam MetaData Source # 
Instance details

Defined in Web.Stripe.StripeRequest

StripeHasParam UpdateTransfer MetaData Source # 
Instance details

Defined in Web.Stripe.Transfer

StripeHasParam CreateTransfer MetaData Source # 
Instance details

Defined in Web.Stripe.Transfer

StripeHasParam UpdateSubscription MetaData Source # 
Instance details

Defined in Web.Stripe.Subscription

StripeHasParam CreateSubscription MetaData Source # 
Instance details

Defined in Web.Stripe.Subscription

StripeHasParam UpdateRefund MetaData Source # 
Instance details

Defined in Web.Stripe.Refund

StripeHasParam CreateRefund MetaData Source # 
Instance details

Defined in Web.Stripe.Refund

StripeHasParam UpdateRecipient MetaData Source # 
Instance details

Defined in Web.Stripe.Recipient

StripeHasParam CreateRecipient MetaData Source # 
Instance details

Defined in Web.Stripe.Recipient

StripeHasParam UpdatePlan MetaData Source # 
Instance details

Defined in Web.Stripe.Plan

StripeHasParam CreatePlan MetaData Source # 
Instance details

Defined in Web.Stripe.Plan

StripeHasParam UpdateInvoiceItem MetaData Source # 
Instance details

Defined in Web.Stripe.InvoiceItem

StripeHasParam CreateInvoiceItem MetaData Source # 
Instance details

Defined in Web.Stripe.InvoiceItem

StripeHasParam UpdateInvoice MetaData Source # 
Instance details

Defined in Web.Stripe.Invoice

StripeHasParam CreateInvoice MetaData Source # 
Instance details

Defined in Web.Stripe.Invoice

StripeHasParam UpdateDispute MetaData Source # 
Instance details

Defined in Web.Stripe.Dispute

StripeHasParam UpdateCustomer MetaData Source # 
Instance details

Defined in Web.Stripe.Customer

StripeHasParam CreateCustomer MetaData Source # 
Instance details

Defined in Web.Stripe.Customer

StripeHasParam UpdateCoupon MetaData Source # 
Instance details

Defined in Web.Stripe.Coupon

StripeHasParam CreateCoupon MetaData Source # 
Instance details

Defined in Web.Stripe.Coupon

StripeHasParam UpdateCharge MetaData Source # 
Instance details

Defined in Web.Stripe.Charge

StripeHasParam CreateCharge MetaData Source # 
Instance details

Defined in Web.Stripe.Charge

StripeHasParam UpdateApplicationFeeRefund MetaData Source # 
Instance details

Defined in Web.Stripe.ApplicationFeeRefund

StripeHasParam CreateApplicationFeeRefund MetaData Source # 
Instance details

Defined in Web.Stripe.ApplicationFeeRefund