Safe Haskell | None |
---|---|
Language | Haskell2010 |
Contains the different functions to run the operation postPlans
Synopsis
- postPlans :: forall m s. (MonadHTTP m, SecurityScheme s) => Configuration s -> PostPlansRequestBody -> m (Either HttpException (Response PostPlansResponse))
- postPlansRaw :: forall m s. (MonadHTTP m, SecurityScheme s) => Configuration s -> PostPlansRequestBody -> m (Either HttpException (Response ByteString))
- postPlansM :: forall m s. (MonadHTTP m, SecurityScheme s) => PostPlansRequestBody -> ReaderT (Configuration s) m (Either HttpException (Response PostPlansResponse))
- postPlansRawM :: forall m s. (MonadHTTP m, SecurityScheme s) => PostPlansRequestBody -> ReaderT (Configuration s) m (Either HttpException (Response ByteString))
- data PostPlansRequestBody = PostPlansRequestBody {
- postPlansRequestBodyActive :: Maybe Bool
- postPlansRequestBodyAggregateUsage :: Maybe PostPlansRequestBodyAggregateUsage'
- postPlansRequestBodyAmount :: Maybe Integer
- postPlansRequestBodyAmountDecimal :: Maybe String
- postPlansRequestBodyBillingScheme :: Maybe PostPlansRequestBodyBillingScheme'
- postPlansRequestBodyCurrency :: String
- postPlansRequestBodyExpand :: Maybe ([] String)
- postPlansRequestBodyId :: Maybe String
- postPlansRequestBodyInterval :: PostPlansRequestBodyInterval'
- postPlansRequestBodyIntervalCount :: Maybe Integer
- postPlansRequestBodyMetadata :: Maybe PostPlansRequestBodyMetadata'
- postPlansRequestBodyNickname :: Maybe String
- postPlansRequestBodyProduct :: Maybe PostPlansRequestBodyProduct'Variants
- postPlansRequestBodyTiers :: Maybe ([] PostPlansRequestBodyTiers')
- postPlansRequestBodyTiersMode :: Maybe PostPlansRequestBodyTiersMode'
- postPlansRequestBodyTransformUsage :: Maybe PostPlansRequestBodyTransformUsage'
- postPlansRequestBodyTrialPeriodDays :: Maybe Integer
- postPlansRequestBodyUsageType :: Maybe PostPlansRequestBodyUsageType'
- data PostPlansRequestBodyAggregateUsage'
- = PostPlansRequestBodyAggregateUsage'EnumOther Value
- | PostPlansRequestBodyAggregateUsage'EnumTyped String
- | PostPlansRequestBodyAggregateUsage'EnumStringLastDuringPeriod
- | PostPlansRequestBodyAggregateUsage'EnumStringLastEver
- | PostPlansRequestBodyAggregateUsage'EnumStringMax
- | PostPlansRequestBodyAggregateUsage'EnumStringSum
- data PostPlansRequestBodyBillingScheme'
- data PostPlansRequestBodyInterval'
- data PostPlansRequestBodyMetadata' = PostPlansRequestBodyMetadata' {
- data PostPlansRequestBodyProduct'OneOf2 = PostPlansRequestBodyProduct'OneOf2 {
- postPlansRequestBodyProduct'OneOf2Active :: Maybe Bool
- postPlansRequestBodyProduct'OneOf2Id :: Maybe String
- postPlansRequestBodyProduct'OneOf2Metadata :: Maybe PostPlansRequestBodyProduct'OneOf2Metadata'
- postPlansRequestBodyProduct'OneOf2Name :: String
- postPlansRequestBodyProduct'OneOf2StatementDescriptor :: Maybe String
- postPlansRequestBodyProduct'OneOf2UnitLabel :: Maybe String
- data PostPlansRequestBodyProduct'OneOf2Metadata' = PostPlansRequestBodyProduct'OneOf2Metadata' {
- data PostPlansRequestBodyProduct'Variants
- data PostPlansRequestBodyTiers' = PostPlansRequestBodyTiers' {}
- data PostPlansRequestBodyTiers'UpTo'OneOf1
- data PostPlansRequestBodyTiers'UpTo'Variants
- data PostPlansRequestBodyTiersMode'
- data PostPlansRequestBodyTransformUsage' = PostPlansRequestBodyTransformUsage' {}
- data PostPlansRequestBodyTransformUsage'Round'
- data PostPlansRequestBodyUsageType'
- data PostPlansResponse
Documentation
:: (MonadHTTP m, SecurityScheme s) | |
=> Configuration s | The configuration to use in the request |
-> PostPlansRequestBody | The request body to send |
-> m (Either HttpException (Response PostPlansResponse)) | Monad containing the result of the operation |
POST /v1/plans
<p>You can create plans using the API, or in the Stripe <a href="https://dashboard.stripe.com/subscriptions/products">Dashboard</a>.</p>
postPlansRaw :: forall m s. (MonadHTTP m, SecurityScheme s) => Configuration s -> PostPlansRequestBody -> m (Either HttpException (Response ByteString)) Source #
POST /v1/plans
The same as postPlans
but returns the raw ByteString
postPlansM :: forall m s. (MonadHTTP m, SecurityScheme s) => PostPlansRequestBody -> ReaderT (Configuration s) m (Either HttpException (Response PostPlansResponse)) Source #
POST /v1/plans
Monadic version of postPlans
(use with runWithConfiguration
)
postPlansRawM :: forall m s. (MonadHTTP m, SecurityScheme s) => PostPlansRequestBody -> ReaderT (Configuration s) m (Either HttpException (Response ByteString)) Source #
POST /v1/plans
Monadic version of postPlansRaw
(use with runWithConfiguration
)
data PostPlansRequestBody Source #
Defines the data type for the schema postPlansRequestBody
PostPlansRequestBody | |
|
Instances
Eq PostPlansRequestBody Source # | |
Defined in StripeAPI.Operations.PostPlans (==) :: PostPlansRequestBody -> PostPlansRequestBody -> Bool # (/=) :: PostPlansRequestBody -> PostPlansRequestBody -> Bool # | |
Show PostPlansRequestBody Source # | |
Defined in StripeAPI.Operations.PostPlans showsPrec :: Int -> PostPlansRequestBody -> ShowS # show :: PostPlansRequestBody -> String # showList :: [PostPlansRequestBody] -> ShowS # | |
ToJSON PostPlansRequestBody Source # | |
Defined in StripeAPI.Operations.PostPlans toJSON :: PostPlansRequestBody -> Value # toEncoding :: PostPlansRequestBody -> Encoding # toJSONList :: [PostPlansRequestBody] -> Value # toEncodingList :: [PostPlansRequestBody] -> Encoding # | |
FromJSON PostPlansRequestBody Source # | |
Defined in StripeAPI.Operations.PostPlans parseJSON :: Value -> Parser PostPlansRequestBody # parseJSONList :: Value -> Parser [PostPlansRequestBody] # |
data PostPlansRequestBodyAggregateUsage' Source #
Defines the enum schema postPlansRequestBodyAggregate_usage'
Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`.
data PostPlansRequestBodyBillingScheme' Source #
Defines the enum schema postPlansRequestBodyBilling_scheme'
Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes.
data PostPlansRequestBodyInterval' Source #
Defines the enum schema postPlansRequestBodyInterval'
Specifies billing frequency. Either `day`, `week`, `month` or `year`.
Instances
data PostPlansRequestBodyMetadata' Source #
Defines the data type for the schema postPlansRequestBodyMetadata'
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`.
Instances
data PostPlansRequestBodyProduct'OneOf2 Source #
Defines the data type for the schema postPlansRequestBodyProduct'OneOf2
The product whose pricing the created plan will represent. This can either be the ID of an existing product, or a dictionary containing fields used to create a service product.
PostPlansRequestBodyProduct'OneOf2 | |
|
data PostPlansRequestBodyProduct'OneOf2Metadata' Source #
Defines the data type for the schema postPlansRequestBodyProduct'OneOf2Metadata'
data PostPlansRequestBodyProduct'Variants Source #
Define the one-of schema postPlansRequestBodyProduct'
PostPlansRequestBodyProduct'String String | |
PostPlansRequestBodyProduct'PostPlansRequestBodyProduct'OneOf2 PostPlansRequestBodyProduct'OneOf2 |
Instances
Eq PostPlansRequestBodyProduct'Variants Source # | |
Show PostPlansRequestBodyProduct'Variants Source # | |
Generic PostPlansRequestBodyProduct'Variants Source # | |
ToJSON PostPlansRequestBodyProduct'Variants Source # | |
FromJSON PostPlansRequestBodyProduct'Variants Source # | |
type Rep PostPlansRequestBodyProduct'Variants Source # | |
Defined in StripeAPI.Operations.PostPlans type Rep PostPlansRequestBodyProduct'Variants = D1 (MetaData "PostPlansRequestBodyProduct'Variants" "StripeAPI.Operations.PostPlans" "stripeapi-0.1.0.0-A3hJyYFbMZN6w4qjBpK6b6" False) (C1 (MetaCons "PostPlansRequestBodyProduct'String" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) :+: C1 (MetaCons "PostPlansRequestBodyProduct'PostPlansRequestBodyProduct'OneOf2" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 PostPlansRequestBodyProduct'OneOf2))) |
data PostPlansRequestBodyTiers' Source #
Defines the data type for the schema postPlansRequestBodyTiers'
PostPlansRequestBodyTiers' | |
|
Instances
data PostPlansRequestBodyTiers'UpTo'OneOf1 Source #
Defines the enum schema postPlansRequestBodyTiers'Up_to'OneOf1
PostPlansRequestBodyTiers'UpTo'OneOf1EnumOther Value | |
PostPlansRequestBodyTiers'UpTo'OneOf1EnumTyped String | |
PostPlansRequestBodyTiers'UpTo'OneOf1EnumStringInf |
data PostPlansRequestBodyTiers'UpTo'Variants Source #
Define the one-of schema postPlansRequestBodyTiers'Up_to'
PostPlansRequestBodyTiers'UpTo'PostPlansRequestBodyTiers'UpTo'OneOf1 PostPlansRequestBodyTiers'UpTo'OneOf1 | |
PostPlansRequestBodyTiers'UpTo'Integer Integer |
Instances
data PostPlansRequestBodyTiersMode' Source #
Defines the enum schema postPlansRequestBodyTiers_mode'
Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows.
PostPlansRequestBodyTiersMode'EnumOther Value | |
PostPlansRequestBodyTiersMode'EnumTyped String | |
PostPlansRequestBodyTiersMode'EnumStringGraduated | |
PostPlansRequestBodyTiersMode'EnumStringVolume |
data PostPlansRequestBodyTransformUsage' Source #
Defines the data type for the schema postPlansRequestBodyTransform_usage'
Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`.
PostPlansRequestBodyTransformUsage' | |
|
data PostPlansRequestBodyTransformUsage'Round' Source #
Defines the enum schema postPlansRequestBodyTransform_usage'Round'
data PostPlansRequestBodyUsageType' Source #
Defines the enum schema postPlansRequestBodyUsage_type'
Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`.
PostPlansRequestBodyUsageType'EnumOther Value | |
PostPlansRequestBodyUsageType'EnumTyped String | |
PostPlansRequestBodyUsageType'EnumStringLicensed | |
PostPlansRequestBodyUsageType'EnumStringMetered |
data PostPlansResponse Source #
Represents a response of the operation postPlans
.
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), PostPlansResponseError
is used.
PostPlansResponseError String | Means either no matching case available or a parse error |
PostPlansResponse200 Plan | Successful response. |
PostPlansResponseDefault Error | Error response. |
Instances
Eq PostPlansResponse Source # | |
Defined in StripeAPI.Operations.PostPlans (==) :: PostPlansResponse -> PostPlansResponse -> Bool # (/=) :: PostPlansResponse -> PostPlansResponse -> Bool # | |
Show PostPlansResponse Source # | |
Defined in StripeAPI.Operations.PostPlans showsPrec :: Int -> PostPlansResponse -> ShowS # show :: PostPlansResponse -> String # showList :: [PostPlansResponse] -> ShowS # |