Copyright | (c) David Johnson, 2014 |
---|---|
Maintainer | djohnson.m@gmail.com |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
- 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
(Eq id, Eq (ExpandsTo id)) => Eq (Expandable id) Source | |
(Data id, Data (ExpandsTo id)) => Data (Expandable id) Source | |
(Ord id, Ord (ExpandsTo id)) => Ord (Expandable id) Source | |
(Read id, Read (ExpandsTo id)) => Read (Expandable id) Source | |
(Show id, Show (ExpandsTo id)) => Show (Expandable id) Source | |
(FromJSON id, FromJSON (ExpandsTo id)) => FromJSON (Expandable id) Source | JSON Instance for |
newtype ExpandParams Source
Type of Expansion Parameters for use on Stripe
objects
used to set a specific key/value pair when the type is not enough
Param (k, v) |
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.
type family StripeReturn a :: * Source
return type of stripe request
class ToStripeParam param => StripeHasParam request param Source
indicate if a request allows an optional parameter
class ToStripeParam param where Source
convert a parameter to a key/value
toStripeParam :: param -> [(ByteString, ByteString)] -> [(ByteString, ByteString)] Source
(-&-) :: 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