Copyright | (c) David Johnson 2014 |
---|---|
Maintainer | djohnson.m@gmail.com |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
Web.Stripe.StripeRequest
Contents
Description
Synopsis
- data Method
- data Expandable id
- newtype ExpandParams = ExpandParams {
- getExpandParams :: [Text]
- newtype Param k v = Param (k, v)
- type Params = [(ByteString, ByteString)]
- data StripeRequest a = StripeRequest {}
- type family StripeReturn a :: *
- class ToStripeParam param => StripeHasParam request param
- class ToStripeParam param where
- toStripeParam :: param -> [(ByteString, ByteString)] -> [(ByteString, ByteString)]
- (-&-) :: StripeHasParam request param => StripeRequest request -> param -> StripeRequest request
- mkStripeRequest :: Method -> Text -> Params -> StripeRequest a
Types
HTTP Method
The other methods are not required by the Stripe API
data Expandable id Source #
a wrapper for fields which can either be an id or an expanded object
Instances
(Eq id, Eq (ExpandsTo id)) => Eq (Expandable id) Source # | |
Defined in Web.Stripe.Types Methods (==) :: Expandable id -> Expandable id -> Bool # (/=) :: Expandable id -> Expandable id -> Bool # | |
(Data id, Data (ExpandsTo id)) => Data (Expandable id) Source # | |
Defined in Web.Stripe.Types Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Expandable id -> c (Expandable id) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Expandable id) # toConstr :: Expandable id -> Constr # dataTypeOf :: Expandable id -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Expandable id)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Expandable id)) # gmapT :: (forall b. Data b => b -> b) -> Expandable id -> Expandable id # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Expandable id -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Expandable id -> r # gmapQ :: (forall d. Data d => d -> u) -> Expandable id -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Expandable id -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Expandable id -> m (Expandable id) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Expandable id -> m (Expandable id) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Expandable id -> m (Expandable id) # | |
(Ord id, Ord (ExpandsTo id)) => Ord (Expandable id) Source # | |
Defined in Web.Stripe.Types Methods compare :: Expandable id -> Expandable id -> Ordering # (<) :: Expandable id -> Expandable id -> Bool # (<=) :: Expandable id -> Expandable id -> Bool # (>) :: Expandable id -> Expandable id -> Bool # (>=) :: Expandable id -> Expandable id -> Bool # max :: Expandable id -> Expandable id -> Expandable id # min :: Expandable id -> Expandable id -> Expandable id # | |
(Read id, Read (ExpandsTo id)) => Read (Expandable id) Source # | |
Defined in Web.Stripe.Types Methods readsPrec :: Int -> ReadS (Expandable id) # readList :: ReadS [Expandable id] # readPrec :: ReadPrec (Expandable id) # readListPrec :: ReadPrec [Expandable id] # | |
(Show id, Show (ExpandsTo id)) => Show (Expandable id) Source # | |
Defined in Web.Stripe.Types Methods showsPrec :: Int -> Expandable id -> ShowS # show :: Expandable id -> String # showList :: [Expandable id] -> ShowS # | |
(FromJSON id, FromJSON (ExpandsTo id)) => FromJSON (Expandable id) Source # | JSON Instance for |
Defined in Web.Stripe.Types Methods parseJSON :: Value -> Parser (Expandable id) # parseJSONList :: Value -> Parser [Expandable id] # |
newtype ExpandParams Source #
Type of Expansion Parameters for use on Stripe
objects
Constructors
ExpandParams | |
Fields
|
Instances
used to set a specific key/value pair when the type is not enough
Constructors
Param (k, v) |
Instances
ToStripeParam (Param Text Text) Source # | |
Defined in Web.Stripe.StripeRequest Methods toStripeParam :: Param Text Text -> [(ByteString, ByteString)] -> [(ByteString, ByteString)] Source # |
type Params = [(ByteString, ByteString)] Source #
HTTP Params
data StripeRequest a Source #
Stripe Request holding Method
, URL and Params
for a Request. Also
includes the function needed to decode the response.
Constructors
StripeRequest | |
type family StripeReturn a :: * Source #
return type of stripe request
Instances
class ToStripeParam param => StripeHasParam request param Source #
indicate if a request allows an optional parameter
Instances
class ToStripeParam param where Source #
convert a parameter to a key/value
Methods
toStripeParam :: param -> [(ByteString, ByteString)] -> [(ByteString, ByteString)] Source #
Instances
(-&-) :: StripeHasParam request param => StripeRequest request -> param -> StripeRequest request Source #
add an optional parameter to a StripeRequest
mkStripeRequest :: Method -> Text -> Params -> StripeRequest a Source #
HTTP Params
helper function for building a StripeRequest