Safe Haskell | None |
---|---|
Language | Haskell2010 |
Contains the different functions to run the operation postSubscriptionItems
Synopsis
- postSubscriptionItems :: forall m s. (MonadHTTP m, SecurityScheme s) => Configuration s -> PostSubscriptionItemsRequestBody -> m (Either HttpException (Response PostSubscriptionItemsResponse))
- postSubscriptionItemsRaw :: forall m s. (MonadHTTP m, SecurityScheme s) => Configuration s -> PostSubscriptionItemsRequestBody -> m (Either HttpException (Response ByteString))
- postSubscriptionItemsM :: forall m s. (MonadHTTP m, SecurityScheme s) => PostSubscriptionItemsRequestBody -> ReaderT (Configuration s) m (Either HttpException (Response PostSubscriptionItemsResponse))
- postSubscriptionItemsRawM :: forall m s. (MonadHTTP m, SecurityScheme s) => PostSubscriptionItemsRequestBody -> ReaderT (Configuration s) m (Either HttpException (Response ByteString))
- data PostSubscriptionItemsRequestBody = PostSubscriptionItemsRequestBody {
- postSubscriptionItemsRequestBodyBillingThresholds :: Maybe PostSubscriptionItemsRequestBodyBillingThresholds'Variants
- postSubscriptionItemsRequestBodyExpand :: Maybe ([] String)
- postSubscriptionItemsRequestBodyMetadata :: Maybe PostSubscriptionItemsRequestBodyMetadata'
- postSubscriptionItemsRequestBodyPaymentBehavior :: Maybe PostSubscriptionItemsRequestBodyPaymentBehavior'
- postSubscriptionItemsRequestBodyPlan :: Maybe String
- postSubscriptionItemsRequestBodyProrate :: Maybe Bool
- postSubscriptionItemsRequestBodyProrationBehavior :: Maybe PostSubscriptionItemsRequestBodyProrationBehavior'
- postSubscriptionItemsRequestBodyProrationDate :: Maybe Integer
- postSubscriptionItemsRequestBodyQuantity :: Maybe Integer
- postSubscriptionItemsRequestBodySubscription :: String
- postSubscriptionItemsRequestBodyTaxRates :: Maybe PostSubscriptionItemsRequestBodyTaxRates'Variants
- data PostSubscriptionItemsRequestBodyBillingThresholds'OneOf1
- data PostSubscriptionItemsRequestBodyBillingThresholds'OneOf2 = PostSubscriptionItemsRequestBodyBillingThresholds'OneOf2 {}
- data PostSubscriptionItemsRequestBodyBillingThresholds'Variants
- = PostSubscriptionItemsRequestBodyBillingThresholds'PostSubscriptionItemsRequestBodyBillingThresholds'OneOf1 PostSubscriptionItemsRequestBodyBillingThresholds'OneOf1
- | PostSubscriptionItemsRequestBodyBillingThresholds'PostSubscriptionItemsRequestBodyBillingThresholds'OneOf2 PostSubscriptionItemsRequestBodyBillingThresholds'OneOf2
- data PostSubscriptionItemsRequestBodyMetadata' = PostSubscriptionItemsRequestBodyMetadata' {
- data PostSubscriptionItemsRequestBodyPaymentBehavior'
- = PostSubscriptionItemsRequestBodyPaymentBehavior'EnumOther Value
- | PostSubscriptionItemsRequestBodyPaymentBehavior'EnumTyped String
- | PostSubscriptionItemsRequestBodyPaymentBehavior'EnumStringAllowIncomplete
- | PostSubscriptionItemsRequestBodyPaymentBehavior'EnumStringErrorIfIncomplete
- | PostSubscriptionItemsRequestBodyPaymentBehavior'EnumStringPendingIfIncomplete
- data PostSubscriptionItemsRequestBodyProrationBehavior'
- = PostSubscriptionItemsRequestBodyProrationBehavior'EnumOther Value
- | PostSubscriptionItemsRequestBodyProrationBehavior'EnumTyped String
- | PostSubscriptionItemsRequestBodyProrationBehavior'EnumStringAlwaysInvoice
- | PostSubscriptionItemsRequestBodyProrationBehavior'EnumStringCreateProrations
- | PostSubscriptionItemsRequestBodyProrationBehavior'EnumStringNone
- data PostSubscriptionItemsRequestBodyTaxRates'OneOf1
- data PostSubscriptionItemsRequestBodyTaxRates'Variants
- data PostSubscriptionItemsResponse
Documentation
postSubscriptionItems Source #
:: (MonadHTTP m, SecurityScheme s) | |
=> Configuration s | The configuration to use in the request |
-> PostSubscriptionItemsRequestBody | The request body to send |
-> m (Either HttpException (Response PostSubscriptionItemsResponse)) | Monad containing the result of the operation |
POST /v1/subscription_items
<p>Adds a new item to an existing subscription. No existing items will be changed or replaced.</p>
postSubscriptionItemsRaw :: forall m s. (MonadHTTP m, SecurityScheme s) => Configuration s -> PostSubscriptionItemsRequestBody -> m (Either HttpException (Response ByteString)) Source #
POST /v1/subscription_items
The same as postSubscriptionItems
but returns the raw ByteString
postSubscriptionItemsM :: forall m s. (MonadHTTP m, SecurityScheme s) => PostSubscriptionItemsRequestBody -> ReaderT (Configuration s) m (Either HttpException (Response PostSubscriptionItemsResponse)) Source #
POST /v1/subscription_items
Monadic version of postSubscriptionItems
(use with runWithConfiguration
)
postSubscriptionItemsRawM :: forall m s. (MonadHTTP m, SecurityScheme s) => PostSubscriptionItemsRequestBody -> ReaderT (Configuration s) m (Either HttpException (Response ByteString)) Source #
POST /v1/subscription_items
Monadic version of postSubscriptionItemsRaw
(use with runWithConfiguration
)
data PostSubscriptionItemsRequestBody Source #
Defines the data type for the schema postSubscriptionItemsRequestBody
PostSubscriptionItemsRequestBody | |
|
data PostSubscriptionItemsRequestBodyBillingThresholds'OneOf1 Source #
Defines the enum schema postSubscriptionItemsRequestBodyBilling_thresholds'OneOf1
Instances
data PostSubscriptionItemsRequestBodyBillingThresholds'OneOf2 Source #
Defines the data type for the schema postSubscriptionItemsRequestBodyBilling_thresholds'OneOf2
Instances
data PostSubscriptionItemsRequestBodyBillingThresholds'Variants Source #
Define the one-of schema postSubscriptionItemsRequestBodyBilling_thresholds'
Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds.
Instances
data PostSubscriptionItemsRequestBodyMetadata' Source #
Defines the data type for the schema postSubscriptionItemsRequestBodyMetadata'
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 PostSubscriptionItemsRequestBodyPaymentBehavior' Source #
Defines the enum schema postSubscriptionItemsRequestBodyPayment_behavior'
Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the SCA Migration Guide for Billing to learn more. This is the default behavior.
Use `pending_if_incomplete` to update the subscription using pending updates. When you use `pending_if_incomplete` you can only pass the parameters supported by pending updates.
Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the changelog to learn more.
Instances
data PostSubscriptionItemsRequestBodyProrationBehavior' Source #
Defines the enum schema postSubscriptionItemsRequestBodyProration_behavior'
Determines how to handle prorations when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`.
Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under certain conditions. In order to always invoice immediately for prorations, pass `always_invoice`.
Prorations can be disabled by passing `none`.
Instances
data PostSubscriptionItemsRequestBodyTaxRates'OneOf1 Source #
Defines the enum schema postSubscriptionItemsRequestBodyTax_rates'OneOf1
PostSubscriptionItemsRequestBodyTaxRates'OneOf1EnumOther Value | |
PostSubscriptionItemsRequestBodyTaxRates'OneOf1EnumTyped String | |
PostSubscriptionItemsRequestBodyTaxRates'OneOf1EnumString_ |
Instances
data PostSubscriptionItemsRequestBodyTaxRates'Variants Source #
Define the one-of schema postSubscriptionItemsRequestBodyTax_rates'
A list of Tax Rate ids. These Tax Rates will override the `default_tax_rates` on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
Instances
data PostSubscriptionItemsResponse Source #
Represents a response of the operation postSubscriptionItems
.
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), PostSubscriptionItemsResponseError
is used.
PostSubscriptionItemsResponseError String | Means either no matching case available or a parse error |
PostSubscriptionItemsResponse200 SubscriptionItem | Successful response. |
PostSubscriptionItemsResponseDefault Error | Error response. |