mollie-api-haskell-2.0.0.0: Mollie API client for Haskell http://www.mollie.com

Safe HaskellNone
LanguageHaskell2010

Mollie.API.Chargebacks

Synopsis

Documentation

data ChargebackAPI route Source #

Instances
Generic (ChargebackAPI route) Source # 
Instance details

Defined in Mollie.API.Chargebacks

Associated Types

type Rep (ChargebackAPI route) :: Type -> Type #

Methods

from :: ChargebackAPI route -> Rep (ChargebackAPI route) x #

to :: Rep (ChargebackAPI route) x -> ChargebackAPI route #

type Rep (ChargebackAPI route) Source # 
Instance details

Defined in Mollie.API.Chargebacks

type Rep (ChargebackAPI route) = D1 (MetaData "ChargebackAPI" "Mollie.API.Chargebacks" "mollie-api-haskell-2.0.0.0-79op8QUDPdyAagRpBQOely" False) (C1 (MetaCons "ChargebackAPI" PrefixI True) (S1 (MetaSel (Just "getChargebacksPaginated") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (route :- ("chargebacks" :> (QueryParam "limit" Int :> (QueryParam "from" ChargebackId :> Get (HalJSON ': ([] :: [Type])) (List Chargeback)))))) :*: (S1 (MetaSel (Just "getChargebacks") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (route :- ("chargebacks" :> Get (HalJSON ': ([] :: [Type])) (List Chargeback)))) :*: S1 (MetaSel (Just "getChargeback") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (route :- ("payments" :> (Capture "paymentId" PaymentId :> ("chargebacks" :> (Capture "id" ChargebackId :> Get (HalJSON ': ([] :: [Type])) Chargeback)))))))))

getChargebacks :: ChargebackAPI route -> route :- ("chargebacks" :> Get '[HalJSON] (List Chargeback)) Source #

Handler to get a paginated list of chargebacks. Applies default pagination for newest 250 chargebacks. See https://docs.mollie.com/reference/v2/chargebacks-api/list-chargebacks

getChargebacksPaginated :: ChargebackAPI route -> route :- ("chargebacks" :> (QueryParam "limit" Int :> (QueryParam "from" ChargebackId :> Get '[HalJSON] (List Chargeback)))) Source #

Handler to get a paginated list of chargebacks. Offset the results by passing the last chargeback ID in the from query param. The chargeback with this ID is included in the result set as well. See https://docs.mollie.com/reference/v2/chargebacks-api/list-chargebacks

Example for fetching the last chargeback:

import Mollie.API
import Mollie.API.Chargebacks

env <- createEnv "test_mollieapikeyexample"
let chargebacksResult = runMollie env (getChargebacksPaginated chargebackClient (Just 1) Nothing)

getChargeback :: ChargebackAPI route -> route :- ("payments" :> (Capture "paymentId" PaymentId :> ("chargebacks" :> (Capture "id" ChargebackId :> Get '[HalJSON] Chargeback)))) Source #

Handler to get a specific chargeback for a specific payment. See https://docs.mollie.com/reference/v2/chargebacks-api/get-chargeback