{-# 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 types generated from the schema SetupIntent module StripeAPI.Types.SetupIntent where import qualified Control.Monad.Fail 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.Functor import qualified Data.Scientific import qualified Data.Text import qualified Data.Text.Internal import qualified Data.Time.Calendar as Data.Time.Calendar.Days import qualified Data.Time.LocalTime as Data.Time.LocalTime.Internal.ZonedTime import qualified GHC.Base import qualified GHC.Classes import qualified GHC.Int import qualified GHC.Show import qualified GHC.Types import qualified StripeAPI.Common import StripeAPI.TypeAlias import {-# SOURCE #-} StripeAPI.Types.Account import {-# SOURCE #-} StripeAPI.Types.Address import {-# SOURCE #-} StripeAPI.Types.ApiErrors import {-# SOURCE #-} StripeAPI.Types.Application import {-# SOURCE #-} StripeAPI.Types.BankAccount import {-# SOURCE #-} StripeAPI.Types.Card import {-# SOURCE #-} StripeAPI.Types.Customer import {-# SOURCE #-} StripeAPI.Types.DeletedCustomer import {-# SOURCE #-} StripeAPI.Types.Mandate import {-# SOURCE #-} StripeAPI.Types.PaymentIntent import {-# SOURCE #-} StripeAPI.Types.PaymentMethod import {-# SOURCE #-} StripeAPI.Types.Recipient import {-# SOURCE #-} StripeAPI.Types.SetupAttempt import {-# SOURCE #-} StripeAPI.Types.SetupIntentNextAction import {-# SOURCE #-} StripeAPI.Types.SetupIntentNextActionRedirectToUrl import {-# SOURCE #-} StripeAPI.Types.SetupIntentNextActionVerifyWithMicrodeposits import {-# SOURCE #-} StripeAPI.Types.SetupIntentPaymentMethodOptions import {-# SOURCE #-} StripeAPI.Types.SetupIntentPaymentMethodOptionsAcssDebit import {-# SOURCE #-} StripeAPI.Types.SetupIntentPaymentMethodOptionsCard import {-# SOURCE #-} StripeAPI.Types.SetupIntentPaymentMethodOptionsSepaDebit import {-# SOURCE #-} StripeAPI.Types.Source import {-# SOURCE #-} StripeAPI.Types.SourceCodeVerificationFlow import {-# SOURCE #-} StripeAPI.Types.SourceOrder import {-# SOURCE #-} StripeAPI.Types.SourceOwner import {-# SOURCE #-} StripeAPI.Types.SourceReceiverFlow import {-# SOURCE #-} StripeAPI.Types.SourceRedirectFlow import {-# SOURCE #-} StripeAPI.Types.SourceTypeAchCreditTransfer import {-# SOURCE #-} StripeAPI.Types.SourceTypeAchDebit import {-# SOURCE #-} StripeAPI.Types.SourceTypeAcssDebit import {-# SOURCE #-} StripeAPI.Types.SourceTypeAlipay import {-# SOURCE #-} StripeAPI.Types.SourceTypeAuBecsDebit import {-# SOURCE #-} StripeAPI.Types.SourceTypeBancontact import {-# SOURCE #-} StripeAPI.Types.SourceTypeCard import {-# SOURCE #-} StripeAPI.Types.SourceTypeCardPresent import {-# SOURCE #-} StripeAPI.Types.SourceTypeEps import {-# SOURCE #-} StripeAPI.Types.SourceTypeGiropay import {-# SOURCE #-} StripeAPI.Types.SourceTypeIdeal import {-# SOURCE #-} StripeAPI.Types.SourceTypeKlarna import {-# SOURCE #-} StripeAPI.Types.SourceTypeMultibanco import {-# SOURCE #-} StripeAPI.Types.SourceTypeP24 import {-# SOURCE #-} StripeAPI.Types.SourceTypeSepaDebit import {-# SOURCE #-} StripeAPI.Types.SourceTypeSofort import {-# SOURCE #-} StripeAPI.Types.SourceTypeThreeDSecure import {-# SOURCE #-} StripeAPI.Types.SourceTypeWechat import qualified Prelude as GHC.Integer.Type import qualified Prelude as GHC.Maybe -- | Defines the object schema located at @components.schemas.setup_intent@ in the specification. -- -- A SetupIntent guides you through the process of setting up and saving a customer\'s payment credentials for future payments. -- For example, you could use a SetupIntent to set up and save your customer\'s card without immediately collecting a payment. -- Later, you can use [PaymentIntents](https:\/\/stripe.com\/docs\/api\#payment_intents) to drive the payment flow. -- -- Create a SetupIntent as soon as you\'re ready to collect your customer\'s payment credentials. -- Do not maintain long-lived, unconfirmed SetupIntents as they may no longer be valid. -- The SetupIntent then transitions through multiple [statuses](https:\/\/stripe.com\/docs\/payments\/intents\#intent-statuses) as it guides -- you through the setup process. -- -- Successful SetupIntents result in payment credentials that are optimized for future payments. -- For example, cardholders in [certain regions](\/guides\/strong-customer-authentication) may need to be run through -- [Strong Customer Authentication](https:\/\/stripe.com\/docs\/strong-customer-authentication) at the time of payment method collection -- in order to streamline later [off-session payments](https:\/\/stripe.com\/docs\/payments\/setup-intents). -- If the SetupIntent is used with a [Customer](https:\/\/stripe.com\/docs\/api\#setup_intent_object-customer), upon success, -- it will automatically attach the resulting payment method to that Customer. -- We recommend using SetupIntents or [setup_future_usage](https:\/\/stripe.com\/docs\/api\#payment_intent_object-setup_future_usage) on -- PaymentIntents to save payment methods in order to prevent saving invalid or unoptimized payment methods. -- -- By using SetupIntents, you ensure that your customers experience the minimum set of required friction, -- even as regulations change over time. -- -- Related guide: [Setup Intents API](https:\/\/stripe.com\/docs\/payments\/setup-intents). data SetupIntent = SetupIntent { -- | application: ID of the Connect application that created the SetupIntent. setupIntentApplication :: (GHC.Maybe.Maybe SetupIntentApplication'Variants), -- | cancellation_reason: Reason for cancellation of this SetupIntent, one of \`abandoned\`, \`requested_by_customer\`, or \`duplicate\`. setupIntentCancellationReason :: (GHC.Maybe.Maybe SetupIntentCancellationReason'), -- | client_secret: The client secret of this SetupIntent. Used for client-side retrieval using a publishable key. -- -- The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentClientSecret :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | created: Time at which the object was created. Measured in seconds since the Unix epoch. setupIntentCreated :: GHC.Types.Int, -- | customer: ID of the Customer this SetupIntent belongs to, if one exists. -- -- If present, the SetupIntent\'s payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. setupIntentCustomer :: (GHC.Maybe.Maybe SetupIntentCustomer'Variants), -- | description: An arbitrary string attached to the object. Often useful for displaying to users. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentDescription :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | id: Unique identifier for the object. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentId :: Data.Text.Internal.Text, -- | last_setup_error: The error encountered in the previous SetupIntent confirmation. setupIntentLastSetupError :: (GHC.Maybe.Maybe SetupIntentLastSetupError'), -- | latest_attempt: The most recent SetupAttempt for this SetupIntent. setupIntentLatestAttempt :: (GHC.Maybe.Maybe SetupIntentLatestAttempt'Variants), -- | livemode: Has the value \`true\` if the object exists in live mode or the value \`false\` if the object exists in test mode. setupIntentLivemode :: GHC.Types.Bool, -- | mandate: ID of the multi use Mandate generated by the SetupIntent. setupIntentMandate :: (GHC.Maybe.Maybe SetupIntentMandate'Variants), -- | metadata: Set of [key-value pairs](https:\/\/stripe.com\/docs\/api\/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. setupIntentMetadata :: (GHC.Maybe.Maybe Data.Aeson.Types.Internal.Object), -- | next_action: If present, this property tells you what actions you need to take in order for your customer to continue payment setup. setupIntentNextAction :: (GHC.Maybe.Maybe SetupIntentNextAction'), -- | on_behalf_of: The account (if any) for which the setup is intended. setupIntentOnBehalfOf :: (GHC.Maybe.Maybe SetupIntentOnBehalfOf'Variants), -- | payment_method: ID of the payment method used with this SetupIntent. setupIntentPaymentMethod :: (GHC.Maybe.Maybe SetupIntentPaymentMethod'Variants), -- | payment_method_options: Payment-method-specific configuration for this SetupIntent. setupIntentPaymentMethodOptions :: (GHC.Maybe.Maybe SetupIntentPaymentMethodOptions'), -- | payment_method_types: The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. setupIntentPaymentMethodTypes :: ([Data.Text.Internal.Text]), -- | single_use_mandate: ID of the single_use Mandate generated by the SetupIntent. setupIntentSingleUseMandate :: (GHC.Maybe.Maybe SetupIntentSingleUseMandate'Variants), -- | status: [Status](https:\/\/stripe.com\/docs\/payments\/intents\#intent-statuses) of this SetupIntent, one of \`requires_payment_method\`, \`requires_confirmation\`, \`requires_action\`, \`processing\`, \`canceled\`, or \`succeeded\`. setupIntentStatus :: SetupIntentStatus', -- | usage: Indicates how the payment method is intended to be used in the future. -- -- Use \`on_session\` if you intend to only reuse the payment method when the customer is in your checkout flow. Use \`off_session\` if your customer may or may not be in your checkout flow. If not provided, this value defaults to \`off_session\`. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentUsage :: Data.Text.Internal.Text } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON SetupIntent where toJSON obj = Data.Aeson.Types.Internal.object ("application" Data.Aeson.Types.ToJSON..= setupIntentApplication obj : "cancellation_reason" Data.Aeson.Types.ToJSON..= setupIntentCancellationReason obj : "client_secret" Data.Aeson.Types.ToJSON..= setupIntentClientSecret obj : "created" Data.Aeson.Types.ToJSON..= setupIntentCreated obj : "customer" Data.Aeson.Types.ToJSON..= setupIntentCustomer obj : "description" Data.Aeson.Types.ToJSON..= setupIntentDescription obj : "id" Data.Aeson.Types.ToJSON..= setupIntentId obj : "last_setup_error" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError obj : "latest_attempt" Data.Aeson.Types.ToJSON..= setupIntentLatestAttempt obj : "livemode" Data.Aeson.Types.ToJSON..= setupIntentLivemode obj : "mandate" Data.Aeson.Types.ToJSON..= setupIntentMandate obj : "metadata" Data.Aeson.Types.ToJSON..= setupIntentMetadata obj : "next_action" Data.Aeson.Types.ToJSON..= setupIntentNextAction obj : "on_behalf_of" Data.Aeson.Types.ToJSON..= setupIntentOnBehalfOf obj : "payment_method" Data.Aeson.Types.ToJSON..= setupIntentPaymentMethod obj : "payment_method_options" Data.Aeson.Types.ToJSON..= setupIntentPaymentMethodOptions obj : "payment_method_types" Data.Aeson.Types.ToJSON..= setupIntentPaymentMethodTypes obj : "single_use_mandate" Data.Aeson.Types.ToJSON..= setupIntentSingleUseMandate obj : "status" Data.Aeson.Types.ToJSON..= setupIntentStatus obj : "usage" Data.Aeson.Types.ToJSON..= setupIntentUsage obj : "object" Data.Aeson.Types.ToJSON..= Data.Aeson.Types.Internal.String "setup_intent" : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("application" Data.Aeson.Types.ToJSON..= setupIntentApplication obj) GHC.Base.<> (("cancellation_reason" Data.Aeson.Types.ToJSON..= setupIntentCancellationReason obj) GHC.Base.<> (("client_secret" Data.Aeson.Types.ToJSON..= setupIntentClientSecret obj) GHC.Base.<> (("created" Data.Aeson.Types.ToJSON..= setupIntentCreated obj) GHC.Base.<> (("customer" Data.Aeson.Types.ToJSON..= setupIntentCustomer obj) GHC.Base.<> (("description" Data.Aeson.Types.ToJSON..= setupIntentDescription obj) GHC.Base.<> (("id" Data.Aeson.Types.ToJSON..= setupIntentId obj) GHC.Base.<> (("last_setup_error" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError obj) GHC.Base.<> (("latest_attempt" Data.Aeson.Types.ToJSON..= setupIntentLatestAttempt obj) GHC.Base.<> (("livemode" Data.Aeson.Types.ToJSON..= setupIntentLivemode obj) GHC.Base.<> (("mandate" Data.Aeson.Types.ToJSON..= setupIntentMandate obj) GHC.Base.<> (("metadata" Data.Aeson.Types.ToJSON..= setupIntentMetadata obj) GHC.Base.<> (("next_action" Data.Aeson.Types.ToJSON..= setupIntentNextAction obj) GHC.Base.<> (("on_behalf_of" Data.Aeson.Types.ToJSON..= setupIntentOnBehalfOf obj) GHC.Base.<> (("payment_method" Data.Aeson.Types.ToJSON..= setupIntentPaymentMethod obj) GHC.Base.<> (("payment_method_options" Data.Aeson.Types.ToJSON..= setupIntentPaymentMethodOptions obj) GHC.Base.<> (("payment_method_types" Data.Aeson.Types.ToJSON..= setupIntentPaymentMethodTypes obj) GHC.Base.<> (("single_use_mandate" Data.Aeson.Types.ToJSON..= setupIntentSingleUseMandate obj) GHC.Base.<> (("status" Data.Aeson.Types.ToJSON..= setupIntentStatus obj) GHC.Base.<> (("usage" Data.Aeson.Types.ToJSON..= setupIntentUsage obj) GHC.Base.<> ("object" Data.Aeson.Types.ToJSON..= Data.Aeson.Types.Internal.String "setup_intent"))))))))))))))))))))) instance Data.Aeson.Types.FromJSON.FromJSON SetupIntent where parseJSON = Data.Aeson.Types.FromJSON.withObject "SetupIntent" (\obj -> (((((((((((((((((((GHC.Base.pure SetupIntent GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "application")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "cancellation_reason")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "client_secret")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "created")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "customer")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "description")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "id")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "last_setup_error")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "latest_attempt")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "livemode")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "mandate")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "metadata")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "next_action")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "on_behalf_of")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "payment_method")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "payment_method_options")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "payment_method_types")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "single_use_mandate")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "status")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "usage")) -- | Create a new 'SetupIntent' with all required fields. mkSetupIntent :: -- | 'setupIntentCreated' GHC.Types.Int -> -- | 'setupIntentId' Data.Text.Internal.Text -> -- | 'setupIntentLivemode' GHC.Types.Bool -> -- | 'setupIntentPaymentMethodTypes' [Data.Text.Internal.Text] -> -- | 'setupIntentStatus' SetupIntentStatus' -> -- | 'setupIntentUsage' Data.Text.Internal.Text -> SetupIntent mkSetupIntent setupIntentCreated setupIntentId setupIntentLivemode setupIntentPaymentMethodTypes setupIntentStatus setupIntentUsage = SetupIntent { setupIntentApplication = GHC.Maybe.Nothing, setupIntentCancellationReason = GHC.Maybe.Nothing, setupIntentClientSecret = GHC.Maybe.Nothing, setupIntentCreated = setupIntentCreated, setupIntentCustomer = GHC.Maybe.Nothing, setupIntentDescription = GHC.Maybe.Nothing, setupIntentId = setupIntentId, setupIntentLastSetupError = GHC.Maybe.Nothing, setupIntentLatestAttempt = GHC.Maybe.Nothing, setupIntentLivemode = setupIntentLivemode, setupIntentMandate = GHC.Maybe.Nothing, setupIntentMetadata = GHC.Maybe.Nothing, setupIntentNextAction = GHC.Maybe.Nothing, setupIntentOnBehalfOf = GHC.Maybe.Nothing, setupIntentPaymentMethod = GHC.Maybe.Nothing, setupIntentPaymentMethodOptions = GHC.Maybe.Nothing, setupIntentPaymentMethodTypes = setupIntentPaymentMethodTypes, setupIntentSingleUseMandate = GHC.Maybe.Nothing, setupIntentStatus = setupIntentStatus, setupIntentUsage = setupIntentUsage } -- | Defines the oneOf schema located at @components.schemas.setup_intent.properties.application.anyOf@ in the specification. -- -- ID of the Connect application that created the SetupIntent. data SetupIntentApplication'Variants = SetupIntentApplication'Text Data.Text.Internal.Text | SetupIntentApplication'Application Application deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON SetupIntentApplication'Variants where toJSON (SetupIntentApplication'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (SetupIntentApplication'Application a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON SetupIntentApplication'Variants where parseJSON val = case (SetupIntentApplication'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((SetupIntentApplication'Application 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 @components.schemas.setup_intent.properties.cancellation_reason@ in the specification. -- -- Reason for cancellation of this SetupIntent, one of \`abandoned\`, \`requested_by_customer\`, or \`duplicate\`. data SetupIntentCancellationReason' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. SetupIntentCancellationReason'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. SetupIntentCancellationReason'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"abandoned"@ SetupIntentCancellationReason'EnumAbandoned | -- | Represents the JSON value @"duplicate"@ SetupIntentCancellationReason'EnumDuplicate | -- | Represents the JSON value @"requested_by_customer"@ SetupIntentCancellationReason'EnumRequestedByCustomer deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON SetupIntentCancellationReason' where toJSON (SetupIntentCancellationReason'Other val) = val toJSON (SetupIntentCancellationReason'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (SetupIntentCancellationReason'EnumAbandoned) = "abandoned" toJSON (SetupIntentCancellationReason'EnumDuplicate) = "duplicate" toJSON (SetupIntentCancellationReason'EnumRequestedByCustomer) = "requested_by_customer" instance Data.Aeson.Types.FromJSON.FromJSON SetupIntentCancellationReason' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "abandoned" -> SetupIntentCancellationReason'EnumAbandoned | val GHC.Classes.== "duplicate" -> SetupIntentCancellationReason'EnumDuplicate | val GHC.Classes.== "requested_by_customer" -> SetupIntentCancellationReason'EnumRequestedByCustomer | GHC.Base.otherwise -> SetupIntentCancellationReason'Other val ) -- | Defines the oneOf schema located at @components.schemas.setup_intent.properties.customer.anyOf@ in the specification. -- -- ID of the Customer this SetupIntent belongs to, if one exists. -- -- If present, the SetupIntent\'s payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. data SetupIntentCustomer'Variants = SetupIntentCustomer'Text Data.Text.Internal.Text | SetupIntentCustomer'Customer Customer | SetupIntentCustomer'DeletedCustomer DeletedCustomer deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON SetupIntentCustomer'Variants where toJSON (SetupIntentCustomer'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (SetupIntentCustomer'Customer a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (SetupIntentCustomer'DeletedCustomer a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON SetupIntentCustomer'Variants where parseJSON val = case (SetupIntentCustomer'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((SetupIntentCustomer'Customer Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((SetupIntentCustomer'DeletedCustomer 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 @components.schemas.setup_intent.properties.last_setup_error.anyOf@ in the specification. -- -- The error encountered in the previous SetupIntent confirmation. data SetupIntentLastSetupError' = SetupIntentLastSetupError' { -- | charge: For card errors, the ID of the failed charge. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Charge :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | code: For some errors that could be handled programmatically, a short string indicating the [error code](https:\/\/stripe.com\/docs\/error-codes) reported. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Code :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | decline_code: For card errors resulting from a card issuer decline, a short string indicating the [card issuer\'s reason for the decline](https:\/\/stripe.com\/docs\/declines\#issuer-declines) if they provide one. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'DeclineCode :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | doc_url: A URL to more information about the [error code](https:\/\/stripe.com\/docs\/error-codes) reported. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'DocUrl :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | message: A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. -- -- Constraints: -- -- * Maximum length of 40000 setupIntentLastSetupError'Message :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | param: If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Param :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | payment_intent: A PaymentIntent guides you through the process of collecting a payment from your customer. -- We recommend that you create exactly one PaymentIntent for each order or -- customer session in your system. You can reference the PaymentIntent later to -- see the history of payment attempts for a particular session. -- -- A PaymentIntent transitions through -- [multiple statuses](https:\/\/stripe.com\/docs\/payments\/intents\#intent-statuses) -- throughout its lifetime as it interfaces with Stripe.js to perform -- authentication flows and ultimately creates at most one successful charge. -- -- Related guide: [Payment Intents API](https:\/\/stripe.com\/docs\/payments\/payment-intents). setupIntentLastSetupError'PaymentIntent :: (GHC.Maybe.Maybe PaymentIntent), -- | payment_method: PaymentMethod objects represent your customer\'s payment instruments. -- They can be used with [PaymentIntents](https:\/\/stripe.com\/docs\/payments\/payment-intents) to collect payments or saved to -- Customer objects to store instrument details for future payments. -- -- Related guides: [Payment Methods](https:\/\/stripe.com\/docs\/payments\/payment-methods) and [More Payment Scenarios](https:\/\/stripe.com\/docs\/payments\/more-payment-scenarios). setupIntentLastSetupError'PaymentMethod :: (GHC.Maybe.Maybe PaymentMethod), -- | payment_method_type: If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'PaymentMethodType :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | setup_intent: A SetupIntent guides you through the process of setting up and saving a customer\'s payment credentials for future payments. -- For example, you could use a SetupIntent to set up and save your customer\'s card without immediately collecting a payment. -- Later, you can use [PaymentIntents](https:\/\/stripe.com\/docs\/api\#payment_intents) to drive the payment flow. -- -- Create a SetupIntent as soon as you\'re ready to collect your customer\'s payment credentials. -- Do not maintain long-lived, unconfirmed SetupIntents as they may no longer be valid. -- The SetupIntent then transitions through multiple [statuses](https:\/\/stripe.com\/docs\/payments\/intents\#intent-statuses) as it guides -- you through the setup process. -- -- Successful SetupIntents result in payment credentials that are optimized for future payments. -- For example, cardholders in [certain regions](\/guides\/strong-customer-authentication) may need to be run through -- [Strong Customer Authentication](https:\/\/stripe.com\/docs\/strong-customer-authentication) at the time of payment method collection -- in order to streamline later [off-session payments](https:\/\/stripe.com\/docs\/payments\/setup-intents). -- If the SetupIntent is used with a [Customer](https:\/\/stripe.com\/docs\/api\#setup_intent_object-customer), upon success, -- it will automatically attach the resulting payment method to that Customer. -- We recommend using SetupIntents or [setup_future_usage](https:\/\/stripe.com\/docs\/api\#payment_intent_object-setup_future_usage) on -- PaymentIntents to save payment methods in order to prevent saving invalid or unoptimized payment methods. -- -- By using SetupIntents, you ensure that your customers experience the minimum set of required friction, -- even as regulations change over time. -- -- Related guide: [Setup Intents API](https:\/\/stripe.com\/docs\/payments\/setup-intents). setupIntentLastSetupError'SetupIntent :: (GHC.Maybe.Maybe SetupIntent), -- | source: The source object for errors returned on a request involving a source. setupIntentLastSetupError'Source :: (GHC.Maybe.Maybe SetupIntentLastSetupError'Source'), -- | type: The type of error returned. One of \`api_connection_error\`, \`api_error\`, \`authentication_error\`, \`card_error\`, \`idempotency_error\`, \`invalid_request_error\`, or \`rate_limit_error\` setupIntentLastSetupError'Type :: (GHC.Maybe.Maybe SetupIntentLastSetupError'Type') } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON SetupIntentLastSetupError' where toJSON obj = Data.Aeson.Types.Internal.object ("charge" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Charge obj : "code" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Code obj : "decline_code" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'DeclineCode obj : "doc_url" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'DocUrl obj : "message" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Message obj : "param" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Param obj : "payment_intent" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'PaymentIntent obj : "payment_method" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'PaymentMethod obj : "payment_method_type" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'PaymentMethodType obj : "setup_intent" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'SetupIntent obj : "source" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source obj : "type" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Type obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("charge" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Charge obj) GHC.Base.<> (("code" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Code obj) GHC.Base.<> (("decline_code" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'DeclineCode obj) GHC.Base.<> (("doc_url" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'DocUrl obj) GHC.Base.<> (("message" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Message obj) GHC.Base.<> (("param" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Param obj) GHC.Base.<> (("payment_intent" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'PaymentIntent obj) GHC.Base.<> (("payment_method" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'PaymentMethod obj) GHC.Base.<> (("payment_method_type" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'PaymentMethodType obj) GHC.Base.<> (("setup_intent" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'SetupIntent obj) GHC.Base.<> (("source" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source obj) GHC.Base.<> ("type" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Type obj)))))))))))) instance Data.Aeson.Types.FromJSON.FromJSON SetupIntentLastSetupError' where parseJSON = Data.Aeson.Types.FromJSON.withObject "SetupIntentLastSetupError'" (\obj -> (((((((((((GHC.Base.pure SetupIntentLastSetupError' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "charge")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "code")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "decline_code")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "doc_url")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "message")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "param")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "payment_intent")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "payment_method")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "payment_method_type")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "setup_intent")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "source")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "type")) -- | Create a new 'SetupIntentLastSetupError'' with all required fields. mkSetupIntentLastSetupError' :: SetupIntentLastSetupError' mkSetupIntentLastSetupError' = SetupIntentLastSetupError' { setupIntentLastSetupError'Charge = GHC.Maybe.Nothing, setupIntentLastSetupError'Code = GHC.Maybe.Nothing, setupIntentLastSetupError'DeclineCode = GHC.Maybe.Nothing, setupIntentLastSetupError'DocUrl = GHC.Maybe.Nothing, setupIntentLastSetupError'Message = GHC.Maybe.Nothing, setupIntentLastSetupError'Param = GHC.Maybe.Nothing, setupIntentLastSetupError'PaymentIntent = GHC.Maybe.Nothing, setupIntentLastSetupError'PaymentMethod = GHC.Maybe.Nothing, setupIntentLastSetupError'PaymentMethodType = GHC.Maybe.Nothing, setupIntentLastSetupError'SetupIntent = GHC.Maybe.Nothing, setupIntentLastSetupError'Source = GHC.Maybe.Nothing, setupIntentLastSetupError'Type = GHC.Maybe.Nothing } -- | Defines the object schema located at @components.schemas.setup_intent.properties.last_setup_error.anyOf.properties.source.anyOf@ in the specification. -- -- The source object for errors returned on a request involving a source. data SetupIntentLastSetupError'Source' = SetupIntentLastSetupError'Source' { -- | account: The ID of the account that the bank account is associated with. setupIntentLastSetupError'Source'Account :: (GHC.Maybe.Maybe SetupIntentLastSetupError'Source'Account'Variants), -- | account_holder_name: The name of the person or business that owns the bank account. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'AccountHolderName :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | account_holder_type: The type of entity that holds the account. This can be either \`individual\` or \`company\`. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'AccountHolderType :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | ach_credit_transfer setupIntentLastSetupError'Source'AchCreditTransfer :: (GHC.Maybe.Maybe SourceTypeAchCreditTransfer), -- | ach_debit setupIntentLastSetupError'Source'AchDebit :: (GHC.Maybe.Maybe SourceTypeAchDebit), -- | acss_debit setupIntentLastSetupError'Source'AcssDebit :: (GHC.Maybe.Maybe SourceTypeAcssDebit), -- | address_city: City\/District\/Suburb\/Town\/Village. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'AddressCity :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | address_country: Billing address country, if provided when creating card. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'AddressCountry :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | address_line1: Address line 1 (Street address\/PO Box\/Company name). -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'AddressLine1 :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | address_line1_check: If \`address_line1\` was provided, results of the check: \`pass\`, \`fail\`, \`unavailable\`, or \`unchecked\`. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'AddressLine1Check :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | address_line2: Address line 2 (Apartment\/Suite\/Unit\/Building). -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'AddressLine2 :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | address_state: State\/County\/Province\/Region. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'AddressState :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | address_zip: ZIP or postal code. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'AddressZip :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | address_zip_check: If \`address_zip\` was provided, results of the check: \`pass\`, \`fail\`, \`unavailable\`, or \`unchecked\`. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'AddressZipCheck :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | alipay setupIntentLastSetupError'Source'Alipay :: (GHC.Maybe.Maybe SourceTypeAlipay), -- | amount: A positive integer in the smallest currency unit (that is, 100 cents for \$1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for \`single_use\` sources. setupIntentLastSetupError'Source'Amount :: (GHC.Maybe.Maybe GHC.Types.Int), -- | au_becs_debit setupIntentLastSetupError'Source'AuBecsDebit :: (GHC.Maybe.Maybe SourceTypeAuBecsDebit), -- | available_payout_methods: A set of available payout methods for this bank account. Only values from this set should be passed as the \`method\` when creating a payout. setupIntentLastSetupError'Source'AvailablePayoutMethods :: (GHC.Maybe.Maybe ([SetupIntentLastSetupError'Source'AvailablePayoutMethods'])), -- | bancontact setupIntentLastSetupError'Source'Bancontact :: (GHC.Maybe.Maybe SourceTypeBancontact), -- | bank_name: Name of the bank associated with the routing number (e.g., \`WELLS FARGO\`). -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'BankName :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | brand: Card brand. Can be \`American Express\`, \`Diners Club\`, \`Discover\`, \`JCB\`, \`MasterCard\`, \`UnionPay\`, \`Visa\`, or \`Unknown\`. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'Brand :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | card setupIntentLastSetupError'Source'Card :: (GHC.Maybe.Maybe SourceTypeCard), -- | card_present setupIntentLastSetupError'Source'CardPresent :: (GHC.Maybe.Maybe SourceTypeCardPresent), -- | client_secret: The client secret of the source. Used for client-side retrieval using a publishable key. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'ClientSecret :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | code_verification: setupIntentLastSetupError'Source'CodeVerification :: (GHC.Maybe.Maybe SourceCodeVerificationFlow), -- | country: Two-letter ISO code representing the country the bank account is located in. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'Country :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | created: Time at which the object was created. Measured in seconds since the Unix epoch. setupIntentLastSetupError'Source'Created :: (GHC.Maybe.Maybe GHC.Types.Int), -- | currency: Three-letter [ISO code for the currency](https:\/\/stripe.com\/docs\/payouts) paid out to the bank account. setupIntentLastSetupError'Source'Currency :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | customer: The ID of the customer that the bank account is associated with. setupIntentLastSetupError'Source'Customer :: (GHC.Maybe.Maybe SetupIntentLastSetupError'Source'Customer'Variants), -- | cvc_check: If a CVC was provided, results of the check: \`pass\`, \`fail\`, \`unavailable\`, or \`unchecked\`. A result of unchecked indicates that CVC was provided but hasn\'t been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see [Check if a card is valid without a charge](https:\/\/support.stripe.com\/questions\/check-if-a-card-is-valid-without-a-charge). -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'CvcCheck :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | default_for_currency: Whether this bank account is the default external account for its currency. setupIntentLastSetupError'Source'DefaultForCurrency :: (GHC.Maybe.Maybe GHC.Types.Bool), -- | dynamic_last4: (For tokenized numbers only.) The last four digits of the device account number. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'DynamicLast4 :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | eps setupIntentLastSetupError'Source'Eps :: (GHC.Maybe.Maybe SourceTypeEps), -- | exp_month: Two-digit number representing the card\'s expiration month. setupIntentLastSetupError'Source'ExpMonth :: (GHC.Maybe.Maybe GHC.Types.Int), -- | exp_year: Four-digit number representing the card\'s expiration year. setupIntentLastSetupError'Source'ExpYear :: (GHC.Maybe.Maybe GHC.Types.Int), -- | fingerprint: Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'Fingerprint :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | flow: The authentication \`flow\` of the source. \`flow\` is one of \`redirect\`, \`receiver\`, \`code_verification\`, \`none\`. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'Flow :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | funding: Card funding type. Can be \`credit\`, \`debit\`, \`prepaid\`, or \`unknown\`. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'Funding :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | giropay setupIntentLastSetupError'Source'Giropay :: (GHC.Maybe.Maybe SourceTypeGiropay), -- | id: Unique identifier for the object. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'Id :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | ideal setupIntentLastSetupError'Source'Ideal :: (GHC.Maybe.Maybe SourceTypeIdeal), -- | klarna setupIntentLastSetupError'Source'Klarna :: (GHC.Maybe.Maybe SourceTypeKlarna), -- | last4: The last four digits of the bank account number. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'Last4 :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | livemode: Has the value \`true\` if the object exists in live mode or the value \`false\` if the object exists in test mode. setupIntentLastSetupError'Source'Livemode :: (GHC.Maybe.Maybe GHC.Types.Bool), -- | metadata: Set of [key-value pairs](https:\/\/stripe.com\/docs\/api\/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. setupIntentLastSetupError'Source'Metadata :: (GHC.Maybe.Maybe Data.Aeson.Types.Internal.Object), -- | multibanco setupIntentLastSetupError'Source'Multibanco :: (GHC.Maybe.Maybe SourceTypeMultibanco), -- | name: Cardholder name. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'Name :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | object: String representing the object\'s type. Objects of the same type share the same value. setupIntentLastSetupError'Source'Object :: (GHC.Maybe.Maybe SetupIntentLastSetupError'Source'Object'), -- | owner: Information about the owner of the payment instrument that may be used or required by particular source types. setupIntentLastSetupError'Source'Owner :: (GHC.Maybe.Maybe SetupIntentLastSetupError'Source'Owner'), -- | p24 setupIntentLastSetupError'Source'P24 :: (GHC.Maybe.Maybe SourceTypeP24), -- | receiver: setupIntentLastSetupError'Source'Receiver :: (GHC.Maybe.Maybe SourceReceiverFlow), -- | recipient: The recipient that this card belongs to. This attribute will not be in the card object if the card belongs to a customer or account instead. setupIntentLastSetupError'Source'Recipient :: (GHC.Maybe.Maybe SetupIntentLastSetupError'Source'Recipient'Variants), -- | redirect: setupIntentLastSetupError'Source'Redirect :: (GHC.Maybe.Maybe SourceRedirectFlow), -- | routing_number: The routing transit number for the bank account. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'RoutingNumber :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | sepa_debit setupIntentLastSetupError'Source'SepaDebit :: (GHC.Maybe.Maybe SourceTypeSepaDebit), -- | sofort setupIntentLastSetupError'Source'Sofort :: (GHC.Maybe.Maybe SourceTypeSofort), -- | source_order: setupIntentLastSetupError'Source'SourceOrder :: (GHC.Maybe.Maybe SourceOrder), -- | statement_descriptor: Extra information about a source. This will appear on your customer\'s statement every time you charge the source. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'StatementDescriptor :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | status: For bank accounts, possible values are \`new\`, \`validated\`, \`verified\`, \`verification_failed\`, or \`errored\`. A bank account that hasn\'t had any activity or validation performed is \`new\`. If Stripe can determine that the bank account exists, its status will be \`validated\`. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be \`verified\`. If the verification failed for any reason, such as microdeposit failure, the status will be \`verification_failed\`. If a transfer sent to this bank account fails, we\'ll set the status to \`errored\` and will not continue to send transfers until the bank details are updated. -- -- For external accounts, possible values are \`new\` and \`errored\`. Validations aren\'t run against external accounts because they\'re only used for payouts. This means the other statuses don\'t apply. If a transfer fails, the status is set to \`errored\` and transfers are stopped until account details are updated. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'Status :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | three_d_secure setupIntentLastSetupError'Source'ThreeDSecure :: (GHC.Maybe.Maybe SourceTypeThreeDSecure), -- | tokenization_method: If the card number is tokenized, this is the method that was used. Can be \`android_pay\` (includes Google Pay), \`apple_pay\`, \`masterpass\`, \`visa_checkout\`, or null. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'TokenizationMethod :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | type: The \`type\` of the source. The \`type\` is a payment method, one of \`ach_credit_transfer\`, \`ach_debit\`, \`alipay\`, \`bancontact\`, \`card\`, \`card_present\`, \`eps\`, \`giropay\`, \`ideal\`, \`multibanco\`, \`klarna\`, \`p24\`, \`sepa_debit\`, \`sofort\`, \`three_d_secure\`, or \`wechat\`. An additional hash is included on the source with a name matching this value. It contains additional information specific to the [payment method](https:\/\/stripe.com\/docs\/sources) used. setupIntentLastSetupError'Source'Type :: (GHC.Maybe.Maybe SetupIntentLastSetupError'Source'Type'), -- | usage: Either \`reusable\` or \`single_use\`. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'Usage :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | wechat setupIntentLastSetupError'Source'Wechat :: (GHC.Maybe.Maybe SourceTypeWechat) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON SetupIntentLastSetupError'Source' where toJSON obj = Data.Aeson.Types.Internal.object ("account" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Account obj : "account_holder_name" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'AccountHolderName obj : "account_holder_type" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'AccountHolderType obj : "ach_credit_transfer" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'AchCreditTransfer obj : "ach_debit" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'AchDebit obj : "acss_debit" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'AcssDebit obj : "address_city" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'AddressCity obj : "address_country" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'AddressCountry obj : "address_line1" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'AddressLine1 obj : "address_line1_check" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'AddressLine1Check obj : "address_line2" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'AddressLine2 obj : "address_state" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'AddressState obj : "address_zip" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'AddressZip obj : "address_zip_check" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'AddressZipCheck obj : "alipay" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Alipay obj : "amount" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Amount obj : "au_becs_debit" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'AuBecsDebit obj : "available_payout_methods" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'AvailablePayoutMethods obj : "bancontact" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Bancontact obj : "bank_name" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'BankName obj : "brand" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Brand obj : "card" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Card obj : "card_present" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'CardPresent obj : "client_secret" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'ClientSecret obj : "code_verification" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'CodeVerification obj : "country" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Country obj : "created" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Created obj : "currency" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Currency obj : "customer" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Customer obj : "cvc_check" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'CvcCheck obj : "default_for_currency" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'DefaultForCurrency obj : "dynamic_last4" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'DynamicLast4 obj : "eps" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Eps obj : "exp_month" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'ExpMonth obj : "exp_year" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'ExpYear obj : "fingerprint" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Fingerprint obj : "flow" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Flow obj : "funding" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Funding obj : "giropay" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Giropay obj : "id" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Id obj : "ideal" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Ideal obj : "klarna" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Klarna obj : "last4" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Last4 obj : "livemode" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Livemode obj : "metadata" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Metadata obj : "multibanco" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Multibanco obj : "name" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Name obj : "object" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Object obj : "owner" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner obj : "p24" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'P24 obj : "receiver" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Receiver obj : "recipient" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Recipient obj : "redirect" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Redirect obj : "routing_number" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'RoutingNumber obj : "sepa_debit" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'SepaDebit obj : "sofort" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Sofort obj : "source_order" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'SourceOrder obj : "statement_descriptor" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'StatementDescriptor obj : "status" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Status obj : "three_d_secure" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'ThreeDSecure obj : "tokenization_method" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'TokenizationMethod obj : "type" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Type obj : "usage" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Usage obj : "wechat" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Wechat obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("account" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Account obj) GHC.Base.<> (("account_holder_name" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'AccountHolderName obj) GHC.Base.<> (("account_holder_type" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'AccountHolderType obj) GHC.Base.<> (("ach_credit_transfer" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'AchCreditTransfer obj) GHC.Base.<> (("ach_debit" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'AchDebit obj) GHC.Base.<> (("acss_debit" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'AcssDebit obj) GHC.Base.<> (("address_city" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'AddressCity obj) GHC.Base.<> (("address_country" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'AddressCountry obj) GHC.Base.<> (("address_line1" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'AddressLine1 obj) GHC.Base.<> (("address_line1_check" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'AddressLine1Check obj) GHC.Base.<> (("address_line2" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'AddressLine2 obj) GHC.Base.<> (("address_state" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'AddressState obj) GHC.Base.<> (("address_zip" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'AddressZip obj) GHC.Base.<> (("address_zip_check" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'AddressZipCheck obj) GHC.Base.<> (("alipay" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Alipay obj) GHC.Base.<> (("amount" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Amount obj) GHC.Base.<> (("au_becs_debit" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'AuBecsDebit obj) GHC.Base.<> (("available_payout_methods" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'AvailablePayoutMethods obj) GHC.Base.<> (("bancontact" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Bancontact obj) GHC.Base.<> (("bank_name" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'BankName obj) GHC.Base.<> (("brand" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Brand obj) GHC.Base.<> (("card" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Card obj) GHC.Base.<> (("card_present" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'CardPresent obj) GHC.Base.<> (("client_secret" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'ClientSecret obj) GHC.Base.<> (("code_verification" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'CodeVerification obj) GHC.Base.<> (("country" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Country obj) GHC.Base.<> (("created" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Created obj) GHC.Base.<> (("currency" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Currency obj) GHC.Base.<> (("customer" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Customer obj) GHC.Base.<> (("cvc_check" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'CvcCheck obj) GHC.Base.<> (("default_for_currency" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'DefaultForCurrency obj) GHC.Base.<> (("dynamic_last4" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'DynamicLast4 obj) GHC.Base.<> (("eps" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Eps obj) GHC.Base.<> (("exp_month" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'ExpMonth obj) GHC.Base.<> (("exp_year" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'ExpYear obj) GHC.Base.<> (("fingerprint" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Fingerprint obj) GHC.Base.<> (("flow" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Flow obj) GHC.Base.<> (("funding" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Funding obj) GHC.Base.<> (("giropay" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Giropay obj) GHC.Base.<> (("id" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Id obj) GHC.Base.<> (("ideal" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Ideal obj) GHC.Base.<> (("klarna" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Klarna obj) GHC.Base.<> (("last4" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Last4 obj) GHC.Base.<> (("livemode" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Livemode obj) GHC.Base.<> (("metadata" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Metadata obj) GHC.Base.<> (("multibanco" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Multibanco obj) GHC.Base.<> (("name" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Name obj) GHC.Base.<> (("object" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Object obj) GHC.Base.<> (("owner" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner obj) GHC.Base.<> (("p24" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'P24 obj) GHC.Base.<> (("receiver" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Receiver obj) GHC.Base.<> (("recipient" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Recipient obj) GHC.Base.<> (("redirect" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Redirect obj) GHC.Base.<> (("routing_number" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'RoutingNumber obj) GHC.Base.<> (("sepa_debit" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'SepaDebit obj) GHC.Base.<> (("sofort" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Sofort obj) GHC.Base.<> (("source_order" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'SourceOrder obj) GHC.Base.<> (("statement_descriptor" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'StatementDescriptor obj) GHC.Base.<> (("status" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Status obj) GHC.Base.<> (("three_d_secure" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'ThreeDSecure obj) GHC.Base.<> (("tokenization_method" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'TokenizationMethod obj) GHC.Base.<> (("type" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Type obj) GHC.Base.<> (("usage" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Usage obj) GHC.Base.<> ("wechat" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Wechat obj)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) instance Data.Aeson.Types.FromJSON.FromJSON SetupIntentLastSetupError'Source' where parseJSON = Data.Aeson.Types.FromJSON.withObject "SetupIntentLastSetupError'Source'" (\obj -> (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((GHC.Base.pure SetupIntentLastSetupError'Source' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "account")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "account_holder_name")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "account_holder_type")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "ach_credit_transfer")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "ach_debit")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "acss_debit")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "address_city")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "address_country")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "address_line1")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "address_line1_check")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "address_line2")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "address_state")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "address_zip")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "address_zip_check")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "alipay")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "amount")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "au_becs_debit")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "available_payout_methods")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "bancontact")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "bank_name")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "brand")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "card")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "card_present")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "client_secret")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "code_verification")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "country")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "created")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "currency")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "customer")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "cvc_check")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "default_for_currency")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "dynamic_last4")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "eps")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "exp_month")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "exp_year")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "fingerprint")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "flow")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "funding")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "giropay")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "id")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "ideal")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "klarna")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "last4")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "livemode")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "metadata")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "multibanco")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "name")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "object")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "owner")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "p24")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "receiver")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "recipient")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "redirect")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "routing_number")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "sepa_debit")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "sofort")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "source_order")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "statement_descriptor")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "status")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "three_d_secure")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "tokenization_method")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "type")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "usage")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "wechat")) -- | Create a new 'SetupIntentLastSetupError'Source'' with all required fields. mkSetupIntentLastSetupError'Source' :: SetupIntentLastSetupError'Source' mkSetupIntentLastSetupError'Source' = SetupIntentLastSetupError'Source' { setupIntentLastSetupError'Source'Account = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'AccountHolderName = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'AccountHolderType = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'AchCreditTransfer = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'AchDebit = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'AcssDebit = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'AddressCity = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'AddressCountry = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'AddressLine1 = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'AddressLine1Check = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'AddressLine2 = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'AddressState = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'AddressZip = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'AddressZipCheck = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Alipay = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Amount = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'AuBecsDebit = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'AvailablePayoutMethods = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Bancontact = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'BankName = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Brand = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Card = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'CardPresent = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'ClientSecret = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'CodeVerification = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Country = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Created = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Currency = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Customer = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'CvcCheck = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'DefaultForCurrency = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'DynamicLast4 = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Eps = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'ExpMonth = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'ExpYear = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Fingerprint = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Flow = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Funding = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Giropay = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Id = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Ideal = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Klarna = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Last4 = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Livemode = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Metadata = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Multibanco = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Name = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Object = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Owner = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'P24 = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Receiver = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Recipient = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Redirect = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'RoutingNumber = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'SepaDebit = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Sofort = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'SourceOrder = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'StatementDescriptor = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Status = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'ThreeDSecure = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'TokenizationMethod = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Type = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Usage = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Wechat = GHC.Maybe.Nothing } -- | Defines the oneOf schema located at @components.schemas.setup_intent.properties.last_setup_error.anyOf.properties.source.anyOf.properties.account.anyOf@ in the specification. -- -- The ID of the account that the bank account is associated with. data SetupIntentLastSetupError'Source'Account'Variants = SetupIntentLastSetupError'Source'Account'Text Data.Text.Internal.Text | SetupIntentLastSetupError'Source'Account'Account Account deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON SetupIntentLastSetupError'Source'Account'Variants where toJSON (SetupIntentLastSetupError'Source'Account'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (SetupIntentLastSetupError'Source'Account'Account a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON SetupIntentLastSetupError'Source'Account'Variants where parseJSON val = case (SetupIntentLastSetupError'Source'Account'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((SetupIntentLastSetupError'Source'Account'Account 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 @components.schemas.setup_intent.properties.last_setup_error.anyOf.properties.source.anyOf.properties.available_payout_methods.items@ in the specification. data SetupIntentLastSetupError'Source'AvailablePayoutMethods' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. SetupIntentLastSetupError'Source'AvailablePayoutMethods'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. SetupIntentLastSetupError'Source'AvailablePayoutMethods'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"instant"@ SetupIntentLastSetupError'Source'AvailablePayoutMethods'EnumInstant | -- | Represents the JSON value @"standard"@ SetupIntentLastSetupError'Source'AvailablePayoutMethods'EnumStandard deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON SetupIntentLastSetupError'Source'AvailablePayoutMethods' where toJSON (SetupIntentLastSetupError'Source'AvailablePayoutMethods'Other val) = val toJSON (SetupIntentLastSetupError'Source'AvailablePayoutMethods'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (SetupIntentLastSetupError'Source'AvailablePayoutMethods'EnumInstant) = "instant" toJSON (SetupIntentLastSetupError'Source'AvailablePayoutMethods'EnumStandard) = "standard" instance Data.Aeson.Types.FromJSON.FromJSON SetupIntentLastSetupError'Source'AvailablePayoutMethods' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "instant" -> SetupIntentLastSetupError'Source'AvailablePayoutMethods'EnumInstant | val GHC.Classes.== "standard" -> SetupIntentLastSetupError'Source'AvailablePayoutMethods'EnumStandard | GHC.Base.otherwise -> SetupIntentLastSetupError'Source'AvailablePayoutMethods'Other val ) -- | Defines the oneOf schema located at @components.schemas.setup_intent.properties.last_setup_error.anyOf.properties.source.anyOf.properties.customer.anyOf@ in the specification. -- -- The ID of the customer that the bank account is associated with. data SetupIntentLastSetupError'Source'Customer'Variants = SetupIntentLastSetupError'Source'Customer'Text Data.Text.Internal.Text | SetupIntentLastSetupError'Source'Customer'Customer Customer | SetupIntentLastSetupError'Source'Customer'DeletedCustomer DeletedCustomer deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON SetupIntentLastSetupError'Source'Customer'Variants where toJSON (SetupIntentLastSetupError'Source'Customer'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (SetupIntentLastSetupError'Source'Customer'Customer a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (SetupIntentLastSetupError'Source'Customer'DeletedCustomer a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON SetupIntentLastSetupError'Source'Customer'Variants where parseJSON val = case (SetupIntentLastSetupError'Source'Customer'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((SetupIntentLastSetupError'Source'Customer'Customer Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((SetupIntentLastSetupError'Source'Customer'DeletedCustomer 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 @components.schemas.setup_intent.properties.last_setup_error.anyOf.properties.source.anyOf.properties.object@ in the specification. -- -- String representing the object\'s type. Objects of the same type share the same value. data SetupIntentLastSetupError'Source'Object' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. SetupIntentLastSetupError'Source'Object'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. SetupIntentLastSetupError'Source'Object'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"bank_account"@ SetupIntentLastSetupError'Source'Object'EnumBankAccount deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON SetupIntentLastSetupError'Source'Object' where toJSON (SetupIntentLastSetupError'Source'Object'Other val) = val toJSON (SetupIntentLastSetupError'Source'Object'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (SetupIntentLastSetupError'Source'Object'EnumBankAccount) = "bank_account" instance Data.Aeson.Types.FromJSON.FromJSON SetupIntentLastSetupError'Source'Object' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "bank_account" -> SetupIntentLastSetupError'Source'Object'EnumBankAccount | GHC.Base.otherwise -> SetupIntentLastSetupError'Source'Object'Other val ) -- | Defines the object schema located at @components.schemas.setup_intent.properties.last_setup_error.anyOf.properties.source.anyOf.properties.owner.anyOf@ in the specification. -- -- Information about the owner of the payment instrument that may be used or required by particular source types. data SetupIntentLastSetupError'Source'Owner' = SetupIntentLastSetupError'Source'Owner' { -- | address: Owner\'s address. setupIntentLastSetupError'Source'Owner'Address :: (GHC.Maybe.Maybe SetupIntentLastSetupError'Source'Owner'Address'), -- | email: Owner\'s email address. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'Owner'Email :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | name: Owner\'s full name. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'Owner'Name :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | phone: Owner\'s phone number (including extension). -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'Owner'Phone :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | verified_address: Verified owner\'s address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. setupIntentLastSetupError'Source'Owner'VerifiedAddress :: (GHC.Maybe.Maybe SetupIntentLastSetupError'Source'Owner'VerifiedAddress'), -- | verified_email: Verified owner\'s email address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'Owner'VerifiedEmail :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | verified_name: Verified owner\'s full name. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'Owner'VerifiedName :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | verified_phone: Verified owner\'s phone number (including extension). Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'Owner'VerifiedPhone :: (GHC.Maybe.Maybe Data.Text.Internal.Text) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON SetupIntentLastSetupError'Source'Owner' where toJSON obj = Data.Aeson.Types.Internal.object ("address" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner'Address obj : "email" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner'Email obj : "name" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner'Name obj : "phone" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner'Phone obj : "verified_address" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner'VerifiedAddress obj : "verified_email" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner'VerifiedEmail obj : "verified_name" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner'VerifiedName obj : "verified_phone" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner'VerifiedPhone obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("address" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner'Address obj) GHC.Base.<> (("email" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner'Email obj) GHC.Base.<> (("name" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner'Name obj) GHC.Base.<> (("phone" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner'Phone obj) GHC.Base.<> (("verified_address" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner'VerifiedAddress obj) GHC.Base.<> (("verified_email" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner'VerifiedEmail obj) GHC.Base.<> (("verified_name" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner'VerifiedName obj) GHC.Base.<> ("verified_phone" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner'VerifiedPhone obj)))))))) instance Data.Aeson.Types.FromJSON.FromJSON SetupIntentLastSetupError'Source'Owner' where parseJSON = Data.Aeson.Types.FromJSON.withObject "SetupIntentLastSetupError'Source'Owner'" (\obj -> (((((((GHC.Base.pure SetupIntentLastSetupError'Source'Owner' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "address")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "email")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "name")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "phone")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "verified_address")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "verified_email")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "verified_name")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "verified_phone")) -- | Create a new 'SetupIntentLastSetupError'Source'Owner'' with all required fields. mkSetupIntentLastSetupError'Source'Owner' :: SetupIntentLastSetupError'Source'Owner' mkSetupIntentLastSetupError'Source'Owner' = SetupIntentLastSetupError'Source'Owner' { setupIntentLastSetupError'Source'Owner'Address = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Owner'Email = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Owner'Name = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Owner'Phone = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Owner'VerifiedAddress = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Owner'VerifiedEmail = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Owner'VerifiedName = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Owner'VerifiedPhone = GHC.Maybe.Nothing } -- | Defines the object schema located at @components.schemas.setup_intent.properties.last_setup_error.anyOf.properties.source.anyOf.properties.owner.anyOf.properties.address.anyOf@ in the specification. -- -- Owner\\\'s address. data SetupIntentLastSetupError'Source'Owner'Address' = SetupIntentLastSetupError'Source'Owner'Address' { -- | city: City, district, suburb, town, or village. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'Owner'Address'City :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | country: Two-letter country code ([ISO 3166-1 alpha-2](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1_alpha-2)). -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'Owner'Address'Country :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | line1: Address line 1 (e.g., street, PO Box, or company name). -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'Owner'Address'Line1 :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | line2: Address line 2 (e.g., apartment, suite, unit, or building). -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'Owner'Address'Line2 :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | postal_code: ZIP or postal code. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'Owner'Address'PostalCode :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | state: State, county, province, or region. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'Owner'Address'State :: (GHC.Maybe.Maybe Data.Text.Internal.Text) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON SetupIntentLastSetupError'Source'Owner'Address' where toJSON obj = Data.Aeson.Types.Internal.object ("city" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner'Address'City obj : "country" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner'Address'Country obj : "line1" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner'Address'Line1 obj : "line2" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner'Address'Line2 obj : "postal_code" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner'Address'PostalCode obj : "state" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner'Address'State obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("city" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner'Address'City obj) GHC.Base.<> (("country" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner'Address'Country obj) GHC.Base.<> (("line1" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner'Address'Line1 obj) GHC.Base.<> (("line2" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner'Address'Line2 obj) GHC.Base.<> (("postal_code" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner'Address'PostalCode obj) GHC.Base.<> ("state" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner'Address'State obj)))))) instance Data.Aeson.Types.FromJSON.FromJSON SetupIntentLastSetupError'Source'Owner'Address' where parseJSON = Data.Aeson.Types.FromJSON.withObject "SetupIntentLastSetupError'Source'Owner'Address'" (\obj -> (((((GHC.Base.pure SetupIntentLastSetupError'Source'Owner'Address' 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 'SetupIntentLastSetupError'Source'Owner'Address'' with all required fields. mkSetupIntentLastSetupError'Source'Owner'Address' :: SetupIntentLastSetupError'Source'Owner'Address' mkSetupIntentLastSetupError'Source'Owner'Address' = SetupIntentLastSetupError'Source'Owner'Address' { setupIntentLastSetupError'Source'Owner'Address'City = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Owner'Address'Country = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Owner'Address'Line1 = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Owner'Address'Line2 = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Owner'Address'PostalCode = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Owner'Address'State = GHC.Maybe.Nothing } -- | Defines the object schema located at @components.schemas.setup_intent.properties.last_setup_error.anyOf.properties.source.anyOf.properties.owner.anyOf.properties.verified_address.anyOf@ in the specification. -- -- Verified owner\\\'s address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. data SetupIntentLastSetupError'Source'Owner'VerifiedAddress' = SetupIntentLastSetupError'Source'Owner'VerifiedAddress' { -- | city: City, district, suburb, town, or village. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'Owner'VerifiedAddress'City :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | country: Two-letter country code ([ISO 3166-1 alpha-2](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1_alpha-2)). -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'Owner'VerifiedAddress'Country :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | line1: Address line 1 (e.g., street, PO Box, or company name). -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'Owner'VerifiedAddress'Line1 :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | line2: Address line 2 (e.g., apartment, suite, unit, or building). -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'Owner'VerifiedAddress'Line2 :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | postal_code: ZIP or postal code. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'Owner'VerifiedAddress'PostalCode :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | state: State, county, province, or region. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentLastSetupError'Source'Owner'VerifiedAddress'State :: (GHC.Maybe.Maybe Data.Text.Internal.Text) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON SetupIntentLastSetupError'Source'Owner'VerifiedAddress' where toJSON obj = Data.Aeson.Types.Internal.object ("city" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner'VerifiedAddress'City obj : "country" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner'VerifiedAddress'Country obj : "line1" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner'VerifiedAddress'Line1 obj : "line2" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner'VerifiedAddress'Line2 obj : "postal_code" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner'VerifiedAddress'PostalCode obj : "state" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner'VerifiedAddress'State obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("city" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner'VerifiedAddress'City obj) GHC.Base.<> (("country" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner'VerifiedAddress'Country obj) GHC.Base.<> (("line1" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner'VerifiedAddress'Line1 obj) GHC.Base.<> (("line2" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner'VerifiedAddress'Line2 obj) GHC.Base.<> (("postal_code" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner'VerifiedAddress'PostalCode obj) GHC.Base.<> ("state" Data.Aeson.Types.ToJSON..= setupIntentLastSetupError'Source'Owner'VerifiedAddress'State obj)))))) instance Data.Aeson.Types.FromJSON.FromJSON SetupIntentLastSetupError'Source'Owner'VerifiedAddress' where parseJSON = Data.Aeson.Types.FromJSON.withObject "SetupIntentLastSetupError'Source'Owner'VerifiedAddress'" (\obj -> (((((GHC.Base.pure SetupIntentLastSetupError'Source'Owner'VerifiedAddress' 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 'SetupIntentLastSetupError'Source'Owner'VerifiedAddress'' with all required fields. mkSetupIntentLastSetupError'Source'Owner'VerifiedAddress' :: SetupIntentLastSetupError'Source'Owner'VerifiedAddress' mkSetupIntentLastSetupError'Source'Owner'VerifiedAddress' = SetupIntentLastSetupError'Source'Owner'VerifiedAddress' { setupIntentLastSetupError'Source'Owner'VerifiedAddress'City = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Owner'VerifiedAddress'Country = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Owner'VerifiedAddress'Line1 = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Owner'VerifiedAddress'Line2 = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Owner'VerifiedAddress'PostalCode = GHC.Maybe.Nothing, setupIntentLastSetupError'Source'Owner'VerifiedAddress'State = GHC.Maybe.Nothing } -- | Defines the oneOf schema located at @components.schemas.setup_intent.properties.last_setup_error.anyOf.properties.source.anyOf.properties.recipient.anyOf@ in the specification. -- -- The recipient that this card belongs to. This attribute will not be in the card object if the card belongs to a customer or account instead. data SetupIntentLastSetupError'Source'Recipient'Variants = SetupIntentLastSetupError'Source'Recipient'Text Data.Text.Internal.Text | SetupIntentLastSetupError'Source'Recipient'Recipient Recipient deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON SetupIntentLastSetupError'Source'Recipient'Variants where toJSON (SetupIntentLastSetupError'Source'Recipient'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (SetupIntentLastSetupError'Source'Recipient'Recipient a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON SetupIntentLastSetupError'Source'Recipient'Variants where parseJSON val = case (SetupIntentLastSetupError'Source'Recipient'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((SetupIntentLastSetupError'Source'Recipient'Recipient 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 @components.schemas.setup_intent.properties.last_setup_error.anyOf.properties.source.anyOf.properties.type@ in the specification. -- -- The \`type\` of the source. The \`type\` is a payment method, one of \`ach_credit_transfer\`, \`ach_debit\`, \`alipay\`, \`bancontact\`, \`card\`, \`card_present\`, \`eps\`, \`giropay\`, \`ideal\`, \`multibanco\`, \`klarna\`, \`p24\`, \`sepa_debit\`, \`sofort\`, \`three_d_secure\`, or \`wechat\`. An additional hash is included on the source with a name matching this value. It contains additional information specific to the [payment method](https:\/\/stripe.com\/docs\/sources) used. data SetupIntentLastSetupError'Source'Type' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. SetupIntentLastSetupError'Source'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. SetupIntentLastSetupError'Source'Type'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"ach_credit_transfer"@ SetupIntentLastSetupError'Source'Type'EnumAchCreditTransfer | -- | Represents the JSON value @"ach_debit"@ SetupIntentLastSetupError'Source'Type'EnumAchDebit | -- | Represents the JSON value @"acss_debit"@ SetupIntentLastSetupError'Source'Type'EnumAcssDebit | -- | Represents the JSON value @"alipay"@ SetupIntentLastSetupError'Source'Type'EnumAlipay | -- | Represents the JSON value @"au_becs_debit"@ SetupIntentLastSetupError'Source'Type'EnumAuBecsDebit | -- | Represents the JSON value @"bancontact"@ SetupIntentLastSetupError'Source'Type'EnumBancontact | -- | Represents the JSON value @"card"@ SetupIntentLastSetupError'Source'Type'EnumCard | -- | Represents the JSON value @"card_present"@ SetupIntentLastSetupError'Source'Type'EnumCardPresent | -- | Represents the JSON value @"eps"@ SetupIntentLastSetupError'Source'Type'EnumEps | -- | Represents the JSON value @"giropay"@ SetupIntentLastSetupError'Source'Type'EnumGiropay | -- | Represents the JSON value @"ideal"@ SetupIntentLastSetupError'Source'Type'EnumIdeal | -- | Represents the JSON value @"klarna"@ SetupIntentLastSetupError'Source'Type'EnumKlarna | -- | Represents the JSON value @"multibanco"@ SetupIntentLastSetupError'Source'Type'EnumMultibanco | -- | Represents the JSON value @"p24"@ SetupIntentLastSetupError'Source'Type'EnumP24 | -- | Represents the JSON value @"sepa_debit"@ SetupIntentLastSetupError'Source'Type'EnumSepaDebit | -- | Represents the JSON value @"sofort"@ SetupIntentLastSetupError'Source'Type'EnumSofort | -- | Represents the JSON value @"three_d_secure"@ SetupIntentLastSetupError'Source'Type'EnumThreeDSecure | -- | Represents the JSON value @"wechat"@ SetupIntentLastSetupError'Source'Type'EnumWechat deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON SetupIntentLastSetupError'Source'Type' where toJSON (SetupIntentLastSetupError'Source'Type'Other val) = val toJSON (SetupIntentLastSetupError'Source'Type'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (SetupIntentLastSetupError'Source'Type'EnumAchCreditTransfer) = "ach_credit_transfer" toJSON (SetupIntentLastSetupError'Source'Type'EnumAchDebit) = "ach_debit" toJSON (SetupIntentLastSetupError'Source'Type'EnumAcssDebit) = "acss_debit" toJSON (SetupIntentLastSetupError'Source'Type'EnumAlipay) = "alipay" toJSON (SetupIntentLastSetupError'Source'Type'EnumAuBecsDebit) = "au_becs_debit" toJSON (SetupIntentLastSetupError'Source'Type'EnumBancontact) = "bancontact" toJSON (SetupIntentLastSetupError'Source'Type'EnumCard) = "card" toJSON (SetupIntentLastSetupError'Source'Type'EnumCardPresent) = "card_present" toJSON (SetupIntentLastSetupError'Source'Type'EnumEps) = "eps" toJSON (SetupIntentLastSetupError'Source'Type'EnumGiropay) = "giropay" toJSON (SetupIntentLastSetupError'Source'Type'EnumIdeal) = "ideal" toJSON (SetupIntentLastSetupError'Source'Type'EnumKlarna) = "klarna" toJSON (SetupIntentLastSetupError'Source'Type'EnumMultibanco) = "multibanco" toJSON (SetupIntentLastSetupError'Source'Type'EnumP24) = "p24" toJSON (SetupIntentLastSetupError'Source'Type'EnumSepaDebit) = "sepa_debit" toJSON (SetupIntentLastSetupError'Source'Type'EnumSofort) = "sofort" toJSON (SetupIntentLastSetupError'Source'Type'EnumThreeDSecure) = "three_d_secure" toJSON (SetupIntentLastSetupError'Source'Type'EnumWechat) = "wechat" instance Data.Aeson.Types.FromJSON.FromJSON SetupIntentLastSetupError'Source'Type' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "ach_credit_transfer" -> SetupIntentLastSetupError'Source'Type'EnumAchCreditTransfer | val GHC.Classes.== "ach_debit" -> SetupIntentLastSetupError'Source'Type'EnumAchDebit | val GHC.Classes.== "acss_debit" -> SetupIntentLastSetupError'Source'Type'EnumAcssDebit | val GHC.Classes.== "alipay" -> SetupIntentLastSetupError'Source'Type'EnumAlipay | val GHC.Classes.== "au_becs_debit" -> SetupIntentLastSetupError'Source'Type'EnumAuBecsDebit | val GHC.Classes.== "bancontact" -> SetupIntentLastSetupError'Source'Type'EnumBancontact | val GHC.Classes.== "card" -> SetupIntentLastSetupError'Source'Type'EnumCard | val GHC.Classes.== "card_present" -> SetupIntentLastSetupError'Source'Type'EnumCardPresent | val GHC.Classes.== "eps" -> SetupIntentLastSetupError'Source'Type'EnumEps | val GHC.Classes.== "giropay" -> SetupIntentLastSetupError'Source'Type'EnumGiropay | val GHC.Classes.== "ideal" -> SetupIntentLastSetupError'Source'Type'EnumIdeal | val GHC.Classes.== "klarna" -> SetupIntentLastSetupError'Source'Type'EnumKlarna | val GHC.Classes.== "multibanco" -> SetupIntentLastSetupError'Source'Type'EnumMultibanco | val GHC.Classes.== "p24" -> SetupIntentLastSetupError'Source'Type'EnumP24 | val GHC.Classes.== "sepa_debit" -> SetupIntentLastSetupError'Source'Type'EnumSepaDebit | val GHC.Classes.== "sofort" -> SetupIntentLastSetupError'Source'Type'EnumSofort | val GHC.Classes.== "three_d_secure" -> SetupIntentLastSetupError'Source'Type'EnumThreeDSecure | val GHC.Classes.== "wechat" -> SetupIntentLastSetupError'Source'Type'EnumWechat | GHC.Base.otherwise -> SetupIntentLastSetupError'Source'Type'Other val ) -- | Defines the enum schema located at @components.schemas.setup_intent.properties.last_setup_error.anyOf.properties.type@ in the specification. -- -- The type of error returned. One of \`api_connection_error\`, \`api_error\`, \`authentication_error\`, \`card_error\`, \`idempotency_error\`, \`invalid_request_error\`, or \`rate_limit_error\` data SetupIntentLastSetupError'Type' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. SetupIntentLastSetupError'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. SetupIntentLastSetupError'Type'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"api_connection_error"@ SetupIntentLastSetupError'Type'EnumApiConnectionError | -- | Represents the JSON value @"api_error"@ SetupIntentLastSetupError'Type'EnumApiError | -- | Represents the JSON value @"authentication_error"@ SetupIntentLastSetupError'Type'EnumAuthenticationError | -- | Represents the JSON value @"card_error"@ SetupIntentLastSetupError'Type'EnumCardError | -- | Represents the JSON value @"idempotency_error"@ SetupIntentLastSetupError'Type'EnumIdempotencyError | -- | Represents the JSON value @"invalid_request_error"@ SetupIntentLastSetupError'Type'EnumInvalidRequestError | -- | Represents the JSON value @"rate_limit_error"@ SetupIntentLastSetupError'Type'EnumRateLimitError deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON SetupIntentLastSetupError'Type' where toJSON (SetupIntentLastSetupError'Type'Other val) = val toJSON (SetupIntentLastSetupError'Type'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (SetupIntentLastSetupError'Type'EnumApiConnectionError) = "api_connection_error" toJSON (SetupIntentLastSetupError'Type'EnumApiError) = "api_error" toJSON (SetupIntentLastSetupError'Type'EnumAuthenticationError) = "authentication_error" toJSON (SetupIntentLastSetupError'Type'EnumCardError) = "card_error" toJSON (SetupIntentLastSetupError'Type'EnumIdempotencyError) = "idempotency_error" toJSON (SetupIntentLastSetupError'Type'EnumInvalidRequestError) = "invalid_request_error" toJSON (SetupIntentLastSetupError'Type'EnumRateLimitError) = "rate_limit_error" instance Data.Aeson.Types.FromJSON.FromJSON SetupIntentLastSetupError'Type' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "api_connection_error" -> SetupIntentLastSetupError'Type'EnumApiConnectionError | val GHC.Classes.== "api_error" -> SetupIntentLastSetupError'Type'EnumApiError | val GHC.Classes.== "authentication_error" -> SetupIntentLastSetupError'Type'EnumAuthenticationError | val GHC.Classes.== "card_error" -> SetupIntentLastSetupError'Type'EnumCardError | val GHC.Classes.== "idempotency_error" -> SetupIntentLastSetupError'Type'EnumIdempotencyError | val GHC.Classes.== "invalid_request_error" -> SetupIntentLastSetupError'Type'EnumInvalidRequestError | val GHC.Classes.== "rate_limit_error" -> SetupIntentLastSetupError'Type'EnumRateLimitError | GHC.Base.otherwise -> SetupIntentLastSetupError'Type'Other val ) -- | Defines the oneOf schema located at @components.schemas.setup_intent.properties.latest_attempt.anyOf@ in the specification. -- -- The most recent SetupAttempt for this SetupIntent. data SetupIntentLatestAttempt'Variants = SetupIntentLatestAttempt'Text Data.Text.Internal.Text | SetupIntentLatestAttempt'SetupAttempt SetupAttempt deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON SetupIntentLatestAttempt'Variants where toJSON (SetupIntentLatestAttempt'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (SetupIntentLatestAttempt'SetupAttempt a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON SetupIntentLatestAttempt'Variants where parseJSON val = case (SetupIntentLatestAttempt'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((SetupIntentLatestAttempt'SetupAttempt 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 @components.schemas.setup_intent.properties.mandate.anyOf@ in the specification. -- -- ID of the multi use Mandate generated by the SetupIntent. data SetupIntentMandate'Variants = SetupIntentMandate'Text Data.Text.Internal.Text | SetupIntentMandate'Mandate Mandate deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON SetupIntentMandate'Variants where toJSON (SetupIntentMandate'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (SetupIntentMandate'Mandate a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON SetupIntentMandate'Variants where parseJSON val = case (SetupIntentMandate'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((SetupIntentMandate'Mandate 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 @components.schemas.setup_intent.properties.next_action.anyOf@ in the specification. -- -- If present, this property tells you what actions you need to take in order for your customer to continue payment setup. data SetupIntentNextAction' = SetupIntentNextAction' { -- | redirect_to_url: setupIntentNextAction'RedirectToUrl :: (GHC.Maybe.Maybe SetupIntentNextActionRedirectToUrl), -- | type: Type of the next action to perform, one of \`redirect_to_url\`, \`use_stripe_sdk\`, \`alipay_handle_redirect\`, or \`oxxo_display_details\`. -- -- Constraints: -- -- * Maximum length of 5000 setupIntentNextAction'Type :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | use_stripe_sdk: When confirming a SetupIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js. setupIntentNextAction'UseStripeSdk :: (GHC.Maybe.Maybe Data.Aeson.Types.Internal.Object), -- | verify_with_microdeposits: setupIntentNextAction'VerifyWithMicrodeposits :: (GHC.Maybe.Maybe SetupIntentNextActionVerifyWithMicrodeposits) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON SetupIntentNextAction' where toJSON obj = Data.Aeson.Types.Internal.object ("redirect_to_url" Data.Aeson.Types.ToJSON..= setupIntentNextAction'RedirectToUrl obj : "type" Data.Aeson.Types.ToJSON..= setupIntentNextAction'Type obj : "use_stripe_sdk" Data.Aeson.Types.ToJSON..= setupIntentNextAction'UseStripeSdk obj : "verify_with_microdeposits" Data.Aeson.Types.ToJSON..= setupIntentNextAction'VerifyWithMicrodeposits obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("redirect_to_url" Data.Aeson.Types.ToJSON..= setupIntentNextAction'RedirectToUrl obj) GHC.Base.<> (("type" Data.Aeson.Types.ToJSON..= setupIntentNextAction'Type obj) GHC.Base.<> (("use_stripe_sdk" Data.Aeson.Types.ToJSON..= setupIntentNextAction'UseStripeSdk obj) GHC.Base.<> ("verify_with_microdeposits" Data.Aeson.Types.ToJSON..= setupIntentNextAction'VerifyWithMicrodeposits obj)))) instance Data.Aeson.Types.FromJSON.FromJSON SetupIntentNextAction' where parseJSON = Data.Aeson.Types.FromJSON.withObject "SetupIntentNextAction'" (\obj -> (((GHC.Base.pure SetupIntentNextAction' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "redirect_to_url")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "type")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "use_stripe_sdk")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "verify_with_microdeposits")) -- | Create a new 'SetupIntentNextAction'' with all required fields. mkSetupIntentNextAction' :: SetupIntentNextAction' mkSetupIntentNextAction' = SetupIntentNextAction' { setupIntentNextAction'RedirectToUrl = GHC.Maybe.Nothing, setupIntentNextAction'Type = GHC.Maybe.Nothing, setupIntentNextAction'UseStripeSdk = GHC.Maybe.Nothing, setupIntentNextAction'VerifyWithMicrodeposits = GHC.Maybe.Nothing } -- | Defines the oneOf schema located at @components.schemas.setup_intent.properties.on_behalf_of.anyOf@ in the specification. -- -- The account (if any) for which the setup is intended. data SetupIntentOnBehalfOf'Variants = SetupIntentOnBehalfOf'Text Data.Text.Internal.Text | SetupIntentOnBehalfOf'Account Account deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON SetupIntentOnBehalfOf'Variants where toJSON (SetupIntentOnBehalfOf'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (SetupIntentOnBehalfOf'Account a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON SetupIntentOnBehalfOf'Variants where parseJSON val = case (SetupIntentOnBehalfOf'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((SetupIntentOnBehalfOf'Account 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 @components.schemas.setup_intent.properties.payment_method.anyOf@ in the specification. -- -- ID of the payment method used with this SetupIntent. data SetupIntentPaymentMethod'Variants = SetupIntentPaymentMethod'Text Data.Text.Internal.Text | SetupIntentPaymentMethod'PaymentMethod PaymentMethod deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON SetupIntentPaymentMethod'Variants where toJSON (SetupIntentPaymentMethod'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (SetupIntentPaymentMethod'PaymentMethod a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON SetupIntentPaymentMethod'Variants where parseJSON val = case (SetupIntentPaymentMethod'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((SetupIntentPaymentMethod'PaymentMethod 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 @components.schemas.setup_intent.properties.payment_method_options.anyOf@ in the specification. -- -- Payment-method-specific configuration for this SetupIntent. data SetupIntentPaymentMethodOptions' = SetupIntentPaymentMethodOptions' { -- | acss_debit: setupIntentPaymentMethodOptions'AcssDebit :: (GHC.Maybe.Maybe SetupIntentPaymentMethodOptionsAcssDebit), -- | card: setupIntentPaymentMethodOptions'Card :: (GHC.Maybe.Maybe SetupIntentPaymentMethodOptionsCard), -- | sepa_debit: setupIntentPaymentMethodOptions'SepaDebit :: (GHC.Maybe.Maybe SetupIntentPaymentMethodOptionsSepaDebit) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON SetupIntentPaymentMethodOptions' where toJSON obj = Data.Aeson.Types.Internal.object ("acss_debit" Data.Aeson.Types.ToJSON..= setupIntentPaymentMethodOptions'AcssDebit obj : "card" Data.Aeson.Types.ToJSON..= setupIntentPaymentMethodOptions'Card obj : "sepa_debit" Data.Aeson.Types.ToJSON..= setupIntentPaymentMethodOptions'SepaDebit obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("acss_debit" Data.Aeson.Types.ToJSON..= setupIntentPaymentMethodOptions'AcssDebit obj) GHC.Base.<> (("card" Data.Aeson.Types.ToJSON..= setupIntentPaymentMethodOptions'Card obj) GHC.Base.<> ("sepa_debit" Data.Aeson.Types.ToJSON..= setupIntentPaymentMethodOptions'SepaDebit obj))) instance Data.Aeson.Types.FromJSON.FromJSON SetupIntentPaymentMethodOptions' where parseJSON = Data.Aeson.Types.FromJSON.withObject "SetupIntentPaymentMethodOptions'" (\obj -> ((GHC.Base.pure SetupIntentPaymentMethodOptions' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "acss_debit")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "card")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "sepa_debit")) -- | Create a new 'SetupIntentPaymentMethodOptions'' with all required fields. mkSetupIntentPaymentMethodOptions' :: SetupIntentPaymentMethodOptions' mkSetupIntentPaymentMethodOptions' = SetupIntentPaymentMethodOptions' { setupIntentPaymentMethodOptions'AcssDebit = GHC.Maybe.Nothing, setupIntentPaymentMethodOptions'Card = GHC.Maybe.Nothing, setupIntentPaymentMethodOptions'SepaDebit = GHC.Maybe.Nothing } -- | Defines the oneOf schema located at @components.schemas.setup_intent.properties.single_use_mandate.anyOf@ in the specification. -- -- ID of the single_use Mandate generated by the SetupIntent. data SetupIntentSingleUseMandate'Variants = SetupIntentSingleUseMandate'Text Data.Text.Internal.Text | SetupIntentSingleUseMandate'Mandate Mandate deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON SetupIntentSingleUseMandate'Variants where toJSON (SetupIntentSingleUseMandate'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (SetupIntentSingleUseMandate'Mandate a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON SetupIntentSingleUseMandate'Variants where parseJSON val = case (SetupIntentSingleUseMandate'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((SetupIntentSingleUseMandate'Mandate 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 @components.schemas.setup_intent.properties.status@ in the specification. -- -- [Status](https:\/\/stripe.com\/docs\/payments\/intents\#intent-statuses) of this SetupIntent, one of \`requires_payment_method\`, \`requires_confirmation\`, \`requires_action\`, \`processing\`, \`canceled\`, or \`succeeded\`. data SetupIntentStatus' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. SetupIntentStatus'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. SetupIntentStatus'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"canceled"@ SetupIntentStatus'EnumCanceled | -- | Represents the JSON value @"processing"@ SetupIntentStatus'EnumProcessing | -- | Represents the JSON value @"requires_action"@ SetupIntentStatus'EnumRequiresAction | -- | Represents the JSON value @"requires_confirmation"@ SetupIntentStatus'EnumRequiresConfirmation | -- | Represents the JSON value @"requires_payment_method"@ SetupIntentStatus'EnumRequiresPaymentMethod | -- | Represents the JSON value @"succeeded"@ SetupIntentStatus'EnumSucceeded deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON SetupIntentStatus' where toJSON (SetupIntentStatus'Other val) = val toJSON (SetupIntentStatus'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (SetupIntentStatus'EnumCanceled) = "canceled" toJSON (SetupIntentStatus'EnumProcessing) = "processing" toJSON (SetupIntentStatus'EnumRequiresAction) = "requires_action" toJSON (SetupIntentStatus'EnumRequiresConfirmation) = "requires_confirmation" toJSON (SetupIntentStatus'EnumRequiresPaymentMethod) = "requires_payment_method" toJSON (SetupIntentStatus'EnumSucceeded) = "succeeded" instance Data.Aeson.Types.FromJSON.FromJSON SetupIntentStatus' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "canceled" -> SetupIntentStatus'EnumCanceled | val GHC.Classes.== "processing" -> SetupIntentStatus'EnumProcessing | val GHC.Classes.== "requires_action" -> SetupIntentStatus'EnumRequiresAction | val GHC.Classes.== "requires_confirmation" -> SetupIntentStatus'EnumRequiresConfirmation | val GHC.Classes.== "requires_payment_method" -> SetupIntentStatus'EnumRequiresPaymentMethod | val GHC.Classes.== "succeeded" -> SetupIntentStatus'EnumSucceeded | GHC.Base.otherwise -> SetupIntentStatus'Other val )