stripeapi-0.1.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

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

data PostSubscriptionItemsRequestBody Source #

Defines the data type for the schema postSubscriptionItemsRequestBody

Constructors

PostSubscriptionItemsRequestBody 

Fields

data PostSubscriptionItemsRequestBodyBillingThresholds'OneOf1 Source #

Defines the enum schema postSubscriptionItemsRequestBodyBilling_thresholds'OneOf1

Instances
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'OneOf2 Source #

Defines the data type for the schema postSubscriptionItemsRequestBodyBilling_thresholds'OneOf2

Instances
Eq PostSubscriptionItemsRequestBodyBillingThresholds'OneOf2 Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

Show PostSubscriptionItemsRequestBodyBillingThresholds'OneOf2 Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

ToJSON PostSubscriptionItemsRequestBodyBillingThresholds'OneOf2 Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

FromJSON PostSubscriptionItemsRequestBodyBillingThresholds'OneOf2 Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

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
Eq PostSubscriptionItemsRequestBodyBillingThresholds'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

Show PostSubscriptionItemsRequestBodyBillingThresholds'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

Generic 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

type Rep PostSubscriptionItemsRequestBodyBillingThresholds'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

type Rep PostSubscriptionItemsRequestBodyBillingThresholds'Variants = D1 (MetaData "PostSubscriptionItemsRequestBodyBillingThresholds'Variants" "StripeAPI.Operations.PostSubscriptionItems" "stripeapi-0.1.0.0-A3hJyYFbMZN6w4qjBpK6b6" False) (C1 (MetaCons "PostSubscriptionItemsRequestBodyBillingThresholds'PostSubscriptionItemsRequestBodyBillingThresholds'OneOf1" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 PostSubscriptionItemsRequestBodyBillingThresholds'OneOf1)) :+: C1 (MetaCons "PostSubscriptionItemsRequestBodyBillingThresholds'PostSubscriptionItemsRequestBodyBillingThresholds'OneOf2" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 PostSubscriptionItemsRequestBodyBillingThresholds'OneOf2)))

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
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 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
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'OneOf1 Source #

Defines the enum schema postSubscriptionItemsRequestBodyTax_rates'OneOf1

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
Eq PostSubscriptionItemsRequestBodyTaxRates'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

Show PostSubscriptionItemsRequestBodyTaxRates'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

Generic 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

type Rep PostSubscriptionItemsRequestBodyTaxRates'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostSubscriptionItems

type Rep PostSubscriptionItemsRequestBodyTaxRates'Variants = D1 (MetaData "PostSubscriptionItemsRequestBodyTaxRates'Variants" "StripeAPI.Operations.PostSubscriptionItems" "stripeapi-0.1.0.0-A3hJyYFbMZN6w4qjBpK6b6" False) (C1 (MetaCons "PostSubscriptionItemsRequestBodyTaxRates'PostSubscriptionItemsRequestBodyTaxRates'OneOf1" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 PostSubscriptionItemsRequestBodyTaxRates'OneOf1)) :+: C1 (MetaCons "PostSubscriptionItemsRequestBodyTaxRates'ListString" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [String])))

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.