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

RecurlyClient.Operations.Create_plan_add_on

Description

Contains the different functions to run the operation create_plan_add_on

Synopsis

Documentation

create_plan_add_on Source #

Arguments

:: forall m. MonadHTTP m 
=> Text

plan_id: Plan ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-gold`.

-> AddOnCreate

The request body to send

-> ClientT m (Response Create_plan_add_onResponse)

Monadic computation which returns the result of the operation

POST /plans/{plan_id}/add_ons

Create an add-on

data Create_plan_add_onResponse Source #

Represents a response of the operation create_plan_add_on.

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_plan_add_onResponseError is used.

Constructors

Create_plan_add_onResponseError String

Means either no matching case available or a parse error

Create_plan_add_onResponse201 AddOn

An add-on.

Create_plan_add_onResponse404 Error

Incorrect site ID or plan ID.

Create_plan_add_onResponse422 Error

A validation error such as 'Code has already been taken.'

Create_plan_add_onResponseDefault Error

Unexpected error.

create_plan_add_onWithConfiguration Source #

Arguments

:: forall m. MonadHTTP m 
=> Configuration

The configuration to use in the request

-> Text

plan_id: Plan ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-gold`.

-> AddOnCreate

The request body to send

-> m (Response Create_plan_add_onResponse)

Monadic computation which returns the result of the operation

POST /plans/{plan_id}/add_ons

The same as create_plan_add_on but accepts an explicit configuration.

create_plan_add_onRaw Source #

Arguments

:: forall m. MonadHTTP m 
=> Text

plan_id: Plan ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-gold`.

-> AddOnCreate

The request body to send

-> ClientT m (Response ByteString)

Monadic computation which returns the result of the operation

POST /plans/{plan_id}/add_ons

The same as create_plan_add_on but returns the raw ByteString.

create_plan_add_onWithConfigurationRaw Source #

Arguments

:: forall m. MonadHTTP m 
=> Configuration

The configuration to use in the request

-> Text

plan_id: Plan ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-gold`.

-> AddOnCreate

The request body to send

-> m (Response ByteString)

Monadic computation which returns the result of the operation

POST /plans/{plan_id}/add_ons

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