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

RecurlyClient.Operations.Terminate_subscription

Description

Contains the different functions to run the operation terminate_subscription

Synopsis

Documentation

terminate_subscription Source #

Arguments

:: forall m. MonadHTTP m 
=> Terminate_subscriptionParameters

Contains all available parameters of this operation (query and path parameters)

-> ClientT m (Response Terminate_subscriptionResponse)

Monadic computation which returns the result of the operation

DELETE /subscriptions/{subscription_id}

Immediately expires the subscription.

If the subscription has a paid invoice you may choose to refund all, part or none of last invoice's amount.

data Terminate_subscriptionParameters Source #

Defines the object schema located at paths./subscriptions/{subscription_id}.DELETE.parameters in the specification.

Constructors

Terminate_subscriptionParameters 

Fields

  • terminate_subscriptionParametersPathSubscription_id :: Text

    pathSubscription_id: Represents the parameter named 'subscription_id'

    Subscription ID or UUID. For ID no prefix is used e.g. `e28zov4fw0v2`. For UUID use prefix `uuid-`, e.g. `uuid-123457890`.

  • terminate_subscriptionParametersQueryCharge :: Maybe Bool

    queryCharge: Represents the parameter named 'charge'

    Applicable only if the subscription has usage based add-ons and unbilled usage logged for the current billing cycle. If true, current billing cycle unbilled usage is billed on the final invoice. If false, Recurly will create a negative usage record for current billing cycle usage that will zero out the final invoice line items.

  • terminate_subscriptionParametersQueryRefund :: Maybe Terminate_subscriptionParametersQueryRefund

    queryRefund: Represents the parameter named 'refund'

    The type of refund to perform:

    • `full` - Performs a full refund of the last invoice for the current subscription term.
    • `partial` - Prorates a refund based on the amount of time remaining in the current bill cycle.
    • `none` - Terminates the subscription without a refund.

    In the event that the most recent invoice is a $0 invoice paid entirely by credit, Recurly will apply the credit back to the customer’s account.

    You may also terminate a subscription with no refund and then manually refund specific invoices.

data Terminate_subscriptionParametersQueryRefund Source #

Defines the enum schema located at paths./subscriptions/{subscription_id}.DELETE.parameters.properties.queryRefund in the specification.

Represents the parameter named 'refund'

The type of refund to perform:

  • `full` - Performs a full refund of the last invoice for the current subscription term.
  • `partial` - Prorates a refund based on the amount of time remaining in the current bill cycle.
  • `none` - Terminates the subscription without a refund.

In the event that the most recent invoice is a $0 invoice paid entirely by credit, Recurly will apply the credit back to the customer’s account.

You may also terminate a subscription with no refund and then manually refund specific invoices.

Constructors

Terminate_subscriptionParametersQueryRefundOther Value

This case is used if the value encountered during decoding does not match any of the provided cases in the specification.

Terminate_subscriptionParametersQueryRefundTyped Text

This constructor can be used to send values to the server which are not present in the specification yet.

Terminate_subscriptionParametersQueryRefundEnumFull

Represents the JSON value "full"

Terminate_subscriptionParametersQueryRefundEnumNone

Represents the JSON value "none"

Terminate_subscriptionParametersQueryRefundEnumPartial

Represents the JSON value "partial"

data Terminate_subscriptionResponse Source #

Represents a response of the operation terminate_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), Terminate_subscriptionResponseError is used.

Constructors

Terminate_subscriptionResponseError String

Means either no matching case available or a parse error

Terminate_subscriptionResponse200 Subscription

An expired subscription.

Terminate_subscriptionResponse404 Error

Incorrect site ID or subscription ID.

Terminate_subscriptionResponse422 Error

A validation error such as "Cannot expire an inactive subscription." or "Please provide valid values for these parameters: refund."

Terminate_subscriptionResponseDefault Error

Unexpected error.

terminate_subscriptionWithConfiguration Source #

Arguments

:: forall m. MonadHTTP m 
=> Configuration

The configuration to use in the request

-> Terminate_subscriptionParameters

Contains all available parameters of this operation (query and path parameters)

-> m (Response Terminate_subscriptionResponse)

Monadic computation which returns the result of the operation

DELETE /subscriptions/{subscription_id}

The same as terminate_subscription but accepts an explicit configuration.

terminate_subscriptionRaw Source #

Arguments

:: forall m. MonadHTTP m 
=> Terminate_subscriptionParameters

Contains all available parameters of this operation (query and path parameters)

-> ClientT m (Response ByteString)

Monadic computation which returns the result of the operation

DELETE /subscriptions/{subscription_id}

The same as terminate_subscription but returns the raw ByteString.

terminate_subscriptionWithConfigurationRaw Source #

Arguments

:: forall m. MonadHTTP m 
=> Configuration

The configuration to use in the request

-> Terminate_subscriptionParameters

Contains all available parameters of this operation (query and path parameters)

-> m (Response ByteString)

Monadic computation which returns the result of the operation

DELETE /subscriptions/{subscription_id}

The same as terminate_subscription but accepts an explicit configuration and returns the raw ByteString.