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

RecurlyClient.Operations.Update_coupon

Description

Contains the different functions to run the operation update_coupon

Synopsis

Documentation

update_coupon Source #

Arguments

:: forall m. MonadHTTP m 
=> Text

coupon_id: Coupon ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-10off`.

-> CouponUpdate

The request body to send

-> ClientT m (Response Update_couponResponse)

Monadic computation which returns the result of the operation

PUT /coupons/{coupon_id}

Update an active coupon

data Update_couponResponse Source #

Represents a response of the operation update_coupon.

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

Constructors

Update_couponResponseError String

Means either no matching case available or a parse error

Update_couponResponse200 Coupon

The updated coupon.

Update_couponResponse400 Error

Bad request, perhaps invalid JSON?

Update_couponResponse404 Error

Incorrect site or coupon ID.

Update_couponResponse422 Error

Invalid request parameters

Update_couponResponseDefault Error

Unexpected error.

update_couponWithConfiguration Source #

Arguments

:: forall m. MonadHTTP m 
=> Configuration

The configuration to use in the request

-> Text

coupon_id: Coupon ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-10off`.

-> CouponUpdate

The request body to send

-> m (Response Update_couponResponse)

Monadic computation which returns the result of the operation

PUT /coupons/{coupon_id}

The same as update_coupon but accepts an explicit configuration.

update_couponRaw Source #

Arguments

:: forall m. MonadHTTP m 
=> Text

coupon_id: Coupon ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-10off`.

-> CouponUpdate

The request body to send

-> ClientT m (Response ByteString)

Monadic computation which returns the result of the operation

PUT /coupons/{coupon_id}

The same as update_coupon but returns the raw ByteString.

update_couponWithConfigurationRaw Source #

Arguments

:: forall m. MonadHTTP m 
=> Configuration

The configuration to use in the request

-> Text

coupon_id: Coupon ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-10off`.

-> CouponUpdate

The request body to send

-> m (Response ByteString)

Monadic computation which returns the result of the operation

PUT /coupons/{coupon_id}

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