Safe Haskell | None |
---|---|
Language | Haskell2010 |
Stripe.Client
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
Constructors
TimeStamp | |
Fields |
data StripeList a #
A Vector
wrapper with an indication is there are more items available through pagination.
Constructors
StripeList | |
Instances
Eq a => Eq (StripeList a) | |
Defined in Stripe.Resources | |
Show a => Show (StripeList a) | |
Defined in Stripe.Resources Methods showsPrec :: Int -> StripeList a -> ShowS # show :: StripeList a -> String # showList :: [StripeList a] -> ShowS # | |
ToJSON a => ToJSON (StripeList a) | |
Defined in Stripe.Resources Methods 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 Methods 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 #
Constructors
Customer | |
data CustomerCreate #
Instances
data CustomerUpdate #
Instances
Product catalog
Constructors
ProductId | |
Fields
|
Instances
Eq ProductId | |
Show ProductId | |
ToJSON ProductId | |
Defined in Stripe.Resources | |
FromJSON ProductId | |
ToHttpApiData ProductId | |
Defined in Stripe.Resources Methods 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 Methods toUrlPiece :: PriceId -> Text # toEncodedUrlPiece :: PriceId -> Builder # toHeader :: PriceId -> ByteString # toQueryParam :: PriceId -> Text # |
Constructors
Product | |
Constructors
Price | |
data PriceRecurring #
Constructors
PriceRecurring | |
Fields
|
Instances
Eq PriceRecurring | |
Defined in Stripe.Resources Methods (==) :: PriceRecurring -> PriceRecurring -> Bool # (/=) :: PriceRecurring -> PriceRecurring -> Bool # | |
Show PriceRecurring | |
Defined in Stripe.Resources Methods showsPrec :: Int -> PriceRecurring -> ShowS # show :: PriceRecurring -> String # showList :: [PriceRecurring] -> ShowS # | |
ToJSON PriceRecurring | |
Defined in Stripe.Resources Methods toJSON :: PriceRecurring -> Value # toEncoding :: PriceRecurring -> Encoding # toJSONList :: [PriceRecurring] -> Value # toEncodingList :: [PriceRecurring] -> Encoding # | |
FromJSON PriceRecurring | |
Defined in Stripe.Resources Methods parseJSON :: Value -> Parser PriceRecurring # parseJSONList :: Value -> Parser [PriceRecurring] # |
data ProductCreate #
Constructors
ProductCreate | |
Fields
|
Instances
Eq ProductCreate | |
Defined in Stripe.Resources Methods (==) :: ProductCreate -> ProductCreate -> Bool # (/=) :: ProductCreate -> ProductCreate -> Bool # | |
Show ProductCreate | |
Defined in Stripe.Resources Methods showsPrec :: Int -> ProductCreate -> ShowS # show :: ProductCreate -> String # showList :: [ProductCreate] -> ShowS # | |
Generic ProductCreate | |
Defined in Stripe.Resources Associated Types type Rep ProductCreate :: Type -> Type # | |
ToForm ProductCreate | |
Defined in Stripe.Resources Methods toForm :: ProductCreate -> Form # | |
type Rep ProductCreate | |
Defined in Stripe.Resources type Rep ProductCreate = D1 ('MetaData "ProductCreate" "Stripe.Resources" "stripe-servant-0.1.0.0-92InT02jKzYFpHQerGtMmR" 'False) (C1 ('MetaCons "ProductCreate" 'PrefixI 'True) (S1 ('MetaSel ('Just "prcName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "prcDescription") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) |
data PriceCreate #
Constructors
PriceCreate | |
Fields |
Instances
data PriceCreateRecurring #
Constructors
PriceCreateRecurring | |
Fields
|
Instances
Eq PriceCreateRecurring | |
Defined in Stripe.Resources Methods (==) :: PriceCreateRecurring -> PriceCreateRecurring -> Bool # (/=) :: PriceCreateRecurring -> PriceCreateRecurring -> Bool # | |
Show PriceCreateRecurring | |
Defined in Stripe.Resources Methods 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 #
Constructors
SubscriptionId | |
Fields |
Instances
Eq SubscriptionId | |
Defined in Stripe.Resources Methods (==) :: SubscriptionId -> SubscriptionId -> Bool # (/=) :: SubscriptionId -> SubscriptionId -> Bool # | |
Show SubscriptionId | |
Defined in Stripe.Resources Methods showsPrec :: Int -> SubscriptionId -> ShowS # show :: SubscriptionId -> String # showList :: [SubscriptionId] -> ShowS # | |
ToJSON SubscriptionId | |
Defined in Stripe.Resources Methods toJSON :: SubscriptionId -> Value # toEncoding :: SubscriptionId -> Encoding # toJSONList :: [SubscriptionId] -> Value # toEncodingList :: [SubscriptionId] -> Encoding # | |
FromJSON SubscriptionId | |
Defined in Stripe.Resources Methods parseJSON :: Value -> Parser SubscriptionId # parseJSONList :: Value -> Parser [SubscriptionId] # | |
ToHttpApiData SubscriptionId | |
Defined in Stripe.Resources Methods toUrlPiece :: SubscriptionId -> Text # toEncodedUrlPiece :: SubscriptionId -> Builder # toHeader :: SubscriptionId -> ByteString # toQueryParam :: SubscriptionId -> Text # |
Customer Portal
newtype CustomerPortalId #
Constructors
CustomerPortalId | |
Fields |
Instances
Eq CustomerPortalId | |
Defined in Stripe.Resources Methods (==) :: CustomerPortalId -> CustomerPortalId -> Bool # (/=) :: CustomerPortalId -> CustomerPortalId -> Bool # | |
Show CustomerPortalId | |
Defined in Stripe.Resources Methods showsPrec :: Int -> CustomerPortalId -> ShowS # show :: CustomerPortalId -> String # showList :: [CustomerPortalId] -> ShowS # | |
ToJSON CustomerPortalId | |
Defined in Stripe.Resources Methods toJSON :: CustomerPortalId -> Value # toEncoding :: CustomerPortalId -> Encoding # toJSONList :: [CustomerPortalId] -> Value # toEncodingList :: [CustomerPortalId] -> Encoding # | |
FromJSON CustomerPortalId | |
Defined in Stripe.Resources Methods parseJSON :: Value -> Parser CustomerPortalId # parseJSONList :: Value -> Parser [CustomerPortalId] # | |
ToHttpApiData CustomerPortalId | |
Defined in Stripe.Resources Methods toUrlPiece :: CustomerPortalId -> Text # toEncodedUrlPiece :: CustomerPortalId -> Builder # toHeader :: CustomerPortalId -> ByteString # toQueryParam :: CustomerPortalId -> Text # |
data CustomerPortal #
Constructors
CustomerPortal | |
Fields
|
Instances
Eq CustomerPortal | |
Defined in Stripe.Resources Methods (==) :: CustomerPortal -> CustomerPortal -> Bool # (/=) :: CustomerPortal -> CustomerPortal -> Bool # | |
Show CustomerPortal | |
Defined in Stripe.Resources Methods showsPrec :: Int -> CustomerPortal -> ShowS # show :: CustomerPortal -> String # showList :: [CustomerPortal] -> ShowS # | |
ToJSON CustomerPortal | |
Defined in Stripe.Resources Methods toJSON :: CustomerPortal -> Value # toEncoding :: CustomerPortal -> Encoding # toJSONList :: [CustomerPortal] -> Value # toEncodingList :: [CustomerPortal] -> Encoding # | |
FromJSON CustomerPortal | |
Defined in Stripe.Resources Methods parseJSON :: Value -> Parser CustomerPortal # parseJSONList :: Value -> Parser [CustomerPortal] # |
data CustomerPortalCreate #
Constructors
CustomerPortalCreate | |
Fields |
Instances
createCustomerPortal :: StripeClient -> CustomerPortalCreate -> IO (Either ClientError CustomerPortal) Source #
Checkout
newtype CheckoutSessionId #
Constructors
CheckoutSessionId | |
Fields |
Instances
data CheckoutSession #
Constructors
CheckoutSession | |
Fields |
Instances
Eq CheckoutSession | |
Defined in Stripe.Resources Methods (==) :: CheckoutSession -> CheckoutSession -> Bool # (/=) :: CheckoutSession -> CheckoutSession -> Bool # | |
Show CheckoutSession | |
Defined in Stripe.Resources Methods showsPrec :: Int -> CheckoutSession -> ShowS # show :: CheckoutSession -> String # showList :: [CheckoutSession] -> ShowS # | |
ToJSON CheckoutSession | |
Defined in Stripe.Resources Methods toJSON :: CheckoutSession -> Value # toEncoding :: CheckoutSession -> Encoding # toJSONList :: [CheckoutSession] -> Value # toEncodingList :: [CheckoutSession] -> Encoding # | |
FromJSON CheckoutSession | |
Defined in Stripe.Resources Methods parseJSON :: Value -> Parser CheckoutSession # parseJSONList :: Value -> Parser [CheckoutSession] # |
data CheckoutSessionCreate #
Constructors
CheckoutSessionCreate | |
Fields |
Instances
data CheckoutSessionCreateLineItem #
Constructors
CheckoutSessionCreateLineItem | |
Fields |
Instances
Eq CheckoutSessionCreateLineItem | |
Defined in Stripe.Resources | |
Show CheckoutSessionCreateLineItem | |
Defined in Stripe.Resources Methods showsPrec :: Int -> CheckoutSessionCreateLineItem -> ShowS # show :: CheckoutSessionCreateLineItem -> String # showList :: [CheckoutSessionCreateLineItem] -> ShowS # | |
Generic CheckoutSessionCreateLineItem | |
Defined in Stripe.Resources Associated Types 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 #
Constructors
Event | |