Safe Haskell | None |
---|---|
Language | Haskell2010 |
Contains the different functions to run the operation postCustomersCustomerSubscriptions
Synopsis
- postCustomersCustomerSubscriptions :: forall m s. (MonadHTTP m, SecurityScheme s) => Configuration s -> String -> PostCustomersCustomerSubscriptionsRequestBody -> m (Either HttpException (Response PostCustomersCustomerSubscriptionsResponse))
- postCustomersCustomerSubscriptionsRaw :: forall m s. (MonadHTTP m, SecurityScheme s) => Configuration s -> String -> PostCustomersCustomerSubscriptionsRequestBody -> m (Either HttpException (Response ByteString))
- postCustomersCustomerSubscriptionsM :: forall m s. (MonadHTTP m, SecurityScheme s) => String -> PostCustomersCustomerSubscriptionsRequestBody -> ReaderT (Configuration s) m (Either HttpException (Response PostCustomersCustomerSubscriptionsResponse))
- postCustomersCustomerSubscriptionsRawM :: forall m s. (MonadHTTP m, SecurityScheme s) => String -> PostCustomersCustomerSubscriptionsRequestBody -> ReaderT (Configuration s) m (Either HttpException (Response ByteString))
- data PostCustomersCustomerSubscriptionsRequestBody = PostCustomersCustomerSubscriptionsRequestBody {
- postCustomersCustomerSubscriptionsRequestBodyApplicationFeePercent :: Maybe Double
- postCustomersCustomerSubscriptionsRequestBodyBackdateStartDate :: Maybe Integer
- postCustomersCustomerSubscriptionsRequestBodyBillingCycleAnchor :: Maybe Integer
- postCustomersCustomerSubscriptionsRequestBodyBillingThresholds :: Maybe PostCustomersCustomerSubscriptionsRequestBodyBillingThresholds'Variants
- postCustomersCustomerSubscriptionsRequestBodyCancelAt :: Maybe Integer
- postCustomersCustomerSubscriptionsRequestBodyCancelAtPeriodEnd :: Maybe Bool
- postCustomersCustomerSubscriptionsRequestBodyCollectionMethod :: Maybe PostCustomersCustomerSubscriptionsRequestBodyCollectionMethod'
- postCustomersCustomerSubscriptionsRequestBodyCoupon :: Maybe String
- postCustomersCustomerSubscriptionsRequestBodyDaysUntilDue :: Maybe Integer
- postCustomersCustomerSubscriptionsRequestBodyDefaultPaymentMethod :: Maybe String
- postCustomersCustomerSubscriptionsRequestBodyDefaultSource :: Maybe String
- postCustomersCustomerSubscriptionsRequestBodyDefaultTaxRates :: Maybe PostCustomersCustomerSubscriptionsRequestBodyDefaultTaxRates'Variants
- postCustomersCustomerSubscriptionsRequestBodyExpand :: Maybe ([] String)
- postCustomersCustomerSubscriptionsRequestBodyItems :: Maybe ([] PostCustomersCustomerSubscriptionsRequestBodyItems')
- postCustomersCustomerSubscriptionsRequestBodyMetadata :: Maybe PostCustomersCustomerSubscriptionsRequestBodyMetadata'
- postCustomersCustomerSubscriptionsRequestBodyOffSession :: Maybe Bool
- postCustomersCustomerSubscriptionsRequestBodyPaymentBehavior :: Maybe PostCustomersCustomerSubscriptionsRequestBodyPaymentBehavior'
- postCustomersCustomerSubscriptionsRequestBodyPendingInvoiceItemInterval :: Maybe PostCustomersCustomerSubscriptionsRequestBodyPendingInvoiceItemInterval'Variants
- postCustomersCustomerSubscriptionsRequestBodyProrate :: Maybe Bool
- postCustomersCustomerSubscriptionsRequestBodyProrationBehavior :: Maybe PostCustomersCustomerSubscriptionsRequestBodyProrationBehavior'
- postCustomersCustomerSubscriptionsRequestBodyTaxPercent :: Maybe PostCustomersCustomerSubscriptionsRequestBodyTaxPercent'Variants
- postCustomersCustomerSubscriptionsRequestBodyTrialEnd :: Maybe PostCustomersCustomerSubscriptionsRequestBodyTrialEnd'Variants
- postCustomersCustomerSubscriptionsRequestBodyTrialFromPlan :: Maybe Bool
- postCustomersCustomerSubscriptionsRequestBodyTrialPeriodDays :: Maybe Integer
- data PostCustomersCustomerSubscriptionsRequestBodyBillingThresholds'OneOf1
- data PostCustomersCustomerSubscriptionsRequestBodyBillingThresholds'OneOf2 = PostCustomersCustomerSubscriptionsRequestBodyBillingThresholds'OneOf2 {}
- data PostCustomersCustomerSubscriptionsRequestBodyBillingThresholds'Variants
- = PostCustomersCustomerSubscriptionsRequestBodyBillingThresholds'PostCustomersCustomerSubscriptionsRequestBodyBillingThresholds'OneOf1 PostCustomersCustomerSubscriptionsRequestBodyBillingThresholds'OneOf1
- | PostCustomersCustomerSubscriptionsRequestBodyBillingThresholds'PostCustomersCustomerSubscriptionsRequestBodyBillingThresholds'OneOf2 PostCustomersCustomerSubscriptionsRequestBodyBillingThresholds'OneOf2
- data PostCustomersCustomerSubscriptionsRequestBodyCollectionMethod'
- = PostCustomersCustomerSubscriptionsRequestBodyCollectionMethod'EnumOther Value
- | PostCustomersCustomerSubscriptionsRequestBodyCollectionMethod'EnumTyped String
- | PostCustomersCustomerSubscriptionsRequestBodyCollectionMethod'EnumStringChargeAutomatically
- | PostCustomersCustomerSubscriptionsRequestBodyCollectionMethod'EnumStringSendInvoice
- data PostCustomersCustomerSubscriptionsRequestBodyDefaultTaxRates'OneOf1
- data PostCustomersCustomerSubscriptionsRequestBodyDefaultTaxRates'Variants
- data PostCustomersCustomerSubscriptionsRequestBodyItems' = PostCustomersCustomerSubscriptionsRequestBodyItems' {
- postCustomersCustomerSubscriptionsRequestBodyItems'BillingThresholds :: Maybe PostCustomersCustomerSubscriptionsRequestBodyItems'BillingThresholds'Variants
- postCustomersCustomerSubscriptionsRequestBodyItems'Metadata :: Maybe PostCustomersCustomerSubscriptionsRequestBodyItems'Metadata'
- postCustomersCustomerSubscriptionsRequestBodyItems'Plan :: Maybe String
- postCustomersCustomerSubscriptionsRequestBodyItems'Quantity :: Maybe Integer
- postCustomersCustomerSubscriptionsRequestBodyItems'TaxRates :: Maybe PostCustomersCustomerSubscriptionsRequestBodyItems'TaxRates'Variants
- data PostCustomersCustomerSubscriptionsRequestBodyItems'BillingThresholds'OneOf1
- data PostCustomersCustomerSubscriptionsRequestBodyItems'BillingThresholds'OneOf2 = PostCustomersCustomerSubscriptionsRequestBodyItems'BillingThresholds'OneOf2 {}
- data PostCustomersCustomerSubscriptionsRequestBodyItems'BillingThresholds'Variants
- = PostCustomersCustomerSubscriptionsRequestBodyItems'BillingThresholds'PostCustomersCustomerSubscriptionsRequestBodyItems'BillingThresholds'OneOf1 PostCustomersCustomerSubscriptionsRequestBodyItems'BillingThresholds'OneOf1
- | PostCustomersCustomerSubscriptionsRequestBodyItems'BillingThresholds'PostCustomersCustomerSubscriptionsRequestBodyItems'BillingThresholds'OneOf2 PostCustomersCustomerSubscriptionsRequestBodyItems'BillingThresholds'OneOf2
- data PostCustomersCustomerSubscriptionsRequestBodyItems'Metadata' = PostCustomersCustomerSubscriptionsRequestBodyItems'Metadata' {
- data PostCustomersCustomerSubscriptionsRequestBodyItems'TaxRates'OneOf1
- data PostCustomersCustomerSubscriptionsRequestBodyItems'TaxRates'Variants
- data PostCustomersCustomerSubscriptionsRequestBodyMetadata' = PostCustomersCustomerSubscriptionsRequestBodyMetadata' {
- data PostCustomersCustomerSubscriptionsRequestBodyPaymentBehavior'
- = PostCustomersCustomerSubscriptionsRequestBodyPaymentBehavior'EnumOther Value
- | PostCustomersCustomerSubscriptionsRequestBodyPaymentBehavior'EnumTyped String
- | PostCustomersCustomerSubscriptionsRequestBodyPaymentBehavior'EnumStringAllowIncomplete
- | PostCustomersCustomerSubscriptionsRequestBodyPaymentBehavior'EnumStringErrorIfIncomplete
- | PostCustomersCustomerSubscriptionsRequestBodyPaymentBehavior'EnumStringPendingIfIncomplete
- data PostCustomersCustomerSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1
- data PostCustomersCustomerSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf2 = PostCustomersCustomerSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf2 {}
- data PostCustomersCustomerSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf2Interval'
- = PostCustomersCustomerSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf2Interval'EnumOther Value
- | PostCustomersCustomerSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf2Interval'EnumTyped String
- | PostCustomersCustomerSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf2Interval'EnumStringDay
- | PostCustomersCustomerSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf2Interval'EnumStringMonth
- | PostCustomersCustomerSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf2Interval'EnumStringWeek
- | PostCustomersCustomerSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf2Interval'EnumStringYear
- data PostCustomersCustomerSubscriptionsRequestBodyPendingInvoiceItemInterval'Variants
- = PostCustomersCustomerSubscriptionsRequestBodyPendingInvoiceItemInterval'PostCustomersCustomerSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1 PostCustomersCustomerSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1
- | PostCustomersCustomerSubscriptionsRequestBodyPendingInvoiceItemInterval'PostCustomersCustomerSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf2 PostCustomersCustomerSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf2
- data PostCustomersCustomerSubscriptionsRequestBodyProrationBehavior'
- = PostCustomersCustomerSubscriptionsRequestBodyProrationBehavior'EnumOther Value
- | PostCustomersCustomerSubscriptionsRequestBodyProrationBehavior'EnumTyped String
- | PostCustomersCustomerSubscriptionsRequestBodyProrationBehavior'EnumStringAlwaysInvoice
- | PostCustomersCustomerSubscriptionsRequestBodyProrationBehavior'EnumStringCreateProrations
- | PostCustomersCustomerSubscriptionsRequestBodyProrationBehavior'EnumStringNone
- data PostCustomersCustomerSubscriptionsRequestBodyTaxPercent'OneOf1
- data PostCustomersCustomerSubscriptionsRequestBodyTaxPercent'Variants
- data PostCustomersCustomerSubscriptionsRequestBodyTrialEnd'OneOf1
- data PostCustomersCustomerSubscriptionsRequestBodyTrialEnd'Variants
- data PostCustomersCustomerSubscriptionsResponse
Documentation
postCustomersCustomerSubscriptions Source #
:: (MonadHTTP m, SecurityScheme s) | |
=> Configuration s | The configuration to use in the request |
-> String | customer | Constraints: Maximum length of 5000 |
-> PostCustomersCustomerSubscriptionsRequestBody | The request body to send |
-> m (Either HttpException (Response PostCustomersCustomerSubscriptionsResponse)) | Monad containing the result of the operation |
POST /v1/customers/{customer}/subscriptions
<p>Creates a new subscription on an existing customer.</p>
postCustomersCustomerSubscriptionsRaw :: forall m s. (MonadHTTP m, SecurityScheme s) => Configuration s -> String -> PostCustomersCustomerSubscriptionsRequestBody -> m (Either HttpException (Response ByteString)) Source #
POST /v1/customers/{customer}/subscriptions
The same as postCustomersCustomerSubscriptions
but returns the raw ByteString
postCustomersCustomerSubscriptionsM :: forall m s. (MonadHTTP m, SecurityScheme s) => String -> PostCustomersCustomerSubscriptionsRequestBody -> ReaderT (Configuration s) m (Either HttpException (Response PostCustomersCustomerSubscriptionsResponse)) Source #
POST /v1/customers/{customer}/subscriptions
Monadic version of postCustomersCustomerSubscriptions
(use with runWithConfiguration
)
postCustomersCustomerSubscriptionsRawM :: forall m s. (MonadHTTP m, SecurityScheme s) => String -> PostCustomersCustomerSubscriptionsRequestBody -> ReaderT (Configuration s) m (Either HttpException (Response ByteString)) Source #
POST /v1/customers/{customer}/subscriptions
Monadic version of postCustomersCustomerSubscriptionsRaw
(use with runWithConfiguration
)
data PostCustomersCustomerSubscriptionsRequestBody Source #
Defines the data type for the schema postCustomersCustomerSubscriptionsRequestBody
PostCustomersCustomerSubscriptionsRequestBody | |
|
Instances
data PostCustomersCustomerSubscriptionsRequestBodyBillingThresholds'OneOf1 Source #
Defines the enum schema postCustomersCustomerSubscriptionsRequestBodyBilling_thresholds'OneOf1
Instances
data PostCustomersCustomerSubscriptionsRequestBodyBillingThresholds'OneOf2 Source #
Defines the data type for the schema postCustomersCustomerSubscriptionsRequestBodyBilling_thresholds'OneOf2
Instances
data PostCustomersCustomerSubscriptionsRequestBodyBillingThresholds'Variants Source #
Define the one-of schema postCustomersCustomerSubscriptionsRequestBodyBilling_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 PostCustomersCustomerSubscriptionsRequestBodyCollectionMethod' Source #
Defines the enum schema postCustomersCustomerSubscriptionsRequestBodyCollection_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 PostCustomersCustomerSubscriptionsRequestBodyDefaultTaxRates'OneOf1 Source #
Defines the enum schema postCustomersCustomerSubscriptionsRequestBodyDefault_tax_rates'OneOf1
Instances
data PostCustomersCustomerSubscriptionsRequestBodyDefaultTaxRates'Variants Source #
Define the one-of schema postCustomersCustomerSubscriptionsRequestBodyDefault_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 PostCustomersCustomerSubscriptionsRequestBodyItems' Source #
Defines the data type for the schema postCustomersCustomerSubscriptionsRequestBodyItems'
Instances
data PostCustomersCustomerSubscriptionsRequestBodyItems'BillingThresholds'OneOf1 Source #
Defines the enum schema postCustomersCustomerSubscriptionsRequestBodyItems'Billing_thresholds'OneOf1
Instances
data PostCustomersCustomerSubscriptionsRequestBodyItems'BillingThresholds'OneOf2 Source #
Defines the data type for the schema postCustomersCustomerSubscriptionsRequestBodyItems'Billing_thresholds'OneOf2
Instances
data PostCustomersCustomerSubscriptionsRequestBodyItems'BillingThresholds'Variants Source #
Define the one-of schema postCustomersCustomerSubscriptionsRequestBodyItems'Billing_thresholds'
Instances
data PostCustomersCustomerSubscriptionsRequestBodyItems'Metadata' Source #
Defines the data type for the schema postCustomersCustomerSubscriptionsRequestBodyItems'Metadata'
Instances
data PostCustomersCustomerSubscriptionsRequestBodyItems'TaxRates'OneOf1 Source #
Defines the enum schema postCustomersCustomerSubscriptionsRequestBodyItems'Tax_rates'OneOf1
Instances
data PostCustomersCustomerSubscriptionsRequestBodyItems'TaxRates'Variants Source #
Define the one-of schema postCustomersCustomerSubscriptionsRequestBodyItems'Tax_rates'
Instances
data PostCustomersCustomerSubscriptionsRequestBodyMetadata' Source #
Defines the data type for the schema postCustomersCustomerSubscriptionsRequestBodyMetadata'
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`.
Instances
data PostCustomersCustomerSubscriptionsRequestBodyPaymentBehavior' Source #
Defines the enum schema postCustomersCustomerSubscriptionsRequestBodyPayment_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.
Instances
data PostCustomersCustomerSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1 Source #
Defines the enum schema postCustomersCustomerSubscriptionsRequestBodyPending_invoice_item_interval'OneOf1
Instances
data PostCustomersCustomerSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf2 Source #
Defines the data type for the schema postCustomersCustomerSubscriptionsRequestBodyPending_invoice_item_interval'OneOf2
Instances
data PostCustomersCustomerSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf2Interval' Source #
Defines the enum schema postCustomersCustomerSubscriptionsRequestBodyPending_invoice_item_interval'OneOf2Interval'
Instances
data PostCustomersCustomerSubscriptionsRequestBodyPendingInvoiceItemInterval'Variants Source #
Define the one-of schema postCustomersCustomerSubscriptionsRequestBodyPending_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 PostCustomersCustomerSubscriptionsRequestBodyProrationBehavior' Source #
Defines the enum schema postCustomersCustomerSubscriptionsRequestBodyProration_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 PostCustomersCustomerSubscriptionsRequestBodyTaxPercent'OneOf1 Source #
Defines the enum schema postCustomersCustomerSubscriptionsRequestBodyTax_percent'OneOf1
Instances
data PostCustomersCustomerSubscriptionsRequestBodyTaxPercent'Variants Source #
Define the one-of schema postCustomersCustomerSubscriptionsRequestBodyTax_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`.
Instances
data PostCustomersCustomerSubscriptionsRequestBodyTrialEnd'OneOf1 Source #
Defines the enum schema postCustomersCustomerSubscriptionsRequestBodyTrial_end'OneOf1
Instances
data PostCustomersCustomerSubscriptionsRequestBodyTrialEnd'Variants Source #
Define the one-of schema postCustomersCustomerSubscriptionsRequestBodyTrial_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`.
Instances
data PostCustomersCustomerSubscriptionsResponse Source #
Represents a response of the operation postCustomersCustomerSubscriptions
.
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), PostCustomersCustomerSubscriptionsResponseError
is used.
PostCustomersCustomerSubscriptionsResponseError String | Means either no matching case available or a parse error |
PostCustomersCustomerSubscriptionsResponse200 Subscription | Successful response. |
PostCustomersCustomerSubscriptionsResponseDefault Error | Error response. |