recurly-client-0.0.0.1: Client for Recurly subscription management
Safe HaskellSafe-Inferred
LanguageHaskell2010

RecurlyClient.Operations.Cancel_subscription

Description

Contains the different functions to run the operation cancel_subscription

Synopsis

Documentation

cancel_subscription Source #

Arguments

:: 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.

Constructors

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.

cancel_subscriptionWithConfiguration Source #

Arguments

:: 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 #

Arguments

:: 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 #

Arguments

:: 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.