{-# 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 postSubscriptions module StripeAPI.Operations.PostSubscriptions 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.Foldable import qualified Data.Functor import qualified Data.Maybe import qualified Data.Scientific import qualified Data.Text import qualified Data.Text.Internal import qualified Data.Time.Calendar as Data.Time.Calendar.Days import qualified Data.Time.LocalTime as Data.Time.LocalTime.Internal.ZonedTime import qualified Data.Vector import qualified GHC.Base import qualified GHC.Classes import qualified GHC.Int import qualified GHC.Show import qualified GHC.Types import qualified Network.HTTP.Client import qualified Network.HTTP.Client as Network.HTTP.Client.Request import qualified Network.HTTP.Client as Network.HTTP.Client.Types import qualified Network.HTTP.Simple import qualified Network.HTTP.Types import qualified Network.HTTP.Types as Network.HTTP.Types.Status import qualified Network.HTTP.Types as Network.HTTP.Types.URI import qualified StripeAPI.Common import StripeAPI.Types import qualified Prelude as GHC.Integer.Type import qualified Prelude as GHC.Maybe -- | > POST /v1/subscriptions -- -- \

Creates a new subscription on an existing customer. Each customer can have up to 500 active or scheduled subscriptions.\<\/p> -- -- \

When you create a subscription with \collection_method=charge_automatically\<\/code>, the first invoice is finalized as part of the request. -- The \payment_behavior\<\/code> parameter determines the exact behavior of the initial payment.\<\/p> -- -- \

To start subscriptions where the first invoice always begins in a \draft\<\/code> status, use \subscription schedules\<\/a> instead. -- Schedules provide the flexibility to model more complex billing configurations that change over time.\<\/p> postSubscriptions :: forall m. StripeAPI.Common.MonadHTTP m => -- | The request body to send PostSubscriptionsRequestBody -> -- | Monadic computation which returns the result of the operation StripeAPI.Common.ClientT m (Network.HTTP.Client.Types.Response PostSubscriptionsResponse) postSubscriptions body = GHC.Base.fmap ( \response_0 -> GHC.Base.fmap ( Data.Either.either PostSubscriptionsResponseError 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) -> PostSubscriptionsResponse200 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) -> PostSubscriptionsResponseDefault Data.Functor.<$> ( Data.Aeson.eitherDecodeStrict body :: Data.Either.Either GHC.Base.String Error ) | GHC.Base.otherwise -> Data.Either.Left "Missing default response type" ) response_0 ) response_0 ) (StripeAPI.Common.doBodyCallWithConfigurationM (Data.Text.toUpper GHC.Base.$ Data.Text.pack "POST") (Data.Text.pack "/v1/subscriptions") GHC.Base.mempty (GHC.Maybe.Just body) StripeAPI.Common.RequestBodyEncodingFormData) -- | Defines the object schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema@ in the specification. data PostSubscriptionsRequestBody = PostSubscriptionsRequestBody { -- | 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. postSubscriptionsRequestBodyAddInvoiceItems :: (GHC.Maybe.Maybe ([PostSubscriptionsRequestBodyAddInvoiceItems'])), -- | 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). postSubscriptionsRequestBodyApplicationFeePercent :: (GHC.Maybe.Maybe GHC.Types.Double), -- | automatic_tax: Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. postSubscriptionsRequestBodyAutomaticTax :: (GHC.Maybe.Maybe PostSubscriptionsRequestBodyAutomaticTax'), -- | backdate_start_date: For new subscriptions, a past timestamp to backdate the subscription\'s start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. postSubscriptionsRequestBodyBackdateStartDate :: (GHC.Maybe.Maybe GHC.Types.Int), -- | billing_cycle_anchor: A future timestamp to anchor the subscription\'s [billing cycle](https:\/\/stripe.com\/docs\/subscriptions\/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with \`month\` or \`year\` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. postSubscriptionsRequestBodyBillingCycleAnchor :: (GHC.Maybe.Maybe GHC.Types.Int), -- | 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. postSubscriptionsRequestBodyBillingThresholds :: (GHC.Maybe.Maybe PostSubscriptionsRequestBodyBillingThresholds'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. postSubscriptionsRequestBodyCancelAt :: (GHC.Maybe.Maybe GHC.Types.Int), -- | cancel_at_period_end: Boolean indicating whether this subscription should cancel at the end of the current period. postSubscriptionsRequestBodyCancelAtPeriodEnd :: (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\`. postSubscriptionsRequestBodyCollectionMethod :: (GHC.Maybe.Maybe PostSubscriptionsRequestBodyCollectionMethod'), -- | 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 postSubscriptionsRequestBodyCoupon :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | customer: The identifier of the customer to subscribe. -- -- Constraints: -- -- * Maximum length of 5000 postSubscriptionsRequestBodyCustomer :: 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\`. postSubscriptionsRequestBodyDaysUntilDue :: (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 postSubscriptionsRequestBodyDefaultPaymentMethod :: (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 postSubscriptionsRequestBodyDefaultSource :: (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. postSubscriptionsRequestBodyDefaultTaxRates :: (GHC.Maybe.Maybe PostSubscriptionsRequestBodyDefaultTaxRates'Variants), -- | description: The subscription\'s description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces. -- -- Constraints: -- -- * Maximum length of 500 postSubscriptionsRequestBodyDescription :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | expand: Specifies which fields in the response should be expanded. postSubscriptionsRequestBodyExpand :: (GHC.Maybe.Maybe ([Data.Text.Internal.Text])), -- | items: A list of up to 20 subscription items, each with an attached price. postSubscriptionsRequestBodyItems :: (GHC.Maybe.Maybe ([PostSubscriptionsRequestBodyItems'])), -- | 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\`. postSubscriptionsRequestBodyMetadata :: (GHC.Maybe.Maybe PostSubscriptionsRequestBodyMetadata'Variants), -- | off_session: Indicates if a customer is on or off-session while an invoice payment is attempted. postSubscriptionsRequestBodyOffSession :: (GHC.Maybe.Maybe GHC.Types.Bool), -- | payment_behavior: Use \`allow_incomplete\` to create subscriptions with \`status=incomplete\` if the first invoice cannot be paid. Creating subscriptions with this status allows you to manage scenarios where additional user actions are needed to pay a subscription\'s invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https:\/\/stripe.com\/docs\/billing\/migration\/strong-customer-authentication) for Billing to learn more. This is the default behavior. -- -- Use \`default_incomplete\` to create Subscriptions with \`status=incomplete\` when the first invoice requires payment, otherwise start as active. Subscriptions transition to \`status=active\` when successfully confirming the payment intent on the first invoice. 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. If the payment intent is not confirmed within 23 hours subscriptions transition to \`status=incomplete_expired\`, which is a terminal state. -- -- Use \`error_if_incomplete\` if you want Stripe to return an HTTP 402 status code if a subscription\'s first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https:\/\/stripe.com\/docs\/upgrades\#2019-03-14) to learn more. -- -- \`pending_if_incomplete\` is only used with updates and cannot be passed when creating a subscription. postSubscriptionsRequestBodyPaymentBehavior :: (GHC.Maybe.Maybe PostSubscriptionsRequestBodyPaymentBehavior'), -- | payment_settings: Payment settings to pass to invoices created by the subscription. postSubscriptionsRequestBodyPaymentSettings :: (GHC.Maybe.Maybe PostSubscriptionsRequestBodyPaymentSettings'), -- | 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. postSubscriptionsRequestBodyPendingInvoiceItemInterval :: (GHC.Maybe.Maybe PostSubscriptionsRequestBodyPendingInvoiceItemInterval'Variants), -- | promotion_code: The API ID of a 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 postSubscriptionsRequestBodyPromotionCode :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | proration_behavior: Determines how to handle [prorations](https:\/\/stripe.com\/docs\/subscriptions\/billing-cycle\#prorations) resulting from the \`billing_cycle_anchor\`. If no value is passed, the default is \`create_prorations\`. postSubscriptionsRequestBodyProrationBehavior :: (GHC.Maybe.Maybe PostSubscriptionsRequestBodyProrationBehavior'), -- | 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. postSubscriptionsRequestBodyTransferData :: (GHC.Maybe.Maybe PostSubscriptionsRequestBodyTransferData'), -- | 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\`. See [Using trial periods on subscriptions](https:\/\/stripe.com\/docs\/billing\/subscriptions\/trials) to learn more. postSubscriptionsRequestBodyTrialEnd :: (GHC.Maybe.Maybe PostSubscriptionsRequestBodyTrialEnd'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. See [Using trial periods on subscriptions](https:\/\/stripe.com\/docs\/billing\/subscriptions\/trials) to learn more. postSubscriptionsRequestBodyTrialFromPlan :: (GHC.Maybe.Maybe GHC.Types.Bool), -- | trial_period_days: Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https:\/\/stripe.com\/docs\/billing\/subscriptions\/trials) to learn more. postSubscriptionsRequestBodyTrialPeriodDays :: (GHC.Maybe.Maybe GHC.Types.Int) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBody where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("add_invoice_items" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyAddInvoiceItems obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("application_fee_percent" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyApplicationFeePercent obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("automatic_tax" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyAutomaticTax obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("backdate_start_date" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyBackdateStartDate obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("billing_cycle_anchor" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyBillingCycleAnchor obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("billing_thresholds" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyBillingThresholds obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("cancel_at" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyCancelAt obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("cancel_at_period_end" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyCancelAtPeriodEnd obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("collection_method" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyCollectionMethod obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("coupon" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyCoupon obj) : ["customer" Data.Aeson.Types.ToJSON..= postSubscriptionsRequestBodyCustomer obj] : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("days_until_due" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyDaysUntilDue obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("default_payment_method" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyDefaultPaymentMethod obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("default_source" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyDefaultSource obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("default_tax_rates" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyDefaultTaxRates obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("description" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyDescription obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("expand" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyExpand obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("items" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyItems obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("metadata" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyMetadata obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("off_session" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyOffSession obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("payment_behavior" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentBehavior obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("payment_settings" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("pending_invoice_item_interval" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPendingInvoiceItemInterval obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("promotion_code" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPromotionCode obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("proration_behavior" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyProrationBehavior obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("transfer_data" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyTransferData obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("trial_end" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyTrialEnd obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("trial_from_plan" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyTrialFromPlan obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("trial_period_days" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyTrialPeriodDays obj) : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("add_invoice_items" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyAddInvoiceItems obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("application_fee_percent" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyApplicationFeePercent obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("automatic_tax" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyAutomaticTax obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("backdate_start_date" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyBackdateStartDate obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("billing_cycle_anchor" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyBillingCycleAnchor obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("billing_thresholds" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyBillingThresholds obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("cancel_at" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyCancelAt obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("cancel_at_period_end" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyCancelAtPeriodEnd obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("collection_method" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyCollectionMethod obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("coupon" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyCoupon obj) : ["customer" Data.Aeson.Types.ToJSON..= postSubscriptionsRequestBodyCustomer obj] : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("days_until_due" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyDaysUntilDue obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("default_payment_method" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyDefaultPaymentMethod obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("default_source" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyDefaultSource obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("default_tax_rates" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyDefaultTaxRates obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("description" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyDescription obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("expand" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyExpand obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("items" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyItems obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("metadata" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyMetadata obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("off_session" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyOffSession obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("payment_behavior" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentBehavior obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("payment_settings" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("pending_invoice_item_interval" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPendingInvoiceItemInterval obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("promotion_code" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPromotionCode obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("proration_behavior" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyProrationBehavior obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("transfer_data" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyTransferData obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("trial_end" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyTrialEnd obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("trial_from_plan" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyTrialFromPlan obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("trial_period_days" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyTrialPeriodDays obj) : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBody where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionsRequestBody" (\obj -> ((((((((((((((((((((((((((((GHC.Base.pure PostSubscriptionsRequestBody 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..:! "backdate_start_date")) 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..: "customer")) 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..:! "description")) 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..:! "payment_behavior")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "payment_settings")) 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..:! "transfer_data")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "trial_end")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "trial_from_plan")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "trial_period_days")) -- | Create a new 'PostSubscriptionsRequestBody' with all required fields. mkPostSubscriptionsRequestBody :: -- | 'postSubscriptionsRequestBodyCustomer' Data.Text.Internal.Text -> PostSubscriptionsRequestBody mkPostSubscriptionsRequestBody postSubscriptionsRequestBodyCustomer = PostSubscriptionsRequestBody { postSubscriptionsRequestBodyAddInvoiceItems = GHC.Maybe.Nothing, postSubscriptionsRequestBodyApplicationFeePercent = GHC.Maybe.Nothing, postSubscriptionsRequestBodyAutomaticTax = GHC.Maybe.Nothing, postSubscriptionsRequestBodyBackdateStartDate = GHC.Maybe.Nothing, postSubscriptionsRequestBodyBillingCycleAnchor = GHC.Maybe.Nothing, postSubscriptionsRequestBodyBillingThresholds = GHC.Maybe.Nothing, postSubscriptionsRequestBodyCancelAt = GHC.Maybe.Nothing, postSubscriptionsRequestBodyCancelAtPeriodEnd = GHC.Maybe.Nothing, postSubscriptionsRequestBodyCollectionMethod = GHC.Maybe.Nothing, postSubscriptionsRequestBodyCoupon = GHC.Maybe.Nothing, postSubscriptionsRequestBodyCustomer = postSubscriptionsRequestBodyCustomer, postSubscriptionsRequestBodyDaysUntilDue = GHC.Maybe.Nothing, postSubscriptionsRequestBodyDefaultPaymentMethod = GHC.Maybe.Nothing, postSubscriptionsRequestBodyDefaultSource = GHC.Maybe.Nothing, postSubscriptionsRequestBodyDefaultTaxRates = GHC.Maybe.Nothing, postSubscriptionsRequestBodyDescription = GHC.Maybe.Nothing, postSubscriptionsRequestBodyExpand = GHC.Maybe.Nothing, postSubscriptionsRequestBodyItems = GHC.Maybe.Nothing, postSubscriptionsRequestBodyMetadata = GHC.Maybe.Nothing, postSubscriptionsRequestBodyOffSession = GHC.Maybe.Nothing, postSubscriptionsRequestBodyPaymentBehavior = GHC.Maybe.Nothing, postSubscriptionsRequestBodyPaymentSettings = GHC.Maybe.Nothing, postSubscriptionsRequestBodyPendingInvoiceItemInterval = GHC.Maybe.Nothing, postSubscriptionsRequestBodyPromotionCode = GHC.Maybe.Nothing, postSubscriptionsRequestBodyProrationBehavior = GHC.Maybe.Nothing, postSubscriptionsRequestBodyTransferData = GHC.Maybe.Nothing, postSubscriptionsRequestBodyTrialEnd = GHC.Maybe.Nothing, postSubscriptionsRequestBodyTrialFromPlan = GHC.Maybe.Nothing, postSubscriptionsRequestBodyTrialPeriodDays = GHC.Maybe.Nothing } -- | Defines the object schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.add_invoice_items.items@ in the specification. data PostSubscriptionsRequestBodyAddInvoiceItems' = PostSubscriptionsRequestBodyAddInvoiceItems' { -- | price -- -- Constraints: -- -- * Maximum length of 5000 postSubscriptionsRequestBodyAddInvoiceItems'Price :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | price_data postSubscriptionsRequestBodyAddInvoiceItems'PriceData :: (GHC.Maybe.Maybe PostSubscriptionsRequestBodyAddInvoiceItems'PriceData'), -- | quantity postSubscriptionsRequestBodyAddInvoiceItems'Quantity :: (GHC.Maybe.Maybe GHC.Types.Int), -- | tax_rates postSubscriptionsRequestBodyAddInvoiceItems'TaxRates :: (GHC.Maybe.Maybe PostSubscriptionsRequestBodyAddInvoiceItems'TaxRates'Variants) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyAddInvoiceItems' where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("price" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyAddInvoiceItems'Price obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("price_data" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyAddInvoiceItems'PriceData obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("quantity" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyAddInvoiceItems'Quantity obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("tax_rates" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyAddInvoiceItems'TaxRates obj) : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("price" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyAddInvoiceItems'Price obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("price_data" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyAddInvoiceItems'PriceData obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("quantity" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyAddInvoiceItems'Quantity obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("tax_rates" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyAddInvoiceItems'TaxRates obj) : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyAddInvoiceItems' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionsRequestBodyAddInvoiceItems'" (\obj -> (((GHC.Base.pure PostSubscriptionsRequestBodyAddInvoiceItems' 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 'PostSubscriptionsRequestBodyAddInvoiceItems'' with all required fields. mkPostSubscriptionsRequestBodyAddInvoiceItems' :: PostSubscriptionsRequestBodyAddInvoiceItems' mkPostSubscriptionsRequestBodyAddInvoiceItems' = PostSubscriptionsRequestBodyAddInvoiceItems' { postSubscriptionsRequestBodyAddInvoiceItems'Price = GHC.Maybe.Nothing, postSubscriptionsRequestBodyAddInvoiceItems'PriceData = GHC.Maybe.Nothing, postSubscriptionsRequestBodyAddInvoiceItems'Quantity = GHC.Maybe.Nothing, postSubscriptionsRequestBodyAddInvoiceItems'TaxRates = GHC.Maybe.Nothing } -- | Defines the object schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.add_invoice_items.items.properties.price_data@ in the specification. data PostSubscriptionsRequestBodyAddInvoiceItems'PriceData' = PostSubscriptionsRequestBodyAddInvoiceItems'PriceData' { -- | currency postSubscriptionsRequestBodyAddInvoiceItems'PriceData'Currency :: Data.Text.Internal.Text, -- | product -- -- Constraints: -- -- * Maximum length of 5000 postSubscriptionsRequestBodyAddInvoiceItems'PriceData'Product :: Data.Text.Internal.Text, -- | tax_behavior postSubscriptionsRequestBodyAddInvoiceItems'PriceData'TaxBehavior :: (GHC.Maybe.Maybe PostSubscriptionsRequestBodyAddInvoiceItems'PriceData'TaxBehavior'), -- | unit_amount postSubscriptionsRequestBodyAddInvoiceItems'PriceData'UnitAmount :: (GHC.Maybe.Maybe GHC.Types.Int), -- | unit_amount_decimal postSubscriptionsRequestBodyAddInvoiceItems'PriceData'UnitAmountDecimal :: (GHC.Maybe.Maybe Data.Text.Internal.Text) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyAddInvoiceItems'PriceData' where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (["currency" Data.Aeson.Types.ToJSON..= postSubscriptionsRequestBodyAddInvoiceItems'PriceData'Currency obj] : ["product" Data.Aeson.Types.ToJSON..= postSubscriptionsRequestBodyAddInvoiceItems'PriceData'Product obj] : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("tax_behavior" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyAddInvoiceItems'PriceData'TaxBehavior obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("unit_amount" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyAddInvoiceItems'PriceData'UnitAmount obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("unit_amount_decimal" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyAddInvoiceItems'PriceData'UnitAmountDecimal obj) : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (["currency" Data.Aeson.Types.ToJSON..= postSubscriptionsRequestBodyAddInvoiceItems'PriceData'Currency obj] : ["product" Data.Aeson.Types.ToJSON..= postSubscriptionsRequestBodyAddInvoiceItems'PriceData'Product obj] : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("tax_behavior" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyAddInvoiceItems'PriceData'TaxBehavior obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("unit_amount" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyAddInvoiceItems'PriceData'UnitAmount obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("unit_amount_decimal" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyAddInvoiceItems'PriceData'UnitAmountDecimal obj) : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyAddInvoiceItems'PriceData' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionsRequestBodyAddInvoiceItems'PriceData'" (\obj -> ((((GHC.Base.pure PostSubscriptionsRequestBodyAddInvoiceItems'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 'PostSubscriptionsRequestBodyAddInvoiceItems'PriceData'' with all required fields. mkPostSubscriptionsRequestBodyAddInvoiceItems'PriceData' :: -- | 'postSubscriptionsRequestBodyAddInvoiceItems'PriceData'Currency' Data.Text.Internal.Text -> -- | 'postSubscriptionsRequestBodyAddInvoiceItems'PriceData'Product' Data.Text.Internal.Text -> PostSubscriptionsRequestBodyAddInvoiceItems'PriceData' mkPostSubscriptionsRequestBodyAddInvoiceItems'PriceData' postSubscriptionsRequestBodyAddInvoiceItems'PriceData'Currency postSubscriptionsRequestBodyAddInvoiceItems'PriceData'Product = PostSubscriptionsRequestBodyAddInvoiceItems'PriceData' { postSubscriptionsRequestBodyAddInvoiceItems'PriceData'Currency = postSubscriptionsRequestBodyAddInvoiceItems'PriceData'Currency, postSubscriptionsRequestBodyAddInvoiceItems'PriceData'Product = postSubscriptionsRequestBodyAddInvoiceItems'PriceData'Product, postSubscriptionsRequestBodyAddInvoiceItems'PriceData'TaxBehavior = GHC.Maybe.Nothing, postSubscriptionsRequestBodyAddInvoiceItems'PriceData'UnitAmount = GHC.Maybe.Nothing, postSubscriptionsRequestBodyAddInvoiceItems'PriceData'UnitAmountDecimal = GHC.Maybe.Nothing } -- | Defines the enum schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.add_invoice_items.items.properties.price_data.properties.tax_behavior@ in the specification. data PostSubscriptionsRequestBodyAddInvoiceItems'PriceData'TaxBehavior' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostSubscriptionsRequestBodyAddInvoiceItems'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. PostSubscriptionsRequestBodyAddInvoiceItems'PriceData'TaxBehavior'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"exclusive"@ PostSubscriptionsRequestBodyAddInvoiceItems'PriceData'TaxBehavior'EnumExclusive | -- | Represents the JSON value @"inclusive"@ PostSubscriptionsRequestBodyAddInvoiceItems'PriceData'TaxBehavior'EnumInclusive | -- | Represents the JSON value @"unspecified"@ PostSubscriptionsRequestBodyAddInvoiceItems'PriceData'TaxBehavior'EnumUnspecified deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyAddInvoiceItems'PriceData'TaxBehavior' where toJSON (PostSubscriptionsRequestBodyAddInvoiceItems'PriceData'TaxBehavior'Other val) = val toJSON (PostSubscriptionsRequestBodyAddInvoiceItems'PriceData'TaxBehavior'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostSubscriptionsRequestBodyAddInvoiceItems'PriceData'TaxBehavior'EnumExclusive) = "exclusive" toJSON (PostSubscriptionsRequestBodyAddInvoiceItems'PriceData'TaxBehavior'EnumInclusive) = "inclusive" toJSON (PostSubscriptionsRequestBodyAddInvoiceItems'PriceData'TaxBehavior'EnumUnspecified) = "unspecified" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyAddInvoiceItems'PriceData'TaxBehavior' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "exclusive" -> PostSubscriptionsRequestBodyAddInvoiceItems'PriceData'TaxBehavior'EnumExclusive | val GHC.Classes.== "inclusive" -> PostSubscriptionsRequestBodyAddInvoiceItems'PriceData'TaxBehavior'EnumInclusive | val GHC.Classes.== "unspecified" -> PostSubscriptionsRequestBodyAddInvoiceItems'PriceData'TaxBehavior'EnumUnspecified | GHC.Base.otherwise -> PostSubscriptionsRequestBodyAddInvoiceItems'PriceData'TaxBehavior'Other val ) -- | Defines the oneOf schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.add_invoice_items.items.properties.tax_rates.anyOf@ in the specification. data PostSubscriptionsRequestBodyAddInvoiceItems'TaxRates'Variants = -- | Represents the JSON value @""@ PostSubscriptionsRequestBodyAddInvoiceItems'TaxRates'EmptyString | PostSubscriptionsRequestBodyAddInvoiceItems'TaxRates'ListTText ([Data.Text.Internal.Text]) deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyAddInvoiceItems'TaxRates'Variants where toJSON (PostSubscriptionsRequestBodyAddInvoiceItems'TaxRates'ListTText a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostSubscriptionsRequestBodyAddInvoiceItems'TaxRates'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyAddInvoiceItems'TaxRates'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostSubscriptionsRequestBodyAddInvoiceItems'TaxRates'EmptyString | GHC.Base.otherwise -> case (PostSubscriptionsRequestBodyAddInvoiceItems'TaxRates'ListTText Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a -- | Defines the object schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.automatic_tax@ in the specification. -- -- Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. data PostSubscriptionsRequestBodyAutomaticTax' = PostSubscriptionsRequestBodyAutomaticTax' { -- | enabled postSubscriptionsRequestBodyAutomaticTax'Enabled :: GHC.Types.Bool } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyAutomaticTax' where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (["enabled" Data.Aeson.Types.ToJSON..= postSubscriptionsRequestBodyAutomaticTax'Enabled obj] : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (["enabled" Data.Aeson.Types.ToJSON..= postSubscriptionsRequestBodyAutomaticTax'Enabled obj] : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyAutomaticTax' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionsRequestBodyAutomaticTax'" (\obj -> GHC.Base.pure PostSubscriptionsRequestBodyAutomaticTax' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "enabled")) -- | Create a new 'PostSubscriptionsRequestBodyAutomaticTax'' with all required fields. mkPostSubscriptionsRequestBodyAutomaticTax' :: -- | 'postSubscriptionsRequestBodyAutomaticTax'Enabled' GHC.Types.Bool -> PostSubscriptionsRequestBodyAutomaticTax' mkPostSubscriptionsRequestBodyAutomaticTax' postSubscriptionsRequestBodyAutomaticTax'Enabled = PostSubscriptionsRequestBodyAutomaticTax' {postSubscriptionsRequestBodyAutomaticTax'Enabled = postSubscriptionsRequestBodyAutomaticTax'Enabled} -- | Defines the object schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.billing_thresholds.anyOf@ in the specification. data PostSubscriptionsRequestBodyBillingThresholds'OneOf1 = PostSubscriptionsRequestBodyBillingThresholds'OneOf1 { -- | amount_gte postSubscriptionsRequestBodyBillingThresholds'OneOf1AmountGte :: (GHC.Maybe.Maybe GHC.Types.Int), -- | reset_billing_cycle_anchor postSubscriptionsRequestBodyBillingThresholds'OneOf1ResetBillingCycleAnchor :: (GHC.Maybe.Maybe GHC.Types.Bool) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyBillingThresholds'OneOf1 where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("amount_gte" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyBillingThresholds'OneOf1AmountGte obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("reset_billing_cycle_anchor" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyBillingThresholds'OneOf1ResetBillingCycleAnchor obj) : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("amount_gte" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyBillingThresholds'OneOf1AmountGte obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("reset_billing_cycle_anchor" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyBillingThresholds'OneOf1ResetBillingCycleAnchor obj) : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyBillingThresholds'OneOf1 where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionsRequestBodyBillingThresholds'OneOf1" (\obj -> (GHC.Base.pure PostSubscriptionsRequestBodyBillingThresholds'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "amount_gte")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "reset_billing_cycle_anchor")) -- | Create a new 'PostSubscriptionsRequestBodyBillingThresholds'OneOf1' with all required fields. mkPostSubscriptionsRequestBodyBillingThresholds'OneOf1 :: PostSubscriptionsRequestBodyBillingThresholds'OneOf1 mkPostSubscriptionsRequestBodyBillingThresholds'OneOf1 = PostSubscriptionsRequestBodyBillingThresholds'OneOf1 { postSubscriptionsRequestBodyBillingThresholds'OneOf1AmountGte = GHC.Maybe.Nothing, postSubscriptionsRequestBodyBillingThresholds'OneOf1ResetBillingCycleAnchor = GHC.Maybe.Nothing } -- | Defines the oneOf schema located at @paths.\/v1\/subscriptions.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 PostSubscriptionsRequestBodyBillingThresholds'Variants = -- | Represents the JSON value @""@ PostSubscriptionsRequestBodyBillingThresholds'EmptyString | PostSubscriptionsRequestBodyBillingThresholds'PostSubscriptionsRequestBodyBillingThresholds'OneOf1 PostSubscriptionsRequestBodyBillingThresholds'OneOf1 deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyBillingThresholds'Variants where toJSON (PostSubscriptionsRequestBodyBillingThresholds'PostSubscriptionsRequestBodyBillingThresholds'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostSubscriptionsRequestBodyBillingThresholds'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyBillingThresholds'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostSubscriptionsRequestBodyBillingThresholds'EmptyString | GHC.Base.otherwise -> case (PostSubscriptionsRequestBodyBillingThresholds'PostSubscriptionsRequestBodyBillingThresholds'OneOf1 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a -- | Defines the enum schema located at @paths.\/v1\/subscriptions.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 PostSubscriptionsRequestBodyCollectionMethod' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostSubscriptionsRequestBodyCollectionMethod'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. PostSubscriptionsRequestBodyCollectionMethod'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"charge_automatically"@ PostSubscriptionsRequestBodyCollectionMethod'EnumChargeAutomatically | -- | Represents the JSON value @"send_invoice"@ PostSubscriptionsRequestBodyCollectionMethod'EnumSendInvoice deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyCollectionMethod' where toJSON (PostSubscriptionsRequestBodyCollectionMethod'Other val) = val toJSON (PostSubscriptionsRequestBodyCollectionMethod'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostSubscriptionsRequestBodyCollectionMethod'EnumChargeAutomatically) = "charge_automatically" toJSON (PostSubscriptionsRequestBodyCollectionMethod'EnumSendInvoice) = "send_invoice" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyCollectionMethod' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "charge_automatically" -> PostSubscriptionsRequestBodyCollectionMethod'EnumChargeAutomatically | val GHC.Classes.== "send_invoice" -> PostSubscriptionsRequestBodyCollectionMethod'EnumSendInvoice | GHC.Base.otherwise -> PostSubscriptionsRequestBodyCollectionMethod'Other val ) -- | Defines the oneOf schema located at @paths.\/v1\/subscriptions.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. data PostSubscriptionsRequestBodyDefaultTaxRates'Variants = -- | Represents the JSON value @""@ PostSubscriptionsRequestBodyDefaultTaxRates'EmptyString | PostSubscriptionsRequestBodyDefaultTaxRates'ListTText ([Data.Text.Internal.Text]) deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyDefaultTaxRates'Variants where toJSON (PostSubscriptionsRequestBodyDefaultTaxRates'ListTText a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostSubscriptionsRequestBodyDefaultTaxRates'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyDefaultTaxRates'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostSubscriptionsRequestBodyDefaultTaxRates'EmptyString | GHC.Base.otherwise -> case (PostSubscriptionsRequestBodyDefaultTaxRates'ListTText Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a -- | Defines the object schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.items.items@ in the specification. data PostSubscriptionsRequestBodyItems' = PostSubscriptionsRequestBodyItems' { -- | billing_thresholds postSubscriptionsRequestBodyItems'BillingThresholds :: (GHC.Maybe.Maybe PostSubscriptionsRequestBodyItems'BillingThresholds'Variants), -- | metadata postSubscriptionsRequestBodyItems'Metadata :: (GHC.Maybe.Maybe Data.Aeson.Types.Internal.Object), -- | price -- -- Constraints: -- -- * Maximum length of 5000 postSubscriptionsRequestBodyItems'Price :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | price_data postSubscriptionsRequestBodyItems'PriceData :: (GHC.Maybe.Maybe PostSubscriptionsRequestBodyItems'PriceData'), -- | quantity postSubscriptionsRequestBodyItems'Quantity :: (GHC.Maybe.Maybe GHC.Types.Int), -- | tax_rates postSubscriptionsRequestBodyItems'TaxRates :: (GHC.Maybe.Maybe PostSubscriptionsRequestBodyItems'TaxRates'Variants) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyItems' where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("billing_thresholds" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyItems'BillingThresholds obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("metadata" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyItems'Metadata obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("price" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyItems'Price obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("price_data" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyItems'PriceData obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("quantity" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyItems'Quantity obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("tax_rates" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyItems'TaxRates obj) : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("billing_thresholds" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyItems'BillingThresholds obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("metadata" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyItems'Metadata obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("price" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyItems'Price obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("price_data" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyItems'PriceData obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("quantity" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyItems'Quantity obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("tax_rates" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyItems'TaxRates obj) : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyItems' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionsRequestBodyItems'" (\obj -> (((((GHC.Base.pure PostSubscriptionsRequestBodyItems' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "billing_thresholds")) 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 'PostSubscriptionsRequestBodyItems'' with all required fields. mkPostSubscriptionsRequestBodyItems' :: PostSubscriptionsRequestBodyItems' mkPostSubscriptionsRequestBodyItems' = PostSubscriptionsRequestBodyItems' { postSubscriptionsRequestBodyItems'BillingThresholds = GHC.Maybe.Nothing, postSubscriptionsRequestBodyItems'Metadata = GHC.Maybe.Nothing, postSubscriptionsRequestBodyItems'Price = GHC.Maybe.Nothing, postSubscriptionsRequestBodyItems'PriceData = GHC.Maybe.Nothing, postSubscriptionsRequestBodyItems'Quantity = GHC.Maybe.Nothing, postSubscriptionsRequestBodyItems'TaxRates = GHC.Maybe.Nothing } -- | Defines the object schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.items.items.properties.billing_thresholds.anyOf@ in the specification. data PostSubscriptionsRequestBodyItems'BillingThresholds'OneOf1 = PostSubscriptionsRequestBodyItems'BillingThresholds'OneOf1 { -- | usage_gte postSubscriptionsRequestBodyItems'BillingThresholds'OneOf1UsageGte :: GHC.Types.Int } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyItems'BillingThresholds'OneOf1 where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (["usage_gte" Data.Aeson.Types.ToJSON..= postSubscriptionsRequestBodyItems'BillingThresholds'OneOf1UsageGte obj] : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (["usage_gte" Data.Aeson.Types.ToJSON..= postSubscriptionsRequestBodyItems'BillingThresholds'OneOf1UsageGte obj] : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyItems'BillingThresholds'OneOf1 where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionsRequestBodyItems'BillingThresholds'OneOf1" (\obj -> GHC.Base.pure PostSubscriptionsRequestBodyItems'BillingThresholds'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "usage_gte")) -- | Create a new 'PostSubscriptionsRequestBodyItems'BillingThresholds'OneOf1' with all required fields. mkPostSubscriptionsRequestBodyItems'BillingThresholds'OneOf1 :: -- | 'postSubscriptionsRequestBodyItems'BillingThresholds'OneOf1UsageGte' GHC.Types.Int -> PostSubscriptionsRequestBodyItems'BillingThresholds'OneOf1 mkPostSubscriptionsRequestBodyItems'BillingThresholds'OneOf1 postSubscriptionsRequestBodyItems'BillingThresholds'OneOf1UsageGte = PostSubscriptionsRequestBodyItems'BillingThresholds'OneOf1 {postSubscriptionsRequestBodyItems'BillingThresholds'OneOf1UsageGte = postSubscriptionsRequestBodyItems'BillingThresholds'OneOf1UsageGte} -- | Defines the oneOf schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.items.items.properties.billing_thresholds.anyOf@ in the specification. data PostSubscriptionsRequestBodyItems'BillingThresholds'Variants = -- | Represents the JSON value @""@ PostSubscriptionsRequestBodyItems'BillingThresholds'EmptyString | PostSubscriptionsRequestBodyItems'BillingThresholds'PostSubscriptionsRequestBodyItems'BillingThresholds'OneOf1 PostSubscriptionsRequestBodyItems'BillingThresholds'OneOf1 deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyItems'BillingThresholds'Variants where toJSON (PostSubscriptionsRequestBodyItems'BillingThresholds'PostSubscriptionsRequestBodyItems'BillingThresholds'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostSubscriptionsRequestBodyItems'BillingThresholds'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyItems'BillingThresholds'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostSubscriptionsRequestBodyItems'BillingThresholds'EmptyString | GHC.Base.otherwise -> case (PostSubscriptionsRequestBodyItems'BillingThresholds'PostSubscriptionsRequestBodyItems'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 object schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.items.items.properties.price_data@ in the specification. data PostSubscriptionsRequestBodyItems'PriceData' = PostSubscriptionsRequestBodyItems'PriceData' { -- | currency postSubscriptionsRequestBodyItems'PriceData'Currency :: Data.Text.Internal.Text, -- | product -- -- Constraints: -- -- * Maximum length of 5000 postSubscriptionsRequestBodyItems'PriceData'Product :: Data.Text.Internal.Text, -- | recurring postSubscriptionsRequestBodyItems'PriceData'Recurring :: PostSubscriptionsRequestBodyItems'PriceData'Recurring', -- | tax_behavior postSubscriptionsRequestBodyItems'PriceData'TaxBehavior :: (GHC.Maybe.Maybe PostSubscriptionsRequestBodyItems'PriceData'TaxBehavior'), -- | unit_amount postSubscriptionsRequestBodyItems'PriceData'UnitAmount :: (GHC.Maybe.Maybe GHC.Types.Int), -- | unit_amount_decimal postSubscriptionsRequestBodyItems'PriceData'UnitAmountDecimal :: (GHC.Maybe.Maybe Data.Text.Internal.Text) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyItems'PriceData' where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (["currency" Data.Aeson.Types.ToJSON..= postSubscriptionsRequestBodyItems'PriceData'Currency obj] : ["product" Data.Aeson.Types.ToJSON..= postSubscriptionsRequestBodyItems'PriceData'Product obj] : ["recurring" Data.Aeson.Types.ToJSON..= postSubscriptionsRequestBodyItems'PriceData'Recurring obj] : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("tax_behavior" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyItems'PriceData'TaxBehavior obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("unit_amount" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyItems'PriceData'UnitAmount obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("unit_amount_decimal" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyItems'PriceData'UnitAmountDecimal obj) : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (["currency" Data.Aeson.Types.ToJSON..= postSubscriptionsRequestBodyItems'PriceData'Currency obj] : ["product" Data.Aeson.Types.ToJSON..= postSubscriptionsRequestBodyItems'PriceData'Product obj] : ["recurring" Data.Aeson.Types.ToJSON..= postSubscriptionsRequestBodyItems'PriceData'Recurring obj] : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("tax_behavior" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyItems'PriceData'TaxBehavior obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("unit_amount" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyItems'PriceData'UnitAmount obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("unit_amount_decimal" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyItems'PriceData'UnitAmountDecimal obj) : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyItems'PriceData' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionsRequestBodyItems'PriceData'" (\obj -> (((((GHC.Base.pure PostSubscriptionsRequestBodyItems'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 'PostSubscriptionsRequestBodyItems'PriceData'' with all required fields. mkPostSubscriptionsRequestBodyItems'PriceData' :: -- | 'postSubscriptionsRequestBodyItems'PriceData'Currency' Data.Text.Internal.Text -> -- | 'postSubscriptionsRequestBodyItems'PriceData'Product' Data.Text.Internal.Text -> -- | 'postSubscriptionsRequestBodyItems'PriceData'Recurring' PostSubscriptionsRequestBodyItems'PriceData'Recurring' -> PostSubscriptionsRequestBodyItems'PriceData' mkPostSubscriptionsRequestBodyItems'PriceData' postSubscriptionsRequestBodyItems'PriceData'Currency postSubscriptionsRequestBodyItems'PriceData'Product postSubscriptionsRequestBodyItems'PriceData'Recurring = PostSubscriptionsRequestBodyItems'PriceData' { postSubscriptionsRequestBodyItems'PriceData'Currency = postSubscriptionsRequestBodyItems'PriceData'Currency, postSubscriptionsRequestBodyItems'PriceData'Product = postSubscriptionsRequestBodyItems'PriceData'Product, postSubscriptionsRequestBodyItems'PriceData'Recurring = postSubscriptionsRequestBodyItems'PriceData'Recurring, postSubscriptionsRequestBodyItems'PriceData'TaxBehavior = GHC.Maybe.Nothing, postSubscriptionsRequestBodyItems'PriceData'UnitAmount = GHC.Maybe.Nothing, postSubscriptionsRequestBodyItems'PriceData'UnitAmountDecimal = GHC.Maybe.Nothing } -- | Defines the object schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.items.items.properties.price_data.properties.recurring@ in the specification. data PostSubscriptionsRequestBodyItems'PriceData'Recurring' = PostSubscriptionsRequestBodyItems'PriceData'Recurring' { -- | interval postSubscriptionsRequestBodyItems'PriceData'Recurring'Interval :: PostSubscriptionsRequestBodyItems'PriceData'Recurring'Interval', -- | interval_count postSubscriptionsRequestBodyItems'PriceData'Recurring'IntervalCount :: (GHC.Maybe.Maybe GHC.Types.Int) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyItems'PriceData'Recurring' where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (["interval" Data.Aeson.Types.ToJSON..= postSubscriptionsRequestBodyItems'PriceData'Recurring'Interval obj] : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("interval_count" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyItems'PriceData'Recurring'IntervalCount obj) : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (["interval" Data.Aeson.Types.ToJSON..= postSubscriptionsRequestBodyItems'PriceData'Recurring'Interval obj] : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("interval_count" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyItems'PriceData'Recurring'IntervalCount obj) : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyItems'PriceData'Recurring' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionsRequestBodyItems'PriceData'Recurring'" (\obj -> (GHC.Base.pure PostSubscriptionsRequestBodyItems'PriceData'Recurring' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "interval")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "interval_count")) -- | Create a new 'PostSubscriptionsRequestBodyItems'PriceData'Recurring'' with all required fields. mkPostSubscriptionsRequestBodyItems'PriceData'Recurring' :: -- | 'postSubscriptionsRequestBodyItems'PriceData'Recurring'Interval' PostSubscriptionsRequestBodyItems'PriceData'Recurring'Interval' -> PostSubscriptionsRequestBodyItems'PriceData'Recurring' mkPostSubscriptionsRequestBodyItems'PriceData'Recurring' postSubscriptionsRequestBodyItems'PriceData'Recurring'Interval = PostSubscriptionsRequestBodyItems'PriceData'Recurring' { postSubscriptionsRequestBodyItems'PriceData'Recurring'Interval = postSubscriptionsRequestBodyItems'PriceData'Recurring'Interval, postSubscriptionsRequestBodyItems'PriceData'Recurring'IntervalCount = GHC.Maybe.Nothing } -- | Defines the enum schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.items.items.properties.price_data.properties.recurring.properties.interval@ in the specification. data PostSubscriptionsRequestBodyItems'PriceData'Recurring'Interval' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostSubscriptionsRequestBodyItems'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. PostSubscriptionsRequestBodyItems'PriceData'Recurring'Interval'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"day"@ PostSubscriptionsRequestBodyItems'PriceData'Recurring'Interval'EnumDay | -- | Represents the JSON value @"month"@ PostSubscriptionsRequestBodyItems'PriceData'Recurring'Interval'EnumMonth | -- | Represents the JSON value @"week"@ PostSubscriptionsRequestBodyItems'PriceData'Recurring'Interval'EnumWeek | -- | Represents the JSON value @"year"@ PostSubscriptionsRequestBodyItems'PriceData'Recurring'Interval'EnumYear deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyItems'PriceData'Recurring'Interval' where toJSON (PostSubscriptionsRequestBodyItems'PriceData'Recurring'Interval'Other val) = val toJSON (PostSubscriptionsRequestBodyItems'PriceData'Recurring'Interval'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostSubscriptionsRequestBodyItems'PriceData'Recurring'Interval'EnumDay) = "day" toJSON (PostSubscriptionsRequestBodyItems'PriceData'Recurring'Interval'EnumMonth) = "month" toJSON (PostSubscriptionsRequestBodyItems'PriceData'Recurring'Interval'EnumWeek) = "week" toJSON (PostSubscriptionsRequestBodyItems'PriceData'Recurring'Interval'EnumYear) = "year" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyItems'PriceData'Recurring'Interval' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "day" -> PostSubscriptionsRequestBodyItems'PriceData'Recurring'Interval'EnumDay | val GHC.Classes.== "month" -> PostSubscriptionsRequestBodyItems'PriceData'Recurring'Interval'EnumMonth | val GHC.Classes.== "week" -> PostSubscriptionsRequestBodyItems'PriceData'Recurring'Interval'EnumWeek | val GHC.Classes.== "year" -> PostSubscriptionsRequestBodyItems'PriceData'Recurring'Interval'EnumYear | GHC.Base.otherwise -> PostSubscriptionsRequestBodyItems'PriceData'Recurring'Interval'Other val ) -- | Defines the enum schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.items.items.properties.price_data.properties.tax_behavior@ in the specification. data PostSubscriptionsRequestBodyItems'PriceData'TaxBehavior' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostSubscriptionsRequestBodyItems'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. PostSubscriptionsRequestBodyItems'PriceData'TaxBehavior'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"exclusive"@ PostSubscriptionsRequestBodyItems'PriceData'TaxBehavior'EnumExclusive | -- | Represents the JSON value @"inclusive"@ PostSubscriptionsRequestBodyItems'PriceData'TaxBehavior'EnumInclusive | -- | Represents the JSON value @"unspecified"@ PostSubscriptionsRequestBodyItems'PriceData'TaxBehavior'EnumUnspecified deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyItems'PriceData'TaxBehavior' where toJSON (PostSubscriptionsRequestBodyItems'PriceData'TaxBehavior'Other val) = val toJSON (PostSubscriptionsRequestBodyItems'PriceData'TaxBehavior'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostSubscriptionsRequestBodyItems'PriceData'TaxBehavior'EnumExclusive) = "exclusive" toJSON (PostSubscriptionsRequestBodyItems'PriceData'TaxBehavior'EnumInclusive) = "inclusive" toJSON (PostSubscriptionsRequestBodyItems'PriceData'TaxBehavior'EnumUnspecified) = "unspecified" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyItems'PriceData'TaxBehavior' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "exclusive" -> PostSubscriptionsRequestBodyItems'PriceData'TaxBehavior'EnumExclusive | val GHC.Classes.== "inclusive" -> PostSubscriptionsRequestBodyItems'PriceData'TaxBehavior'EnumInclusive | val GHC.Classes.== "unspecified" -> PostSubscriptionsRequestBodyItems'PriceData'TaxBehavior'EnumUnspecified | GHC.Base.otherwise -> PostSubscriptionsRequestBodyItems'PriceData'TaxBehavior'Other val ) -- | Defines the oneOf schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.items.items.properties.tax_rates.anyOf@ in the specification. data PostSubscriptionsRequestBodyItems'TaxRates'Variants = -- | Represents the JSON value @""@ PostSubscriptionsRequestBodyItems'TaxRates'EmptyString | PostSubscriptionsRequestBodyItems'TaxRates'ListTText ([Data.Text.Internal.Text]) deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyItems'TaxRates'Variants where toJSON (PostSubscriptionsRequestBodyItems'TaxRates'ListTText a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostSubscriptionsRequestBodyItems'TaxRates'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyItems'TaxRates'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostSubscriptionsRequestBodyItems'TaxRates'EmptyString | GHC.Base.otherwise -> case (PostSubscriptionsRequestBodyItems'TaxRates'ListTText Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a -- | Defines the oneOf schema located at @paths.\/v1\/subscriptions.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 PostSubscriptionsRequestBodyMetadata'Variants = -- | Represents the JSON value @""@ PostSubscriptionsRequestBodyMetadata'EmptyString | PostSubscriptionsRequestBodyMetadata'Object Data.Aeson.Types.Internal.Object deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyMetadata'Variants where toJSON (PostSubscriptionsRequestBodyMetadata'Object a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostSubscriptionsRequestBodyMetadata'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyMetadata'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostSubscriptionsRequestBodyMetadata'EmptyString | GHC.Base.otherwise -> case (PostSubscriptionsRequestBodyMetadata'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 enum schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_behavior@ in the specification. -- -- Use \`allow_incomplete\` to create subscriptions with \`status=incomplete\` if the first invoice cannot be paid. Creating subscriptions with this status allows you to manage scenarios where additional user actions are needed to pay a subscription\'s invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https:\/\/stripe.com\/docs\/billing\/migration\/strong-customer-authentication) for Billing to learn more. This is the default behavior. -- -- Use \`default_incomplete\` to create Subscriptions with \`status=incomplete\` when the first invoice requires payment, otherwise start as active. Subscriptions transition to \`status=active\` when successfully confirming the payment intent on the first invoice. 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. If the payment intent is not confirmed within 23 hours subscriptions transition to \`status=incomplete_expired\`, which is a terminal state. -- -- Use \`error_if_incomplete\` if you want Stripe to return an HTTP 402 status code if a subscription\'s first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https:\/\/stripe.com\/docs\/upgrades\#2019-03-14) to learn more. -- -- \`pending_if_incomplete\` is only used with updates and cannot be passed when creating a subscription. data PostSubscriptionsRequestBodyPaymentBehavior' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostSubscriptionsRequestBodyPaymentBehavior'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. PostSubscriptionsRequestBodyPaymentBehavior'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"allow_incomplete"@ PostSubscriptionsRequestBodyPaymentBehavior'EnumAllowIncomplete | -- | Represents the JSON value @"default_incomplete"@ PostSubscriptionsRequestBodyPaymentBehavior'EnumDefaultIncomplete | -- | Represents the JSON value @"error_if_incomplete"@ PostSubscriptionsRequestBodyPaymentBehavior'EnumErrorIfIncomplete | -- | Represents the JSON value @"pending_if_incomplete"@ PostSubscriptionsRequestBodyPaymentBehavior'EnumPendingIfIncomplete deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyPaymentBehavior' where toJSON (PostSubscriptionsRequestBodyPaymentBehavior'Other val) = val toJSON (PostSubscriptionsRequestBodyPaymentBehavior'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostSubscriptionsRequestBodyPaymentBehavior'EnumAllowIncomplete) = "allow_incomplete" toJSON (PostSubscriptionsRequestBodyPaymentBehavior'EnumDefaultIncomplete) = "default_incomplete" toJSON (PostSubscriptionsRequestBodyPaymentBehavior'EnumErrorIfIncomplete) = "error_if_incomplete" toJSON (PostSubscriptionsRequestBodyPaymentBehavior'EnumPendingIfIncomplete) = "pending_if_incomplete" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyPaymentBehavior' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "allow_incomplete" -> PostSubscriptionsRequestBodyPaymentBehavior'EnumAllowIncomplete | val GHC.Classes.== "default_incomplete" -> PostSubscriptionsRequestBodyPaymentBehavior'EnumDefaultIncomplete | val GHC.Classes.== "error_if_incomplete" -> PostSubscriptionsRequestBodyPaymentBehavior'EnumErrorIfIncomplete | val GHC.Classes.== "pending_if_incomplete" -> PostSubscriptionsRequestBodyPaymentBehavior'EnumPendingIfIncomplete | GHC.Base.otherwise -> PostSubscriptionsRequestBodyPaymentBehavior'Other val ) -- | Defines the object schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_settings@ in the specification. -- -- Payment settings to pass to invoices created by the subscription. data PostSubscriptionsRequestBodyPaymentSettings' = PostSubscriptionsRequestBodyPaymentSettings' { -- | payment_method_options postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions :: (GHC.Maybe.Maybe PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'), -- | payment_method_types postSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes :: (GHC.Maybe.Maybe PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'Variants), -- | save_default_payment_method postSubscriptionsRequestBodyPaymentSettings'SaveDefaultPaymentMethod :: (GHC.Maybe.Maybe PostSubscriptionsRequestBodyPaymentSettings'SaveDefaultPaymentMethod') } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyPaymentSettings' where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("payment_method_options" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("payment_method_types" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("save_default_payment_method" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'SaveDefaultPaymentMethod obj) : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("payment_method_options" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("payment_method_types" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("save_default_payment_method" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'SaveDefaultPaymentMethod obj) : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyPaymentSettings' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionsRequestBodyPaymentSettings'" (\obj -> ((GHC.Base.pure PostSubscriptionsRequestBodyPaymentSettings' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "payment_method_options")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "payment_method_types")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "save_default_payment_method")) -- | Create a new 'PostSubscriptionsRequestBodyPaymentSettings'' with all required fields. mkPostSubscriptionsRequestBodyPaymentSettings' :: PostSubscriptionsRequestBodyPaymentSettings' mkPostSubscriptionsRequestBodyPaymentSettings' = PostSubscriptionsRequestBodyPaymentSettings' { postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions = GHC.Maybe.Nothing, postSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes = GHC.Maybe.Nothing, postSubscriptionsRequestBodyPaymentSettings'SaveDefaultPaymentMethod = GHC.Maybe.Nothing } -- | Defines the object schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_settings.properties.payment_method_options@ in the specification. data PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions' = PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions' { -- | acss_debit postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit :: (GHC.Maybe.Maybe PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'Variants), -- | bancontact postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact :: (GHC.Maybe.Maybe PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'Variants), -- | card postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card :: (GHC.Maybe.Maybe PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'Variants), -- | customer_balance postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance :: (GHC.Maybe.Maybe PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'Variants), -- | konbini postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Konbini :: (GHC.Maybe.Maybe PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Konbini'Variants), -- | us_bank_account postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount :: (GHC.Maybe.Maybe PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'Variants) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions' where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("acss_debit" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("bancontact" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("card" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("customer_balance" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("konbini" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Konbini obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("us_bank_account" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount obj) : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("acss_debit" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("bancontact" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("card" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("customer_balance" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("konbini" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Konbini obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("us_bank_account" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount obj) : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'" (\obj -> (((((GHC.Base.pure PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "acss_debit")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "bancontact")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "card")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "customer_balance")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "konbini")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "us_bank_account")) -- | Create a new 'PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'' with all required fields. mkPostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions' :: PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions' mkPostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions' = PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions' { postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit = GHC.Maybe.Nothing, postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact = GHC.Maybe.Nothing, postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card = GHC.Maybe.Nothing, postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance = GHC.Maybe.Nothing, postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Konbini = GHC.Maybe.Nothing, postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount = GHC.Maybe.Nothing } -- | Defines the object schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_settings.properties.payment_method_options.properties.acss_debit.anyOf@ in the specification. data PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1 = PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1 { -- | mandate_options postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1MandateOptions :: (GHC.Maybe.Maybe PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1MandateOptions'), -- | verification_method postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1VerificationMethod :: (GHC.Maybe.Maybe PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1VerificationMethod') } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1 where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("mandate_options" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1MandateOptions obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("verification_method" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1VerificationMethod obj) : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("mandate_options" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1MandateOptions obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("verification_method" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1VerificationMethod obj) : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1 where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1" (\obj -> (GHC.Base.pure PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "mandate_options")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "verification_method")) -- | Create a new 'PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1' with all required fields. mkPostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1 :: PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1 mkPostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1 = PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1 { postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1MandateOptions = GHC.Maybe.Nothing, postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1VerificationMethod = GHC.Maybe.Nothing } -- | Defines the object schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_settings.properties.payment_method_options.properties.acss_debit.anyOf.properties.mandate_options@ in the specification. data PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1MandateOptions' = PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1MandateOptions' { -- | transaction_type postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1MandateOptions'TransactionType :: (GHC.Maybe.Maybe PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1MandateOptions'TransactionType') } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1MandateOptions' where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("transaction_type" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1MandateOptions'TransactionType obj) : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("transaction_type" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1MandateOptions'TransactionType obj) : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1MandateOptions' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1MandateOptions'" (\obj -> GHC.Base.pure PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1MandateOptions' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "transaction_type")) -- | Create a new 'PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1MandateOptions'' with all required fields. mkPostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1MandateOptions' :: PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1MandateOptions' mkPostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1MandateOptions' = PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1MandateOptions' {postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1MandateOptions'TransactionType = GHC.Maybe.Nothing} -- | Defines the enum schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_settings.properties.payment_method_options.properties.acss_debit.anyOf.properties.mandate_options.properties.transaction_type@ in the specification. data PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1MandateOptions'TransactionType' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1MandateOptions'TransactionType'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. PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1MandateOptions'TransactionType'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"business"@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1MandateOptions'TransactionType'EnumBusiness | -- | Represents the JSON value @"personal"@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1MandateOptions'TransactionType'EnumPersonal deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1MandateOptions'TransactionType' where toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1MandateOptions'TransactionType'Other val) = val toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1MandateOptions'TransactionType'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1MandateOptions'TransactionType'EnumBusiness) = "business" toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1MandateOptions'TransactionType'EnumPersonal) = "personal" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1MandateOptions'TransactionType' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "business" -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1MandateOptions'TransactionType'EnumBusiness | val GHC.Classes.== "personal" -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1MandateOptions'TransactionType'EnumPersonal | GHC.Base.otherwise -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1MandateOptions'TransactionType'Other val ) -- | Defines the enum schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_settings.properties.payment_method_options.properties.acss_debit.anyOf.properties.verification_method@ in the specification. data PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1VerificationMethod' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1VerificationMethod'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. PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1VerificationMethod'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"automatic"@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1VerificationMethod'EnumAutomatic | -- | Represents the JSON value @"instant"@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1VerificationMethod'EnumInstant | -- | Represents the JSON value @"microdeposits"@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1VerificationMethod'EnumMicrodeposits deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1VerificationMethod' where toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1VerificationMethod'Other val) = val toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1VerificationMethod'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1VerificationMethod'EnumAutomatic) = "automatic" toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1VerificationMethod'EnumInstant) = "instant" toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1VerificationMethod'EnumMicrodeposits) = "microdeposits" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1VerificationMethod' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "automatic" -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1VerificationMethod'EnumAutomatic | val GHC.Classes.== "instant" -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1VerificationMethod'EnumInstant | val GHC.Classes.== "microdeposits" -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1VerificationMethod'EnumMicrodeposits | GHC.Base.otherwise -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1VerificationMethod'Other val ) -- | Defines the oneOf schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_settings.properties.payment_method_options.properties.acss_debit.anyOf@ in the specification. data PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'Variants = -- | Represents the JSON value @""@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'EmptyString | PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1 PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1 deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'Variants where toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'EmptyString | GHC.Base.otherwise -> case (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'AcssDebit'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 object schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_settings.properties.payment_method_options.properties.bancontact.anyOf@ in the specification. data PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1 = PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1 { -- | preferred_language postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1PreferredLanguage :: (GHC.Maybe.Maybe PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1PreferredLanguage') } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1 where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("preferred_language" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1PreferredLanguage obj) : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("preferred_language" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1PreferredLanguage obj) : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1 where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1" (\obj -> GHC.Base.pure PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "preferred_language")) -- | Create a new 'PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1' with all required fields. mkPostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1 :: PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1 mkPostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1 = PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1 {postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1PreferredLanguage = GHC.Maybe.Nothing} -- | Defines the enum schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_settings.properties.payment_method_options.properties.bancontact.anyOf.properties.preferred_language@ in the specification. data PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1PreferredLanguage' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1PreferredLanguage'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. PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1PreferredLanguage'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"de"@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1PreferredLanguage'EnumDe | -- | Represents the JSON value @"en"@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1PreferredLanguage'EnumEn | -- | Represents the JSON value @"fr"@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1PreferredLanguage'EnumFr | -- | Represents the JSON value @"nl"@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1PreferredLanguage'EnumNl deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1PreferredLanguage' where toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1PreferredLanguage'Other val) = val toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1PreferredLanguage'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1PreferredLanguage'EnumDe) = "de" toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1PreferredLanguage'EnumEn) = "en" toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1PreferredLanguage'EnumFr) = "fr" toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1PreferredLanguage'EnumNl) = "nl" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1PreferredLanguage' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "de" -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1PreferredLanguage'EnumDe | val GHC.Classes.== "en" -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1PreferredLanguage'EnumEn | val GHC.Classes.== "fr" -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1PreferredLanguage'EnumFr | val GHC.Classes.== "nl" -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1PreferredLanguage'EnumNl | GHC.Base.otherwise -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1PreferredLanguage'Other val ) -- | Defines the oneOf schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_settings.properties.payment_method_options.properties.bancontact.anyOf@ in the specification. data PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'Variants = -- | Represents the JSON value @""@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'EmptyString | PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1 PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1 deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'Variants where toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'EmptyString | GHC.Base.otherwise -> case (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'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 object schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_settings.properties.payment_method_options.properties.card.anyOf@ in the specification. data PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1 = PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1 { -- | mandate_options postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions :: (GHC.Maybe.Maybe PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions'), -- | request_three_d_secure postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1RequestThreeDSecure :: (GHC.Maybe.Maybe PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1RequestThreeDSecure') } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1 where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("mandate_options" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("request_three_d_secure" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1RequestThreeDSecure obj) : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("mandate_options" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("request_three_d_secure" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1RequestThreeDSecure obj) : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1 where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1" (\obj -> (GHC.Base.pure PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "mandate_options")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "request_three_d_secure")) -- | Create a new 'PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1' with all required fields. mkPostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1 :: PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1 mkPostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1 = PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1 { postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions = GHC.Maybe.Nothing, postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1RequestThreeDSecure = GHC.Maybe.Nothing } -- | Defines the object schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_settings.properties.payment_method_options.properties.card.anyOf.properties.mandate_options@ in the specification. data PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions' = PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions' { -- | amount postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions'Amount :: (GHC.Maybe.Maybe GHC.Types.Int), -- | amount_type postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions'AmountType :: (GHC.Maybe.Maybe PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions'AmountType'), -- | description -- -- Constraints: -- -- * Maximum length of 200 postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions'Description :: (GHC.Maybe.Maybe Data.Text.Internal.Text) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions' where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("amount" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions'Amount obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("amount_type" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions'AmountType obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("description" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions'Description obj) : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("amount" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions'Amount obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("amount_type" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions'AmountType obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("description" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions'Description obj) : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions'" (\obj -> ((GHC.Base.pure PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "amount")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "amount_type")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "description")) -- | Create a new 'PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions'' with all required fields. mkPostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions' :: PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions' mkPostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions' = PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions' { postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions'Amount = GHC.Maybe.Nothing, postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions'AmountType = GHC.Maybe.Nothing, postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions'Description = GHC.Maybe.Nothing } -- | Defines the enum schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_settings.properties.payment_method_options.properties.card.anyOf.properties.mandate_options.properties.amount_type@ in the specification. data PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions'AmountType' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions'AmountType'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. PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions'AmountType'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"fixed"@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions'AmountType'EnumFixed | -- | Represents the JSON value @"maximum"@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions'AmountType'EnumMaximum deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions'AmountType' where toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions'AmountType'Other val) = val toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions'AmountType'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions'AmountType'EnumFixed) = "fixed" toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions'AmountType'EnumMaximum) = "maximum" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions'AmountType' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "fixed" -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions'AmountType'EnumFixed | val GHC.Classes.== "maximum" -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions'AmountType'EnumMaximum | GHC.Base.otherwise -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1MandateOptions'AmountType'Other val ) -- | Defines the enum schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_settings.properties.payment_method_options.properties.card.anyOf.properties.request_three_d_secure@ in the specification. data PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1RequestThreeDSecure' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1RequestThreeDSecure'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. PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1RequestThreeDSecure'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"any"@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1RequestThreeDSecure'EnumAny | -- | Represents the JSON value @"automatic"@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1RequestThreeDSecure'EnumAutomatic deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1RequestThreeDSecure' where toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1RequestThreeDSecure'Other val) = val toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1RequestThreeDSecure'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1RequestThreeDSecure'EnumAny) = "any" toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1RequestThreeDSecure'EnumAutomatic) = "automatic" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1RequestThreeDSecure' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "any" -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1RequestThreeDSecure'EnumAny | val GHC.Classes.== "automatic" -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1RequestThreeDSecure'EnumAutomatic | GHC.Base.otherwise -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1RequestThreeDSecure'Other val ) -- | Defines the oneOf schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_settings.properties.payment_method_options.properties.card.anyOf@ in the specification. data PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'Variants = -- | Represents the JSON value @""@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'EmptyString | PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1 PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1 deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'Variants where toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'EmptyString | GHC.Base.otherwise -> case (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Card'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 object schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_settings.properties.payment_method_options.properties.customer_balance.anyOf@ in the specification. data PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1 = PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1 { -- | bank_transfer postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer :: (GHC.Maybe.Maybe PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'), -- | funding_type postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1FundingType :: (GHC.Maybe.Maybe Data.Text.Internal.Text) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1 where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("bank_transfer" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("funding_type" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1FundingType obj) : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("bank_transfer" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("funding_type" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1FundingType obj) : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1 where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1" (\obj -> (GHC.Base.pure PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "bank_transfer")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "funding_type")) -- | Create a new 'PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1' with all required fields. mkPostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1 :: PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1 mkPostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1 = PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1 { postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer = GHC.Maybe.Nothing, postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1FundingType = GHC.Maybe.Nothing } -- | Defines the object schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_settings.properties.payment_method_options.properties.customer_balance.anyOf.properties.bank_transfer@ in the specification. data PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer' = PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer' { -- | eu_bank_transfer postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer :: (GHC.Maybe.Maybe PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer'), -- | type postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'Type :: (GHC.Maybe.Maybe Data.Text.Internal.Text) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer' where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("eu_bank_transfer" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("type" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'Type obj) : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("eu_bank_transfer" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("type" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'Type obj) : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'" (\obj -> (GHC.Base.pure PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "eu_bank_transfer")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "type")) -- | Create a new 'PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'' with all required fields. mkPostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer' :: PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer' mkPostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer' = PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer' { postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer = GHC.Maybe.Nothing, postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'Type = GHC.Maybe.Nothing } -- | Defines the object schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_settings.properties.payment_method_options.properties.customer_balance.anyOf.properties.bank_transfer.properties.eu_bank_transfer@ in the specification. data PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer' = PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer' { -- | country -- -- Constraints: -- -- * Maximum length of 5000 postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer'Country :: Data.Text.Internal.Text } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer' where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (["country" Data.Aeson.Types.ToJSON..= postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer'Country obj] : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (["country" Data.Aeson.Types.ToJSON..= postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer'Country obj] : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer'" (\obj -> GHC.Base.pure PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "country")) -- | Create a new 'PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer'' with all required fields. mkPostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer' :: -- | 'postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer'Country' Data.Text.Internal.Text -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer' mkPostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer' postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer'Country = PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer' {postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer'Country = postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer'Country} -- | Defines the oneOf schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_settings.properties.payment_method_options.properties.customer_balance.anyOf@ in the specification. data PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'Variants = -- | Represents the JSON value @""@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'EmptyString | PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1 PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1 deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'Variants where toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'EmptyString | GHC.Base.otherwise -> case (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'CustomerBalance'OneOf1 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a -- | Defines the oneOf schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_settings.properties.payment_method_options.properties.konbini.anyOf@ in the specification. data PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Konbini'Variants = -- | Represents the JSON value @""@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Konbini'EmptyString | PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Konbini'Object Data.Aeson.Types.Internal.Object deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Konbini'Variants where toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Konbini'Object a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Konbini'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Konbini'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Konbini'EmptyString | GHC.Base.otherwise -> case (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'Konbini'Object Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a -- | Defines the object schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_settings.properties.payment_method_options.properties.us_bank_account.anyOf@ in the specification. data PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1 = PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1 { -- | financial_connections postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections :: (GHC.Maybe.Maybe PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'), -- | verification_method postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1VerificationMethod :: (GHC.Maybe.Maybe PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1VerificationMethod') } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1 where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("financial_connections" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("verification_method" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1VerificationMethod obj) : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("financial_connections" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("verification_method" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1VerificationMethod obj) : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1 where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1" (\obj -> (GHC.Base.pure PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "financial_connections")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "verification_method")) -- | Create a new 'PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1' with all required fields. mkPostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1 :: PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1 mkPostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1 = PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1 { postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections = GHC.Maybe.Nothing, postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1VerificationMethod = GHC.Maybe.Nothing } -- | Defines the object schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_settings.properties.payment_method_options.properties.us_bank_account.anyOf.properties.financial_connections@ in the specification. data PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections' = PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections' { -- | permissions postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions :: (GHC.Maybe.Maybe ([PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions'])) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections' where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("permissions" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions obj) : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("permissions" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions obj) : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'" (\obj -> GHC.Base.pure PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "permissions")) -- | Create a new 'PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'' with all required fields. mkPostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections' :: PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections' mkPostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections' = PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections' {postSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions = GHC.Maybe.Nothing} -- | Defines the enum schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_settings.properties.payment_method_options.properties.us_bank_account.anyOf.properties.financial_connections.properties.permissions.items@ in the specification. data PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions'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. PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"balances"@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions'EnumBalances | -- | Represents the JSON value @"ownership"@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions'EnumOwnership | -- | Represents the JSON value @"payment_method"@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions'EnumPaymentMethod | -- | Represents the JSON value @"transactions"@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions'EnumTransactions deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions' where toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions'Other val) = val toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions'EnumBalances) = "balances" toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions'EnumOwnership) = "ownership" toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions'EnumPaymentMethod) = "payment_method" toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions'EnumTransactions) = "transactions" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "balances" -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions'EnumBalances | val GHC.Classes.== "ownership" -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions'EnumOwnership | val GHC.Classes.== "payment_method" -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions'EnumPaymentMethod | val GHC.Classes.== "transactions" -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions'EnumTransactions | GHC.Base.otherwise -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions'Other val ) -- | Defines the enum schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_settings.properties.payment_method_options.properties.us_bank_account.anyOf.properties.verification_method@ in the specification. data PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1VerificationMethod' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1VerificationMethod'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. PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1VerificationMethod'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"automatic"@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1VerificationMethod'EnumAutomatic | -- | Represents the JSON value @"instant"@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1VerificationMethod'EnumInstant | -- | Represents the JSON value @"microdeposits"@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1VerificationMethod'EnumMicrodeposits deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1VerificationMethod' where toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1VerificationMethod'Other val) = val toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1VerificationMethod'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1VerificationMethod'EnumAutomatic) = "automatic" toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1VerificationMethod'EnumInstant) = "instant" toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1VerificationMethod'EnumMicrodeposits) = "microdeposits" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1VerificationMethod' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "automatic" -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1VerificationMethod'EnumAutomatic | val GHC.Classes.== "instant" -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1VerificationMethod'EnumInstant | val GHC.Classes.== "microdeposits" -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1VerificationMethod'EnumMicrodeposits | GHC.Base.otherwise -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1VerificationMethod'Other val ) -- | Defines the oneOf schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_settings.properties.payment_method_options.properties.us_bank_account.anyOf@ in the specification. data PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'Variants = -- | Represents the JSON value @""@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'EmptyString | PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1 PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1 deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'Variants where toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'EmptyString | GHC.Base.otherwise -> case (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodOptions'UsBankAccount'OneOf1 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a -- | Defines the enum schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_settings.properties.payment_method_types.anyOf.items@ in the specification. data PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1 = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1Other Data.Aeson.Types.Internal.Value | -- | This constructor can be used to send values to the server which are not present in the specification yet. PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1Typed Data.Text.Internal.Text | -- | Represents the JSON value @"ach_credit_transfer"@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumAchCreditTransfer | -- | Represents the JSON value @"ach_debit"@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumAchDebit | -- | Represents the JSON value @"acss_debit"@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumAcssDebit | -- | Represents the JSON value @"au_becs_debit"@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumAuBecsDebit | -- | Represents the JSON value @"bacs_debit"@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumBacsDebit | -- | Represents the JSON value @"bancontact"@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumBancontact | -- | Represents the JSON value @"boleto"@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumBoleto | -- | Represents the JSON value @"card"@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumCard | -- | Represents the JSON value @"customer_balance"@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumCustomerBalance | -- | Represents the JSON value @"fpx"@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumFpx | -- | Represents the JSON value @"giropay"@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumGiropay | -- | Represents the JSON value @"grabpay"@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumGrabpay | -- | Represents the JSON value @"ideal"@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumIdeal | -- | Represents the JSON value @"konbini"@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumKonbini | -- | Represents the JSON value @"link"@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumLink | -- | Represents the JSON value @"paynow"@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumPaynow | -- | Represents the JSON value @"promptpay"@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumPromptpay | -- | Represents the JSON value @"sepa_debit"@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumSepaDebit | -- | Represents the JSON value @"sofort"@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumSofort | -- | Represents the JSON value @"us_bank_account"@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumUsBankAccount | -- | Represents the JSON value @"wechat_pay"@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumWechatPay deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1 where toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1Other val) = val toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumAchCreditTransfer) = "ach_credit_transfer" toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumAchDebit) = "ach_debit" toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumAcssDebit) = "acss_debit" toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumAuBecsDebit) = "au_becs_debit" toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumBacsDebit) = "bacs_debit" toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumBancontact) = "bancontact" toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumBoleto) = "boleto" toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumCard) = "card" toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumCustomerBalance) = "customer_balance" toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumFpx) = "fpx" toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumGiropay) = "giropay" toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumGrabpay) = "grabpay" toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumIdeal) = "ideal" toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumKonbini) = "konbini" toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumLink) = "link" toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumPaynow) = "paynow" toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumPromptpay) = "promptpay" toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumSepaDebit) = "sepa_debit" toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumSofort) = "sofort" toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumUsBankAccount) = "us_bank_account" toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumWechatPay) = "wechat_pay" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1 where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "ach_credit_transfer" -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumAchCreditTransfer | val GHC.Classes.== "ach_debit" -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumAchDebit | val GHC.Classes.== "acss_debit" -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumAcssDebit | val GHC.Classes.== "au_becs_debit" -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumAuBecsDebit | val GHC.Classes.== "bacs_debit" -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumBacsDebit | val GHC.Classes.== "bancontact" -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumBancontact | val GHC.Classes.== "boleto" -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumBoleto | val GHC.Classes.== "card" -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumCard | val GHC.Classes.== "customer_balance" -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumCustomerBalance | val GHC.Classes.== "fpx" -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumFpx | val GHC.Classes.== "giropay" -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumGiropay | val GHC.Classes.== "grabpay" -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumGrabpay | val GHC.Classes.== "ideal" -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumIdeal | val GHC.Classes.== "konbini" -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumKonbini | val GHC.Classes.== "link" -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumLink | val GHC.Classes.== "paynow" -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumPaynow | val GHC.Classes.== "promptpay" -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumPromptpay | val GHC.Classes.== "sepa_debit" -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumSepaDebit | val GHC.Classes.== "sofort" -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumSofort | val GHC.Classes.== "us_bank_account" -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumUsBankAccount | val GHC.Classes.== "wechat_pay" -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumWechatPay | GHC.Base.otherwise -> PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1Other val ) -- | Defines the oneOf schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_settings.properties.payment_method_types.anyOf@ in the specification. data PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'Variants = -- | Represents the JSON value @""@ PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'EmptyString | PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'ListTPostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1 ([PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1]) deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'Variants where toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'ListTPostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'EmptyString | GHC.Base.otherwise -> case (PostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'ListTPostSubscriptionsRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a -- | Defines the enum schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_settings.properties.save_default_payment_method@ in the specification. data PostSubscriptionsRequestBodyPaymentSettings'SaveDefaultPaymentMethod' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostSubscriptionsRequestBodyPaymentSettings'SaveDefaultPaymentMethod'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. PostSubscriptionsRequestBodyPaymentSettings'SaveDefaultPaymentMethod'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"off"@ PostSubscriptionsRequestBodyPaymentSettings'SaveDefaultPaymentMethod'EnumOff | -- | Represents the JSON value @"on_subscription"@ PostSubscriptionsRequestBodyPaymentSettings'SaveDefaultPaymentMethod'EnumOnSubscription deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyPaymentSettings'SaveDefaultPaymentMethod' where toJSON (PostSubscriptionsRequestBodyPaymentSettings'SaveDefaultPaymentMethod'Other val) = val toJSON (PostSubscriptionsRequestBodyPaymentSettings'SaveDefaultPaymentMethod'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostSubscriptionsRequestBodyPaymentSettings'SaveDefaultPaymentMethod'EnumOff) = "off" toJSON (PostSubscriptionsRequestBodyPaymentSettings'SaveDefaultPaymentMethod'EnumOnSubscription) = "on_subscription" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyPaymentSettings'SaveDefaultPaymentMethod' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "off" -> PostSubscriptionsRequestBodyPaymentSettings'SaveDefaultPaymentMethod'EnumOff | val GHC.Classes.== "on_subscription" -> PostSubscriptionsRequestBodyPaymentSettings'SaveDefaultPaymentMethod'EnumOnSubscription | GHC.Base.otherwise -> PostSubscriptionsRequestBodyPaymentSettings'SaveDefaultPaymentMethod'Other val ) -- | Defines the object schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.pending_invoice_item_interval.anyOf@ in the specification. data PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1 = PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1 { -- | interval postSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1Interval :: PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1Interval', -- | interval_count postSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1IntervalCount :: (GHC.Maybe.Maybe GHC.Types.Int) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1 where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (["interval" Data.Aeson.Types.ToJSON..= postSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1Interval obj] : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("interval_count" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1IntervalCount obj) : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (["interval" Data.Aeson.Types.ToJSON..= postSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1Interval obj] : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("interval_count" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1IntervalCount obj) : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1 where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1" (\obj -> (GHC.Base.pure PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "interval")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "interval_count")) -- | Create a new 'PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1' with all required fields. mkPostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1 :: -- | 'postSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1Interval' PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1Interval' -> PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1 mkPostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1 postSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1Interval = PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1 { postSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1Interval = postSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1Interval, postSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1IntervalCount = GHC.Maybe.Nothing } -- | Defines the enum schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.pending_invoice_item_interval.anyOf.properties.interval@ in the specification. data PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1Interval' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostSubscriptionsRequestBodyPendingInvoiceItemInterval'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. PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1Interval'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"day"@ PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1Interval'EnumDay | -- | Represents the JSON value @"month"@ PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1Interval'EnumMonth | -- | Represents the JSON value @"week"@ PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1Interval'EnumWeek | -- | Represents the JSON value @"year"@ PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1Interval'EnumYear deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1Interval' where toJSON (PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1Interval'Other val) = val toJSON (PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1Interval'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1Interval'EnumDay) = "day" toJSON (PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1Interval'EnumMonth) = "month" toJSON (PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1Interval'EnumWeek) = "week" toJSON (PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1Interval'EnumYear) = "year" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1Interval' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "day" -> PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1Interval'EnumDay | val GHC.Classes.== "month" -> PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1Interval'EnumMonth | val GHC.Classes.== "week" -> PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1Interval'EnumWeek | val GHC.Classes.== "year" -> PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1Interval'EnumYear | GHC.Base.otherwise -> PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1Interval'Other val ) -- | Defines the oneOf schema located at @paths.\/v1\/subscriptions.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 PostSubscriptionsRequestBodyPendingInvoiceItemInterval'Variants = -- | Represents the JSON value @""@ PostSubscriptionsRequestBodyPendingInvoiceItemInterval'EmptyString | PostSubscriptionsRequestBodyPendingInvoiceItemInterval'PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1 PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1 deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyPendingInvoiceItemInterval'Variants where toJSON (PostSubscriptionsRequestBodyPendingInvoiceItemInterval'PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostSubscriptionsRequestBodyPendingInvoiceItemInterval'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyPendingInvoiceItemInterval'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostSubscriptionsRequestBodyPendingInvoiceItemInterval'EmptyString | GHC.Base.otherwise -> case (PostSubscriptionsRequestBodyPendingInvoiceItemInterval'PostSubscriptionsRequestBodyPendingInvoiceItemInterval'OneOf1 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a -- | Defines the enum schema located at @paths.\/v1\/subscriptions.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) resulting from the \`billing_cycle_anchor\`. If no value is passed, the default is \`create_prorations\`. data PostSubscriptionsRequestBodyProrationBehavior' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostSubscriptionsRequestBodyProrationBehavior'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. PostSubscriptionsRequestBodyProrationBehavior'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"always_invoice"@ PostSubscriptionsRequestBodyProrationBehavior'EnumAlwaysInvoice | -- | Represents the JSON value @"create_prorations"@ PostSubscriptionsRequestBodyProrationBehavior'EnumCreateProrations | -- | Represents the JSON value @"none"@ PostSubscriptionsRequestBodyProrationBehavior'EnumNone deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyProrationBehavior' where toJSON (PostSubscriptionsRequestBodyProrationBehavior'Other val) = val toJSON (PostSubscriptionsRequestBodyProrationBehavior'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostSubscriptionsRequestBodyProrationBehavior'EnumAlwaysInvoice) = "always_invoice" toJSON (PostSubscriptionsRequestBodyProrationBehavior'EnumCreateProrations) = "create_prorations" toJSON (PostSubscriptionsRequestBodyProrationBehavior'EnumNone) = "none" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyProrationBehavior' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "always_invoice" -> PostSubscriptionsRequestBodyProrationBehavior'EnumAlwaysInvoice | val GHC.Classes.== "create_prorations" -> PostSubscriptionsRequestBodyProrationBehavior'EnumCreateProrations | val GHC.Classes.== "none" -> PostSubscriptionsRequestBodyProrationBehavior'EnumNone | GHC.Base.otherwise -> PostSubscriptionsRequestBodyProrationBehavior'Other val ) -- | Defines the object schema located at @paths.\/v1\/subscriptions.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.transfer_data@ 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. data PostSubscriptionsRequestBodyTransferData' = PostSubscriptionsRequestBodyTransferData' { -- | amount_percent postSubscriptionsRequestBodyTransferData'AmountPercent :: (GHC.Maybe.Maybe GHC.Types.Double), -- | destination postSubscriptionsRequestBodyTransferData'Destination :: Data.Text.Internal.Text } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyTransferData' where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("amount_percent" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyTransferData'AmountPercent obj) : ["destination" Data.Aeson.Types.ToJSON..= postSubscriptionsRequestBodyTransferData'Destination obj] : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("amount_percent" Data.Aeson.Types.ToJSON..=)) (postSubscriptionsRequestBodyTransferData'AmountPercent obj) : ["destination" Data.Aeson.Types.ToJSON..= postSubscriptionsRequestBodyTransferData'Destination obj] : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyTransferData' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionsRequestBodyTransferData'" (\obj -> (GHC.Base.pure PostSubscriptionsRequestBodyTransferData' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "amount_percent")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "destination")) -- | Create a new 'PostSubscriptionsRequestBodyTransferData'' with all required fields. mkPostSubscriptionsRequestBodyTransferData' :: -- | 'postSubscriptionsRequestBodyTransferData'Destination' Data.Text.Internal.Text -> PostSubscriptionsRequestBodyTransferData' mkPostSubscriptionsRequestBodyTransferData' postSubscriptionsRequestBodyTransferData'Destination = PostSubscriptionsRequestBodyTransferData' { postSubscriptionsRequestBodyTransferData'AmountPercent = GHC.Maybe.Nothing, postSubscriptionsRequestBodyTransferData'Destination = postSubscriptionsRequestBodyTransferData'Destination } -- | Defines the oneOf schema located at @paths.\/v1\/subscriptions.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\`. See [Using trial periods on subscriptions](https:\/\/stripe.com\/docs\/billing\/subscriptions\/trials) to learn more. data PostSubscriptionsRequestBodyTrialEnd'Variants = -- | Represents the JSON value @"now"@ PostSubscriptionsRequestBodyTrialEnd'Now | PostSubscriptionsRequestBodyTrialEnd'Int GHC.Types.Int deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionsRequestBodyTrialEnd'Variants where toJSON (PostSubscriptionsRequestBodyTrialEnd'Int a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostSubscriptionsRequestBodyTrialEnd'Now) = "now" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionsRequestBodyTrialEnd'Variants where parseJSON val = if | val GHC.Classes.== "now" -> GHC.Base.pure PostSubscriptionsRequestBodyTrialEnd'Now | GHC.Base.otherwise -> case (PostSubscriptionsRequestBodyTrialEnd'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 'postSubscriptions'. -- -- The response constructor is chosen by the status code of the response. If no case matches (no specific case for the response code, no range case, no default case), 'PostSubscriptionsResponseError' is used. data PostSubscriptionsResponse = -- | Means either no matching case available or a parse error PostSubscriptionsResponseError GHC.Base.String | -- | Successful response. PostSubscriptionsResponse200 Subscription | -- | Error response. PostSubscriptionsResponseDefault Error deriving (GHC.Show.Show, GHC.Classes.Eq)