Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
RecurlyClient.Operations.Update_coupon
Description
Contains the different functions to run the operation update_coupon
Synopsis
- update_coupon :: forall m. MonadHTTP m => Text -> CouponUpdate -> ClientT m (Response Update_couponResponse)
- data Update_couponResponse
- update_couponWithConfiguration :: forall m. MonadHTTP m => Configuration -> Text -> CouponUpdate -> m (Response Update_couponResponse)
- update_couponRaw :: forall m. MonadHTTP m => Text -> CouponUpdate -> ClientT m (Response ByteString)
- update_couponWithConfigurationRaw :: forall m. MonadHTTP m => Configuration -> Text -> CouponUpdate -> m (Response ByteString)
Documentation
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. |
Instances
Show Update_couponResponse Source # | |
Defined in RecurlyClient.Operations.Update_coupon Methods showsPrec :: Int -> Update_couponResponse -> ShowS # show :: Update_couponResponse -> String # showList :: [Update_couponResponse] -> ShowS # | |
Eq Update_couponResponse Source # | |
Defined in RecurlyClient.Operations.Update_coupon Methods (==) :: Update_couponResponse -> Update_couponResponse -> Bool # (/=) :: Update_couponResponse -> Update_couponResponse -> Bool # |
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.
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
.