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

RecurlyClient.Operations.Create_subscription_change

Description

Contains the different functions to run the operation create_subscription_change

Synopsis

Documentation

create_subscription_change 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`.

-> SubscriptionChangeCreate

The request body to send

-> ClientT m (Response Create_subscription_changeResponse)

Monadic computation which returns the result of the operation

POST /subscriptions/{subscription_id}/change

Calling this will overwrite an existing, pending subscription change.

If a subscription has a pending change, and a change is submitted which matches the subscription as it currently exists, the pending change will be deleted, and you will receive a 204 No Content response.

If a subscription has no pending change, and a change is submitted which matches the subscription as it currently exists, a 422 Unprocessable Entity validation error will be returned.

data Create_subscription_changeResponse Source #

Represents a response of the operation create_subscription_change.

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), Create_subscription_changeResponseError is used.

Constructors

Create_subscription_changeResponseError String

Means either no matching case available or a parse error

Create_subscription_changeResponse201 SubscriptionChange

A subscription change.

Create_subscription_changeResponse204

The previous pending change was reverted.

Create_subscription_changeResponse404 Error

Incorrect site ID.

Create_subscription_changeResponse422 ErrorMayHaveTransaction

A validation error such as "Subscription hasn't been changed" or error running the verification transaction.

Create_subscription_changeResponseDefault Error

Unexpected error.

create_subscription_changeWithConfiguration 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`.

-> SubscriptionChangeCreate

The request body to send

-> m (Response Create_subscription_changeResponse)

Monadic computation which returns the result of the operation

POST /subscriptions/{subscription_id}/change

The same as create_subscription_change but accepts an explicit configuration.

create_subscription_changeRaw 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`.

-> SubscriptionChangeCreate

The request body to send

-> ClientT m (Response ByteString)

Monadic computation which returns the result of the operation

POST /subscriptions/{subscription_id}/change

The same as create_subscription_change but returns the raw ByteString.

create_subscription_changeWithConfigurationRaw 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`.

-> SubscriptionChangeCreate

The request body to send

-> m (Response ByteString)

Monadic computation which returns the result of the operation

POST /subscriptions/{subscription_id}/change

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