Safe Haskell | None |
---|---|
Language | Haskell2010 |
Contains the different functions to run the operation postSubscriptionItems
Synopsis
- postSubscriptionItems :: forall m. MonadHTTP m => PostSubscriptionItemsRequestBody -> StripeT m (Response PostSubscriptionItemsResponse)
- data PostSubscriptionItemsRequestBody = PostSubscriptionItemsRequestBody {
- postSubscriptionItemsRequestBodyBillingThresholds :: Maybe PostSubscriptionItemsRequestBodyBillingThresholds'Variants
- postSubscriptionItemsRequestBodyExpand :: Maybe [Text]
- postSubscriptionItemsRequestBodyMetadata :: Maybe Object
- postSubscriptionItemsRequestBodyPaymentBehavior :: Maybe PostSubscriptionItemsRequestBodyPaymentBehavior'
- postSubscriptionItemsRequestBodyPrice :: Maybe Text
- postSubscriptionItemsRequestBodyPriceData :: Maybe PostSubscriptionItemsRequestBodyPriceData'
- postSubscriptionItemsRequestBodyProrationBehavior :: Maybe PostSubscriptionItemsRequestBodyProrationBehavior'
- postSubscriptionItemsRequestBodyProrationDate :: Maybe Int
- postSubscriptionItemsRequestBodyQuantity :: Maybe Int
- postSubscriptionItemsRequestBodySubscription :: Text
- postSubscriptionItemsRequestBodyTaxRates :: Maybe PostSubscriptionItemsRequestBodyTaxRates'Variants
- mkPostSubscriptionItemsRequestBody :: Text -> PostSubscriptionItemsRequestBody
- data PostSubscriptionItemsRequestBodyBillingThresholds'OneOf1 = PostSubscriptionItemsRequestBodyBillingThresholds'OneOf1 {}
- mkPostSubscriptionItemsRequestBodyBillingThresholds'OneOf1 :: Int -> PostSubscriptionItemsRequestBodyBillingThresholds'OneOf1
- data PostSubscriptionItemsRequestBodyBillingThresholds'Variants
- data PostSubscriptionItemsRequestBodyPaymentBehavior'
- = PostSubscriptionItemsRequestBodyPaymentBehavior'Other Value
- | PostSubscriptionItemsRequestBodyPaymentBehavior'Typed Text
- | PostSubscriptionItemsRequestBodyPaymentBehavior'EnumAllowIncomplete
- | PostSubscriptionItemsRequestBodyPaymentBehavior'EnumDefaultIncomplete
- | PostSubscriptionItemsRequestBodyPaymentBehavior'EnumErrorIfIncomplete
- | PostSubscriptionItemsRequestBodyPaymentBehavior'EnumPendingIfIncomplete
- data PostSubscriptionItemsRequestBodyPriceData' = PostSubscriptionItemsRequestBodyPriceData' {
- postSubscriptionItemsRequestBodyPriceData'Currency :: Text
- postSubscriptionItemsRequestBodyPriceData'Product :: Text
- postSubscriptionItemsRequestBodyPriceData'Recurring :: PostSubscriptionItemsRequestBodyPriceData'Recurring'
- postSubscriptionItemsRequestBodyPriceData'TaxBehavior :: Maybe PostSubscriptionItemsRequestBodyPriceData'TaxBehavior'
- postSubscriptionItemsRequestBodyPriceData'UnitAmount :: Maybe Int
- postSubscriptionItemsRequestBodyPriceData'UnitAmountDecimal :: Maybe Text
- mkPostSubscriptionItemsRequestBodyPriceData' :: Text -> Text -> PostSubscriptionItemsRequestBodyPriceData'Recurring' -> PostSubscriptionItemsRequestBodyPriceData'
- data PostSubscriptionItemsRequestBodyPriceData'Recurring' = PostSubscriptionItemsRequestBodyPriceData'Recurring' {}
- mkPostSubscriptionItemsRequestBodyPriceData'Recurring' :: PostSubscriptionItemsRequestBodyPriceData'Recurring'Interval' -> PostSubscriptionItemsRequestBodyPriceData'Recurring'
- data PostSubscriptionItemsRequestBodyPriceData'Recurring'Interval'
- = PostSubscriptionItemsRequestBodyPriceData'Recurring'Interval'Other Value
- | PostSubscriptionItemsRequestBodyPriceData'Recurring'Interval'Typed Text
- | PostSubscriptionItemsRequestBodyPriceData'Recurring'Interval'EnumDay
- | PostSubscriptionItemsRequestBodyPriceData'Recurring'Interval'EnumMonth
- | PostSubscriptionItemsRequestBodyPriceData'Recurring'Interval'EnumWeek
- | PostSubscriptionItemsRequestBodyPriceData'Recurring'Interval'EnumYear
- data PostSubscriptionItemsRequestBodyPriceData'TaxBehavior'
- = PostSubscriptionItemsRequestBodyPriceData'TaxBehavior'Other Value
- | PostSubscriptionItemsRequestBodyPriceData'TaxBehavior'Typed Text
- | PostSubscriptionItemsRequestBodyPriceData'TaxBehavior'EnumExclusive
- | PostSubscriptionItemsRequestBodyPriceData'TaxBehavior'EnumInclusive
- | PostSubscriptionItemsRequestBodyPriceData'TaxBehavior'EnumUnspecified
- data PostSubscriptionItemsRequestBodyProrationBehavior'
- = PostSubscriptionItemsRequestBodyProrationBehavior'Other Value
- | PostSubscriptionItemsRequestBodyProrationBehavior'Typed Text
- | PostSubscriptionItemsRequestBodyProrationBehavior'EnumAlwaysInvoice
- | PostSubscriptionItemsRequestBodyProrationBehavior'EnumCreateProrations
- | PostSubscriptionItemsRequestBodyProrationBehavior'EnumNone
- data PostSubscriptionItemsRequestBodyTaxRates'Variants
- data PostSubscriptionItemsResponse
Documentation
postSubscriptionItems Source #
:: forall m. MonadHTTP m | |
=> PostSubscriptionItemsRequestBody | The request body to send |
-> StripeT m (Response PostSubscriptionItemsResponse) | Monadic computation which returns 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>
data PostSubscriptionItemsRequestBody Source #
Defines the object schema located at paths./v1/subscription_items.POST.requestBody.content.application/x-www-form-urlencoded.schema
in the specification.
PostSubscriptionItemsRequestBody | |
|
mkPostSubscriptionItemsRequestBody Source #
Create a new PostSubscriptionItemsRequestBody
with all required fields.
data PostSubscriptionItemsRequestBodyBillingThresholds'OneOf1 Source #
Defines the object schema located at paths./v1/subscription_items.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.billing_thresholds.anyOf
in the specification.
Instances
mkPostSubscriptionItemsRequestBodyBillingThresholds'OneOf1 Source #
:: Int |
|
-> PostSubscriptionItemsRequestBodyBillingThresholds'OneOf1 |
Create a new PostSubscriptionItemsRequestBodyBillingThresholds'OneOf1
with all required fields.
data PostSubscriptionItemsRequestBodyBillingThresholds'Variants Source #
Defines the oneOf schema located at paths./v1/subscription_items.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.billing_thresholds.anyOf
in the specification.
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 PostSubscriptionItemsRequestBodyPaymentBehavior' Source #
Defines the enum schema located at paths./v1/subscription_items.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.payment_behavior
in the specification.
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 `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, SCA regulation, or collecting a mandate for a bank debit payment method.
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 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 update the 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.
PostSubscriptionItemsRequestBodyPaymentBehavior'Other Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
PostSubscriptionItemsRequestBodyPaymentBehavior'Typed Text | This constructor can be used to send values to the server which are not present in the specification yet. |
PostSubscriptionItemsRequestBodyPaymentBehavior'EnumAllowIncomplete | Represents the JSON value |
PostSubscriptionItemsRequestBodyPaymentBehavior'EnumDefaultIncomplete | Represents the JSON value |
PostSubscriptionItemsRequestBodyPaymentBehavior'EnumErrorIfIncomplete | Represents the JSON value |
PostSubscriptionItemsRequestBodyPaymentBehavior'EnumPendingIfIncomplete | Represents the JSON value |
Instances
data PostSubscriptionItemsRequestBodyPriceData' Source #
Defines the object schema located at paths./v1/subscription_items.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.price_data
in the specification.
Data used to generate a new Price object inline.
PostSubscriptionItemsRequestBodyPriceData' | |
|
mkPostSubscriptionItemsRequestBodyPriceData' Source #
:: Text | |
-> Text | |
-> PostSubscriptionItemsRequestBodyPriceData'Recurring' | |
-> PostSubscriptionItemsRequestBodyPriceData' |
Create a new PostSubscriptionItemsRequestBodyPriceData'
with all required fields.
data PostSubscriptionItemsRequestBodyPriceData'Recurring' Source #
Defines the object schema located at paths./v1/subscription_items.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.price_data.properties.recurring
in the specification.
Instances
mkPostSubscriptionItemsRequestBodyPriceData'Recurring' Source #
:: PostSubscriptionItemsRequestBodyPriceData'Recurring'Interval' |
|
-> PostSubscriptionItemsRequestBodyPriceData'Recurring' |
Create a new PostSubscriptionItemsRequestBodyPriceData'Recurring'
with all required fields.
data PostSubscriptionItemsRequestBodyPriceData'Recurring'Interval' Source #
Defines the enum schema located at paths./v1/subscription_items.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.price_data.properties.recurring.properties.interval
in the specification.
PostSubscriptionItemsRequestBodyPriceData'Recurring'Interval'Other Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
PostSubscriptionItemsRequestBodyPriceData'Recurring'Interval'Typed Text | This constructor can be used to send values to the server which are not present in the specification yet. |
PostSubscriptionItemsRequestBodyPriceData'Recurring'Interval'EnumDay | Represents the JSON value |
PostSubscriptionItemsRequestBodyPriceData'Recurring'Interval'EnumMonth | Represents the JSON value |
PostSubscriptionItemsRequestBodyPriceData'Recurring'Interval'EnumWeek | Represents the JSON value |
PostSubscriptionItemsRequestBodyPriceData'Recurring'Interval'EnumYear | Represents the JSON value |
Instances
data PostSubscriptionItemsRequestBodyPriceData'TaxBehavior' Source #
Defines the enum schema located at paths./v1/subscription_items.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.price_data.properties.tax_behavior
in the specification.
PostSubscriptionItemsRequestBodyPriceData'TaxBehavior'Other Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
PostSubscriptionItemsRequestBodyPriceData'TaxBehavior'Typed Text | This constructor can be used to send values to the server which are not present in the specification yet. |
PostSubscriptionItemsRequestBodyPriceData'TaxBehavior'EnumExclusive | Represents the JSON value |
PostSubscriptionItemsRequestBodyPriceData'TaxBehavior'EnumInclusive | Represents the JSON value |
PostSubscriptionItemsRequestBodyPriceData'TaxBehavior'EnumUnspecified | Represents the JSON value |
Instances
data PostSubscriptionItemsRequestBodyProrationBehavior' Source #
Defines the enum schema located at paths./v1/subscription_items.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.proration_behavior
in the specification.
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`.
PostSubscriptionItemsRequestBodyProrationBehavior'Other Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
PostSubscriptionItemsRequestBodyProrationBehavior'Typed Text | This constructor can be used to send values to the server which are not present in the specification yet. |
PostSubscriptionItemsRequestBodyProrationBehavior'EnumAlwaysInvoice | Represents the JSON value |
PostSubscriptionItemsRequestBodyProrationBehavior'EnumCreateProrations | Represents the JSON value |
PostSubscriptionItemsRequestBodyProrationBehavior'EnumNone | Represents the JSON value |
Instances
data PostSubscriptionItemsRequestBodyTaxRates'Variants Source #
Defines the oneOf schema located at paths./v1/subscription_items.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.tax_rates.anyOf
in the specification.
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.
PostSubscriptionItemsRequestBodyTaxRates'EmptyString | Represents the JSON value |
PostSubscriptionItemsRequestBodyTaxRates'ListTText [Text] |
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. |