| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
RecurlyClient.Operations.Terminate_subscription
Description
Contains the different functions to run the operation terminate_subscription
Synopsis
- terminate_subscription :: forall m. MonadHTTP m => Terminate_subscriptionParameters -> ClientT m (Response Terminate_subscriptionResponse)
- data Terminate_subscriptionParameters = Terminate_subscriptionParameters {}
- mkTerminate_subscriptionParameters :: Text -> Terminate_subscriptionParameters
- data Terminate_subscriptionParametersQueryRefund
- data Terminate_subscriptionResponse
- terminate_subscriptionWithConfiguration :: forall m. MonadHTTP m => Configuration -> Terminate_subscriptionParameters -> m (Response Terminate_subscriptionResponse)
- terminate_subscriptionRaw :: forall m. MonadHTTP m => Terminate_subscriptionParameters -> ClientT m (Response ByteString)
- terminate_subscriptionWithConfigurationRaw :: forall m. MonadHTTP m => Configuration -> Terminate_subscriptionParameters -> m (Response ByteString)
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
| |
Instances
mkTerminate_subscriptionParameters Source #
Arguments
| :: Text | |
| -> Terminate_subscriptionParameters |
Create a new Terminate_subscriptionParameters with all required fields.
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 |
| Terminate_subscriptionParametersQueryRefundEnumNone | Represents the JSON value |
| Terminate_subscriptionParametersQueryRefundEnumPartial | Represents the JSON value |
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. |
Instances
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.