Skip to content

Commit 3079a7e

Browse files
committed
Stripe.cancelSubscription
1 parent d386fe1 commit 3079a7e

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

pub/stripe-hs/src/Stripe/Client.hs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ module Stripe.Client
4747
SubscriptionCreateItem (..),
4848
createSubscription,
4949
retrieveSubscription,
50+
cancelSubscription,
5051
listSubscriptions,
5152

5253
-- * Customer Portal
@@ -153,6 +154,7 @@ EP (listPrices, Maybe T.Text, (StripeList Price))
153154

154155
EP (createSubscription, SubscriptionCreate, Subscription)
155156
EP (retrieveSubscription, SubscriptionId, Subscription)
157+
EP (cancelSubscription, SubscriptionId, Subscription)
156158
EP (listSubscriptions, Maybe CustomerId, (StripeList Subscription))
157159

158160
EP (createCheckoutSession, CheckoutSessionCreate, CheckoutSession)
@@ -166,7 +168,11 @@ EP (listEvents, Maybe EventId, (StripeList Event))
166168
(createCustomer' :<|> retrieveCustomer' :<|> updateCustomer' :<|> listCustomers')
167169
:<|> (createProduct' :<|> retrieveProduct')
168170
:<|> (createPrice' :<|> retrievePrice' :<|> listPrices')
169-
:<|> (createSubscription' :<|> retrieveSubscription' :<|> listSubscriptions')
171+
:<|> ( createSubscription'
172+
:<|> retrieveSubscription'
173+
:<|> cancelSubscription'
174+
:<|> listSubscriptions'
175+
)
170176
:<|> (createCheckoutSession' :<|> retrieveCheckoutSession')
171177
:<|> (createCustomerPortal')
172178
:<|> (retrieveEvent' :<|> listEvents') =

pub/stripe-servant/src/Stripe/Api.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ type SubscriptionApi =
5454
:<|> StripeAuth
5555
:> Capture ":subscription_id" SubscriptionId
5656
:> Get '[JSON] Subscription
57+
:<|> StripeAuth
58+
:> Capture ":subscription_id" SubscriptionId
59+
:> Delete '[JSON] Subscription
5760
:<|> StripeAuth
5861
:> QueryParam "customer" CustomerId
5962
:> Get '[JSON] (StripeList Subscription)

0 commit comments

Comments
 (0)