{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeFamilies #-}
module Web.Stripe.ApplicationFee
(
GetApplicationFee
, getApplicationFee
, GetApplicationFees
, getApplicationFees
, ApplicationId (..)
, ApplicationFee (..)
, ApplicationFeeId (..)
, ChargeId (..)
, ConnectApp (..)
, Created (..)
, EndingBefore (..)
, FeeId (..)
, Limit (..)
, StartingAfter (..)
, StripeList (..)
, ExpandParams (..)
) where
import Web.Stripe.StripeRequest (Method (GET), StripeHasParam,
StripeRequest (..), StripeReturn,
mkStripeRequest)
import Web.Stripe.Util ((</>))
import Web.Stripe.Types (ApplicationFee (..),
ApplicationFeeId (..),
ApplicationId (..), ChargeId(..),
ConnectApp (..), Created(..),
EndingBefore(..), ExpandParams(..),
FeeId (..), Limit(..),
StartingAfter(..), ExpandParams(..),
StripeList (..))
getApplicationFee
:: FeeId
-> StripeRequest GetApplicationFee
getApplicationFee
(FeeId feeid) = request
where request = mkStripeRequest GET url params
url = "application_fees" </> feeid
params = []
data GetApplicationFee
type instance StripeReturn GetApplicationFee = ApplicationFee
instance StripeHasParam GetApplicationFee ExpandParams
getApplicationFees
:: StripeRequest GetApplicationFees
getApplicationFees
= request
where request = mkStripeRequest GET url params
url = "application_fees"
params = []
data GetApplicationFees
type instance StripeReturn GetApplicationFees = (StripeList ApplicationFee)
instance StripeHasParam GetApplicationFees ExpandParams
instance StripeHasParam GetApplicationFees ChargeId
instance StripeHasParam GetApplicationFees Created
instance StripeHasParam GetApplicationFees (EndingBefore ApplicationFeeId)
instance StripeHasParam GetApplicationFees Limit
instance StripeHasParam GetApplicationFees (StartingAfter ApplicationFeeId)