{-# 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 postCustomersCustomerSubscriptionsSubscriptionExposedId module StripeAPI.Operations.PostCustomersCustomerSubscriptionsSubscriptionExposedId 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/customers/{customer}/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> postCustomersCustomerSubscriptionsSubscriptionExposedId :: forall m. StripeAPI.Common.MonadHTTP m => -- | Contains all available parameters of this operation (query and path parameters) PostCustomersCustomerSubscriptionsSubscriptionExposedIdParameters -> -- | The request body to send GHC.Maybe.Maybe PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody -> -- | Monadic computation which returns the result of the operation StripeAPI.Common.ClientT m (Network.HTTP.Client.Types.Response PostCustomersCustomerSubscriptionsSubscriptionExposedIdResponse) postCustomersCustomerSubscriptionsSubscriptionExposedId parameters body = GHC.Base.fmap ( \response_0 -> GHC.Base.fmap ( Data.Either.either PostCustomersCustomerSubscriptionsSubscriptionExposedIdResponseError 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) -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdResponse200 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) -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdResponseDefault 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/customers/" 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 (postCustomersCustomerSubscriptionsSubscriptionExposedIdParametersPathCustomer parameters))) GHC.Base.++ ("/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 (postCustomersCustomerSubscriptionsSubscriptionExposedIdParametersPathSubscriptionExposedId parameters))) GHC.Base.++ ""))))) GHC.Base.mempty body StripeAPI.Common.RequestBodyEncodingFormData) -- | Defines the object schema located at @paths.\/v1\/customers\/{customer}\/subscriptions\/{subscription_exposed_id}.POST.parameters@ in the specification. data PostCustomersCustomerSubscriptionsSubscriptionExposedIdParameters = PostCustomersCustomerSubscriptionsSubscriptionExposedIdParameters { -- | pathCustomer: Represents the parameter named \'customer\' -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSubscriptionsSubscriptionExposedIdParametersPathCustomer :: Data.Text.Internal.Text, -- | pathSubscription_exposed_id: Represents the parameter named \'subscription_exposed_id\' -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSubscriptionsSubscriptionExposedIdParametersPathSubscriptionExposedId :: Data.Text.Internal.Text } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdParameters where toJSON obj = Data.Aeson.Types.Internal.object ("pathCustomer" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdParametersPathCustomer obj : "pathSubscription_exposed_id" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdParametersPathSubscriptionExposedId obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("pathCustomer" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdParametersPathCustomer obj) GHC.Base.<> ("pathSubscription_exposed_id" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdParametersPathSubscriptionExposedId obj)) instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdParameters where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostCustomersCustomerSubscriptionsSubscriptionExposedIdParameters" (\obj -> (GHC.Base.pure PostCustomersCustomerSubscriptionsSubscriptionExposedIdParameters GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "pathCustomer")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "pathSubscription_exposed_id")) -- | Create a new 'PostCustomersCustomerSubscriptionsSubscriptionExposedIdParameters' with all required fields. mkPostCustomersCustomerSubscriptionsSubscriptionExposedIdParameters :: -- | 'postCustomersCustomerSubscriptionsSubscriptionExposedIdParametersPathCustomer' Data.Text.Internal.Text -> -- | 'postCustomersCustomerSubscriptionsSubscriptionExposedIdParametersPathSubscriptionExposedId' Data.Text.Internal.Text -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdParameters mkPostCustomersCustomerSubscriptionsSubscriptionExposedIdParameters postCustomersCustomerSubscriptionsSubscriptionExposedIdParametersPathCustomer postCustomersCustomerSubscriptionsSubscriptionExposedIdParametersPathSubscriptionExposedId = PostCustomersCustomerSubscriptionsSubscriptionExposedIdParameters { postCustomersCustomerSubscriptionsSubscriptionExposedIdParametersPathCustomer = postCustomersCustomerSubscriptionsSubscriptionExposedIdParametersPathCustomer, postCustomersCustomerSubscriptionsSubscriptionExposedIdParametersPathSubscriptionExposedId = postCustomersCustomerSubscriptionsSubscriptionExposedIdParametersPathSubscriptionExposedId } -- | Defines the object schema located at @paths.\/v1\/customers\/{customer}\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema@ in the specification. data PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody = PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody { -- | 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. postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems :: (GHC.Maybe.Maybe ([PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'])), -- | 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). postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyApplicationFeePercent :: (GHC.Maybe.Maybe GHC.Types.Double), -- | automatic_tax: Automatic tax settings for this subscription. postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax :: (GHC.Maybe.Maybe PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax'), -- | 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 postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingCycleAnchor :: (GHC.Maybe.Maybe PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingCycleAnchor'), -- | 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. postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds :: (GHC.Maybe.Maybe PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'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. postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyCancelAt :: (GHC.Maybe.Maybe PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyCancelAt'Variants), -- | cancel_at_period_end: Boolean indicating whether this subscription should cancel at the end of the current period. postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyCancelAtPeriodEnd :: (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\`. postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyCollectionMethod :: (GHC.Maybe.Maybe PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyCollectionMethod'), -- | 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 postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyCoupon :: (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\`. postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyDaysUntilDue :: (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 postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyDefaultPaymentMethod :: (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 postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyDefaultSource :: (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. postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyDefaultTaxRates :: (GHC.Maybe.Maybe PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyDefaultTaxRates'Variants), -- | expand: Specifies which fields in the response should be expanded. postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyExpand :: (GHC.Maybe.Maybe ([Data.Text.Internal.Text])), -- | items: A list of up to 20 subscription items, each with an attached price. postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems :: (GHC.Maybe.Maybe ([PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'])), -- | 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\`. postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyMetadata :: (GHC.Maybe.Maybe PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyMetadata'Variants), -- | off_session: Indicates if a customer is on or off-session while an invoice payment is attempted. postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyOffSession :: (GHC.Maybe.Maybe GHC.Types.Bool), -- | pause_collection: If specified, payment collection for this subscription will be paused. postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection :: (GHC.Maybe.Maybe PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'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. postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior :: (GHC.Maybe.Maybe PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior'), -- | 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. postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval :: (GHC.Maybe.Maybe PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'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 postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPromotionCode :: (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\`. postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior :: (GHC.Maybe.Maybe PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior'), -- | 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. postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyProrationDate :: (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. postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTransferData :: (GHC.Maybe.Maybe PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTransferData'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\`. postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTrialEnd :: (GHC.Maybe.Maybe PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTrialEnd'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. postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTrialFromPlan :: (GHC.Maybe.Maybe GHC.Types.Bool) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody where toJSON obj = Data.Aeson.Types.Internal.object ("add_invoice_items" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems obj : "application_fee_percent" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyApplicationFeePercent obj : "automatic_tax" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax obj : "billing_cycle_anchor" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingCycleAnchor obj : "billing_thresholds" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds obj : "cancel_at" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyCancelAt obj : "cancel_at_period_end" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyCancelAtPeriodEnd obj : "collection_method" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyCollectionMethod obj : "coupon" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyCoupon obj : "days_until_due" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyDaysUntilDue obj : "default_payment_method" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyDefaultPaymentMethod obj : "default_source" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyDefaultSource obj : "default_tax_rates" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyDefaultTaxRates obj : "expand" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyExpand obj : "items" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems obj : "metadata" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyMetadata obj : "off_session" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyOffSession obj : "pause_collection" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection obj : "payment_behavior" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior obj : "pending_invoice_item_interval" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval obj : "promotion_code" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPromotionCode obj : "proration_behavior" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior obj : "proration_date" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyProrationDate obj : "transfer_data" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTransferData obj : "trial_end" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTrialEnd obj : "trial_from_plan" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTrialFromPlan obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("add_invoice_items" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems obj) GHC.Base.<> (("application_fee_percent" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyApplicationFeePercent obj) GHC.Base.<> (("automatic_tax" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax obj) GHC.Base.<> (("billing_cycle_anchor" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingCycleAnchor obj) GHC.Base.<> (("billing_thresholds" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds obj) GHC.Base.<> (("cancel_at" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyCancelAt obj) GHC.Base.<> (("cancel_at_period_end" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyCancelAtPeriodEnd obj) GHC.Base.<> (("collection_method" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyCollectionMethod obj) GHC.Base.<> (("coupon" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyCoupon obj) GHC.Base.<> (("days_until_due" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyDaysUntilDue obj) GHC.Base.<> (("default_payment_method" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyDefaultPaymentMethod obj) GHC.Base.<> (("default_source" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyDefaultSource obj) GHC.Base.<> (("default_tax_rates" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyDefaultTaxRates obj) GHC.Base.<> (("expand" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyExpand obj) GHC.Base.<> (("items" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems obj) GHC.Base.<> (("metadata" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyMetadata obj) GHC.Base.<> (("off_session" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyOffSession obj) GHC.Base.<> (("pause_collection" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection obj) GHC.Base.<> (("payment_behavior" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior obj) GHC.Base.<> (("pending_invoice_item_interval" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval obj) GHC.Base.<> (("promotion_code" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPromotionCode obj) GHC.Base.<> (("proration_behavior" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior obj) GHC.Base.<> (("proration_date" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyProrationDate obj) GHC.Base.<> (("transfer_data" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTransferData obj) GHC.Base.<> (("trial_end" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTrialEnd obj) GHC.Base.<> ("trial_from_plan" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTrialFromPlan obj)))))))))))))))))))))))))) instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody" (\obj -> (((((((((((((((((((((((((GHC.Base.pure PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody 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 'PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody' with all required fields. mkPostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody :: PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody mkPostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody = PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody { postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyApplicationFeePercent = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingCycleAnchor = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyCancelAt = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyCancelAtPeriodEnd = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyCollectionMethod = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyCoupon = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyDaysUntilDue = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyDefaultPaymentMethod = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyDefaultSource = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyDefaultTaxRates = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyExpand = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyMetadata = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyOffSession = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPromotionCode = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyProrationDate = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTransferData = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTrialEnd = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTrialFromPlan = GHC.Maybe.Nothing } -- | Defines the object schema located at @paths.\/v1\/customers\/{customer}\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.add_invoice_items.items@ in the specification. data PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems' = PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems' { -- | price -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'Price :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | price_data postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData :: (GHC.Maybe.Maybe PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'), -- | quantity postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'Quantity :: (GHC.Maybe.Maybe GHC.Types.Int), -- | tax_rates postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'TaxRates :: (GHC.Maybe.Maybe PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'TaxRates'Variants) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems' where toJSON obj = Data.Aeson.Types.Internal.object ("price" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'Price obj : "price_data" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData obj : "quantity" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'Quantity obj : "tax_rates" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'TaxRates obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("price" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'Price obj) GHC.Base.<> (("price_data" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData obj) GHC.Base.<> (("quantity" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'Quantity obj) GHC.Base.<> ("tax_rates" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'TaxRates obj)))) instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'" (\obj -> (((GHC.Base.pure PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems' 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 'PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'' with all required fields. mkPostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems' :: PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems' mkPostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems' = PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems' { postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'Price = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'Quantity = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'TaxRates = GHC.Maybe.Nothing } -- | Defines the object schema located at @paths.\/v1\/customers\/{customer}\/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 PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData' = PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData' { -- | currency postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'Currency :: Data.Text.Internal.Text, -- | product -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'Product :: Data.Text.Internal.Text, -- | tax_behavior postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior :: (GHC.Maybe.Maybe PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior'), -- | unit_amount postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'UnitAmount :: (GHC.Maybe.Maybe GHC.Types.Int), -- | unit_amount_decimal postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'UnitAmountDecimal :: (GHC.Maybe.Maybe Data.Text.Internal.Text) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData' where toJSON obj = Data.Aeson.Types.Internal.object ("currency" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'Currency obj : "product" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'Product obj : "tax_behavior" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior obj : "unit_amount" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'UnitAmount obj : "unit_amount_decimal" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'UnitAmountDecimal obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("currency" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'Currency obj) GHC.Base.<> (("product" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'Product obj) GHC.Base.<> (("tax_behavior" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior obj) GHC.Base.<> (("unit_amount" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'UnitAmount obj) GHC.Base.<> ("unit_amount_decimal" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'UnitAmountDecimal obj))))) instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'" (\obj -> ((((GHC.Base.pure PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'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 'PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'' with all required fields. mkPostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData' :: -- | 'postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'Currency' Data.Text.Internal.Text -> -- | 'postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'Product' Data.Text.Internal.Text -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData' mkPostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData' postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'Currency postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'Product = PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData' { postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'Currency = postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'Currency, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'Product = postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'Product, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'UnitAmount = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'UnitAmountDecimal = GHC.Maybe.Nothing } -- | Defines the enum schema located at @paths.\/v1\/customers\/{customer}\/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 PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'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. PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"exclusive"@ PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior'EnumExclusive | -- | Represents the JSON value @"inclusive"@ PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior'EnumInclusive | -- | Represents the JSON value @"unspecified"@ PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior'EnumUnspecified deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior' where toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior'Other val) = val toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior'EnumExclusive) = "exclusive" toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior'EnumInclusive) = "inclusive" toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior'EnumUnspecified) = "unspecified" instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "exclusive" -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior'EnumExclusive | val GHC.Classes.== "inclusive" -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior'EnumInclusive | val GHC.Classes.== "unspecified" -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior'EnumUnspecified | GHC.Base.otherwise -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'PriceData'TaxBehavior'Other val ) -- | Defines the oneOf schema located at @paths.\/v1\/customers\/{customer}\/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 PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'TaxRates'Variants = -- | Represents the JSON value @""@ PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'TaxRates'EmptyString | PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'TaxRates'ListTText ([Data.Text.Internal.Text]) deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'TaxRates'Variants where toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'TaxRates'ListTText a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'TaxRates'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'TaxRates'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'TaxRates'EmptyString | GHC.Base.otherwise -> case (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAddInvoiceItems'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\/customers\/{customer}\/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 PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax' = PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax' { -- | enabled postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax'Enabled :: GHC.Types.Bool } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax' where toJSON obj = Data.Aeson.Types.Internal.object ("enabled" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax'Enabled obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs ("enabled" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax'Enabled obj) instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax'" (\obj -> GHC.Base.pure PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "enabled")) -- | Create a new 'PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax'' with all required fields. mkPostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax' :: -- | 'postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax'Enabled' GHC.Types.Bool -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax' mkPostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax' postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax'Enabled = PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax' {postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax'Enabled = postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyAutomaticTax'Enabled} -- | Defines the enum schema located at @paths.\/v1\/customers\/{customer}\/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 PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingCycleAnchor' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingCycleAnchor'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. PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingCycleAnchor'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"now"@ PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingCycleAnchor'EnumNow | -- | Represents the JSON value @"unchanged"@ PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingCycleAnchor'EnumUnchanged deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingCycleAnchor' where toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingCycleAnchor'Other val) = val toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingCycleAnchor'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingCycleAnchor'EnumNow) = "now" toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingCycleAnchor'EnumUnchanged) = "unchanged" instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingCycleAnchor' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "now" -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingCycleAnchor'EnumNow | val GHC.Classes.== "unchanged" -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingCycleAnchor'EnumUnchanged | GHC.Base.otherwise -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingCycleAnchor'Other val ) -- | Defines the object schema located at @paths.\/v1\/customers\/{customer}\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.billing_thresholds.anyOf@ in the specification. data PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1 = PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1 { -- | amount_gte postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1AmountGte :: (GHC.Maybe.Maybe GHC.Types.Int), -- | reset_billing_cycle_anchor postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1ResetBillingCycleAnchor :: (GHC.Maybe.Maybe GHC.Types.Bool) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1 where toJSON obj = Data.Aeson.Types.Internal.object ("amount_gte" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1AmountGte obj : "reset_billing_cycle_anchor" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1ResetBillingCycleAnchor obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("amount_gte" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1AmountGte obj) GHC.Base.<> ("reset_billing_cycle_anchor" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1ResetBillingCycleAnchor obj)) instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1 where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1" (\obj -> (GHC.Base.pure PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "amount_gte")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "reset_billing_cycle_anchor")) -- | Create a new 'PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1' with all required fields. mkPostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1 :: PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1 mkPostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1 = PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1 { postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1AmountGte = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1ResetBillingCycleAnchor = GHC.Maybe.Nothing } -- | Defines the oneOf schema located at @paths.\/v1\/customers\/{customer}\/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 PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'Variants = -- | Represents the JSON value @""@ PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'EmptyString | PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1 PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1 deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'Variants where toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'EmptyString | GHC.Base.otherwise -> case (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyBillingThresholds'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\/customers\/{customer}\/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 PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyCancelAt'Variants = -- | Represents the JSON value @""@ PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyCancelAt'EmptyString | PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyCancelAt'Int GHC.Types.Int deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyCancelAt'Variants where toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyCancelAt'Int a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyCancelAt'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyCancelAt'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyCancelAt'EmptyString | GHC.Base.otherwise -> case (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyCancelAt'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\/customers\/{customer}\/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 PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyCollectionMethod' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyCollectionMethod'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. PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyCollectionMethod'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"charge_automatically"@ PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyCollectionMethod'EnumChargeAutomatically | -- | Represents the JSON value @"send_invoice"@ PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyCollectionMethod'EnumSendInvoice deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyCollectionMethod' where toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyCollectionMethod'Other val) = val toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyCollectionMethod'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyCollectionMethod'EnumChargeAutomatically) = "charge_automatically" toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyCollectionMethod'EnumSendInvoice) = "send_invoice" instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyCollectionMethod' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "charge_automatically" -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyCollectionMethod'EnumChargeAutomatically | val GHC.Classes.== "send_invoice" -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyCollectionMethod'EnumSendInvoice | GHC.Base.otherwise -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyCollectionMethod'Other val ) -- | Defines the oneOf schema located at @paths.\/v1\/customers\/{customer}\/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 PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyDefaultTaxRates'Variants = -- | Represents the JSON value @""@ PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyDefaultTaxRates'EmptyString | PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyDefaultTaxRates'ListTText ([Data.Text.Internal.Text]) deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyDefaultTaxRates'Variants where toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyDefaultTaxRates'ListTText a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyDefaultTaxRates'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyDefaultTaxRates'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyDefaultTaxRates'EmptyString | GHC.Base.otherwise -> case (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyDefaultTaxRates'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\/customers\/{customer}\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.items.items@ in the specification. data PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems' = PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems' { -- | billing_thresholds postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds :: (GHC.Maybe.Maybe PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'Variants), -- | clear_usage postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'ClearUsage :: (GHC.Maybe.Maybe GHC.Types.Bool), -- | deleted postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'Deleted :: (GHC.Maybe.Maybe GHC.Types.Bool), -- | id -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'Id :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | metadata postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'Metadata :: (GHC.Maybe.Maybe PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'Metadata'Variants), -- | price -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'Price :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | price_data postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData :: (GHC.Maybe.Maybe PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'), -- | quantity postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'Quantity :: (GHC.Maybe.Maybe GHC.Types.Int), -- | tax_rates postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'TaxRates :: (GHC.Maybe.Maybe PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'TaxRates'Variants) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems' where toJSON obj = Data.Aeson.Types.Internal.object ("billing_thresholds" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds obj : "clear_usage" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'ClearUsage obj : "deleted" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'Deleted obj : "id" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'Id obj : "metadata" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'Metadata obj : "price" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'Price obj : "price_data" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData obj : "quantity" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'Quantity obj : "tax_rates" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'TaxRates obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("billing_thresholds" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds obj) GHC.Base.<> (("clear_usage" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'ClearUsage obj) GHC.Base.<> (("deleted" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'Deleted obj) GHC.Base.<> (("id" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'Id obj) GHC.Base.<> (("metadata" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'Metadata obj) GHC.Base.<> (("price" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'Price obj) GHC.Base.<> (("price_data" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData obj) GHC.Base.<> (("quantity" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'Quantity obj) GHC.Base.<> ("tax_rates" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'TaxRates obj))))))))) instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'" (\obj -> ((((((((GHC.Base.pure PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems' 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 'PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'' with all required fields. mkPostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems' :: PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems' mkPostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems' = PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems' { postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'ClearUsage = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'Deleted = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'Id = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'Metadata = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'Price = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'Quantity = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'TaxRates = GHC.Maybe.Nothing } -- | Defines the object schema located at @paths.\/v1\/customers\/{customer}\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.items.items.properties.billing_thresholds.anyOf@ in the specification. data PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1 = PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1 { -- | usage_gte postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1UsageGte :: GHC.Types.Int } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1 where toJSON obj = Data.Aeson.Types.Internal.object ("usage_gte" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1UsageGte obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs ("usage_gte" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1UsageGte obj) instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1 where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1" (\obj -> GHC.Base.pure PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "usage_gte")) -- | Create a new 'PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1' with all required fields. mkPostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1 :: -- | 'postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1UsageGte' GHC.Types.Int -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1 mkPostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1 postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1UsageGte = PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1 {postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1UsageGte = postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1UsageGte} -- | Defines the oneOf schema located at @paths.\/v1\/customers\/{customer}\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.items.items.properties.billing_thresholds.anyOf@ in the specification. data PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'Variants = -- | Represents the JSON value @""@ PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'EmptyString | PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1 PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1 deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'Variants where toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'EmptyString | GHC.Base.otherwise -> case (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'BillingThresholds'PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'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\/customers\/{customer}\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.items.items.properties.metadata.anyOf@ in the specification. data PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'Metadata'Variants = -- | Represents the JSON value @""@ PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'Metadata'EmptyString | PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'Metadata'Object Data.Aeson.Types.Internal.Object deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'Metadata'Variants where toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'Metadata'Object a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'Metadata'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'Metadata'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'Metadata'EmptyString | GHC.Base.otherwise -> case (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'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\/customers\/{customer}\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.items.items.properties.price_data@ in the specification. data PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData' = PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData' { -- | currency postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Currency :: Data.Text.Internal.Text, -- | product -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Product :: Data.Text.Internal.Text, -- | recurring postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring :: PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring', -- | tax_behavior postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior :: (GHC.Maybe.Maybe PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior'), -- | unit_amount postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'UnitAmount :: (GHC.Maybe.Maybe GHC.Types.Int), -- | unit_amount_decimal postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'UnitAmountDecimal :: (GHC.Maybe.Maybe Data.Text.Internal.Text) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData' where toJSON obj = Data.Aeson.Types.Internal.object ("currency" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Currency obj : "product" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Product obj : "recurring" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring obj : "tax_behavior" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior obj : "unit_amount" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'UnitAmount obj : "unit_amount_decimal" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'UnitAmountDecimal obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("currency" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Currency obj) GHC.Base.<> (("product" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Product obj) GHC.Base.<> (("recurring" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring obj) GHC.Base.<> (("tax_behavior" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior obj) GHC.Base.<> (("unit_amount" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'UnitAmount obj) GHC.Base.<> ("unit_amount_decimal" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'UnitAmountDecimal obj)))))) instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'" (\obj -> (((((GHC.Base.pure PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'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 'PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'' with all required fields. mkPostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData' :: -- | 'postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Currency' Data.Text.Internal.Text -> -- | 'postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Product' Data.Text.Internal.Text -> -- | 'postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring' PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring' -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData' mkPostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData' postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Currency postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Product postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring = PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData' { postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Currency = postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Currency, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Product = postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Product, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring = postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'UnitAmount = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'UnitAmountDecimal = GHC.Maybe.Nothing } -- | Defines the object schema located at @paths.\/v1\/customers\/{customer}\/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 PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring' = PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring' { -- | interval postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval :: PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval', -- | interval_count postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'IntervalCount :: (GHC.Maybe.Maybe GHC.Types.Int) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring' where toJSON obj = Data.Aeson.Types.Internal.object ("interval" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval obj : "interval_count" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'IntervalCount obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("interval" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval obj) GHC.Base.<> ("interval_count" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'IntervalCount obj)) instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'" (\obj -> (GHC.Base.pure PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "interval")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "interval_count")) -- | Create a new 'PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'' with all required fields. mkPostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring' :: -- | 'postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval' PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval' -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring' mkPostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring' postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval = PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring' { postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval = postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'IntervalCount = GHC.Maybe.Nothing } -- | Defines the enum schema located at @paths.\/v1\/customers\/{customer}\/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 PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'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. PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"day"@ PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval'EnumDay | -- | Represents the JSON value @"month"@ PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval'EnumMonth | -- | Represents the JSON value @"week"@ PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval'EnumWeek | -- | Represents the JSON value @"year"@ PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval'EnumYear deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval' where toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval'Other val) = val toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval'EnumDay) = "day" toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval'EnumMonth) = "month" toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval'EnumWeek) = "week" toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval'EnumYear) = "year" instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "day" -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval'EnumDay | val GHC.Classes.== "month" -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval'EnumMonth | val GHC.Classes.== "week" -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval'EnumWeek | val GHC.Classes.== "year" -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval'EnumYear | GHC.Base.otherwise -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'Recurring'Interval'Other val ) -- | Defines the enum schema located at @paths.\/v1\/customers\/{customer}\/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 PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'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. PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"exclusive"@ PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior'EnumExclusive | -- | Represents the JSON value @"inclusive"@ PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior'EnumInclusive | -- | Represents the JSON value @"unspecified"@ PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior'EnumUnspecified deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior' where toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior'Other val) = val toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior'EnumExclusive) = "exclusive" toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior'EnumInclusive) = "inclusive" toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior'EnumUnspecified) = "unspecified" instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "exclusive" -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior'EnumExclusive | val GHC.Classes.== "inclusive" -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior'EnumInclusive | val GHC.Classes.== "unspecified" -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior'EnumUnspecified | GHC.Base.otherwise -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'PriceData'TaxBehavior'Other val ) -- | Defines the oneOf schema located at @paths.\/v1\/customers\/{customer}\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.items.items.properties.tax_rates.anyOf@ in the specification. data PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'TaxRates'Variants = -- | Represents the JSON value @""@ PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'TaxRates'EmptyString | PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'TaxRates'ListTText ([Data.Text.Internal.Text]) deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'TaxRates'Variants where toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'TaxRates'ListTText a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'TaxRates'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'TaxRates'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'TaxRates'EmptyString | GHC.Base.otherwise -> case (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyItems'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\/customers\/{customer}\/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 PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyMetadata'Variants = -- | Represents the JSON value @""@ PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyMetadata'EmptyString | PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyMetadata'Object Data.Aeson.Types.Internal.Object deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyMetadata'Variants where toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyMetadata'Object a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyMetadata'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyMetadata'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyMetadata'EmptyString | GHC.Base.otherwise -> case (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyMetadata'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\/customers\/{customer}\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.pause_collection.anyOf@ in the specification. data PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1 = PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1 { -- | behavior postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior :: PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior', -- | resumes_at postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1ResumesAt :: (GHC.Maybe.Maybe GHC.Types.Int) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1 where toJSON obj = Data.Aeson.Types.Internal.object ("behavior" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior obj : "resumes_at" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1ResumesAt obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("behavior" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior obj) GHC.Base.<> ("resumes_at" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1ResumesAt obj)) instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1 where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1" (\obj -> (GHC.Base.pure PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "behavior")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "resumes_at")) -- | Create a new 'PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1' with all required fields. mkPostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1 :: -- | 'postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior' PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior' -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1 mkPostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1 postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior = PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1 { postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior = postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1ResumesAt = GHC.Maybe.Nothing } -- | Defines the enum schema located at @paths.\/v1\/customers\/{customer}\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.pause_collection.anyOf.properties.behavior@ in the specification. data PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'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. PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"keep_as_draft"@ PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior'EnumKeepAsDraft | -- | Represents the JSON value @"mark_uncollectible"@ PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior'EnumMarkUncollectible | -- | Represents the JSON value @"void"@ PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior'EnumVoid deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior' where toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior'Other val) = val toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior'EnumKeepAsDraft) = "keep_as_draft" toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior'EnumMarkUncollectible) = "mark_uncollectible" toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior'EnumVoid) = "void" instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "keep_as_draft" -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior'EnumKeepAsDraft | val GHC.Classes.== "mark_uncollectible" -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior'EnumMarkUncollectible | val GHC.Classes.== "void" -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior'EnumVoid | GHC.Base.otherwise -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1Behavior'Other val ) -- | Defines the oneOf schema located at @paths.\/v1\/customers\/{customer}\/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 PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'Variants = -- | Represents the JSON value @""@ PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'EmptyString | PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1 PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1 deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'Variants where toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'EmptyString | GHC.Base.otherwise -> case (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPauseCollection'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\/customers\/{customer}\/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 PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior'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. PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"allow_incomplete"@ PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior'EnumAllowIncomplete | -- | Represents the JSON value @"default_incomplete"@ PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior'EnumDefaultIncomplete | -- | Represents the JSON value @"error_if_incomplete"@ PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior'EnumErrorIfIncomplete | -- | Represents the JSON value @"pending_if_incomplete"@ PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior'EnumPendingIfIncomplete deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior' where toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior'Other val) = val toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior'EnumAllowIncomplete) = "allow_incomplete" toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior'EnumDefaultIncomplete) = "default_incomplete" toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior'EnumErrorIfIncomplete) = "error_if_incomplete" toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior'EnumPendingIfIncomplete) = "pending_if_incomplete" instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "allow_incomplete" -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior'EnumAllowIncomplete | val GHC.Classes.== "default_incomplete" -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior'EnumDefaultIncomplete | val GHC.Classes.== "error_if_incomplete" -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior'EnumErrorIfIncomplete | val GHC.Classes.== "pending_if_incomplete" -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior'EnumPendingIfIncomplete | GHC.Base.otherwise -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPaymentBehavior'Other val ) -- | Defines the object schema located at @paths.\/v1\/customers\/{customer}\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.pending_invoice_item_interval.anyOf@ in the specification. data PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1 = PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1 { -- | interval postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval :: PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval', -- | interval_count postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1IntervalCount :: (GHC.Maybe.Maybe GHC.Types.Int) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1 where toJSON obj = Data.Aeson.Types.Internal.object ("interval" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval obj : "interval_count" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1IntervalCount obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("interval" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval obj) GHC.Base.<> ("interval_count" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1IntervalCount obj)) instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1 where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1" (\obj -> (GHC.Base.pure PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "interval")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "interval_count")) -- | Create a new 'PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1' with all required fields. mkPostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1 :: -- | 'postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval' PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval' -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1 mkPostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1 postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval = PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1 { postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval = postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1IntervalCount = GHC.Maybe.Nothing } -- | Defines the enum schema located at @paths.\/v1\/customers\/{customer}\/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 PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'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. PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"day"@ PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval'EnumDay | -- | Represents the JSON value @"month"@ PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval'EnumMonth | -- | Represents the JSON value @"week"@ PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval'EnumWeek | -- | Represents the JSON value @"year"@ PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval'EnumYear deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval' where toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval'Other val) = val toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval'EnumDay) = "day" toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval'EnumMonth) = "month" toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval'EnumWeek) = "week" toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval'EnumYear) = "year" instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "day" -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval'EnumDay | val GHC.Classes.== "month" -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval'EnumMonth | val GHC.Classes.== "week" -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval'EnumWeek | val GHC.Classes.== "year" -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval'EnumYear | GHC.Base.otherwise -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1Interval'Other val ) -- | Defines the oneOf schema located at @paths.\/v1\/customers\/{customer}\/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 PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'Variants = -- | Represents the JSON value @""@ PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'EmptyString | PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1 PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1 deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'Variants where toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'EmptyString | GHC.Base.otherwise -> case (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyPendingInvoiceItemInterval'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\/customers\/{customer}\/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 PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior'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. PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"always_invoice"@ PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior'EnumAlwaysInvoice | -- | Represents the JSON value @"create_prorations"@ PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior'EnumCreateProrations | -- | Represents the JSON value @"none"@ PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior'EnumNone deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior' where toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior'Other val) = val toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior'EnumAlwaysInvoice) = "always_invoice" toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior'EnumCreateProrations) = "create_prorations" toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior'EnumNone) = "none" instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "always_invoice" -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior'EnumAlwaysInvoice | val GHC.Classes.== "create_prorations" -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior'EnumCreateProrations | val GHC.Classes.== "none" -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior'EnumNone | GHC.Base.otherwise -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyProrationBehavior'Other val ) -- | Defines the object schema located at @paths.\/v1\/customers\/{customer}\/subscriptions\/{subscription_exposed_id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.transfer_data.anyOf@ in the specification. data PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1 = PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1 { -- | amount_percent postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1AmountPercent :: (GHC.Maybe.Maybe GHC.Types.Double), -- | destination postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1Destination :: Data.Text.Internal.Text } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1 where toJSON obj = Data.Aeson.Types.Internal.object ("amount_percent" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1AmountPercent obj : "destination" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1Destination obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("amount_percent" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1AmountPercent obj) GHC.Base.<> ("destination" Data.Aeson.Types.ToJSON..= postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1Destination obj)) instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1 where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1" (\obj -> (GHC.Base.pure PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "amount_percent")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "destination")) -- | Create a new 'PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1' with all required fields. mkPostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1 :: -- | 'postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1Destination' Data.Text.Internal.Text -> PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1 mkPostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1 postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1Destination = PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1 { postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1AmountPercent = GHC.Maybe.Nothing, postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1Destination = postCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1Destination } -- | Defines the oneOf schema located at @paths.\/v1\/customers\/{customer}\/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 PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTransferData'Variants = -- | Represents the JSON value @""@ PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTransferData'EmptyString | PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTransferData'PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1 PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1 deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTransferData'Variants where toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTransferData'PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTransferData'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTransferData'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTransferData'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTransferData'EmptyString | GHC.Base.otherwise -> case (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTransferData'PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTransferData'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\/customers\/{customer}\/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 PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTrialEnd'Variants = -- | Represents the JSON value @"now"@ PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTrialEnd'Now | PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTrialEnd'Int GHC.Types.Int deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTrialEnd'Variants where toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTrialEnd'Int a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTrialEnd'Now) = "now" instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTrialEnd'Variants where parseJSON val = if | val GHC.Classes.== "now" -> GHC.Base.pure PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTrialEnd'Now | GHC.Base.otherwise -> case (PostCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyTrialEnd'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 'postCustomersCustomerSubscriptionsSubscriptionExposedId'. -- -- 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), 'PostCustomersCustomerSubscriptionsSubscriptionExposedIdResponseError' is used. data PostCustomersCustomerSubscriptionsSubscriptionExposedIdResponse = -- | Means either no matching case available or a parse error PostCustomersCustomerSubscriptionsSubscriptionExposedIdResponseError GHC.Base.String | -- | Successful response. PostCustomersCustomerSubscriptionsSubscriptionExposedIdResponse200 Subscription | -- | Error response. PostCustomersCustomerSubscriptionsSubscriptionExposedIdResponseDefault Error deriving (GHC.Show.Show, GHC.Classes.Eq)