{-# 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 postSubscriptionSchedulesSchedule module StripeAPI.Operations.PostSubscriptionSchedulesSchedule where import qualified Control.Monad.Fail import qualified Control.Monad.Trans.Reader import qualified Data.Aeson import qualified Data.Aeson as Data.Aeson.Encoding.Internal import qualified Data.Aeson as Data.Aeson.Types import qualified Data.Aeson as Data.Aeson.Types.FromJSON import qualified Data.Aeson as Data.Aeson.Types.Internal import qualified Data.Aeson as Data.Aeson.Types.ToJSON import qualified Data.ByteString.Char8 import qualified Data.ByteString.Char8 as Data.ByteString.Internal import qualified Data.Either import qualified Data.Functor import qualified Data.Scientific import qualified Data.Text import qualified Data.Text.Internal import qualified Data.Time.Calendar as Data.Time.Calendar.Days import qualified Data.Time.LocalTime as Data.Time.LocalTime.Internal.ZonedTime import qualified Data.Vector import qualified GHC.Base import qualified GHC.Classes import qualified GHC.Int import qualified GHC.Show import qualified GHC.Types import qualified Network.HTTP.Client import qualified Network.HTTP.Client as Network.HTTP.Client.Request import qualified Network.HTTP.Client as Network.HTTP.Client.Types import qualified Network.HTTP.Simple import qualified Network.HTTP.Types import qualified Network.HTTP.Types as Network.HTTP.Types.Status import qualified Network.HTTP.Types as Network.HTTP.Types.URI import qualified StripeAPI.Common import StripeAPI.Types import qualified Prelude as GHC.Integer.Type import qualified Prelude as GHC.Maybe -- | > POST /v1/subscription_schedules/{schedule} -- -- \

Updates an existing subscription schedule.\<\/p> postSubscriptionSchedulesSchedule :: forall m. StripeAPI.Common.MonadHTTP m => -- | schedule | Constraints: Maximum length of 5000 Data.Text.Internal.Text -> -- | The request body to send GHC.Maybe.Maybe PostSubscriptionSchedulesScheduleRequestBody -> -- | Monadic computation which returns the result of the operation StripeAPI.Common.ClientT m (Network.HTTP.Client.Types.Response PostSubscriptionSchedulesScheduleResponse) postSubscriptionSchedulesSchedule schedule body = GHC.Base.fmap ( \response_0 -> GHC.Base.fmap ( Data.Either.either PostSubscriptionSchedulesScheduleResponseError 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) -> PostSubscriptionSchedulesScheduleResponse200 Data.Functor.<$> ( Data.Aeson.eitherDecodeStrict body :: Data.Either.Either GHC.Base.String SubscriptionSchedule ) | GHC.Base.const GHC.Types.True (Network.HTTP.Client.Types.responseStatus response) -> PostSubscriptionSchedulesScheduleResponseDefault 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/subscription_schedules/" GHC.Base.++ (Data.ByteString.Char8.unpack (Network.HTTP.Types.URI.urlEncode GHC.Types.True GHC.Base.$ (Data.ByteString.Char8.pack GHC.Base.$ StripeAPI.Common.stringifyModel schedule)) GHC.Base.++ ""))) GHC.Base.mempty body StripeAPI.Common.RequestBodyEncodingFormData) -- | Defines the object schema located at @paths.\/v1\/subscription_schedules\/{schedule}.POST.requestBody.content.application\/x-www-form-urlencoded.schema@ in the specification. data PostSubscriptionSchedulesScheduleRequestBody = PostSubscriptionSchedulesScheduleRequestBody { -- | default_settings: Object representing the subscription schedule\'s default settings. postSubscriptionSchedulesScheduleRequestBodyDefaultSettings :: (GHC.Maybe.Maybe PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'), -- | end_behavior: Configures how the subscription schedule behaves when it ends. Possible values are \`release\` or \`cancel\` with the default being \`release\`. \`release\` will end the subscription schedule and keep the underlying subscription running.\`cancel\` will end the subscription schedule and cancel the underlying subscription. postSubscriptionSchedulesScheduleRequestBodyEndBehavior :: (GHC.Maybe.Maybe PostSubscriptionSchedulesScheduleRequestBodyEndBehavior'), -- | expand: Specifies which fields in the response should be expanded. postSubscriptionSchedulesScheduleRequestBodyExpand :: (GHC.Maybe.Maybe ([Data.Text.Internal.Text])), -- | 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\`. postSubscriptionSchedulesScheduleRequestBodyMetadata :: (GHC.Maybe.Maybe PostSubscriptionSchedulesScheduleRequestBodyMetadata'Variants), -- | phases: List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the \`end_date\` of one phase will always equal the \`start_date\` of the next phase. Note that past phases can be omitted. postSubscriptionSchedulesScheduleRequestBodyPhases :: (GHC.Maybe.Maybe ([PostSubscriptionSchedulesScheduleRequestBodyPhases'])), -- | proration_behavior: If the update changes the current phase, indicates if the changes should be prorated. Possible values are \`create_prorations\` or \`none\`, and the default value is \`create_prorations\`. postSubscriptionSchedulesScheduleRequestBodyProrationBehavior :: (GHC.Maybe.Maybe PostSubscriptionSchedulesScheduleRequestBodyProrationBehavior') } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionSchedulesScheduleRequestBody where toJSON obj = Data.Aeson.Types.Internal.object ("default_settings" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyDefaultSettings obj : "end_behavior" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyEndBehavior obj : "expand" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyExpand obj : "metadata" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyMetadata obj : "phases" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases obj : "proration_behavior" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyProrationBehavior obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("default_settings" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyDefaultSettings obj) GHC.Base.<> (("end_behavior" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyEndBehavior obj) GHC.Base.<> (("expand" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyExpand obj) GHC.Base.<> (("metadata" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyMetadata obj) GHC.Base.<> (("phases" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases obj) GHC.Base.<> ("proration_behavior" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyProrationBehavior obj)))))) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionSchedulesScheduleRequestBody where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionSchedulesScheduleRequestBody" (\obj -> (((((GHC.Base.pure PostSubscriptionSchedulesScheduleRequestBody GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "default_settings")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "end_behavior")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "expand")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "metadata")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "phases")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "proration_behavior")) -- | Create a new 'PostSubscriptionSchedulesScheduleRequestBody' with all required fields. mkPostSubscriptionSchedulesScheduleRequestBody :: PostSubscriptionSchedulesScheduleRequestBody mkPostSubscriptionSchedulesScheduleRequestBody = PostSubscriptionSchedulesScheduleRequestBody { postSubscriptionSchedulesScheduleRequestBodyDefaultSettings = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyEndBehavior = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyExpand = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyMetadata = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyPhases = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyProrationBehavior = GHC.Maybe.Nothing } -- | Defines the object schema located at @paths.\/v1\/subscription_schedules\/{schedule}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.default_settings@ in the specification. -- -- Object representing the subscription schedule\'s default settings. data PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings' = PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings' { -- | application_fee_percent postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'ApplicationFeePercent :: (GHC.Maybe.Maybe GHC.Types.Double), -- | automatic_tax postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'AutomaticTax :: (GHC.Maybe.Maybe PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'AutomaticTax'), -- | billing_cycle_anchor postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingCycleAnchor :: (GHC.Maybe.Maybe PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingCycleAnchor'), -- | billing_thresholds postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingThresholds :: (GHC.Maybe.Maybe PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingThresholds'Variants), -- | collection_method postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'CollectionMethod :: (GHC.Maybe.Maybe PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'CollectionMethod'), -- | default_payment_method -- -- Constraints: -- -- * Maximum length of 5000 postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'DefaultPaymentMethod :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | invoice_settings postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'InvoiceSettings :: (GHC.Maybe.Maybe PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'InvoiceSettings'), -- | transfer_data postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'TransferData :: (GHC.Maybe.Maybe PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'TransferData'Variants) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings' where toJSON obj = Data.Aeson.Types.Internal.object ("application_fee_percent" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'ApplicationFeePercent obj : "automatic_tax" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'AutomaticTax obj : "billing_cycle_anchor" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingCycleAnchor obj : "billing_thresholds" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingThresholds obj : "collection_method" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'CollectionMethod obj : "default_payment_method" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'DefaultPaymentMethod obj : "invoice_settings" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'InvoiceSettings obj : "transfer_data" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'TransferData obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("application_fee_percent" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'ApplicationFeePercent obj) GHC.Base.<> (("automatic_tax" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'AutomaticTax obj) GHC.Base.<> (("billing_cycle_anchor" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingCycleAnchor obj) GHC.Base.<> (("billing_thresholds" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingThresholds obj) GHC.Base.<> (("collection_method" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'CollectionMethod obj) GHC.Base.<> (("default_payment_method" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'DefaultPaymentMethod obj) GHC.Base.<> (("invoice_settings" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'InvoiceSettings obj) GHC.Base.<> ("transfer_data" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'TransferData obj)))))))) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'" (\obj -> (((((((GHC.Base.pure PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "application_fee_percent")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "automatic_tax")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "billing_cycle_anchor")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "billing_thresholds")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "collection_method")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "default_payment_method")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "invoice_settings")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "transfer_data")) -- | Create a new 'PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'' with all required fields. mkPostSubscriptionSchedulesScheduleRequestBodyDefaultSettings' :: PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings' mkPostSubscriptionSchedulesScheduleRequestBodyDefaultSettings' = PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings' { postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'ApplicationFeePercent = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'AutomaticTax = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingCycleAnchor = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingThresholds = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'CollectionMethod = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'DefaultPaymentMethod = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'InvoiceSettings = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'TransferData = GHC.Maybe.Nothing } -- | Defines the object schema located at @paths.\/v1\/subscription_schedules\/{schedule}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.default_settings.properties.automatic_tax@ in the specification. data PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'AutomaticTax' = PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'AutomaticTax' { -- | enabled postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'AutomaticTax'Enabled :: GHC.Types.Bool } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'AutomaticTax' where toJSON obj = Data.Aeson.Types.Internal.object ("enabled" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'AutomaticTax'Enabled obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs ("enabled" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'AutomaticTax'Enabled obj) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'AutomaticTax' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'AutomaticTax'" (\obj -> GHC.Base.pure PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'AutomaticTax' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "enabled")) -- | Create a new 'PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'AutomaticTax'' with all required fields. mkPostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'AutomaticTax' :: -- | 'postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'AutomaticTax'Enabled' GHC.Types.Bool -> PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'AutomaticTax' mkPostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'AutomaticTax' postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'AutomaticTax'Enabled = PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'AutomaticTax' {postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'AutomaticTax'Enabled = postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'AutomaticTax'Enabled} -- | Defines the enum schema located at @paths.\/v1\/subscription_schedules\/{schedule}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.default_settings.properties.billing_cycle_anchor@ in the specification. data PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingCycleAnchor' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingCycleAnchor'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. PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingCycleAnchor'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"automatic"@ PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingCycleAnchor'EnumAutomatic | -- | Represents the JSON value @"phase_start"@ PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingCycleAnchor'EnumPhaseStart deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingCycleAnchor' where toJSON (PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingCycleAnchor'Other val) = val toJSON (PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingCycleAnchor'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingCycleAnchor'EnumAutomatic) = "automatic" toJSON (PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingCycleAnchor'EnumPhaseStart) = "phase_start" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingCycleAnchor' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "automatic" -> PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingCycleAnchor'EnumAutomatic | val GHC.Classes.== "phase_start" -> PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingCycleAnchor'EnumPhaseStart | GHC.Base.otherwise -> PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingCycleAnchor'Other val ) -- | Defines the object schema located at @paths.\/v1\/subscription_schedules\/{schedule}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.default_settings.properties.billing_thresholds.anyOf@ in the specification. data PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingThresholds'OneOf1 = PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingThresholds'OneOf1 { -- | amount_gte postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingThresholds'OneOf1AmountGte :: (GHC.Maybe.Maybe GHC.Types.Int), -- | reset_billing_cycle_anchor postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingThresholds'OneOf1ResetBillingCycleAnchor :: (GHC.Maybe.Maybe GHC.Types.Bool) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingThresholds'OneOf1 where toJSON obj = Data.Aeson.Types.Internal.object ("amount_gte" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingThresholds'OneOf1AmountGte obj : "reset_billing_cycle_anchor" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingThresholds'OneOf1ResetBillingCycleAnchor obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("amount_gte" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingThresholds'OneOf1AmountGte obj) GHC.Base.<> ("reset_billing_cycle_anchor" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingThresholds'OneOf1ResetBillingCycleAnchor obj)) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingThresholds'OneOf1 where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingThresholds'OneOf1" (\obj -> (GHC.Base.pure PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingThresholds'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "amount_gte")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "reset_billing_cycle_anchor")) -- | Create a new 'PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingThresholds'OneOf1' with all required fields. mkPostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingThresholds'OneOf1 :: PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingThresholds'OneOf1 mkPostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingThresholds'OneOf1 = PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingThresholds'OneOf1 { postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingThresholds'OneOf1AmountGte = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingThresholds'OneOf1ResetBillingCycleAnchor = GHC.Maybe.Nothing } -- | Defines the oneOf schema located at @paths.\/v1\/subscription_schedules\/{schedule}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.default_settings.properties.billing_thresholds.anyOf@ in the specification. data PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingThresholds'Variants = -- | Represents the JSON value @""@ PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingThresholds'EmptyString | PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingThresholds'PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingThresholds'OneOf1 PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingThresholds'OneOf1 deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingThresholds'Variants where toJSON (PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingThresholds'PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingThresholds'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingThresholds'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingThresholds'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingThresholds'EmptyString | GHC.Base.otherwise -> case (PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'BillingThresholds'PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'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 enum schema located at @paths.\/v1\/subscription_schedules\/{schedule}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.default_settings.properties.collection_method@ in the specification. data PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'CollectionMethod' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'CollectionMethod'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. PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'CollectionMethod'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"charge_automatically"@ PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'CollectionMethod'EnumChargeAutomatically | -- | Represents the JSON value @"send_invoice"@ PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'CollectionMethod'EnumSendInvoice deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'CollectionMethod' where toJSON (PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'CollectionMethod'Other val) = val toJSON (PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'CollectionMethod'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'CollectionMethod'EnumChargeAutomatically) = "charge_automatically" toJSON (PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'CollectionMethod'EnumSendInvoice) = "send_invoice" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'CollectionMethod' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "charge_automatically" -> PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'CollectionMethod'EnumChargeAutomatically | val GHC.Classes.== "send_invoice" -> PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'CollectionMethod'EnumSendInvoice | GHC.Base.otherwise -> PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'CollectionMethod'Other val ) -- | Defines the object schema located at @paths.\/v1\/subscription_schedules\/{schedule}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.default_settings.properties.invoice_settings@ in the specification. data PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'InvoiceSettings' = PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'InvoiceSettings' { -- | days_until_due postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'InvoiceSettings'DaysUntilDue :: (GHC.Maybe.Maybe GHC.Types.Int) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'InvoiceSettings' where toJSON obj = Data.Aeson.Types.Internal.object ("days_until_due" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'InvoiceSettings'DaysUntilDue obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs ("days_until_due" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'InvoiceSettings'DaysUntilDue obj) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'InvoiceSettings' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'InvoiceSettings'" (\obj -> GHC.Base.pure PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'InvoiceSettings' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "days_until_due")) -- | Create a new 'PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'InvoiceSettings'' with all required fields. mkPostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'InvoiceSettings' :: PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'InvoiceSettings' mkPostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'InvoiceSettings' = PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'InvoiceSettings' {postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'InvoiceSettings'DaysUntilDue = GHC.Maybe.Nothing} -- | Defines the object schema located at @paths.\/v1\/subscription_schedules\/{schedule}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.default_settings.properties.transfer_data.anyOf@ in the specification. data PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'TransferData'OneOf1 = PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'TransferData'OneOf1 { -- | amount_percent postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'TransferData'OneOf1AmountPercent :: (GHC.Maybe.Maybe GHC.Types.Double), -- | destination postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'TransferData'OneOf1Destination :: Data.Text.Internal.Text } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'TransferData'OneOf1 where toJSON obj = Data.Aeson.Types.Internal.object ("amount_percent" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'TransferData'OneOf1AmountPercent obj : "destination" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'TransferData'OneOf1Destination obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("amount_percent" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'TransferData'OneOf1AmountPercent obj) GHC.Base.<> ("destination" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'TransferData'OneOf1Destination obj)) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'TransferData'OneOf1 where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'TransferData'OneOf1" (\obj -> (GHC.Base.pure PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'TransferData'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "amount_percent")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "destination")) -- | Create a new 'PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'TransferData'OneOf1' with all required fields. mkPostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'TransferData'OneOf1 :: -- | 'postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'TransferData'OneOf1Destination' Data.Text.Internal.Text -> PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'TransferData'OneOf1 mkPostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'TransferData'OneOf1 postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'TransferData'OneOf1Destination = PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'TransferData'OneOf1 { postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'TransferData'OneOf1AmountPercent = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'TransferData'OneOf1Destination = postSubscriptionSchedulesScheduleRequestBodyDefaultSettings'TransferData'OneOf1Destination } -- | Defines the oneOf schema located at @paths.\/v1\/subscription_schedules\/{schedule}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.default_settings.properties.transfer_data.anyOf@ in the specification. data PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'TransferData'Variants = -- | Represents the JSON value @""@ PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'TransferData'EmptyString | PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'TransferData'PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'TransferData'OneOf1 PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'TransferData'OneOf1 deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'TransferData'Variants where toJSON (PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'TransferData'PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'TransferData'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'TransferData'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'TransferData'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'TransferData'EmptyString | GHC.Base.otherwise -> case (PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'TransferData'PostSubscriptionSchedulesScheduleRequestBodyDefaultSettings'TransferData'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\/subscription_schedules\/{schedule}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.end_behavior@ in the specification. -- -- Configures how the subscription schedule behaves when it ends. Possible values are \`release\` or \`cancel\` with the default being \`release\`. \`release\` will end the subscription schedule and keep the underlying subscription running.\`cancel\` will end the subscription schedule and cancel the underlying subscription. data PostSubscriptionSchedulesScheduleRequestBodyEndBehavior' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostSubscriptionSchedulesScheduleRequestBodyEndBehavior'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. PostSubscriptionSchedulesScheduleRequestBodyEndBehavior'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"cancel"@ PostSubscriptionSchedulesScheduleRequestBodyEndBehavior'EnumCancel | -- | Represents the JSON value @"none"@ PostSubscriptionSchedulesScheduleRequestBodyEndBehavior'EnumNone | -- | Represents the JSON value @"release"@ PostSubscriptionSchedulesScheduleRequestBodyEndBehavior'EnumRelease | -- | Represents the JSON value @"renew"@ PostSubscriptionSchedulesScheduleRequestBodyEndBehavior'EnumRenew deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionSchedulesScheduleRequestBodyEndBehavior' where toJSON (PostSubscriptionSchedulesScheduleRequestBodyEndBehavior'Other val) = val toJSON (PostSubscriptionSchedulesScheduleRequestBodyEndBehavior'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostSubscriptionSchedulesScheduleRequestBodyEndBehavior'EnumCancel) = "cancel" toJSON (PostSubscriptionSchedulesScheduleRequestBodyEndBehavior'EnumNone) = "none" toJSON (PostSubscriptionSchedulesScheduleRequestBodyEndBehavior'EnumRelease) = "release" toJSON (PostSubscriptionSchedulesScheduleRequestBodyEndBehavior'EnumRenew) = "renew" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionSchedulesScheduleRequestBodyEndBehavior' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "cancel" -> PostSubscriptionSchedulesScheduleRequestBodyEndBehavior'EnumCancel | val GHC.Classes.== "none" -> PostSubscriptionSchedulesScheduleRequestBodyEndBehavior'EnumNone | val GHC.Classes.== "release" -> PostSubscriptionSchedulesScheduleRequestBodyEndBehavior'EnumRelease | val GHC.Classes.== "renew" -> PostSubscriptionSchedulesScheduleRequestBodyEndBehavior'EnumRenew | GHC.Base.otherwise -> PostSubscriptionSchedulesScheduleRequestBodyEndBehavior'Other val ) -- | Defines the oneOf schema located at @paths.\/v1\/subscription_schedules\/{schedule}.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 PostSubscriptionSchedulesScheduleRequestBodyMetadata'Variants = -- | Represents the JSON value @""@ PostSubscriptionSchedulesScheduleRequestBodyMetadata'EmptyString | PostSubscriptionSchedulesScheduleRequestBodyMetadata'Object Data.Aeson.Types.Internal.Object deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionSchedulesScheduleRequestBodyMetadata'Variants where toJSON (PostSubscriptionSchedulesScheduleRequestBodyMetadata'Object a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostSubscriptionSchedulesScheduleRequestBodyMetadata'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionSchedulesScheduleRequestBodyMetadata'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostSubscriptionSchedulesScheduleRequestBodyMetadata'EmptyString | GHC.Base.otherwise -> case (PostSubscriptionSchedulesScheduleRequestBodyMetadata'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\/subscription_schedules\/{schedule}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.phases.items@ in the specification. data PostSubscriptionSchedulesScheduleRequestBodyPhases' = PostSubscriptionSchedulesScheduleRequestBodyPhases' { -- | add_invoice_items postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems :: (GHC.Maybe.Maybe ([PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'])), -- | application_fee_percent postSubscriptionSchedulesScheduleRequestBodyPhases'ApplicationFeePercent :: (GHC.Maybe.Maybe GHC.Types.Double), -- | automatic_tax postSubscriptionSchedulesScheduleRequestBodyPhases'AutomaticTax :: (GHC.Maybe.Maybe PostSubscriptionSchedulesScheduleRequestBodyPhases'AutomaticTax'), -- | billing_cycle_anchor postSubscriptionSchedulesScheduleRequestBodyPhases'BillingCycleAnchor :: (GHC.Maybe.Maybe PostSubscriptionSchedulesScheduleRequestBodyPhases'BillingCycleAnchor'), -- | billing_thresholds postSubscriptionSchedulesScheduleRequestBodyPhases'BillingThresholds :: (GHC.Maybe.Maybe PostSubscriptionSchedulesScheduleRequestBodyPhases'BillingThresholds'Variants), -- | collection_method postSubscriptionSchedulesScheduleRequestBodyPhases'CollectionMethod :: (GHC.Maybe.Maybe PostSubscriptionSchedulesScheduleRequestBodyPhases'CollectionMethod'), -- | coupon -- -- Constraints: -- -- * Maximum length of 5000 postSubscriptionSchedulesScheduleRequestBodyPhases'Coupon :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | default_payment_method -- -- Constraints: -- -- * Maximum length of 5000 postSubscriptionSchedulesScheduleRequestBodyPhases'DefaultPaymentMethod :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | default_tax_rates postSubscriptionSchedulesScheduleRequestBodyPhases'DefaultTaxRates :: (GHC.Maybe.Maybe PostSubscriptionSchedulesScheduleRequestBodyPhases'DefaultTaxRates'Variants), -- | end_date postSubscriptionSchedulesScheduleRequestBodyPhases'EndDate :: (GHC.Maybe.Maybe PostSubscriptionSchedulesScheduleRequestBodyPhases'EndDate'Variants), -- | invoice_settings postSubscriptionSchedulesScheduleRequestBodyPhases'InvoiceSettings :: (GHC.Maybe.Maybe PostSubscriptionSchedulesScheduleRequestBodyPhases'InvoiceSettings'), -- | items postSubscriptionSchedulesScheduleRequestBodyPhases'Items :: ([PostSubscriptionSchedulesScheduleRequestBodyPhases'Items']), -- | iterations postSubscriptionSchedulesScheduleRequestBodyPhases'Iterations :: (GHC.Maybe.Maybe GHC.Types.Int), -- | proration_behavior postSubscriptionSchedulesScheduleRequestBodyPhases'ProrationBehavior :: (GHC.Maybe.Maybe PostSubscriptionSchedulesScheduleRequestBodyPhases'ProrationBehavior'), -- | start_date postSubscriptionSchedulesScheduleRequestBodyPhases'StartDate :: (GHC.Maybe.Maybe PostSubscriptionSchedulesScheduleRequestBodyPhases'StartDate'Variants), -- | transfer_data postSubscriptionSchedulesScheduleRequestBodyPhases'TransferData :: (GHC.Maybe.Maybe PostSubscriptionSchedulesScheduleRequestBodyPhases'TransferData'), -- | trial postSubscriptionSchedulesScheduleRequestBodyPhases'Trial :: (GHC.Maybe.Maybe GHC.Types.Bool), -- | trial_end postSubscriptionSchedulesScheduleRequestBodyPhases'TrialEnd :: (GHC.Maybe.Maybe PostSubscriptionSchedulesScheduleRequestBodyPhases'TrialEnd'Variants) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionSchedulesScheduleRequestBodyPhases' where toJSON obj = Data.Aeson.Types.Internal.object ("add_invoice_items" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems obj : "application_fee_percent" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'ApplicationFeePercent obj : "automatic_tax" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'AutomaticTax obj : "billing_cycle_anchor" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'BillingCycleAnchor obj : "billing_thresholds" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'BillingThresholds obj : "collection_method" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'CollectionMethod obj : "coupon" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'Coupon obj : "default_payment_method" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'DefaultPaymentMethod obj : "default_tax_rates" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'DefaultTaxRates obj : "end_date" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'EndDate obj : "invoice_settings" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'InvoiceSettings obj : "items" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'Items obj : "iterations" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'Iterations obj : "proration_behavior" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'ProrationBehavior obj : "start_date" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'StartDate obj : "transfer_data" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'TransferData obj : "trial" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'Trial obj : "trial_end" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'TrialEnd obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("add_invoice_items" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems obj) GHC.Base.<> (("application_fee_percent" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'ApplicationFeePercent obj) GHC.Base.<> (("automatic_tax" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'AutomaticTax obj) GHC.Base.<> (("billing_cycle_anchor" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'BillingCycleAnchor obj) GHC.Base.<> (("billing_thresholds" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'BillingThresholds obj) GHC.Base.<> (("collection_method" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'CollectionMethod obj) GHC.Base.<> (("coupon" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'Coupon obj) GHC.Base.<> (("default_payment_method" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'DefaultPaymentMethod obj) GHC.Base.<> (("default_tax_rates" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'DefaultTaxRates obj) GHC.Base.<> (("end_date" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'EndDate obj) GHC.Base.<> (("invoice_settings" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'InvoiceSettings obj) GHC.Base.<> (("items" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'Items obj) GHC.Base.<> (("iterations" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'Iterations obj) GHC.Base.<> (("proration_behavior" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'ProrationBehavior obj) GHC.Base.<> (("start_date" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'StartDate obj) GHC.Base.<> (("transfer_data" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'TransferData obj) GHC.Base.<> (("trial" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'Trial obj) GHC.Base.<> ("trial_end" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'TrialEnd obj)))))))))))))))))) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionSchedulesScheduleRequestBodyPhases' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionSchedulesScheduleRequestBodyPhases'" (\obj -> (((((((((((((((((GHC.Base.pure PostSubscriptionSchedulesScheduleRequestBodyPhases' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "add_invoice_items")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "application_fee_percent")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "automatic_tax")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "billing_cycle_anchor")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "billing_thresholds")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "collection_method")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "coupon")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "default_payment_method")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "default_tax_rates")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "end_date")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "invoice_settings")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "items")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "iterations")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "proration_behavior")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "start_date")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "transfer_data")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "trial")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "trial_end")) -- | Create a new 'PostSubscriptionSchedulesScheduleRequestBodyPhases'' with all required fields. mkPostSubscriptionSchedulesScheduleRequestBodyPhases' :: -- | 'postSubscriptionSchedulesScheduleRequestBodyPhases'Items' [PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'] -> PostSubscriptionSchedulesScheduleRequestBodyPhases' mkPostSubscriptionSchedulesScheduleRequestBodyPhases' postSubscriptionSchedulesScheduleRequestBodyPhases'Items = PostSubscriptionSchedulesScheduleRequestBodyPhases' { postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyPhases'ApplicationFeePercent = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyPhases'AutomaticTax = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyPhases'BillingCycleAnchor = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyPhases'BillingThresholds = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyPhases'CollectionMethod = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyPhases'Coupon = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyPhases'DefaultPaymentMethod = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyPhases'DefaultTaxRates = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyPhases'EndDate = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyPhases'InvoiceSettings = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyPhases'Items = postSubscriptionSchedulesScheduleRequestBodyPhases'Items, postSubscriptionSchedulesScheduleRequestBodyPhases'Iterations = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyPhases'ProrationBehavior = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyPhases'StartDate = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyPhases'TransferData = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyPhases'Trial = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyPhases'TrialEnd = GHC.Maybe.Nothing } -- | Defines the object schema located at @paths.\/v1\/subscription_schedules\/{schedule}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.phases.items.properties.add_invoice_items.items@ in the specification. data PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems' = PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems' { -- | price -- -- Constraints: -- -- * Maximum length of 5000 postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'Price :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | price_data postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData :: (GHC.Maybe.Maybe PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'), -- | quantity postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'Quantity :: (GHC.Maybe.Maybe GHC.Types.Int), -- | tax_rates postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'TaxRates :: (GHC.Maybe.Maybe PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'TaxRates'Variants) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems' where toJSON obj = Data.Aeson.Types.Internal.object ("price" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'Price obj : "price_data" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData obj : "quantity" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'Quantity obj : "tax_rates" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'TaxRates obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("price" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'Price obj) GHC.Base.<> (("price_data" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData obj) GHC.Base.<> (("quantity" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'Quantity obj) GHC.Base.<> ("tax_rates" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'TaxRates obj)))) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'" (\obj -> (((GHC.Base.pure PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems' 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 'PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'' with all required fields. mkPostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems' :: PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems' mkPostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems' = PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems' { postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'Price = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'Quantity = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'TaxRates = GHC.Maybe.Nothing } -- | Defines the object schema located at @paths.\/v1\/subscription_schedules\/{schedule}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.phases.items.properties.add_invoice_items.items.properties.price_data@ in the specification. data PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData' = PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData' { -- | currency postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'Currency :: Data.Text.Internal.Text, -- | product -- -- Constraints: -- -- * Maximum length of 5000 postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'Product :: Data.Text.Internal.Text, -- | tax_behavior postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'TaxBehavior :: (GHC.Maybe.Maybe PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'TaxBehavior'), -- | unit_amount postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'UnitAmount :: (GHC.Maybe.Maybe GHC.Types.Int), -- | unit_amount_decimal postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'UnitAmountDecimal :: (GHC.Maybe.Maybe Data.Text.Internal.Text) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData' where toJSON obj = Data.Aeson.Types.Internal.object ("currency" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'Currency obj : "product" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'Product obj : "tax_behavior" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'TaxBehavior obj : "unit_amount" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'UnitAmount obj : "unit_amount_decimal" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'UnitAmountDecimal obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("currency" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'Currency obj) GHC.Base.<> (("product" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'Product obj) GHC.Base.<> (("tax_behavior" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'TaxBehavior obj) GHC.Base.<> (("unit_amount" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'UnitAmount obj) GHC.Base.<> ("unit_amount_decimal" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'UnitAmountDecimal obj))))) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'" (\obj -> ((((GHC.Base.pure PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'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 'PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'' with all required fields. mkPostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData' :: -- | 'postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'Currency' Data.Text.Internal.Text -> -- | 'postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'Product' Data.Text.Internal.Text -> PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData' mkPostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData' postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'Currency postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'Product = PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData' { postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'Currency = postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'Currency, postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'Product = postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'Product, postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'TaxBehavior = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'UnitAmount = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'UnitAmountDecimal = GHC.Maybe.Nothing } -- | Defines the enum schema located at @paths.\/v1\/subscription_schedules\/{schedule}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.phases.items.properties.add_invoice_items.items.properties.price_data.properties.tax_behavior@ in the specification. data PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'TaxBehavior' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'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. PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'TaxBehavior'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"exclusive"@ PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'TaxBehavior'EnumExclusive | -- | Represents the JSON value @"inclusive"@ PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'TaxBehavior'EnumInclusive | -- | Represents the JSON value @"unspecified"@ PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'TaxBehavior'EnumUnspecified deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'TaxBehavior' where toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'TaxBehavior'Other val) = val toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'TaxBehavior'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'TaxBehavior'EnumExclusive) = "exclusive" toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'TaxBehavior'EnumInclusive) = "inclusive" toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'TaxBehavior'EnumUnspecified) = "unspecified" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'TaxBehavior' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "exclusive" -> PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'TaxBehavior'EnumExclusive | val GHC.Classes.== "inclusive" -> PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'TaxBehavior'EnumInclusive | val GHC.Classes.== "unspecified" -> PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'TaxBehavior'EnumUnspecified | GHC.Base.otherwise -> PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'PriceData'TaxBehavior'Other val ) -- | Defines the oneOf schema located at @paths.\/v1\/subscription_schedules\/{schedule}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.phases.items.properties.add_invoice_items.items.properties.tax_rates.anyOf@ in the specification. data PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'TaxRates'Variants = -- | Represents the JSON value @""@ PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'TaxRates'EmptyString | PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'TaxRates'ListTText ([Data.Text.Internal.Text]) deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'TaxRates'Variants where toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'TaxRates'ListTText a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'TaxRates'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'TaxRates'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'TaxRates'EmptyString | GHC.Base.otherwise -> case (PostSubscriptionSchedulesScheduleRequestBodyPhases'AddInvoiceItems'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\/subscription_schedules\/{schedule}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.phases.items.properties.automatic_tax@ in the specification. data PostSubscriptionSchedulesScheduleRequestBodyPhases'AutomaticTax' = PostSubscriptionSchedulesScheduleRequestBodyPhases'AutomaticTax' { -- | enabled postSubscriptionSchedulesScheduleRequestBodyPhases'AutomaticTax'Enabled :: GHC.Types.Bool } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'AutomaticTax' where toJSON obj = Data.Aeson.Types.Internal.object ("enabled" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'AutomaticTax'Enabled obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs ("enabled" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'AutomaticTax'Enabled obj) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'AutomaticTax' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionSchedulesScheduleRequestBodyPhases'AutomaticTax'" (\obj -> GHC.Base.pure PostSubscriptionSchedulesScheduleRequestBodyPhases'AutomaticTax' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "enabled")) -- | Create a new 'PostSubscriptionSchedulesScheduleRequestBodyPhases'AutomaticTax'' with all required fields. mkPostSubscriptionSchedulesScheduleRequestBodyPhases'AutomaticTax' :: -- | 'postSubscriptionSchedulesScheduleRequestBodyPhases'AutomaticTax'Enabled' GHC.Types.Bool -> PostSubscriptionSchedulesScheduleRequestBodyPhases'AutomaticTax' mkPostSubscriptionSchedulesScheduleRequestBodyPhases'AutomaticTax' postSubscriptionSchedulesScheduleRequestBodyPhases'AutomaticTax'Enabled = PostSubscriptionSchedulesScheduleRequestBodyPhases'AutomaticTax' {postSubscriptionSchedulesScheduleRequestBodyPhases'AutomaticTax'Enabled = postSubscriptionSchedulesScheduleRequestBodyPhases'AutomaticTax'Enabled} -- | Defines the enum schema located at @paths.\/v1\/subscription_schedules\/{schedule}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.phases.items.properties.billing_cycle_anchor@ in the specification. data PostSubscriptionSchedulesScheduleRequestBodyPhases'BillingCycleAnchor' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostSubscriptionSchedulesScheduleRequestBodyPhases'BillingCycleAnchor'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. PostSubscriptionSchedulesScheduleRequestBodyPhases'BillingCycleAnchor'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"automatic"@ PostSubscriptionSchedulesScheduleRequestBodyPhases'BillingCycleAnchor'EnumAutomatic | -- | Represents the JSON value @"phase_start"@ PostSubscriptionSchedulesScheduleRequestBodyPhases'BillingCycleAnchor'EnumPhaseStart deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'BillingCycleAnchor' where toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'BillingCycleAnchor'Other val) = val toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'BillingCycleAnchor'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'BillingCycleAnchor'EnumAutomatic) = "automatic" toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'BillingCycleAnchor'EnumPhaseStart) = "phase_start" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'BillingCycleAnchor' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "automatic" -> PostSubscriptionSchedulesScheduleRequestBodyPhases'BillingCycleAnchor'EnumAutomatic | val GHC.Classes.== "phase_start" -> PostSubscriptionSchedulesScheduleRequestBodyPhases'BillingCycleAnchor'EnumPhaseStart | GHC.Base.otherwise -> PostSubscriptionSchedulesScheduleRequestBodyPhases'BillingCycleAnchor'Other val ) -- | Defines the object schema located at @paths.\/v1\/subscription_schedules\/{schedule}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.phases.items.properties.billing_thresholds.anyOf@ in the specification. data PostSubscriptionSchedulesScheduleRequestBodyPhases'BillingThresholds'OneOf1 = PostSubscriptionSchedulesScheduleRequestBodyPhases'BillingThresholds'OneOf1 { -- | amount_gte postSubscriptionSchedulesScheduleRequestBodyPhases'BillingThresholds'OneOf1AmountGte :: (GHC.Maybe.Maybe GHC.Types.Int), -- | reset_billing_cycle_anchor postSubscriptionSchedulesScheduleRequestBodyPhases'BillingThresholds'OneOf1ResetBillingCycleAnchor :: (GHC.Maybe.Maybe GHC.Types.Bool) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'BillingThresholds'OneOf1 where toJSON obj = Data.Aeson.Types.Internal.object ("amount_gte" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'BillingThresholds'OneOf1AmountGte obj : "reset_billing_cycle_anchor" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'BillingThresholds'OneOf1ResetBillingCycleAnchor obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("amount_gte" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'BillingThresholds'OneOf1AmountGte obj) GHC.Base.<> ("reset_billing_cycle_anchor" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'BillingThresholds'OneOf1ResetBillingCycleAnchor obj)) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'BillingThresholds'OneOf1 where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionSchedulesScheduleRequestBodyPhases'BillingThresholds'OneOf1" (\obj -> (GHC.Base.pure PostSubscriptionSchedulesScheduleRequestBodyPhases'BillingThresholds'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "amount_gte")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "reset_billing_cycle_anchor")) -- | Create a new 'PostSubscriptionSchedulesScheduleRequestBodyPhases'BillingThresholds'OneOf1' with all required fields. mkPostSubscriptionSchedulesScheduleRequestBodyPhases'BillingThresholds'OneOf1 :: PostSubscriptionSchedulesScheduleRequestBodyPhases'BillingThresholds'OneOf1 mkPostSubscriptionSchedulesScheduleRequestBodyPhases'BillingThresholds'OneOf1 = PostSubscriptionSchedulesScheduleRequestBodyPhases'BillingThresholds'OneOf1 { postSubscriptionSchedulesScheduleRequestBodyPhases'BillingThresholds'OneOf1AmountGte = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyPhases'BillingThresholds'OneOf1ResetBillingCycleAnchor = GHC.Maybe.Nothing } -- | Defines the oneOf schema located at @paths.\/v1\/subscription_schedules\/{schedule}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.phases.items.properties.billing_thresholds.anyOf@ in the specification. data PostSubscriptionSchedulesScheduleRequestBodyPhases'BillingThresholds'Variants = -- | Represents the JSON value @""@ PostSubscriptionSchedulesScheduleRequestBodyPhases'BillingThresholds'EmptyString | PostSubscriptionSchedulesScheduleRequestBodyPhases'BillingThresholds'PostSubscriptionSchedulesScheduleRequestBodyPhases'BillingThresholds'OneOf1 PostSubscriptionSchedulesScheduleRequestBodyPhases'BillingThresholds'OneOf1 deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'BillingThresholds'Variants where toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'BillingThresholds'PostSubscriptionSchedulesScheduleRequestBodyPhases'BillingThresholds'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'BillingThresholds'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'BillingThresholds'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostSubscriptionSchedulesScheduleRequestBodyPhases'BillingThresholds'EmptyString | GHC.Base.otherwise -> case (PostSubscriptionSchedulesScheduleRequestBodyPhases'BillingThresholds'PostSubscriptionSchedulesScheduleRequestBodyPhases'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 enum schema located at @paths.\/v1\/subscription_schedules\/{schedule}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.phases.items.properties.collection_method@ in the specification. data PostSubscriptionSchedulesScheduleRequestBodyPhases'CollectionMethod' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostSubscriptionSchedulesScheduleRequestBodyPhases'CollectionMethod'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. PostSubscriptionSchedulesScheduleRequestBodyPhases'CollectionMethod'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"charge_automatically"@ PostSubscriptionSchedulesScheduleRequestBodyPhases'CollectionMethod'EnumChargeAutomatically | -- | Represents the JSON value @"send_invoice"@ PostSubscriptionSchedulesScheduleRequestBodyPhases'CollectionMethod'EnumSendInvoice deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'CollectionMethod' where toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'CollectionMethod'Other val) = val toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'CollectionMethod'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'CollectionMethod'EnumChargeAutomatically) = "charge_automatically" toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'CollectionMethod'EnumSendInvoice) = "send_invoice" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'CollectionMethod' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "charge_automatically" -> PostSubscriptionSchedulesScheduleRequestBodyPhases'CollectionMethod'EnumChargeAutomatically | val GHC.Classes.== "send_invoice" -> PostSubscriptionSchedulesScheduleRequestBodyPhases'CollectionMethod'EnumSendInvoice | GHC.Base.otherwise -> PostSubscriptionSchedulesScheduleRequestBodyPhases'CollectionMethod'Other val ) -- | Defines the oneOf schema located at @paths.\/v1\/subscription_schedules\/{schedule}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.phases.items.properties.default_tax_rates.anyOf@ in the specification. data PostSubscriptionSchedulesScheduleRequestBodyPhases'DefaultTaxRates'Variants = -- | Represents the JSON value @""@ PostSubscriptionSchedulesScheduleRequestBodyPhases'DefaultTaxRates'EmptyString | PostSubscriptionSchedulesScheduleRequestBodyPhases'DefaultTaxRates'ListTText ([Data.Text.Internal.Text]) deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'DefaultTaxRates'Variants where toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'DefaultTaxRates'ListTText a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'DefaultTaxRates'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'DefaultTaxRates'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostSubscriptionSchedulesScheduleRequestBodyPhases'DefaultTaxRates'EmptyString | GHC.Base.otherwise -> case (PostSubscriptionSchedulesScheduleRequestBodyPhases'DefaultTaxRates'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\/subscription_schedules\/{schedule}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.phases.items.properties.end_date.anyOf@ in the specification. data PostSubscriptionSchedulesScheduleRequestBodyPhases'EndDate'Variants = -- | Represents the JSON value @"now"@ PostSubscriptionSchedulesScheduleRequestBodyPhases'EndDate'Now | PostSubscriptionSchedulesScheduleRequestBodyPhases'EndDate'Int GHC.Types.Int deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'EndDate'Variants where toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'EndDate'Int a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'EndDate'Now) = "now" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'EndDate'Variants where parseJSON val = if | val GHC.Classes.== "now" -> GHC.Base.pure PostSubscriptionSchedulesScheduleRequestBodyPhases'EndDate'Now | GHC.Base.otherwise -> case (PostSubscriptionSchedulesScheduleRequestBodyPhases'EndDate'Int Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a -- | Defines the object schema located at @paths.\/v1\/subscription_schedules\/{schedule}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.phases.items.properties.invoice_settings@ in the specification. data PostSubscriptionSchedulesScheduleRequestBodyPhases'InvoiceSettings' = PostSubscriptionSchedulesScheduleRequestBodyPhases'InvoiceSettings' { -- | days_until_due postSubscriptionSchedulesScheduleRequestBodyPhases'InvoiceSettings'DaysUntilDue :: (GHC.Maybe.Maybe GHC.Types.Int) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'InvoiceSettings' where toJSON obj = Data.Aeson.Types.Internal.object ("days_until_due" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'InvoiceSettings'DaysUntilDue obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs ("days_until_due" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'InvoiceSettings'DaysUntilDue obj) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'InvoiceSettings' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionSchedulesScheduleRequestBodyPhases'InvoiceSettings'" (\obj -> GHC.Base.pure PostSubscriptionSchedulesScheduleRequestBodyPhases'InvoiceSettings' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "days_until_due")) -- | Create a new 'PostSubscriptionSchedulesScheduleRequestBodyPhases'InvoiceSettings'' with all required fields. mkPostSubscriptionSchedulesScheduleRequestBodyPhases'InvoiceSettings' :: PostSubscriptionSchedulesScheduleRequestBodyPhases'InvoiceSettings' mkPostSubscriptionSchedulesScheduleRequestBodyPhases'InvoiceSettings' = PostSubscriptionSchedulesScheduleRequestBodyPhases'InvoiceSettings' {postSubscriptionSchedulesScheduleRequestBodyPhases'InvoiceSettings'DaysUntilDue = GHC.Maybe.Nothing} -- | Defines the object schema located at @paths.\/v1\/subscription_schedules\/{schedule}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.phases.items.properties.items.items@ in the specification. data PostSubscriptionSchedulesScheduleRequestBodyPhases'Items' = PostSubscriptionSchedulesScheduleRequestBodyPhases'Items' { -- | billing_thresholds postSubscriptionSchedulesScheduleRequestBodyPhases'Items'BillingThresholds :: (GHC.Maybe.Maybe PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'BillingThresholds'Variants), -- | price -- -- Constraints: -- -- * Maximum length of 5000 postSubscriptionSchedulesScheduleRequestBodyPhases'Items'Price :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | price_data postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData :: (GHC.Maybe.Maybe PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'), -- | quantity postSubscriptionSchedulesScheduleRequestBodyPhases'Items'Quantity :: (GHC.Maybe.Maybe GHC.Types.Int), -- | tax_rates postSubscriptionSchedulesScheduleRequestBodyPhases'Items'TaxRates :: (GHC.Maybe.Maybe PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'TaxRates'Variants) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'Items' where toJSON obj = Data.Aeson.Types.Internal.object ("billing_thresholds" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'Items'BillingThresholds obj : "price" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'Items'Price obj : "price_data" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData obj : "quantity" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'Items'Quantity obj : "tax_rates" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'Items'TaxRates obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("billing_thresholds" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'Items'BillingThresholds obj) GHC.Base.<> (("price" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'Items'Price obj) GHC.Base.<> (("price_data" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData obj) GHC.Base.<> (("quantity" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'Items'Quantity obj) GHC.Base.<> ("tax_rates" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'Items'TaxRates obj))))) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'Items' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'" (\obj -> ((((GHC.Base.pure PostSubscriptionSchedulesScheduleRequestBodyPhases'Items' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "billing_thresholds")) 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 'PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'' with all required fields. mkPostSubscriptionSchedulesScheduleRequestBodyPhases'Items' :: PostSubscriptionSchedulesScheduleRequestBodyPhases'Items' mkPostSubscriptionSchedulesScheduleRequestBodyPhases'Items' = PostSubscriptionSchedulesScheduleRequestBodyPhases'Items' { postSubscriptionSchedulesScheduleRequestBodyPhases'Items'BillingThresholds = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyPhases'Items'Price = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyPhases'Items'Quantity = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyPhases'Items'TaxRates = GHC.Maybe.Nothing } -- | Defines the object schema located at @paths.\/v1\/subscription_schedules\/{schedule}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.phases.items.properties.items.items.properties.billing_thresholds.anyOf@ in the specification. data PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'BillingThresholds'OneOf1 = PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'BillingThresholds'OneOf1 { -- | usage_gte postSubscriptionSchedulesScheduleRequestBodyPhases'Items'BillingThresholds'OneOf1UsageGte :: GHC.Types.Int } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'BillingThresholds'OneOf1 where toJSON obj = Data.Aeson.Types.Internal.object ("usage_gte" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'Items'BillingThresholds'OneOf1UsageGte obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs ("usage_gte" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'Items'BillingThresholds'OneOf1UsageGte obj) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'BillingThresholds'OneOf1 where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'BillingThresholds'OneOf1" (\obj -> GHC.Base.pure PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'BillingThresholds'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "usage_gte")) -- | Create a new 'PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'BillingThresholds'OneOf1' with all required fields. mkPostSubscriptionSchedulesScheduleRequestBodyPhases'Items'BillingThresholds'OneOf1 :: -- | 'postSubscriptionSchedulesScheduleRequestBodyPhases'Items'BillingThresholds'OneOf1UsageGte' GHC.Types.Int -> PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'BillingThresholds'OneOf1 mkPostSubscriptionSchedulesScheduleRequestBodyPhases'Items'BillingThresholds'OneOf1 postSubscriptionSchedulesScheduleRequestBodyPhases'Items'BillingThresholds'OneOf1UsageGte = PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'BillingThresholds'OneOf1 {postSubscriptionSchedulesScheduleRequestBodyPhases'Items'BillingThresholds'OneOf1UsageGte = postSubscriptionSchedulesScheduleRequestBodyPhases'Items'BillingThresholds'OneOf1UsageGte} -- | Defines the oneOf schema located at @paths.\/v1\/subscription_schedules\/{schedule}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.phases.items.properties.items.items.properties.billing_thresholds.anyOf@ in the specification. data PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'BillingThresholds'Variants = -- | Represents the JSON value @""@ PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'BillingThresholds'EmptyString | PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'BillingThresholds'PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'BillingThresholds'OneOf1 PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'BillingThresholds'OneOf1 deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'BillingThresholds'Variants where toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'BillingThresholds'PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'BillingThresholds'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'BillingThresholds'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'BillingThresholds'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'BillingThresholds'EmptyString | GHC.Base.otherwise -> case (PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'BillingThresholds'PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'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\/subscription_schedules\/{schedule}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.phases.items.properties.items.items.properties.price_data@ in the specification. data PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData' = PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData' { -- | currency postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Currency :: Data.Text.Internal.Text, -- | product -- -- Constraints: -- -- * Maximum length of 5000 postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Product :: Data.Text.Internal.Text, -- | recurring postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring :: PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring', -- | tax_behavior postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'TaxBehavior :: (GHC.Maybe.Maybe PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'TaxBehavior'), -- | unit_amount postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'UnitAmount :: (GHC.Maybe.Maybe GHC.Types.Int), -- | unit_amount_decimal postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'UnitAmountDecimal :: (GHC.Maybe.Maybe Data.Text.Internal.Text) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData' where toJSON obj = Data.Aeson.Types.Internal.object ("currency" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Currency obj : "product" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Product obj : "recurring" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring obj : "tax_behavior" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'TaxBehavior obj : "unit_amount" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'UnitAmount obj : "unit_amount_decimal" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'UnitAmountDecimal obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("currency" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Currency obj) GHC.Base.<> (("product" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Product obj) GHC.Base.<> (("recurring" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring obj) GHC.Base.<> (("tax_behavior" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'TaxBehavior obj) GHC.Base.<> (("unit_amount" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'UnitAmount obj) GHC.Base.<> ("unit_amount_decimal" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'UnitAmountDecimal obj)))))) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'" (\obj -> (((((GHC.Base.pure PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'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 'PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'' with all required fields. mkPostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData' :: -- | 'postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Currency' Data.Text.Internal.Text -> -- | 'postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Product' Data.Text.Internal.Text -> -- | 'postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring' PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring' -> PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData' mkPostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData' postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Currency postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Product postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring = PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData' { postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Currency = postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Currency, postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Product = postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Product, postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring = postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring, postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'TaxBehavior = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'UnitAmount = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'UnitAmountDecimal = GHC.Maybe.Nothing } -- | Defines the object schema located at @paths.\/v1\/subscription_schedules\/{schedule}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.phases.items.properties.items.items.properties.price_data.properties.recurring@ in the specification. data PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring' = PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring' { -- | interval postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring'Interval :: PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring'Interval', -- | interval_count postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring'IntervalCount :: (GHC.Maybe.Maybe GHC.Types.Int) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring' where toJSON obj = Data.Aeson.Types.Internal.object ("interval" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring'Interval obj : "interval_count" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring'IntervalCount obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("interval" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring'Interval obj) GHC.Base.<> ("interval_count" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring'IntervalCount obj)) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring'" (\obj -> (GHC.Base.pure PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "interval")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "interval_count")) -- | Create a new 'PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring'' with all required fields. mkPostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring' :: -- | 'postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring'Interval' PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring'Interval' -> PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring' mkPostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring' postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring'Interval = PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring' { postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring'Interval = postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring'Interval, postSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring'IntervalCount = GHC.Maybe.Nothing } -- | Defines the enum schema located at @paths.\/v1\/subscription_schedules\/{schedule}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.phases.items.properties.items.items.properties.price_data.properties.recurring.properties.interval@ in the specification. data PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring'Interval' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'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. PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring'Interval'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"day"@ PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring'Interval'EnumDay | -- | Represents the JSON value @"month"@ PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring'Interval'EnumMonth | -- | Represents the JSON value @"week"@ PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring'Interval'EnumWeek | -- | Represents the JSON value @"year"@ PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring'Interval'EnumYear deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring'Interval' where toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring'Interval'Other val) = val toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring'Interval'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring'Interval'EnumDay) = "day" toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring'Interval'EnumMonth) = "month" toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring'Interval'EnumWeek) = "week" toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring'Interval'EnumYear) = "year" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring'Interval' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "day" -> PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring'Interval'EnumDay | val GHC.Classes.== "month" -> PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring'Interval'EnumMonth | val GHC.Classes.== "week" -> PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring'Interval'EnumWeek | val GHC.Classes.== "year" -> PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring'Interval'EnumYear | GHC.Base.otherwise -> PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'Recurring'Interval'Other val ) -- | Defines the enum schema located at @paths.\/v1\/subscription_schedules\/{schedule}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.phases.items.properties.items.items.properties.price_data.properties.tax_behavior@ in the specification. data PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'TaxBehavior' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'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. PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'TaxBehavior'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"exclusive"@ PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'TaxBehavior'EnumExclusive | -- | Represents the JSON value @"inclusive"@ PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'TaxBehavior'EnumInclusive | -- | Represents the JSON value @"unspecified"@ PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'TaxBehavior'EnumUnspecified deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'TaxBehavior' where toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'TaxBehavior'Other val) = val toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'TaxBehavior'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'TaxBehavior'EnumExclusive) = "exclusive" toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'TaxBehavior'EnumInclusive) = "inclusive" toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'TaxBehavior'EnumUnspecified) = "unspecified" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'TaxBehavior' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "exclusive" -> PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'TaxBehavior'EnumExclusive | val GHC.Classes.== "inclusive" -> PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'TaxBehavior'EnumInclusive | val GHC.Classes.== "unspecified" -> PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'TaxBehavior'EnumUnspecified | GHC.Base.otherwise -> PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'PriceData'TaxBehavior'Other val ) -- | Defines the oneOf schema located at @paths.\/v1\/subscription_schedules\/{schedule}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.phases.items.properties.items.items.properties.tax_rates.anyOf@ in the specification. data PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'TaxRates'Variants = -- | Represents the JSON value @""@ PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'TaxRates'EmptyString | PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'TaxRates'ListTText ([Data.Text.Internal.Text]) deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'TaxRates'Variants where toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'TaxRates'ListTText a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'TaxRates'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'TaxRates'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'TaxRates'EmptyString | GHC.Base.otherwise -> case (PostSubscriptionSchedulesScheduleRequestBodyPhases'Items'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 enum schema located at @paths.\/v1\/subscription_schedules\/{schedule}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.phases.items.properties.proration_behavior@ in the specification. data PostSubscriptionSchedulesScheduleRequestBodyPhases'ProrationBehavior' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostSubscriptionSchedulesScheduleRequestBodyPhases'ProrationBehavior'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. PostSubscriptionSchedulesScheduleRequestBodyPhases'ProrationBehavior'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"always_invoice"@ PostSubscriptionSchedulesScheduleRequestBodyPhases'ProrationBehavior'EnumAlwaysInvoice | -- | Represents the JSON value @"create_prorations"@ PostSubscriptionSchedulesScheduleRequestBodyPhases'ProrationBehavior'EnumCreateProrations | -- | Represents the JSON value @"none"@ PostSubscriptionSchedulesScheduleRequestBodyPhases'ProrationBehavior'EnumNone deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'ProrationBehavior' where toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'ProrationBehavior'Other val) = val toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'ProrationBehavior'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'ProrationBehavior'EnumAlwaysInvoice) = "always_invoice" toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'ProrationBehavior'EnumCreateProrations) = "create_prorations" toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'ProrationBehavior'EnumNone) = "none" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'ProrationBehavior' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "always_invoice" -> PostSubscriptionSchedulesScheduleRequestBodyPhases'ProrationBehavior'EnumAlwaysInvoice | val GHC.Classes.== "create_prorations" -> PostSubscriptionSchedulesScheduleRequestBodyPhases'ProrationBehavior'EnumCreateProrations | val GHC.Classes.== "none" -> PostSubscriptionSchedulesScheduleRequestBodyPhases'ProrationBehavior'EnumNone | GHC.Base.otherwise -> PostSubscriptionSchedulesScheduleRequestBodyPhases'ProrationBehavior'Other val ) -- | Defines the oneOf schema located at @paths.\/v1\/subscription_schedules\/{schedule}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.phases.items.properties.start_date.anyOf@ in the specification. data PostSubscriptionSchedulesScheduleRequestBodyPhases'StartDate'Variants = -- | Represents the JSON value @"now"@ PostSubscriptionSchedulesScheduleRequestBodyPhases'StartDate'Now | PostSubscriptionSchedulesScheduleRequestBodyPhases'StartDate'Int GHC.Types.Int deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'StartDate'Variants where toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'StartDate'Int a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'StartDate'Now) = "now" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'StartDate'Variants where parseJSON val = if | val GHC.Classes.== "now" -> GHC.Base.pure PostSubscriptionSchedulesScheduleRequestBodyPhases'StartDate'Now | GHC.Base.otherwise -> case (PostSubscriptionSchedulesScheduleRequestBodyPhases'StartDate'Int Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a -- | Defines the object schema located at @paths.\/v1\/subscription_schedules\/{schedule}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.phases.items.properties.transfer_data@ in the specification. data PostSubscriptionSchedulesScheduleRequestBodyPhases'TransferData' = PostSubscriptionSchedulesScheduleRequestBodyPhases'TransferData' { -- | amount_percent postSubscriptionSchedulesScheduleRequestBodyPhases'TransferData'AmountPercent :: (GHC.Maybe.Maybe GHC.Types.Double), -- | destination postSubscriptionSchedulesScheduleRequestBodyPhases'TransferData'Destination :: Data.Text.Internal.Text } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'TransferData' where toJSON obj = Data.Aeson.Types.Internal.object ("amount_percent" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'TransferData'AmountPercent obj : "destination" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'TransferData'Destination obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("amount_percent" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'TransferData'AmountPercent obj) GHC.Base.<> ("destination" Data.Aeson.Types.ToJSON..= postSubscriptionSchedulesScheduleRequestBodyPhases'TransferData'Destination obj)) instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'TransferData' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostSubscriptionSchedulesScheduleRequestBodyPhases'TransferData'" (\obj -> (GHC.Base.pure PostSubscriptionSchedulesScheduleRequestBodyPhases'TransferData' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "amount_percent")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "destination")) -- | Create a new 'PostSubscriptionSchedulesScheduleRequestBodyPhases'TransferData'' with all required fields. mkPostSubscriptionSchedulesScheduleRequestBodyPhases'TransferData' :: -- | 'postSubscriptionSchedulesScheduleRequestBodyPhases'TransferData'Destination' Data.Text.Internal.Text -> PostSubscriptionSchedulesScheduleRequestBodyPhases'TransferData' mkPostSubscriptionSchedulesScheduleRequestBodyPhases'TransferData' postSubscriptionSchedulesScheduleRequestBodyPhases'TransferData'Destination = PostSubscriptionSchedulesScheduleRequestBodyPhases'TransferData' { postSubscriptionSchedulesScheduleRequestBodyPhases'TransferData'AmountPercent = GHC.Maybe.Nothing, postSubscriptionSchedulesScheduleRequestBodyPhases'TransferData'Destination = postSubscriptionSchedulesScheduleRequestBodyPhases'TransferData'Destination } -- | Defines the oneOf schema located at @paths.\/v1\/subscription_schedules\/{schedule}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.phases.items.properties.trial_end.anyOf@ in the specification. data PostSubscriptionSchedulesScheduleRequestBodyPhases'TrialEnd'Variants = -- | Represents the JSON value @"now"@ PostSubscriptionSchedulesScheduleRequestBodyPhases'TrialEnd'Now | PostSubscriptionSchedulesScheduleRequestBodyPhases'TrialEnd'Int GHC.Types.Int deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'TrialEnd'Variants where toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'TrialEnd'Int a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostSubscriptionSchedulesScheduleRequestBodyPhases'TrialEnd'Now) = "now" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionSchedulesScheduleRequestBodyPhases'TrialEnd'Variants where parseJSON val = if | val GHC.Classes.== "now" -> GHC.Base.pure PostSubscriptionSchedulesScheduleRequestBodyPhases'TrialEnd'Now | GHC.Base.otherwise -> case (PostSubscriptionSchedulesScheduleRequestBodyPhases'TrialEnd'Int Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a -- | Defines the enum schema located at @paths.\/v1\/subscription_schedules\/{schedule}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.proration_behavior@ in the specification. -- -- If the update changes the current phase, indicates if the changes should be prorated. Possible values are \`create_prorations\` or \`none\`, and the default value is \`create_prorations\`. data PostSubscriptionSchedulesScheduleRequestBodyProrationBehavior' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostSubscriptionSchedulesScheduleRequestBodyProrationBehavior'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. PostSubscriptionSchedulesScheduleRequestBodyProrationBehavior'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"always_invoice"@ PostSubscriptionSchedulesScheduleRequestBodyProrationBehavior'EnumAlwaysInvoice | -- | Represents the JSON value @"create_prorations"@ PostSubscriptionSchedulesScheduleRequestBodyProrationBehavior'EnumCreateProrations | -- | Represents the JSON value @"none"@ PostSubscriptionSchedulesScheduleRequestBodyProrationBehavior'EnumNone deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostSubscriptionSchedulesScheduleRequestBodyProrationBehavior' where toJSON (PostSubscriptionSchedulesScheduleRequestBodyProrationBehavior'Other val) = val toJSON (PostSubscriptionSchedulesScheduleRequestBodyProrationBehavior'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostSubscriptionSchedulesScheduleRequestBodyProrationBehavior'EnumAlwaysInvoice) = "always_invoice" toJSON (PostSubscriptionSchedulesScheduleRequestBodyProrationBehavior'EnumCreateProrations) = "create_prorations" toJSON (PostSubscriptionSchedulesScheduleRequestBodyProrationBehavior'EnumNone) = "none" instance Data.Aeson.Types.FromJSON.FromJSON PostSubscriptionSchedulesScheduleRequestBodyProrationBehavior' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "always_invoice" -> PostSubscriptionSchedulesScheduleRequestBodyProrationBehavior'EnumAlwaysInvoice | val GHC.Classes.== "create_prorations" -> PostSubscriptionSchedulesScheduleRequestBodyProrationBehavior'EnumCreateProrations | val GHC.Classes.== "none" -> PostSubscriptionSchedulesScheduleRequestBodyProrationBehavior'EnumNone | GHC.Base.otherwise -> PostSubscriptionSchedulesScheduleRequestBodyProrationBehavior'Other val ) -- | Represents a response of the operation 'postSubscriptionSchedulesSchedule'. -- -- 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), 'PostSubscriptionSchedulesScheduleResponseError' is used. data PostSubscriptionSchedulesScheduleResponse = -- | Means either no matching case available or a parse error PostSubscriptionSchedulesScheduleResponseError GHC.Base.String | -- | Successful response. PostSubscriptionSchedulesScheduleResponse200 SubscriptionSchedule | -- | Error response. PostSubscriptionSchedulesScheduleResponseDefault Error deriving (GHC.Show.Show, GHC.Classes.Eq)