Safe Haskell | None |
---|---|
Language | Haskell2010 |
Contains the different functions to run the operation postSubscriptions
Synopsis
- postSubscriptions :: forall m s. (MonadHTTP m, SecurityScheme s) => Configuration s -> PostSubscriptionsRequestBody -> m (Either HttpException (Response PostSubscriptionsResponse))
- postSubscriptionsRaw :: forall m s. (MonadHTTP m, SecurityScheme s) => Configuration s -> PostSubscriptionsRequestBody -> m (Either HttpException (Response ByteString))
- postSubscriptionsM :: forall m s. (MonadHTTP m, SecurityScheme s) => PostSubscriptionsRequestBody -> ReaderT (Configuration s) m (Either HttpException (Response PostSubscriptionsResponse))
- postSubscriptionsRawM :: forall m s. (MonadHTTP m, SecurityScheme s) => PostSubscriptionsRequestBody -> ReaderT (Configuration s) m (Either HttpException (Response ByteString))
- data PostSubscriptionsRequestBody = PostSubscriptionsRequestBody {
- postSubscriptionsRequestBodyApplicationFeePercent :: Maybe Double
- postSubscriptionsRequestBodyBackdateStartDate :: Maybe Integer
- postSubscriptionsRequestBodyBillingCycleAnchor :: Maybe Integer
- postSubscriptionsRequestBodyBillingThresholds :: Maybe PostSubscriptionsRequestBodyBillingThresholds'Variants
- postSubscriptionsRequestBodyCancelAt :: Maybe Integer
- postSubscriptionsRequestBodyCancelAtPeriodEnd :: Maybe Bool
- postSubscriptionsRequestBodyCollectionMethod :: Maybe PostSubscriptionsRequestBodyCollectionMethod'
- postSubscriptionsRequestBodyCoupon :: Maybe String
- postSubscriptionsRequestBodyCustomer :: String
- postSubscriptionsRequestBodyDaysUntilDue :: Maybe Integer
- postSubscriptionsRequestBodyDefaultPaymentMethod :: Maybe String
- postSubscriptionsRequestBodyDefaultSource :: Maybe String
- postSubscriptionsRequestBodyDefaultTaxRates :: Maybe PostSubscriptionsRequestBodyDefaultTaxRates'Variants
- postSubscriptionsRequestBodyExpand :: Maybe ([] String)
- postSubscriptionsRequestBodyItems :: Maybe ([] PostSubscriptionsRequestBodyItems')
- postSubscriptionsRequestBodyMetadata :: Maybe PostSubscriptionsRequestBodyMetadata'
- postSubscriptionsRequestBodyOffSession :: Maybe Bool
- postSubscriptionsRequestBodyPaymentBehavior :: Maybe PostSubscriptionsRequestBodyPaymentBehavior'
- postSubscriptionsRequestBodyPendingInvoiceItemInterval :: Maybe PostSubscriptionsRequestBodyPendingInvoiceItemInterval'Variants
- postSubscriptionsRequestBodyProrate :: Maybe Bool
- postSubscriptionsRequestBodyProrationBehavior :: Maybe PostSubscriptionsRequestBodyProrationBehavior'
- postSubscriptionsRequestBodyTaxPercent :: Maybe PostSubscriptionsRequestBodyTaxPercent'Variants
- postSubscriptionsRequestBodyTrialEnd :: Maybe PostSubscriptionsRequestBodyTrialEnd'Variants
- postSubscriptionsRequestBodyTrialFromPlan :: Maybe Bool
- postSubscriptionsRequestBodyTrialPeriodDays :: Maybe Integer
- data PostSubscriptionsRequestBodyBillingThresholds'OneOf1
- data PostSubscriptionsRequestBodyBillingThresholds'OneOf2 = PostSubscriptionsRequestBodyBillingThresholds'OneOf2 {}
- data PostSubscriptionsRequestBodyBillingThresholds'Variants
- = PostSubscriptionsRequestBodyBillingThresholds'PostSubscriptionsRequestBodyBillingThresholds'OneOf1 PostSubscriptionsRequestBodyBillingThresholds'OneOf1
- | PostSubscriptionsRequestBodyBillingThresholds'PostSubscriptionsRequestBodyBillingThresholds'OneOf2 PostSubscriptionsRequestBodyBillingThresholds'OneOf2
- data PostSubscriptionsRequestBodyCollectionMethod'
- data PostSubscriptionsRequestBodyDefaultTaxRates'OneOf1
- data PostSubscriptionsRequestBodyDefaultTaxRates'Variants
- data PostSubscriptionsRequestBodyItems' = PostSubscriptionsRequestBodyItems' {
- postSubscriptionsRequestBodyItems'BillingThresholds :: Maybe PostSubscriptionsRequestBodyItems'BillingThresholds'Variants
- postSubscriptionsRequestBodyItems'Metadata :: Maybe PostSubscriptionsRequestBodyItems'Metadata'
- postSubscriptionsRequestBodyItems'Plan :: Maybe String
- postSubscriptionsRequestBodyItems'Quantity :: Maybe Integer
- postSubscriptionsRequestBodyItems'TaxRates :: Maybe PostSubscriptionsRequestBodyItems'TaxRates'Variants
- data PostSubscriptionsRequestBodyItems'BillingThresholds'OneOf1
- data PostSubscriptionsRequestBodyItems'BillingThresholds'OneOf2 = PostSubscriptionsRequestBodyItems'BillingThresholds'OneOf2 {}
- data PostSubscriptionsRequestBodyItems'BillingThresholds'Variants
- = PostSubscriptionsRequestBodyItems'BillingThresholds'PostSubscriptionsRequestBodyItems'BillingThresholds'OneOf1 PostSubscriptionsRequestBodyItems'BillingThresholds'OneOf1
- | PostSubscriptionsRequestBodyItems'BillingThresholds'PostSubscriptionsRequestBodyItems'BillingThresholds'OneOf2 PostSubscriptionsRequestBodyItems'BillingThresholds'OneOf2
- data PostSubscriptionsRequestBodyItems'Metadata' = PostSubscriptionsRequestBodyItems'Metadata' {
- data PostSubscriptionsRequestBodyItems'TaxRates'OneOf1
- data PostSubscriptionsRequestBodyItems'TaxRates'Variants
- data PostSubscriptionsRequestBodyMetadata' = PostSubscriptionsRequestBodyMetadata' {
- data PostSubscriptionsRequestBodyPaymentBehavior'
- = PostSubscriptionsRequestBodyPaymentBehavior'EnumOther Value
- | PostSubscriptionsRequestBodyPaymentBehavior'EnumTyped String
- | PostSubscriptionsRequestBodyPaymentBehavior'EnumStringAllowIncomplete
- | PostSubscriptionsRequestBodyPaymentBehavior'EnumStringErrorIfIncomplete
- | PostSubscriptionsRequestBodyPaymentBehavior'EnumStringPendingIfIncomplete
- data PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1
- data PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf2 = PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf2 {}
- data PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf2Interval'
- = PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf2Interval'EnumOther Value
- | PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf2Interval'EnumTyped String
- | PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf2Interval'EnumStringDay
- | PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf2Interval'EnumStringMonth
- | PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf2Interval'EnumStringWeek
- | PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf2Interval'EnumStringYear
- data PostSubscriptionsRequestBodyPendingInvoiceItemInterval'Variants
- = PostSubscriptionsRequestBodyPendingInvoiceItemInterval'PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1 PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1
- | PostSubscriptionsRequestBodyPendingInvoiceItemInterval'PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf2 PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf2
- data PostSubscriptionsRequestBodyProrationBehavior'
- = PostSubscriptionsRequestBodyProrationBehavior'EnumOther Value
- | PostSubscriptionsRequestBodyProrationBehavior'EnumTyped String
- | PostSubscriptionsRequestBodyProrationBehavior'EnumStringAlwaysInvoice
- | PostSubscriptionsRequestBodyProrationBehavior'EnumStringCreateProrations
- | PostSubscriptionsRequestBodyProrationBehavior'EnumStringNone
- data PostSubscriptionsRequestBodyTaxPercent'OneOf1
- data PostSubscriptionsRequestBodyTaxPercent'Variants
- data PostSubscriptionsRequestBodyTrialEnd'OneOf1
- data PostSubscriptionsRequestBodyTrialEnd'Variants
- data PostSubscriptionsResponse
Documentation
:: (MonadHTTP m, SecurityScheme s) | |
=> Configuration s | The configuration to use in the request |
-> PostSubscriptionsRequestBody | The request body to send |
-> m (Either HttpException (Response PostSubscriptionsResponse)) | Monad containing the result of the operation |
POST /v1/subscriptions
<p>Creates a new subscription on an existing customer. Each customer can have up to 25 active or scheduled subscriptions.</p>
postSubscriptionsRaw :: forall m s. (MonadHTTP m, SecurityScheme s) => Configuration s -> PostSubscriptionsRequestBody -> m (Either HttpException (Response ByteString)) Source #
POST /v1/subscriptions
The same as postSubscriptions
but returns the raw ByteString
postSubscriptionsM :: forall m s. (MonadHTTP m, SecurityScheme s) => PostSubscriptionsRequestBody -> ReaderT (Configuration s) m (Either HttpException (Response PostSubscriptionsResponse)) Source #
POST /v1/subscriptions
Monadic version of postSubscriptions
(use with runWithConfiguration
)
postSubscriptionsRawM :: forall m s. (MonadHTTP m, SecurityScheme s) => PostSubscriptionsRequestBody -> ReaderT (Configuration s) m (Either HttpException (Response ByteString)) Source #
POST /v1/subscriptions
Monadic version of postSubscriptionsRaw
(use with runWithConfiguration
)
data PostSubscriptionsRequestBody Source #
Defines the data type for the schema postSubscriptionsRequestBody
PostSubscriptionsRequestBody | |
|
Instances
data PostSubscriptionsRequestBodyBillingThresholds'OneOf1 Source #
Defines the enum schema postSubscriptionsRequestBodyBilling_thresholds'OneOf1
Instances
data PostSubscriptionsRequestBodyBillingThresholds'OneOf2 Source #
Defines the data type for the schema postSubscriptionsRequestBodyBilling_thresholds'OneOf2
Instances
data PostSubscriptionsRequestBodyBillingThresholds'Variants Source #
Define the one-of schema postSubscriptionsRequestBodyBilling_thresholds'
Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
Instances
data PostSubscriptionsRequestBodyCollectionMethod' Source #
Defines the enum schema postSubscriptionsRequestBodyCollection_method'
Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`.
Instances
data PostSubscriptionsRequestBodyDefaultTaxRates'OneOf1 Source #
Defines the enum schema postSubscriptionsRequestBodyDefault_tax_rates'OneOf1
PostSubscriptionsRequestBodyDefaultTaxRates'OneOf1EnumOther Value | |
PostSubscriptionsRequestBodyDefaultTaxRates'OneOf1EnumTyped String | |
PostSubscriptionsRequestBodyDefaultTaxRates'OneOf1EnumString_ |
Instances
data PostSubscriptionsRequestBodyDefaultTaxRates'Variants Source #
Define the one-of schema postSubscriptionsRequestBodyDefault_tax_rates'
The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription.
Instances
data PostSubscriptionsRequestBodyItems' Source #
Defines the data type for the schema postSubscriptionsRequestBodyItems'
data PostSubscriptionsRequestBodyItems'BillingThresholds'OneOf1 Source #
Defines the enum schema postSubscriptionsRequestBodyItems'Billing_thresholds'OneOf1
Instances
data PostSubscriptionsRequestBodyItems'BillingThresholds'OneOf2 Source #
Defines the data type for the schema postSubscriptionsRequestBodyItems'Billing_thresholds'OneOf2
Instances
data PostSubscriptionsRequestBodyItems'BillingThresholds'Variants Source #
Define the one-of schema postSubscriptionsRequestBodyItems'Billing_thresholds'
Instances
data PostSubscriptionsRequestBodyItems'Metadata' Source #
Defines the data type for the schema postSubscriptionsRequestBodyItems'Metadata'
data PostSubscriptionsRequestBodyItems'TaxRates'OneOf1 Source #
Defines the enum schema postSubscriptionsRequestBodyItems'Tax_rates'OneOf1
PostSubscriptionsRequestBodyItems'TaxRates'OneOf1EnumOther Value | |
PostSubscriptionsRequestBodyItems'TaxRates'OneOf1EnumTyped String | |
PostSubscriptionsRequestBodyItems'TaxRates'OneOf1EnumString_ |
Instances
data PostSubscriptionsRequestBodyItems'TaxRates'Variants Source #
Define the one-of schema postSubscriptionsRequestBodyItems'Tax_rates'
Instances
data PostSubscriptionsRequestBodyMetadata' Source #
Defines the data type for the schema postSubscriptionsRequestBodyMetadata'
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 PostSubscriptionsRequestBodyPaymentBehavior' Source #
Defines the enum schema postSubscriptionsRequestBodyPayment_behavior'
Use `allow_incomplete` to create subscriptions with `status=incomplete` if the first invoice cannot be paid. Creating subscriptions with this status 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 `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.
`pending_if_incomplete` is only used with updates and cannot be passed when creating a subscription.
data PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1 Source #
Defines the enum schema postSubscriptionsRequestBodyPending_invoice_item_interval'OneOf1
Instances
data PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf2 Source #
Defines the data type for the schema postSubscriptionsRequestBodyPending_invoice_item_interval'OneOf2
Instances
data PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf2Interval' Source #
Defines the enum schema postSubscriptionsRequestBodyPending_invoice_item_interval'OneOf2Interval'
Instances
data PostSubscriptionsRequestBodyPendingInvoiceItemInterval'Variants Source #
Define the one-of schema postSubscriptionsRequestBodyPending_invoice_item_interval'
Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling Create an invoice for the given subscription at the specified interval.
Instances
data PostSubscriptionsRequestBodyProrationBehavior' Source #
Defines the enum schema postSubscriptionsRequestBodyProration_behavior'
Determines how to handle prorations resulting from the `billing_cycle_anchor`. Valid values are `create_prorations` or `none`.
Passing `create_prorations` will cause proration invoice items to be created when applicable. Prorations can be disabled by passing `none`. If no value is passed, the default is `create_prorations`.
Instances
data PostSubscriptionsRequestBodyTaxPercent'OneOf1 Source #
Defines the enum schema postSubscriptionsRequestBodyTax_percent'OneOf1
PostSubscriptionsRequestBodyTaxPercent'OneOf1EnumOther Value | |
PostSubscriptionsRequestBodyTaxPercent'OneOf1EnumTyped String | |
PostSubscriptionsRequestBodyTaxPercent'OneOf1EnumString_ |
Instances
data PostSubscriptionsRequestBodyTaxPercent'Variants Source #
Define the one-of schema postSubscriptionsRequestBodyTax_percent'
A non-negative decimal (with at most four decimal places) between 0 and 100. This represents the percentage of the subscription invoice subtotal that will be calculated and added as tax to the final amount in each billing period. For example, a plan which charges $10/month with a `tax_percent` of `20.0` will charge $12 per invoice. To unset a previously-set value, pass an empty string. This field has been deprecated and will be removed in a future API version, for further information view the migration docs for `tax_rates`.
PostSubscriptionsRequestBodyTaxPercent'PostSubscriptionsRequestBodyTaxPercent'OneOf1 PostSubscriptionsRequestBodyTaxPercent'OneOf1 | |
PostSubscriptionsRequestBodyTaxPercent'Double Double |
Instances
data PostSubscriptionsRequestBodyTrialEnd'OneOf1 Source #
Defines the enum schema postSubscriptionsRequestBodyTrial_end'OneOf1
PostSubscriptionsRequestBodyTrialEnd'OneOf1EnumOther Value | |
PostSubscriptionsRequestBodyTrialEnd'OneOf1EnumTyped String | |
PostSubscriptionsRequestBodyTrialEnd'OneOf1EnumStringNow |
data PostSubscriptionsRequestBodyTrialEnd'Variants Source #
Define the one-of schema postSubscriptionsRequestBodyTrial_end'
Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`.
PostSubscriptionsRequestBodyTrialEnd'PostSubscriptionsRequestBodyTrialEnd'OneOf1 PostSubscriptionsRequestBodyTrialEnd'OneOf1 | |
PostSubscriptionsRequestBodyTrialEnd'Integer Integer |
Instances
data PostSubscriptionsResponse Source #
Represents a response of the operation postSubscriptions
.
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), PostSubscriptionsResponseError
is used.
PostSubscriptionsResponseError String | Means either no matching case available or a parse error |
PostSubscriptionsResponse200 Subscription | Successful response. |
PostSubscriptionsResponseDefault Error | Error response. |