| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
RecurlyClient.Operations.Create_coupon
Description
Contains the different functions to run the operation create_coupon
Synopsis
- create_coupon :: forall m. MonadHTTP m => CouponCreate -> ClientT m (Response Create_couponResponse)
- data Create_couponResponse
- create_couponWithConfiguration :: forall m. MonadHTTP m => Configuration -> CouponCreate -> m (Response Create_couponResponse)
- create_couponRaw :: forall m. MonadHTTP m => CouponCreate -> ClientT m (Response ByteString)
- create_couponWithConfigurationRaw :: forall m. MonadHTTP m => Configuration -> CouponCreate -> m (Response ByteString)
Documentation
Arguments
| :: forall m. MonadHTTP m | |
| => CouponCreate | The request body to send |
| -> ClientT m (Response Create_couponResponse) | Monadic computation which returns the result of the operation |
POST /coupons
Create a new coupon
data Create_couponResponse Source #
Represents a response of the operation create_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), Create_couponResponseError is used.
Constructors
| Create_couponResponseError String | Means either no matching case available or a parse error |
| Create_couponResponse201 Coupon | A new coupon. |
| Create_couponResponse400 Error | Bad request, perhaps invalid JSON? |
| Create_couponResponse404 Error | Incorrect site ID. |
| Create_couponResponse422 Error | Invalid request parameters. |
| Create_couponResponseDefault Error | Unexpected error. |
Instances
| Show Create_couponResponse Source # | |
Defined in RecurlyClient.Operations.Create_coupon Methods showsPrec :: Int -> Create_couponResponse -> ShowS # show :: Create_couponResponse -> String # showList :: [Create_couponResponse] -> ShowS # | |
| Eq Create_couponResponse Source # | |
Defined in RecurlyClient.Operations.Create_coupon Methods (==) :: Create_couponResponse -> Create_couponResponse -> Bool # (/=) :: Create_couponResponse -> Create_couponResponse -> Bool # | |
create_couponWithConfiguration Source #
Arguments
| :: forall m. MonadHTTP m | |
| => Configuration | The configuration to use in the request |
| -> CouponCreate | The request body to send |
| -> m (Response Create_couponResponse) | Monadic computation which returns the result of the operation |
POST /coupons
The same as create_coupon but accepts an explicit configuration.
Arguments
| :: forall m. MonadHTTP m | |
| => CouponCreate | The request body to send |
| -> ClientT m (Response ByteString) | Monadic computation which returns the result of the operation |
POST /coupons
The same as create_coupon but returns the raw ByteString.
create_couponWithConfigurationRaw Source #
Arguments
| :: forall m. MonadHTTP m | |
| => Configuration | The configuration to use in the request |
| -> CouponCreate | The request body to send |
| -> m (Response ByteString) | Monadic computation which returns the result of the operation |
POST /coupons
The same as create_coupon but accepts an explicit configuration and returns the raw ByteString.