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

At any time, you can preview the upcoming invoice for a customer. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice.\<\/p> -- -- \

Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer’s discount.\<\/p> -- -- \

You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass a \proration_date\<\/code> parameter when doing the actual subscription update. The value passed in should be the same as the \subscription_proration_date\<\/code> returned on the upcoming invoice resource. The recommended way to get only the prorations being previewed is to consider only proration line items where \period[start]\<\/code> is equal to the \subscription_proration_date\<\/code> on the upcoming invoice resource.\<\/p> getInvoicesUpcoming :: forall m. StripeAPI.Common.MonadHTTP m => -- | Contains all available parameters of this operation (query and path parameters) GetInvoicesUpcomingParameters -> -- | Monadic computation which returns the result of the operation StripeAPI.Common.ClientT m (Network.HTTP.Client.Types.Response GetInvoicesUpcomingResponse) getInvoicesUpcoming parameters = GHC.Base.fmap ( \response_0 -> GHC.Base.fmap ( Data.Either.either GetInvoicesUpcomingResponseError 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) -> GetInvoicesUpcomingResponse200 Data.Functor.<$> ( Data.Aeson.eitherDecodeStrict body :: Data.Either.Either GHC.Base.String Invoice ) | GHC.Base.const GHC.Types.True (Network.HTTP.Client.Types.responseStatus response) -> GetInvoicesUpcomingResponseDefault 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.doCallWithConfigurationM (Data.Text.toUpper GHC.Base.$ Data.Text.pack "GET") (Data.Text.pack "/v1/invoices/upcoming") [ StripeAPI.Common.QueryParameter (Data.Text.pack "automatic_tax") (Data.Aeson.Types.ToJSON.toJSON Data.Functor.<$> getInvoicesUpcomingParametersQueryAutomaticTax parameters) (Data.Text.pack "deepObject") GHC.Types.True, StripeAPI.Common.QueryParameter (Data.Text.pack "coupon") (Data.Aeson.Types.ToJSON.toJSON Data.Functor.<$> getInvoicesUpcomingParametersQueryCoupon parameters) (Data.Text.pack "form") GHC.Types.True, StripeAPI.Common.QueryParameter (Data.Text.pack "customer") (Data.Aeson.Types.ToJSON.toJSON Data.Functor.<$> getInvoicesUpcomingParametersQueryCustomer parameters) (Data.Text.pack "form") GHC.Types.True, StripeAPI.Common.QueryParameter (Data.Text.pack "customer_details") (Data.Aeson.Types.ToJSON.toJSON Data.Functor.<$> getInvoicesUpcomingParametersQueryCustomerDetails parameters) (Data.Text.pack "deepObject") GHC.Types.True, StripeAPI.Common.QueryParameter (Data.Text.pack "discounts") (Data.Aeson.Types.ToJSON.toJSON Data.Functor.<$> getInvoicesUpcomingParametersQueryDiscounts parameters) (Data.Text.pack "deepObject") GHC.Types.True, StripeAPI.Common.QueryParameter (Data.Text.pack "expand") (Data.Aeson.Types.ToJSON.toJSON Data.Functor.<$> getInvoicesUpcomingParametersQueryExpand parameters) (Data.Text.pack "deepObject") GHC.Types.True, StripeAPI.Common.QueryParameter (Data.Text.pack "invoice_items") (Data.Aeson.Types.ToJSON.toJSON Data.Functor.<$> getInvoicesUpcomingParametersQueryInvoiceItems parameters) (Data.Text.pack "deepObject") GHC.Types.True, StripeAPI.Common.QueryParameter (Data.Text.pack "schedule") (Data.Aeson.Types.ToJSON.toJSON Data.Functor.<$> getInvoicesUpcomingParametersQuerySchedule parameters) (Data.Text.pack "form") GHC.Types.True, StripeAPI.Common.QueryParameter (Data.Text.pack "subscription") (Data.Aeson.Types.ToJSON.toJSON Data.Functor.<$> getInvoicesUpcomingParametersQuerySubscription parameters) (Data.Text.pack "form") GHC.Types.True, StripeAPI.Common.QueryParameter (Data.Text.pack "subscription_billing_cycle_anchor") (Data.Aeson.Types.ToJSON.toJSON Data.Functor.<$> getInvoicesUpcomingParametersQuerySubscriptionBillingCycleAnchor parameters) (Data.Text.pack "deepObject") GHC.Types.True, StripeAPI.Common.QueryParameter (Data.Text.pack "subscription_cancel_at") (Data.Aeson.Types.ToJSON.toJSON Data.Functor.<$> getInvoicesUpcomingParametersQuerySubscriptionCancelAt parameters) (Data.Text.pack "deepObject") GHC.Types.True, StripeAPI.Common.QueryParameter (Data.Text.pack "subscription_cancel_at_period_end") (Data.Aeson.Types.ToJSON.toJSON Data.Functor.<$> getInvoicesUpcomingParametersQuerySubscriptionCancelAtPeriodEnd parameters) (Data.Text.pack "form") GHC.Types.True, StripeAPI.Common.QueryParameter (Data.Text.pack "subscription_cancel_now") (Data.Aeson.Types.ToJSON.toJSON Data.Functor.<$> getInvoicesUpcomingParametersQuerySubscriptionCancelNow parameters) (Data.Text.pack "form") GHC.Types.True, StripeAPI.Common.QueryParameter (Data.Text.pack "subscription_default_tax_rates") (Data.Aeson.Types.ToJSON.toJSON Data.Functor.<$> getInvoicesUpcomingParametersQuerySubscriptionDefaultTaxRates parameters) (Data.Text.pack "deepObject") GHC.Types.True, StripeAPI.Common.QueryParameter (Data.Text.pack "subscription_items") (Data.Aeson.Types.ToJSON.toJSON Data.Functor.<$> getInvoicesUpcomingParametersQuerySubscriptionItems parameters) (Data.Text.pack "deepObject") GHC.Types.True, StripeAPI.Common.QueryParameter (Data.Text.pack "subscription_proration_behavior") (Data.Aeson.Types.ToJSON.toJSON Data.Functor.<$> getInvoicesUpcomingParametersQuerySubscriptionProrationBehavior parameters) (Data.Text.pack "form") GHC.Types.True, StripeAPI.Common.QueryParameter (Data.Text.pack "subscription_proration_date") (Data.Aeson.Types.ToJSON.toJSON Data.Functor.<$> getInvoicesUpcomingParametersQuerySubscriptionProrationDate parameters) (Data.Text.pack "form") GHC.Types.True, StripeAPI.Common.QueryParameter (Data.Text.pack "subscription_start_date") (Data.Aeson.Types.ToJSON.toJSON Data.Functor.<$> getInvoicesUpcomingParametersQuerySubscriptionStartDate parameters) (Data.Text.pack "form") GHC.Types.True, StripeAPI.Common.QueryParameter (Data.Text.pack "subscription_trial_end") (Data.Aeson.Types.ToJSON.toJSON Data.Functor.<$> getInvoicesUpcomingParametersQuerySubscriptionTrialEnd parameters) (Data.Text.pack "deepObject") GHC.Types.True, StripeAPI.Common.QueryParameter (Data.Text.pack "subscription_trial_from_plan") (Data.Aeson.Types.ToJSON.toJSON Data.Functor.<$> getInvoicesUpcomingParametersQuerySubscriptionTrialFromPlan parameters) (Data.Text.pack "form") GHC.Types.True ] ) -- | Defines the object schema located at @paths.\/v1\/invoices\/upcoming.GET.parameters@ in the specification. data GetInvoicesUpcomingParameters = GetInvoicesUpcomingParameters { -- | queryAutomatic_tax: Represents the parameter named \'automatic_tax\' -- -- Settings for automatic tax lookup for this invoice preview. getInvoicesUpcomingParametersQueryAutomaticTax :: (GHC.Maybe.Maybe GetInvoicesUpcomingParametersQueryAutomaticTax'), -- | queryCoupon: Represents the parameter named \'coupon\' -- -- The code of the coupon to apply. If \`subscription\` or \`subscription_items\` is provided, the invoice returned will preview updating or creating a subscription with that coupon. Otherwise, it will preview applying that coupon to the customer for the next upcoming invoice from among the customer\'s subscriptions. The invoice can be previewed without a coupon by passing this value as an empty string. -- -- Constraints: -- -- * Maximum length of 5000 getInvoicesUpcomingParametersQueryCoupon :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | queryCustomer: Represents the parameter named \'customer\' -- -- The identifier of the customer whose upcoming invoice you\'d like to retrieve. -- -- Constraints: -- -- * Maximum length of 5000 getInvoicesUpcomingParametersQueryCustomer :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | queryCustomer_details: Represents the parameter named \'customer_details\' -- -- Details about the customer you want to invoice or overrides for an existing customer. getInvoicesUpcomingParametersQueryCustomerDetails :: (GHC.Maybe.Maybe GetInvoicesUpcomingParametersQueryCustomerDetails'), -- | queryDiscounts: Represents the parameter named \'discounts\' -- -- The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the customer or subscription. This only works for coupons directly applied to the invoice. To apply a coupon to a subscription, you must use the \`coupon\` parameter instead. Pass an empty string to avoid inheriting any discounts. To preview the upcoming invoice for a subscription that hasn\'t been created, use \`coupon\` instead. getInvoicesUpcomingParametersQueryDiscounts :: (GHC.Maybe.Maybe GetInvoicesUpcomingParametersQueryDiscounts'Variants), -- | queryExpand: Represents the parameter named \'expand\' -- -- Specifies which fields in the response should be expanded. getInvoicesUpcomingParametersQueryExpand :: (GHC.Maybe.Maybe ([Data.Text.Internal.Text])), -- | queryInvoice_items: Represents the parameter named \'invoice_items\' -- -- List of invoice items to add or update in the upcoming invoice preview. getInvoicesUpcomingParametersQueryInvoiceItems :: (GHC.Maybe.Maybe ([GetInvoicesUpcomingParametersQueryInvoiceItems'])), -- | querySchedule: Represents the parameter named \'schedule\' -- -- The identifier of the unstarted schedule whose upcoming invoice you\'d like to retrieve. Cannot be used with subscription or subscription fields. -- -- Constraints: -- -- * Maximum length of 5000 getInvoicesUpcomingParametersQuerySchedule :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | querySubscription: Represents the parameter named \'subscription\' -- -- The identifier of the subscription for which you\'d like to retrieve the upcoming invoice. If not provided, but a \`subscription_items\` is provided, you will preview creating a subscription with those items. If neither \`subscription\` nor \`subscription_items\` is provided, you will retrieve the next upcoming invoice from among the customer\'s subscriptions. -- -- Constraints: -- -- * Maximum length of 5000 getInvoicesUpcomingParametersQuerySubscription :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | querySubscription_billing_cycle_anchor: Represents the parameter named \'subscription_billing_cycle_anchor\' -- -- For new subscriptions, a future timestamp to anchor the subscription\'s [billing cycle](https:\/\/stripe.com\/docs\/subscriptions\/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with \`month\` or \`year\` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to \`now\` or \`unchanged\`. getInvoicesUpcomingParametersQuerySubscriptionBillingCycleAnchor :: (GHC.Maybe.Maybe GetInvoicesUpcomingParametersQuerySubscriptionBillingCycleAnchor'Variants), -- | querySubscription_cancel_at: Represents the parameter named \'subscription_cancel_at\' -- -- Timestamp indicating when the subscription should be scheduled to cancel. Will prorate if within the current period and prorations have been enabled using \`proration_behavior\`. getInvoicesUpcomingParametersQuerySubscriptionCancelAt :: (GHC.Maybe.Maybe GetInvoicesUpcomingParametersQuerySubscriptionCancelAt'Variants), -- | querySubscription_cancel_at_period_end: Represents the parameter named \'subscription_cancel_at_period_end\' -- -- Boolean indicating whether this subscription should cancel at the end of the current period. getInvoicesUpcomingParametersQuerySubscriptionCancelAtPeriodEnd :: (GHC.Maybe.Maybe GHC.Types.Bool), -- | querySubscription_cancel_now: Represents the parameter named \'subscription_cancel_now\' -- -- This simulates the subscription being canceled or expired immediately. getInvoicesUpcomingParametersQuerySubscriptionCancelNow :: (GHC.Maybe.Maybe GHC.Types.Bool), -- | querySubscription_default_tax_rates: Represents the parameter named \'subscription_default_tax_rates\' -- -- If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have \`tax_rates\` set. getInvoicesUpcomingParametersQuerySubscriptionDefaultTaxRates :: (GHC.Maybe.Maybe GetInvoicesUpcomingParametersQuerySubscriptionDefaultTaxRates'Variants), -- | querySubscription_items: Represents the parameter named \'subscription_items\' -- -- A list of up to 20 subscription items, each with an attached price. getInvoicesUpcomingParametersQuerySubscriptionItems :: (GHC.Maybe.Maybe ([GetInvoicesUpcomingParametersQuerySubscriptionItems'])), -- | querySubscription_proration_behavior: Represents the parameter named \'subscription_proration_behavior\' -- -- Determines how to handle [prorations](https:\/\/stripe.com\/docs\/subscriptions\/billing-cycle\#prorations) when the billing cycle changes (e.g., when switching plans, resetting \`billing_cycle_anchor=now\`, or starting a trial), or if an item\'s \`quantity\` changes. getInvoicesUpcomingParametersQuerySubscriptionProrationBehavior :: (GHC.Maybe.Maybe GetInvoicesUpcomingParametersQuerySubscriptionProrationBehavior'), -- | querySubscription_proration_date: Represents the parameter named \'subscription_proration_date\' -- -- If previewing an update to a subscription, and doing proration, \`subscription_proration_date\` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period, and cannot be before the subscription was on its current plan. If set, \`subscription\`, and one of \`subscription_items\`, or \`subscription_trial_end\` are required. Also, \`subscription_proration_behavior\` cannot be set to \'none\'. getInvoicesUpcomingParametersQuerySubscriptionProrationDate :: (GHC.Maybe.Maybe GHC.Types.Int), -- | querySubscription_start_date: Represents the parameter named \'subscription_start_date\' -- -- Date a subscription is intended to start (can be future or past) getInvoicesUpcomingParametersQuerySubscriptionStartDate :: (GHC.Maybe.Maybe GHC.Types.Int), -- | querySubscription_trial_end: Represents the parameter named \'subscription_trial_end\' -- -- If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of \`subscription_items\` or \`subscription\` is required. getInvoicesUpcomingParametersQuerySubscriptionTrialEnd :: (GHC.Maybe.Maybe GetInvoicesUpcomingParametersQuerySubscriptionTrialEnd'Variants), -- | querySubscription_trial_from_plan: Represents the parameter named \'subscription_trial_from_plan\' -- -- Indicates if a plan\'s \`trial_period_days\` should be applied to the subscription. Setting \`subscription_trial_end\` per subscription is preferred, and this defaults to \`false\`. Setting this flag to \`true\` together with \`subscription_trial_end\` is not allowed. See [Using trial periods on subscriptions](https:\/\/stripe.com\/docs\/billing\/subscriptions\/trials) to learn more. getInvoicesUpcomingParametersQuerySubscriptionTrialFromPlan :: (GHC.Maybe.Maybe GHC.Types.Bool) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON GetInvoicesUpcomingParameters where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("queryAutomatic_tax" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryAutomaticTax obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("queryCoupon" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCoupon obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("queryCustomer" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomer obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("queryCustomer_details" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomerDetails obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("queryDiscounts" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryDiscounts obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("queryExpand" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryExpand obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("queryInvoice_items" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryInvoiceItems obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("querySchedule" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySchedule obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("querySubscription" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscription obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("querySubscription_billing_cycle_anchor" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionBillingCycleAnchor obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("querySubscription_cancel_at" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionCancelAt obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("querySubscription_cancel_at_period_end" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionCancelAtPeriodEnd obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("querySubscription_cancel_now" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionCancelNow obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("querySubscription_default_tax_rates" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionDefaultTaxRates obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("querySubscription_items" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionItems obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("querySubscription_proration_behavior" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionProrationBehavior obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("querySubscription_proration_date" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionProrationDate obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("querySubscription_start_date" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionStartDate obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("querySubscription_trial_end" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionTrialEnd obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("querySubscription_trial_from_plan" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionTrialFromPlan obj) : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("queryAutomatic_tax" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryAutomaticTax obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("queryCoupon" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCoupon obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("queryCustomer" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomer obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("queryCustomer_details" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomerDetails obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("queryDiscounts" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryDiscounts obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("queryExpand" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryExpand obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("queryInvoice_items" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryInvoiceItems obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("querySchedule" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySchedule obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("querySubscription" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscription obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("querySubscription_billing_cycle_anchor" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionBillingCycleAnchor obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("querySubscription_cancel_at" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionCancelAt obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("querySubscription_cancel_at_period_end" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionCancelAtPeriodEnd obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("querySubscription_cancel_now" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionCancelNow obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("querySubscription_default_tax_rates" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionDefaultTaxRates obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("querySubscription_items" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionItems obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("querySubscription_proration_behavior" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionProrationBehavior obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("querySubscription_proration_date" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionProrationDate obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("querySubscription_start_date" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionStartDate obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("querySubscription_trial_end" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionTrialEnd obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("querySubscription_trial_from_plan" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionTrialFromPlan obj) : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON GetInvoicesUpcomingParameters where parseJSON = Data.Aeson.Types.FromJSON.withObject "GetInvoicesUpcomingParameters" (\obj -> (((((((((((((((((((GHC.Base.pure GetInvoicesUpcomingParameters GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "queryAutomatic_tax")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "queryCoupon")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "queryCustomer")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "queryCustomer_details")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "queryDiscounts")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "queryExpand")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "queryInvoice_items")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "querySchedule")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "querySubscription")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "querySubscription_billing_cycle_anchor")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "querySubscription_cancel_at")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "querySubscription_cancel_at_period_end")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "querySubscription_cancel_now")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "querySubscription_default_tax_rates")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "querySubscription_items")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "querySubscription_proration_behavior")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "querySubscription_proration_date")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "querySubscription_start_date")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "querySubscription_trial_end")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "querySubscription_trial_from_plan")) -- | Create a new 'GetInvoicesUpcomingParameters' with all required fields. mkGetInvoicesUpcomingParameters :: GetInvoicesUpcomingParameters mkGetInvoicesUpcomingParameters = GetInvoicesUpcomingParameters { getInvoicesUpcomingParametersQueryAutomaticTax = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQueryCoupon = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQueryCustomer = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQueryCustomerDetails = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQueryDiscounts = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQueryExpand = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQueryInvoiceItems = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQuerySchedule = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQuerySubscription = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQuerySubscriptionBillingCycleAnchor = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQuerySubscriptionCancelAt = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQuerySubscriptionCancelAtPeriodEnd = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQuerySubscriptionCancelNow = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQuerySubscriptionDefaultTaxRates = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQuerySubscriptionItems = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQuerySubscriptionProrationBehavior = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQuerySubscriptionProrationDate = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQuerySubscriptionStartDate = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQuerySubscriptionTrialEnd = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQuerySubscriptionTrialFromPlan = GHC.Maybe.Nothing } -- | Defines the object schema located at @paths.\/v1\/invoices\/upcoming.GET.parameters.properties.queryAutomatic_tax@ in the specification. -- -- Represents the parameter named \'automatic_tax\' -- -- Settings for automatic tax lookup for this invoice preview. data GetInvoicesUpcomingParametersQueryAutomaticTax' = GetInvoicesUpcomingParametersQueryAutomaticTax' { -- | enabled getInvoicesUpcomingParametersQueryAutomaticTax'Enabled :: GHC.Types.Bool } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON GetInvoicesUpcomingParametersQueryAutomaticTax' where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (["enabled" Data.Aeson.Types.ToJSON..= getInvoicesUpcomingParametersQueryAutomaticTax'Enabled obj] : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (["enabled" Data.Aeson.Types.ToJSON..= getInvoicesUpcomingParametersQueryAutomaticTax'Enabled obj] : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON GetInvoicesUpcomingParametersQueryAutomaticTax' where parseJSON = Data.Aeson.Types.FromJSON.withObject "GetInvoicesUpcomingParametersQueryAutomaticTax'" (\obj -> GHC.Base.pure GetInvoicesUpcomingParametersQueryAutomaticTax' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "enabled")) -- | Create a new 'GetInvoicesUpcomingParametersQueryAutomaticTax'' with all required fields. mkGetInvoicesUpcomingParametersQueryAutomaticTax' :: -- | 'getInvoicesUpcomingParametersQueryAutomaticTax'Enabled' GHC.Types.Bool -> GetInvoicesUpcomingParametersQueryAutomaticTax' mkGetInvoicesUpcomingParametersQueryAutomaticTax' getInvoicesUpcomingParametersQueryAutomaticTax'Enabled = GetInvoicesUpcomingParametersQueryAutomaticTax' {getInvoicesUpcomingParametersQueryAutomaticTax'Enabled = getInvoicesUpcomingParametersQueryAutomaticTax'Enabled} -- | Defines the object schema located at @paths.\/v1\/invoices\/upcoming.GET.parameters.properties.queryCustomer_details@ in the specification. -- -- Represents the parameter named \'customer_details\' -- -- Details about the customer you want to invoice or overrides for an existing customer. data GetInvoicesUpcomingParametersQueryCustomerDetails' = GetInvoicesUpcomingParametersQueryCustomerDetails' { -- | address getInvoicesUpcomingParametersQueryCustomerDetails'Address :: (GHC.Maybe.Maybe GetInvoicesUpcomingParametersQueryCustomerDetails'Address'Variants), -- | shipping getInvoicesUpcomingParametersQueryCustomerDetails'Shipping :: (GHC.Maybe.Maybe GetInvoicesUpcomingParametersQueryCustomerDetails'Shipping'Variants), -- | tax getInvoicesUpcomingParametersQueryCustomerDetails'Tax :: (GHC.Maybe.Maybe GetInvoicesUpcomingParametersQueryCustomerDetails'Tax'), -- | tax_exempt getInvoicesUpcomingParametersQueryCustomerDetails'TaxExempt :: (GHC.Maybe.Maybe GetInvoicesUpcomingParametersQueryCustomerDetails'TaxExempt'), -- | tax_ids getInvoicesUpcomingParametersQueryCustomerDetails'TaxIds :: (GHC.Maybe.Maybe ([GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'])) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON GetInvoicesUpcomingParametersQueryCustomerDetails' where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("address" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomerDetails'Address obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("shipping" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomerDetails'Shipping obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("tax" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomerDetails'Tax obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("tax_exempt" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomerDetails'TaxExempt obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("tax_ids" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomerDetails'TaxIds obj) : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("address" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomerDetails'Address obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("shipping" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomerDetails'Shipping obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("tax" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomerDetails'Tax obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("tax_exempt" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomerDetails'TaxExempt obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("tax_ids" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomerDetails'TaxIds obj) : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON GetInvoicesUpcomingParametersQueryCustomerDetails' where parseJSON = Data.Aeson.Types.FromJSON.withObject "GetInvoicesUpcomingParametersQueryCustomerDetails'" (\obj -> ((((GHC.Base.pure GetInvoicesUpcomingParametersQueryCustomerDetails' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "address")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "shipping")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "tax")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "tax_exempt")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "tax_ids")) -- | Create a new 'GetInvoicesUpcomingParametersQueryCustomerDetails'' with all required fields. mkGetInvoicesUpcomingParametersQueryCustomerDetails' :: GetInvoicesUpcomingParametersQueryCustomerDetails' mkGetInvoicesUpcomingParametersQueryCustomerDetails' = GetInvoicesUpcomingParametersQueryCustomerDetails' { getInvoicesUpcomingParametersQueryCustomerDetails'Address = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQueryCustomerDetails'Shipping = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQueryCustomerDetails'Tax = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQueryCustomerDetails'TaxExempt = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQueryCustomerDetails'TaxIds = GHC.Maybe.Nothing } -- | Defines the object schema located at @paths.\/v1\/invoices\/upcoming.GET.parameters.properties.queryCustomer_details.properties.address.anyOf@ in the specification. data GetInvoicesUpcomingParametersQueryCustomerDetails'Address'OneOf1 = GetInvoicesUpcomingParametersQueryCustomerDetails'Address'OneOf1 { -- | city -- -- Constraints: -- -- * Maximum length of 5000 getInvoicesUpcomingParametersQueryCustomerDetails'Address'OneOf1City :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | country -- -- Constraints: -- -- * Maximum length of 5000 getInvoicesUpcomingParametersQueryCustomerDetails'Address'OneOf1Country :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | line1 -- -- Constraints: -- -- * Maximum length of 5000 getInvoicesUpcomingParametersQueryCustomerDetails'Address'OneOf1Line1 :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | line2 -- -- Constraints: -- -- * Maximum length of 5000 getInvoicesUpcomingParametersQueryCustomerDetails'Address'OneOf1Line2 :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | postal_code -- -- Constraints: -- -- * Maximum length of 5000 getInvoicesUpcomingParametersQueryCustomerDetails'Address'OneOf1PostalCode :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | state -- -- Constraints: -- -- * Maximum length of 5000 getInvoicesUpcomingParametersQueryCustomerDetails'Address'OneOf1State :: (GHC.Maybe.Maybe Data.Text.Internal.Text) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON GetInvoicesUpcomingParametersQueryCustomerDetails'Address'OneOf1 where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("city" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomerDetails'Address'OneOf1City obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("country" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomerDetails'Address'OneOf1Country obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("line1" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomerDetails'Address'OneOf1Line1 obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("line2" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomerDetails'Address'OneOf1Line2 obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("postal_code" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomerDetails'Address'OneOf1PostalCode obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("state" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomerDetails'Address'OneOf1State obj) : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("city" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomerDetails'Address'OneOf1City obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("country" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomerDetails'Address'OneOf1Country obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("line1" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomerDetails'Address'OneOf1Line1 obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("line2" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomerDetails'Address'OneOf1Line2 obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("postal_code" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomerDetails'Address'OneOf1PostalCode obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("state" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomerDetails'Address'OneOf1State obj) : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON GetInvoicesUpcomingParametersQueryCustomerDetails'Address'OneOf1 where parseJSON = Data.Aeson.Types.FromJSON.withObject "GetInvoicesUpcomingParametersQueryCustomerDetails'Address'OneOf1" (\obj -> (((((GHC.Base.pure GetInvoicesUpcomingParametersQueryCustomerDetails'Address'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "city")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "country")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "line1")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "line2")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "postal_code")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "state")) -- | Create a new 'GetInvoicesUpcomingParametersQueryCustomerDetails'Address'OneOf1' with all required fields. mkGetInvoicesUpcomingParametersQueryCustomerDetails'Address'OneOf1 :: GetInvoicesUpcomingParametersQueryCustomerDetails'Address'OneOf1 mkGetInvoicesUpcomingParametersQueryCustomerDetails'Address'OneOf1 = GetInvoicesUpcomingParametersQueryCustomerDetails'Address'OneOf1 { getInvoicesUpcomingParametersQueryCustomerDetails'Address'OneOf1City = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQueryCustomerDetails'Address'OneOf1Country = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQueryCustomerDetails'Address'OneOf1Line1 = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQueryCustomerDetails'Address'OneOf1Line2 = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQueryCustomerDetails'Address'OneOf1PostalCode = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQueryCustomerDetails'Address'OneOf1State = GHC.Maybe.Nothing } -- | Defines the oneOf schema located at @paths.\/v1\/invoices\/upcoming.GET.parameters.properties.queryCustomer_details.properties.address.anyOf@ in the specification. data GetInvoicesUpcomingParametersQueryCustomerDetails'Address'Variants = -- | Represents the JSON value @""@ GetInvoicesUpcomingParametersQueryCustomerDetails'Address'EmptyString | GetInvoicesUpcomingParametersQueryCustomerDetails'Address'GetInvoicesUpcomingParametersQueryCustomerDetails'Address'OneOf1 GetInvoicesUpcomingParametersQueryCustomerDetails'Address'OneOf1 deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON GetInvoicesUpcomingParametersQueryCustomerDetails'Address'Variants where toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'Address'GetInvoicesUpcomingParametersQueryCustomerDetails'Address'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'Address'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON GetInvoicesUpcomingParametersQueryCustomerDetails'Address'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure GetInvoicesUpcomingParametersQueryCustomerDetails'Address'EmptyString | GHC.Base.otherwise -> case (GetInvoicesUpcomingParametersQueryCustomerDetails'Address'GetInvoicesUpcomingParametersQueryCustomerDetails'Address'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\/invoices\/upcoming.GET.parameters.properties.queryCustomer_details.properties.shipping.anyOf@ in the specification. data GetInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1 = GetInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1 { -- | address getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address :: GetInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address', -- | name -- -- Constraints: -- -- * Maximum length of 5000 getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Name :: Data.Text.Internal.Text, -- | phone -- -- Constraints: -- -- * Maximum length of 5000 getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Phone :: (GHC.Maybe.Maybe Data.Text.Internal.Text) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON GetInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1 where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (["address" Data.Aeson.Types.ToJSON..= getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address obj] : ["name" Data.Aeson.Types.ToJSON..= getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Name obj] : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("phone" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Phone obj) : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (["address" Data.Aeson.Types.ToJSON..= getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address obj] : ["name" Data.Aeson.Types.ToJSON..= getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Name obj] : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("phone" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Phone obj) : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON GetInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1 where parseJSON = Data.Aeson.Types.FromJSON.withObject "GetInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1" (\obj -> ((GHC.Base.pure GetInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "address")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "name")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "phone")) -- | Create a new 'GetInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1' with all required fields. mkGetInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1 :: -- | 'getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address' GetInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address' -> -- | 'getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Name' Data.Text.Internal.Text -> GetInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1 mkGetInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1 getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Name = GetInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1 { getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address = getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address, getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Name = getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Name, getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Phone = GHC.Maybe.Nothing } -- | Defines the object schema located at @paths.\/v1\/invoices\/upcoming.GET.parameters.properties.queryCustomer_details.properties.shipping.anyOf.properties.address@ in the specification. data GetInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address' = GetInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address' { -- | city -- -- Constraints: -- -- * Maximum length of 5000 getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address'City :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | country -- -- Constraints: -- -- * Maximum length of 5000 getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address'Country :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | line1 -- -- Constraints: -- -- * Maximum length of 5000 getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address'Line1 :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | line2 -- -- Constraints: -- -- * Maximum length of 5000 getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address'Line2 :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | postal_code -- -- Constraints: -- -- * Maximum length of 5000 getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address'PostalCode :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | state -- -- Constraints: -- -- * Maximum length of 5000 getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address'State :: (GHC.Maybe.Maybe Data.Text.Internal.Text) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON GetInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address' where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("city" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address'City obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("country" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address'Country obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("line1" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address'Line1 obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("line2" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address'Line2 obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("postal_code" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address'PostalCode obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("state" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address'State obj) : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("city" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address'City obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("country" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address'Country obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("line1" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address'Line1 obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("line2" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address'Line2 obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("postal_code" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address'PostalCode obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("state" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address'State obj) : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON GetInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address' where parseJSON = Data.Aeson.Types.FromJSON.withObject "GetInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address'" (\obj -> (((((GHC.Base.pure GetInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "city")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "country")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "line1")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "line2")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "postal_code")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "state")) -- | Create a new 'GetInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address'' with all required fields. mkGetInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address' :: GetInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address' mkGetInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address' = GetInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address' { getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address'City = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address'Country = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address'Line1 = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address'Line2 = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address'PostalCode = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1Address'State = GHC.Maybe.Nothing } -- | Defines the oneOf schema located at @paths.\/v1\/invoices\/upcoming.GET.parameters.properties.queryCustomer_details.properties.shipping.anyOf@ in the specification. data GetInvoicesUpcomingParametersQueryCustomerDetails'Shipping'Variants = -- | Represents the JSON value @""@ GetInvoicesUpcomingParametersQueryCustomerDetails'Shipping'EmptyString | GetInvoicesUpcomingParametersQueryCustomerDetails'Shipping'GetInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1 GetInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1 deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON GetInvoicesUpcomingParametersQueryCustomerDetails'Shipping'Variants where toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'Shipping'GetInvoicesUpcomingParametersQueryCustomerDetails'Shipping'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'Shipping'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON GetInvoicesUpcomingParametersQueryCustomerDetails'Shipping'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure GetInvoicesUpcomingParametersQueryCustomerDetails'Shipping'EmptyString | GHC.Base.otherwise -> case (GetInvoicesUpcomingParametersQueryCustomerDetails'Shipping'GetInvoicesUpcomingParametersQueryCustomerDetails'Shipping'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\/invoices\/upcoming.GET.parameters.properties.queryCustomer_details.properties.tax@ in the specification. data GetInvoicesUpcomingParametersQueryCustomerDetails'Tax' = GetInvoicesUpcomingParametersQueryCustomerDetails'Tax' { -- | ip_address getInvoicesUpcomingParametersQueryCustomerDetails'Tax'IpAddress :: (GHC.Maybe.Maybe GetInvoicesUpcomingParametersQueryCustomerDetails'Tax'IpAddress'Variants) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON GetInvoicesUpcomingParametersQueryCustomerDetails'Tax' where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("ip_address" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomerDetails'Tax'IpAddress obj) : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("ip_address" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryCustomerDetails'Tax'IpAddress obj) : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON GetInvoicesUpcomingParametersQueryCustomerDetails'Tax' where parseJSON = Data.Aeson.Types.FromJSON.withObject "GetInvoicesUpcomingParametersQueryCustomerDetails'Tax'" (\obj -> GHC.Base.pure GetInvoicesUpcomingParametersQueryCustomerDetails'Tax' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "ip_address")) -- | Create a new 'GetInvoicesUpcomingParametersQueryCustomerDetails'Tax'' with all required fields. mkGetInvoicesUpcomingParametersQueryCustomerDetails'Tax' :: GetInvoicesUpcomingParametersQueryCustomerDetails'Tax' mkGetInvoicesUpcomingParametersQueryCustomerDetails'Tax' = GetInvoicesUpcomingParametersQueryCustomerDetails'Tax' {getInvoicesUpcomingParametersQueryCustomerDetails'Tax'IpAddress = GHC.Maybe.Nothing} -- | Defines the oneOf schema located at @paths.\/v1\/invoices\/upcoming.GET.parameters.properties.queryCustomer_details.properties.tax.properties.ip_address.anyOf@ in the specification. data GetInvoicesUpcomingParametersQueryCustomerDetails'Tax'IpAddress'Variants = -- | Represents the JSON value @""@ GetInvoicesUpcomingParametersQueryCustomerDetails'Tax'IpAddress'EmptyString | GetInvoicesUpcomingParametersQueryCustomerDetails'Tax'IpAddress'Text Data.Text.Internal.Text deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON GetInvoicesUpcomingParametersQueryCustomerDetails'Tax'IpAddress'Variants where toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'Tax'IpAddress'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'Tax'IpAddress'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON GetInvoicesUpcomingParametersQueryCustomerDetails'Tax'IpAddress'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure GetInvoicesUpcomingParametersQueryCustomerDetails'Tax'IpAddress'EmptyString | GHC.Base.otherwise -> case (GetInvoicesUpcomingParametersQueryCustomerDetails'Tax'IpAddress'Text 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\/invoices\/upcoming.GET.parameters.properties.queryCustomer_details.properties.tax_exempt@ in the specification. data GetInvoicesUpcomingParametersQueryCustomerDetails'TaxExempt' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. GetInvoicesUpcomingParametersQueryCustomerDetails'TaxExempt'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. GetInvoicesUpcomingParametersQueryCustomerDetails'TaxExempt'Typed Data.Text.Internal.Text | -- | Represents the JSON value @""@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxExempt'EnumEmptyString | -- | Represents the JSON value @"exempt"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxExempt'EnumExempt | -- | Represents the JSON value @"none"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxExempt'EnumNone | -- | Represents the JSON value @"reverse"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxExempt'EnumReverse deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON GetInvoicesUpcomingParametersQueryCustomerDetails'TaxExempt' where toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxExempt'Other val) = val toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxExempt'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxExempt'EnumEmptyString) = "" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxExempt'EnumExempt) = "exempt" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxExempt'EnumNone) = "none" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxExempt'EnumReverse) = "reverse" instance Data.Aeson.Types.FromJSON.FromJSON GetInvoicesUpcomingParametersQueryCustomerDetails'TaxExempt' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxExempt'EnumEmptyString | val GHC.Classes.== "exempt" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxExempt'EnumExempt | val GHC.Classes.== "none" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxExempt'EnumNone | val GHC.Classes.== "reverse" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxExempt'EnumReverse | GHC.Base.otherwise -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxExempt'Other val ) -- | Defines the object schema located at @paths.\/v1\/invoices\/upcoming.GET.parameters.properties.queryCustomer_details.properties.tax_ids.items@ in the specification. data GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds' = GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds' { -- | type -- -- Constraints: -- -- * Maximum length of 5000 getInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type :: GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type', -- | value getInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Value :: Data.Text.Internal.Text } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds' where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (["type" Data.Aeson.Types.ToJSON..= getInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type obj] : ["value" Data.Aeson.Types.ToJSON..= getInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Value obj] : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (["type" Data.Aeson.Types.ToJSON..= getInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type obj] : ["value" Data.Aeson.Types.ToJSON..= getInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Value obj] : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds' where parseJSON = Data.Aeson.Types.FromJSON.withObject "GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'" (\obj -> (GHC.Base.pure GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "type")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "value")) -- | Create a new 'GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'' with all required fields. mkGetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds' :: -- | 'getInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type' GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type' -> -- | 'getInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Value' Data.Text.Internal.Text -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds' mkGetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds' getInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type getInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Value = GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds' { getInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type = getInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type, getInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Value = getInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Value } -- | Defines the enum schema located at @paths.\/v1\/invoices\/upcoming.GET.parameters.properties.queryCustomer_details.properties.tax_ids.items.properties.type@ in the specification. data GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'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. GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"ae_trn"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumAeTrn | -- | Represents the JSON value @"au_abn"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumAuAbn | -- | Represents the JSON value @"au_arn"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumAuArn | -- | Represents the JSON value @"bg_uic"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumBgUic | -- | Represents the JSON value @"br_cnpj"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumBrCnpj | -- | Represents the JSON value @"br_cpf"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumBrCpf | -- | Represents the JSON value @"ca_bn"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumCaBn | -- | Represents the JSON value @"ca_gst_hst"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumCaGstHst | -- | Represents the JSON value @"ca_pst_bc"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumCaPstBc | -- | Represents the JSON value @"ca_pst_mb"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumCaPstMb | -- | Represents the JSON value @"ca_pst_sk"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumCaPstSk | -- | Represents the JSON value @"ca_qst"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumCaQst | -- | Represents the JSON value @"ch_vat"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumChVat | -- | Represents the JSON value @"cl_tin"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumClTin | -- | Represents the JSON value @"es_cif"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumEsCif | -- | Represents the JSON value @"eu_oss_vat"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumEuOssVat | -- | Represents the JSON value @"eu_vat"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumEuVat | -- | Represents the JSON value @"gb_vat"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumGbVat | -- | Represents the JSON value @"ge_vat"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumGeVat | -- | Represents the JSON value @"hk_br"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumHkBr | -- | Represents the JSON value @"hu_tin"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumHuTin | -- | Represents the JSON value @"id_npwp"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumIdNpwp | -- | Represents the JSON value @"il_vat"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumIlVat | -- | Represents the JSON value @"in_gst"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumInGst | -- | Represents the JSON value @"is_vat"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumIsVat | -- | Represents the JSON value @"jp_cn"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumJpCn | -- | Represents the JSON value @"jp_rn"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumJpRn | -- | Represents the JSON value @"kr_brn"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumKrBrn | -- | Represents the JSON value @"li_uid"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumLiUid | -- | Represents the JSON value @"mx_rfc"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumMxRfc | -- | Represents the JSON value @"my_frp"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumMyFrp | -- | Represents the JSON value @"my_itn"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumMyItn | -- | Represents the JSON value @"my_sst"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumMySst | -- | Represents the JSON value @"no_vat"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumNoVat | -- | Represents the JSON value @"nz_gst"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumNzGst | -- | Represents the JSON value @"ru_inn"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumRuInn | -- | Represents the JSON value @"ru_kpp"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumRuKpp | -- | Represents the JSON value @"sa_vat"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumSaVat | -- | Represents the JSON value @"sg_gst"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumSgGst | -- | Represents the JSON value @"sg_uen"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumSgUen | -- | Represents the JSON value @"si_tin"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumSiTin | -- | Represents the JSON value @"th_vat"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumThVat | -- | Represents the JSON value @"tw_vat"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumTwVat | -- | Represents the JSON value @"ua_vat"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumUaVat | -- | Represents the JSON value @"us_ein"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumUsEin | -- | Represents the JSON value @"za_vat"@ GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumZaVat deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type' where toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'Other val) = val toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumAeTrn) = "ae_trn" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumAuAbn) = "au_abn" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumAuArn) = "au_arn" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumBgUic) = "bg_uic" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumBrCnpj) = "br_cnpj" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumBrCpf) = "br_cpf" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumCaBn) = "ca_bn" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumCaGstHst) = "ca_gst_hst" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumCaPstBc) = "ca_pst_bc" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumCaPstMb) = "ca_pst_mb" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumCaPstSk) = "ca_pst_sk" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumCaQst) = "ca_qst" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumChVat) = "ch_vat" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumClTin) = "cl_tin" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumEsCif) = "es_cif" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumEuOssVat) = "eu_oss_vat" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumEuVat) = "eu_vat" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumGbVat) = "gb_vat" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumGeVat) = "ge_vat" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumHkBr) = "hk_br" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumHuTin) = "hu_tin" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumIdNpwp) = "id_npwp" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumIlVat) = "il_vat" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumInGst) = "in_gst" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumIsVat) = "is_vat" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumJpCn) = "jp_cn" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumJpRn) = "jp_rn" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumKrBrn) = "kr_brn" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumLiUid) = "li_uid" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumMxRfc) = "mx_rfc" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumMyFrp) = "my_frp" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumMyItn) = "my_itn" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumMySst) = "my_sst" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumNoVat) = "no_vat" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumNzGst) = "nz_gst" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumRuInn) = "ru_inn" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumRuKpp) = "ru_kpp" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumSaVat) = "sa_vat" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumSgGst) = "sg_gst" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumSgUen) = "sg_uen" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumSiTin) = "si_tin" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumThVat) = "th_vat" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumTwVat) = "tw_vat" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumUaVat) = "ua_vat" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumUsEin) = "us_ein" toJSON (GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumZaVat) = "za_vat" instance Data.Aeson.Types.FromJSON.FromJSON GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "ae_trn" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumAeTrn | val GHC.Classes.== "au_abn" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumAuAbn | val GHC.Classes.== "au_arn" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumAuArn | val GHC.Classes.== "bg_uic" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumBgUic | val GHC.Classes.== "br_cnpj" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumBrCnpj | val GHC.Classes.== "br_cpf" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumBrCpf | val GHC.Classes.== "ca_bn" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumCaBn | val GHC.Classes.== "ca_gst_hst" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumCaGstHst | val GHC.Classes.== "ca_pst_bc" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumCaPstBc | val GHC.Classes.== "ca_pst_mb" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumCaPstMb | val GHC.Classes.== "ca_pst_sk" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumCaPstSk | val GHC.Classes.== "ca_qst" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumCaQst | val GHC.Classes.== "ch_vat" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumChVat | val GHC.Classes.== "cl_tin" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumClTin | val GHC.Classes.== "es_cif" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumEsCif | val GHC.Classes.== "eu_oss_vat" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumEuOssVat | val GHC.Classes.== "eu_vat" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumEuVat | val GHC.Classes.== "gb_vat" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumGbVat | val GHC.Classes.== "ge_vat" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumGeVat | val GHC.Classes.== "hk_br" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumHkBr | val GHC.Classes.== "hu_tin" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumHuTin | val GHC.Classes.== "id_npwp" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumIdNpwp | val GHC.Classes.== "il_vat" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumIlVat | val GHC.Classes.== "in_gst" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumInGst | val GHC.Classes.== "is_vat" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumIsVat | val GHC.Classes.== "jp_cn" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumJpCn | val GHC.Classes.== "jp_rn" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumJpRn | val GHC.Classes.== "kr_brn" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumKrBrn | val GHC.Classes.== "li_uid" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumLiUid | val GHC.Classes.== "mx_rfc" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumMxRfc | val GHC.Classes.== "my_frp" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumMyFrp | val GHC.Classes.== "my_itn" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumMyItn | val GHC.Classes.== "my_sst" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumMySst | val GHC.Classes.== "no_vat" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumNoVat | val GHC.Classes.== "nz_gst" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumNzGst | val GHC.Classes.== "ru_inn" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumRuInn | val GHC.Classes.== "ru_kpp" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumRuKpp | val GHC.Classes.== "sa_vat" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumSaVat | val GHC.Classes.== "sg_gst" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumSgGst | val GHC.Classes.== "sg_uen" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumSgUen | val GHC.Classes.== "si_tin" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumSiTin | val GHC.Classes.== "th_vat" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumThVat | val GHC.Classes.== "tw_vat" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumTwVat | val GHC.Classes.== "ua_vat" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumUaVat | val GHC.Classes.== "us_ein" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumUsEin | val GHC.Classes.== "za_vat" -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'EnumZaVat | GHC.Base.otherwise -> GetInvoicesUpcomingParametersQueryCustomerDetails'TaxIds'Type'Other val ) -- | Defines the object schema located at @paths.\/v1\/invoices\/upcoming.GET.parameters.properties.queryDiscounts.anyOf.items@ in the specification. data GetInvoicesUpcomingParametersQueryDiscounts'OneOf1 = GetInvoicesUpcomingParametersQueryDiscounts'OneOf1 { -- | coupon -- -- Constraints: -- -- * Maximum length of 5000 getInvoicesUpcomingParametersQueryDiscounts'OneOf1Coupon :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | discount -- -- Constraints: -- -- * Maximum length of 5000 getInvoicesUpcomingParametersQueryDiscounts'OneOf1Discount :: (GHC.Maybe.Maybe Data.Text.Internal.Text) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON GetInvoicesUpcomingParametersQueryDiscounts'OneOf1 where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("coupon" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryDiscounts'OneOf1Coupon obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("discount" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryDiscounts'OneOf1Discount obj) : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("coupon" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryDiscounts'OneOf1Coupon obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("discount" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryDiscounts'OneOf1Discount obj) : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON GetInvoicesUpcomingParametersQueryDiscounts'OneOf1 where parseJSON = Data.Aeson.Types.FromJSON.withObject "GetInvoicesUpcomingParametersQueryDiscounts'OneOf1" (\obj -> (GHC.Base.pure GetInvoicesUpcomingParametersQueryDiscounts'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "coupon")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "discount")) -- | Create a new 'GetInvoicesUpcomingParametersQueryDiscounts'OneOf1' with all required fields. mkGetInvoicesUpcomingParametersQueryDiscounts'OneOf1 :: GetInvoicesUpcomingParametersQueryDiscounts'OneOf1 mkGetInvoicesUpcomingParametersQueryDiscounts'OneOf1 = GetInvoicesUpcomingParametersQueryDiscounts'OneOf1 { getInvoicesUpcomingParametersQueryDiscounts'OneOf1Coupon = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQueryDiscounts'OneOf1Discount = GHC.Maybe.Nothing } -- | Defines the oneOf schema located at @paths.\/v1\/invoices\/upcoming.GET.parameters.properties.queryDiscounts.anyOf@ in the specification. -- -- Represents the parameter named \'discounts\' -- -- The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the customer or subscription. This only works for coupons directly applied to the invoice. To apply a coupon to a subscription, you must use the \`coupon\` parameter instead. Pass an empty string to avoid inheriting any discounts. To preview the upcoming invoice for a subscription that hasn\'t been created, use \`coupon\` instead. data GetInvoicesUpcomingParametersQueryDiscounts'Variants = -- | Represents the JSON value @""@ GetInvoicesUpcomingParametersQueryDiscounts'EmptyString | GetInvoicesUpcomingParametersQueryDiscounts'ListTGetInvoicesUpcomingParametersQueryDiscounts'OneOf1 ([GetInvoicesUpcomingParametersQueryDiscounts'OneOf1]) deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON GetInvoicesUpcomingParametersQueryDiscounts'Variants where toJSON (GetInvoicesUpcomingParametersQueryDiscounts'ListTGetInvoicesUpcomingParametersQueryDiscounts'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (GetInvoicesUpcomingParametersQueryDiscounts'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON GetInvoicesUpcomingParametersQueryDiscounts'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure GetInvoicesUpcomingParametersQueryDiscounts'EmptyString | GHC.Base.otherwise -> case (GetInvoicesUpcomingParametersQueryDiscounts'ListTGetInvoicesUpcomingParametersQueryDiscounts'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\/invoices\/upcoming.GET.parameters.properties.queryInvoice_items.items@ in the specification. data GetInvoicesUpcomingParametersQueryInvoiceItems' = GetInvoicesUpcomingParametersQueryInvoiceItems' { -- | amount getInvoicesUpcomingParametersQueryInvoiceItems'Amount :: (GHC.Maybe.Maybe GHC.Types.Int), -- | currency getInvoicesUpcomingParametersQueryInvoiceItems'Currency :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | description -- -- Constraints: -- -- * Maximum length of 5000 getInvoicesUpcomingParametersQueryInvoiceItems'Description :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | discountable getInvoicesUpcomingParametersQueryInvoiceItems'Discountable :: (GHC.Maybe.Maybe GHC.Types.Bool), -- | discounts getInvoicesUpcomingParametersQueryInvoiceItems'Discounts :: (GHC.Maybe.Maybe GetInvoicesUpcomingParametersQueryInvoiceItems'Discounts'Variants), -- | invoiceitem -- -- Constraints: -- -- * Maximum length of 5000 getInvoicesUpcomingParametersQueryInvoiceItems'Invoiceitem :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | metadata getInvoicesUpcomingParametersQueryInvoiceItems'Metadata :: (GHC.Maybe.Maybe GetInvoicesUpcomingParametersQueryInvoiceItems'Metadata'Variants), -- | period getInvoicesUpcomingParametersQueryInvoiceItems'Period :: (GHC.Maybe.Maybe GetInvoicesUpcomingParametersQueryInvoiceItems'Period'), -- | price -- -- Constraints: -- -- * Maximum length of 5000 getInvoicesUpcomingParametersQueryInvoiceItems'Price :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | price_data getInvoicesUpcomingParametersQueryInvoiceItems'PriceData :: (GHC.Maybe.Maybe GetInvoicesUpcomingParametersQueryInvoiceItems'PriceData'), -- | quantity getInvoicesUpcomingParametersQueryInvoiceItems'Quantity :: (GHC.Maybe.Maybe GHC.Types.Int), -- | tax_rates getInvoicesUpcomingParametersQueryInvoiceItems'TaxRates :: (GHC.Maybe.Maybe GetInvoicesUpcomingParametersQueryInvoiceItems'TaxRates'Variants), -- | unit_amount getInvoicesUpcomingParametersQueryInvoiceItems'UnitAmount :: (GHC.Maybe.Maybe GHC.Types.Int), -- | unit_amount_decimal getInvoicesUpcomingParametersQueryInvoiceItems'UnitAmountDecimal :: (GHC.Maybe.Maybe Data.Text.Internal.Text) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON GetInvoicesUpcomingParametersQueryInvoiceItems' where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("amount" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryInvoiceItems'Amount obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("currency" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryInvoiceItems'Currency obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("description" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryInvoiceItems'Description obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("discountable" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryInvoiceItems'Discountable obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("discounts" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryInvoiceItems'Discounts obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("invoiceitem" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryInvoiceItems'Invoiceitem obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("metadata" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryInvoiceItems'Metadata obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("period" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryInvoiceItems'Period obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("price" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryInvoiceItems'Price obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("price_data" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryInvoiceItems'PriceData obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("quantity" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryInvoiceItems'Quantity obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("tax_rates" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryInvoiceItems'TaxRates obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("unit_amount" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryInvoiceItems'UnitAmount obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("unit_amount_decimal" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryInvoiceItems'UnitAmountDecimal obj) : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("amount" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryInvoiceItems'Amount obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("currency" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryInvoiceItems'Currency obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("description" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryInvoiceItems'Description obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("discountable" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryInvoiceItems'Discountable obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("discounts" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryInvoiceItems'Discounts obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("invoiceitem" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryInvoiceItems'Invoiceitem obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("metadata" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryInvoiceItems'Metadata obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("period" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryInvoiceItems'Period obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("price" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryInvoiceItems'Price obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("price_data" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryInvoiceItems'PriceData obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("quantity" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryInvoiceItems'Quantity obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("tax_rates" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryInvoiceItems'TaxRates obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("unit_amount" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryInvoiceItems'UnitAmount obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("unit_amount_decimal" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryInvoiceItems'UnitAmountDecimal obj) : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON GetInvoicesUpcomingParametersQueryInvoiceItems' where parseJSON = Data.Aeson.Types.FromJSON.withObject "GetInvoicesUpcomingParametersQueryInvoiceItems'" (\obj -> (((((((((((((GHC.Base.pure GetInvoicesUpcomingParametersQueryInvoiceItems' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "amount")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "currency")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "description")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "discountable")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "discounts")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "invoiceitem")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "metadata")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "period")) 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")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "unit_amount")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "unit_amount_decimal")) -- | Create a new 'GetInvoicesUpcomingParametersQueryInvoiceItems'' with all required fields. mkGetInvoicesUpcomingParametersQueryInvoiceItems' :: GetInvoicesUpcomingParametersQueryInvoiceItems' mkGetInvoicesUpcomingParametersQueryInvoiceItems' = GetInvoicesUpcomingParametersQueryInvoiceItems' { getInvoicesUpcomingParametersQueryInvoiceItems'Amount = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQueryInvoiceItems'Currency = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQueryInvoiceItems'Description = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQueryInvoiceItems'Discountable = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQueryInvoiceItems'Discounts = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQueryInvoiceItems'Invoiceitem = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQueryInvoiceItems'Metadata = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQueryInvoiceItems'Period = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQueryInvoiceItems'Price = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQueryInvoiceItems'PriceData = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQueryInvoiceItems'Quantity = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQueryInvoiceItems'TaxRates = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQueryInvoiceItems'UnitAmount = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQueryInvoiceItems'UnitAmountDecimal = GHC.Maybe.Nothing } -- | Defines the object schema located at @paths.\/v1\/invoices\/upcoming.GET.parameters.properties.queryInvoice_items.items.properties.discounts.anyOf.items@ in the specification. data GetInvoicesUpcomingParametersQueryInvoiceItems'Discounts'OneOf1 = GetInvoicesUpcomingParametersQueryInvoiceItems'Discounts'OneOf1 { -- | coupon -- -- Constraints: -- -- * Maximum length of 5000 getInvoicesUpcomingParametersQueryInvoiceItems'Discounts'OneOf1Coupon :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | discount -- -- Constraints: -- -- * Maximum length of 5000 getInvoicesUpcomingParametersQueryInvoiceItems'Discounts'OneOf1Discount :: (GHC.Maybe.Maybe Data.Text.Internal.Text) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON GetInvoicesUpcomingParametersQueryInvoiceItems'Discounts'OneOf1 where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("coupon" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryInvoiceItems'Discounts'OneOf1Coupon obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("discount" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryInvoiceItems'Discounts'OneOf1Discount obj) : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("coupon" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryInvoiceItems'Discounts'OneOf1Coupon obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("discount" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryInvoiceItems'Discounts'OneOf1Discount obj) : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON GetInvoicesUpcomingParametersQueryInvoiceItems'Discounts'OneOf1 where parseJSON = Data.Aeson.Types.FromJSON.withObject "GetInvoicesUpcomingParametersQueryInvoiceItems'Discounts'OneOf1" (\obj -> (GHC.Base.pure GetInvoicesUpcomingParametersQueryInvoiceItems'Discounts'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "coupon")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "discount")) -- | Create a new 'GetInvoicesUpcomingParametersQueryInvoiceItems'Discounts'OneOf1' with all required fields. mkGetInvoicesUpcomingParametersQueryInvoiceItems'Discounts'OneOf1 :: GetInvoicesUpcomingParametersQueryInvoiceItems'Discounts'OneOf1 mkGetInvoicesUpcomingParametersQueryInvoiceItems'Discounts'OneOf1 = GetInvoicesUpcomingParametersQueryInvoiceItems'Discounts'OneOf1 { getInvoicesUpcomingParametersQueryInvoiceItems'Discounts'OneOf1Coupon = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQueryInvoiceItems'Discounts'OneOf1Discount = GHC.Maybe.Nothing } -- | Defines the oneOf schema located at @paths.\/v1\/invoices\/upcoming.GET.parameters.properties.queryInvoice_items.items.properties.discounts.anyOf@ in the specification. data GetInvoicesUpcomingParametersQueryInvoiceItems'Discounts'Variants = -- | Represents the JSON value @""@ GetInvoicesUpcomingParametersQueryInvoiceItems'Discounts'EmptyString | GetInvoicesUpcomingParametersQueryInvoiceItems'Discounts'ListTGetInvoicesUpcomingParametersQueryInvoiceItems'Discounts'OneOf1 ([GetInvoicesUpcomingParametersQueryInvoiceItems'Discounts'OneOf1]) deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON GetInvoicesUpcomingParametersQueryInvoiceItems'Discounts'Variants where toJSON (GetInvoicesUpcomingParametersQueryInvoiceItems'Discounts'ListTGetInvoicesUpcomingParametersQueryInvoiceItems'Discounts'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (GetInvoicesUpcomingParametersQueryInvoiceItems'Discounts'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON GetInvoicesUpcomingParametersQueryInvoiceItems'Discounts'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure GetInvoicesUpcomingParametersQueryInvoiceItems'Discounts'EmptyString | GHC.Base.otherwise -> case (GetInvoicesUpcomingParametersQueryInvoiceItems'Discounts'ListTGetInvoicesUpcomingParametersQueryInvoiceItems'Discounts'OneOf1 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a -- | Defines the oneOf schema located at @paths.\/v1\/invoices\/upcoming.GET.parameters.properties.queryInvoice_items.items.properties.metadata.anyOf@ in the specification. data GetInvoicesUpcomingParametersQueryInvoiceItems'Metadata'Variants = -- | Represents the JSON value @""@ GetInvoicesUpcomingParametersQueryInvoiceItems'Metadata'EmptyString | GetInvoicesUpcomingParametersQueryInvoiceItems'Metadata'Object Data.Aeson.Types.Internal.Object deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON GetInvoicesUpcomingParametersQueryInvoiceItems'Metadata'Variants where toJSON (GetInvoicesUpcomingParametersQueryInvoiceItems'Metadata'Object a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (GetInvoicesUpcomingParametersQueryInvoiceItems'Metadata'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON GetInvoicesUpcomingParametersQueryInvoiceItems'Metadata'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure GetInvoicesUpcomingParametersQueryInvoiceItems'Metadata'EmptyString | GHC.Base.otherwise -> case (GetInvoicesUpcomingParametersQueryInvoiceItems'Metadata'Object Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a -- | Defines the object schema located at @paths.\/v1\/invoices\/upcoming.GET.parameters.properties.queryInvoice_items.items.properties.period@ in the specification. data GetInvoicesUpcomingParametersQueryInvoiceItems'Period' = GetInvoicesUpcomingParametersQueryInvoiceItems'Period' { -- | end getInvoicesUpcomingParametersQueryInvoiceItems'Period'End :: GHC.Types.Int, -- | start getInvoicesUpcomingParametersQueryInvoiceItems'Period'Start :: GHC.Types.Int } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON GetInvoicesUpcomingParametersQueryInvoiceItems'Period' where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (["end" Data.Aeson.Types.ToJSON..= getInvoicesUpcomingParametersQueryInvoiceItems'Period'End obj] : ["start" Data.Aeson.Types.ToJSON..= getInvoicesUpcomingParametersQueryInvoiceItems'Period'Start obj] : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (["end" Data.Aeson.Types.ToJSON..= getInvoicesUpcomingParametersQueryInvoiceItems'Period'End obj] : ["start" Data.Aeson.Types.ToJSON..= getInvoicesUpcomingParametersQueryInvoiceItems'Period'Start obj] : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON GetInvoicesUpcomingParametersQueryInvoiceItems'Period' where parseJSON = Data.Aeson.Types.FromJSON.withObject "GetInvoicesUpcomingParametersQueryInvoiceItems'Period'" (\obj -> (GHC.Base.pure GetInvoicesUpcomingParametersQueryInvoiceItems'Period' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "end")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "start")) -- | Create a new 'GetInvoicesUpcomingParametersQueryInvoiceItems'Period'' with all required fields. mkGetInvoicesUpcomingParametersQueryInvoiceItems'Period' :: -- | 'getInvoicesUpcomingParametersQueryInvoiceItems'Period'End' GHC.Types.Int -> -- | 'getInvoicesUpcomingParametersQueryInvoiceItems'Period'Start' GHC.Types.Int -> GetInvoicesUpcomingParametersQueryInvoiceItems'Period' mkGetInvoicesUpcomingParametersQueryInvoiceItems'Period' getInvoicesUpcomingParametersQueryInvoiceItems'Period'End getInvoicesUpcomingParametersQueryInvoiceItems'Period'Start = GetInvoicesUpcomingParametersQueryInvoiceItems'Period' { getInvoicesUpcomingParametersQueryInvoiceItems'Period'End = getInvoicesUpcomingParametersQueryInvoiceItems'Period'End, getInvoicesUpcomingParametersQueryInvoiceItems'Period'Start = getInvoicesUpcomingParametersQueryInvoiceItems'Period'Start } -- | Defines the object schema located at @paths.\/v1\/invoices\/upcoming.GET.parameters.properties.queryInvoice_items.items.properties.price_data@ in the specification. data GetInvoicesUpcomingParametersQueryInvoiceItems'PriceData' = GetInvoicesUpcomingParametersQueryInvoiceItems'PriceData' { -- | currency getInvoicesUpcomingParametersQueryInvoiceItems'PriceData'Currency :: Data.Text.Internal.Text, -- | product -- -- Constraints: -- -- * Maximum length of 5000 getInvoicesUpcomingParametersQueryInvoiceItems'PriceData'Product :: Data.Text.Internal.Text, -- | tax_behavior getInvoicesUpcomingParametersQueryInvoiceItems'PriceData'TaxBehavior :: (GHC.Maybe.Maybe GetInvoicesUpcomingParametersQueryInvoiceItems'PriceData'TaxBehavior'), -- | unit_amount getInvoicesUpcomingParametersQueryInvoiceItems'PriceData'UnitAmount :: (GHC.Maybe.Maybe GHC.Types.Int), -- | unit_amount_decimal getInvoicesUpcomingParametersQueryInvoiceItems'PriceData'UnitAmountDecimal :: (GHC.Maybe.Maybe Data.Text.Internal.Text) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON GetInvoicesUpcomingParametersQueryInvoiceItems'PriceData' where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (["currency" Data.Aeson.Types.ToJSON..= getInvoicesUpcomingParametersQueryInvoiceItems'PriceData'Currency obj] : ["product" Data.Aeson.Types.ToJSON..= getInvoicesUpcomingParametersQueryInvoiceItems'PriceData'Product obj] : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("tax_behavior" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryInvoiceItems'PriceData'TaxBehavior obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("unit_amount" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryInvoiceItems'PriceData'UnitAmount obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("unit_amount_decimal" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryInvoiceItems'PriceData'UnitAmountDecimal obj) : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (["currency" Data.Aeson.Types.ToJSON..= getInvoicesUpcomingParametersQueryInvoiceItems'PriceData'Currency obj] : ["product" Data.Aeson.Types.ToJSON..= getInvoicesUpcomingParametersQueryInvoiceItems'PriceData'Product obj] : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("tax_behavior" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryInvoiceItems'PriceData'TaxBehavior obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("unit_amount" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryInvoiceItems'PriceData'UnitAmount obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("unit_amount_decimal" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQueryInvoiceItems'PriceData'UnitAmountDecimal obj) : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON GetInvoicesUpcomingParametersQueryInvoiceItems'PriceData' where parseJSON = Data.Aeson.Types.FromJSON.withObject "GetInvoicesUpcomingParametersQueryInvoiceItems'PriceData'" (\obj -> ((((GHC.Base.pure GetInvoicesUpcomingParametersQueryInvoiceItems'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 'GetInvoicesUpcomingParametersQueryInvoiceItems'PriceData'' with all required fields. mkGetInvoicesUpcomingParametersQueryInvoiceItems'PriceData' :: -- | 'getInvoicesUpcomingParametersQueryInvoiceItems'PriceData'Currency' Data.Text.Internal.Text -> -- | 'getInvoicesUpcomingParametersQueryInvoiceItems'PriceData'Product' Data.Text.Internal.Text -> GetInvoicesUpcomingParametersQueryInvoiceItems'PriceData' mkGetInvoicesUpcomingParametersQueryInvoiceItems'PriceData' getInvoicesUpcomingParametersQueryInvoiceItems'PriceData'Currency getInvoicesUpcomingParametersQueryInvoiceItems'PriceData'Product = GetInvoicesUpcomingParametersQueryInvoiceItems'PriceData' { getInvoicesUpcomingParametersQueryInvoiceItems'PriceData'Currency = getInvoicesUpcomingParametersQueryInvoiceItems'PriceData'Currency, getInvoicesUpcomingParametersQueryInvoiceItems'PriceData'Product = getInvoicesUpcomingParametersQueryInvoiceItems'PriceData'Product, getInvoicesUpcomingParametersQueryInvoiceItems'PriceData'TaxBehavior = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQueryInvoiceItems'PriceData'UnitAmount = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQueryInvoiceItems'PriceData'UnitAmountDecimal = GHC.Maybe.Nothing } -- | Defines the enum schema located at @paths.\/v1\/invoices\/upcoming.GET.parameters.properties.queryInvoice_items.items.properties.price_data.properties.tax_behavior@ in the specification. data GetInvoicesUpcomingParametersQueryInvoiceItems'PriceData'TaxBehavior' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. GetInvoicesUpcomingParametersQueryInvoiceItems'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. GetInvoicesUpcomingParametersQueryInvoiceItems'PriceData'TaxBehavior'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"exclusive"@ GetInvoicesUpcomingParametersQueryInvoiceItems'PriceData'TaxBehavior'EnumExclusive | -- | Represents the JSON value @"inclusive"@ GetInvoicesUpcomingParametersQueryInvoiceItems'PriceData'TaxBehavior'EnumInclusive | -- | Represents the JSON value @"unspecified"@ GetInvoicesUpcomingParametersQueryInvoiceItems'PriceData'TaxBehavior'EnumUnspecified deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON GetInvoicesUpcomingParametersQueryInvoiceItems'PriceData'TaxBehavior' where toJSON (GetInvoicesUpcomingParametersQueryInvoiceItems'PriceData'TaxBehavior'Other val) = val toJSON (GetInvoicesUpcomingParametersQueryInvoiceItems'PriceData'TaxBehavior'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (GetInvoicesUpcomingParametersQueryInvoiceItems'PriceData'TaxBehavior'EnumExclusive) = "exclusive" toJSON (GetInvoicesUpcomingParametersQueryInvoiceItems'PriceData'TaxBehavior'EnumInclusive) = "inclusive" toJSON (GetInvoicesUpcomingParametersQueryInvoiceItems'PriceData'TaxBehavior'EnumUnspecified) = "unspecified" instance Data.Aeson.Types.FromJSON.FromJSON GetInvoicesUpcomingParametersQueryInvoiceItems'PriceData'TaxBehavior' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "exclusive" -> GetInvoicesUpcomingParametersQueryInvoiceItems'PriceData'TaxBehavior'EnumExclusive | val GHC.Classes.== "inclusive" -> GetInvoicesUpcomingParametersQueryInvoiceItems'PriceData'TaxBehavior'EnumInclusive | val GHC.Classes.== "unspecified" -> GetInvoicesUpcomingParametersQueryInvoiceItems'PriceData'TaxBehavior'EnumUnspecified | GHC.Base.otherwise -> GetInvoicesUpcomingParametersQueryInvoiceItems'PriceData'TaxBehavior'Other val ) -- | Defines the oneOf schema located at @paths.\/v1\/invoices\/upcoming.GET.parameters.properties.queryInvoice_items.items.properties.tax_rates.anyOf@ in the specification. data GetInvoicesUpcomingParametersQueryInvoiceItems'TaxRates'Variants = -- | Represents the JSON value @""@ GetInvoicesUpcomingParametersQueryInvoiceItems'TaxRates'EmptyString | GetInvoicesUpcomingParametersQueryInvoiceItems'TaxRates'ListTText ([Data.Text.Internal.Text]) deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON GetInvoicesUpcomingParametersQueryInvoiceItems'TaxRates'Variants where toJSON (GetInvoicesUpcomingParametersQueryInvoiceItems'TaxRates'ListTText a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (GetInvoicesUpcomingParametersQueryInvoiceItems'TaxRates'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON GetInvoicesUpcomingParametersQueryInvoiceItems'TaxRates'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure GetInvoicesUpcomingParametersQueryInvoiceItems'TaxRates'EmptyString | GHC.Base.otherwise -> case (GetInvoicesUpcomingParametersQueryInvoiceItems'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\/invoices\/upcoming.GET.parameters.properties.querySubscription_billing_cycle_anchor.anyOf@ in the specification. data GetInvoicesUpcomingParametersQuerySubscriptionBillingCycleAnchor'OneOf1 = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. GetInvoicesUpcomingParametersQuerySubscriptionBillingCycleAnchor'OneOf1Other Data.Aeson.Types.Internal.Value | -- | This constructor can be used to send values to the server which are not present in the specification yet. GetInvoicesUpcomingParametersQuerySubscriptionBillingCycleAnchor'OneOf1Typed Data.Text.Internal.Text | -- | Represents the JSON value @"now"@ GetInvoicesUpcomingParametersQuerySubscriptionBillingCycleAnchor'OneOf1EnumNow | -- | Represents the JSON value @"unchanged"@ GetInvoicesUpcomingParametersQuerySubscriptionBillingCycleAnchor'OneOf1EnumUnchanged deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON GetInvoicesUpcomingParametersQuerySubscriptionBillingCycleAnchor'OneOf1 where toJSON (GetInvoicesUpcomingParametersQuerySubscriptionBillingCycleAnchor'OneOf1Other val) = val toJSON (GetInvoicesUpcomingParametersQuerySubscriptionBillingCycleAnchor'OneOf1Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (GetInvoicesUpcomingParametersQuerySubscriptionBillingCycleAnchor'OneOf1EnumNow) = "now" toJSON (GetInvoicesUpcomingParametersQuerySubscriptionBillingCycleAnchor'OneOf1EnumUnchanged) = "unchanged" instance Data.Aeson.Types.FromJSON.FromJSON GetInvoicesUpcomingParametersQuerySubscriptionBillingCycleAnchor'OneOf1 where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "now" -> GetInvoicesUpcomingParametersQuerySubscriptionBillingCycleAnchor'OneOf1EnumNow | val GHC.Classes.== "unchanged" -> GetInvoicesUpcomingParametersQuerySubscriptionBillingCycleAnchor'OneOf1EnumUnchanged | GHC.Base.otherwise -> GetInvoicesUpcomingParametersQuerySubscriptionBillingCycleAnchor'OneOf1Other val ) -- | Defines the oneOf schema located at @paths.\/v1\/invoices\/upcoming.GET.parameters.properties.querySubscription_billing_cycle_anchor.anyOf@ in the specification. -- -- Represents the parameter named \'subscription_billing_cycle_anchor\' -- -- For new subscriptions, a future timestamp to anchor the subscription\'s [billing cycle](https:\/\/stripe.com\/docs\/subscriptions\/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with \`month\` or \`year\` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to \`now\` or \`unchanged\`. data GetInvoicesUpcomingParametersQuerySubscriptionBillingCycleAnchor'Variants = GetInvoicesUpcomingParametersQuerySubscriptionBillingCycleAnchor'GetInvoicesUpcomingParametersQuerySubscriptionBillingCycleAnchor'OneOf1 GetInvoicesUpcomingParametersQuerySubscriptionBillingCycleAnchor'OneOf1 | GetInvoicesUpcomingParametersQuerySubscriptionBillingCycleAnchor'Int GHC.Types.Int deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON GetInvoicesUpcomingParametersQuerySubscriptionBillingCycleAnchor'Variants where toJSON (GetInvoicesUpcomingParametersQuerySubscriptionBillingCycleAnchor'GetInvoicesUpcomingParametersQuerySubscriptionBillingCycleAnchor'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (GetInvoicesUpcomingParametersQuerySubscriptionBillingCycleAnchor'Int a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON GetInvoicesUpcomingParametersQuerySubscriptionBillingCycleAnchor'Variants where parseJSON val = case (GetInvoicesUpcomingParametersQuerySubscriptionBillingCycleAnchor'GetInvoicesUpcomingParametersQuerySubscriptionBillingCycleAnchor'OneOf1 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((GetInvoicesUpcomingParametersQuerySubscriptionBillingCycleAnchor'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 oneOf schema located at @paths.\/v1\/invoices\/upcoming.GET.parameters.properties.querySubscription_cancel_at.anyOf@ in the specification. -- -- Represents the parameter named \'subscription_cancel_at\' -- -- Timestamp indicating when the subscription should be scheduled to cancel. Will prorate if within the current period and prorations have been enabled using \`proration_behavior\`. data GetInvoicesUpcomingParametersQuerySubscriptionCancelAt'Variants = -- | Represents the JSON value @""@ GetInvoicesUpcomingParametersQuerySubscriptionCancelAt'EmptyString | GetInvoicesUpcomingParametersQuerySubscriptionCancelAt'Int GHC.Types.Int deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON GetInvoicesUpcomingParametersQuerySubscriptionCancelAt'Variants where toJSON (GetInvoicesUpcomingParametersQuerySubscriptionCancelAt'Int a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (GetInvoicesUpcomingParametersQuerySubscriptionCancelAt'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON GetInvoicesUpcomingParametersQuerySubscriptionCancelAt'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure GetInvoicesUpcomingParametersQuerySubscriptionCancelAt'EmptyString | GHC.Base.otherwise -> case (GetInvoicesUpcomingParametersQuerySubscriptionCancelAt'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 oneOf schema located at @paths.\/v1\/invoices\/upcoming.GET.parameters.properties.querySubscription_default_tax_rates.anyOf@ in the specification. -- -- Represents the parameter named \'subscription_default_tax_rates\' -- -- If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have \`tax_rates\` set. data GetInvoicesUpcomingParametersQuerySubscriptionDefaultTaxRates'Variants = -- | Represents the JSON value @""@ GetInvoicesUpcomingParametersQuerySubscriptionDefaultTaxRates'EmptyString | GetInvoicesUpcomingParametersQuerySubscriptionDefaultTaxRates'ListTText ([Data.Text.Internal.Text]) deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON GetInvoicesUpcomingParametersQuerySubscriptionDefaultTaxRates'Variants where toJSON (GetInvoicesUpcomingParametersQuerySubscriptionDefaultTaxRates'ListTText a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (GetInvoicesUpcomingParametersQuerySubscriptionDefaultTaxRates'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON GetInvoicesUpcomingParametersQuerySubscriptionDefaultTaxRates'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure GetInvoicesUpcomingParametersQuerySubscriptionDefaultTaxRates'EmptyString | GHC.Base.otherwise -> case (GetInvoicesUpcomingParametersQuerySubscriptionDefaultTaxRates'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\/invoices\/upcoming.GET.parameters.properties.querySubscription_items.items@ in the specification. data GetInvoicesUpcomingParametersQuerySubscriptionItems' = GetInvoicesUpcomingParametersQuerySubscriptionItems' { -- | billing_thresholds getInvoicesUpcomingParametersQuerySubscriptionItems'BillingThresholds :: (GHC.Maybe.Maybe GetInvoicesUpcomingParametersQuerySubscriptionItems'BillingThresholds'Variants), -- | clear_usage getInvoicesUpcomingParametersQuerySubscriptionItems'ClearUsage :: (GHC.Maybe.Maybe GHC.Types.Bool), -- | deleted getInvoicesUpcomingParametersQuerySubscriptionItems'Deleted :: (GHC.Maybe.Maybe GHC.Types.Bool), -- | id -- -- Constraints: -- -- * Maximum length of 5000 getInvoicesUpcomingParametersQuerySubscriptionItems'Id :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | metadata getInvoicesUpcomingParametersQuerySubscriptionItems'Metadata :: (GHC.Maybe.Maybe GetInvoicesUpcomingParametersQuerySubscriptionItems'Metadata'Variants), -- | price -- -- Constraints: -- -- * Maximum length of 5000 getInvoicesUpcomingParametersQuerySubscriptionItems'Price :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | price_data getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData :: (GHC.Maybe.Maybe GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'), -- | quantity getInvoicesUpcomingParametersQuerySubscriptionItems'Quantity :: (GHC.Maybe.Maybe GHC.Types.Int), -- | tax_rates getInvoicesUpcomingParametersQuerySubscriptionItems'TaxRates :: (GHC.Maybe.Maybe GetInvoicesUpcomingParametersQuerySubscriptionItems'TaxRates'Variants) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON GetInvoicesUpcomingParametersQuerySubscriptionItems' where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("billing_thresholds" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionItems'BillingThresholds obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("clear_usage" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionItems'ClearUsage obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("deleted" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionItems'Deleted obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("id" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionItems'Id obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("metadata" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionItems'Metadata obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("price" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionItems'Price obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("price_data" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("quantity" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionItems'Quantity obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("tax_rates" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionItems'TaxRates obj) : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("billing_thresholds" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionItems'BillingThresholds obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("clear_usage" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionItems'ClearUsage obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("deleted" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionItems'Deleted obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("id" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionItems'Id obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("metadata" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionItems'Metadata obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("price" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionItems'Price obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("price_data" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("quantity" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionItems'Quantity obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("tax_rates" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionItems'TaxRates obj) : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON GetInvoicesUpcomingParametersQuerySubscriptionItems' where parseJSON = Data.Aeson.Types.FromJSON.withObject "GetInvoicesUpcomingParametersQuerySubscriptionItems'" (\obj -> ((((((((GHC.Base.pure GetInvoicesUpcomingParametersQuerySubscriptionItems' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "billing_thresholds")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "clear_usage")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "deleted")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "id")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "metadata")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "price")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "price_data")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "quantity")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "tax_rates")) -- | Create a new 'GetInvoicesUpcomingParametersQuerySubscriptionItems'' with all required fields. mkGetInvoicesUpcomingParametersQuerySubscriptionItems' :: GetInvoicesUpcomingParametersQuerySubscriptionItems' mkGetInvoicesUpcomingParametersQuerySubscriptionItems' = GetInvoicesUpcomingParametersQuerySubscriptionItems' { getInvoicesUpcomingParametersQuerySubscriptionItems'BillingThresholds = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQuerySubscriptionItems'ClearUsage = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQuerySubscriptionItems'Deleted = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQuerySubscriptionItems'Id = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQuerySubscriptionItems'Metadata = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQuerySubscriptionItems'Price = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQuerySubscriptionItems'Quantity = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQuerySubscriptionItems'TaxRates = GHC.Maybe.Nothing } -- | Defines the object schema located at @paths.\/v1\/invoices\/upcoming.GET.parameters.properties.querySubscription_items.items.properties.billing_thresholds.anyOf@ in the specification. data GetInvoicesUpcomingParametersQuerySubscriptionItems'BillingThresholds'OneOf1 = GetInvoicesUpcomingParametersQuerySubscriptionItems'BillingThresholds'OneOf1 { -- | usage_gte getInvoicesUpcomingParametersQuerySubscriptionItems'BillingThresholds'OneOf1UsageGte :: GHC.Types.Int } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON GetInvoicesUpcomingParametersQuerySubscriptionItems'BillingThresholds'OneOf1 where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (["usage_gte" Data.Aeson.Types.ToJSON..= getInvoicesUpcomingParametersQuerySubscriptionItems'BillingThresholds'OneOf1UsageGte obj] : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (["usage_gte" Data.Aeson.Types.ToJSON..= getInvoicesUpcomingParametersQuerySubscriptionItems'BillingThresholds'OneOf1UsageGte obj] : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON GetInvoicesUpcomingParametersQuerySubscriptionItems'BillingThresholds'OneOf1 where parseJSON = Data.Aeson.Types.FromJSON.withObject "GetInvoicesUpcomingParametersQuerySubscriptionItems'BillingThresholds'OneOf1" (\obj -> GHC.Base.pure GetInvoicesUpcomingParametersQuerySubscriptionItems'BillingThresholds'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "usage_gte")) -- | Create a new 'GetInvoicesUpcomingParametersQuerySubscriptionItems'BillingThresholds'OneOf1' with all required fields. mkGetInvoicesUpcomingParametersQuerySubscriptionItems'BillingThresholds'OneOf1 :: -- | 'getInvoicesUpcomingParametersQuerySubscriptionItems'BillingThresholds'OneOf1UsageGte' GHC.Types.Int -> GetInvoicesUpcomingParametersQuerySubscriptionItems'BillingThresholds'OneOf1 mkGetInvoicesUpcomingParametersQuerySubscriptionItems'BillingThresholds'OneOf1 getInvoicesUpcomingParametersQuerySubscriptionItems'BillingThresholds'OneOf1UsageGte = GetInvoicesUpcomingParametersQuerySubscriptionItems'BillingThresholds'OneOf1 {getInvoicesUpcomingParametersQuerySubscriptionItems'BillingThresholds'OneOf1UsageGte = getInvoicesUpcomingParametersQuerySubscriptionItems'BillingThresholds'OneOf1UsageGte} -- | Defines the oneOf schema located at @paths.\/v1\/invoices\/upcoming.GET.parameters.properties.querySubscription_items.items.properties.billing_thresholds.anyOf@ in the specification. data GetInvoicesUpcomingParametersQuerySubscriptionItems'BillingThresholds'Variants = -- | Represents the JSON value @""@ GetInvoicesUpcomingParametersQuerySubscriptionItems'BillingThresholds'EmptyString | GetInvoicesUpcomingParametersQuerySubscriptionItems'BillingThresholds'GetInvoicesUpcomingParametersQuerySubscriptionItems'BillingThresholds'OneOf1 GetInvoicesUpcomingParametersQuerySubscriptionItems'BillingThresholds'OneOf1 deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON GetInvoicesUpcomingParametersQuerySubscriptionItems'BillingThresholds'Variants where toJSON (GetInvoicesUpcomingParametersQuerySubscriptionItems'BillingThresholds'GetInvoicesUpcomingParametersQuerySubscriptionItems'BillingThresholds'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (GetInvoicesUpcomingParametersQuerySubscriptionItems'BillingThresholds'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON GetInvoicesUpcomingParametersQuerySubscriptionItems'BillingThresholds'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure GetInvoicesUpcomingParametersQuerySubscriptionItems'BillingThresholds'EmptyString | GHC.Base.otherwise -> case (GetInvoicesUpcomingParametersQuerySubscriptionItems'BillingThresholds'GetInvoicesUpcomingParametersQuerySubscriptionItems'BillingThresholds'OneOf1 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a -- | Defines the oneOf schema located at @paths.\/v1\/invoices\/upcoming.GET.parameters.properties.querySubscription_items.items.properties.metadata.anyOf@ in the specification. data GetInvoicesUpcomingParametersQuerySubscriptionItems'Metadata'Variants = -- | Represents the JSON value @""@ GetInvoicesUpcomingParametersQuerySubscriptionItems'Metadata'EmptyString | GetInvoicesUpcomingParametersQuerySubscriptionItems'Metadata'Object Data.Aeson.Types.Internal.Object deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON GetInvoicesUpcomingParametersQuerySubscriptionItems'Metadata'Variants where toJSON (GetInvoicesUpcomingParametersQuerySubscriptionItems'Metadata'Object a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (GetInvoicesUpcomingParametersQuerySubscriptionItems'Metadata'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON GetInvoicesUpcomingParametersQuerySubscriptionItems'Metadata'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure GetInvoicesUpcomingParametersQuerySubscriptionItems'Metadata'EmptyString | GHC.Base.otherwise -> case (GetInvoicesUpcomingParametersQuerySubscriptionItems'Metadata'Object Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a -- | Defines the object schema located at @paths.\/v1\/invoices\/upcoming.GET.parameters.properties.querySubscription_items.items.properties.price_data@ in the specification. data GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData' = GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData' { -- | currency getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Currency :: Data.Text.Internal.Text, -- | product -- -- Constraints: -- -- * Maximum length of 5000 getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Product :: Data.Text.Internal.Text, -- | recurring getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring :: GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring', -- | tax_behavior getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'TaxBehavior :: (GHC.Maybe.Maybe GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'TaxBehavior'), -- | unit_amount getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'UnitAmount :: (GHC.Maybe.Maybe GHC.Types.Int), -- | unit_amount_decimal getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'UnitAmountDecimal :: (GHC.Maybe.Maybe Data.Text.Internal.Text) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData' where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (["currency" Data.Aeson.Types.ToJSON..= getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Currency obj] : ["product" Data.Aeson.Types.ToJSON..= getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Product obj] : ["recurring" Data.Aeson.Types.ToJSON..= getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring obj] : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("tax_behavior" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'TaxBehavior obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("unit_amount" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'UnitAmount obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("unit_amount_decimal" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'UnitAmountDecimal obj) : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (["currency" Data.Aeson.Types.ToJSON..= getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Currency obj] : ["product" Data.Aeson.Types.ToJSON..= getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Product obj] : ["recurring" Data.Aeson.Types.ToJSON..= getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring obj] : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("tax_behavior" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'TaxBehavior obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("unit_amount" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'UnitAmount obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("unit_amount_decimal" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'UnitAmountDecimal obj) : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData' where parseJSON = Data.Aeson.Types.FromJSON.withObject "GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'" (\obj -> (((((GHC.Base.pure GetInvoicesUpcomingParametersQuerySubscriptionItems'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 'GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'' with all required fields. mkGetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData' :: -- | 'getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Currency' Data.Text.Internal.Text -> -- | 'getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Product' Data.Text.Internal.Text -> -- | 'getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring' GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring' -> GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData' mkGetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData' getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Currency getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Product getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring = GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData' { getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Currency = getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Currency, getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Product = getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Product, getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring = getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring, getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'TaxBehavior = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'UnitAmount = GHC.Maybe.Nothing, getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'UnitAmountDecimal = GHC.Maybe.Nothing } -- | Defines the object schema located at @paths.\/v1\/invoices\/upcoming.GET.parameters.properties.querySubscription_items.items.properties.price_data.properties.recurring@ in the specification. data GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring' = GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring' { -- | interval getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring'Interval :: GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring'Interval', -- | interval_count getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring'IntervalCount :: (GHC.Maybe.Maybe GHC.Types.Int) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring' where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (["interval" Data.Aeson.Types.ToJSON..= getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring'Interval obj] : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("interval_count" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring'IntervalCount obj) : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (["interval" Data.Aeson.Types.ToJSON..= getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring'Interval obj] : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("interval_count" Data.Aeson.Types.ToJSON..=)) (getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring'IntervalCount obj) : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring' where parseJSON = Data.Aeson.Types.FromJSON.withObject "GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring'" (\obj -> (GHC.Base.pure GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "interval")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "interval_count")) -- | Create a new 'GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring'' with all required fields. mkGetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring' :: -- | 'getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring'Interval' GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring'Interval' -> GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring' mkGetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring' getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring'Interval = GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring' { getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring'Interval = getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring'Interval, getInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring'IntervalCount = GHC.Maybe.Nothing } -- | Defines the enum schema located at @paths.\/v1\/invoices\/upcoming.GET.parameters.properties.querySubscription_items.items.properties.price_data.properties.recurring.properties.interval@ in the specification. data GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring'Interval' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. GetInvoicesUpcomingParametersQuerySubscriptionItems'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. GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring'Interval'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"day"@ GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring'Interval'EnumDay | -- | Represents the JSON value @"month"@ GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring'Interval'EnumMonth | -- | Represents the JSON value @"week"@ GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring'Interval'EnumWeek | -- | Represents the JSON value @"year"@ GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring'Interval'EnumYear deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring'Interval' where toJSON (GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring'Interval'Other val) = val toJSON (GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring'Interval'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring'Interval'EnumDay) = "day" toJSON (GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring'Interval'EnumMonth) = "month" toJSON (GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring'Interval'EnumWeek) = "week" toJSON (GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring'Interval'EnumYear) = "year" instance Data.Aeson.Types.FromJSON.FromJSON GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring'Interval' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "day" -> GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring'Interval'EnumDay | val GHC.Classes.== "month" -> GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring'Interval'EnumMonth | val GHC.Classes.== "week" -> GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring'Interval'EnumWeek | val GHC.Classes.== "year" -> GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring'Interval'EnumYear | GHC.Base.otherwise -> GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'Recurring'Interval'Other val ) -- | Defines the enum schema located at @paths.\/v1\/invoices\/upcoming.GET.parameters.properties.querySubscription_items.items.properties.price_data.properties.tax_behavior@ in the specification. data GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'TaxBehavior' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. GetInvoicesUpcomingParametersQuerySubscriptionItems'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. GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'TaxBehavior'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"exclusive"@ GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'TaxBehavior'EnumExclusive | -- | Represents the JSON value @"inclusive"@ GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'TaxBehavior'EnumInclusive | -- | Represents the JSON value @"unspecified"@ GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'TaxBehavior'EnumUnspecified deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'TaxBehavior' where toJSON (GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'TaxBehavior'Other val) = val toJSON (GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'TaxBehavior'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'TaxBehavior'EnumExclusive) = "exclusive" toJSON (GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'TaxBehavior'EnumInclusive) = "inclusive" toJSON (GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'TaxBehavior'EnumUnspecified) = "unspecified" instance Data.Aeson.Types.FromJSON.FromJSON GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'TaxBehavior' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "exclusive" -> GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'TaxBehavior'EnumExclusive | val GHC.Classes.== "inclusive" -> GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'TaxBehavior'EnumInclusive | val GHC.Classes.== "unspecified" -> GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'TaxBehavior'EnumUnspecified | GHC.Base.otherwise -> GetInvoicesUpcomingParametersQuerySubscriptionItems'PriceData'TaxBehavior'Other val ) -- | Defines the oneOf schema located at @paths.\/v1\/invoices\/upcoming.GET.parameters.properties.querySubscription_items.items.properties.tax_rates.anyOf@ in the specification. data GetInvoicesUpcomingParametersQuerySubscriptionItems'TaxRates'Variants = -- | Represents the JSON value @""@ GetInvoicesUpcomingParametersQuerySubscriptionItems'TaxRates'EmptyString | GetInvoicesUpcomingParametersQuerySubscriptionItems'TaxRates'ListTText ([Data.Text.Internal.Text]) deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON GetInvoicesUpcomingParametersQuerySubscriptionItems'TaxRates'Variants where toJSON (GetInvoicesUpcomingParametersQuerySubscriptionItems'TaxRates'ListTText a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (GetInvoicesUpcomingParametersQuerySubscriptionItems'TaxRates'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON GetInvoicesUpcomingParametersQuerySubscriptionItems'TaxRates'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure GetInvoicesUpcomingParametersQuerySubscriptionItems'TaxRates'EmptyString | GHC.Base.otherwise -> case (GetInvoicesUpcomingParametersQuerySubscriptionItems'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\/invoices\/upcoming.GET.parameters.properties.querySubscription_proration_behavior@ in the specification. -- -- Represents the parameter named \'subscription_proration_behavior\' -- -- Determines how to handle [prorations](https:\/\/stripe.com\/docs\/subscriptions\/billing-cycle\#prorations) when the billing cycle changes (e.g., when switching plans, resetting \`billing_cycle_anchor=now\`, or starting a trial), or if an item\'s \`quantity\` changes. data GetInvoicesUpcomingParametersQuerySubscriptionProrationBehavior' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. GetInvoicesUpcomingParametersQuerySubscriptionProrationBehavior'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. GetInvoicesUpcomingParametersQuerySubscriptionProrationBehavior'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"always_invoice"@ GetInvoicesUpcomingParametersQuerySubscriptionProrationBehavior'EnumAlwaysInvoice | -- | Represents the JSON value @"create_prorations"@ GetInvoicesUpcomingParametersQuerySubscriptionProrationBehavior'EnumCreateProrations | -- | Represents the JSON value @"none"@ GetInvoicesUpcomingParametersQuerySubscriptionProrationBehavior'EnumNone deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON GetInvoicesUpcomingParametersQuerySubscriptionProrationBehavior' where toJSON (GetInvoicesUpcomingParametersQuerySubscriptionProrationBehavior'Other val) = val toJSON (GetInvoicesUpcomingParametersQuerySubscriptionProrationBehavior'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (GetInvoicesUpcomingParametersQuerySubscriptionProrationBehavior'EnumAlwaysInvoice) = "always_invoice" toJSON (GetInvoicesUpcomingParametersQuerySubscriptionProrationBehavior'EnumCreateProrations) = "create_prorations" toJSON (GetInvoicesUpcomingParametersQuerySubscriptionProrationBehavior'EnumNone) = "none" instance Data.Aeson.Types.FromJSON.FromJSON GetInvoicesUpcomingParametersQuerySubscriptionProrationBehavior' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "always_invoice" -> GetInvoicesUpcomingParametersQuerySubscriptionProrationBehavior'EnumAlwaysInvoice | val GHC.Classes.== "create_prorations" -> GetInvoicesUpcomingParametersQuerySubscriptionProrationBehavior'EnumCreateProrations | val GHC.Classes.== "none" -> GetInvoicesUpcomingParametersQuerySubscriptionProrationBehavior'EnumNone | GHC.Base.otherwise -> GetInvoicesUpcomingParametersQuerySubscriptionProrationBehavior'Other val ) -- | Defines the oneOf schema located at @paths.\/v1\/invoices\/upcoming.GET.parameters.properties.querySubscription_trial_end.anyOf@ in the specification. -- -- Represents the parameter named \'subscription_trial_end\' -- -- If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of \`subscription_items\` or \`subscription\` is required. data GetInvoicesUpcomingParametersQuerySubscriptionTrialEnd'Variants = -- | Represents the JSON value @"now"@ GetInvoicesUpcomingParametersQuerySubscriptionTrialEnd'Now | GetInvoicesUpcomingParametersQuerySubscriptionTrialEnd'Int GHC.Types.Int deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON GetInvoicesUpcomingParametersQuerySubscriptionTrialEnd'Variants where toJSON (GetInvoicesUpcomingParametersQuerySubscriptionTrialEnd'Int a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (GetInvoicesUpcomingParametersQuerySubscriptionTrialEnd'Now) = "now" instance Data.Aeson.Types.FromJSON.FromJSON GetInvoicesUpcomingParametersQuerySubscriptionTrialEnd'Variants where parseJSON val = if | val GHC.Classes.== "now" -> GHC.Base.pure GetInvoicesUpcomingParametersQuerySubscriptionTrialEnd'Now | GHC.Base.otherwise -> case (GetInvoicesUpcomingParametersQuerySubscriptionTrialEnd'Int Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a -- | Represents a response of the operation 'getInvoicesUpcoming'. -- -- 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), 'GetInvoicesUpcomingResponseError' is used. data GetInvoicesUpcomingResponse = -- | Means either no matching case available or a parse error GetInvoicesUpcomingResponseError GHC.Base.String | -- | Successful response. GetInvoicesUpcomingResponse200 Invoice | -- | Error response. GetInvoicesUpcomingResponseDefault Error deriving (GHC.Show.Show, GHC.Classes.Eq)