Safe Haskell | None |
---|---|
Language | Haskell2010 |
Contains the different functions to run the operation postProducts
Synopsis
- postProducts :: forall m s. (MonadHTTP m, SecurityScheme s) => Configuration s -> PostProductsRequestBody -> m (Either HttpException (Response PostProductsResponse))
- postProductsRaw :: forall m s. (MonadHTTP m, SecurityScheme s) => Configuration s -> PostProductsRequestBody -> m (Either HttpException (Response ByteString))
- postProductsM :: forall m s. (MonadHTTP m, SecurityScheme s) => PostProductsRequestBody -> ReaderT (Configuration s) m (Either HttpException (Response PostProductsResponse))
- postProductsRawM :: forall m s. (MonadHTTP m, SecurityScheme s) => PostProductsRequestBody -> ReaderT (Configuration s) m (Either HttpException (Response ByteString))
- data PostProductsRequestBody = PostProductsRequestBody {
- postProductsRequestBodyActive :: Maybe Bool
- postProductsRequestBodyAttributes :: Maybe ([] String)
- postProductsRequestBodyCaption :: Maybe String
- postProductsRequestBodyDeactivateOn :: Maybe ([] String)
- postProductsRequestBodyDescription :: Maybe String
- postProductsRequestBodyExpand :: Maybe ([] String)
- postProductsRequestBodyId :: Maybe String
- postProductsRequestBodyImages :: Maybe ([] String)
- postProductsRequestBodyMetadata :: Maybe PostProductsRequestBodyMetadata'
- postProductsRequestBodyName :: String
- postProductsRequestBodyPackageDimensions :: Maybe PostProductsRequestBodyPackageDimensions'
- postProductsRequestBodyShippable :: Maybe Bool
- postProductsRequestBodyStatementDescriptor :: Maybe String
- postProductsRequestBodyType :: Maybe PostProductsRequestBodyType'
- postProductsRequestBodyUnitLabel :: Maybe String
- postProductsRequestBodyUrl :: Maybe String
- data PostProductsRequestBodyMetadata' = PostProductsRequestBodyMetadata' {
- data PostProductsRequestBodyPackageDimensions' = PostProductsRequestBodyPackageDimensions' {}
- data PostProductsRequestBodyType'
- data PostProductsResponse
Documentation
:: (MonadHTTP m, SecurityScheme s) | |
=> Configuration s | The configuration to use in the request |
-> PostProductsRequestBody | The request body to send |
-> m (Either HttpException (Response PostProductsResponse)) | Monad containing the result of the operation |
POST /v1/products
<p>Creates a new product object. To create a product for use with orders, see <a href="#create_product">Products</a>.</p>
postProductsRaw :: forall m s. (MonadHTTP m, SecurityScheme s) => Configuration s -> PostProductsRequestBody -> m (Either HttpException (Response ByteString)) Source #
POST /v1/products
The same as postProducts
but returns the raw ByteString
postProductsM :: forall m s. (MonadHTTP m, SecurityScheme s) => PostProductsRequestBody -> ReaderT (Configuration s) m (Either HttpException (Response PostProductsResponse)) Source #
POST /v1/products
Monadic version of postProducts
(use with runWithConfiguration
)
postProductsRawM :: forall m s. (MonadHTTP m, SecurityScheme s) => PostProductsRequestBody -> ReaderT (Configuration s) m (Either HttpException (Response ByteString)) Source #
POST /v1/products
Monadic version of postProductsRaw
(use with runWithConfiguration
)
data PostProductsRequestBody Source #
Defines the data type for the schema postProductsRequestBody
PostProductsRequestBody | |
|
Instances
Eq PostProductsRequestBody Source # | |
Defined in StripeAPI.Operations.PostProducts | |
Show PostProductsRequestBody Source # | |
Defined in StripeAPI.Operations.PostProducts showsPrec :: Int -> PostProductsRequestBody -> ShowS # show :: PostProductsRequestBody -> String # showList :: [PostProductsRequestBody] -> ShowS # | |
ToJSON PostProductsRequestBody Source # | |
Defined in StripeAPI.Operations.PostProducts | |
FromJSON PostProductsRequestBody Source # | |
Defined in StripeAPI.Operations.PostProducts |
data PostProductsRequestBodyMetadata' Source #
Defines the data type for the schema postProductsRequestBodyMetadata'
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
data PostProductsRequestBodyPackageDimensions' Source #
Defines the data type for the schema postProductsRequestBodyPackage_dimensions'
The dimensions of this product for shipping purposes. A SKU associated with this product can override this value by having its own `package_dimensions`. May only be set if type=`good`.
data PostProductsRequestBodyType' Source #
Defines the enum schema postProductsRequestBodyType'
The type of the product. Defaults to `service` if not explicitly specified, enabling use of this product with Subscriptions and Plans. Set this parameter to `good` to use this product with Orders and SKUs. On API versions before `2018-02-05`, this field defaults to `good` for compatibility reasons.
PostProductsRequestBodyType'EnumOther Value | |
PostProductsRequestBodyType'EnumTyped String | |
PostProductsRequestBodyType'EnumStringGood | |
PostProductsRequestBodyType'EnumStringService |
Instances
data PostProductsResponse Source #
Represents a response of the operation postProducts
.
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), PostProductsResponseError
is used.
PostProductsResponseError String | Means either no matching case available or a parse error |
PostProductsResponse200 Product | Successful response. |
PostProductsResponseDefault Error | Error response. |
Instances
Eq PostProductsResponse Source # | |
Defined in StripeAPI.Operations.PostProducts (==) :: PostProductsResponse -> PostProductsResponse -> Bool # (/=) :: PostProductsResponse -> PostProductsResponse -> Bool # | |
Show PostProductsResponse Source # | |
Defined in StripeAPI.Operations.PostProducts showsPrec :: Int -> PostProductsResponse -> ShowS # show :: PostProductsResponse -> String # showList :: [PostProductsResponse] -> ShowS # |