Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Contains the different functions to run the operation create_subscription_change
Synopsis
- create_subscription_change :: forall m. MonadHTTP m => Text -> SubscriptionChangeCreate -> ClientT m (Response Create_subscription_changeResponse)
- data Create_subscription_changeResponse
- = Create_subscription_changeResponseError String
- | Create_subscription_changeResponse201 SubscriptionChange
- | Create_subscription_changeResponse204
- | Create_subscription_changeResponse404 Error
- | Create_subscription_changeResponse422 ErrorMayHaveTransaction
- | Create_subscription_changeResponseDefault Error
- create_subscription_changeWithConfiguration :: forall m. MonadHTTP m => Configuration -> Text -> SubscriptionChangeCreate -> m (Response Create_subscription_changeResponse)
- create_subscription_changeRaw :: forall m. MonadHTTP m => Text -> SubscriptionChangeCreate -> ClientT m (Response ByteString)
- create_subscription_changeWithConfigurationRaw :: forall m. MonadHTTP m => Configuration -> Text -> SubscriptionChangeCreate -> m (Response ByteString)
Documentation
create_subscription_change Source #
:: 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.
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 #
:: 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 #
:: 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 #
:: 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
.