Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Contains the different functions to run the operation cancel_subscription
Synopsis
- cancel_subscription :: forall m. MonadHTTP m => Text -> Maybe SubscriptionCancel -> ClientT m (Response Cancel_subscriptionResponse)
- data Cancel_subscriptionResponse
- cancel_subscriptionWithConfiguration :: forall m. MonadHTTP m => Configuration -> Text -> Maybe SubscriptionCancel -> m (Response Cancel_subscriptionResponse)
- cancel_subscriptionRaw :: forall m. MonadHTTP m => Text -> Maybe SubscriptionCancel -> ClientT m (Response ByteString)
- cancel_subscriptionWithConfigurationRaw :: forall m. MonadHTTP m => Configuration -> Text -> Maybe SubscriptionCancel -> m (Response ByteString)
Documentation
:: forall m. MonadHTTP m | |
=> Text | subscription_id: Subscription ID or UUID. For ID no prefix is used e.g. `e28zov4fw0v2`. For UUID use prefix `uuid-`, e.g. `uuid-123457890`. |
-> Maybe SubscriptionCancel | The request body to send |
-> ClientT m (Response Cancel_subscriptionResponse) | Monadic computation which returns the result of the operation |
PUT /subscriptions/{subscription_id}/cancel
A canceled subscription will continue through its current billing cycle. At the end of the current billing cycle the subscription will expire and the customer will no longer be billed. Canceled subscriptions can be reactivated until the end of the billing cycle. When a future subscription (`state=future`) is canceled it becomes failed `state=failed` and cannot be reactivated.
data Cancel_subscriptionResponse Source #
Represents a response of the operation cancel_subscription
.
The response constructor is chosen by the status code of the response. If no case matches (no specific case for the response code, no range case, no default case), Cancel_subscriptionResponseError
is used.
Cancel_subscriptionResponseError String | Means either no matching case available or a parse error |
Cancel_subscriptionResponse200 Subscription | A canceled or failed subscription. |
Cancel_subscriptionResponse404 Error | Incorrect site or subscription ID. |
Cancel_subscriptionResponse422 Error | A validation error such as "Only active and future subscriptions can be canceled". |
Cancel_subscriptionResponseDefault Error | Unexpected error. |
Instances
cancel_subscriptionWithConfiguration Source #
:: forall m. MonadHTTP m | |
=> Configuration | The configuration to use in the request |
-> Text | subscription_id: Subscription ID or UUID. For ID no prefix is used e.g. `e28zov4fw0v2`. For UUID use prefix `uuid-`, e.g. `uuid-123457890`. |
-> Maybe SubscriptionCancel | The request body to send |
-> m (Response Cancel_subscriptionResponse) | Monadic computation which returns the result of the operation |
PUT /subscriptions/{subscription_id}/cancel
The same as cancel_subscription
but accepts an explicit configuration.
cancel_subscriptionRaw Source #
:: forall m. MonadHTTP m | |
=> Text | subscription_id: Subscription ID or UUID. For ID no prefix is used e.g. `e28zov4fw0v2`. For UUID use prefix `uuid-`, e.g. `uuid-123457890`. |
-> Maybe SubscriptionCancel | The request body to send |
-> ClientT m (Response ByteString) | Monadic computation which returns the result of the operation |
PUT /subscriptions/{subscription_id}/cancel
The same as cancel_subscription
but returns the raw ByteString
.
cancel_subscriptionWithConfigurationRaw Source #
:: forall m. MonadHTTP m | |
=> Configuration | The configuration to use in the request |
-> Text | subscription_id: Subscription ID or UUID. For ID no prefix is used e.g. `e28zov4fw0v2`. For UUID use prefix `uuid-`, e.g. `uuid-123457890`. |
-> Maybe SubscriptionCancel | The request body to send |
-> m (Response ByteString) | Monadic computation which returns the result of the operation |
PUT /subscriptions/{subscription_id}/cancel
The same as cancel_subscription
but accepts an explicit configuration and returns the raw ByteString
.