Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
RecurlyClient.Operations.Create_purchase
Description
Contains the different functions to run the operation create_purchase
Synopsis
- create_purchase :: forall m. MonadHTTP m => PurchaseCreate -> ClientT m (Response Create_purchaseResponse)
- data Create_purchaseResponse
- create_purchaseWithConfiguration :: forall m. MonadHTTP m => Configuration -> PurchaseCreate -> m (Response Create_purchaseResponse)
- create_purchaseRaw :: forall m. MonadHTTP m => PurchaseCreate -> ClientT m (Response ByteString)
- create_purchaseWithConfigurationRaw :: forall m. MonadHTTP m => Configuration -> PurchaseCreate -> m (Response ByteString)
Documentation
Arguments
:: forall m. MonadHTTP m | |
=> PurchaseCreate | The request body to send |
-> ClientT m (Response Create_purchaseResponse) | Monadic computation which returns the result of the operation |
POST /purchases
A purchase is a checkout containing at least one or more subscriptions or one-time charges (line items) and supports both coupon and gift card redemptions. All items purchased will be on one invoice and paid for with one transaction.
data Create_purchaseResponse Source #
Represents a response of the operation create_purchase
.
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_purchaseResponseError
is used.
Constructors
Create_purchaseResponseError String | Means either no matching case available or a parse error |
Create_purchaseResponse201 InvoiceCollection | Returns the new invoices |
Create_purchaseResponse400 Error | Bad request; perhaps missing or invalid parameters. |
Create_purchaseResponse422 Error | Purchase cannot be completed for the specified reason. |
Create_purchaseResponseDefault Error | Unexpected error. |
Instances
Show Create_purchaseResponse Source # | |
Defined in RecurlyClient.Operations.Create_purchase Methods showsPrec :: Int -> Create_purchaseResponse -> ShowS # show :: Create_purchaseResponse -> String # showList :: [Create_purchaseResponse] -> ShowS # | |
Eq Create_purchaseResponse Source # | |
Defined in RecurlyClient.Operations.Create_purchase Methods (==) :: Create_purchaseResponse -> Create_purchaseResponse -> Bool # (/=) :: Create_purchaseResponse -> Create_purchaseResponse -> Bool # |
create_purchaseWithConfiguration Source #
Arguments
:: forall m. MonadHTTP m | |
=> Configuration | The configuration to use in the request |
-> PurchaseCreate | The request body to send |
-> m (Response Create_purchaseResponse) | Monadic computation which returns the result of the operation |
POST /purchases
The same as create_purchase
but accepts an explicit configuration.
Arguments
:: forall m. MonadHTTP m | |
=> PurchaseCreate | The request body to send |
-> ClientT m (Response ByteString) | Monadic computation which returns the result of the operation |
POST /purchases
The same as create_purchase
but returns the raw ByteString
.
create_purchaseWithConfigurationRaw Source #
Arguments
:: forall m. MonadHTTP m | |
=> Configuration | The configuration to use in the request |
-> PurchaseCreate | The request body to send |
-> m (Response ByteString) | Monadic computation which returns the result of the operation |
POST /purchases
The same as create_purchase
but accepts an explicit configuration and returns the raw ByteString
.