{-# LANGUAGE ExplicitForAll #-} {-# LANGUAGE MultiWayIf #-} -- CHANGE WITH CAUTION: This is a generated code file generated by https://github.com/Haskell-OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator. {-# LANGUAGE OverloadedStrings #-} -- | Contains the different functions to run the operation postSubscriptionsSubscriptionExposedId module StripeAPI.Operations.PostSubscriptionsSubscriptionExposedId where import qualified Control.Monad.Fail import qualified Control.Monad.Trans.Reader import qualified Data.Aeson import qualified Data.Aeson as Data.Aeson.Encoding.Internal import qualified Data.Aeson as Data.Aeson.Types import qualified Data.Aeson as Data.Aeson.Types.FromJSON import qualified Data.Aeson as Data.Aeson.Types.Internal import qualified Data.Aeson as Data.Aeson.Types.ToJSON import qualified Data.ByteString.Char8 import qualified Data.ByteString.Char8 as Data.ByteString.Internal import qualified Data.Either import qualified Data.Functor import qualified Data.Scientific import qualified Data.Text import qualified Data.Text.Internal import qualified Data.Time.Calendar as Data.Time.Calendar.Days import qualified Data.Time.LocalTime as Data.Time.LocalTime.Internal.ZonedTime import qualified Data.Vector import qualified GHC.Base import qualified GHC.Classes import qualified GHC.Int import qualified GHC.Show import qualified GHC.Types import qualified Network.HTTP.Client import qualified Network.HTTP.Client as Network.HTTP.Client.Request import qualified Network.HTTP.Client as Network.HTTP.Client.Types import qualified Network.HTTP.Simple import qualified Network.HTTP.Types import qualified Network.HTTP.Types as Network.HTTP.Types.Status import qualified Network.HTTP.Types as Network.HTTP.Types.URI import qualified StripeAPI.Common import StripeAPI.Types import qualified Prelude as GHC.Integer.Type import qualified Prelude as GHC.Maybe -- | > POST /v1/subscriptions/{subscription_exposed_id} -- -- \

Updates an existing subscription on a customer to match the specified parameters. When changing plans or quantities, we will optionally prorate the price we charge next month to make up for any price changes. To preview how the proration will be calculated, use the \upcoming invoice\<\/a> endpoint.\<\/p> postSubscriptionsSubscriptionExposedId :: forall m. StripeAPI.Common.MonadHTTP m => -- | subscription_exposed_id | Constraints: Maximum length of 5000 Data.Text.Internal.Text -> -- | The request body to send GHC.Maybe.Maybe PostSubscriptionsSubscriptionExposedIdRequestBody -> -- | Monadic computation which returns the result of the operation StripeAPI.Common.ClientT m (Network.HTTP.Client.Types.Response PostSubscriptionsSubscriptionExposedIdResponse) postSubscriptionsSubscriptionExposedId subscriptionExposedId body = GHC.Base.fmap ( \response_0 -> GHC.Base.fmap ( Data.Either.either PostSubscriptionsSubscriptionExposedIdResponseError GHC.Base.id GHC.Base.. ( \response body -> if | (\status_1 -> Network.HTTP.Types.Status.statusCode status_1 GHC.Classes.== 200) (Network.HTTP.Client.Types.responseStatus response) -> PostSubscriptionsSubscriptionExposedIdResponse200 Data.Functor.<$> ( Data.Aeson.eitherDecodeStrict body :: Data.Either.Either GHC.Base.String Subscription ) | GHC.Base.const GHC.Types.True (Network.HTTP.Client.Types.responseStatus response) -> PostSubscriptionsSubscriptionExposedIdResponseDefault Data.Functor.<$> ( Data.Aeson.eitherDecodeStrict body :: Data.Either.Either GHC.Base.String Error ) | GHC.Base.otherwise -> Data.Either.Left "Missing default response type" ) response_0 ) response_0 ) (StripeAPI.Common.doBodyCallWithConfigurationM (Data.Text.toUpper GHC.Base.$ Data.Text.pack "POST") (Data.Text.pack ("/v1/subscriptions/" GHC.Base.++ (Data.ByteString.Char8.unpack (Network.HTTP.Types.URI.urlEncode GHC.Types.True GHC.Base.$ (Data.ByteString.Char8.pack GHC.Base.$ StripeAPI.Common.stringifyModel subscriptionExposedId)) GHC.Base.++ ""))) GHC.Base.mempty body StripeAPI.Common.RequestBodyEncodingFormData) -- | Defines the object schema located at @paths.\/v1\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema@ in the specification. data PostSubscriptionsSubscriptionExposedIdRequestBody = PostSubscriptionsSubscriptionExposedIdRequestBody { -- | add_invoice_items: A list of prices and quantities that will generate invoice items appended to the first invoice for this subscription. You may pass up to 20 items. postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems :: (GHC.Maybe.Maybe ([PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'])), -- | application_fee_percent: A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner\'s Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https:\/\/stripe.com\/docs\/connect\/subscriptions\#collecting-fees-on-subscriptions). postSubscriptionsSubscriptionExposedIdRequestBodyApplicationFeePercent :: (GHC.Maybe.Maybe GHC.Types.Double), -- | automatic_tax: Automatic tax settings for this subscription. postSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax :: (GHC.Maybe.Maybe PostSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax'), -- | billing_cycle_anchor: Either \`now\` or \`unchanged\`. Setting the value to \`now\` resets the subscription\'s billing cycle anchor to the current time. For more information, see the billing cycle [documentation](https:\/\/stripe.com\/docs\/billing\/subscriptions\/billing-cycle). -- -- Constraints: -- -- * Maximum length of 5000 postSubscriptionsSubscriptionExposedIdRequestBodyBillingCycleAnchor :: (GHC.Maybe.Maybe PostSubscriptionsSubscriptionExposedIdRequestBodyBillingCycleAnchor'), -- | billing_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. postSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds :: (GHC.Maybe.Maybe PostSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'Variants), -- | cancel_at: A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using \`proration_behavior\`. If set during a future period, this will always cause a proration for that period. postSubscriptionsSubscriptionExposedIdRequestBodyCancelAt :: (GHC.Maybe.Maybe PostSubscriptionsSubscriptionExposedIdRequestBodyCancelAt'Variants), -- | cancel_at_period_end: Boolean indicating whether this subscription should cancel at the end of the current period. postSubscriptionsSubscriptionExposedIdRequestBodyCancelAtPeriodEnd :: (GHC.Maybe.Maybe GHC.Types.Bool), -- | collection_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\`. postSubscriptionsSubscriptionExposedIdRequestBodyCollectionMethod :: (GHC.Maybe.Maybe PostSubscriptionsSubscriptionExposedIdRequestBodyCollectionMethod'), -- | coupon: The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. -- -- Constraints: -- -- * Maximum length of 5000 postSubscriptionsSubscriptionExposedIdRequestBodyCoupon :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | days_until_due: Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where \`collection_method\` is set to \`send_invoice\`. postSubscriptionsSubscriptionExposedIdRequestBodyDaysUntilDue :: (GHC.Maybe.Maybe GHC.Types.Int), -- | default_payment_method: ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over \`default_source\`. If neither are set, invoices will use the customer\'s [invoice_settings.default_payment_method](https:\/\/stripe.com\/docs\/api\/customers\/object\#customer_object-invoice_settings-default_payment_method) or [default_source](https:\/\/stripe.com\/docs\/api\/customers\/object\#customer_object-default_source). -- -- Constraints: -- -- * Maximum length of 5000 postSubscriptionsSubscriptionExposedIdRequestBodyDefaultPaymentMethod :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | default_source: ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If \`default_payment_method\` is also set, \`default_payment_method\` will take precedence. If neither are set, invoices will use the customer\'s [invoice_settings.default_payment_method](https:\/\/stripe.com\/docs\/api\/customers\/object\#customer_object-invoice_settings-default_payment_method) or [default_source](https:\/\/stripe.com\/docs\/api\/customers\/object\#customer_object-default_source). -- -- Constraints: -- -- * Maximum length of 5000 postSubscriptionsSubscriptionExposedIdRequestBodyDefaultSource :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | default_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. Pass an empty string to remove previously-defined tax rates. postSubscriptionsSubscriptionExposedIdRequestBodyDefaultTaxRates :: (GHC.Maybe.Maybe PostSubscriptionsSubscriptionExposedIdRequestBodyDefaultTaxRates'Variants), -- | expand: Specifies which fields in the response should be expanded. postSubscriptionsSubscriptionExposedIdRequestBodyExpand :: (GHC.Maybe.Maybe ([Data.Text.Internal.Text])), -- | items: A list of up to 20 subscription items, each with an attached price. postSubscriptionsSubscriptionExposedIdRequestBodyItems :: (GHC.Maybe.Maybe ([PostSubscriptionsSubscriptionExposedIdRequestBodyItems'])), -- | metadata: Set of [key-value pairs](https:\/\/stripe.com\/docs\/api\/metadata) 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\`. postSubscriptionsSubscriptionExposedIdRequestBodyMetadata :: (GHC.Maybe.Maybe PostSubscriptionsSubscriptionExposedIdRequestBodyMetadata'Variants), -- | off_session: Indicates if a customer is on or off-session while an invoice payment is attempted. postSubscriptionsSubscriptionExposedIdRequestBodyOffSession :: (GHC.Maybe.Maybe GHC.Types.Bool), -- | pause_collection: If specified, payment collection for this subscription will be paused. postSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection :: (GHC.Maybe.Maybe PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'Variants), -- | payment_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](https:\/\/stripe.com\/docs\/billing\/migration\/strong-customer-authentication) 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](https:\/\/stripe.com\/docs\/billing\/migration\/strong-customer-authentication), or collecting a mandate for a bank debit payment method. -- -- Use \`pending_if_incomplete\` to update the subscription using [pending updates](https:\/\/stripe.com\/docs\/billing\/subscriptions\/pending-updates). When you use \`pending_if_incomplete\` you can only pass the parameters [supported by pending updates](https:\/\/stripe.com\/docs\/billing\/pending-updates-reference\#supported-attributes). -- -- 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](https:\/\/stripe.com\/docs\/upgrades\#2019-03-14) to learn more. postSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior :: (GHC.Maybe.Maybe PostSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior'), -- | pending_invoice_item_interval: Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https:\/\/stripe.com\/docs\/api\#create_invoice) for the given subscription at the specified interval. postSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval :: (GHC.Maybe.Maybe PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'Variants), -- | promotion_code: The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. -- -- Constraints: -- -- * Maximum length of 5000 postSubscriptionsSubscriptionExposedIdRequestBodyPromotionCode :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | proration_behavior: Determines how to handle [prorations](https:\/\/stripe.com\/docs\/subscriptions\/billing-cycle\#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](https:\/\/stripe.com\/docs\/subscriptions\/upgrading-downgrading\#immediate-payment). In order to always invoice immediately for prorations, pass \`always_invoice\`. -- -- Prorations can be disabled by passing \`none\`. postSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior :: (GHC.Maybe.Maybe PostSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior'), -- | proration_date: If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https:\/\/stripe.com\/docs\/api\#retrieve_customer_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations. postSubscriptionsSubscriptionExposedIdRequestBodyProrationDate :: (GHC.Maybe.Maybe GHC.Types.Int), -- | transfer_data: If specified, the funds from the subscription\'s invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value. postSubscriptionsSubscriptionExposedIdRequestBodyTransferData :: (GHC.Maybe.Maybe PostSubscriptionsSubscriptionExposedIdRequestBodyTransferData'Variants), -- | trial_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\`. postSubscriptionsSubscriptionExposedIdRequestBodyTrialEnd :: (GHC.Maybe.Maybe PostSubscriptionsSubscriptionExposedIdRequestBodyTrialEnd'Variants), -- | trial_from_plan: Indicates if a plan\'s \`trial_period_days\` should be applied to the subscription. Setting \`trial_end\` per subscription is preferred, and this defaults to \`false\`. Setting this flag to \`true\` together with \`trial_end\` is not allowed. postSubscriptionsSubscriptionExposedIdRequestBodyTrialFromPlan :: (GHC.Maybe.Maybe GHC.Types.Bool) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsSubscriptionExposedIdRequestBody where toJSON obj = Data.Aeson.Types.Internal.object ("add_invoice_items" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems obj : "application_fee_percent" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyApplicationFeePercent obj : "automatic_tax" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax obj : "billing_cycle_anchor" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyBillingCycleAnchor obj : "billing_thresholds" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds obj : "cancel_at" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyCancelAt obj : "cancel_at_period_end" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyCancelAtPeriodEnd obj : "collection_method" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyCollectionMethod obj : "coupon" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyCoupon obj : "days_until_due" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyDaysUntilDue obj : "default_payment_method" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyDefaultPaymentMethod obj : "default_source" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyDefaultSource obj : "default_tax_rates" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyDefaultTaxRates obj : "expand" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyExpand obj : "items" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyItems obj : "metadata" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyMetadata obj : "off_session" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyOffSession obj : "pause_collection" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection obj : "payment_behavior" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior obj : "pending_invoice_item_interval" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval obj : "promotion_code" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyPromotionCode obj : "proration_behavior" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior obj : "proration_date" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyProrationDate obj : "transfer_data" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyTransferData obj : "trial_end" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyTrialEnd obj : "trial_from_plan" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyTrialFromPlan obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("add_invoice_items" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems obj) GHC.Base.<> (("application_fee_percent" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyApplicationFeePercent obj) GHC.Base.<> (("automatic_tax" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax obj) GHC.Base.<> (("billing_cycle_anchor" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyBillingCycleAnchor obj) GHC.Base.<> (("billing_thresholds" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds obj) GHC.Base.<> (("cancel_at" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyCancelAt obj) GHC.Base.<> (("cancel_at_period_end" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyCancelAtPeriodEnd obj) GHC.Base.<> (("collection_method" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyCollectionMethod obj) GHC.Base.<> (("coupon" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyCoupon obj) GHC.Base.<> (("days_until_due" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyDaysUntilDue obj) GHC.Base.<> (("default_payment_method" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyDefaultPaymentMethod obj) GHC.Base.<> (("default_source" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyDefaultSource obj) GHC.Base.<> (("default_tax_rates" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyDefaultTaxRates obj) GHC.Base.<> (("expand" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyExpand obj) GHC.Base.<> (("items" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyItems obj) GHC.Base.<> (("metadata" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyMetadata obj) GHC.Base.<> (("off_session" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyOffSession obj) GHC.Base.<> (("pause_collection" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection obj) GHC.Base.<> (("payment_behavior" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior obj) GHC.Base.<> (("pending_invoice_item_interval" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval obj) GHC.Base.<> (("promotion_code" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyPromotionCode obj) GHC.Base.<> (("proration_behavior" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior obj) GHC.Base.<> (("proration_date" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyProrationDate obj) GHC.Base.<> (("transfer_data" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyTransferData obj) GHC.Base.<> (("trial_end" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyTrialEnd obj) GHC.Base.<> ("trial_from_plan" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyTrialFromPlan obj)))))))))))))))))))))))))) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsSubscriptionExposedIdRequestBody where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionsSubscriptionExposedIdRequestBody" (\obj -> (((((((((((((((((((((((((GHC.Base.pure PostSubscriptionsSubscriptionExposedIdRequestBody GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "add_invoice_items")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "application_fee_percent")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "automatic_tax")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "billing_cycle_anchor")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "billing_thresholds")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "cancel_at")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "cancel_at_period_end")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "collection_method")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "coupon")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "days_until_due")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "default_payment_method")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "default_source")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "default_tax_rates")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "expand")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "items")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "metadata")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "off_session")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "pause_collection")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "payment_behavior")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "pending_invoice_item_interval")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "promotion_code")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "proration_behavior")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "proration_date")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "transfer_data")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "trial_end")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "trial_from_plan")) -- | Create a new 'PostSubscriptionsSubscriptionExposedIdRequestBody' with all required fields. mkPostSubscriptionsSubscriptionExposedIdRequestBody :: PostSubscriptionsSubscriptionExposedIdRequestBody mkPostSubscriptionsSubscriptionExposedIdRequestBody = PostSubscriptionsSubscriptionExposedIdRequestBody { postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyApplicationFeePercent = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyBillingCycleAnchor = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyCancelAt = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyCancelAtPeriodEnd = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyCollectionMethod = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyCoupon = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyDaysUntilDue = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyDefaultPaymentMethod = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyDefaultSource = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyDefaultTaxRates = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyExpand = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyItems = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyMetadata = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyOffSession = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyPromotionCode = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyProrationDate = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyTransferData = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyTrialEnd = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyTrialFromPlan = GHC.Maybe.Nothing } -- | Defines the object schema located at @paths.\/v1\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.add_invoice_items.items@ in the specification. data PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems' = PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems' { -- | price -- -- Constraints: -- -- * Maximum length of 5000 postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'Price :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | price_data postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData :: (GHC.Maybe.Maybe PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'), -- | quantity postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'Quantity :: (GHC.Maybe.Maybe GHC.Types.Int), -- | tax_rates postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'TaxRates :: (GHC.Maybe.Maybe PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'TaxRates'Variants) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems' where toJSON obj = Data.Aeson.Types.Internal.object ("price" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'Price obj : "price_data" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData obj : "quantity" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'Quantity obj : "tax_rates" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'TaxRates obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("price" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'Price obj) GHC.Base.<> (("price_data" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData obj) GHC.Base.<> (("quantity" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'Quantity obj) GHC.Base.<> ("tax_rates" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'TaxRates obj)))) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'" (\obj -> (((GHC.Base.pure PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "price")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "price_data")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "quantity")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "tax_rates")) -- | Create a new 'PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'' with all required fields. mkPostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems' :: PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems' mkPostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems' = PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems' { postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'Price = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'Quantity = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'TaxRates = GHC.Maybe.Nothing } -- | Defines the object schema located at @paths.\/v1\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.add_invoice_items.items.properties.price_data@ in the specification. data PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData' = PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData' { -- | currency postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'Currency :: Data.Text.Internal.Text, -- | product -- -- Constraints: -- -- * Maximum length of 5000 postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'Product :: Data.Text.Internal.Text, -- | tax_behavior postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior :: (GHC.Maybe.Maybe PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior'), -- | unit_amount postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'UnitAmount :: (GHC.Maybe.Maybe GHC.Types.Int), -- | unit_amount_decimal postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'UnitAmountDecimal :: (GHC.Maybe.Maybe Data.Text.Internal.Text) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData' where toJSON obj = Data.Aeson.Types.Internal.object ("currency" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'Currency obj : "product" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'Product obj : "tax_behavior" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior obj : "unit_amount" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'UnitAmount obj : "unit_amount_decimal" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'UnitAmountDecimal obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("currency" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'Currency obj) GHC.Base.<> (("product" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'Product obj) GHC.Base.<> (("tax_behavior" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior obj) GHC.Base.<> (("unit_amount" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'UnitAmount obj) GHC.Base.<> ("unit_amount_decimal" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'UnitAmountDecimal obj))))) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'" (\obj -> ((((GHC.Base.pure PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "currency")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "product")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "tax_behavior")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "unit_amount")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "unit_amount_decimal")) -- | Create a new 'PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'' with all required fields. mkPostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData' :: -- | 'postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'Currency' Data.Text.Internal.Text -> -- | 'postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'Product' Data.Text.Internal.Text -> PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData' mkPostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData' postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'Currency postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'Product = PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData' { postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'Currency = postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'Currency, postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'Product = postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'Product, postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'UnitAmount = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'UnitAmountDecimal = GHC.Maybe.Nothing } -- | Defines the enum schema located at @paths.\/v1\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.add_invoice_items.items.properties.price_data.properties.tax_behavior@ in the specification. data PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior'Other Data.Aeson.Types.Internal.Value | -- | This constructor can be used to send values to the server which are not present in the specification yet. PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"exclusive"@ PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior'EnumExclusive | -- | Represents the JSON value @"inclusive"@ PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior'EnumInclusive | -- | Represents the JSON value @"unspecified"@ PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior'EnumUnspecified deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior' where toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior'Other val) = val toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior'EnumExclusive) = "exclusive" toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior'EnumInclusive) = "inclusive" toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior'EnumUnspecified) = "unspecified" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "exclusive" -> PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior'EnumExclusive | val GHC.Classes.== "inclusive" -> PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior'EnumInclusive | val GHC.Classes.== "unspecified" -> PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior'EnumUnspecified | GHC.Base.otherwise -> PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior'Other val ) -- | Defines the oneOf schema located at @paths.\/v1\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.add_invoice_items.items.properties.tax_rates.anyOf@ in the specification. data PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'TaxRates'Variants = -- | Represents the JSON value @""@ PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'TaxRates'EmptyString | PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'TaxRates'ListTText ([Data.Text.Internal.Text]) deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'TaxRates'Variants where toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'TaxRates'ListTText a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'TaxRates'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'TaxRates'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'TaxRates'EmptyString | GHC.Base.otherwise -> case (PostSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'TaxRates'ListTText Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a -- | Defines the object schema located at @paths.\/v1\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.automatic_tax@ in the specification. -- -- Automatic tax settings for this subscription. data PostSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax' = PostSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax' { -- | enabled postSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax'Enabled :: GHC.Types.Bool } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax' where toJSON obj = Data.Aeson.Types.Internal.object ("enabled" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax'Enabled obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs ("enabled" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax'Enabled obj) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax'" (\obj -> GHC.Base.pure PostSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "enabled")) -- | Create a new 'PostSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax'' with all required fields. mkPostSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax' :: -- | 'postSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax'Enabled' GHC.Types.Bool -> PostSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax' mkPostSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax' postSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax'Enabled = PostSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax' {postSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax'Enabled = postSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax'Enabled} -- | Defines the enum schema located at @paths.\/v1\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.billing_cycle_anchor@ in the specification. -- -- Either \`now\` or \`unchanged\`. Setting the value to \`now\` resets the subscription\'s billing cycle anchor to the current time. For more information, see the billing cycle [documentation](https:\/\/stripe.com\/docs\/billing\/subscriptions\/billing-cycle). data PostSubscriptionsSubscriptionExposedIdRequestBodyBillingCycleAnchor' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostSubscriptionsSubscriptionExposedIdRequestBodyBillingCycleAnchor'Other Data.Aeson.Types.Internal.Value | -- | This constructor can be used to send values to the server which are not present in the specification yet. PostSubscriptionsSubscriptionExposedIdRequestBodyBillingCycleAnchor'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"now"@ PostSubscriptionsSubscriptionExposedIdRequestBodyBillingCycleAnchor'EnumNow | -- | Represents the JSON value @"unchanged"@ PostSubscriptionsSubscriptionExposedIdRequestBodyBillingCycleAnchor'EnumUnchanged deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsSubscriptionExposedIdRequestBodyBillingCycleAnchor' where toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyBillingCycleAnchor'Other val) = val toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyBillingCycleAnchor'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyBillingCycleAnchor'EnumNow) = "now" toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyBillingCycleAnchor'EnumUnchanged) = "unchanged" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsSubscriptionExposedIdRequestBodyBillingCycleAnchor' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "now" -> PostSubscriptionsSubscriptionExposedIdRequestBodyBillingCycleAnchor'EnumNow | val GHC.Classes.== "unchanged" -> PostSubscriptionsSubscriptionExposedIdRequestBodyBillingCycleAnchor'EnumUnchanged | GHC.Base.otherwise -> PostSubscriptionsSubscriptionExposedIdRequestBodyBillingCycleAnchor'Other val ) -- | Defines the object schema located at @paths.\/v1\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.billing_thresholds.anyOf@ in the specification. data PostSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1 = PostSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1 { -- | amount_gte postSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1AmountGte :: (GHC.Maybe.Maybe GHC.Types.Int), -- | reset_billing_cycle_anchor postSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1ResetBillingCycleAnchor :: (GHC.Maybe.Maybe GHC.Types.Bool) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1 where toJSON obj = Data.Aeson.Types.Internal.object ("amount_gte" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1AmountGte obj : "reset_billing_cycle_anchor" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1ResetBillingCycleAnchor obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("amount_gte" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1AmountGte obj) GHC.Base.<> ("reset_billing_cycle_anchor" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1ResetBillingCycleAnchor obj)) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1 where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1" (\obj -> (GHC.Base.pure PostSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "amount_gte")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "reset_billing_cycle_anchor")) -- | Create a new 'PostSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1' with all required fields. mkPostSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1 :: PostSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1 mkPostSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1 = PostSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1 { postSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1AmountGte = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1ResetBillingCycleAnchor = GHC.Maybe.Nothing } -- | Defines the oneOf schema located at @paths.\/v1\/subscriptions\/{subscription_exposed_id}.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. Pass an empty string to remove previously-defined thresholds. data PostSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'Variants = -- | Represents the JSON value @""@ PostSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'EmptyString | PostSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'PostSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1 PostSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1 deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'Variants where toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'PostSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'EmptyString | GHC.Base.otherwise -> case (PostSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'PostSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a -- | Defines the oneOf schema located at @paths.\/v1\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.cancel_at.anyOf@ in the specification. -- -- A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using \`proration_behavior\`. If set during a future period, this will always cause a proration for that period. data PostSubscriptionsSubscriptionExposedIdRequestBodyCancelAt'Variants = -- | Represents the JSON value @""@ PostSubscriptionsSubscriptionExposedIdRequestBodyCancelAt'EmptyString | PostSubscriptionsSubscriptionExposedIdRequestBodyCancelAt'Int GHC.Types.Int deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsSubscriptionExposedIdRequestBodyCancelAt'Variants where toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyCancelAt'Int a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyCancelAt'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsSubscriptionExposedIdRequestBodyCancelAt'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostSubscriptionsSubscriptionExposedIdRequestBodyCancelAt'EmptyString | GHC.Base.otherwise -> case (PostSubscriptionsSubscriptionExposedIdRequestBodyCancelAt'Int Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a -- | Defines the enum schema located at @paths.\/v1\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.collection_method@ in the specification. -- -- 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\`. data PostSubscriptionsSubscriptionExposedIdRequestBodyCollectionMethod' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostSubscriptionsSubscriptionExposedIdRequestBodyCollectionMethod'Other Data.Aeson.Types.Internal.Value | -- | This constructor can be used to send values to the server which are not present in the specification yet. PostSubscriptionsSubscriptionExposedIdRequestBodyCollectionMethod'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"charge_automatically"@ PostSubscriptionsSubscriptionExposedIdRequestBodyCollectionMethod'EnumChargeAutomatically | -- | Represents the JSON value @"send_invoice"@ PostSubscriptionsSubscriptionExposedIdRequestBodyCollectionMethod'EnumSendInvoice deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsSubscriptionExposedIdRequestBodyCollectionMethod' where toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyCollectionMethod'Other val) = val toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyCollectionMethod'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyCollectionMethod'EnumChargeAutomatically) = "charge_automatically" toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyCollectionMethod'EnumSendInvoice) = "send_invoice" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsSubscriptionExposedIdRequestBodyCollectionMethod' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "charge_automatically" -> PostSubscriptionsSubscriptionExposedIdRequestBodyCollectionMethod'EnumChargeAutomatically | val GHC.Classes.== "send_invoice" -> PostSubscriptionsSubscriptionExposedIdRequestBodyCollectionMethod'EnumSendInvoice | GHC.Base.otherwise -> PostSubscriptionsSubscriptionExposedIdRequestBodyCollectionMethod'Other val ) -- | Defines the oneOf schema located at @paths.\/v1\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.default_tax_rates.anyOf@ in the specification. -- -- 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. Pass an empty string to remove previously-defined tax rates. data PostSubscriptionsSubscriptionExposedIdRequestBodyDefaultTaxRates'Variants = -- | Represents the JSON value @""@ PostSubscriptionsSubscriptionExposedIdRequestBodyDefaultTaxRates'EmptyString | PostSubscriptionsSubscriptionExposedIdRequestBodyDefaultTaxRates'ListTText ([Data.Text.Internal.Text]) deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsSubscriptionExposedIdRequestBodyDefaultTaxRates'Variants where toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyDefaultTaxRates'ListTText a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyDefaultTaxRates'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsSubscriptionExposedIdRequestBodyDefaultTaxRates'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostSubscriptionsSubscriptionExposedIdRequestBodyDefaultTaxRates'EmptyString | GHC.Base.otherwise -> case (PostSubscriptionsSubscriptionExposedIdRequestBodyDefaultTaxRates'ListTText Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a -- | Defines the object schema located at @paths.\/v1\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.items.items@ in the specification. data PostSubscriptionsSubscriptionExposedIdRequestBodyItems' = PostSubscriptionsSubscriptionExposedIdRequestBodyItems' { -- | billing_thresholds postSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds :: (GHC.Maybe.Maybe PostSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'Variants), -- | clear_usage postSubscriptionsSubscriptionExposedIdRequestBodyItems'ClearUsage :: (GHC.Maybe.Maybe GHC.Types.Bool), -- | deleted postSubscriptionsSubscriptionExposedIdRequestBodyItems'Deleted :: (GHC.Maybe.Maybe GHC.Types.Bool), -- | id -- -- Constraints: -- -- * Maximum length of 5000 postSubscriptionsSubscriptionExposedIdRequestBodyItems'Id :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | metadata postSubscriptionsSubscriptionExposedIdRequestBodyItems'Metadata :: (GHC.Maybe.Maybe PostSubscriptionsSubscriptionExposedIdRequestBodyItems'Metadata'Variants), -- | price -- -- Constraints: -- -- * Maximum length of 5000 postSubscriptionsSubscriptionExposedIdRequestBodyItems'Price :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | price_data postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData :: (GHC.Maybe.Maybe PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'), -- | quantity postSubscriptionsSubscriptionExposedIdRequestBodyItems'Quantity :: (GHC.Maybe.Maybe GHC.Types.Int), -- | tax_rates postSubscriptionsSubscriptionExposedIdRequestBodyItems'TaxRates :: (GHC.Maybe.Maybe PostSubscriptionsSubscriptionExposedIdRequestBodyItems'TaxRates'Variants) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsSubscriptionExposedIdRequestBodyItems' where toJSON obj = Data.Aeson.Types.Internal.object ("billing_thresholds" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds obj : "clear_usage" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyItems'ClearUsage obj : "deleted" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyItems'Deleted obj : "id" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyItems'Id obj : "metadata" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyItems'Metadata obj : "price" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyItems'Price obj : "price_data" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData obj : "quantity" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyItems'Quantity obj : "tax_rates" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyItems'TaxRates obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("billing_thresholds" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds obj) GHC.Base.<> (("clear_usage" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyItems'ClearUsage obj) GHC.Base.<> (("deleted" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyItems'Deleted obj) GHC.Base.<> (("id" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyItems'Id obj) GHC.Base.<> (("metadata" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyItems'Metadata obj) GHC.Base.<> (("price" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyItems'Price obj) GHC.Base.<> (("price_data" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData obj) GHC.Base.<> (("quantity" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyItems'Quantity obj) GHC.Base.<> ("tax_rates" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyItems'TaxRates obj))))))))) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsSubscriptionExposedIdRequestBodyItems' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionsSubscriptionExposedIdRequestBodyItems'" (\obj -> ((((((((GHC.Base.pure PostSubscriptionsSubscriptionExposedIdRequestBodyItems' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "billing_thresholds")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "clear_usage")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "deleted")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "id")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "metadata")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "price")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "price_data")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "quantity")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "tax_rates")) -- | Create a new 'PostSubscriptionsSubscriptionExposedIdRequestBodyItems'' with all required fields. mkPostSubscriptionsSubscriptionExposedIdRequestBodyItems' :: PostSubscriptionsSubscriptionExposedIdRequestBodyItems' mkPostSubscriptionsSubscriptionExposedIdRequestBodyItems' = PostSubscriptionsSubscriptionExposedIdRequestBodyItems' { postSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyItems'ClearUsage = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyItems'Deleted = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyItems'Id = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyItems'Metadata = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyItems'Price = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyItems'Quantity = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyItems'TaxRates = GHC.Maybe.Nothing } -- | Defines the object schema located at @paths.\/v1\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.items.items.properties.billing_thresholds.anyOf@ in the specification. data PostSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1 = PostSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1 { -- | usage_gte postSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1UsageGte :: GHC.Types.Int } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1 where toJSON obj = Data.Aeson.Types.Internal.object ("usage_gte" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1UsageGte obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs ("usage_gte" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1UsageGte obj) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1 where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1" (\obj -> GHC.Base.pure PostSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "usage_gte")) -- | Create a new 'PostSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1' with all required fields. mkPostSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1 :: -- | 'postSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1UsageGte' GHC.Types.Int -> PostSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1 mkPostSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1 postSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1UsageGte = PostSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1 {postSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1UsageGte = postSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1UsageGte} -- | Defines the oneOf schema located at @paths.\/v1\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.items.items.properties.billing_thresholds.anyOf@ in the specification. data PostSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'Variants = -- | Represents the JSON value @""@ PostSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'EmptyString | PostSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'PostSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1 PostSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1 deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'Variants where toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'PostSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'EmptyString | GHC.Base.otherwise -> case (PostSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'PostSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a -- | Defines the oneOf schema located at @paths.\/v1\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.items.items.properties.metadata.anyOf@ in the specification. data PostSubscriptionsSubscriptionExposedIdRequestBodyItems'Metadata'Variants = -- | Represents the JSON value @""@ PostSubscriptionsSubscriptionExposedIdRequestBodyItems'Metadata'EmptyString | PostSubscriptionsSubscriptionExposedIdRequestBodyItems'Metadata'Object Data.Aeson.Types.Internal.Object deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsSubscriptionExposedIdRequestBodyItems'Metadata'Variants where toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyItems'Metadata'Object a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyItems'Metadata'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsSubscriptionExposedIdRequestBodyItems'Metadata'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostSubscriptionsSubscriptionExposedIdRequestBodyItems'Metadata'EmptyString | GHC.Base.otherwise -> case (PostSubscriptionsSubscriptionExposedIdRequestBodyItems'Metadata'Object Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a -- | Defines the object schema located at @paths.\/v1\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.items.items.properties.price_data@ in the specification. data PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData' = PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData' { -- | currency postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Currency :: Data.Text.Internal.Text, -- | product -- -- Constraints: -- -- * Maximum length of 5000 postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Product :: Data.Text.Internal.Text, -- | recurring postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring :: PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring', -- | tax_behavior postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior :: (GHC.Maybe.Maybe PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior'), -- | unit_amount postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'UnitAmount :: (GHC.Maybe.Maybe GHC.Types.Int), -- | unit_amount_decimal postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'UnitAmountDecimal :: (GHC.Maybe.Maybe Data.Text.Internal.Text) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData' where toJSON obj = Data.Aeson.Types.Internal.object ("currency" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Currency obj : "product" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Product obj : "recurring" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring obj : "tax_behavior" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior obj : "unit_amount" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'UnitAmount obj : "unit_amount_decimal" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'UnitAmountDecimal obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("currency" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Currency obj) GHC.Base.<> (("product" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Product obj) GHC.Base.<> (("recurring" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring obj) GHC.Base.<> (("tax_behavior" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior obj) GHC.Base.<> (("unit_amount" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'UnitAmount obj) GHC.Base.<> ("unit_amount_decimal" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'UnitAmountDecimal obj)))))) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'" (\obj -> (((((GHC.Base.pure PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "currency")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "product")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "recurring")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "tax_behavior")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "unit_amount")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "unit_amount_decimal")) -- | Create a new 'PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'' with all required fields. mkPostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData' :: -- | 'postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Currency' Data.Text.Internal.Text -> -- | 'postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Product' Data.Text.Internal.Text -> -- | 'postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring' PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring' -> PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData' mkPostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData' postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Currency postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Product postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring = PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData' { postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Currency = postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Currency, postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Product = postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Product, postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring = postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring, postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'UnitAmount = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'UnitAmountDecimal = GHC.Maybe.Nothing } -- | Defines the object schema located at @paths.\/v1\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.items.items.properties.price_data.properties.recurring@ in the specification. data PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring' = PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring' { -- | interval postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval :: PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval', -- | interval_count postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'IntervalCount :: (GHC.Maybe.Maybe GHC.Types.Int) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring' where toJSON obj = Data.Aeson.Types.Internal.object ("interval" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval obj : "interval_count" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'IntervalCount obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("interval" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval obj) GHC.Base.<> ("interval_count" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'IntervalCount obj)) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'" (\obj -> (GHC.Base.pure PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "interval")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "interval_count")) -- | Create a new 'PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'' with all required fields. mkPostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring' :: -- | 'postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval' PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval' -> PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring' mkPostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring' postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval = PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring' { postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval = postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval, postSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'IntervalCount = GHC.Maybe.Nothing } -- | Defines the enum schema located at @paths.\/v1\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.items.items.properties.price_data.properties.recurring.properties.interval@ in the specification. data PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval'Other Data.Aeson.Types.Internal.Value | -- | This constructor can be used to send values to the server which are not present in the specification yet. PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"day"@ PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval'EnumDay | -- | Represents the JSON value @"month"@ PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval'EnumMonth | -- | Represents the JSON value @"week"@ PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval'EnumWeek | -- | Represents the JSON value @"year"@ PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval'EnumYear deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval' where toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval'Other val) = val toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval'EnumDay) = "day" toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval'EnumMonth) = "month" toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval'EnumWeek) = "week" toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval'EnumYear) = "year" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "day" -> PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval'EnumDay | val GHC.Classes.== "month" -> PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval'EnumMonth | val GHC.Classes.== "week" -> PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval'EnumWeek | val GHC.Classes.== "year" -> PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval'EnumYear | GHC.Base.otherwise -> PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval'Other val ) -- | Defines the enum schema located at @paths.\/v1\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.items.items.properties.price_data.properties.tax_behavior@ in the specification. data PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior'Other Data.Aeson.Types.Internal.Value | -- | This constructor can be used to send values to the server which are not present in the specification yet. PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"exclusive"@ PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior'EnumExclusive | -- | Represents the JSON value @"inclusive"@ PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior'EnumInclusive | -- | Represents the JSON value @"unspecified"@ PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior'EnumUnspecified deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior' where toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior'Other val) = val toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior'EnumExclusive) = "exclusive" toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior'EnumInclusive) = "inclusive" toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior'EnumUnspecified) = "unspecified" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "exclusive" -> PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior'EnumExclusive | val GHC.Classes.== "inclusive" -> PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior'EnumInclusive | val GHC.Classes.== "unspecified" -> PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior'EnumUnspecified | GHC.Base.otherwise -> PostSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior'Other val ) -- | Defines the oneOf schema located at @paths.\/v1\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.items.items.properties.tax_rates.anyOf@ in the specification. data PostSubscriptionsSubscriptionExposedIdRequestBodyItems'TaxRates'Variants = -- | Represents the JSON value @""@ PostSubscriptionsSubscriptionExposedIdRequestBodyItems'TaxRates'EmptyString | PostSubscriptionsSubscriptionExposedIdRequestBodyItems'TaxRates'ListTText ([Data.Text.Internal.Text]) deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsSubscriptionExposedIdRequestBodyItems'TaxRates'Variants where toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyItems'TaxRates'ListTText a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyItems'TaxRates'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsSubscriptionExposedIdRequestBodyItems'TaxRates'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostSubscriptionsSubscriptionExposedIdRequestBodyItems'TaxRates'EmptyString | GHC.Base.otherwise -> case (PostSubscriptionsSubscriptionExposedIdRequestBodyItems'TaxRates'ListTText Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a -- | Defines the oneOf schema located at @paths.\/v1\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.metadata.anyOf@ in the specification. -- -- Set of [key-value pairs](https:\/\/stripe.com\/docs\/api\/metadata) 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 PostSubscriptionsSubscriptionExposedIdRequestBodyMetadata'Variants = -- | Represents the JSON value @""@ PostSubscriptionsSubscriptionExposedIdRequestBodyMetadata'EmptyString | PostSubscriptionsSubscriptionExposedIdRequestBodyMetadata'Object Data.Aeson.Types.Internal.Object deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsSubscriptionExposedIdRequestBodyMetadata'Variants where toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyMetadata'Object a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyMetadata'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsSubscriptionExposedIdRequestBodyMetadata'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostSubscriptionsSubscriptionExposedIdRequestBodyMetadata'EmptyString | GHC.Base.otherwise -> case (PostSubscriptionsSubscriptionExposedIdRequestBodyMetadata'Object Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a -- | Defines the object schema located at @paths.\/v1\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.pause_collection.anyOf@ in the specification. data PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1 = PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1 { -- | behavior postSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior :: PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior', -- | resumes_at postSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1ResumesAt :: (GHC.Maybe.Maybe GHC.Types.Int) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1 where toJSON obj = Data.Aeson.Types.Internal.object ("behavior" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior obj : "resumes_at" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1ResumesAt obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("behavior" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior obj) GHC.Base.<> ("resumes_at" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1ResumesAt obj)) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1 where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1" (\obj -> (GHC.Base.pure PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "behavior")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "resumes_at")) -- | Create a new 'PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1' with all required fields. mkPostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1 :: -- | 'postSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior' PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior' -> PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1 mkPostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1 postSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior = PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1 { postSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior = postSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior, postSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1ResumesAt = GHC.Maybe.Nothing } -- | Defines the enum schema located at @paths.\/v1\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.pause_collection.anyOf.properties.behavior@ in the specification. data PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior'Other Data.Aeson.Types.Internal.Value | -- | This constructor can be used to send values to the server which are not present in the specification yet. PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"keep_as_draft"@ PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior'EnumKeepAsDraft | -- | Represents the JSON value @"mark_uncollectible"@ PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior'EnumMarkUncollectible | -- | Represents the JSON value @"void"@ PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior'EnumVoid deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior' where toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior'Other val) = val toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior'EnumKeepAsDraft) = "keep_as_draft" toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior'EnumMarkUncollectible) = "mark_uncollectible" toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior'EnumVoid) = "void" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "keep_as_draft" -> PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior'EnumKeepAsDraft | val GHC.Classes.== "mark_uncollectible" -> PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior'EnumMarkUncollectible | val GHC.Classes.== "void" -> PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior'EnumVoid | GHC.Base.otherwise -> PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior'Other val ) -- | Defines the oneOf schema located at @paths.\/v1\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.pause_collection.anyOf@ in the specification. -- -- If specified, payment collection for this subscription will be paused. data PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'Variants = -- | Represents the JSON value @""@ PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'EmptyString | PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1 PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1 deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'Variants where toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'EmptyString | GHC.Base.otherwise -> case (PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'PostSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a -- | Defines the enum schema located at @paths.\/v1\/subscriptions\/{subscription_exposed_id}.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](https:\/\/stripe.com\/docs\/billing\/migration\/strong-customer-authentication) 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](https:\/\/stripe.com\/docs\/billing\/migration\/strong-customer-authentication), or collecting a mandate for a bank debit payment method. -- -- Use \`pending_if_incomplete\` to update the subscription using [pending updates](https:\/\/stripe.com\/docs\/billing\/subscriptions\/pending-updates). When you use \`pending_if_incomplete\` you can only pass the parameters [supported by pending updates](https:\/\/stripe.com\/docs\/billing\/pending-updates-reference\#supported-attributes). -- -- 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](https:\/\/stripe.com\/docs\/upgrades\#2019-03-14) to learn more. data PostSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior'Other Data.Aeson.Types.Internal.Value | -- | This constructor can be used to send values to the server which are not present in the specification yet. PostSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"allow_incomplete"@ PostSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior'EnumAllowIncomplete | -- | Represents the JSON value @"default_incomplete"@ PostSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior'EnumDefaultIncomplete | -- | Represents the JSON value @"error_if_incomplete"@ PostSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior'EnumErrorIfIncomplete | -- | Represents the JSON value @"pending_if_incomplete"@ PostSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior'EnumPendingIfIncomplete deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior' where toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior'Other val) = val toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior'EnumAllowIncomplete) = "allow_incomplete" toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior'EnumDefaultIncomplete) = "default_incomplete" toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior'EnumErrorIfIncomplete) = "error_if_incomplete" toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior'EnumPendingIfIncomplete) = "pending_if_incomplete" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "allow_incomplete" -> PostSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior'EnumAllowIncomplete | val GHC.Classes.== "default_incomplete" -> PostSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior'EnumDefaultIncomplete | val GHC.Classes.== "error_if_incomplete" -> PostSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior'EnumErrorIfIncomplete | val GHC.Classes.== "pending_if_incomplete" -> PostSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior'EnumPendingIfIncomplete | GHC.Base.otherwise -> PostSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior'Other val ) -- | Defines the object schema located at @paths.\/v1\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.pending_invoice_item_interval.anyOf@ in the specification. data PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1 = PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1 { -- | interval postSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval :: PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval', -- | interval_count postSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1IntervalCount :: (GHC.Maybe.Maybe GHC.Types.Int) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1 where toJSON obj = Data.Aeson.Types.Internal.object ("interval" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval obj : "interval_count" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1IntervalCount obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("interval" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval obj) GHC.Base.<> ("interval_count" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1IntervalCount obj)) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1 where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1" (\obj -> (GHC.Base.pure PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "interval")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "interval_count")) -- | Create a new 'PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1' with all required fields. mkPostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1 :: -- | 'postSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval' PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval' -> PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1 mkPostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1 postSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval = PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1 { postSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval = postSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval, postSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1IntervalCount = GHC.Maybe.Nothing } -- | Defines the enum schema located at @paths.\/v1\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.pending_invoice_item_interval.anyOf.properties.interval@ in the specification. data PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval'Other Data.Aeson.Types.Internal.Value | -- | This constructor can be used to send values to the server which are not present in the specification yet. PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"day"@ PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval'EnumDay | -- | Represents the JSON value @"month"@ PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval'EnumMonth | -- | Represents the JSON value @"week"@ PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval'EnumWeek | -- | Represents the JSON value @"year"@ PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval'EnumYear deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval' where toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval'Other val) = val toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval'EnumDay) = "day" toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval'EnumMonth) = "month" toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval'EnumWeek) = "week" toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval'EnumYear) = "year" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "day" -> PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval'EnumDay | val GHC.Classes.== "month" -> PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval'EnumMonth | val GHC.Classes.== "week" -> PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval'EnumWeek | val GHC.Classes.== "year" -> PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval'EnumYear | GHC.Base.otherwise -> PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval'Other val ) -- | Defines the oneOf schema located at @paths.\/v1\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.pending_invoice_item_interval.anyOf@ in the specification. -- -- Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https:\/\/stripe.com\/docs\/api\#create_invoice) for the given subscription at the specified interval. data PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'Variants = -- | Represents the JSON value @""@ PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'EmptyString | PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1 PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1 deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'Variants where toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'EmptyString | GHC.Base.otherwise -> case (PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'PostSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a -- | Defines the enum schema located at @paths.\/v1\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.proration_behavior@ in the specification. -- -- Determines how to handle [prorations](https:\/\/stripe.com\/docs\/subscriptions\/billing-cycle\#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](https:\/\/stripe.com\/docs\/subscriptions\/upgrading-downgrading\#immediate-payment). In order to always invoice immediately for prorations, pass \`always_invoice\`. -- -- Prorations can be disabled by passing \`none\`. data PostSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior'Other Data.Aeson.Types.Internal.Value | -- | This constructor can be used to send values to the server which are not present in the specification yet. PostSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"always_invoice"@ PostSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior'EnumAlwaysInvoice | -- | Represents the JSON value @"create_prorations"@ PostSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior'EnumCreateProrations | -- | Represents the JSON value @"none"@ PostSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior'EnumNone deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior' where toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior'Other val) = val toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior'EnumAlwaysInvoice) = "always_invoice" toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior'EnumCreateProrations) = "create_prorations" toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior'EnumNone) = "none" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "always_invoice" -> PostSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior'EnumAlwaysInvoice | val GHC.Classes.== "create_prorations" -> PostSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior'EnumCreateProrations | val GHC.Classes.== "none" -> PostSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior'EnumNone | GHC.Base.otherwise -> PostSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior'Other val ) -- | Defines the object schema located at @paths.\/v1\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.transfer_data.anyOf@ in the specification. data PostSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1 = PostSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1 { -- | amount_percent postSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1AmountPercent :: (GHC.Maybe.Maybe GHC.Types.Double), -- | destination postSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1Destination :: Data.Text.Internal.Text } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1 where toJSON obj = Data.Aeson.Types.Internal.object ("amount_percent" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1AmountPercent obj : "destination" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1Destination obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("amount_percent" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1AmountPercent obj) GHC.Base.<> ("destination" Data.Aeson.Types.ToJSON..= postSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1Destination obj)) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1 where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1" (\obj -> (GHC.Base.pure PostSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "amount_percent")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "destination")) -- | Create a new 'PostSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1' with all required fields. mkPostSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1 :: -- | 'postSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1Destination' Data.Text.Internal.Text -> PostSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1 mkPostSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1 postSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1Destination = PostSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1 { postSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1AmountPercent = GHC.Maybe.Nothing, postSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1Destination = postSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1Destination } -- | Defines the oneOf schema located at @paths.\/v1\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.transfer_data.anyOf@ in the specification. -- -- If specified, the funds from the subscription\'s invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value. data PostSubscriptionsSubscriptionExposedIdRequestBodyTransferData'Variants = -- | Represents the JSON value @""@ PostSubscriptionsSubscriptionExposedIdRequestBodyTransferData'EmptyString | PostSubscriptionsSubscriptionExposedIdRequestBodyTransferData'PostSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1 PostSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1 deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsSubscriptionExposedIdRequestBodyTransferData'Variants where toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyTransferData'PostSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyTransferData'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsSubscriptionExposedIdRequestBodyTransferData'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostSubscriptionsSubscriptionExposedIdRequestBodyTransferData'EmptyString | GHC.Base.otherwise -> case (PostSubscriptionsSubscriptionExposedIdRequestBodyTransferData'PostSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a -- | Defines the oneOf schema located at @paths.\/v1\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.trial_end.anyOf@ in the specification. -- -- 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\`. data PostSubscriptionsSubscriptionExposedIdRequestBodyTrialEnd'Variants = -- | Represents the JSON value @"now"@ PostSubscriptionsSubscriptionExposedIdRequestBodyTrialEnd'Now | PostSubscriptionsSubscriptionExposedIdRequestBodyTrialEnd'Int GHC.Types.Int deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsSubscriptionExposedIdRequestBodyTrialEnd'Variants where toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyTrialEnd'Int a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostSubscriptionsSubscriptionExposedIdRequestBodyTrialEnd'Now) = "now" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsSubscriptionExposedIdRequestBodyTrialEnd'Variants where parseJSON val = if | val GHC.Classes.== "now" -> GHC.Base.pure PostSubscriptionsSubscriptionExposedIdRequestBodyTrialEnd'Now | GHC.Base.otherwise -> case (PostSubscriptionsSubscriptionExposedIdRequestBodyTrialEnd'Int Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a -- | Represents a response of the operation 'postSubscriptionsSubscriptionExposedId'. -- -- 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), 'PostSubscriptionsSubscriptionExposedIdResponseError' is used. data PostSubscriptionsSubscriptionExposedIdResponse = -- | Means either no matching case available or a parse error PostSubscriptionsSubscriptionExposedIdResponseError GHC.Base.String | -- | Successful response. PostSubscriptionsSubscriptionExposedIdResponse200 Subscription | -- | Error response. PostSubscriptionsSubscriptionExposedIdResponseDefault Error deriving (GHC.Show.Show, GHC.Classes.Eq)