{-# 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 PaymentIntent module StripeAPI.Types.PaymentIntent 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.Charge import {-# SOURCE #-} StripeAPI.Types.Customer import {-# SOURCE #-} StripeAPI.Types.DeletedCustomer import {-# SOURCE #-} StripeAPI.Types.Invoice import {-# SOURCE #-} StripeAPI.Types.PaymentIntentNextAction import {-# SOURCE #-} StripeAPI.Types.PaymentIntentNextActionAlipayHandleRedirect import {-# SOURCE #-} StripeAPI.Types.PaymentIntentNextActionBoleto import {-# SOURCE #-} StripeAPI.Types.PaymentIntentNextActionDisplayOxxoDetails import {-# SOURCE #-} StripeAPI.Types.PaymentIntentNextActionRedirectToUrl import {-# SOURCE #-} StripeAPI.Types.PaymentIntentNextActionVerifyWithMicrodeposits import {-# SOURCE #-} StripeAPI.Types.PaymentIntentPaymentMethodOptions import {-# SOURCE #-} StripeAPI.Types.PaymentIntentPaymentMethodOptionsAcssDebit import {-# SOURCE #-} StripeAPI.Types.PaymentIntentPaymentMethodOptionsCard import {-# SOURCE #-} StripeAPI.Types.PaymentIntentPaymentMethodOptionsSepaDebit import {-# SOURCE #-} StripeAPI.Types.PaymentMethod import {-# SOURCE #-} StripeAPI.Types.PaymentMethodOptionsAfterpayClearpay import {-# SOURCE #-} StripeAPI.Types.PaymentMethodOptionsBancontact import {-# SOURCE #-} StripeAPI.Types.PaymentMethodOptionsBoleto import {-# SOURCE #-} StripeAPI.Types.PaymentMethodOptionsOxxo import {-# SOURCE #-} StripeAPI.Types.PaymentMethodOptionsSofort import {-# SOURCE #-} StripeAPI.Types.Recipient import {-# SOURCE #-} StripeAPI.Types.Review import {-# SOURCE #-} StripeAPI.Types.SetupIntent import {-# SOURCE #-} StripeAPI.Types.Shipping 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 {-# SOURCE #-} StripeAPI.Types.TransferData import qualified Prelude as GHC.Integer.Type import qualified Prelude as GHC.Maybe -- | Defines the object schema located at @components.schemas.payment_intent@ in the specification. -- -- 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). data PaymentIntent = PaymentIntent { -- | amount: Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https:\/\/stripe.com\/docs\/currencies\#zero-decimal) (e.g., 100 cents to charge \$1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is \$0.50 US or [equivalent in charge currency](https:\/\/stripe.com\/docs\/currencies\#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of \$999,999.99). paymentIntentAmount :: GHC.Types.Int, -- | amount_capturable: Amount that can be captured from this PaymentIntent. paymentIntentAmountCapturable :: (GHC.Maybe.Maybe GHC.Types.Int), -- | amount_received: Amount that was collected by this PaymentIntent. paymentIntentAmountReceived :: (GHC.Maybe.Maybe GHC.Types.Int), -- | application: ID of the Connect application that created the PaymentIntent. paymentIntentApplication :: (GHC.Maybe.Maybe PaymentIntentApplication'Variants), -- | application_fee_amount: The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner\'s Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https:\/\/stripe.com\/docs\/payments\/connected-accounts). paymentIntentApplicationFeeAmount :: (GHC.Maybe.Maybe GHC.Types.Int), -- | canceled_at: Populated when \`status\` is \`canceled\`, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch. paymentIntentCanceledAt :: (GHC.Maybe.Maybe GHC.Types.Int), -- | cancellation_reason: Reason for cancellation of this PaymentIntent, either user-provided (\`duplicate\`, \`fraudulent\`, \`requested_by_customer\`, or \`abandoned\`) or generated by Stripe internally (\`failed_invoice\`, \`void_invoice\`, or \`automatic\`). paymentIntentCancellationReason :: (GHC.Maybe.Maybe PaymentIntentCancellationReason'), -- | capture_method: Controls when the funds will be captured from the customer\'s account. paymentIntentCaptureMethod :: PaymentIntentCaptureMethod', -- | charges: Charges that were created by this PaymentIntent, if any. paymentIntentCharges :: (GHC.Maybe.Maybe PaymentIntentCharges'), -- | client_secret: The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key. -- -- The client secret can be used to complete a payment 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. -- -- Refer to our docs to [accept a payment](https:\/\/stripe.com\/docs\/payments\/accept-a-payment?integration=elements) and learn about how \`client_secret\` should be handled. -- -- Constraints: -- -- * Maximum length of 5000 paymentIntentClientSecret :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | confirmation_method paymentIntentConfirmationMethod :: PaymentIntentConfirmationMethod', -- | created: Time at which the object was created. Measured in seconds since the Unix epoch. paymentIntentCreated :: GHC.Types.Int, -- | currency: Three-letter [ISO currency code](https:\/\/www.iso.org\/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https:\/\/stripe.com\/docs\/currencies). paymentIntentCurrency :: Data.Text.Internal.Text, -- | customer: ID of the Customer this PaymentIntent belongs to, if one exists. -- -- Payment methods attached to other Customers cannot be used with this PaymentIntent. -- -- If present in combination with [setup_future_usage](https:\/\/stripe.com\/docs\/api\#payment_intent_object-setup_future_usage), this PaymentIntent\'s payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. paymentIntentCustomer :: (GHC.Maybe.Maybe PaymentIntentCustomer'Variants), -- | description: An arbitrary string attached to the object. Often useful for displaying to users. -- -- Constraints: -- -- * Maximum length of 5000 paymentIntentDescription :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | id: Unique identifier for the object. -- -- Constraints: -- -- * Maximum length of 5000 paymentIntentId :: Data.Text.Internal.Text, -- | invoice: ID of the invoice that created this PaymentIntent, if it exists. paymentIntentInvoice :: (GHC.Maybe.Maybe PaymentIntentInvoice'Variants), -- | last_payment_error: The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason. paymentIntentLastPaymentError :: (GHC.Maybe.Maybe PaymentIntentLastPaymentError'), -- | livemode: Has the value \`true\` if the object exists in live mode or the value \`false\` if the object exists in test mode. paymentIntentLivemode :: 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. For more information, see the [documentation](https:\/\/stripe.com\/docs\/payments\/payment-intents\/creating-payment-intents\#storing-information-in-metadata). paymentIntentMetadata :: (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 fulfill a payment using the provided source. paymentIntentNextAction :: (GHC.Maybe.Maybe PaymentIntentNextAction'), -- | on_behalf_of: The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents [use case for connected accounts](https:\/\/stripe.com\/docs\/payments\/connected-accounts) for details. paymentIntentOnBehalfOf :: (GHC.Maybe.Maybe PaymentIntentOnBehalfOf'Variants), -- | payment_method: ID of the payment method used in this PaymentIntent. paymentIntentPaymentMethod :: (GHC.Maybe.Maybe PaymentIntentPaymentMethod'Variants), -- | payment_method_options: Payment-method-specific configuration for this PaymentIntent. paymentIntentPaymentMethodOptions :: (GHC.Maybe.Maybe PaymentIntentPaymentMethodOptions'), -- | payment_method_types: The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. paymentIntentPaymentMethodTypes :: ([Data.Text.Internal.Text]), -- | receipt_email: Email address that the receipt for the resulting payment will be sent to. If \`receipt_email\` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https:\/\/dashboard.stripe.com\/account\/emails). -- -- Constraints: -- -- * Maximum length of 5000 paymentIntentReceiptEmail :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | review: ID of the review associated with this PaymentIntent, if any. paymentIntentReview :: (GHC.Maybe.Maybe PaymentIntentReview'Variants), -- | setup_future_usage: Indicates that you intend to make future payments with this PaymentIntent\'s payment method. -- -- Providing this parameter will [attach the payment method](https:\/\/stripe.com\/docs\/payments\/save-during-payment) to the PaymentIntent\'s Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https:\/\/stripe.com\/docs\/api\/payment_methods\/attach) to a Customer after the transaction completes. -- -- When processing card payments, Stripe also uses \`setup_future_usage\` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https:\/\/stripe.com\/docs\/strong-customer-authentication). paymentIntentSetupFutureUsage :: (GHC.Maybe.Maybe PaymentIntentSetupFutureUsage'), -- | shipping: Shipping information for this PaymentIntent. paymentIntentShipping :: (GHC.Maybe.Maybe PaymentIntentShipping'), -- | statement_descriptor: For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. -- -- Constraints: -- -- * Maximum length of 5000 paymentIntentStatementDescriptor :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | statement_descriptor_suffix: Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. -- -- Constraints: -- -- * Maximum length of 5000 paymentIntentStatementDescriptorSuffix :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | status: Status of this PaymentIntent, one of \`requires_payment_method\`, \`requires_confirmation\`, \`requires_action\`, \`processing\`, \`requires_capture\`, \`canceled\`, or \`succeeded\`. Read more about each PaymentIntent [status](https:\/\/stripe.com\/docs\/payments\/intents\#intent-statuses). paymentIntentStatus :: PaymentIntentStatus', -- | transfer_data: The data with which to automatically create a Transfer when the payment is finalized. See the PaymentIntents [use case for connected accounts](https:\/\/stripe.com\/docs\/payments\/connected-accounts) for details. paymentIntentTransferData :: (GHC.Maybe.Maybe PaymentIntentTransferData'), -- | transfer_group: A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https:\/\/stripe.com\/docs\/payments\/connected-accounts) for details. -- -- Constraints: -- -- * Maximum length of 5000 paymentIntentTransferGroup :: (GHC.Maybe.Maybe Data.Text.Internal.Text) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PaymentIntent where toJSON obj = Data.Aeson.Types.Internal.object ("amount" Data.Aeson.Types.ToJSON..= paymentIntentAmount obj : "amount_capturable" Data.Aeson.Types.ToJSON..= paymentIntentAmountCapturable obj : "amount_received" Data.Aeson.Types.ToJSON..= paymentIntentAmountReceived obj : "application" Data.Aeson.Types.ToJSON..= paymentIntentApplication obj : "application_fee_amount" Data.Aeson.Types.ToJSON..= paymentIntentApplicationFeeAmount obj : "canceled_at" Data.Aeson.Types.ToJSON..= paymentIntentCanceledAt obj : "cancellation_reason" Data.Aeson.Types.ToJSON..= paymentIntentCancellationReason obj : "capture_method" Data.Aeson.Types.ToJSON..= paymentIntentCaptureMethod obj : "charges" Data.Aeson.Types.ToJSON..= paymentIntentCharges obj : "client_secret" Data.Aeson.Types.ToJSON..= paymentIntentClientSecret obj : "confirmation_method" Data.Aeson.Types.ToJSON..= paymentIntentConfirmationMethod obj : "created" Data.Aeson.Types.ToJSON..= paymentIntentCreated obj : "currency" Data.Aeson.Types.ToJSON..= paymentIntentCurrency obj : "customer" Data.Aeson.Types.ToJSON..= paymentIntentCustomer obj : "description" Data.Aeson.Types.ToJSON..= paymentIntentDescription obj : "id" Data.Aeson.Types.ToJSON..= paymentIntentId obj : "invoice" Data.Aeson.Types.ToJSON..= paymentIntentInvoice obj : "last_payment_error" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError obj : "livemode" Data.Aeson.Types.ToJSON..= paymentIntentLivemode obj : "metadata" Data.Aeson.Types.ToJSON..= paymentIntentMetadata obj : "next_action" Data.Aeson.Types.ToJSON..= paymentIntentNextAction obj : "on_behalf_of" Data.Aeson.Types.ToJSON..= paymentIntentOnBehalfOf obj : "payment_method" Data.Aeson.Types.ToJSON..= paymentIntentPaymentMethod obj : "payment_method_options" Data.Aeson.Types.ToJSON..= paymentIntentPaymentMethodOptions obj : "payment_method_types" Data.Aeson.Types.ToJSON..= paymentIntentPaymentMethodTypes obj : "receipt_email" Data.Aeson.Types.ToJSON..= paymentIntentReceiptEmail obj : "review" Data.Aeson.Types.ToJSON..= paymentIntentReview obj : "setup_future_usage" Data.Aeson.Types.ToJSON..= paymentIntentSetupFutureUsage obj : "shipping" Data.Aeson.Types.ToJSON..= paymentIntentShipping obj : "statement_descriptor" Data.Aeson.Types.ToJSON..= paymentIntentStatementDescriptor obj : "statement_descriptor_suffix" Data.Aeson.Types.ToJSON..= paymentIntentStatementDescriptorSuffix obj : "status" Data.Aeson.Types.ToJSON..= paymentIntentStatus obj : "transfer_data" Data.Aeson.Types.ToJSON..= paymentIntentTransferData obj : "transfer_group" Data.Aeson.Types.ToJSON..= paymentIntentTransferGroup obj : "object" Data.Aeson.Types.ToJSON..= Data.Aeson.Types.Internal.String "payment_intent" : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("amount" Data.Aeson.Types.ToJSON..= paymentIntentAmount obj) GHC.Base.<> (("amount_capturable" Data.Aeson.Types.ToJSON..= paymentIntentAmountCapturable obj) GHC.Base.<> (("amount_received" Data.Aeson.Types.ToJSON..= paymentIntentAmountReceived obj) GHC.Base.<> (("application" Data.Aeson.Types.ToJSON..= paymentIntentApplication obj) GHC.Base.<> (("application_fee_amount" Data.Aeson.Types.ToJSON..= paymentIntentApplicationFeeAmount obj) GHC.Base.<> (("canceled_at" Data.Aeson.Types.ToJSON..= paymentIntentCanceledAt obj) GHC.Base.<> (("cancellation_reason" Data.Aeson.Types.ToJSON..= paymentIntentCancellationReason obj) GHC.Base.<> (("capture_method" Data.Aeson.Types.ToJSON..= paymentIntentCaptureMethod obj) GHC.Base.<> (("charges" Data.Aeson.Types.ToJSON..= paymentIntentCharges obj) GHC.Base.<> (("client_secret" Data.Aeson.Types.ToJSON..= paymentIntentClientSecret obj) GHC.Base.<> (("confirmation_method" Data.Aeson.Types.ToJSON..= paymentIntentConfirmationMethod obj) GHC.Base.<> (("created" Data.Aeson.Types.ToJSON..= paymentIntentCreated obj) GHC.Base.<> (("currency" Data.Aeson.Types.ToJSON..= paymentIntentCurrency obj) GHC.Base.<> (("customer" Data.Aeson.Types.ToJSON..= paymentIntentCustomer obj) GHC.Base.<> (("description" Data.Aeson.Types.ToJSON..= paymentIntentDescription obj) GHC.Base.<> (("id" Data.Aeson.Types.ToJSON..= paymentIntentId obj) GHC.Base.<> (("invoice" Data.Aeson.Types.ToJSON..= paymentIntentInvoice obj) GHC.Base.<> (("last_payment_error" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError obj) GHC.Base.<> (("livemode" Data.Aeson.Types.ToJSON..= paymentIntentLivemode obj) GHC.Base.<> (("metadata" Data.Aeson.Types.ToJSON..= paymentIntentMetadata obj) GHC.Base.<> (("next_action" Data.Aeson.Types.ToJSON..= paymentIntentNextAction obj) GHC.Base.<> (("on_behalf_of" Data.Aeson.Types.ToJSON..= paymentIntentOnBehalfOf obj) GHC.Base.<> (("payment_method" Data.Aeson.Types.ToJSON..= paymentIntentPaymentMethod obj) GHC.Base.<> (("payment_method_options" Data.Aeson.Types.ToJSON..= paymentIntentPaymentMethodOptions obj) GHC.Base.<> (("payment_method_types" Data.Aeson.Types.ToJSON..= paymentIntentPaymentMethodTypes obj) GHC.Base.<> (("receipt_email" Data.Aeson.Types.ToJSON..= paymentIntentReceiptEmail obj) GHC.Base.<> (("review" Data.Aeson.Types.ToJSON..= paymentIntentReview obj) GHC.Base.<> (("setup_future_usage" Data.Aeson.Types.ToJSON..= paymentIntentSetupFutureUsage obj) GHC.Base.<> (("shipping" Data.Aeson.Types.ToJSON..= paymentIntentShipping obj) GHC.Base.<> (("statement_descriptor" Data.Aeson.Types.ToJSON..= paymentIntentStatementDescriptor obj) GHC.Base.<> (("statement_descriptor_suffix" Data.Aeson.Types.ToJSON..= paymentIntentStatementDescriptorSuffix obj) GHC.Base.<> (("status" Data.Aeson.Types.ToJSON..= paymentIntentStatus obj) GHC.Base.<> (("transfer_data" Data.Aeson.Types.ToJSON..= paymentIntentTransferData obj) GHC.Base.<> (("transfer_group" Data.Aeson.Types.ToJSON..= paymentIntentTransferGroup obj) GHC.Base.<> ("object" Data.Aeson.Types.ToJSON..= Data.Aeson.Types.Internal.String "payment_intent"))))))))))))))))))))))))))))))))))) instance Data.Aeson.Types.FromJSON.FromJSON PaymentIntent where parseJSON = Data.Aeson.Types.FromJSON.withObject "PaymentIntent" (\obj -> (((((((((((((((((((((((((((((((((GHC.Base.pure PaymentIntent GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "amount")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "amount_capturable")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "amount_received")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "application")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "application_fee_amount")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "canceled_at")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "cancellation_reason")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "capture_method")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "charges")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "client_secret")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "confirmation_method")) 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..:? "description")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "id")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "invoice")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "last_payment_error")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "livemode")) 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..:? "receipt_email")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "review")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "setup_future_usage")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "shipping")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "statement_descriptor")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "statement_descriptor_suffix")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "status")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "transfer_data")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "transfer_group")) -- | Create a new 'PaymentIntent' with all required fields. mkPaymentIntent :: -- | 'paymentIntentAmount' GHC.Types.Int -> -- | 'paymentIntentCaptureMethod' PaymentIntentCaptureMethod' -> -- | 'paymentIntentConfirmationMethod' PaymentIntentConfirmationMethod' -> -- | 'paymentIntentCreated' GHC.Types.Int -> -- | 'paymentIntentCurrency' Data.Text.Internal.Text -> -- | 'paymentIntentId' Data.Text.Internal.Text -> -- | 'paymentIntentLivemode' GHC.Types.Bool -> -- | 'paymentIntentPaymentMethodTypes' [Data.Text.Internal.Text] -> -- | 'paymentIntentStatus' PaymentIntentStatus' -> PaymentIntent mkPaymentIntent paymentIntentAmount paymentIntentCaptureMethod paymentIntentConfirmationMethod paymentIntentCreated paymentIntentCurrency paymentIntentId paymentIntentLivemode paymentIntentPaymentMethodTypes paymentIntentStatus = PaymentIntent { paymentIntentAmount = paymentIntentAmount, paymentIntentAmountCapturable = GHC.Maybe.Nothing, paymentIntentAmountReceived = GHC.Maybe.Nothing, paymentIntentApplication = GHC.Maybe.Nothing, paymentIntentApplicationFeeAmount = GHC.Maybe.Nothing, paymentIntentCanceledAt = GHC.Maybe.Nothing, paymentIntentCancellationReason = GHC.Maybe.Nothing, paymentIntentCaptureMethod = paymentIntentCaptureMethod, paymentIntentCharges = GHC.Maybe.Nothing, paymentIntentClientSecret = GHC.Maybe.Nothing, paymentIntentConfirmationMethod = paymentIntentConfirmationMethod, paymentIntentCreated = paymentIntentCreated, paymentIntentCurrency = paymentIntentCurrency, paymentIntentCustomer = GHC.Maybe.Nothing, paymentIntentDescription = GHC.Maybe.Nothing, paymentIntentId = paymentIntentId, paymentIntentInvoice = GHC.Maybe.Nothing, paymentIntentLastPaymentError = GHC.Maybe.Nothing, paymentIntentLivemode = paymentIntentLivemode, paymentIntentMetadata = GHC.Maybe.Nothing, paymentIntentNextAction = GHC.Maybe.Nothing, paymentIntentOnBehalfOf = GHC.Maybe.Nothing, paymentIntentPaymentMethod = GHC.Maybe.Nothing, paymentIntentPaymentMethodOptions = GHC.Maybe.Nothing, paymentIntentPaymentMethodTypes = paymentIntentPaymentMethodTypes, paymentIntentReceiptEmail = GHC.Maybe.Nothing, paymentIntentReview = GHC.Maybe.Nothing, paymentIntentSetupFutureUsage = GHC.Maybe.Nothing, paymentIntentShipping = GHC.Maybe.Nothing, paymentIntentStatementDescriptor = GHC.Maybe.Nothing, paymentIntentStatementDescriptorSuffix = GHC.Maybe.Nothing, paymentIntentStatus = paymentIntentStatus, paymentIntentTransferData = GHC.Maybe.Nothing, paymentIntentTransferGroup = GHC.Maybe.Nothing } -- | Defines the oneOf schema located at @components.schemas.payment_intent.properties.application.anyOf@ in the specification. -- -- ID of the Connect application that created the PaymentIntent. data PaymentIntentApplication'Variants = PaymentIntentApplication'Text Data.Text.Internal.Text | PaymentIntentApplication'Application Application deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PaymentIntentApplication'Variants where toJSON (PaymentIntentApplication'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PaymentIntentApplication'Application a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON PaymentIntentApplication'Variants where parseJSON val = case (PaymentIntentApplication'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((PaymentIntentApplication'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.payment_intent.properties.cancellation_reason@ in the specification. -- -- Reason for cancellation of this PaymentIntent, either user-provided (\`duplicate\`, \`fraudulent\`, \`requested_by_customer\`, or \`abandoned\`) or generated by Stripe internally (\`failed_invoice\`, \`void_invoice\`, or \`automatic\`). data PaymentIntentCancellationReason' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PaymentIntentCancellationReason'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. PaymentIntentCancellationReason'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"abandoned"@ PaymentIntentCancellationReason'EnumAbandoned | -- | Represents the JSON value @"automatic"@ PaymentIntentCancellationReason'EnumAutomatic | -- | Represents the JSON value @"duplicate"@ PaymentIntentCancellationReason'EnumDuplicate | -- | Represents the JSON value @"failed_invoice"@ PaymentIntentCancellationReason'EnumFailedInvoice | -- | Represents the JSON value @"fraudulent"@ PaymentIntentCancellationReason'EnumFraudulent | -- | Represents the JSON value @"requested_by_customer"@ PaymentIntentCancellationReason'EnumRequestedByCustomer | -- | Represents the JSON value @"void_invoice"@ PaymentIntentCancellationReason'EnumVoidInvoice deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PaymentIntentCancellationReason' where toJSON (PaymentIntentCancellationReason'Other val) = val toJSON (PaymentIntentCancellationReason'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PaymentIntentCancellationReason'EnumAbandoned) = "abandoned" toJSON (PaymentIntentCancellationReason'EnumAutomatic) = "automatic" toJSON (PaymentIntentCancellationReason'EnumDuplicate) = "duplicate" toJSON (PaymentIntentCancellationReason'EnumFailedInvoice) = "failed_invoice" toJSON (PaymentIntentCancellationReason'EnumFraudulent) = "fraudulent" toJSON (PaymentIntentCancellationReason'EnumRequestedByCustomer) = "requested_by_customer" toJSON (PaymentIntentCancellationReason'EnumVoidInvoice) = "void_invoice" instance Data.Aeson.Types.FromJSON.FromJSON PaymentIntentCancellationReason' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "abandoned" -> PaymentIntentCancellationReason'EnumAbandoned | val GHC.Classes.== "automatic" -> PaymentIntentCancellationReason'EnumAutomatic | val GHC.Classes.== "duplicate" -> PaymentIntentCancellationReason'EnumDuplicate | val GHC.Classes.== "failed_invoice" -> PaymentIntentCancellationReason'EnumFailedInvoice | val GHC.Classes.== "fraudulent" -> PaymentIntentCancellationReason'EnumFraudulent | val GHC.Classes.== "requested_by_customer" -> PaymentIntentCancellationReason'EnumRequestedByCustomer | val GHC.Classes.== "void_invoice" -> PaymentIntentCancellationReason'EnumVoidInvoice | GHC.Base.otherwise -> PaymentIntentCancellationReason'Other val ) -- | Defines the enum schema located at @components.schemas.payment_intent.properties.capture_method@ in the specification. -- -- Controls when the funds will be captured from the customer\'s account. data PaymentIntentCaptureMethod' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PaymentIntentCaptureMethod'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. PaymentIntentCaptureMethod'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"automatic"@ PaymentIntentCaptureMethod'EnumAutomatic | -- | Represents the JSON value @"manual"@ PaymentIntentCaptureMethod'EnumManual deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PaymentIntentCaptureMethod' where toJSON (PaymentIntentCaptureMethod'Other val) = val toJSON (PaymentIntentCaptureMethod'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PaymentIntentCaptureMethod'EnumAutomatic) = "automatic" toJSON (PaymentIntentCaptureMethod'EnumManual) = "manual" instance Data.Aeson.Types.FromJSON.FromJSON PaymentIntentCaptureMethod' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "automatic" -> PaymentIntentCaptureMethod'EnumAutomatic | val GHC.Classes.== "manual" -> PaymentIntentCaptureMethod'EnumManual | GHC.Base.otherwise -> PaymentIntentCaptureMethod'Other val ) -- | Defines the object schema located at @components.schemas.payment_intent.properties.charges@ in the specification. -- -- Charges that were created by this PaymentIntent, if any. data PaymentIntentCharges' = PaymentIntentCharges' { -- | data: This list only contains the latest charge, even if there were previously multiple unsuccessful charges. To view all previous charges for a PaymentIntent, you can filter the charges list using the \`payment_intent\` [parameter](https:\/\/stripe.com\/docs\/api\/charges\/list\#list_charges-payment_intent). paymentIntentCharges'Data :: ([Charge]), -- | has_more: True if this list has another page of items after this one that can be fetched. paymentIntentCharges'HasMore :: GHC.Types.Bool, -- | url: The URL where this list can be accessed. -- -- Constraints: -- -- * Maximum length of 5000 paymentIntentCharges'Url :: Data.Text.Internal.Text } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PaymentIntentCharges' where toJSON obj = Data.Aeson.Types.Internal.object ("data" Data.Aeson.Types.ToJSON..= paymentIntentCharges'Data obj : "has_more" Data.Aeson.Types.ToJSON..= paymentIntentCharges'HasMore obj : "url" Data.Aeson.Types.ToJSON..= paymentIntentCharges'Url obj : "object" Data.Aeson.Types.ToJSON..= Data.Aeson.Types.Internal.String "list" : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("data" Data.Aeson.Types.ToJSON..= paymentIntentCharges'Data obj) GHC.Base.<> (("has_more" Data.Aeson.Types.ToJSON..= paymentIntentCharges'HasMore obj) GHC.Base.<> (("url" Data.Aeson.Types.ToJSON..= paymentIntentCharges'Url obj) GHC.Base.<> ("object" Data.Aeson.Types.ToJSON..= Data.Aeson.Types.Internal.String "list")))) instance Data.Aeson.Types.FromJSON.FromJSON PaymentIntentCharges' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PaymentIntentCharges'" (\obj -> ((GHC.Base.pure PaymentIntentCharges' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "data")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "has_more")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "url")) -- | Create a new 'PaymentIntentCharges'' with all required fields. mkPaymentIntentCharges' :: -- | 'paymentIntentCharges'Data' [Charge] -> -- | 'paymentIntentCharges'HasMore' GHC.Types.Bool -> -- | 'paymentIntentCharges'Url' Data.Text.Internal.Text -> PaymentIntentCharges' mkPaymentIntentCharges' paymentIntentCharges'Data paymentIntentCharges'HasMore paymentIntentCharges'Url = PaymentIntentCharges' { paymentIntentCharges'Data = paymentIntentCharges'Data, paymentIntentCharges'HasMore = paymentIntentCharges'HasMore, paymentIntentCharges'Url = paymentIntentCharges'Url } -- | Defines the enum schema located at @components.schemas.payment_intent.properties.confirmation_method@ in the specification. data PaymentIntentConfirmationMethod' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PaymentIntentConfirmationMethod'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. PaymentIntentConfirmationMethod'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"automatic"@ PaymentIntentConfirmationMethod'EnumAutomatic | -- | Represents the JSON value @"manual"@ PaymentIntentConfirmationMethod'EnumManual deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PaymentIntentConfirmationMethod' where toJSON (PaymentIntentConfirmationMethod'Other val) = val toJSON (PaymentIntentConfirmationMethod'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PaymentIntentConfirmationMethod'EnumAutomatic) = "automatic" toJSON (PaymentIntentConfirmationMethod'EnumManual) = "manual" instance Data.Aeson.Types.FromJSON.FromJSON PaymentIntentConfirmationMethod' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "automatic" -> PaymentIntentConfirmationMethod'EnumAutomatic | val GHC.Classes.== "manual" -> PaymentIntentConfirmationMethod'EnumManual | GHC.Base.otherwise -> PaymentIntentConfirmationMethod'Other val ) -- | Defines the oneOf schema located at @components.schemas.payment_intent.properties.customer.anyOf@ in the specification. -- -- ID of the Customer this PaymentIntent belongs to, if one exists. -- -- Payment methods attached to other Customers cannot be used with this PaymentIntent. -- -- If present in combination with [setup_future_usage](https:\/\/stripe.com\/docs\/api\#payment_intent_object-setup_future_usage), this PaymentIntent\'s payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. data PaymentIntentCustomer'Variants = PaymentIntentCustomer'Text Data.Text.Internal.Text | PaymentIntentCustomer'Customer Customer | PaymentIntentCustomer'DeletedCustomer DeletedCustomer deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PaymentIntentCustomer'Variants where toJSON (PaymentIntentCustomer'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PaymentIntentCustomer'Customer a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PaymentIntentCustomer'DeletedCustomer a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON PaymentIntentCustomer'Variants where parseJSON val = case (PaymentIntentCustomer'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((PaymentIntentCustomer'Customer Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((PaymentIntentCustomer'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 oneOf schema located at @components.schemas.payment_intent.properties.invoice.anyOf@ in the specification. -- -- ID of the invoice that created this PaymentIntent, if it exists. data PaymentIntentInvoice'Variants = PaymentIntentInvoice'Text Data.Text.Internal.Text | PaymentIntentInvoice'Invoice Invoice deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PaymentIntentInvoice'Variants where toJSON (PaymentIntentInvoice'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PaymentIntentInvoice'Invoice a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON PaymentIntentInvoice'Variants where parseJSON val = case (PaymentIntentInvoice'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((PaymentIntentInvoice'Invoice 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.payment_intent.properties.last_payment_error.anyOf@ in the specification. -- -- The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason. data PaymentIntentLastPaymentError' = PaymentIntentLastPaymentError' { -- | charge: For card errors, the ID of the failed charge. -- -- Constraints: -- -- * Maximum length of 5000 paymentIntentLastPaymentError'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 paymentIntentLastPaymentError'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 paymentIntentLastPaymentError'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 paymentIntentLastPaymentError'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 paymentIntentLastPaymentError'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 paymentIntentLastPaymentError'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). paymentIntentLastPaymentError'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). paymentIntentLastPaymentError'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 paymentIntentLastPaymentError'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). paymentIntentLastPaymentError'SetupIntent :: (GHC.Maybe.Maybe SetupIntent), -- | source: The source object for errors returned on a request involving a source. paymentIntentLastPaymentError'Source :: (GHC.Maybe.Maybe PaymentIntentLastPaymentError'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\` paymentIntentLastPaymentError'Type :: (GHC.Maybe.Maybe PaymentIntentLastPaymentError'Type') } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PaymentIntentLastPaymentError' where toJSON obj = Data.Aeson.Types.Internal.object ("charge" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Charge obj : "code" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Code obj : "decline_code" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'DeclineCode obj : "doc_url" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'DocUrl obj : "message" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Message obj : "param" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Param obj : "payment_intent" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'PaymentIntent obj : "payment_method" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'PaymentMethod obj : "payment_method_type" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'PaymentMethodType obj : "setup_intent" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'SetupIntent obj : "source" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source obj : "type" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Type obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("charge" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Charge obj) GHC.Base.<> (("code" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Code obj) GHC.Base.<> (("decline_code" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'DeclineCode obj) GHC.Base.<> (("doc_url" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'DocUrl obj) GHC.Base.<> (("message" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Message obj) GHC.Base.<> (("param" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Param obj) GHC.Base.<> (("payment_intent" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'PaymentIntent obj) GHC.Base.<> (("payment_method" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'PaymentMethod obj) GHC.Base.<> (("payment_method_type" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'PaymentMethodType obj) GHC.Base.<> (("setup_intent" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'SetupIntent obj) GHC.Base.<> (("source" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source obj) GHC.Base.<> ("type" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Type obj)))))))))))) instance Data.Aeson.Types.FromJSON.FromJSON PaymentIntentLastPaymentError' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PaymentIntentLastPaymentError'" (\obj -> (((((((((((GHC.Base.pure PaymentIntentLastPaymentError' 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 'PaymentIntentLastPaymentError'' with all required fields. mkPaymentIntentLastPaymentError' :: PaymentIntentLastPaymentError' mkPaymentIntentLastPaymentError' = PaymentIntentLastPaymentError' { paymentIntentLastPaymentError'Charge = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Code = GHC.Maybe.Nothing, paymentIntentLastPaymentError'DeclineCode = GHC.Maybe.Nothing, paymentIntentLastPaymentError'DocUrl = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Message = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Param = GHC.Maybe.Nothing, paymentIntentLastPaymentError'PaymentIntent = GHC.Maybe.Nothing, paymentIntentLastPaymentError'PaymentMethod = GHC.Maybe.Nothing, paymentIntentLastPaymentError'PaymentMethodType = GHC.Maybe.Nothing, paymentIntentLastPaymentError'SetupIntent = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Type = GHC.Maybe.Nothing } -- | Defines the object schema located at @components.schemas.payment_intent.properties.last_payment_error.anyOf.properties.source.anyOf@ in the specification. -- -- The source object for errors returned on a request involving a source. data PaymentIntentLastPaymentError'Source' = PaymentIntentLastPaymentError'Source' { -- | account: The ID of the account that the bank account is associated with. paymentIntentLastPaymentError'Source'Account :: (GHC.Maybe.Maybe PaymentIntentLastPaymentError'Source'Account'Variants), -- | account_holder_name: The name of the person or business that owns the bank account. -- -- Constraints: -- -- * Maximum length of 5000 paymentIntentLastPaymentError'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 paymentIntentLastPaymentError'Source'AccountHolderType :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | ach_credit_transfer paymentIntentLastPaymentError'Source'AchCreditTransfer :: (GHC.Maybe.Maybe SourceTypeAchCreditTransfer), -- | ach_debit paymentIntentLastPaymentError'Source'AchDebit :: (GHC.Maybe.Maybe SourceTypeAchDebit), -- | acss_debit paymentIntentLastPaymentError'Source'AcssDebit :: (GHC.Maybe.Maybe SourceTypeAcssDebit), -- | address_city: City\/District\/Suburb\/Town\/Village. -- -- Constraints: -- -- * Maximum length of 5000 paymentIntentLastPaymentError'Source'AddressCity :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | address_country: Billing address country, if provided when creating card. -- -- Constraints: -- -- * Maximum length of 5000 paymentIntentLastPaymentError'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 paymentIntentLastPaymentError'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 paymentIntentLastPaymentError'Source'AddressLine1Check :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | address_line2: Address line 2 (Apartment\/Suite\/Unit\/Building). -- -- Constraints: -- -- * Maximum length of 5000 paymentIntentLastPaymentError'Source'AddressLine2 :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | address_state: State\/County\/Province\/Region. -- -- Constraints: -- -- * Maximum length of 5000 paymentIntentLastPaymentError'Source'AddressState :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | address_zip: ZIP or postal code. -- -- Constraints: -- -- * Maximum length of 5000 paymentIntentLastPaymentError'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 paymentIntentLastPaymentError'Source'AddressZipCheck :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | alipay paymentIntentLastPaymentError'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. paymentIntentLastPaymentError'Source'Amount :: (GHC.Maybe.Maybe GHC.Types.Int), -- | au_becs_debit paymentIntentLastPaymentError'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. paymentIntentLastPaymentError'Source'AvailablePayoutMethods :: (GHC.Maybe.Maybe ([PaymentIntentLastPaymentError'Source'AvailablePayoutMethods'])), -- | bancontact paymentIntentLastPaymentError'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 paymentIntentLastPaymentError'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 paymentIntentLastPaymentError'Source'Brand :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | card paymentIntentLastPaymentError'Source'Card :: (GHC.Maybe.Maybe SourceTypeCard), -- | card_present paymentIntentLastPaymentError'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 paymentIntentLastPaymentError'Source'ClientSecret :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | code_verification: paymentIntentLastPaymentError'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 paymentIntentLastPaymentError'Source'Country :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | created: Time at which the object was created. Measured in seconds since the Unix epoch. paymentIntentLastPaymentError'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. paymentIntentLastPaymentError'Source'Currency :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | customer: The ID of the customer that the bank account is associated with. paymentIntentLastPaymentError'Source'Customer :: (GHC.Maybe.Maybe PaymentIntentLastPaymentError'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 paymentIntentLastPaymentError'Source'CvcCheck :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | default_for_currency: Whether this bank account is the default external account for its currency. paymentIntentLastPaymentError'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 paymentIntentLastPaymentError'Source'DynamicLast4 :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | eps paymentIntentLastPaymentError'Source'Eps :: (GHC.Maybe.Maybe SourceTypeEps), -- | exp_month: Two-digit number representing the card\'s expiration month. paymentIntentLastPaymentError'Source'ExpMonth :: (GHC.Maybe.Maybe GHC.Types.Int), -- | exp_year: Four-digit number representing the card\'s expiration year. paymentIntentLastPaymentError'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 paymentIntentLastPaymentError'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 paymentIntentLastPaymentError'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 paymentIntentLastPaymentError'Source'Funding :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | giropay paymentIntentLastPaymentError'Source'Giropay :: (GHC.Maybe.Maybe SourceTypeGiropay), -- | id: Unique identifier for the object. -- -- Constraints: -- -- * Maximum length of 5000 paymentIntentLastPaymentError'Source'Id :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | ideal paymentIntentLastPaymentError'Source'Ideal :: (GHC.Maybe.Maybe SourceTypeIdeal), -- | klarna paymentIntentLastPaymentError'Source'Klarna :: (GHC.Maybe.Maybe SourceTypeKlarna), -- | last4: The last four digits of the bank account number. -- -- Constraints: -- -- * Maximum length of 5000 paymentIntentLastPaymentError'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. paymentIntentLastPaymentError'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. paymentIntentLastPaymentError'Source'Metadata :: (GHC.Maybe.Maybe Data.Aeson.Types.Internal.Object), -- | multibanco paymentIntentLastPaymentError'Source'Multibanco :: (GHC.Maybe.Maybe SourceTypeMultibanco), -- | name: Cardholder name. -- -- Constraints: -- -- * Maximum length of 5000 paymentIntentLastPaymentError'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. paymentIntentLastPaymentError'Source'Object :: (GHC.Maybe.Maybe PaymentIntentLastPaymentError'Source'Object'), -- | owner: Information about the owner of the payment instrument that may be used or required by particular source types. paymentIntentLastPaymentError'Source'Owner :: (GHC.Maybe.Maybe PaymentIntentLastPaymentError'Source'Owner'), -- | p24 paymentIntentLastPaymentError'Source'P24 :: (GHC.Maybe.Maybe SourceTypeP24), -- | receiver: paymentIntentLastPaymentError'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. paymentIntentLastPaymentError'Source'Recipient :: (GHC.Maybe.Maybe PaymentIntentLastPaymentError'Source'Recipient'Variants), -- | redirect: paymentIntentLastPaymentError'Source'Redirect :: (GHC.Maybe.Maybe SourceRedirectFlow), -- | routing_number: The routing transit number for the bank account. -- -- Constraints: -- -- * Maximum length of 5000 paymentIntentLastPaymentError'Source'RoutingNumber :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | sepa_debit paymentIntentLastPaymentError'Source'SepaDebit :: (GHC.Maybe.Maybe SourceTypeSepaDebit), -- | sofort paymentIntentLastPaymentError'Source'Sofort :: (GHC.Maybe.Maybe SourceTypeSofort), -- | source_order: paymentIntentLastPaymentError'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 paymentIntentLastPaymentError'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 paymentIntentLastPaymentError'Source'Status :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | three_d_secure paymentIntentLastPaymentError'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 paymentIntentLastPaymentError'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. paymentIntentLastPaymentError'Source'Type :: (GHC.Maybe.Maybe PaymentIntentLastPaymentError'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 paymentIntentLastPaymentError'Source'Usage :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | wechat paymentIntentLastPaymentError'Source'Wechat :: (GHC.Maybe.Maybe SourceTypeWechat) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PaymentIntentLastPaymentError'Source' where toJSON obj = Data.Aeson.Types.Internal.object ("account" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Account obj : "account_holder_name" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'AccountHolderName obj : "account_holder_type" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'AccountHolderType obj : "ach_credit_transfer" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'AchCreditTransfer obj : "ach_debit" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'AchDebit obj : "acss_debit" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'AcssDebit obj : "address_city" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'AddressCity obj : "address_country" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'AddressCountry obj : "address_line1" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'AddressLine1 obj : "address_line1_check" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'AddressLine1Check obj : "address_line2" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'AddressLine2 obj : "address_state" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'AddressState obj : "address_zip" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'AddressZip obj : "address_zip_check" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'AddressZipCheck obj : "alipay" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Alipay obj : "amount" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Amount obj : "au_becs_debit" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'AuBecsDebit obj : "available_payout_methods" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'AvailablePayoutMethods obj : "bancontact" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Bancontact obj : "bank_name" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'BankName obj : "brand" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Brand obj : "card" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Card obj : "card_present" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'CardPresent obj : "client_secret" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'ClientSecret obj : "code_verification" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'CodeVerification obj : "country" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Country obj : "created" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Created obj : "currency" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Currency obj : "customer" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Customer obj : "cvc_check" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'CvcCheck obj : "default_for_currency" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'DefaultForCurrency obj : "dynamic_last4" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'DynamicLast4 obj : "eps" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Eps obj : "exp_month" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'ExpMonth obj : "exp_year" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'ExpYear obj : "fingerprint" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Fingerprint obj : "flow" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Flow obj : "funding" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Funding obj : "giropay" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Giropay obj : "id" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Id obj : "ideal" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Ideal obj : "klarna" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Klarna obj : "last4" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Last4 obj : "livemode" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Livemode obj : "metadata" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Metadata obj : "multibanco" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Multibanco obj : "name" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Name obj : "object" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Object obj : "owner" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner obj : "p24" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'P24 obj : "receiver" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Receiver obj : "recipient" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Recipient obj : "redirect" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Redirect obj : "routing_number" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'RoutingNumber obj : "sepa_debit" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'SepaDebit obj : "sofort" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Sofort obj : "source_order" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'SourceOrder obj : "statement_descriptor" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'StatementDescriptor obj : "status" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Status obj : "three_d_secure" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'ThreeDSecure obj : "tokenization_method" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'TokenizationMethod obj : "type" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Type obj : "usage" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Usage obj : "wechat" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Wechat obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("account" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Account obj) GHC.Base.<> (("account_holder_name" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'AccountHolderName obj) GHC.Base.<> (("account_holder_type" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'AccountHolderType obj) GHC.Base.<> (("ach_credit_transfer" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'AchCreditTransfer obj) GHC.Base.<> (("ach_debit" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'AchDebit obj) GHC.Base.<> (("acss_debit" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'AcssDebit obj) GHC.Base.<> (("address_city" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'AddressCity obj) GHC.Base.<> (("address_country" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'AddressCountry obj) GHC.Base.<> (("address_line1" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'AddressLine1 obj) GHC.Base.<> (("address_line1_check" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'AddressLine1Check obj) GHC.Base.<> (("address_line2" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'AddressLine2 obj) GHC.Base.<> (("address_state" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'AddressState obj) GHC.Base.<> (("address_zip" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'AddressZip obj) GHC.Base.<> (("address_zip_check" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'AddressZipCheck obj) GHC.Base.<> (("alipay" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Alipay obj) GHC.Base.<> (("amount" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Amount obj) GHC.Base.<> (("au_becs_debit" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'AuBecsDebit obj) GHC.Base.<> (("available_payout_methods" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'AvailablePayoutMethods obj) GHC.Base.<> (("bancontact" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Bancontact obj) GHC.Base.<> (("bank_name" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'BankName obj) GHC.Base.<> (("brand" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Brand obj) GHC.Base.<> (("card" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Card obj) GHC.Base.<> (("card_present" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'CardPresent obj) GHC.Base.<> (("client_secret" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'ClientSecret obj) GHC.Base.<> (("code_verification" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'CodeVerification obj) GHC.Base.<> (("country" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Country obj) GHC.Base.<> (("created" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Created obj) GHC.Base.<> (("currency" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Currency obj) GHC.Base.<> (("customer" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Customer obj) GHC.Base.<> (("cvc_check" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'CvcCheck obj) GHC.Base.<> (("default_for_currency" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'DefaultForCurrency obj) GHC.Base.<> (("dynamic_last4" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'DynamicLast4 obj) GHC.Base.<> (("eps" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Eps obj) GHC.Base.<> (("exp_month" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'ExpMonth obj) GHC.Base.<> (("exp_year" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'ExpYear obj) GHC.Base.<> (("fingerprint" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Fingerprint obj) GHC.Base.<> (("flow" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Flow obj) GHC.Base.<> (("funding" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Funding obj) GHC.Base.<> (("giropay" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Giropay obj) GHC.Base.<> (("id" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Id obj) GHC.Base.<> (("ideal" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Ideal obj) GHC.Base.<> (("klarna" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Klarna obj) GHC.Base.<> (("last4" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Last4 obj) GHC.Base.<> (("livemode" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Livemode obj) GHC.Base.<> (("metadata" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Metadata obj) GHC.Base.<> (("multibanco" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Multibanco obj) GHC.Base.<> (("name" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Name obj) GHC.Base.<> (("object" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Object obj) GHC.Base.<> (("owner" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner obj) GHC.Base.<> (("p24" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'P24 obj) GHC.Base.<> (("receiver" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Receiver obj) GHC.Base.<> (("recipient" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Recipient obj) GHC.Base.<> (("redirect" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Redirect obj) GHC.Base.<> (("routing_number" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'RoutingNumber obj) GHC.Base.<> (("sepa_debit" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'SepaDebit obj) GHC.Base.<> (("sofort" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Sofort obj) GHC.Base.<> (("source_order" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'SourceOrder obj) GHC.Base.<> (("statement_descriptor" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'StatementDescriptor obj) GHC.Base.<> (("status" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Status obj) GHC.Base.<> (("three_d_secure" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'ThreeDSecure obj) GHC.Base.<> (("tokenization_method" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'TokenizationMethod obj) GHC.Base.<> (("type" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Type obj) GHC.Base.<> (("usage" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Usage obj) GHC.Base.<> ("wechat" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Wechat obj)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) instance Data.Aeson.Types.FromJSON.FromJSON PaymentIntentLastPaymentError'Source' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PaymentIntentLastPaymentError'Source'" (\obj -> (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((GHC.Base.pure PaymentIntentLastPaymentError'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 'PaymentIntentLastPaymentError'Source'' with all required fields. mkPaymentIntentLastPaymentError'Source' :: PaymentIntentLastPaymentError'Source' mkPaymentIntentLastPaymentError'Source' = PaymentIntentLastPaymentError'Source' { paymentIntentLastPaymentError'Source'Account = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'AccountHolderName = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'AccountHolderType = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'AchCreditTransfer = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'AchDebit = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'AcssDebit = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'AddressCity = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'AddressCountry = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'AddressLine1 = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'AddressLine1Check = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'AddressLine2 = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'AddressState = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'AddressZip = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'AddressZipCheck = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Alipay = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Amount = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'AuBecsDebit = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'AvailablePayoutMethods = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Bancontact = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'BankName = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Brand = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Card = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'CardPresent = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'ClientSecret = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'CodeVerification = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Country = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Created = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Currency = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Customer = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'CvcCheck = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'DefaultForCurrency = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'DynamicLast4 = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Eps = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'ExpMonth = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'ExpYear = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Fingerprint = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Flow = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Funding = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Giropay = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Id = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Ideal = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Klarna = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Last4 = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Livemode = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Metadata = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Multibanco = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Name = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Object = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Owner = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'P24 = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Receiver = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Recipient = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Redirect = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'RoutingNumber = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'SepaDebit = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Sofort = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'SourceOrder = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'StatementDescriptor = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Status = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'ThreeDSecure = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'TokenizationMethod = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Type = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Usage = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Wechat = GHC.Maybe.Nothing } -- | Defines the oneOf schema located at @components.schemas.payment_intent.properties.last_payment_error.anyOf.properties.source.anyOf.properties.account.anyOf@ in the specification. -- -- The ID of the account that the bank account is associated with. data PaymentIntentLastPaymentError'Source'Account'Variants = PaymentIntentLastPaymentError'Source'Account'Text Data.Text.Internal.Text | PaymentIntentLastPaymentError'Source'Account'Account Account deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PaymentIntentLastPaymentError'Source'Account'Variants where toJSON (PaymentIntentLastPaymentError'Source'Account'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PaymentIntentLastPaymentError'Source'Account'Account a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON PaymentIntentLastPaymentError'Source'Account'Variants where parseJSON val = case (PaymentIntentLastPaymentError'Source'Account'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((PaymentIntentLastPaymentError'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.payment_intent.properties.last_payment_error.anyOf.properties.source.anyOf.properties.available_payout_methods.items@ in the specification. data PaymentIntentLastPaymentError'Source'AvailablePayoutMethods' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PaymentIntentLastPaymentError'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. PaymentIntentLastPaymentError'Source'AvailablePayoutMethods'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"instant"@ PaymentIntentLastPaymentError'Source'AvailablePayoutMethods'EnumInstant | -- | Represents the JSON value @"standard"@ PaymentIntentLastPaymentError'Source'AvailablePayoutMethods'EnumStandard deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PaymentIntentLastPaymentError'Source'AvailablePayoutMethods' where toJSON (PaymentIntentLastPaymentError'Source'AvailablePayoutMethods'Other val) = val toJSON (PaymentIntentLastPaymentError'Source'AvailablePayoutMethods'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PaymentIntentLastPaymentError'Source'AvailablePayoutMethods'EnumInstant) = "instant" toJSON (PaymentIntentLastPaymentError'Source'AvailablePayoutMethods'EnumStandard) = "standard" instance Data.Aeson.Types.FromJSON.FromJSON PaymentIntentLastPaymentError'Source'AvailablePayoutMethods' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "instant" -> PaymentIntentLastPaymentError'Source'AvailablePayoutMethods'EnumInstant | val GHC.Classes.== "standard" -> PaymentIntentLastPaymentError'Source'AvailablePayoutMethods'EnumStandard | GHC.Base.otherwise -> PaymentIntentLastPaymentError'Source'AvailablePayoutMethods'Other val ) -- | Defines the oneOf schema located at @components.schemas.payment_intent.properties.last_payment_error.anyOf.properties.source.anyOf.properties.customer.anyOf@ in the specification. -- -- The ID of the customer that the bank account is associated with. data PaymentIntentLastPaymentError'Source'Customer'Variants = PaymentIntentLastPaymentError'Source'Customer'Text Data.Text.Internal.Text | PaymentIntentLastPaymentError'Source'Customer'Customer Customer | PaymentIntentLastPaymentError'Source'Customer'DeletedCustomer DeletedCustomer deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PaymentIntentLastPaymentError'Source'Customer'Variants where toJSON (PaymentIntentLastPaymentError'Source'Customer'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PaymentIntentLastPaymentError'Source'Customer'Customer a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PaymentIntentLastPaymentError'Source'Customer'DeletedCustomer a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON PaymentIntentLastPaymentError'Source'Customer'Variants where parseJSON val = case (PaymentIntentLastPaymentError'Source'Customer'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((PaymentIntentLastPaymentError'Source'Customer'Customer Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((PaymentIntentLastPaymentError'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.payment_intent.properties.last_payment_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 PaymentIntentLastPaymentError'Source'Object' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PaymentIntentLastPaymentError'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. PaymentIntentLastPaymentError'Source'Object'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"bank_account"@ PaymentIntentLastPaymentError'Source'Object'EnumBankAccount deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PaymentIntentLastPaymentError'Source'Object' where toJSON (PaymentIntentLastPaymentError'Source'Object'Other val) = val toJSON (PaymentIntentLastPaymentError'Source'Object'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PaymentIntentLastPaymentError'Source'Object'EnumBankAccount) = "bank_account" instance Data.Aeson.Types.FromJSON.FromJSON PaymentIntentLastPaymentError'Source'Object' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "bank_account" -> PaymentIntentLastPaymentError'Source'Object'EnumBankAccount | GHC.Base.otherwise -> PaymentIntentLastPaymentError'Source'Object'Other val ) -- | Defines the object schema located at @components.schemas.payment_intent.properties.last_payment_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 PaymentIntentLastPaymentError'Source'Owner' = PaymentIntentLastPaymentError'Source'Owner' { -- | address: Owner\'s address. paymentIntentLastPaymentError'Source'Owner'Address :: (GHC.Maybe.Maybe PaymentIntentLastPaymentError'Source'Owner'Address'), -- | email: Owner\'s email address. -- -- Constraints: -- -- * Maximum length of 5000 paymentIntentLastPaymentError'Source'Owner'Email :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | name: Owner\'s full name. -- -- Constraints: -- -- * Maximum length of 5000 paymentIntentLastPaymentError'Source'Owner'Name :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | phone: Owner\'s phone number (including extension). -- -- Constraints: -- -- * Maximum length of 5000 paymentIntentLastPaymentError'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. paymentIntentLastPaymentError'Source'Owner'VerifiedAddress :: (GHC.Maybe.Maybe PaymentIntentLastPaymentError'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 paymentIntentLastPaymentError'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 paymentIntentLastPaymentError'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 paymentIntentLastPaymentError'Source'Owner'VerifiedPhone :: (GHC.Maybe.Maybe Data.Text.Internal.Text) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PaymentIntentLastPaymentError'Source'Owner' where toJSON obj = Data.Aeson.Types.Internal.object ("address" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner'Address obj : "email" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner'Email obj : "name" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner'Name obj : "phone" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner'Phone obj : "verified_address" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner'VerifiedAddress obj : "verified_email" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner'VerifiedEmail obj : "verified_name" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner'VerifiedName obj : "verified_phone" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner'VerifiedPhone obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("address" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner'Address obj) GHC.Base.<> (("email" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner'Email obj) GHC.Base.<> (("name" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner'Name obj) GHC.Base.<> (("phone" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner'Phone obj) GHC.Base.<> (("verified_address" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner'VerifiedAddress obj) GHC.Base.<> (("verified_email" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner'VerifiedEmail obj) GHC.Base.<> (("verified_name" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner'VerifiedName obj) GHC.Base.<> ("verified_phone" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner'VerifiedPhone obj)))))))) instance Data.Aeson.Types.FromJSON.FromJSON PaymentIntentLastPaymentError'Source'Owner' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PaymentIntentLastPaymentError'Source'Owner'" (\obj -> (((((((GHC.Base.pure PaymentIntentLastPaymentError'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 'PaymentIntentLastPaymentError'Source'Owner'' with all required fields. mkPaymentIntentLastPaymentError'Source'Owner' :: PaymentIntentLastPaymentError'Source'Owner' mkPaymentIntentLastPaymentError'Source'Owner' = PaymentIntentLastPaymentError'Source'Owner' { paymentIntentLastPaymentError'Source'Owner'Address = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Owner'Email = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Owner'Name = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Owner'Phone = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Owner'VerifiedAddress = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Owner'VerifiedEmail = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Owner'VerifiedName = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Owner'VerifiedPhone = GHC.Maybe.Nothing } -- | Defines the object schema located at @components.schemas.payment_intent.properties.last_payment_error.anyOf.properties.source.anyOf.properties.owner.anyOf.properties.address.anyOf@ in the specification. -- -- Owner\\\'s address. data PaymentIntentLastPaymentError'Source'Owner'Address' = PaymentIntentLastPaymentError'Source'Owner'Address' { -- | city: City, district, suburb, town, or village. -- -- Constraints: -- -- * Maximum length of 5000 paymentIntentLastPaymentError'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 paymentIntentLastPaymentError'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 paymentIntentLastPaymentError'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 paymentIntentLastPaymentError'Source'Owner'Address'Line2 :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | postal_code: ZIP or postal code. -- -- Constraints: -- -- * Maximum length of 5000 paymentIntentLastPaymentError'Source'Owner'Address'PostalCode :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | state: State, county, province, or region. -- -- Constraints: -- -- * Maximum length of 5000 paymentIntentLastPaymentError'Source'Owner'Address'State :: (GHC.Maybe.Maybe Data.Text.Internal.Text) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PaymentIntentLastPaymentError'Source'Owner'Address' where toJSON obj = Data.Aeson.Types.Internal.object ("city" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner'Address'City obj : "country" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner'Address'Country obj : "line1" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner'Address'Line1 obj : "line2" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner'Address'Line2 obj : "postal_code" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner'Address'PostalCode obj : "state" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner'Address'State obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("city" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner'Address'City obj) GHC.Base.<> (("country" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner'Address'Country obj) GHC.Base.<> (("line1" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner'Address'Line1 obj) GHC.Base.<> (("line2" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner'Address'Line2 obj) GHC.Base.<> (("postal_code" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner'Address'PostalCode obj) GHC.Base.<> ("state" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner'Address'State obj)))))) instance Data.Aeson.Types.FromJSON.FromJSON PaymentIntentLastPaymentError'Source'Owner'Address' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PaymentIntentLastPaymentError'Source'Owner'Address'" (\obj -> (((((GHC.Base.pure PaymentIntentLastPaymentError'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 'PaymentIntentLastPaymentError'Source'Owner'Address'' with all required fields. mkPaymentIntentLastPaymentError'Source'Owner'Address' :: PaymentIntentLastPaymentError'Source'Owner'Address' mkPaymentIntentLastPaymentError'Source'Owner'Address' = PaymentIntentLastPaymentError'Source'Owner'Address' { paymentIntentLastPaymentError'Source'Owner'Address'City = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Owner'Address'Country = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Owner'Address'Line1 = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Owner'Address'Line2 = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Owner'Address'PostalCode = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Owner'Address'State = GHC.Maybe.Nothing } -- | Defines the object schema located at @components.schemas.payment_intent.properties.last_payment_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 PaymentIntentLastPaymentError'Source'Owner'VerifiedAddress' = PaymentIntentLastPaymentError'Source'Owner'VerifiedAddress' { -- | city: City, district, suburb, town, or village. -- -- Constraints: -- -- * Maximum length of 5000 paymentIntentLastPaymentError'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 paymentIntentLastPaymentError'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 paymentIntentLastPaymentError'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 paymentIntentLastPaymentError'Source'Owner'VerifiedAddress'Line2 :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | postal_code: ZIP or postal code. -- -- Constraints: -- -- * Maximum length of 5000 paymentIntentLastPaymentError'Source'Owner'VerifiedAddress'PostalCode :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | state: State, county, province, or region. -- -- Constraints: -- -- * Maximum length of 5000 paymentIntentLastPaymentError'Source'Owner'VerifiedAddress'State :: (GHC.Maybe.Maybe Data.Text.Internal.Text) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PaymentIntentLastPaymentError'Source'Owner'VerifiedAddress' where toJSON obj = Data.Aeson.Types.Internal.object ("city" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner'VerifiedAddress'City obj : "country" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner'VerifiedAddress'Country obj : "line1" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner'VerifiedAddress'Line1 obj : "line2" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner'VerifiedAddress'Line2 obj : "postal_code" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner'VerifiedAddress'PostalCode obj : "state" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner'VerifiedAddress'State obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("city" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner'VerifiedAddress'City obj) GHC.Base.<> (("country" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner'VerifiedAddress'Country obj) GHC.Base.<> (("line1" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner'VerifiedAddress'Line1 obj) GHC.Base.<> (("line2" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner'VerifiedAddress'Line2 obj) GHC.Base.<> (("postal_code" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner'VerifiedAddress'PostalCode obj) GHC.Base.<> ("state" Data.Aeson.Types.ToJSON..= paymentIntentLastPaymentError'Source'Owner'VerifiedAddress'State obj)))))) instance Data.Aeson.Types.FromJSON.FromJSON PaymentIntentLastPaymentError'Source'Owner'VerifiedAddress' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PaymentIntentLastPaymentError'Source'Owner'VerifiedAddress'" (\obj -> (((((GHC.Base.pure PaymentIntentLastPaymentError'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 'PaymentIntentLastPaymentError'Source'Owner'VerifiedAddress'' with all required fields. mkPaymentIntentLastPaymentError'Source'Owner'VerifiedAddress' :: PaymentIntentLastPaymentError'Source'Owner'VerifiedAddress' mkPaymentIntentLastPaymentError'Source'Owner'VerifiedAddress' = PaymentIntentLastPaymentError'Source'Owner'VerifiedAddress' { paymentIntentLastPaymentError'Source'Owner'VerifiedAddress'City = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Owner'VerifiedAddress'Country = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Owner'VerifiedAddress'Line1 = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Owner'VerifiedAddress'Line2 = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Owner'VerifiedAddress'PostalCode = GHC.Maybe.Nothing, paymentIntentLastPaymentError'Source'Owner'VerifiedAddress'State = GHC.Maybe.Nothing } -- | Defines the oneOf schema located at @components.schemas.payment_intent.properties.last_payment_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 PaymentIntentLastPaymentError'Source'Recipient'Variants = PaymentIntentLastPaymentError'Source'Recipient'Text Data.Text.Internal.Text | PaymentIntentLastPaymentError'Source'Recipient'Recipient Recipient deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PaymentIntentLastPaymentError'Source'Recipient'Variants where toJSON (PaymentIntentLastPaymentError'Source'Recipient'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PaymentIntentLastPaymentError'Source'Recipient'Recipient a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON PaymentIntentLastPaymentError'Source'Recipient'Variants where parseJSON val = case (PaymentIntentLastPaymentError'Source'Recipient'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((PaymentIntentLastPaymentError'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.payment_intent.properties.last_payment_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 PaymentIntentLastPaymentError'Source'Type' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PaymentIntentLastPaymentError'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. PaymentIntentLastPaymentError'Source'Type'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"ach_credit_transfer"@ PaymentIntentLastPaymentError'Source'Type'EnumAchCreditTransfer | -- | Represents the JSON value @"ach_debit"@ PaymentIntentLastPaymentError'Source'Type'EnumAchDebit | -- | Represents the JSON value @"acss_debit"@ PaymentIntentLastPaymentError'Source'Type'EnumAcssDebit | -- | Represents the JSON value @"alipay"@ PaymentIntentLastPaymentError'Source'Type'EnumAlipay | -- | Represents the JSON value @"au_becs_debit"@ PaymentIntentLastPaymentError'Source'Type'EnumAuBecsDebit | -- | Represents the JSON value @"bancontact"@ PaymentIntentLastPaymentError'Source'Type'EnumBancontact | -- | Represents the JSON value @"card"@ PaymentIntentLastPaymentError'Source'Type'EnumCard | -- | Represents the JSON value @"card_present"@ PaymentIntentLastPaymentError'Source'Type'EnumCardPresent | -- | Represents the JSON value @"eps"@ PaymentIntentLastPaymentError'Source'Type'EnumEps | -- | Represents the JSON value @"giropay"@ PaymentIntentLastPaymentError'Source'Type'EnumGiropay | -- | Represents the JSON value @"ideal"@ PaymentIntentLastPaymentError'Source'Type'EnumIdeal | -- | Represents the JSON value @"klarna"@ PaymentIntentLastPaymentError'Source'Type'EnumKlarna | -- | Represents the JSON value @"multibanco"@ PaymentIntentLastPaymentError'Source'Type'EnumMultibanco | -- | Represents the JSON value @"p24"@ PaymentIntentLastPaymentError'Source'Type'EnumP24 | -- | Represents the JSON value @"sepa_debit"@ PaymentIntentLastPaymentError'Source'Type'EnumSepaDebit | -- | Represents the JSON value @"sofort"@ PaymentIntentLastPaymentError'Source'Type'EnumSofort | -- | Represents the JSON value @"three_d_secure"@ PaymentIntentLastPaymentError'Source'Type'EnumThreeDSecure | -- | Represents the JSON value @"wechat"@ PaymentIntentLastPaymentError'Source'Type'EnumWechat deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PaymentIntentLastPaymentError'Source'Type' where toJSON (PaymentIntentLastPaymentError'Source'Type'Other val) = val toJSON (PaymentIntentLastPaymentError'Source'Type'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PaymentIntentLastPaymentError'Source'Type'EnumAchCreditTransfer) = "ach_credit_transfer" toJSON (PaymentIntentLastPaymentError'Source'Type'EnumAchDebit) = "ach_debit" toJSON (PaymentIntentLastPaymentError'Source'Type'EnumAcssDebit) = "acss_debit" toJSON (PaymentIntentLastPaymentError'Source'Type'EnumAlipay) = "alipay" toJSON (PaymentIntentLastPaymentError'Source'Type'EnumAuBecsDebit) = "au_becs_debit" toJSON (PaymentIntentLastPaymentError'Source'Type'EnumBancontact) = "bancontact" toJSON (PaymentIntentLastPaymentError'Source'Type'EnumCard) = "card" toJSON (PaymentIntentLastPaymentError'Source'Type'EnumCardPresent) = "card_present" toJSON (PaymentIntentLastPaymentError'Source'Type'EnumEps) = "eps" toJSON (PaymentIntentLastPaymentError'Source'Type'EnumGiropay) = "giropay" toJSON (PaymentIntentLastPaymentError'Source'Type'EnumIdeal) = "ideal" toJSON (PaymentIntentLastPaymentError'Source'Type'EnumKlarna) = "klarna" toJSON (PaymentIntentLastPaymentError'Source'Type'EnumMultibanco) = "multibanco" toJSON (PaymentIntentLastPaymentError'Source'Type'EnumP24) = "p24" toJSON (PaymentIntentLastPaymentError'Source'Type'EnumSepaDebit) = "sepa_debit" toJSON (PaymentIntentLastPaymentError'Source'Type'EnumSofort) = "sofort" toJSON (PaymentIntentLastPaymentError'Source'Type'EnumThreeDSecure) = "three_d_secure" toJSON (PaymentIntentLastPaymentError'Source'Type'EnumWechat) = "wechat" instance Data.Aeson.Types.FromJSON.FromJSON PaymentIntentLastPaymentError'Source'Type' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "ach_credit_transfer" -> PaymentIntentLastPaymentError'Source'Type'EnumAchCreditTransfer | val GHC.Classes.== "ach_debit" -> PaymentIntentLastPaymentError'Source'Type'EnumAchDebit | val GHC.Classes.== "acss_debit" -> PaymentIntentLastPaymentError'Source'Type'EnumAcssDebit | val GHC.Classes.== "alipay" -> PaymentIntentLastPaymentError'Source'Type'EnumAlipay | val GHC.Classes.== "au_becs_debit" -> PaymentIntentLastPaymentError'Source'Type'EnumAuBecsDebit | val GHC.Classes.== "bancontact" -> PaymentIntentLastPaymentError'Source'Type'EnumBancontact | val GHC.Classes.== "card" -> PaymentIntentLastPaymentError'Source'Type'EnumCard | val GHC.Classes.== "card_present" -> PaymentIntentLastPaymentError'Source'Type'EnumCardPresent | val GHC.Classes.== "eps" -> PaymentIntentLastPaymentError'Source'Type'EnumEps | val GHC.Classes.== "giropay" -> PaymentIntentLastPaymentError'Source'Type'EnumGiropay | val GHC.Classes.== "ideal" -> PaymentIntentLastPaymentError'Source'Type'EnumIdeal | val GHC.Classes.== "klarna" -> PaymentIntentLastPaymentError'Source'Type'EnumKlarna | val GHC.Classes.== "multibanco" -> PaymentIntentLastPaymentError'Source'Type'EnumMultibanco | val GHC.Classes.== "p24" -> PaymentIntentLastPaymentError'Source'Type'EnumP24 | val GHC.Classes.== "sepa_debit" -> PaymentIntentLastPaymentError'Source'Type'EnumSepaDebit | val GHC.Classes.== "sofort" -> PaymentIntentLastPaymentError'Source'Type'EnumSofort | val GHC.Classes.== "three_d_secure" -> PaymentIntentLastPaymentError'Source'Type'EnumThreeDSecure | val GHC.Classes.== "wechat" -> PaymentIntentLastPaymentError'Source'Type'EnumWechat | GHC.Base.otherwise -> PaymentIntentLastPaymentError'Source'Type'Other val ) -- | Defines the enum schema located at @components.schemas.payment_intent.properties.last_payment_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 PaymentIntentLastPaymentError'Type' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PaymentIntentLastPaymentError'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. PaymentIntentLastPaymentError'Type'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"api_connection_error"@ PaymentIntentLastPaymentError'Type'EnumApiConnectionError | -- | Represents the JSON value @"api_error"@ PaymentIntentLastPaymentError'Type'EnumApiError | -- | Represents the JSON value @"authentication_error"@ PaymentIntentLastPaymentError'Type'EnumAuthenticationError | -- | Represents the JSON value @"card_error"@ PaymentIntentLastPaymentError'Type'EnumCardError | -- | Represents the JSON value @"idempotency_error"@ PaymentIntentLastPaymentError'Type'EnumIdempotencyError | -- | Represents the JSON value @"invalid_request_error"@ PaymentIntentLastPaymentError'Type'EnumInvalidRequestError | -- | Represents the JSON value @"rate_limit_error"@ PaymentIntentLastPaymentError'Type'EnumRateLimitError deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PaymentIntentLastPaymentError'Type' where toJSON (PaymentIntentLastPaymentError'Type'Other val) = val toJSON (PaymentIntentLastPaymentError'Type'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PaymentIntentLastPaymentError'Type'EnumApiConnectionError) = "api_connection_error" toJSON (PaymentIntentLastPaymentError'Type'EnumApiError) = "api_error" toJSON (PaymentIntentLastPaymentError'Type'EnumAuthenticationError) = "authentication_error" toJSON (PaymentIntentLastPaymentError'Type'EnumCardError) = "card_error" toJSON (PaymentIntentLastPaymentError'Type'EnumIdempotencyError) = "idempotency_error" toJSON (PaymentIntentLastPaymentError'Type'EnumInvalidRequestError) = "invalid_request_error" toJSON (PaymentIntentLastPaymentError'Type'EnumRateLimitError) = "rate_limit_error" instance Data.Aeson.Types.FromJSON.FromJSON PaymentIntentLastPaymentError'Type' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "api_connection_error" -> PaymentIntentLastPaymentError'Type'EnumApiConnectionError | val GHC.Classes.== "api_error" -> PaymentIntentLastPaymentError'Type'EnumApiError | val GHC.Classes.== "authentication_error" -> PaymentIntentLastPaymentError'Type'EnumAuthenticationError | val GHC.Classes.== "card_error" -> PaymentIntentLastPaymentError'Type'EnumCardError | val GHC.Classes.== "idempotency_error" -> PaymentIntentLastPaymentError'Type'EnumIdempotencyError | val GHC.Classes.== "invalid_request_error" -> PaymentIntentLastPaymentError'Type'EnumInvalidRequestError | val GHC.Classes.== "rate_limit_error" -> PaymentIntentLastPaymentError'Type'EnumRateLimitError | GHC.Base.otherwise -> PaymentIntentLastPaymentError'Type'Other val ) -- | Defines the object schema located at @components.schemas.payment_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 fulfill a payment using the provided source. data PaymentIntentNextAction' = PaymentIntentNextAction' { -- | alipay_handle_redirect: paymentIntentNextAction'AlipayHandleRedirect :: (GHC.Maybe.Maybe PaymentIntentNextActionAlipayHandleRedirect), -- | boleto_display_details: paymentIntentNextAction'BoletoDisplayDetails :: (GHC.Maybe.Maybe PaymentIntentNextActionBoleto), -- | oxxo_display_details: paymentIntentNextAction'OxxoDisplayDetails :: (GHC.Maybe.Maybe PaymentIntentNextActionDisplayOxxoDetails), -- | redirect_to_url: paymentIntentNextAction'RedirectToUrl :: (GHC.Maybe.Maybe PaymentIntentNextActionRedirectToUrl), -- | 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 paymentIntentNextAction'Type :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | use_stripe_sdk: When confirming a PaymentIntent 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. paymentIntentNextAction'UseStripeSdk :: (GHC.Maybe.Maybe Data.Aeson.Types.Internal.Object), -- | verify_with_microdeposits: paymentIntentNextAction'VerifyWithMicrodeposits :: (GHC.Maybe.Maybe PaymentIntentNextActionVerifyWithMicrodeposits) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PaymentIntentNextAction' where toJSON obj = Data.Aeson.Types.Internal.object ("alipay_handle_redirect" Data.Aeson.Types.ToJSON..= paymentIntentNextAction'AlipayHandleRedirect obj : "boleto_display_details" Data.Aeson.Types.ToJSON..= paymentIntentNextAction'BoletoDisplayDetails obj : "oxxo_display_details" Data.Aeson.Types.ToJSON..= paymentIntentNextAction'OxxoDisplayDetails obj : "redirect_to_url" Data.Aeson.Types.ToJSON..= paymentIntentNextAction'RedirectToUrl obj : "type" Data.Aeson.Types.ToJSON..= paymentIntentNextAction'Type obj : "use_stripe_sdk" Data.Aeson.Types.ToJSON..= paymentIntentNextAction'UseStripeSdk obj : "verify_with_microdeposits" Data.Aeson.Types.ToJSON..= paymentIntentNextAction'VerifyWithMicrodeposits obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("alipay_handle_redirect" Data.Aeson.Types.ToJSON..= paymentIntentNextAction'AlipayHandleRedirect obj) GHC.Base.<> (("boleto_display_details" Data.Aeson.Types.ToJSON..= paymentIntentNextAction'BoletoDisplayDetails obj) GHC.Base.<> (("oxxo_display_details" Data.Aeson.Types.ToJSON..= paymentIntentNextAction'OxxoDisplayDetails obj) GHC.Base.<> (("redirect_to_url" Data.Aeson.Types.ToJSON..= paymentIntentNextAction'RedirectToUrl obj) GHC.Base.<> (("type" Data.Aeson.Types.ToJSON..= paymentIntentNextAction'Type obj) GHC.Base.<> (("use_stripe_sdk" Data.Aeson.Types.ToJSON..= paymentIntentNextAction'UseStripeSdk obj) GHC.Base.<> ("verify_with_microdeposits" Data.Aeson.Types.ToJSON..= paymentIntentNextAction'VerifyWithMicrodeposits obj))))))) instance Data.Aeson.Types.FromJSON.FromJSON PaymentIntentNextAction' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PaymentIntentNextAction'" (\obj -> ((((((GHC.Base.pure PaymentIntentNextAction' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "alipay_handle_redirect")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "boleto_display_details")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "oxxo_display_details")) 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 'PaymentIntentNextAction'' with all required fields. mkPaymentIntentNextAction' :: PaymentIntentNextAction' mkPaymentIntentNextAction' = PaymentIntentNextAction' { paymentIntentNextAction'AlipayHandleRedirect = GHC.Maybe.Nothing, paymentIntentNextAction'BoletoDisplayDetails = GHC.Maybe.Nothing, paymentIntentNextAction'OxxoDisplayDetails = GHC.Maybe.Nothing, paymentIntentNextAction'RedirectToUrl = GHC.Maybe.Nothing, paymentIntentNextAction'Type = GHC.Maybe.Nothing, paymentIntentNextAction'UseStripeSdk = GHC.Maybe.Nothing, paymentIntentNextAction'VerifyWithMicrodeposits = GHC.Maybe.Nothing } -- | Defines the oneOf schema located at @components.schemas.payment_intent.properties.on_behalf_of.anyOf@ in the specification. -- -- The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents [use case for connected accounts](https:\/\/stripe.com\/docs\/payments\/connected-accounts) for details. data PaymentIntentOnBehalfOf'Variants = PaymentIntentOnBehalfOf'Text Data.Text.Internal.Text | PaymentIntentOnBehalfOf'Account Account deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PaymentIntentOnBehalfOf'Variants where toJSON (PaymentIntentOnBehalfOf'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PaymentIntentOnBehalfOf'Account a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON PaymentIntentOnBehalfOf'Variants where parseJSON val = case (PaymentIntentOnBehalfOf'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((PaymentIntentOnBehalfOf'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.payment_intent.properties.payment_method.anyOf@ in the specification. -- -- ID of the payment method used in this PaymentIntent. data PaymentIntentPaymentMethod'Variants = PaymentIntentPaymentMethod'Text Data.Text.Internal.Text | PaymentIntentPaymentMethod'PaymentMethod PaymentMethod deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PaymentIntentPaymentMethod'Variants where toJSON (PaymentIntentPaymentMethod'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PaymentIntentPaymentMethod'PaymentMethod a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON PaymentIntentPaymentMethod'Variants where parseJSON val = case (PaymentIntentPaymentMethod'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((PaymentIntentPaymentMethod'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.payment_intent.properties.payment_method_options.anyOf@ in the specification. -- -- Payment-method-specific configuration for this PaymentIntent. data PaymentIntentPaymentMethodOptions' = PaymentIntentPaymentMethodOptions' { -- | acss_debit: paymentIntentPaymentMethodOptions'AcssDebit :: (GHC.Maybe.Maybe PaymentIntentPaymentMethodOptionsAcssDebit), -- | afterpay_clearpay: paymentIntentPaymentMethodOptions'AfterpayClearpay :: (GHC.Maybe.Maybe PaymentMethodOptionsAfterpayClearpay), -- | alipay: paymentIntentPaymentMethodOptions'Alipay :: (GHC.Maybe.Maybe PaymentMethodOptionsAlipay), -- | bancontact: paymentIntentPaymentMethodOptions'Bancontact :: (GHC.Maybe.Maybe PaymentMethodOptionsBancontact), -- | boleto: paymentIntentPaymentMethodOptions'Boleto :: (GHC.Maybe.Maybe PaymentMethodOptionsBoleto), -- | card: paymentIntentPaymentMethodOptions'Card :: (GHC.Maybe.Maybe PaymentIntentPaymentMethodOptionsCard), -- | card_present: paymentIntentPaymentMethodOptions'CardPresent :: (GHC.Maybe.Maybe PaymentMethodOptionsCardPresent), -- | oxxo: paymentIntentPaymentMethodOptions'Oxxo :: (GHC.Maybe.Maybe PaymentMethodOptionsOxxo), -- | p24: paymentIntentPaymentMethodOptions'P24 :: (GHC.Maybe.Maybe PaymentMethodOptionsP24), -- | sepa_debit: paymentIntentPaymentMethodOptions'SepaDebit :: (GHC.Maybe.Maybe PaymentIntentPaymentMethodOptionsSepaDebit), -- | sofort: paymentIntentPaymentMethodOptions'Sofort :: (GHC.Maybe.Maybe PaymentMethodOptionsSofort) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PaymentIntentPaymentMethodOptions' where toJSON obj = Data.Aeson.Types.Internal.object ("acss_debit" Data.Aeson.Types.ToJSON..= paymentIntentPaymentMethodOptions'AcssDebit obj : "afterpay_clearpay" Data.Aeson.Types.ToJSON..= paymentIntentPaymentMethodOptions'AfterpayClearpay obj : "alipay" Data.Aeson.Types.ToJSON..= paymentIntentPaymentMethodOptions'Alipay obj : "bancontact" Data.Aeson.Types.ToJSON..= paymentIntentPaymentMethodOptions'Bancontact obj : "boleto" Data.Aeson.Types.ToJSON..= paymentIntentPaymentMethodOptions'Boleto obj : "card" Data.Aeson.Types.ToJSON..= paymentIntentPaymentMethodOptions'Card obj : "card_present" Data.Aeson.Types.ToJSON..= paymentIntentPaymentMethodOptions'CardPresent obj : "oxxo" Data.Aeson.Types.ToJSON..= paymentIntentPaymentMethodOptions'Oxxo obj : "p24" Data.Aeson.Types.ToJSON..= paymentIntentPaymentMethodOptions'P24 obj : "sepa_debit" Data.Aeson.Types.ToJSON..= paymentIntentPaymentMethodOptions'SepaDebit obj : "sofort" Data.Aeson.Types.ToJSON..= paymentIntentPaymentMethodOptions'Sofort obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("acss_debit" Data.Aeson.Types.ToJSON..= paymentIntentPaymentMethodOptions'AcssDebit obj) GHC.Base.<> (("afterpay_clearpay" Data.Aeson.Types.ToJSON..= paymentIntentPaymentMethodOptions'AfterpayClearpay obj) GHC.Base.<> (("alipay" Data.Aeson.Types.ToJSON..= paymentIntentPaymentMethodOptions'Alipay obj) GHC.Base.<> (("bancontact" Data.Aeson.Types.ToJSON..= paymentIntentPaymentMethodOptions'Bancontact obj) GHC.Base.<> (("boleto" Data.Aeson.Types.ToJSON..= paymentIntentPaymentMethodOptions'Boleto obj) GHC.Base.<> (("card" Data.Aeson.Types.ToJSON..= paymentIntentPaymentMethodOptions'Card obj) GHC.Base.<> (("card_present" Data.Aeson.Types.ToJSON..= paymentIntentPaymentMethodOptions'CardPresent obj) GHC.Base.<> (("oxxo" Data.Aeson.Types.ToJSON..= paymentIntentPaymentMethodOptions'Oxxo obj) GHC.Base.<> (("p24" Data.Aeson.Types.ToJSON..= paymentIntentPaymentMethodOptions'P24 obj) GHC.Base.<> (("sepa_debit" Data.Aeson.Types.ToJSON..= paymentIntentPaymentMethodOptions'SepaDebit obj) GHC.Base.<> ("sofort" Data.Aeson.Types.ToJSON..= paymentIntentPaymentMethodOptions'Sofort obj))))))))))) instance Data.Aeson.Types.FromJSON.FromJSON PaymentIntentPaymentMethodOptions' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PaymentIntentPaymentMethodOptions'" (\obj -> ((((((((((GHC.Base.pure PaymentIntentPaymentMethodOptions' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "acss_debit")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "afterpay_clearpay")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "alipay")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "bancontact")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "boleto")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "card")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "card_present")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "oxxo")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "p24")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "sepa_debit")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "sofort")) -- | Create a new 'PaymentIntentPaymentMethodOptions'' with all required fields. mkPaymentIntentPaymentMethodOptions' :: PaymentIntentPaymentMethodOptions' mkPaymentIntentPaymentMethodOptions' = PaymentIntentPaymentMethodOptions' { paymentIntentPaymentMethodOptions'AcssDebit = GHC.Maybe.Nothing, paymentIntentPaymentMethodOptions'AfterpayClearpay = GHC.Maybe.Nothing, paymentIntentPaymentMethodOptions'Alipay = GHC.Maybe.Nothing, paymentIntentPaymentMethodOptions'Bancontact = GHC.Maybe.Nothing, paymentIntentPaymentMethodOptions'Boleto = GHC.Maybe.Nothing, paymentIntentPaymentMethodOptions'Card = GHC.Maybe.Nothing, paymentIntentPaymentMethodOptions'CardPresent = GHC.Maybe.Nothing, paymentIntentPaymentMethodOptions'Oxxo = GHC.Maybe.Nothing, paymentIntentPaymentMethodOptions'P24 = GHC.Maybe.Nothing, paymentIntentPaymentMethodOptions'SepaDebit = GHC.Maybe.Nothing, paymentIntentPaymentMethodOptions'Sofort = GHC.Maybe.Nothing } -- | Defines the oneOf schema located at @components.schemas.payment_intent.properties.review.anyOf@ in the specification. -- -- ID of the review associated with this PaymentIntent, if any. data PaymentIntentReview'Variants = PaymentIntentReview'Text Data.Text.Internal.Text | PaymentIntentReview'Review Review deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PaymentIntentReview'Variants where toJSON (PaymentIntentReview'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PaymentIntentReview'Review a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON PaymentIntentReview'Variants where parseJSON val = case (PaymentIntentReview'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((PaymentIntentReview'Review 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.payment_intent.properties.setup_future_usage@ in the specification. -- -- Indicates that you intend to make future payments with this PaymentIntent\'s payment method. -- -- Providing this parameter will [attach the payment method](https:\/\/stripe.com\/docs\/payments\/save-during-payment) to the PaymentIntent\'s Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https:\/\/stripe.com\/docs\/api\/payment_methods\/attach) to a Customer after the transaction completes. -- -- When processing card payments, Stripe also uses \`setup_future_usage\` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https:\/\/stripe.com\/docs\/strong-customer-authentication). data PaymentIntentSetupFutureUsage' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PaymentIntentSetupFutureUsage'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. PaymentIntentSetupFutureUsage'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"off_session"@ PaymentIntentSetupFutureUsage'EnumOffSession | -- | Represents the JSON value @"on_session"@ PaymentIntentSetupFutureUsage'EnumOnSession deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PaymentIntentSetupFutureUsage' where toJSON (PaymentIntentSetupFutureUsage'Other val) = val toJSON (PaymentIntentSetupFutureUsage'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PaymentIntentSetupFutureUsage'EnumOffSession) = "off_session" toJSON (PaymentIntentSetupFutureUsage'EnumOnSession) = "on_session" instance Data.Aeson.Types.FromJSON.FromJSON PaymentIntentSetupFutureUsage' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "off_session" -> PaymentIntentSetupFutureUsage'EnumOffSession | val GHC.Classes.== "on_session" -> PaymentIntentSetupFutureUsage'EnumOnSession | GHC.Base.otherwise -> PaymentIntentSetupFutureUsage'Other val ) -- | Defines the object schema located at @components.schemas.payment_intent.properties.shipping.anyOf@ in the specification. -- -- Shipping information for this PaymentIntent. data PaymentIntentShipping' = PaymentIntentShipping' { -- | address: paymentIntentShipping'Address :: (GHC.Maybe.Maybe Address), -- | carrier: The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. -- -- Constraints: -- -- * Maximum length of 5000 paymentIntentShipping'Carrier :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | name: Recipient name. -- -- Constraints: -- -- * Maximum length of 5000 paymentIntentShipping'Name :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | phone: Recipient phone (including extension). -- -- Constraints: -- -- * Maximum length of 5000 paymentIntentShipping'Phone :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | tracking_number: The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. -- -- Constraints: -- -- * Maximum length of 5000 paymentIntentShipping'TrackingNumber :: (GHC.Maybe.Maybe Data.Text.Internal.Text) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PaymentIntentShipping' where toJSON obj = Data.Aeson.Types.Internal.object ("address" Data.Aeson.Types.ToJSON..= paymentIntentShipping'Address obj : "carrier" Data.Aeson.Types.ToJSON..= paymentIntentShipping'Carrier obj : "name" Data.Aeson.Types.ToJSON..= paymentIntentShipping'Name obj : "phone" Data.Aeson.Types.ToJSON..= paymentIntentShipping'Phone obj : "tracking_number" Data.Aeson.Types.ToJSON..= paymentIntentShipping'TrackingNumber obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("address" Data.Aeson.Types.ToJSON..= paymentIntentShipping'Address obj) GHC.Base.<> (("carrier" Data.Aeson.Types.ToJSON..= paymentIntentShipping'Carrier obj) GHC.Base.<> (("name" Data.Aeson.Types.ToJSON..= paymentIntentShipping'Name obj) GHC.Base.<> (("phone" Data.Aeson.Types.ToJSON..= paymentIntentShipping'Phone obj) GHC.Base.<> ("tracking_number" Data.Aeson.Types.ToJSON..= paymentIntentShipping'TrackingNumber obj))))) instance Data.Aeson.Types.FromJSON.FromJSON PaymentIntentShipping' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PaymentIntentShipping'" (\obj -> ((((GHC.Base.pure PaymentIntentShipping' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "address")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "carrier")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "name")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "phone")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "tracking_number")) -- | Create a new 'PaymentIntentShipping'' with all required fields. mkPaymentIntentShipping' :: PaymentIntentShipping' mkPaymentIntentShipping' = PaymentIntentShipping' { paymentIntentShipping'Address = GHC.Maybe.Nothing, paymentIntentShipping'Carrier = GHC.Maybe.Nothing, paymentIntentShipping'Name = GHC.Maybe.Nothing, paymentIntentShipping'Phone = GHC.Maybe.Nothing, paymentIntentShipping'TrackingNumber = GHC.Maybe.Nothing } -- | Defines the enum schema located at @components.schemas.payment_intent.properties.status@ in the specification. -- -- Status of this PaymentIntent, one of \`requires_payment_method\`, \`requires_confirmation\`, \`requires_action\`, \`processing\`, \`requires_capture\`, \`canceled\`, or \`succeeded\`. Read more about each PaymentIntent [status](https:\/\/stripe.com\/docs\/payments\/intents\#intent-statuses). data PaymentIntentStatus' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PaymentIntentStatus'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. PaymentIntentStatus'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"canceled"@ PaymentIntentStatus'EnumCanceled | -- | Represents the JSON value @"processing"@ PaymentIntentStatus'EnumProcessing | -- | Represents the JSON value @"requires_action"@ PaymentIntentStatus'EnumRequiresAction | -- | Represents the JSON value @"requires_capture"@ PaymentIntentStatus'EnumRequiresCapture | -- | Represents the JSON value @"requires_confirmation"@ PaymentIntentStatus'EnumRequiresConfirmation | -- | Represents the JSON value @"requires_payment_method"@ PaymentIntentStatus'EnumRequiresPaymentMethod | -- | Represents the JSON value @"succeeded"@ PaymentIntentStatus'EnumSucceeded deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PaymentIntentStatus' where toJSON (PaymentIntentStatus'Other val) = val toJSON (PaymentIntentStatus'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PaymentIntentStatus'EnumCanceled) = "canceled" toJSON (PaymentIntentStatus'EnumProcessing) = "processing" toJSON (PaymentIntentStatus'EnumRequiresAction) = "requires_action" toJSON (PaymentIntentStatus'EnumRequiresCapture) = "requires_capture" toJSON (PaymentIntentStatus'EnumRequiresConfirmation) = "requires_confirmation" toJSON (PaymentIntentStatus'EnumRequiresPaymentMethod) = "requires_payment_method" toJSON (PaymentIntentStatus'EnumSucceeded) = "succeeded" instance Data.Aeson.Types.FromJSON.FromJSON PaymentIntentStatus' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "canceled" -> PaymentIntentStatus'EnumCanceled | val GHC.Classes.== "processing" -> PaymentIntentStatus'EnumProcessing | val GHC.Classes.== "requires_action" -> PaymentIntentStatus'EnumRequiresAction | val GHC.Classes.== "requires_capture" -> PaymentIntentStatus'EnumRequiresCapture | val GHC.Classes.== "requires_confirmation" -> PaymentIntentStatus'EnumRequiresConfirmation | val GHC.Classes.== "requires_payment_method" -> PaymentIntentStatus'EnumRequiresPaymentMethod | val GHC.Classes.== "succeeded" -> PaymentIntentStatus'EnumSucceeded | GHC.Base.otherwise -> PaymentIntentStatus'Other val ) -- | Defines the object schema located at @components.schemas.payment_intent.properties.transfer_data.anyOf@ in the specification. -- -- The data with which to automatically create a Transfer when the payment is finalized. See the PaymentIntents [use case for connected accounts](https:\\\/\\\/stripe.com\\\/docs\\\/payments\\\/connected-accounts) for details. data PaymentIntentTransferData' = PaymentIntentTransferData' { -- | amount: Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https:\/\/stripe.com\/docs\/currencies\#zero-decimal) (e.g., 100 cents to charge \$1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is \$0.50 US or [equivalent in charge currency](https:\/\/stripe.com\/docs\/currencies\#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of \$999,999.99). paymentIntentTransferData'Amount :: (GHC.Maybe.Maybe GHC.Types.Int), -- | destination: The account (if any) the payment will be attributed to for tax -- reporting, and where funds from the payment will be transferred to upon -- payment success. paymentIntentTransferData'Destination :: (GHC.Maybe.Maybe PaymentIntentTransferData'Destination'Variants) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PaymentIntentTransferData' where toJSON obj = Data.Aeson.Types.Internal.object ("amount" Data.Aeson.Types.ToJSON..= paymentIntentTransferData'Amount obj : "destination" Data.Aeson.Types.ToJSON..= paymentIntentTransferData'Destination obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("amount" Data.Aeson.Types.ToJSON..= paymentIntentTransferData'Amount obj) GHC.Base.<> ("destination" Data.Aeson.Types.ToJSON..= paymentIntentTransferData'Destination obj)) instance Data.Aeson.Types.FromJSON.FromJSON PaymentIntentTransferData' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PaymentIntentTransferData'" (\obj -> (GHC.Base.pure PaymentIntentTransferData' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "amount")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "destination")) -- | Create a new 'PaymentIntentTransferData'' with all required fields. mkPaymentIntentTransferData' :: PaymentIntentTransferData' mkPaymentIntentTransferData' = PaymentIntentTransferData' { paymentIntentTransferData'Amount = GHC.Maybe.Nothing, paymentIntentTransferData'Destination = GHC.Maybe.Nothing } -- | Defines the oneOf schema located at @components.schemas.payment_intent.properties.transfer_data.anyOf.properties.destination.anyOf@ in the specification. -- -- The account (if any) the payment will be attributed to for tax -- reporting, and where funds from the payment will be transferred to upon -- payment success. data PaymentIntentTransferData'Destination'Variants = PaymentIntentTransferData'Destination'Text Data.Text.Internal.Text | PaymentIntentTransferData'Destination'Account Account deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PaymentIntentTransferData'Destination'Variants where toJSON (PaymentIntentTransferData'Destination'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PaymentIntentTransferData'Destination'Account a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON PaymentIntentTransferData'Destination'Variants where parseJSON val = case (PaymentIntentTransferData'Destination'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((PaymentIntentTransferData'Destination'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