Safe Haskell | None |
---|---|
Language | Haskell2010 |
Contains the different functions to run the operation postSubscriptionItemsItem
Synopsis
- postSubscriptionItemsItem :: forall m. MonadHTTP m => Text -> Maybe PostSubscriptionItemsItemRequestBody -> ClientT m (Response PostSubscriptionItemsItemResponse)
- data PostSubscriptionItemsItemRequestBody = PostSubscriptionItemsItemRequestBody {
- postSubscriptionItemsItemRequestBodyBillingThresholds :: Maybe PostSubscriptionItemsItemRequestBodyBillingThresholds'Variants
- postSubscriptionItemsItemRequestBodyExpand :: Maybe [Text]
- postSubscriptionItemsItemRequestBodyMetadata :: Maybe PostSubscriptionItemsItemRequestBodyMetadata'Variants
- postSubscriptionItemsItemRequestBodyOffSession :: Maybe Bool
- postSubscriptionItemsItemRequestBodyPaymentBehavior :: Maybe PostSubscriptionItemsItemRequestBodyPaymentBehavior'
- postSubscriptionItemsItemRequestBodyPrice :: Maybe Text
- postSubscriptionItemsItemRequestBodyPriceData :: Maybe PostSubscriptionItemsItemRequestBodyPriceData'
- postSubscriptionItemsItemRequestBodyProrationBehavior :: Maybe PostSubscriptionItemsItemRequestBodyProrationBehavior'
- postSubscriptionItemsItemRequestBodyProrationDate :: Maybe Int
- postSubscriptionItemsItemRequestBodyQuantity :: Maybe Int
- postSubscriptionItemsItemRequestBodyTaxRates :: Maybe PostSubscriptionItemsItemRequestBodyTaxRates'Variants
- mkPostSubscriptionItemsItemRequestBody :: PostSubscriptionItemsItemRequestBody
- data PostSubscriptionItemsItemRequestBodyBillingThresholds'OneOf1 = PostSubscriptionItemsItemRequestBodyBillingThresholds'OneOf1 {}
- mkPostSubscriptionItemsItemRequestBodyBillingThresholds'OneOf1 :: Int -> PostSubscriptionItemsItemRequestBodyBillingThresholds'OneOf1
- data PostSubscriptionItemsItemRequestBodyBillingThresholds'Variants
- data PostSubscriptionItemsItemRequestBodyMetadata'Variants
- data PostSubscriptionItemsItemRequestBodyPaymentBehavior'
- = PostSubscriptionItemsItemRequestBodyPaymentBehavior'Other Value
- | PostSubscriptionItemsItemRequestBodyPaymentBehavior'Typed Text
- | PostSubscriptionItemsItemRequestBodyPaymentBehavior'EnumAllowIncomplete
- | PostSubscriptionItemsItemRequestBodyPaymentBehavior'EnumDefaultIncomplete
- | PostSubscriptionItemsItemRequestBodyPaymentBehavior'EnumErrorIfIncomplete
- | PostSubscriptionItemsItemRequestBodyPaymentBehavior'EnumPendingIfIncomplete
- data PostSubscriptionItemsItemRequestBodyPriceData' = PostSubscriptionItemsItemRequestBodyPriceData' {
- postSubscriptionItemsItemRequestBodyPriceData'Currency :: Text
- postSubscriptionItemsItemRequestBodyPriceData'Product :: Text
- postSubscriptionItemsItemRequestBodyPriceData'Recurring :: PostSubscriptionItemsItemRequestBodyPriceData'Recurring'
- postSubscriptionItemsItemRequestBodyPriceData'TaxBehavior :: Maybe PostSubscriptionItemsItemRequestBodyPriceData'TaxBehavior'
- postSubscriptionItemsItemRequestBodyPriceData'UnitAmount :: Maybe Int
- postSubscriptionItemsItemRequestBodyPriceData'UnitAmountDecimal :: Maybe Text
- mkPostSubscriptionItemsItemRequestBodyPriceData' :: Text -> Text -> PostSubscriptionItemsItemRequestBodyPriceData'Recurring' -> PostSubscriptionItemsItemRequestBodyPriceData'
- data PostSubscriptionItemsItemRequestBodyPriceData'Recurring' = PostSubscriptionItemsItemRequestBodyPriceData'Recurring' {}
- mkPostSubscriptionItemsItemRequestBodyPriceData'Recurring' :: PostSubscriptionItemsItemRequestBodyPriceData'Recurring'Interval' -> PostSubscriptionItemsItemRequestBodyPriceData'Recurring'
- data PostSubscriptionItemsItemRequestBodyPriceData'Recurring'Interval'
- = PostSubscriptionItemsItemRequestBodyPriceData'Recurring'Interval'Other Value
- | PostSubscriptionItemsItemRequestBodyPriceData'Recurring'Interval'Typed Text
- | PostSubscriptionItemsItemRequestBodyPriceData'Recurring'Interval'EnumDay
- | PostSubscriptionItemsItemRequestBodyPriceData'Recurring'Interval'EnumMonth
- | PostSubscriptionItemsItemRequestBodyPriceData'Recurring'Interval'EnumWeek
- | PostSubscriptionItemsItemRequestBodyPriceData'Recurring'Interval'EnumYear
- data PostSubscriptionItemsItemRequestBodyPriceData'TaxBehavior'
- = PostSubscriptionItemsItemRequestBodyPriceData'TaxBehavior'Other Value
- | PostSubscriptionItemsItemRequestBodyPriceData'TaxBehavior'Typed Text
- | PostSubscriptionItemsItemRequestBodyPriceData'TaxBehavior'EnumExclusive
- | PostSubscriptionItemsItemRequestBodyPriceData'TaxBehavior'EnumInclusive
- | PostSubscriptionItemsItemRequestBodyPriceData'TaxBehavior'EnumUnspecified
- data PostSubscriptionItemsItemRequestBodyProrationBehavior'
- = PostSubscriptionItemsItemRequestBodyProrationBehavior'Other Value
- | PostSubscriptionItemsItemRequestBodyProrationBehavior'Typed Text
- | PostSubscriptionItemsItemRequestBodyProrationBehavior'EnumAlwaysInvoice
- | PostSubscriptionItemsItemRequestBodyProrationBehavior'EnumCreateProrations
- | PostSubscriptionItemsItemRequestBodyProrationBehavior'EnumNone
- data PostSubscriptionItemsItemRequestBodyTaxRates'Variants
- data PostSubscriptionItemsItemResponse
Documentation
postSubscriptionItemsItem Source #
:: forall m. MonadHTTP m | |
=> Text | item | Constraints: Maximum length of 5000 |
-> Maybe PostSubscriptionItemsItemRequestBody | The request body to send |
-> ClientT m (Response PostSubscriptionItemsItemResponse) | Monadic computation which returns the result of the operation |
POST /v1/subscription_items/{item}
<p>Updates the plan or quantity of an item on a current subscription.</p>
data PostSubscriptionItemsItemRequestBody Source #
Defines the object schema located at paths./v1/subscription_items/{item}.POST.requestBody.content.application/x-www-form-urlencoded.schema
in the specification.
PostSubscriptionItemsItemRequestBody | |
|
mkPostSubscriptionItemsItemRequestBody :: PostSubscriptionItemsItemRequestBody Source #
Create a new PostSubscriptionItemsItemRequestBody
with all required fields.
data PostSubscriptionItemsItemRequestBodyBillingThresholds'OneOf1 Source #
Defines the object schema located at paths./v1/subscription_items/{item}.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.billing_thresholds.anyOf
in the specification.
Instances
mkPostSubscriptionItemsItemRequestBodyBillingThresholds'OneOf1 Source #
:: Int |
|
-> PostSubscriptionItemsItemRequestBodyBillingThresholds'OneOf1 |
Create a new PostSubscriptionItemsItemRequestBodyBillingThresholds'OneOf1
with all required fields.
data PostSubscriptionItemsItemRequestBodyBillingThresholds'Variants Source #
Defines the oneOf schema located at paths./v1/subscription_items/{item}.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 PostSubscriptionItemsItemRequestBodyMetadata'Variants Source #
Defines the oneOf schema located at paths./v1/subscription_items/{item}.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.metadata.anyOf
in the specification.
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`.
PostSubscriptionItemsItemRequestBodyMetadata'EmptyString | Represents the JSON value |
PostSubscriptionItemsItemRequestBodyMetadata'Object Object |
Instances
data PostSubscriptionItemsItemRequestBodyPaymentBehavior' Source #
Defines the enum schema located at paths./v1/subscription_items/{item}.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.
PostSubscriptionItemsItemRequestBodyPaymentBehavior'Other Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
PostSubscriptionItemsItemRequestBodyPaymentBehavior'Typed Text | This constructor can be used to send values to the server which are not present in the specification yet. |
PostSubscriptionItemsItemRequestBodyPaymentBehavior'EnumAllowIncomplete | Represents the JSON value |
PostSubscriptionItemsItemRequestBodyPaymentBehavior'EnumDefaultIncomplete | Represents the JSON value |
PostSubscriptionItemsItemRequestBodyPaymentBehavior'EnumErrorIfIncomplete | Represents the JSON value |
PostSubscriptionItemsItemRequestBodyPaymentBehavior'EnumPendingIfIncomplete | Represents the JSON value |
Instances
data PostSubscriptionItemsItemRequestBodyPriceData' Source #
Defines the object schema located at paths./v1/subscription_items/{item}.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.price_data
in the specification.
Data used to generate a new Price object inline.
mkPostSubscriptionItemsItemRequestBodyPriceData' Source #
:: Text | |
-> Text | |
-> PostSubscriptionItemsItemRequestBodyPriceData'Recurring' | |
-> PostSubscriptionItemsItemRequestBodyPriceData' |
Create a new PostSubscriptionItemsItemRequestBodyPriceData'
with all required fields.
data PostSubscriptionItemsItemRequestBodyPriceData'Recurring' Source #
Defines the object schema located at paths./v1/subscription_items/{item}.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.price_data.properties.recurring
in the specification.
Instances
mkPostSubscriptionItemsItemRequestBodyPriceData'Recurring' Source #
:: PostSubscriptionItemsItemRequestBodyPriceData'Recurring'Interval' |
|
-> PostSubscriptionItemsItemRequestBodyPriceData'Recurring' |
Create a new PostSubscriptionItemsItemRequestBodyPriceData'Recurring'
with all required fields.
data PostSubscriptionItemsItemRequestBodyPriceData'Recurring'Interval' Source #
Defines the enum schema located at paths./v1/subscription_items/{item}.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.price_data.properties.recurring.properties.interval
in the specification.
PostSubscriptionItemsItemRequestBodyPriceData'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. |
PostSubscriptionItemsItemRequestBodyPriceData'Recurring'Interval'Typed Text | This constructor can be used to send values to the server which are not present in the specification yet. |
PostSubscriptionItemsItemRequestBodyPriceData'Recurring'Interval'EnumDay | Represents the JSON value |
PostSubscriptionItemsItemRequestBodyPriceData'Recurring'Interval'EnumMonth | Represents the JSON value |
PostSubscriptionItemsItemRequestBodyPriceData'Recurring'Interval'EnumWeek | Represents the JSON value |
PostSubscriptionItemsItemRequestBodyPriceData'Recurring'Interval'EnumYear | Represents the JSON value |
Instances
data PostSubscriptionItemsItemRequestBodyPriceData'TaxBehavior' Source #
Defines the enum schema located at paths./v1/subscription_items/{item}.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.price_data.properties.tax_behavior
in the specification.
PostSubscriptionItemsItemRequestBodyPriceData'TaxBehavior'Other Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
PostSubscriptionItemsItemRequestBodyPriceData'TaxBehavior'Typed Text | This constructor can be used to send values to the server which are not present in the specification yet. |
PostSubscriptionItemsItemRequestBodyPriceData'TaxBehavior'EnumExclusive | Represents the JSON value |
PostSubscriptionItemsItemRequestBodyPriceData'TaxBehavior'EnumInclusive | Represents the JSON value |
PostSubscriptionItemsItemRequestBodyPriceData'TaxBehavior'EnumUnspecified | Represents the JSON value |
Instances
data PostSubscriptionItemsItemRequestBodyProrationBehavior' Source #
Defines the enum schema located at paths./v1/subscription_items/{item}.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`.
PostSubscriptionItemsItemRequestBodyProrationBehavior'Other Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
PostSubscriptionItemsItemRequestBodyProrationBehavior'Typed Text | This constructor can be used to send values to the server which are not present in the specification yet. |
PostSubscriptionItemsItemRequestBodyProrationBehavior'EnumAlwaysInvoice | Represents the JSON value |
PostSubscriptionItemsItemRequestBodyProrationBehavior'EnumCreateProrations | Represents the JSON value |
PostSubscriptionItemsItemRequestBodyProrationBehavior'EnumNone | Represents the JSON value |
Instances
data PostSubscriptionItemsItemRequestBodyTaxRates'Variants Source #
Defines the oneOf schema located at paths./v1/subscription_items/{item}.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.
PostSubscriptionItemsItemRequestBodyTaxRates'EmptyString | Represents the JSON value |
PostSubscriptionItemsItemRequestBodyTaxRates'ListTText [Text] |
Instances
data PostSubscriptionItemsItemResponse Source #
Represents a response of the operation postSubscriptionItemsItem
.
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), PostSubscriptionItemsItemResponseError
is used.
PostSubscriptionItemsItemResponseError String | Means either no matching case available or a parse error |
PostSubscriptionItemsItemResponse200 SubscriptionItem | Successful response. |
PostSubscriptionItemsItemResponseDefault Error | Error response. |