| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
StripeAPI.Operations.PostSkus
Description
Contains the different functions to run the operation postSkus
Synopsis
- postSkus :: forall m s. (MonadHTTP m, SecurityScheme s) => Configuration s -> PostSkusRequestBody -> m (Either HttpException (Response PostSkusResponse))
- postSkusRaw :: forall m s. (MonadHTTP m, SecurityScheme s) => Configuration s -> PostSkusRequestBody -> m (Either HttpException (Response ByteString))
- postSkusM :: forall m s. (MonadHTTP m, SecurityScheme s) => PostSkusRequestBody -> ReaderT (Configuration s) m (Either HttpException (Response PostSkusResponse))
- postSkusRawM :: forall m s. (MonadHTTP m, SecurityScheme s) => PostSkusRequestBody -> ReaderT (Configuration s) m (Either HttpException (Response ByteString))
- data PostSkusRequestBody = PostSkusRequestBody {
- postSkusRequestBodyActive :: Maybe Bool
- postSkusRequestBodyAttributes :: Maybe PostSkusRequestBodyAttributes'
- postSkusRequestBodyCurrency :: String
- postSkusRequestBodyExpand :: Maybe ([] String)
- postSkusRequestBodyId :: Maybe String
- postSkusRequestBodyImage :: Maybe String
- postSkusRequestBodyInventory :: PostSkusRequestBodyInventory'
- postSkusRequestBodyMetadata :: Maybe PostSkusRequestBodyMetadata'
- postSkusRequestBodyPackageDimensions :: Maybe PostSkusRequestBodyPackageDimensions'
- postSkusRequestBodyPrice :: Integer
- postSkusRequestBodyProduct :: String
- data PostSkusRequestBodyAttributes' = PostSkusRequestBodyAttributes' {
- data PostSkusRequestBodyInventory' = PostSkusRequestBodyInventory' {}
- data PostSkusRequestBodyInventory'Type'
- data PostSkusRequestBodyInventory'Value'
- = PostSkusRequestBodyInventory'Value'EnumOther Value
- | PostSkusRequestBodyInventory'Value'EnumTyped String
- | PostSkusRequestBodyInventory'Value'EnumString_
- | PostSkusRequestBodyInventory'Value'EnumStringInStock
- | PostSkusRequestBodyInventory'Value'EnumStringLimited
- | PostSkusRequestBodyInventory'Value'EnumStringOutOfStock
- data PostSkusRequestBodyMetadata' = PostSkusRequestBodyMetadata' {
- data PostSkusRequestBodyPackageDimensions' = PostSkusRequestBodyPackageDimensions' {}
- data PostSkusResponse
Documentation
Arguments
| :: (MonadHTTP m, SecurityScheme s) | |
| => Configuration s | The configuration to use in the request |
| -> PostSkusRequestBody | The request body to send |
| -> m (Either HttpException (Response PostSkusResponse)) | Monad containing the result of the operation |
POST /v1/skus
<p>Creates a new SKU associated with a product.</p>
postSkusRaw :: forall m s. (MonadHTTP m, SecurityScheme s) => Configuration s -> PostSkusRequestBody -> m (Either HttpException (Response ByteString)) Source #
POST /v1/skus
The same as postSkus but returns the raw ByteString
postSkusM :: forall m s. (MonadHTTP m, SecurityScheme s) => PostSkusRequestBody -> ReaderT (Configuration s) m (Either HttpException (Response PostSkusResponse)) Source #
POST /v1/skus
Monadic version of postSkus (use with runWithConfiguration)
postSkusRawM :: forall m s. (MonadHTTP m, SecurityScheme s) => PostSkusRequestBody -> ReaderT (Configuration s) m (Either HttpException (Response ByteString)) Source #
POST /v1/skus
Monadic version of postSkusRaw (use with runWithConfiguration)
data PostSkusRequestBody Source #
Defines the data type for the schema postSkusRequestBody
Constructors
| PostSkusRequestBody | |
Fields
| |
Instances
| Eq PostSkusRequestBody Source # | |
Defined in StripeAPI.Operations.PostSkus Methods (==) :: PostSkusRequestBody -> PostSkusRequestBody -> Bool # (/=) :: PostSkusRequestBody -> PostSkusRequestBody -> Bool # | |
| Show PostSkusRequestBody Source # | |
Defined in StripeAPI.Operations.PostSkus Methods showsPrec :: Int -> PostSkusRequestBody -> ShowS # show :: PostSkusRequestBody -> String # showList :: [PostSkusRequestBody] -> ShowS # | |
| ToJSON PostSkusRequestBody Source # | |
Defined in StripeAPI.Operations.PostSkus Methods toJSON :: PostSkusRequestBody -> Value # toEncoding :: PostSkusRequestBody -> Encoding # toJSONList :: [PostSkusRequestBody] -> Value # toEncodingList :: [PostSkusRequestBody] -> Encoding # | |
| FromJSON PostSkusRequestBody Source # | |
Defined in StripeAPI.Operations.PostSkus Methods parseJSON :: Value -> Parser PostSkusRequestBody # parseJSONList :: Value -> Parser [PostSkusRequestBody] # | |
data PostSkusRequestBodyAttributes' Source #
Defines the data type for the schema postSkusRequestBodyAttributes'
A dictionary of attributes and values for the attributes defined by the product. If, for example, a product's attributes are `["size", "gender"]`, a valid SKU has the following dictionary of attributes: `{"size": "Medium", "gender": "Unisex"}`.
Constructors
| PostSkusRequestBodyAttributes' | |
Instances
| Eq PostSkusRequestBodyAttributes' Source # | |
Defined in StripeAPI.Operations.PostSkus | |
| Show PostSkusRequestBodyAttributes' Source # | |
Defined in StripeAPI.Operations.PostSkus Methods showsPrec :: Int -> PostSkusRequestBodyAttributes' -> ShowS # show :: PostSkusRequestBodyAttributes' -> String # showList :: [PostSkusRequestBodyAttributes'] -> ShowS # | |
| ToJSON PostSkusRequestBodyAttributes' Source # | |
Defined in StripeAPI.Operations.PostSkus | |
| FromJSON PostSkusRequestBodyAttributes' Source # | |
Defined in StripeAPI.Operations.PostSkus Methods parseJSON :: Value -> Parser PostSkusRequestBodyAttributes' # parseJSONList :: Value -> Parser [PostSkusRequestBodyAttributes'] # | |
data PostSkusRequestBodyInventory' Source #
Defines the data type for the schema postSkusRequestBodyInventory'
Description of the SKU's inventory.
Constructors
| PostSkusRequestBodyInventory' | |
Fields
| |
Instances
| Eq PostSkusRequestBodyInventory' Source # | |
Defined in StripeAPI.Operations.PostSkus | |
| Show PostSkusRequestBodyInventory' Source # | |
Defined in StripeAPI.Operations.PostSkus Methods showsPrec :: Int -> PostSkusRequestBodyInventory' -> ShowS # show :: PostSkusRequestBodyInventory' -> String # showList :: [PostSkusRequestBodyInventory'] -> ShowS # | |
| ToJSON PostSkusRequestBodyInventory' Source # | |
Defined in StripeAPI.Operations.PostSkus Methods toJSON :: PostSkusRequestBodyInventory' -> Value # toEncoding :: PostSkusRequestBodyInventory' -> Encoding # toJSONList :: [PostSkusRequestBodyInventory'] -> Value # toEncodingList :: [PostSkusRequestBodyInventory'] -> Encoding # | |
| FromJSON PostSkusRequestBodyInventory' Source # | |
Defined in StripeAPI.Operations.PostSkus Methods parseJSON :: Value -> Parser PostSkusRequestBodyInventory' # parseJSONList :: Value -> Parser [PostSkusRequestBodyInventory'] # | |
data PostSkusRequestBodyInventory'Type' Source #
Defines the enum schema postSkusRequestBodyInventory'Type'
Constructors
Instances
data PostSkusRequestBodyInventory'Value' Source #
Defines the enum schema postSkusRequestBodyInventory'Value'
Constructors
Instances
data PostSkusRequestBodyMetadata' Source #
Defines the data type for the schema postSkusRequestBodyMetadata'
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`.
Constructors
| PostSkusRequestBodyMetadata' | |
Instances
data PostSkusRequestBodyPackageDimensions' Source #
Defines the data type for the schema postSkusRequestBodyPackage_dimensions'
The dimensions of this SKU for shipping purposes.
Constructors
| PostSkusRequestBodyPackageDimensions' | |
Instances
data PostSkusResponse Source #
Represents a response of the operation postSkus.
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), PostSkusResponseError is used.
Constructors
| PostSkusResponseError String | Means either no matching case available or a parse error |
| PostSkusResponse200 Sku | Successful response. |
| PostSkusResponseDefault Error | Error response. |
Instances
| Eq PostSkusResponse Source # | |
Defined in StripeAPI.Operations.PostSkus Methods (==) :: PostSkusResponse -> PostSkusResponse -> Bool # (/=) :: PostSkusResponse -> PostSkusResponse -> Bool # | |
| Show PostSkusResponse Source # | |
Defined in StripeAPI.Operations.PostSkus Methods showsPrec :: Int -> PostSkusResponse -> ShowS # show :: PostSkusResponse -> String # showList :: [PostSkusResponse] -> ShowS # | |