stripeapi-1.0.0.0: Stripe-Library
Safe HaskellNone
LanguageHaskell2010

StripeAPI.Operations.PostSubscriptionItems

Description

Contains the different functions to run the operation postSubscriptionItems

Synopsis

Documentation

postSubscriptionItems Source #

Arguments

:: 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.

Constructors

PostSubscriptionItemsRequestBody 

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

Instances details
Eq PostSubscriptionItemsRequestBodyBillingThresholds'OneOf1 Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

Show PostSubscriptionItemsRequestBodyBillingThresholds'OneOf1 Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

ToJSON PostSubscriptionItemsRequestBodyBillingThresholds'OneOf1 Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

FromJSON PostSubscriptionItemsRequestBodyBillingThresholds'OneOf1 Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

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

Instances details
Eq PostSubscriptionItemsRequestBodyBillingThresholds'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

Show PostSubscriptionItemsRequestBodyBillingThresholds'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

ToJSON PostSubscriptionItemsRequestBodyBillingThresholds'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

FromJSON PostSubscriptionItemsRequestBodyBillingThresholds'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

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.

Constructors

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 "allow_incomplete"

PostSubscriptionItemsRequestBodyPaymentBehavior'EnumDefaultIncomplete

Represents the JSON value "default_incomplete"

PostSubscriptionItemsRequestBodyPaymentBehavior'EnumErrorIfIncomplete

Represents the JSON value "error_if_incomplete"

PostSubscriptionItemsRequestBodyPaymentBehavior'EnumPendingIfIncomplete

Represents the JSON value "pending_if_incomplete"

Instances

Instances details
Eq PostSubscriptionItemsRequestBodyPaymentBehavior' Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

Show PostSubscriptionItemsRequestBodyPaymentBehavior' Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

ToJSON PostSubscriptionItemsRequestBodyPaymentBehavior' Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

FromJSON PostSubscriptionItemsRequestBodyPaymentBehavior' Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

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.

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

Instances details
Eq PostSubscriptionItemsRequestBodyPriceData'Recurring' Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

Show PostSubscriptionItemsRequestBodyPriceData'Recurring' Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

ToJSON PostSubscriptionItemsRequestBodyPriceData'Recurring' Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

FromJSON PostSubscriptionItemsRequestBodyPriceData'Recurring' Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

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.

Constructors

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 "day"

PostSubscriptionItemsRequestBodyPriceData'Recurring'Interval'EnumMonth

Represents the JSON value "month"

PostSubscriptionItemsRequestBodyPriceData'Recurring'Interval'EnumWeek

Represents the JSON value "week"

PostSubscriptionItemsRequestBodyPriceData'Recurring'Interval'EnumYear

Represents the JSON value "year"

Instances

Instances details
Eq PostSubscriptionItemsRequestBodyPriceData'Recurring'Interval' Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

Show PostSubscriptionItemsRequestBodyPriceData'Recurring'Interval' Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

ToJSON PostSubscriptionItemsRequestBodyPriceData'Recurring'Interval' Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

FromJSON PostSubscriptionItemsRequestBodyPriceData'Recurring'Interval' Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

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.

Constructors

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 "exclusive"

PostSubscriptionItemsRequestBodyPriceData'TaxBehavior'EnumInclusive

Represents the JSON value "inclusive"

PostSubscriptionItemsRequestBodyPriceData'TaxBehavior'EnumUnspecified

Represents the JSON value "unspecified"

Instances

Instances details
Eq PostSubscriptionItemsRequestBodyPriceData'TaxBehavior' Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

Show PostSubscriptionItemsRequestBodyPriceData'TaxBehavior' Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

ToJSON PostSubscriptionItemsRequestBodyPriceData'TaxBehavior' Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

FromJSON PostSubscriptionItemsRequestBodyPriceData'TaxBehavior' Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

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`.

Constructors

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 "always_invoice"

PostSubscriptionItemsRequestBodyProrationBehavior'EnumCreateProrations

Represents the JSON value "create_prorations"

PostSubscriptionItemsRequestBodyProrationBehavior'EnumNone

Represents the JSON value "none"

Instances

Instances details
Eq PostSubscriptionItemsRequestBodyProrationBehavior' Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

Show PostSubscriptionItemsRequestBodyProrationBehavior' Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

ToJSON PostSubscriptionItemsRequestBodyProrationBehavior' Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

FromJSON PostSubscriptionItemsRequestBodyProrationBehavior' Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

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.

Instances

Instances details
Eq PostSubscriptionItemsRequestBodyTaxRates'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

Show PostSubscriptionItemsRequestBodyTaxRates'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

ToJSON PostSubscriptionItemsRequestBodyTaxRates'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

FromJSON PostSubscriptionItemsRequestBodyTaxRates'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

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.

Constructors

PostSubscriptionItemsResponseError String

Means either no matching case available or a parse error

PostSubscriptionItemsResponse200 SubscriptionItem

Successful response.

PostSubscriptionItemsResponseDefault Error

Error response.