Safe Haskell | None |
---|---|
Language | Haskell2010 |
StripeAPI.Operations.PostOrders
Description
Contains the different functions to run the operation postOrders
Synopsis
- postOrders :: forall m. MonadHTTP m => PostOrdersRequestBody -> ClientT m (Response PostOrdersResponse)
- data PostOrdersRequestBody = PostOrdersRequestBody {
- postOrdersRequestBodyCoupon :: Maybe Text
- postOrdersRequestBodyCurrency :: Text
- postOrdersRequestBodyCustomer :: Maybe Text
- postOrdersRequestBodyEmail :: Maybe Text
- postOrdersRequestBodyExpand :: Maybe [Text]
- postOrdersRequestBodyItems :: Maybe [PostOrdersRequestBodyItems']
- postOrdersRequestBodyMetadata :: Maybe Object
- postOrdersRequestBodyShipping :: Maybe PostOrdersRequestBodyShipping'
- mkPostOrdersRequestBody :: Text -> PostOrdersRequestBody
- data PostOrdersRequestBodyItems' = PostOrdersRequestBodyItems' {
- postOrdersRequestBodyItems'Amount :: Maybe Int
- postOrdersRequestBodyItems'Currency :: Maybe Text
- postOrdersRequestBodyItems'Description :: Maybe Text
- postOrdersRequestBodyItems'Parent :: Maybe Text
- postOrdersRequestBodyItems'Quantity :: Maybe Int
- postOrdersRequestBodyItems'Type :: Maybe PostOrdersRequestBodyItems'Type'
- mkPostOrdersRequestBodyItems' :: PostOrdersRequestBodyItems'
- data PostOrdersRequestBodyItems'Type'
- data PostOrdersRequestBodyShipping' = PostOrdersRequestBodyShipping' {}
- mkPostOrdersRequestBodyShipping' :: PostOrdersRequestBodyShipping'Address' -> Text -> PostOrdersRequestBodyShipping'
- data PostOrdersRequestBodyShipping'Address' = PostOrdersRequestBodyShipping'Address' {
- postOrdersRequestBodyShipping'Address'City :: Maybe Text
- postOrdersRequestBodyShipping'Address'Country :: Maybe Text
- postOrdersRequestBodyShipping'Address'Line1 :: Text
- postOrdersRequestBodyShipping'Address'Line2 :: Maybe Text
- postOrdersRequestBodyShipping'Address'PostalCode :: Maybe Text
- postOrdersRequestBodyShipping'Address'State :: Maybe Text
- mkPostOrdersRequestBodyShipping'Address' :: Text -> PostOrdersRequestBodyShipping'Address'
- data PostOrdersResponse
Documentation
Arguments
:: forall m. MonadHTTP m | |
=> PostOrdersRequestBody | The request body to send |
-> ClientT m (Response PostOrdersResponse) | Monadic computation which returns the result of the operation |
POST /v1/orders
<p>Creates a new order object.</p>
data PostOrdersRequestBody Source #
Defines the object schema located at paths./v1/orders.POST.requestBody.content.application/x-www-form-urlencoded.schema
in the specification.
Constructors
PostOrdersRequestBody | |
Fields
|
Instances
Eq PostOrdersRequestBody Source # | |
Defined in StripeAPI.Operations.PostOrders Methods (==) :: PostOrdersRequestBody -> PostOrdersRequestBody -> Bool # (/=) :: PostOrdersRequestBody -> PostOrdersRequestBody -> Bool # | |
Show PostOrdersRequestBody Source # | |
Defined in StripeAPI.Operations.PostOrders Methods showsPrec :: Int -> PostOrdersRequestBody -> ShowS # show :: PostOrdersRequestBody -> String # showList :: [PostOrdersRequestBody] -> ShowS # | |
ToJSON PostOrdersRequestBody Source # | |
Defined in StripeAPI.Operations.PostOrders Methods toJSON :: PostOrdersRequestBody -> Value # toEncoding :: PostOrdersRequestBody -> Encoding # toJSONList :: [PostOrdersRequestBody] -> Value # toEncodingList :: [PostOrdersRequestBody] -> Encoding # | |
FromJSON PostOrdersRequestBody Source # | |
Defined in StripeAPI.Operations.PostOrders Methods parseJSON :: Value -> Parser PostOrdersRequestBody # parseJSONList :: Value -> Parser [PostOrdersRequestBody] # |
mkPostOrdersRequestBody Source #
Arguments
:: Text | |
-> PostOrdersRequestBody |
Create a new PostOrdersRequestBody
with all required fields.
data PostOrdersRequestBodyItems' Source #
Defines the object schema located at paths./v1/orders.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.items.items
in the specification.
Constructors
PostOrdersRequestBodyItems' | |
Fields
|
Instances
mkPostOrdersRequestBodyItems' :: PostOrdersRequestBodyItems' Source #
Create a new PostOrdersRequestBodyItems'
with all required fields.
data PostOrdersRequestBodyItems'Type' Source #
Defines the enum schema located at paths./v1/orders.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.items.items.properties.type
in the specification.
Constructors
PostOrdersRequestBodyItems'Type'Other Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
PostOrdersRequestBodyItems'Type'Typed Text | This constructor can be used to send values to the server which are not present in the specification yet. |
PostOrdersRequestBodyItems'Type'EnumDiscount | Represents the JSON value |
PostOrdersRequestBodyItems'Type'EnumShipping | Represents the JSON value |
PostOrdersRequestBodyItems'Type'EnumSku | Represents the JSON value |
PostOrdersRequestBodyItems'Type'EnumTax | Represents the JSON value |
Instances
data PostOrdersRequestBodyShipping' Source #
Defines the object schema located at paths./v1/orders.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.shipping
in the specification.
Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true.
Constructors
PostOrdersRequestBodyShipping' | |
Fields
|
Instances
Eq PostOrdersRequestBodyShipping' Source # | |
Defined in StripeAPI.Operations.PostOrders | |
Show PostOrdersRequestBodyShipping' Source # | |
Defined in StripeAPI.Operations.PostOrders Methods showsPrec :: Int -> PostOrdersRequestBodyShipping' -> ShowS # show :: PostOrdersRequestBodyShipping' -> String # showList :: [PostOrdersRequestBodyShipping'] -> ShowS # | |
ToJSON PostOrdersRequestBodyShipping' Source # | |
Defined in StripeAPI.Operations.PostOrders | |
FromJSON PostOrdersRequestBodyShipping' Source # | |
Defined in StripeAPI.Operations.PostOrders Methods parseJSON :: Value -> Parser PostOrdersRequestBodyShipping' # parseJSONList :: Value -> Parser [PostOrdersRequestBodyShipping'] # |
mkPostOrdersRequestBodyShipping' Source #
Arguments
:: PostOrdersRequestBodyShipping'Address' | |
-> Text | |
-> PostOrdersRequestBodyShipping' |
Create a new PostOrdersRequestBodyShipping'
with all required fields.
data PostOrdersRequestBodyShipping'Address' Source #
Defines the object schema located at paths./v1/orders.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.shipping.properties.address
in the specification.
Constructors
PostOrdersRequestBodyShipping'Address' | |
Fields
|
Instances
mkPostOrdersRequestBodyShipping'Address' Source #
Arguments
:: Text | |
-> PostOrdersRequestBodyShipping'Address' |
Create a new PostOrdersRequestBodyShipping'Address'
with all required fields.
data PostOrdersResponse Source #
Represents a response of the operation postOrders
.
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), PostOrdersResponseError
is used.
Constructors
PostOrdersResponseError String | Means either no matching case available or a parse error |
PostOrdersResponse200 Order | Successful response. |
PostOrdersResponseDefault Error | Error response. |
Instances
Eq PostOrdersResponse Source # | |
Defined in StripeAPI.Operations.PostOrders Methods (==) :: PostOrdersResponse -> PostOrdersResponse -> Bool # (/=) :: PostOrdersResponse -> PostOrdersResponse -> Bool # | |
Show PostOrdersResponse Source # | |
Defined in StripeAPI.Operations.PostOrders Methods showsPrec :: Int -> PostOrdersResponse -> ShowS # show :: PostOrdersResponse -> String # showList :: [PostOrdersResponse] -> ShowS # |