Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type ApiKey = Text
- data StripeClient
- makeStripeClient :: ApiKey -> Manager -> StripeClient
- newtype TimeStamp = TimeStamp {}
- data StripeList a = StripeList {}
- createCustomer :: StripeClient -> CustomerCreate -> IO (Either ClientError Customer)
- retrieveCustomer :: StripeClient -> CustomerId -> IO (Either ClientError Customer)
- updateCustomer :: StripeClient -> CustomerId -> CustomerUpdate -> IO (Either ClientError Customer)
- listCustomers :: StripeClient -> Maybe CustomerId -> IO (Either ClientError (StripeList Customer))
- data Customer = Customer {}
- data CustomerCreate = CustomerCreate {}
- data CustomerUpdate = CustomerUpdate {}
- newtype ProductId = ProductId {
- unProductId :: Text
- newtype PriceId = PriceId {}
- data Product = Product {}
- data Price = Price {}
- data PriceRecurring = PriceRecurring {
- prInterval :: Text
- prIntervalCount :: Int
- data ProductCreate = ProductCreate {
- prcName :: Text
- prcDescription :: Maybe Text
- data PriceCreate = PriceCreate {}
- data PriceCreateRecurring = PriceCreateRecurring {}
- createProduct :: StripeClient -> ProductCreate -> IO (Either ClientError Product)
- retrieveProduct :: StripeClient -> ProductId -> IO (Either ClientError Product)
- createPrice :: StripeClient -> PriceCreate -> IO (Either ClientError Price)
- retrievePrice :: StripeClient -> PriceId -> IO (Either ClientError Price)
- listPrices :: StripeClient -> Maybe Text -> IO (Either ClientError (StripeList Price))
- newtype SubscriptionId = SubscriptionId {}
- newtype CustomerPortalId = CustomerPortalId {}
- data CustomerPortal = CustomerPortal {}
- data CustomerPortalCreate = CustomerPortalCreate {}
- createCustomerPortal :: StripeClient -> CustomerPortalCreate -> IO (Either ClientError CustomerPortal)
- newtype CheckoutSessionId = CheckoutSessionId {}
- data CheckoutSession = CheckoutSession {}
- data CheckoutSessionCreate = CheckoutSessionCreate {}
- data CheckoutSessionCreateLineItem = CheckoutSessionCreateLineItem {}
- createCheckoutSession :: StripeClient -> CheckoutSessionCreate -> IO (Either ClientError CheckoutSession)
- retrieveCheckoutSession :: StripeClient -> CheckoutSessionId -> IO (Either ClientError CheckoutSession)
- retrieveEvent :: StripeClient -> EventId -> IO (Either ClientError Event)
- listEvents :: StripeClient -> Maybe EventId -> IO (Either ClientError (StripeList Event))
- data Event = Event {}
- data EventData = EventData {}
Basics
data StripeClient Source #
Holds a Manager
and your API key.
makeStripeClient :: ApiKey -> Manager -> StripeClient Source #
Construct a StripeClient
. Note that the passed Manager
must support https (e.g. via http-client-tls
)
Helper types
A UTCTime
wrapper that has unix timestamp JSON representation
data StripeList a #
A Vector
wrapper with an indication is there are more items available through pagination.
Instances
Eq a => Eq (StripeList a) | |
Defined in Stripe.Resources (==) :: StripeList a -> StripeList a -> Bool # (/=) :: StripeList a -> StripeList a -> Bool # | |
Show a => Show (StripeList a) | |
Defined in Stripe.Resources showsPrec :: Int -> StripeList a -> ShowS # show :: StripeList a -> String # showList :: [StripeList a] -> ShowS # | |
ToJSON a => ToJSON (StripeList a) | |
Defined in Stripe.Resources toJSON :: StripeList a -> Value # toEncoding :: StripeList a -> Encoding # toJSONList :: [StripeList a] -> Value # toEncodingList :: [StripeList a] -> Encoding # | |
FromJSON a => FromJSON (StripeList a) | |
Defined in Stripe.Resources parseJSON :: Value -> Parser (StripeList a) # parseJSONList :: Value -> Parser [StripeList a] # |
Customers
createCustomer :: StripeClient -> CustomerCreate -> IO (Either ClientError Customer) Source #
retrieveCustomer :: StripeClient -> CustomerId -> IO (Either ClientError Customer) Source #
updateCustomer :: StripeClient -> CustomerId -> CustomerUpdate -> IO (Either ClientError Customer) Source #
listCustomers :: StripeClient -> Maybe CustomerId -> IO (Either ClientError (StripeList Customer)) Source #
data CustomerCreate #
Instances
data CustomerUpdate #
Instances
Product catalog
Instances
Eq ProductId | |
Show ProductId | |
ToJSON ProductId | |
Defined in Stripe.Resources | |
FromJSON ProductId | |
ToHttpApiData ProductId | |
Defined in Stripe.Resources toUrlPiece :: ProductId -> Text # toEncodedUrlPiece :: ProductId -> Builder # toHeader :: ProductId -> ByteString # toQueryParam :: ProductId -> Text # |
Instances
Eq PriceId | |
Show PriceId | |
ToJSON PriceId | |
Defined in Stripe.Resources | |
FromJSON PriceId | |
ToHttpApiData PriceId | |
Defined in Stripe.Resources toUrlPiece :: PriceId -> Text # toEncodedUrlPiece :: PriceId -> Builder # toHeader :: PriceId -> ByteString # toQueryParam :: PriceId -> Text # |
data PriceRecurring #
Instances
Eq PriceRecurring | |
Defined in Stripe.Resources (==) :: PriceRecurring -> PriceRecurring -> Bool # (/=) :: PriceRecurring -> PriceRecurring -> Bool # | |
Show PriceRecurring | |
Defined in Stripe.Resources showsPrec :: Int -> PriceRecurring -> ShowS # show :: PriceRecurring -> String # showList :: [PriceRecurring] -> ShowS # | |
ToJSON PriceRecurring | |
Defined in Stripe.Resources toJSON :: PriceRecurring -> Value # toEncoding :: PriceRecurring -> Encoding # toJSONList :: [PriceRecurring] -> Value # toEncodingList :: [PriceRecurring] -> Encoding # | |
FromJSON PriceRecurring | |
Defined in Stripe.Resources parseJSON :: Value -> Parser PriceRecurring # parseJSONList :: Value -> Parser [PriceRecurring] # |
data ProductCreate #
Instances
data PriceCreate #
Instances
data PriceCreateRecurring #
Instances
Eq PriceCreateRecurring | |
Defined in Stripe.Resources (==) :: PriceCreateRecurring -> PriceCreateRecurring -> Bool # (/=) :: PriceCreateRecurring -> PriceCreateRecurring -> Bool # | |
Show PriceCreateRecurring | |
Defined in Stripe.Resources showsPrec :: Int -> PriceCreateRecurring -> ShowS # show :: PriceCreateRecurring -> String # showList :: [PriceCreateRecurring] -> ShowS # |
createProduct :: StripeClient -> ProductCreate -> IO (Either ClientError Product) Source #
retrieveProduct :: StripeClient -> ProductId -> IO (Either ClientError Product) Source #
createPrice :: StripeClient -> PriceCreate -> IO (Either ClientError Price) Source #
retrievePrice :: StripeClient -> PriceId -> IO (Either ClientError Price) Source #
listPrices :: StripeClient -> Maybe Text -> IO (Either ClientError (StripeList Price)) Source #
Subscriptions
newtype SubscriptionId #
Instances
Eq SubscriptionId | |
Defined in Stripe.Resources (==) :: SubscriptionId -> SubscriptionId -> Bool # (/=) :: SubscriptionId -> SubscriptionId -> Bool # | |
Show SubscriptionId | |
Defined in Stripe.Resources showsPrec :: Int -> SubscriptionId -> ShowS # show :: SubscriptionId -> String # showList :: [SubscriptionId] -> ShowS # | |
ToJSON SubscriptionId | |
Defined in Stripe.Resources toJSON :: SubscriptionId -> Value # toEncoding :: SubscriptionId -> Encoding # toJSONList :: [SubscriptionId] -> Value # toEncodingList :: [SubscriptionId] -> Encoding # | |
FromJSON SubscriptionId | |
Defined in Stripe.Resources parseJSON :: Value -> Parser SubscriptionId # parseJSONList :: Value -> Parser [SubscriptionId] # | |
ToHttpApiData SubscriptionId | |
Defined in Stripe.Resources toUrlPiece :: SubscriptionId -> Text # toEncodedUrlPiece :: SubscriptionId -> Builder # toHeader :: SubscriptionId -> ByteString # toQueryParam :: SubscriptionId -> Text # |
Customer Portal
newtype CustomerPortalId #
Instances
Eq CustomerPortalId | |
Defined in Stripe.Resources (==) :: CustomerPortalId -> CustomerPortalId -> Bool # (/=) :: CustomerPortalId -> CustomerPortalId -> Bool # | |
Show CustomerPortalId | |
Defined in Stripe.Resources showsPrec :: Int -> CustomerPortalId -> ShowS # show :: CustomerPortalId -> String # showList :: [CustomerPortalId] -> ShowS # | |
ToJSON CustomerPortalId | |
Defined in Stripe.Resources toJSON :: CustomerPortalId -> Value # toEncoding :: CustomerPortalId -> Encoding # toJSONList :: [CustomerPortalId] -> Value # toEncodingList :: [CustomerPortalId] -> Encoding # | |
FromJSON CustomerPortalId | |
Defined in Stripe.Resources parseJSON :: Value -> Parser CustomerPortalId # parseJSONList :: Value -> Parser [CustomerPortalId] # | |
ToHttpApiData CustomerPortalId | |
Defined in Stripe.Resources toUrlPiece :: CustomerPortalId -> Text # toEncodedUrlPiece :: CustomerPortalId -> Builder # toHeader :: CustomerPortalId -> ByteString # toQueryParam :: CustomerPortalId -> Text # |
data CustomerPortal #
CustomerPortal | |
|
Instances
Eq CustomerPortal | |
Defined in Stripe.Resources (==) :: CustomerPortal -> CustomerPortal -> Bool # (/=) :: CustomerPortal -> CustomerPortal -> Bool # | |
Show CustomerPortal | |
Defined in Stripe.Resources showsPrec :: Int -> CustomerPortal -> ShowS # show :: CustomerPortal -> String # showList :: [CustomerPortal] -> ShowS # | |
ToJSON CustomerPortal | |
Defined in Stripe.Resources toJSON :: CustomerPortal -> Value # toEncoding :: CustomerPortal -> Encoding # toJSONList :: [CustomerPortal] -> Value # toEncodingList :: [CustomerPortal] -> Encoding # | |
FromJSON CustomerPortal | |
Defined in Stripe.Resources parseJSON :: Value -> Parser CustomerPortal # parseJSONList :: Value -> Parser [CustomerPortal] # |
data CustomerPortalCreate #
Instances
createCustomerPortal :: StripeClient -> CustomerPortalCreate -> IO (Either ClientError CustomerPortal) Source #
Checkout
newtype CheckoutSessionId #
Instances
Eq CheckoutSessionId | |
Defined in Stripe.Resources (==) :: CheckoutSessionId -> CheckoutSessionId -> Bool # (/=) :: CheckoutSessionId -> CheckoutSessionId -> Bool # | |
Show CheckoutSessionId | |
Defined in Stripe.Resources showsPrec :: Int -> CheckoutSessionId -> ShowS # show :: CheckoutSessionId -> String # showList :: [CheckoutSessionId] -> ShowS # | |
ToJSON CheckoutSessionId | |
Defined in Stripe.Resources toJSON :: CheckoutSessionId -> Value # toEncoding :: CheckoutSessionId -> Encoding # toJSONList :: [CheckoutSessionId] -> Value # toEncodingList :: [CheckoutSessionId] -> Encoding # | |
FromJSON CheckoutSessionId | |
Defined in Stripe.Resources parseJSON :: Value -> Parser CheckoutSessionId # parseJSONList :: Value -> Parser [CheckoutSessionId] # | |
ToHttpApiData CheckoutSessionId | |
Defined in Stripe.Resources toUrlPiece :: CheckoutSessionId -> Text # toEncodedUrlPiece :: CheckoutSessionId -> Builder # toHeader :: CheckoutSessionId -> ByteString # toQueryParam :: CheckoutSessionId -> Text # |
data CheckoutSession #
Instances
Eq CheckoutSession | |
Defined in Stripe.Resources (==) :: CheckoutSession -> CheckoutSession -> Bool # (/=) :: CheckoutSession -> CheckoutSession -> Bool # | |
Show CheckoutSession | |
Defined in Stripe.Resources showsPrec :: Int -> CheckoutSession -> ShowS # show :: CheckoutSession -> String # showList :: [CheckoutSession] -> ShowS # | |
ToJSON CheckoutSession | |
Defined in Stripe.Resources toJSON :: CheckoutSession -> Value # toEncoding :: CheckoutSession -> Encoding # toJSONList :: [CheckoutSession] -> Value # toEncodingList :: [CheckoutSession] -> Encoding # | |
FromJSON CheckoutSession | |
Defined in Stripe.Resources parseJSON :: Value -> Parser CheckoutSession # parseJSONList :: Value -> Parser [CheckoutSession] # |
data CheckoutSessionCreate #
Instances
data CheckoutSessionCreateLineItem #
Instances
Eq CheckoutSessionCreateLineItem | |
Defined in Stripe.Resources | |
Show CheckoutSessionCreateLineItem | |
Defined in Stripe.Resources showsPrec :: Int -> CheckoutSessionCreateLineItem -> ShowS # show :: CheckoutSessionCreateLineItem -> String # showList :: [CheckoutSessionCreateLineItem] -> ShowS # | |
Generic CheckoutSessionCreateLineItem | |
Defined in Stripe.Resources type Rep CheckoutSessionCreateLineItem :: Type -> Type # | |
type Rep CheckoutSessionCreateLineItem | |
Defined in Stripe.Resources type Rep CheckoutSessionCreateLineItem = D1 ('MetaData "CheckoutSessionCreateLineItem" "Stripe.Resources" "stripe-servant-0.1.0.0-92InT02jKzYFpHQerGtMmR" 'False) (C1 ('MetaCons "CheckoutSessionCreateLineItem" 'PrefixI 'True) (S1 ('MetaSel ('Just "cscliPrice") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 PriceId) :*: S1 ('MetaSel ('Just "cscliQuantity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Integer))) |
createCheckoutSession :: StripeClient -> CheckoutSessionCreate -> IO (Either ClientError CheckoutSession) Source #
retrieveCheckoutSession :: StripeClient -> CheckoutSessionId -> IO (Either ClientError CheckoutSession) Source #
Events
retrieveEvent :: StripeClient -> EventId -> IO (Either ClientError Event) Source #
listEvents :: StripeClient -> Maybe EventId -> IO (Either ClientError (StripeList Event)) Source #