here\<\/a>.\<\/p>
--
-- \When \confirm=true\<\/code> is used during creation, it is equivalent to creating
-- and confirming the PaymentIntent in the same call. You may use any parameters
-- available in the \confirm API\<\/a> when \confirm=true\<\/code>
-- is supplied.\<\/p>
postPaymentIntents ::
forall m.
StripeAPI.Common.MonadHTTP m =>
-- | The request body to send
PostPaymentIntentsRequestBody ->
-- | Monadic computation which returns the result of the operation
StripeAPI.Common.ClientT m (Network.HTTP.Client.Types.Response PostPaymentIntentsResponse)
postPaymentIntents body =
GHC.Base.fmap
( \response_0 ->
GHC.Base.fmap
( Data.Either.either PostPaymentIntentsResponseError GHC.Base.id
GHC.Base.. ( \response body ->
if
| (\status_1 -> Network.HTTP.Types.Status.statusCode status_1 GHC.Classes.== 200) (Network.HTTP.Client.Types.responseStatus response) ->
PostPaymentIntentsResponse200
Data.Functor.<$> ( Data.Aeson.eitherDecodeStrict body ::
Data.Either.Either
GHC.Base.String
PaymentIntent
)
| GHC.Base.const GHC.Types.True (Network.HTTP.Client.Types.responseStatus response) ->
PostPaymentIntentsResponseDefault
Data.Functor.<$> ( Data.Aeson.eitherDecodeStrict body ::
Data.Either.Either
GHC.Base.String
Error
)
| GHC.Base.otherwise -> Data.Either.Left "Missing default response type"
)
response_0
)
response_0
)
(StripeAPI.Common.doBodyCallWithConfigurationM (Data.Text.toUpper GHC.Base.$ Data.Text.pack "POST") (Data.Text.pack "/v1/payment_intents") GHC.Base.mempty (GHC.Maybe.Just body) StripeAPI.Common.RequestBodyEncodingFormData)
-- | Defines the object schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema@ in the specification.
data PostPaymentIntentsRequestBody = PostPaymentIntentsRequestBody
{ -- | 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).
postPaymentIntentsRequestBodyAmount :: GHC.Types.Int,
-- | 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).
postPaymentIntentsRequestBodyApplicationFeeAmount :: (GHC.Maybe.Maybe GHC.Types.Int),
-- | capture_method: Controls when the funds will be captured from the customer\'s account.
postPaymentIntentsRequestBodyCaptureMethod :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyCaptureMethod'),
-- | confirm: Set to \`true\` to attempt to [confirm](https:\/\/stripe.com\/docs\/api\/payment_intents\/confirm) this PaymentIntent immediately. This parameter defaults to \`false\`. When creating and confirming a PaymentIntent at the same time, parameters available in the [confirm](https:\/\/stripe.com\/docs\/api\/payment_intents\/confirm) API may also be provided.
postPaymentIntentsRequestBodyConfirm :: (GHC.Maybe.Maybe GHC.Types.Bool),
-- | confirmation_method
postPaymentIntentsRequestBodyConfirmationMethod :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyConfirmationMethod'),
-- | 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).
postPaymentIntentsRequestBodyCurrency :: 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.
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyCustomer :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
-- | description: An arbitrary string attached to the object. Often useful for displaying to users.
--
-- Constraints:
--
-- * Maximum length of 1000
postPaymentIntentsRequestBodyDescription :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
-- | error_on_requires_action: Set to \`true\` to fail the payment attempt if the PaymentIntent transitions into \`requires_action\`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https:\/\/stripe.com\/docs\/payments\/save-card-without-authentication). This parameter can only be used with [\`confirm=true\`](https:\/\/stripe.com\/docs\/api\/payment_intents\/create\#create_payment_intent-confirm).
postPaymentIntentsRequestBodyErrorOnRequiresAction :: (GHC.Maybe.Maybe GHC.Types.Bool),
-- | expand: Specifies which fields in the response should be expanded.
postPaymentIntentsRequestBodyExpand :: (GHC.Maybe.Maybe ([Data.Text.Internal.Text])),
-- | mandate: ID of the mandate to be used for this payment. This parameter can only be used with [\`confirm=true\`](https:\/\/stripe.com\/docs\/api\/payment_intents\/create\#create_payment_intent-confirm).
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyMandate :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
-- | mandate_data: This hash contains details about the Mandate to create. This parameter can only be used with [\`confirm=true\`](https:\/\/stripe.com\/docs\/api\/payment_intents\/create\#create_payment_intent-confirm).
postPaymentIntentsRequestBodyMandateData :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyMandateData'),
-- | metadata: Set of [key-value pairs](https:\/\/stripe.com\/docs\/api\/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to \`metadata\`.
postPaymentIntentsRequestBodyMetadata :: (GHC.Maybe.Maybe Data.Aeson.Types.Internal.Object),
-- | off_session: Set to \`true\` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https:\/\/stripe.com\/docs\/payments\/cards\/charging-saved-cards). This parameter can only be used with [\`confirm=true\`](https:\/\/stripe.com\/docs\/api\/payment_intents\/create\#create_payment_intent-confirm).
postPaymentIntentsRequestBodyOffSession :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyOffSession'Variants),
-- | on_behalf_of: The Stripe account ID for which these funds are intended. For details, see the PaymentIntents [use case for connected accounts](https:\/\/stripe.com\/docs\/payments\/connected-accounts).
postPaymentIntentsRequestBodyOnBehalfOf :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
-- | payment_method: ID of the payment method (a PaymentMethod, Card, or [compatible Source](https:\/\/stripe.com\/docs\/payments\/payment-methods\/transitioning\#compatibility) object) to attach to this PaymentIntent.
--
-- If this parameter is omitted with \`confirm=true\`, \`customer.default_source\` will be attached as this PaymentIntent\'s payment instrument to improve the migration experience for users of the Charges API. We recommend that you explicitly provide the \`payment_method\` going forward.
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyPaymentMethod :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
-- | payment_method_data: If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear
-- in the [payment_method](https:\/\/stripe.com\/docs\/api\/payment_intents\/object\#payment_intent_object-payment_method)
-- property on the PaymentIntent.
postPaymentIntentsRequestBodyPaymentMethodData :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodData'),
-- | payment_method_options: Payment-method-specific configuration for this PaymentIntent.
postPaymentIntentsRequestBodyPaymentMethodOptions :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'),
-- | payment_method_types: The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. If this is not provided, defaults to [\"card\"].
postPaymentIntentsRequestBodyPaymentMethodTypes :: (GHC.Maybe.Maybe ([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).
postPaymentIntentsRequestBodyReceiptEmail :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
-- | return_url: The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method\'s app or site. If you\'d prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [\`confirm=true\`](https:\/\/stripe.com\/docs\/api\/payment_intents\/create\#create_payment_intent-confirm).
postPaymentIntentsRequestBodyReturnUrl :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
-- | 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).
postPaymentIntentsRequestBodySetupFutureUsage :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodySetupFutureUsage'),
-- | shipping: Shipping information for this PaymentIntent.
postPaymentIntentsRequestBodyShipping :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyShipping'),
-- | 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 22
postPaymentIntentsRequestBodyStatementDescriptor :: (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 22
postPaymentIntentsRequestBodyStatementDescriptorSuffix :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
-- | transfer_data: The parameters used to automatically create a Transfer when the payment succeeds.
-- For more information, see the PaymentIntents [use case for connected accounts](https:\/\/stripe.com\/docs\/payments\/connected-accounts).
postPaymentIntentsRequestBodyTransferData :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyTransferData'),
-- | 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.
postPaymentIntentsRequestBodyTransferGroup :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
-- | use_stripe_sdk: Set to \`true\` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps.
postPaymentIntentsRequestBodyUseStripeSdk :: (GHC.Maybe.Maybe GHC.Types.Bool)
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBody where
toJSON obj = Data.Aeson.Types.Internal.object ("amount" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyAmount obj : "application_fee_amount" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyApplicationFeeAmount obj : "capture_method" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyCaptureMethod obj : "confirm" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyConfirm obj : "confirmation_method" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyConfirmationMethod obj : "currency" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyCurrency obj : "customer" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyCustomer obj : "description" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyDescription obj : "error_on_requires_action" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyErrorOnRequiresAction obj : "expand" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyExpand obj : "mandate" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyMandate obj : "mandate_data" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyMandateData obj : "metadata" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyMetadata obj : "off_session" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyOffSession obj : "on_behalf_of" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyOnBehalfOf obj : "payment_method" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethod obj : "payment_method_data" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData obj : "payment_method_options" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions obj : "payment_method_types" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodTypes obj : "receipt_email" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyReceiptEmail obj : "return_url" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyReturnUrl obj : "setup_future_usage" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodySetupFutureUsage obj : "shipping" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyShipping obj : "statement_descriptor" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyStatementDescriptor obj : "statement_descriptor_suffix" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyStatementDescriptorSuffix obj : "transfer_data" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyTransferData obj : "transfer_group" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyTransferGroup obj : "use_stripe_sdk" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyUseStripeSdk obj : GHC.Base.mempty)
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("amount" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyAmount obj) GHC.Base.<> (("application_fee_amount" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyApplicationFeeAmount obj) GHC.Base.<> (("capture_method" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyCaptureMethod obj) GHC.Base.<> (("confirm" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyConfirm obj) GHC.Base.<> (("confirmation_method" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyConfirmationMethod obj) GHC.Base.<> (("currency" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyCurrency obj) GHC.Base.<> (("customer" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyCustomer obj) GHC.Base.<> (("description" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyDescription obj) GHC.Base.<> (("error_on_requires_action" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyErrorOnRequiresAction obj) GHC.Base.<> (("expand" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyExpand obj) GHC.Base.<> (("mandate" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyMandate obj) GHC.Base.<> (("mandate_data" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyMandateData obj) GHC.Base.<> (("metadata" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyMetadata obj) GHC.Base.<> (("off_session" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyOffSession obj) GHC.Base.<> (("on_behalf_of" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyOnBehalfOf obj) GHC.Base.<> (("payment_method" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethod obj) GHC.Base.<> (("payment_method_data" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData obj) GHC.Base.<> (("payment_method_options" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions obj) GHC.Base.<> (("payment_method_types" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodTypes obj) GHC.Base.<> (("receipt_email" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyReceiptEmail obj) GHC.Base.<> (("return_url" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyReturnUrl obj) GHC.Base.<> (("setup_future_usage" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodySetupFutureUsage obj) GHC.Base.<> (("shipping" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyShipping obj) GHC.Base.<> (("statement_descriptor" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyStatementDescriptor obj) GHC.Base.<> (("statement_descriptor_suffix" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyStatementDescriptorSuffix obj) GHC.Base.<> (("transfer_data" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyTransferData obj) GHC.Base.<> (("transfer_group" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyTransferGroup obj) GHC.Base.<> ("use_stripe_sdk" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyUseStripeSdk obj))))))))))))))))))))))))))))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBody where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBody" (\obj -> (((((((((((((((((((((((((((GHC.Base.pure PostPaymentIntentsRequestBody GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "amount")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "application_fee_amount")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "capture_method")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "confirm")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "confirmation_method")) 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..:? "error_on_requires_action")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "expand")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "mandate")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "mandate_data")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "metadata")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "off_session")) 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_data")) 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..:? "return_url")) 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..:? "transfer_data")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "transfer_group")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "use_stripe_sdk"))
-- | Create a new 'PostPaymentIntentsRequestBody' with all required fields.
mkPostPaymentIntentsRequestBody ::
-- | 'postPaymentIntentsRequestBodyAmount'
GHC.Types.Int ->
-- | 'postPaymentIntentsRequestBodyCurrency'
Data.Text.Internal.Text ->
PostPaymentIntentsRequestBody
mkPostPaymentIntentsRequestBody postPaymentIntentsRequestBodyAmount postPaymentIntentsRequestBodyCurrency =
PostPaymentIntentsRequestBody
{ postPaymentIntentsRequestBodyAmount = postPaymentIntentsRequestBodyAmount,
postPaymentIntentsRequestBodyApplicationFeeAmount = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyCaptureMethod = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyConfirm = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyConfirmationMethod = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyCurrency = postPaymentIntentsRequestBodyCurrency,
postPaymentIntentsRequestBodyCustomer = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyDescription = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyErrorOnRequiresAction = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyExpand = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyMandate = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyMandateData = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyMetadata = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyOffSession = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyOnBehalfOf = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethod = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodTypes = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyReceiptEmail = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyReturnUrl = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodySetupFutureUsage = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyShipping = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyStatementDescriptor = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyStatementDescriptorSuffix = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyTransferData = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyTransferGroup = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyUseStripeSdk = GHC.Maybe.Nothing
}
-- | Defines the enum schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.capture_method@ in the specification.
--
-- Controls when the funds will be captured from the customer\'s account.
data PostPaymentIntentsRequestBodyCaptureMethod'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyCaptureMethod'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.
PostPaymentIntentsRequestBodyCaptureMethod'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"automatic"@
PostPaymentIntentsRequestBodyCaptureMethod'EnumAutomatic
| -- | Represents the JSON value @"manual"@
PostPaymentIntentsRequestBodyCaptureMethod'EnumManual
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyCaptureMethod' where
toJSON (PostPaymentIntentsRequestBodyCaptureMethod'Other val) = val
toJSON (PostPaymentIntentsRequestBodyCaptureMethod'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyCaptureMethod'EnumAutomatic) = "automatic"
toJSON (PostPaymentIntentsRequestBodyCaptureMethod'EnumManual) = "manual"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyCaptureMethod' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "automatic" -> PostPaymentIntentsRequestBodyCaptureMethod'EnumAutomatic
| val GHC.Classes.== "manual" -> PostPaymentIntentsRequestBodyCaptureMethod'EnumManual
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyCaptureMethod'Other val
)
-- | Defines the enum schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.confirmation_method@ in the specification.
data PostPaymentIntentsRequestBodyConfirmationMethod'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyConfirmationMethod'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.
PostPaymentIntentsRequestBodyConfirmationMethod'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"automatic"@
PostPaymentIntentsRequestBodyConfirmationMethod'EnumAutomatic
| -- | Represents the JSON value @"manual"@
PostPaymentIntentsRequestBodyConfirmationMethod'EnumManual
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyConfirmationMethod' where
toJSON (PostPaymentIntentsRequestBodyConfirmationMethod'Other val) = val
toJSON (PostPaymentIntentsRequestBodyConfirmationMethod'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyConfirmationMethod'EnumAutomatic) = "automatic"
toJSON (PostPaymentIntentsRequestBodyConfirmationMethod'EnumManual) = "manual"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyConfirmationMethod' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "automatic" -> PostPaymentIntentsRequestBodyConfirmationMethod'EnumAutomatic
| val GHC.Classes.== "manual" -> PostPaymentIntentsRequestBodyConfirmationMethod'EnumManual
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyConfirmationMethod'Other val
)
-- | Defines the object schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.mandate_data@ in the specification.
--
-- This hash contains details about the Mandate to create. This parameter can only be used with [\`confirm=true\`](https:\/\/stripe.com\/docs\/api\/payment_intents\/create\#create_payment_intent-confirm).
data PostPaymentIntentsRequestBodyMandateData' = PostPaymentIntentsRequestBodyMandateData'
{ -- | customer_acceptance
postPaymentIntentsRequestBodyMandateData'CustomerAcceptance :: PostPaymentIntentsRequestBodyMandateData'CustomerAcceptance'
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyMandateData' where
toJSON obj = Data.Aeson.Types.Internal.object ("customer_acceptance" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyMandateData'CustomerAcceptance obj : GHC.Base.mempty)
toEncoding obj = Data.Aeson.Encoding.Internal.pairs ("customer_acceptance" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyMandateData'CustomerAcceptance obj)
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyMandateData' where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyMandateData'" (\obj -> GHC.Base.pure PostPaymentIntentsRequestBodyMandateData' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "customer_acceptance"))
-- | Create a new 'PostPaymentIntentsRequestBodyMandateData'' with all required fields.
mkPostPaymentIntentsRequestBodyMandateData' ::
-- | 'postPaymentIntentsRequestBodyMandateData'CustomerAcceptance'
PostPaymentIntentsRequestBodyMandateData'CustomerAcceptance' ->
PostPaymentIntentsRequestBodyMandateData'
mkPostPaymentIntentsRequestBodyMandateData' postPaymentIntentsRequestBodyMandateData'CustomerAcceptance = PostPaymentIntentsRequestBodyMandateData' {postPaymentIntentsRequestBodyMandateData'CustomerAcceptance = postPaymentIntentsRequestBodyMandateData'CustomerAcceptance}
-- | Defines the object schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.mandate_data.properties.customer_acceptance@ in the specification.
data PostPaymentIntentsRequestBodyMandateData'CustomerAcceptance' = PostPaymentIntentsRequestBodyMandateData'CustomerAcceptance'
{ -- | accepted_at
postPaymentIntentsRequestBodyMandateData'CustomerAcceptance'AcceptedAt :: (GHC.Maybe.Maybe GHC.Types.Int),
-- | offline
postPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Offline :: (GHC.Maybe.Maybe Data.Aeson.Types.Internal.Object),
-- | online
postPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Online :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Online'),
-- | type
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Type :: PostPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Type'
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyMandateData'CustomerAcceptance' where
toJSON obj = Data.Aeson.Types.Internal.object ("accepted_at" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyMandateData'CustomerAcceptance'AcceptedAt obj : "offline" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Offline obj : "online" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Online obj : "type" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Type obj : GHC.Base.mempty)
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("accepted_at" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyMandateData'CustomerAcceptance'AcceptedAt obj) GHC.Base.<> (("offline" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Offline obj) GHC.Base.<> (("online" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Online obj) GHC.Base.<> ("type" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Type obj))))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyMandateData'CustomerAcceptance' where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyMandateData'CustomerAcceptance'" (\obj -> (((GHC.Base.pure PostPaymentIntentsRequestBodyMandateData'CustomerAcceptance' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "accepted_at")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "offline")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "online")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "type"))
-- | Create a new 'PostPaymentIntentsRequestBodyMandateData'CustomerAcceptance'' with all required fields.
mkPostPaymentIntentsRequestBodyMandateData'CustomerAcceptance' ::
-- | 'postPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Type'
PostPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Type' ->
PostPaymentIntentsRequestBodyMandateData'CustomerAcceptance'
mkPostPaymentIntentsRequestBodyMandateData'CustomerAcceptance' postPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Type =
PostPaymentIntentsRequestBodyMandateData'CustomerAcceptance'
{ postPaymentIntentsRequestBodyMandateData'CustomerAcceptance'AcceptedAt = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Offline = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Online = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Type = postPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Type
}
-- | Defines the object schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.mandate_data.properties.customer_acceptance.properties.online@ in the specification.
data PostPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Online' = PostPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Online'
{ -- | ip_address
postPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Online'IpAddress :: Data.Text.Internal.Text,
-- | user_agent
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Online'UserAgent :: Data.Text.Internal.Text
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Online' where
toJSON obj = Data.Aeson.Types.Internal.object ("ip_address" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Online'IpAddress obj : "user_agent" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Online'UserAgent obj : GHC.Base.mempty)
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("ip_address" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Online'IpAddress obj) GHC.Base.<> ("user_agent" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Online'UserAgent obj))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Online' where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Online'" (\obj -> (GHC.Base.pure PostPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Online' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "ip_address")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "user_agent"))
-- | Create a new 'PostPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Online'' with all required fields.
mkPostPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Online' ::
-- | 'postPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Online'IpAddress'
Data.Text.Internal.Text ->
-- | 'postPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Online'UserAgent'
Data.Text.Internal.Text ->
PostPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Online'
mkPostPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Online' postPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Online'IpAddress postPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Online'UserAgent =
PostPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Online'
{ postPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Online'IpAddress = postPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Online'IpAddress,
postPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Online'UserAgent = postPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Online'UserAgent
}
-- | Defines the enum schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.mandate_data.properties.customer_acceptance.properties.type@ in the specification.
data PostPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Type'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyMandateData'CustomerAcceptance'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.
PostPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Type'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"offline"@
PostPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Type'EnumOffline
| -- | Represents the JSON value @"online"@
PostPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Type'EnumOnline
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Type' where
toJSON (PostPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Type'Other val) = val
toJSON (PostPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Type'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Type'EnumOffline) = "offline"
toJSON (PostPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Type'EnumOnline) = "online"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Type' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "offline" -> PostPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Type'EnumOffline
| val GHC.Classes.== "online" -> PostPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Type'EnumOnline
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Type'Other val
)
-- | Defines the enum schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.off_session.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyOffSession'OneOf2
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyOffSession'OneOf2Other Data.Aeson.Types.Internal.Value
| -- | This constructor can be used to send values to the server which are not present in the specification yet.
PostPaymentIntentsRequestBodyOffSession'OneOf2Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"one_off"@
PostPaymentIntentsRequestBodyOffSession'OneOf2EnumOneOff
| -- | Represents the JSON value @"recurring"@
PostPaymentIntentsRequestBodyOffSession'OneOf2EnumRecurring
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyOffSession'OneOf2 where
toJSON (PostPaymentIntentsRequestBodyOffSession'OneOf2Other val) = val
toJSON (PostPaymentIntentsRequestBodyOffSession'OneOf2Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyOffSession'OneOf2EnumOneOff) = "one_off"
toJSON (PostPaymentIntentsRequestBodyOffSession'OneOf2EnumRecurring) = "recurring"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyOffSession'OneOf2 where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "one_off" -> PostPaymentIntentsRequestBodyOffSession'OneOf2EnumOneOff
| val GHC.Classes.== "recurring" -> PostPaymentIntentsRequestBodyOffSession'OneOf2EnumRecurring
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyOffSession'OneOf2Other val
)
-- | Defines the oneOf schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.off_session.anyOf@ in the specification.
--
-- Set to \`true\` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https:\/\/stripe.com\/docs\/payments\/cards\/charging-saved-cards). This parameter can only be used with [\`confirm=true\`](https:\/\/stripe.com\/docs\/api\/payment_intents\/create\#create_payment_intent-confirm).
data PostPaymentIntentsRequestBodyOffSession'Variants
= PostPaymentIntentsRequestBodyOffSession'Bool GHC.Types.Bool
| PostPaymentIntentsRequestBodyOffSession'PostPaymentIntentsRequestBodyOffSession'OneOf2 PostPaymentIntentsRequestBodyOffSession'OneOf2
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyOffSession'Variants where
toJSON (PostPaymentIntentsRequestBodyOffSession'Bool a) = Data.Aeson.Types.ToJSON.toJSON a
toJSON (PostPaymentIntentsRequestBodyOffSession'PostPaymentIntentsRequestBodyOffSession'OneOf2 a) = Data.Aeson.Types.ToJSON.toJSON a
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyOffSession'Variants where
parseJSON val = case (PostPaymentIntentsRequestBodyOffSession'Bool Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((PostPaymentIntentsRequestBodyOffSession'PostPaymentIntentsRequestBodyOffSession'OneOf2 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched") of
Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a
Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a
-- | Defines the object schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_data@ in the specification.
--
-- If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear
-- in the [payment_method](https:\/\/stripe.com\/docs\/api\/payment_intents\/object\#payment_intent_object-payment_method)
-- property on the PaymentIntent.
data PostPaymentIntentsRequestBodyPaymentMethodData' = PostPaymentIntentsRequestBodyPaymentMethodData'
{ -- | acss_debit
postPaymentIntentsRequestBodyPaymentMethodData'AcssDebit :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodData'AcssDebit'),
-- | afterpay_clearpay
postPaymentIntentsRequestBodyPaymentMethodData'AfterpayClearpay :: (GHC.Maybe.Maybe Data.Aeson.Types.Internal.Object),
-- | alipay
postPaymentIntentsRequestBodyPaymentMethodData'Alipay :: (GHC.Maybe.Maybe Data.Aeson.Types.Internal.Object),
-- | au_becs_debit
postPaymentIntentsRequestBodyPaymentMethodData'AuBecsDebit :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodData'AuBecsDebit'),
-- | bacs_debit
postPaymentIntentsRequestBodyPaymentMethodData'BacsDebit :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodData'BacsDebit'),
-- | bancontact
postPaymentIntentsRequestBodyPaymentMethodData'Bancontact :: (GHC.Maybe.Maybe Data.Aeson.Types.Internal.Object),
-- | billing_details
postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'),
-- | boleto
postPaymentIntentsRequestBodyPaymentMethodData'Boleto :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodData'Boleto'),
-- | eps
postPaymentIntentsRequestBodyPaymentMethodData'Eps :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodData'Eps'),
-- | fpx
postPaymentIntentsRequestBodyPaymentMethodData'Fpx :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'),
-- | giropay
postPaymentIntentsRequestBodyPaymentMethodData'Giropay :: (GHC.Maybe.Maybe Data.Aeson.Types.Internal.Object),
-- | grabpay
postPaymentIntentsRequestBodyPaymentMethodData'Grabpay :: (GHC.Maybe.Maybe Data.Aeson.Types.Internal.Object),
-- | ideal
postPaymentIntentsRequestBodyPaymentMethodData'Ideal :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'),
-- | interac_present
postPaymentIntentsRequestBodyPaymentMethodData'InteracPresent :: (GHC.Maybe.Maybe Data.Aeson.Types.Internal.Object),
-- | metadata
postPaymentIntentsRequestBodyPaymentMethodData'Metadata :: (GHC.Maybe.Maybe Data.Aeson.Types.Internal.Object),
-- | oxxo
postPaymentIntentsRequestBodyPaymentMethodData'Oxxo :: (GHC.Maybe.Maybe Data.Aeson.Types.Internal.Object),
-- | p24
postPaymentIntentsRequestBodyPaymentMethodData'P24 :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodData'P24'),
-- | sepa_debit
postPaymentIntentsRequestBodyPaymentMethodData'SepaDebit :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodData'SepaDebit'),
-- | sofort
postPaymentIntentsRequestBodyPaymentMethodData'Sofort :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodData'Sofort'),
-- | type
postPaymentIntentsRequestBodyPaymentMethodData'Type :: PostPaymentIntentsRequestBodyPaymentMethodData'Type'
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodData' where
toJSON obj = Data.Aeson.Types.Internal.object ("acss_debit" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'AcssDebit obj : "afterpay_clearpay" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'AfterpayClearpay obj : "alipay" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Alipay obj : "au_becs_debit" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'AuBecsDebit obj : "bacs_debit" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'BacsDebit obj : "bancontact" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Bancontact obj : "billing_details" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails obj : "boleto" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Boleto obj : "eps" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Eps obj : "fpx" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Fpx obj : "giropay" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Giropay obj : "grabpay" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Grabpay obj : "ideal" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Ideal obj : "interac_present" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'InteracPresent obj : "metadata" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Metadata obj : "oxxo" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Oxxo obj : "p24" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'P24 obj : "sepa_debit" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'SepaDebit obj : "sofort" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Sofort obj : "type" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Type obj : GHC.Base.mempty)
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("acss_debit" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'AcssDebit obj) GHC.Base.<> (("afterpay_clearpay" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'AfterpayClearpay obj) GHC.Base.<> (("alipay" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Alipay obj) GHC.Base.<> (("au_becs_debit" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'AuBecsDebit obj) GHC.Base.<> (("bacs_debit" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'BacsDebit obj) GHC.Base.<> (("bancontact" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Bancontact obj) GHC.Base.<> (("billing_details" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails obj) GHC.Base.<> (("boleto" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Boleto obj) GHC.Base.<> (("eps" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Eps obj) GHC.Base.<> (("fpx" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Fpx obj) GHC.Base.<> (("giropay" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Giropay obj) GHC.Base.<> (("grabpay" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Grabpay obj) GHC.Base.<> (("ideal" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Ideal obj) GHC.Base.<> (("interac_present" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'InteracPresent obj) GHC.Base.<> (("metadata" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Metadata obj) GHC.Base.<> (("oxxo" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Oxxo obj) GHC.Base.<> (("p24" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'P24 obj) GHC.Base.<> (("sepa_debit" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'SepaDebit obj) GHC.Base.<> (("sofort" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Sofort obj) GHC.Base.<> ("type" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Type obj))))))))))))))))))))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodData' where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodData'" (\obj -> (((((((((((((((((((GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodData' 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..:? "au_becs_debit")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "bacs_debit")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "bancontact")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "billing_details")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "boleto")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "eps")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "fpx")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "giropay")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "grabpay")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "ideal")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "interac_present")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "metadata")) 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")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "type"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodData'' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodData' ::
-- | 'postPaymentIntentsRequestBodyPaymentMethodData'Type'
PostPaymentIntentsRequestBodyPaymentMethodData'Type' ->
PostPaymentIntentsRequestBodyPaymentMethodData'
mkPostPaymentIntentsRequestBodyPaymentMethodData' postPaymentIntentsRequestBodyPaymentMethodData'Type =
PostPaymentIntentsRequestBodyPaymentMethodData'
{ postPaymentIntentsRequestBodyPaymentMethodData'AcssDebit = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'AfterpayClearpay = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'Alipay = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'AuBecsDebit = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'BacsDebit = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'Bancontact = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'Boleto = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'Eps = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'Fpx = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'Giropay = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'Grabpay = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'Ideal = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'InteracPresent = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'Metadata = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'Oxxo = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'P24 = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'SepaDebit = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'Sofort = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'Type = postPaymentIntentsRequestBodyPaymentMethodData'Type
}
-- | Defines the object schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_data.properties.acss_debit@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodData'AcssDebit' = PostPaymentIntentsRequestBodyPaymentMethodData'AcssDebit'
{ -- | account_number
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyPaymentMethodData'AcssDebit'AccountNumber :: Data.Text.Internal.Text,
-- | institution_number
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyPaymentMethodData'AcssDebit'InstitutionNumber :: Data.Text.Internal.Text,
-- | transit_number
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyPaymentMethodData'AcssDebit'TransitNumber :: Data.Text.Internal.Text
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodData'AcssDebit' where
toJSON obj = Data.Aeson.Types.Internal.object ("account_number" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'AcssDebit'AccountNumber obj : "institution_number" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'AcssDebit'InstitutionNumber obj : "transit_number" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'AcssDebit'TransitNumber obj : GHC.Base.mempty)
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("account_number" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'AcssDebit'AccountNumber obj) GHC.Base.<> (("institution_number" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'AcssDebit'InstitutionNumber obj) GHC.Base.<> ("transit_number" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'AcssDebit'TransitNumber obj)))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodData'AcssDebit' where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodData'AcssDebit'" (\obj -> ((GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodData'AcssDebit' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "account_number")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "institution_number")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "transit_number"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodData'AcssDebit'' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodData'AcssDebit' ::
-- | 'postPaymentIntentsRequestBodyPaymentMethodData'AcssDebit'AccountNumber'
Data.Text.Internal.Text ->
-- | 'postPaymentIntentsRequestBodyPaymentMethodData'AcssDebit'InstitutionNumber'
Data.Text.Internal.Text ->
-- | 'postPaymentIntentsRequestBodyPaymentMethodData'AcssDebit'TransitNumber'
Data.Text.Internal.Text ->
PostPaymentIntentsRequestBodyPaymentMethodData'AcssDebit'
mkPostPaymentIntentsRequestBodyPaymentMethodData'AcssDebit' postPaymentIntentsRequestBodyPaymentMethodData'AcssDebit'AccountNumber postPaymentIntentsRequestBodyPaymentMethodData'AcssDebit'InstitutionNumber postPaymentIntentsRequestBodyPaymentMethodData'AcssDebit'TransitNumber =
PostPaymentIntentsRequestBodyPaymentMethodData'AcssDebit'
{ postPaymentIntentsRequestBodyPaymentMethodData'AcssDebit'AccountNumber = postPaymentIntentsRequestBodyPaymentMethodData'AcssDebit'AccountNumber,
postPaymentIntentsRequestBodyPaymentMethodData'AcssDebit'InstitutionNumber = postPaymentIntentsRequestBodyPaymentMethodData'AcssDebit'InstitutionNumber,
postPaymentIntentsRequestBodyPaymentMethodData'AcssDebit'TransitNumber = postPaymentIntentsRequestBodyPaymentMethodData'AcssDebit'TransitNumber
}
-- | Defines the object schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_data.properties.au_becs_debit@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodData'AuBecsDebit' = PostPaymentIntentsRequestBodyPaymentMethodData'AuBecsDebit'
{ -- | account_number
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyPaymentMethodData'AuBecsDebit'AccountNumber :: Data.Text.Internal.Text,
-- | bsb_number
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyPaymentMethodData'AuBecsDebit'BsbNumber :: Data.Text.Internal.Text
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodData'AuBecsDebit' where
toJSON obj = Data.Aeson.Types.Internal.object ("account_number" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'AuBecsDebit'AccountNumber obj : "bsb_number" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'AuBecsDebit'BsbNumber obj : GHC.Base.mempty)
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("account_number" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'AuBecsDebit'AccountNumber obj) GHC.Base.<> ("bsb_number" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'AuBecsDebit'BsbNumber obj))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodData'AuBecsDebit' where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodData'AuBecsDebit'" (\obj -> (GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodData'AuBecsDebit' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "account_number")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "bsb_number"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodData'AuBecsDebit'' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodData'AuBecsDebit' ::
-- | 'postPaymentIntentsRequestBodyPaymentMethodData'AuBecsDebit'AccountNumber'
Data.Text.Internal.Text ->
-- | 'postPaymentIntentsRequestBodyPaymentMethodData'AuBecsDebit'BsbNumber'
Data.Text.Internal.Text ->
PostPaymentIntentsRequestBodyPaymentMethodData'AuBecsDebit'
mkPostPaymentIntentsRequestBodyPaymentMethodData'AuBecsDebit' postPaymentIntentsRequestBodyPaymentMethodData'AuBecsDebit'AccountNumber postPaymentIntentsRequestBodyPaymentMethodData'AuBecsDebit'BsbNumber =
PostPaymentIntentsRequestBodyPaymentMethodData'AuBecsDebit'
{ postPaymentIntentsRequestBodyPaymentMethodData'AuBecsDebit'AccountNumber = postPaymentIntentsRequestBodyPaymentMethodData'AuBecsDebit'AccountNumber,
postPaymentIntentsRequestBodyPaymentMethodData'AuBecsDebit'BsbNumber = postPaymentIntentsRequestBodyPaymentMethodData'AuBecsDebit'BsbNumber
}
-- | Defines the object schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_data.properties.bacs_debit@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodData'BacsDebit' = PostPaymentIntentsRequestBodyPaymentMethodData'BacsDebit'
{ -- | account_number
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyPaymentMethodData'BacsDebit'AccountNumber :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
-- | sort_code
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyPaymentMethodData'BacsDebit'SortCode :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodData'BacsDebit' where
toJSON obj = Data.Aeson.Types.Internal.object ("account_number" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'BacsDebit'AccountNumber obj : "sort_code" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'BacsDebit'SortCode obj : GHC.Base.mempty)
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("account_number" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'BacsDebit'AccountNumber obj) GHC.Base.<> ("sort_code" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'BacsDebit'SortCode obj))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodData'BacsDebit' where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodData'BacsDebit'" (\obj -> (GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodData'BacsDebit' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "account_number")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "sort_code"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodData'BacsDebit'' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodData'BacsDebit' :: PostPaymentIntentsRequestBodyPaymentMethodData'BacsDebit'
mkPostPaymentIntentsRequestBodyPaymentMethodData'BacsDebit' =
PostPaymentIntentsRequestBodyPaymentMethodData'BacsDebit'
{ postPaymentIntentsRequestBodyPaymentMethodData'BacsDebit'AccountNumber = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'BacsDebit'SortCode = GHC.Maybe.Nothing
}
-- | Defines the object schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_data.properties.billing_details@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails' = PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'
{ -- | address
postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'Variants),
-- | email
postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Email :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
-- | name
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Name :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
-- | phone
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Phone :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails' where
toJSON obj = Data.Aeson.Types.Internal.object ("address" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address obj : "email" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Email obj : "name" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Name obj : "phone" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Phone obj : GHC.Base.mempty)
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("address" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address obj) GHC.Base.<> (("email" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Email obj) GHC.Base.<> (("name" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Name obj) GHC.Base.<> ("phone" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Phone obj))))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails' where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'" (\obj -> (((GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails' 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"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails' :: PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'
mkPostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails' =
PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'
{ postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Email = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Name = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Phone = GHC.Maybe.Nothing
}
-- | Defines the object schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_data.properties.billing_details.properties.address.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1
{ -- | city
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1City :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
-- | country
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1Country :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
-- | line1
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1Line1 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
-- | line2
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1Line2 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
-- | postal_code
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1PostalCode :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
-- | state
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1State :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1 where
toJSON obj = Data.Aeson.Types.Internal.object ("city" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1City obj : "country" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1Country obj : "line1" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1Line1 obj : "line2" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1Line2 obj : "postal_code" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1PostalCode obj : "state" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1State obj : GHC.Base.mempty)
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("city" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1City obj) GHC.Base.<> (("country" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1Country obj) GHC.Base.<> (("line1" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1Line1 obj) GHC.Base.<> (("line2" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1Line2 obj) GHC.Base.<> (("postal_code" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1PostalCode obj) GHC.Base.<> ("state" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1State obj))))))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1 where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1" (\obj -> (((((GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "city")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "country")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "line1")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "line2")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "postal_code")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "state"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1 :: PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1
mkPostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1 =
PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1
{ postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1City = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1Country = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1Line1 = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1Line2 = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1PostalCode = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1State = GHC.Maybe.Nothing
}
-- | Defines the oneOf schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_data.properties.billing_details.properties.address.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'Variants
= -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'EmptyString
| PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1 PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'Variants where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'EmptyString) = ""
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'Variants where
parseJSON val =
if
| val GHC.Classes.== "" -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'EmptyString
| GHC.Base.otherwise -> case (PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of
Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a
Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a
-- | Defines the object schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_data.properties.boleto@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodData'Boleto' = PostPaymentIntentsRequestBodyPaymentMethodData'Boleto'
{ -- | tax_id
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyPaymentMethodData'Boleto'TaxId :: Data.Text.Internal.Text
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodData'Boleto' where
toJSON obj = Data.Aeson.Types.Internal.object ("tax_id" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Boleto'TaxId obj : GHC.Base.mempty)
toEncoding obj = Data.Aeson.Encoding.Internal.pairs ("tax_id" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Boleto'TaxId obj)
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodData'Boleto' where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodData'Boleto'" (\obj -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodData'Boleto' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "tax_id"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodData'Boleto'' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodData'Boleto' ::
-- | 'postPaymentIntentsRequestBodyPaymentMethodData'Boleto'TaxId'
Data.Text.Internal.Text ->
PostPaymentIntentsRequestBodyPaymentMethodData'Boleto'
mkPostPaymentIntentsRequestBodyPaymentMethodData'Boleto' postPaymentIntentsRequestBodyPaymentMethodData'Boleto'TaxId = PostPaymentIntentsRequestBodyPaymentMethodData'Boleto' {postPaymentIntentsRequestBodyPaymentMethodData'Boleto'TaxId = postPaymentIntentsRequestBodyPaymentMethodData'Boleto'TaxId}
-- | Defines the object schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_data.properties.eps@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodData'Eps' = PostPaymentIntentsRequestBodyPaymentMethodData'Eps'
{ -- | bank
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank')
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodData'Eps' where
toJSON obj = Data.Aeson.Types.Internal.object ("bank" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank obj : GHC.Base.mempty)
toEncoding obj = Data.Aeson.Encoding.Internal.pairs ("bank" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank obj)
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodData'Eps' where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodData'Eps'" (\obj -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodData'Eps' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "bank"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodData'Eps'' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodData'Eps' :: PostPaymentIntentsRequestBodyPaymentMethodData'Eps'
mkPostPaymentIntentsRequestBodyPaymentMethodData'Eps' = PostPaymentIntentsRequestBodyPaymentMethodData'Eps' {postPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank = GHC.Maybe.Nothing}
-- | Defines the enum schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_data.properties.eps.properties.bank@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'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.
PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"arzte_und_apotheker_bank"@
PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumArzteUndApothekerBank
| -- | Represents the JSON value @"austrian_anadi_bank_ag"@
PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumAustrianAnadiBankAg
| -- | Represents the JSON value @"bank_austria"@
PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumBankAustria
| -- | Represents the JSON value @"bankhaus_carl_spangler"@
PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumBankhausCarlSpangler
| -- | Represents the JSON value @"bankhaus_schelhammer_und_schattera_ag"@
PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumBankhausSchelhammerUndSchatteraAg
| -- | Represents the JSON value @"bawag_psk_ag"@
PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumBawagPskAg
| -- | Represents the JSON value @"bks_bank_ag"@
PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumBksBankAg
| -- | Represents the JSON value @"brull_kallmus_bank_ag"@
PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumBrullKallmusBankAg
| -- | Represents the JSON value @"btv_vier_lander_bank"@
PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumBtvVierLanderBank
| -- | Represents the JSON value @"capital_bank_grawe_gruppe_ag"@
PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumCapitalBankGraweGruppeAg
| -- | Represents the JSON value @"dolomitenbank"@
PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumDolomitenbank
| -- | Represents the JSON value @"easybank_ag"@
PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumEasybankAg
| -- | Represents the JSON value @"erste_bank_und_sparkassen"@
PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumErsteBankUndSparkassen
| -- | Represents the JSON value @"hypo_alpeadriabank_international_ag"@
PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumHypoAlpeadriabankInternationalAg
| -- | Represents the JSON value @"hypo_bank_burgenland_aktiengesellschaft"@
PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumHypoBankBurgenlandAktiengesellschaft
| -- | Represents the JSON value @"hypo_noe_lb_fur_niederosterreich_u_wien"@
PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumHypoNoeLbFurNiederosterreichUWien
| -- | Represents the JSON value @"hypo_oberosterreich_salzburg_steiermark"@
PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumHypoOberosterreichSalzburgSteiermark
| -- | Represents the JSON value @"hypo_tirol_bank_ag"@
PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumHypoTirolBankAg
| -- | Represents the JSON value @"hypo_vorarlberg_bank_ag"@
PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumHypoVorarlbergBankAg
| -- | Represents the JSON value @"marchfelder_bank"@
PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumMarchfelderBank
| -- | Represents the JSON value @"oberbank_ag"@
PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumOberbankAg
| -- | Represents the JSON value @"raiffeisen_bankengruppe_osterreich"@
PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumRaiffeisenBankengruppeOsterreich
| -- | Represents the JSON value @"schoellerbank_ag"@
PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumSchoellerbankAg
| -- | Represents the JSON value @"sparda_bank_wien"@
PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumSpardaBankWien
| -- | Represents the JSON value @"volksbank_gruppe"@
PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumVolksbankGruppe
| -- | Represents the JSON value @"volkskreditbank_ag"@
PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumVolkskreditbankAg
| -- | Represents the JSON value @"vr_bank_braunau"@
PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumVrBankBraunau
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumArzteUndApothekerBank) = "arzte_und_apotheker_bank"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumAustrianAnadiBankAg) = "austrian_anadi_bank_ag"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumBankAustria) = "bank_austria"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumBankhausCarlSpangler) = "bankhaus_carl_spangler"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumBankhausSchelhammerUndSchatteraAg) = "bankhaus_schelhammer_und_schattera_ag"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumBawagPskAg) = "bawag_psk_ag"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumBksBankAg) = "bks_bank_ag"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumBrullKallmusBankAg) = "brull_kallmus_bank_ag"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumBtvVierLanderBank) = "btv_vier_lander_bank"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumCapitalBankGraweGruppeAg) = "capital_bank_grawe_gruppe_ag"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumDolomitenbank) = "dolomitenbank"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumEasybankAg) = "easybank_ag"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumErsteBankUndSparkassen) = "erste_bank_und_sparkassen"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumHypoAlpeadriabankInternationalAg) = "hypo_alpeadriabank_international_ag"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumHypoBankBurgenlandAktiengesellschaft) = "hypo_bank_burgenland_aktiengesellschaft"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumHypoNoeLbFurNiederosterreichUWien) = "hypo_noe_lb_fur_niederosterreich_u_wien"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumHypoOberosterreichSalzburgSteiermark) = "hypo_oberosterreich_salzburg_steiermark"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumHypoTirolBankAg) = "hypo_tirol_bank_ag"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumHypoVorarlbergBankAg) = "hypo_vorarlberg_bank_ag"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumMarchfelderBank) = "marchfelder_bank"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumOberbankAg) = "oberbank_ag"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumRaiffeisenBankengruppeOsterreich) = "raiffeisen_bankengruppe_osterreich"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumSchoellerbankAg) = "schoellerbank_ag"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumSpardaBankWien) = "sparda_bank_wien"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumVolksbankGruppe) = "volksbank_gruppe"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumVolkskreditbankAg) = "volkskreditbank_ag"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumVrBankBraunau) = "vr_bank_braunau"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "arzte_und_apotheker_bank" -> PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumArzteUndApothekerBank
| val GHC.Classes.== "austrian_anadi_bank_ag" -> PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumAustrianAnadiBankAg
| val GHC.Classes.== "bank_austria" -> PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumBankAustria
| val GHC.Classes.== "bankhaus_carl_spangler" -> PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumBankhausCarlSpangler
| val GHC.Classes.== "bankhaus_schelhammer_und_schattera_ag" -> PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumBankhausSchelhammerUndSchatteraAg
| val GHC.Classes.== "bawag_psk_ag" -> PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumBawagPskAg
| val GHC.Classes.== "bks_bank_ag" -> PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumBksBankAg
| val GHC.Classes.== "brull_kallmus_bank_ag" -> PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumBrullKallmusBankAg
| val GHC.Classes.== "btv_vier_lander_bank" -> PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumBtvVierLanderBank
| val GHC.Classes.== "capital_bank_grawe_gruppe_ag" -> PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumCapitalBankGraweGruppeAg
| val GHC.Classes.== "dolomitenbank" -> PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumDolomitenbank
| val GHC.Classes.== "easybank_ag" -> PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumEasybankAg
| val GHC.Classes.== "erste_bank_und_sparkassen" -> PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumErsteBankUndSparkassen
| val GHC.Classes.== "hypo_alpeadriabank_international_ag" -> PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumHypoAlpeadriabankInternationalAg
| val GHC.Classes.== "hypo_bank_burgenland_aktiengesellschaft" -> PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumHypoBankBurgenlandAktiengesellschaft
| val GHC.Classes.== "hypo_noe_lb_fur_niederosterreich_u_wien" -> PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumHypoNoeLbFurNiederosterreichUWien
| val GHC.Classes.== "hypo_oberosterreich_salzburg_steiermark" -> PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumHypoOberosterreichSalzburgSteiermark
| val GHC.Classes.== "hypo_tirol_bank_ag" -> PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumHypoTirolBankAg
| val GHC.Classes.== "hypo_vorarlberg_bank_ag" -> PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumHypoVorarlbergBankAg
| val GHC.Classes.== "marchfelder_bank" -> PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumMarchfelderBank
| val GHC.Classes.== "oberbank_ag" -> PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumOberbankAg
| val GHC.Classes.== "raiffeisen_bankengruppe_osterreich" -> PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumRaiffeisenBankengruppeOsterreich
| val GHC.Classes.== "schoellerbank_ag" -> PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumSchoellerbankAg
| val GHC.Classes.== "sparda_bank_wien" -> PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumSpardaBankWien
| val GHC.Classes.== "volksbank_gruppe" -> PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumVolksbankGruppe
| val GHC.Classes.== "volkskreditbank_ag" -> PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumVolkskreditbankAg
| val GHC.Classes.== "vr_bank_braunau" -> PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'EnumVrBankBraunau
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank'Other val
)
-- | Defines the object schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_data.properties.fpx@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodData'Fpx' = PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'
{ -- | bank
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank :: PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodData'Fpx' where
toJSON obj = Data.Aeson.Types.Internal.object ("bank" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank obj : GHC.Base.mempty)
toEncoding obj = Data.Aeson.Encoding.Internal.pairs ("bank" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank obj)
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodData'Fpx' where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'" (\obj -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodData'Fpx' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "bank"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodData'Fpx' ::
-- | 'postPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'
PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank' ->
PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'
mkPostPaymentIntentsRequestBodyPaymentMethodData'Fpx' postPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank = PostPaymentIntentsRequestBodyPaymentMethodData'Fpx' {postPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank = postPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank}
-- | Defines the enum schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_data.properties.fpx.properties.bank@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'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.
PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"affin_bank"@
PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumAffinBank
| -- | Represents the JSON value @"alliance_bank"@
PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumAllianceBank
| -- | Represents the JSON value @"ambank"@
PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumAmbank
| -- | Represents the JSON value @"bank_islam"@
PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumBankIslam
| -- | Represents the JSON value @"bank_muamalat"@
PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumBankMuamalat
| -- | Represents the JSON value @"bank_rakyat"@
PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumBankRakyat
| -- | Represents the JSON value @"bsn"@
PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumBsn
| -- | Represents the JSON value @"cimb"@
PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumCimb
| -- | Represents the JSON value @"deutsche_bank"@
PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumDeutscheBank
| -- | Represents the JSON value @"hong_leong_bank"@
PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumHongLeongBank
| -- | Represents the JSON value @"hsbc"@
PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumHsbc
| -- | Represents the JSON value @"kfh"@
PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumKfh
| -- | Represents the JSON value @"maybank2e"@
PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumMaybank2e
| -- | Represents the JSON value @"maybank2u"@
PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumMaybank2u
| -- | Represents the JSON value @"ocbc"@
PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumOcbc
| -- | Represents the JSON value @"pb_enterprise"@
PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumPbEnterprise
| -- | Represents the JSON value @"public_bank"@
PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumPublicBank
| -- | Represents the JSON value @"rhb"@
PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumRhb
| -- | Represents the JSON value @"standard_chartered"@
PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumStandardChartered
| -- | Represents the JSON value @"uob"@
PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumUob
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumAffinBank) = "affin_bank"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumAllianceBank) = "alliance_bank"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumAmbank) = "ambank"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumBankIslam) = "bank_islam"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumBankMuamalat) = "bank_muamalat"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumBankRakyat) = "bank_rakyat"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumBsn) = "bsn"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumCimb) = "cimb"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumDeutscheBank) = "deutsche_bank"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumHongLeongBank) = "hong_leong_bank"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumHsbc) = "hsbc"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumKfh) = "kfh"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumMaybank2e) = "maybank2e"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumMaybank2u) = "maybank2u"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumOcbc) = "ocbc"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumPbEnterprise) = "pb_enterprise"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumPublicBank) = "public_bank"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumRhb) = "rhb"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumStandardChartered) = "standard_chartered"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumUob) = "uob"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "affin_bank" -> PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumAffinBank
| val GHC.Classes.== "alliance_bank" -> PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumAllianceBank
| val GHC.Classes.== "ambank" -> PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumAmbank
| val GHC.Classes.== "bank_islam" -> PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumBankIslam
| val GHC.Classes.== "bank_muamalat" -> PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumBankMuamalat
| val GHC.Classes.== "bank_rakyat" -> PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumBankRakyat
| val GHC.Classes.== "bsn" -> PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumBsn
| val GHC.Classes.== "cimb" -> PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumCimb
| val GHC.Classes.== "deutsche_bank" -> PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumDeutscheBank
| val GHC.Classes.== "hong_leong_bank" -> PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumHongLeongBank
| val GHC.Classes.== "hsbc" -> PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumHsbc
| val GHC.Classes.== "kfh" -> PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumKfh
| val GHC.Classes.== "maybank2e" -> PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumMaybank2e
| val GHC.Classes.== "maybank2u" -> PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumMaybank2u
| val GHC.Classes.== "ocbc" -> PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumOcbc
| val GHC.Classes.== "pb_enterprise" -> PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumPbEnterprise
| val GHC.Classes.== "public_bank" -> PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumPublicBank
| val GHC.Classes.== "rhb" -> PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumRhb
| val GHC.Classes.== "standard_chartered" -> PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumStandardChartered
| val GHC.Classes.== "uob" -> PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumUob
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'Other val
)
-- | Defines the object schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_data.properties.ideal@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodData'Ideal' = PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'
{ -- | bank
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank')
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodData'Ideal' where
toJSON obj = Data.Aeson.Types.Internal.object ("bank" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank obj : GHC.Base.mempty)
toEncoding obj = Data.Aeson.Encoding.Internal.pairs ("bank" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank obj)
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodData'Ideal' where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'" (\obj -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodData'Ideal' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "bank"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodData'Ideal' :: PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'
mkPostPaymentIntentsRequestBodyPaymentMethodData'Ideal' = PostPaymentIntentsRequestBodyPaymentMethodData'Ideal' {postPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank = GHC.Maybe.Nothing}
-- | Defines the enum schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_data.properties.ideal.properties.bank@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'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.
PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"abn_amro"@
PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'EnumAbnAmro
| -- | Represents the JSON value @"asn_bank"@
PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'EnumAsnBank
| -- | Represents the JSON value @"bunq"@
PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'EnumBunq
| -- | Represents the JSON value @"handelsbanken"@
PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'EnumHandelsbanken
| -- | Represents the JSON value @"ing"@
PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'EnumIng
| -- | Represents the JSON value @"knab"@
PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'EnumKnab
| -- | Represents the JSON value @"moneyou"@
PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'EnumMoneyou
| -- | Represents the JSON value @"rabobank"@
PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'EnumRabobank
| -- | Represents the JSON value @"regiobank"@
PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'EnumRegiobank
| -- | Represents the JSON value @"revolut"@
PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'EnumRevolut
| -- | Represents the JSON value @"sns_bank"@
PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'EnumSnsBank
| -- | Represents the JSON value @"triodos_bank"@
PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'EnumTriodosBank
| -- | Represents the JSON value @"van_lanschot"@
PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'EnumVanLanschot
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'EnumAbnAmro) = "abn_amro"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'EnumAsnBank) = "asn_bank"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'EnumBunq) = "bunq"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'EnumHandelsbanken) = "handelsbanken"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'EnumIng) = "ing"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'EnumKnab) = "knab"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'EnumMoneyou) = "moneyou"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'EnumRabobank) = "rabobank"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'EnumRegiobank) = "regiobank"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'EnumRevolut) = "revolut"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'EnumSnsBank) = "sns_bank"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'EnumTriodosBank) = "triodos_bank"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'EnumVanLanschot) = "van_lanschot"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "abn_amro" -> PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'EnumAbnAmro
| val GHC.Classes.== "asn_bank" -> PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'EnumAsnBank
| val GHC.Classes.== "bunq" -> PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'EnumBunq
| val GHC.Classes.== "handelsbanken" -> PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'EnumHandelsbanken
| val GHC.Classes.== "ing" -> PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'EnumIng
| val GHC.Classes.== "knab" -> PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'EnumKnab
| val GHC.Classes.== "moneyou" -> PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'EnumMoneyou
| val GHC.Classes.== "rabobank" -> PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'EnumRabobank
| val GHC.Classes.== "regiobank" -> PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'EnumRegiobank
| val GHC.Classes.== "revolut" -> PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'EnumRevolut
| val GHC.Classes.== "sns_bank" -> PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'EnumSnsBank
| val GHC.Classes.== "triodos_bank" -> PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'EnumTriodosBank
| val GHC.Classes.== "van_lanschot" -> PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'EnumVanLanschot
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank'Other val
)
-- | Defines the object schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_data.properties.p24@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodData'P24' = PostPaymentIntentsRequestBodyPaymentMethodData'P24'
{ -- | bank
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyPaymentMethodData'P24'Bank :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank')
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodData'P24' where
toJSON obj = Data.Aeson.Types.Internal.object ("bank" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'P24'Bank obj : GHC.Base.mempty)
toEncoding obj = Data.Aeson.Encoding.Internal.pairs ("bank" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'P24'Bank obj)
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodData'P24' where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodData'P24'" (\obj -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodData'P24' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "bank"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodData'P24'' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodData'P24' :: PostPaymentIntentsRequestBodyPaymentMethodData'P24'
mkPostPaymentIntentsRequestBodyPaymentMethodData'P24' = PostPaymentIntentsRequestBodyPaymentMethodData'P24' {postPaymentIntentsRequestBodyPaymentMethodData'P24'Bank = GHC.Maybe.Nothing}
-- | Defines the enum schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_data.properties.p24.properties.bank@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'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.
PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"alior_bank"@
PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumAliorBank
| -- | Represents the JSON value @"bank_millennium"@
PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumBankMillennium
| -- | Represents the JSON value @"bank_nowy_bfg_sa"@
PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumBankNowyBfgSa
| -- | Represents the JSON value @"bank_pekao_sa"@
PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumBankPekaoSa
| -- | Represents the JSON value @"banki_spbdzielcze"@
PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumBankiSpbdzielcze
| -- | Represents the JSON value @"blik"@
PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumBlik
| -- | Represents the JSON value @"bnp_paribas"@
PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumBnpParibas
| -- | Represents the JSON value @"boz"@
PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumBoz
| -- | Represents the JSON value @"citi_handlowy"@
PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumCitiHandlowy
| -- | Represents the JSON value @"credit_agricole"@
PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumCreditAgricole
| -- | Represents the JSON value @"envelobank"@
PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumEnvelobank
| -- | Represents the JSON value @"etransfer_pocztowy24"@
PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumEtransferPocztowy24
| -- | Represents the JSON value @"getin_bank"@
PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumGetinBank
| -- | Represents the JSON value @"ideabank"@
PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumIdeabank
| -- | Represents the JSON value @"ing"@
PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumIng
| -- | Represents the JSON value @"inteligo"@
PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumInteligo
| -- | Represents the JSON value @"mbank_mtransfer"@
PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumMbankMtransfer
| -- | Represents the JSON value @"nest_przelew"@
PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumNestPrzelew
| -- | Represents the JSON value @"noble_pay"@
PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumNoblePay
| -- | Represents the JSON value @"pbac_z_ipko"@
PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumPbacZIpko
| -- | Represents the JSON value @"plus_bank"@
PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumPlusBank
| -- | Represents the JSON value @"santander_przelew24"@
PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumSantanderPrzelew24
| -- | Represents the JSON value @"tmobile_usbugi_bankowe"@
PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumTmobileUsbugiBankowe
| -- | Represents the JSON value @"toyota_bank"@
PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumToyotaBank
| -- | Represents the JSON value @"volkswagen_bank"@
PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumVolkswagenBank
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumAliorBank) = "alior_bank"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumBankMillennium) = "bank_millennium"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumBankNowyBfgSa) = "bank_nowy_bfg_sa"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumBankPekaoSa) = "bank_pekao_sa"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumBankiSpbdzielcze) = "banki_spbdzielcze"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumBlik) = "blik"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumBnpParibas) = "bnp_paribas"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumBoz) = "boz"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumCitiHandlowy) = "citi_handlowy"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumCreditAgricole) = "credit_agricole"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumEnvelobank) = "envelobank"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumEtransferPocztowy24) = "etransfer_pocztowy24"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumGetinBank) = "getin_bank"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumIdeabank) = "ideabank"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumIng) = "ing"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumInteligo) = "inteligo"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumMbankMtransfer) = "mbank_mtransfer"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumNestPrzelew) = "nest_przelew"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumNoblePay) = "noble_pay"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumPbacZIpko) = "pbac_z_ipko"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumPlusBank) = "plus_bank"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumSantanderPrzelew24) = "santander_przelew24"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumTmobileUsbugiBankowe) = "tmobile_usbugi_bankowe"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumToyotaBank) = "toyota_bank"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumVolkswagenBank) = "volkswagen_bank"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "alior_bank" -> PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumAliorBank
| val GHC.Classes.== "bank_millennium" -> PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumBankMillennium
| val GHC.Classes.== "bank_nowy_bfg_sa" -> PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumBankNowyBfgSa
| val GHC.Classes.== "bank_pekao_sa" -> PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumBankPekaoSa
| val GHC.Classes.== "banki_spbdzielcze" -> PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumBankiSpbdzielcze
| val GHC.Classes.== "blik" -> PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumBlik
| val GHC.Classes.== "bnp_paribas" -> PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumBnpParibas
| val GHC.Classes.== "boz" -> PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumBoz
| val GHC.Classes.== "citi_handlowy" -> PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumCitiHandlowy
| val GHC.Classes.== "credit_agricole" -> PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumCreditAgricole
| val GHC.Classes.== "envelobank" -> PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumEnvelobank
| val GHC.Classes.== "etransfer_pocztowy24" -> PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumEtransferPocztowy24
| val GHC.Classes.== "getin_bank" -> PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumGetinBank
| val GHC.Classes.== "ideabank" -> PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumIdeabank
| val GHC.Classes.== "ing" -> PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumIng
| val GHC.Classes.== "inteligo" -> PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumInteligo
| val GHC.Classes.== "mbank_mtransfer" -> PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumMbankMtransfer
| val GHC.Classes.== "nest_przelew" -> PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumNestPrzelew
| val GHC.Classes.== "noble_pay" -> PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumNoblePay
| val GHC.Classes.== "pbac_z_ipko" -> PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumPbacZIpko
| val GHC.Classes.== "plus_bank" -> PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumPlusBank
| val GHC.Classes.== "santander_przelew24" -> PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumSantanderPrzelew24
| val GHC.Classes.== "tmobile_usbugi_bankowe" -> PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumTmobileUsbugiBankowe
| val GHC.Classes.== "toyota_bank" -> PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumToyotaBank
| val GHC.Classes.== "volkswagen_bank" -> PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'EnumVolkswagenBank
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodData'P24'Bank'Other val
)
-- | Defines the object schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_data.properties.sepa_debit@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodData'SepaDebit' = PostPaymentIntentsRequestBodyPaymentMethodData'SepaDebit'
{ -- | iban
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyPaymentMethodData'SepaDebit'Iban :: Data.Text.Internal.Text
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodData'SepaDebit' where
toJSON obj = Data.Aeson.Types.Internal.object ("iban" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'SepaDebit'Iban obj : GHC.Base.mempty)
toEncoding obj = Data.Aeson.Encoding.Internal.pairs ("iban" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'SepaDebit'Iban obj)
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodData'SepaDebit' where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodData'SepaDebit'" (\obj -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodData'SepaDebit' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "iban"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodData'SepaDebit'' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodData'SepaDebit' ::
-- | 'postPaymentIntentsRequestBodyPaymentMethodData'SepaDebit'Iban'
Data.Text.Internal.Text ->
PostPaymentIntentsRequestBodyPaymentMethodData'SepaDebit'
mkPostPaymentIntentsRequestBodyPaymentMethodData'SepaDebit' postPaymentIntentsRequestBodyPaymentMethodData'SepaDebit'Iban = PostPaymentIntentsRequestBodyPaymentMethodData'SepaDebit' {postPaymentIntentsRequestBodyPaymentMethodData'SepaDebit'Iban = postPaymentIntentsRequestBodyPaymentMethodData'SepaDebit'Iban}
-- | Defines the object schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_data.properties.sofort@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodData'Sofort' = PostPaymentIntentsRequestBodyPaymentMethodData'Sofort'
{ -- | country
postPaymentIntentsRequestBodyPaymentMethodData'Sofort'Country :: PostPaymentIntentsRequestBodyPaymentMethodData'Sofort'Country'
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodData'Sofort' where
toJSON obj = Data.Aeson.Types.Internal.object ("country" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Sofort'Country obj : GHC.Base.mempty)
toEncoding obj = Data.Aeson.Encoding.Internal.pairs ("country" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Sofort'Country obj)
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodData'Sofort' where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodData'Sofort'" (\obj -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodData'Sofort' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "country"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodData'Sofort'' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodData'Sofort' ::
-- | 'postPaymentIntentsRequestBodyPaymentMethodData'Sofort'Country'
PostPaymentIntentsRequestBodyPaymentMethodData'Sofort'Country' ->
PostPaymentIntentsRequestBodyPaymentMethodData'Sofort'
mkPostPaymentIntentsRequestBodyPaymentMethodData'Sofort' postPaymentIntentsRequestBodyPaymentMethodData'Sofort'Country = PostPaymentIntentsRequestBodyPaymentMethodData'Sofort' {postPaymentIntentsRequestBodyPaymentMethodData'Sofort'Country = postPaymentIntentsRequestBodyPaymentMethodData'Sofort'Country}
-- | Defines the enum schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_data.properties.sofort.properties.country@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodData'Sofort'Country'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodData'Sofort'Country'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.
PostPaymentIntentsRequestBodyPaymentMethodData'Sofort'Country'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"AT"@
PostPaymentIntentsRequestBodyPaymentMethodData'Sofort'Country'EnumAT
| -- | Represents the JSON value @"BE"@
PostPaymentIntentsRequestBodyPaymentMethodData'Sofort'Country'EnumBE
| -- | Represents the JSON value @"DE"@
PostPaymentIntentsRequestBodyPaymentMethodData'Sofort'Country'EnumDE
| -- | Represents the JSON value @"ES"@
PostPaymentIntentsRequestBodyPaymentMethodData'Sofort'Country'EnumES
| -- | Represents the JSON value @"IT"@
PostPaymentIntentsRequestBodyPaymentMethodData'Sofort'Country'EnumIT
| -- | Represents the JSON value @"NL"@
PostPaymentIntentsRequestBodyPaymentMethodData'Sofort'Country'EnumNL
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodData'Sofort'Country' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Sofort'Country'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Sofort'Country'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Sofort'Country'EnumAT) = "AT"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Sofort'Country'EnumBE) = "BE"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Sofort'Country'EnumDE) = "DE"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Sofort'Country'EnumES) = "ES"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Sofort'Country'EnumIT) = "IT"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Sofort'Country'EnumNL) = "NL"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodData'Sofort'Country' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "AT" -> PostPaymentIntentsRequestBodyPaymentMethodData'Sofort'Country'EnumAT
| val GHC.Classes.== "BE" -> PostPaymentIntentsRequestBodyPaymentMethodData'Sofort'Country'EnumBE
| val GHC.Classes.== "DE" -> PostPaymentIntentsRequestBodyPaymentMethodData'Sofort'Country'EnumDE
| val GHC.Classes.== "ES" -> PostPaymentIntentsRequestBodyPaymentMethodData'Sofort'Country'EnumES
| val GHC.Classes.== "IT" -> PostPaymentIntentsRequestBodyPaymentMethodData'Sofort'Country'EnumIT
| val GHC.Classes.== "NL" -> PostPaymentIntentsRequestBodyPaymentMethodData'Sofort'Country'EnumNL
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodData'Sofort'Country'Other val
)
-- | Defines the enum schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_data.properties.type@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodData'Type'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodData'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.
PostPaymentIntentsRequestBodyPaymentMethodData'Type'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"acss_debit"@
PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumAcssDebit
| -- | Represents the JSON value @"afterpay_clearpay"@
PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumAfterpayClearpay
| -- | Represents the JSON value @"alipay"@
PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumAlipay
| -- | Represents the JSON value @"au_becs_debit"@
PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumAuBecsDebit
| -- | Represents the JSON value @"bacs_debit"@
PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumBacsDebit
| -- | Represents the JSON value @"bancontact"@
PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumBancontact
| -- | Represents the JSON value @"boleto"@
PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumBoleto
| -- | Represents the JSON value @"eps"@
PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumEps
| -- | Represents the JSON value @"fpx"@
PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumFpx
| -- | Represents the JSON value @"giropay"@
PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumGiropay
| -- | Represents the JSON value @"grabpay"@
PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumGrabpay
| -- | Represents the JSON value @"ideal"@
PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumIdeal
| -- | Represents the JSON value @"oxxo"@
PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumOxxo
| -- | Represents the JSON value @"p24"@
PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumP24
| -- | Represents the JSON value @"sepa_debit"@
PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumSepaDebit
| -- | Represents the JSON value @"sofort"@
PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumSofort
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodData'Type' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Type'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Type'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumAcssDebit) = "acss_debit"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumAfterpayClearpay) = "afterpay_clearpay"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumAlipay) = "alipay"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumAuBecsDebit) = "au_becs_debit"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumBacsDebit) = "bacs_debit"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumBancontact) = "bancontact"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumBoleto) = "boleto"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumEps) = "eps"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumFpx) = "fpx"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumGiropay) = "giropay"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumGrabpay) = "grabpay"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumIdeal) = "ideal"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumOxxo) = "oxxo"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumP24) = "p24"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumSepaDebit) = "sepa_debit"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumSofort) = "sofort"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodData'Type' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "acss_debit" -> PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumAcssDebit
| val GHC.Classes.== "afterpay_clearpay" -> PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumAfterpayClearpay
| val GHC.Classes.== "alipay" -> PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumAlipay
| val GHC.Classes.== "au_becs_debit" -> PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumAuBecsDebit
| val GHC.Classes.== "bacs_debit" -> PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumBacsDebit
| val GHC.Classes.== "bancontact" -> PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumBancontact
| val GHC.Classes.== "boleto" -> PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumBoleto
| val GHC.Classes.== "eps" -> PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumEps
| val GHC.Classes.== "fpx" -> PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumFpx
| val GHC.Classes.== "giropay" -> PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumGiropay
| val GHC.Classes.== "grabpay" -> PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumGrabpay
| val GHC.Classes.== "ideal" -> PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumIdeal
| val GHC.Classes.== "oxxo" -> PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumOxxo
| val GHC.Classes.== "p24" -> PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumP24
| val GHC.Classes.== "sepa_debit" -> PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumSepaDebit
| val GHC.Classes.== "sofort" -> PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumSofort
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodData'Type'Other val
)
-- | Defines the object schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_options@ in the specification.
--
-- Payment-method-specific configuration for this PaymentIntent.
data PostPaymentIntentsRequestBodyPaymentMethodOptions' = PostPaymentIntentsRequestBodyPaymentMethodOptions'
{ -- | acss_debit
postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'Variants),
-- | afterpay_clearpay
postPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'Variants),
-- | alipay
postPaymentIntentsRequestBodyPaymentMethodOptions'Alipay :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'Variants),
-- | bancontact
postPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'Variants),
-- | boleto
postPaymentIntentsRequestBodyPaymentMethodOptions'Boleto :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'Variants),
-- | card
postPaymentIntentsRequestBodyPaymentMethodOptions'Card :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'Variants),
-- | card_present
postPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent'Variants),
-- | oxxo
postPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'Variants),
-- | p24
postPaymentIntentsRequestBodyPaymentMethodOptions'P24 :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'P24'Variants),
-- | sepa_debit
postPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'Variants),
-- | sofort
postPaymentIntentsRequestBodyPaymentMethodOptions'Sofort :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'Variants)
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions' where
toJSON obj = Data.Aeson.Types.Internal.object ("acss_debit" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit obj : "afterpay_clearpay" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay obj : "alipay" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Alipay obj : "bancontact" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact obj : "boleto" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Boleto obj : "card" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Card obj : "card_present" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent obj : "oxxo" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo obj : "p24" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'P24 obj : "sepa_debit" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit obj : "sofort" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Sofort obj : GHC.Base.mempty)
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("acss_debit" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit obj) GHC.Base.<> (("afterpay_clearpay" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay obj) GHC.Base.<> (("alipay" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Alipay obj) GHC.Base.<> (("bancontact" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact obj) GHC.Base.<> (("boleto" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Boleto obj) GHC.Base.<> (("card" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Card obj) GHC.Base.<> (("card_present" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent obj) GHC.Base.<> (("oxxo" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo obj) GHC.Base.<> (("p24" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'P24 obj) GHC.Base.<> (("sepa_debit" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit obj) GHC.Base.<> ("sofort" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Sofort obj)))))))))))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions' where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodOptions'" (\obj -> ((((((((((GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions' 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 'PostPaymentIntentsRequestBodyPaymentMethodOptions'' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodOptions' :: PostPaymentIntentsRequestBodyPaymentMethodOptions'
mkPostPaymentIntentsRequestBodyPaymentMethodOptions' =
PostPaymentIntentsRequestBodyPaymentMethodOptions'
{ postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Alipay = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Boleto = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Card = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'P24 = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Sofort = GHC.Maybe.Nothing
}
-- | Defines the object schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_options.properties.acss_debit.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1
{ -- | mandate_options
postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'),
-- | verification_method
postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1VerificationMethod :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1VerificationMethod')
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1 where
toJSON obj = Data.Aeson.Types.Internal.object ("mandate_options" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions obj : "verification_method" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1VerificationMethod obj : GHC.Base.mempty)
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("mandate_options" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions obj) GHC.Base.<> ("verification_method" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1VerificationMethod obj))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1 where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1" (\obj -> (GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "mandate_options")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "verification_method"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1 :: PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1 =
PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1
{ postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1VerificationMethod = GHC.Maybe.Nothing
}
-- | Defines the object schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_options.properties.acss_debit.anyOf.properties.mandate_options@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions' = PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'
{ -- | custom_mandate_url
postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'CustomMandateUrl :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'CustomMandateUrl'Variants),
-- | interval_description
--
-- Constraints:
--
-- * Maximum length of 500
postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'IntervalDescription :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
-- | payment_schedule
postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'PaymentSchedule :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'PaymentSchedule'),
-- | transaction_type
postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'TransactionType :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'TransactionType')
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions' where
toJSON obj = Data.Aeson.Types.Internal.object ("custom_mandate_url" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'CustomMandateUrl obj : "interval_description" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'IntervalDescription obj : "payment_schedule" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'PaymentSchedule obj : "transaction_type" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'TransactionType obj : GHC.Base.mempty)
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("custom_mandate_url" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'CustomMandateUrl obj) GHC.Base.<> (("interval_description" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'IntervalDescription obj) GHC.Base.<> (("payment_schedule" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'PaymentSchedule obj) GHC.Base.<> ("transaction_type" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'TransactionType obj))))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions' where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'" (\obj -> (((GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "custom_mandate_url")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "interval_description")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "payment_schedule")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "transaction_type"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions' :: PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions' =
PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'
{ postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'CustomMandateUrl = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'IntervalDescription = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'PaymentSchedule = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'TransactionType = GHC.Maybe.Nothing
}
-- | Defines the oneOf schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_options.properties.acss_debit.anyOf.properties.mandate_options.properties.custom_mandate_url.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'CustomMandateUrl'Variants
= -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'CustomMandateUrl'EmptyString
| PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'CustomMandateUrl'Text Data.Text.Internal.Text
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'CustomMandateUrl'Variants where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'CustomMandateUrl'Text a) = Data.Aeson.Types.ToJSON.toJSON a
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'CustomMandateUrl'EmptyString) = ""
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'CustomMandateUrl'Variants where
parseJSON val =
if
| val GHC.Classes.== "" -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'CustomMandateUrl'EmptyString
| GHC.Base.otherwise -> case (PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'CustomMandateUrl'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of
Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a
Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a
-- | Defines the enum schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_options.properties.acss_debit.anyOf.properties.mandate_options.properties.payment_schedule@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'PaymentSchedule'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'PaymentSchedule'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.
PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'PaymentSchedule'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"combined"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'PaymentSchedule'EnumCombined
| -- | Represents the JSON value @"interval"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'PaymentSchedule'EnumInterval
| -- | Represents the JSON value @"sporadic"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'PaymentSchedule'EnumSporadic
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'PaymentSchedule' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'PaymentSchedule'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'PaymentSchedule'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'PaymentSchedule'EnumCombined) = "combined"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'PaymentSchedule'EnumInterval) = "interval"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'PaymentSchedule'EnumSporadic) = "sporadic"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'PaymentSchedule' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "combined" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'PaymentSchedule'EnumCombined
| val GHC.Classes.== "interval" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'PaymentSchedule'EnumInterval
| val GHC.Classes.== "sporadic" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'PaymentSchedule'EnumSporadic
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'PaymentSchedule'Other val
)
-- | Defines the enum schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_options.properties.acss_debit.anyOf.properties.mandate_options.properties.transaction_type@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'TransactionType'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'TransactionType'Other Data.Aeson.Types.Internal.Value
| -- | This constructor can be used to send values to the server which are not present in the specification yet.
PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'TransactionType'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"business"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'TransactionType'EnumBusiness
| -- | Represents the JSON value @"personal"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'TransactionType'EnumPersonal
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'TransactionType' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'TransactionType'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'TransactionType'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'TransactionType'EnumBusiness) = "business"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'TransactionType'EnumPersonal) = "personal"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'TransactionType' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "business" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'TransactionType'EnumBusiness
| val GHC.Classes.== "personal" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'TransactionType'EnumPersonal
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'TransactionType'Other val
)
-- | Defines the enum schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_options.properties.acss_debit.anyOf.properties.verification_method@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1VerificationMethod'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1VerificationMethod'Other Data.Aeson.Types.Internal.Value
| -- | This constructor can be used to send values to the server which are not present in the specification yet.
PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1VerificationMethod'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"automatic"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1VerificationMethod'EnumAutomatic
| -- | Represents the JSON value @"instant"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1VerificationMethod'EnumInstant
| -- | Represents the JSON value @"microdeposits"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1VerificationMethod'EnumMicrodeposits
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1VerificationMethod' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1VerificationMethod'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1VerificationMethod'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1VerificationMethod'EnumAutomatic) = "automatic"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1VerificationMethod'EnumInstant) = "instant"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1VerificationMethod'EnumMicrodeposits) = "microdeposits"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1VerificationMethod' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "automatic" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1VerificationMethod'EnumAutomatic
| val GHC.Classes.== "instant" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1VerificationMethod'EnumInstant
| val GHC.Classes.== "microdeposits" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1VerificationMethod'EnumMicrodeposits
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1VerificationMethod'Other val
)
-- | Defines the oneOf schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_options.properties.acss_debit.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'Variants
= -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'EmptyString
| PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1 PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'Variants where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'EmptyString) = ""
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'Variants where
parseJSON val =
if
| val GHC.Classes.== "" -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'EmptyString
| GHC.Base.otherwise -> case (PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of
Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a
Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a
-- | Defines the object schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_options.properties.afterpay_clearpay.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1
{ -- | reference
--
-- Constraints:
--
-- * Maximum length of 128
postPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1Reference :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1 where
toJSON obj = Data.Aeson.Types.Internal.object ("reference" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1Reference obj : GHC.Base.mempty)
toEncoding obj = Data.Aeson.Encoding.Internal.pairs ("reference" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1Reference obj)
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1 where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1" (\obj -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "reference"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1 :: PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1 {postPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1Reference = GHC.Maybe.Nothing}
-- | Defines the oneOf schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_options.properties.afterpay_clearpay.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'Variants
= -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'EmptyString
| PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1 PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'Variants where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'EmptyString) = ""
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'Variants where
parseJSON val =
if
| val GHC.Classes.== "" -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'EmptyString
| GHC.Base.otherwise -> case (PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of
Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a
Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a
-- | Defines the oneOf schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_options.properties.alipay.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'Variants
= -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'EmptyString
| PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'Object Data.Aeson.Types.Internal.Object
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'Variants where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'Object a) = Data.Aeson.Types.ToJSON.toJSON a
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'EmptyString) = ""
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'Variants where
parseJSON val =
if
| val GHC.Classes.== "" -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'EmptyString
| GHC.Base.otherwise -> case (PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'Object Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of
Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a
Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a
-- | Defines the object schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_options.properties.bancontact.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1
{ -- | preferred_language
postPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1PreferredLanguage :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1PreferredLanguage')
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1 where
toJSON obj = Data.Aeson.Types.Internal.object ("preferred_language" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1PreferredLanguage obj : GHC.Base.mempty)
toEncoding obj = Data.Aeson.Encoding.Internal.pairs ("preferred_language" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1PreferredLanguage obj)
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1 where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1" (\obj -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "preferred_language"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1 :: PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1 {postPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1PreferredLanguage = GHC.Maybe.Nothing}
-- | Defines the enum schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_options.properties.bancontact.anyOf.properties.preferred_language@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1PreferredLanguage'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1PreferredLanguage'Other Data.Aeson.Types.Internal.Value
| -- | This constructor can be used to send values to the server which are not present in the specification yet.
PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1PreferredLanguage'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"de"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1PreferredLanguage'EnumDe
| -- | Represents the JSON value @"en"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1PreferredLanguage'EnumEn
| -- | Represents the JSON value @"fr"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1PreferredLanguage'EnumFr
| -- | Represents the JSON value @"nl"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1PreferredLanguage'EnumNl
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1PreferredLanguage' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1PreferredLanguage'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1PreferredLanguage'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1PreferredLanguage'EnumDe) = "de"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1PreferredLanguage'EnumEn) = "en"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1PreferredLanguage'EnumFr) = "fr"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1PreferredLanguage'EnumNl) = "nl"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1PreferredLanguage' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "de" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1PreferredLanguage'EnumDe
| val GHC.Classes.== "en" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1PreferredLanguage'EnumEn
| val GHC.Classes.== "fr" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1PreferredLanguage'EnumFr
| val GHC.Classes.== "nl" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1PreferredLanguage'EnumNl
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1PreferredLanguage'Other val
)
-- | Defines the oneOf schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_options.properties.bancontact.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'Variants
= -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'EmptyString
| PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1 PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'Variants where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'EmptyString) = ""
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'Variants where
parseJSON val =
if
| val GHC.Classes.== "" -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'EmptyString
| GHC.Base.otherwise -> case (PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of
Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a
Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a
-- | Defines the object schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_options.properties.boleto.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1
{ -- | expires_after_days
postPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1ExpiresAfterDays :: (GHC.Maybe.Maybe GHC.Types.Int)
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1 where
toJSON obj = Data.Aeson.Types.Internal.object ("expires_after_days" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1ExpiresAfterDays obj : GHC.Base.mempty)
toEncoding obj = Data.Aeson.Encoding.Internal.pairs ("expires_after_days" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1ExpiresAfterDays obj)
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1 where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1" (\obj -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "expires_after_days"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1 :: PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1 {postPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1ExpiresAfterDays = GHC.Maybe.Nothing}
-- | Defines the oneOf schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_options.properties.boleto.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'Variants
= -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'EmptyString
| PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1 PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'Variants where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'EmptyString) = ""
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'Variants where
parseJSON val =
if
| val GHC.Classes.== "" -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'EmptyString
| GHC.Base.otherwise -> case (PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of
Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a
Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a
-- | Defines the object schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_options.properties.card.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1
{ -- | cvc_token
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1CvcToken :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
-- | installments
postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'),
-- | network
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network'),
-- | request_three_d_secure
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1RequestThreeDSecure :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1RequestThreeDSecure')
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1 where
toJSON obj = Data.Aeson.Types.Internal.object ("cvc_token" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1CvcToken obj : "installments" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments obj : "network" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network obj : "request_three_d_secure" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1RequestThreeDSecure obj : GHC.Base.mempty)
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("cvc_token" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1CvcToken obj) GHC.Base.<> (("installments" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments obj) GHC.Base.<> (("network" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network obj) GHC.Base.<> ("request_three_d_secure" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1RequestThreeDSecure obj))))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1 where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1" (\obj -> (((GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "cvc_token")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "installments")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "network")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "request_three_d_secure"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1 :: PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1 =
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1
{ postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1CvcToken = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1RequestThreeDSecure = GHC.Maybe.Nothing
}
-- | Defines the object schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_options.properties.card.anyOf.properties.installments@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments' = PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'
{ -- | enabled
postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Enabled :: (GHC.Maybe.Maybe GHC.Types.Bool),
-- | plan
postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Plan :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Plan'Variants)
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments' where
toJSON obj = Data.Aeson.Types.Internal.object ("enabled" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Enabled obj : "plan" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Plan obj : GHC.Base.mempty)
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("enabled" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Enabled obj) GHC.Base.<> ("plan" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Plan obj))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments' where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'" (\obj -> (GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "enabled")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "plan"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments' :: PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments' =
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'
{ postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Enabled = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Plan = GHC.Maybe.Nothing
}
-- | Defines the object schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_options.properties.card.anyOf.properties.installments.properties.plan.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Plan'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Plan'OneOf1
{ -- | count
postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Plan'OneOf1Count :: GHC.Types.Int
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Plan'OneOf1 where
toJSON obj = Data.Aeson.Types.Internal.object ("count" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Plan'OneOf1Count obj : "interval" Data.Aeson.Types.ToJSON..= Data.Aeson.Types.Internal.String "month" : "type" Data.Aeson.Types.ToJSON..= Data.Aeson.Types.Internal.String "fixed_count" : GHC.Base.mempty)
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("count" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Plan'OneOf1Count obj) GHC.Base.<> (("interval" Data.Aeson.Types.ToJSON..= Data.Aeson.Types.Internal.String "month") GHC.Base.<> ("type" Data.Aeson.Types.ToJSON..= Data.Aeson.Types.Internal.String "fixed_count")))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Plan'OneOf1 where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Plan'OneOf1" (\obj -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Plan'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "count"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Plan'OneOf1' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Plan'OneOf1 ::
-- | 'postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Plan'OneOf1Count'
GHC.Types.Int ->
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Plan'OneOf1
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Plan'OneOf1 postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Plan'OneOf1Count = PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Plan'OneOf1 {postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Plan'OneOf1Count = postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Plan'OneOf1Count}
-- | Defines the oneOf schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_options.properties.card.anyOf.properties.installments.properties.plan.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Plan'Variants
= -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Plan'EmptyString
| PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Plan'PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Plan'OneOf1 PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Plan'OneOf1
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Plan'Variants where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Plan'PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Plan'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Plan'EmptyString) = ""
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Plan'Variants where
parseJSON val =
if
| val GHC.Classes.== "" -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Plan'EmptyString
| GHC.Base.otherwise -> case (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Plan'PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Plan'OneOf1 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of
Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a
Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a
-- | Defines the enum schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_options.properties.card.anyOf.properties.network@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network'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.
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"amex"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network'EnumAmex
| -- | Represents the JSON value @"cartes_bancaires"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network'EnumCartesBancaires
| -- | Represents the JSON value @"diners"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network'EnumDiners
| -- | Represents the JSON value @"discover"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network'EnumDiscover
| -- | Represents the JSON value @"interac"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network'EnumInterac
| -- | Represents the JSON value @"jcb"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network'EnumJcb
| -- | Represents the JSON value @"mastercard"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network'EnumMastercard
| -- | Represents the JSON value @"unionpay"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network'EnumUnionpay
| -- | Represents the JSON value @"unknown"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network'EnumUnknown
| -- | Represents the JSON value @"visa"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network'EnumVisa
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network'EnumAmex) = "amex"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network'EnumCartesBancaires) = "cartes_bancaires"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network'EnumDiners) = "diners"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network'EnumDiscover) = "discover"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network'EnumInterac) = "interac"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network'EnumJcb) = "jcb"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network'EnumMastercard) = "mastercard"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network'EnumUnionpay) = "unionpay"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network'EnumUnknown) = "unknown"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network'EnumVisa) = "visa"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "amex" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network'EnumAmex
| val GHC.Classes.== "cartes_bancaires" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network'EnumCartesBancaires
| val GHC.Classes.== "diners" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network'EnumDiners
| val GHC.Classes.== "discover" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network'EnumDiscover
| val GHC.Classes.== "interac" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network'EnumInterac
| val GHC.Classes.== "jcb" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network'EnumJcb
| val GHC.Classes.== "mastercard" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network'EnumMastercard
| val GHC.Classes.== "unionpay" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network'EnumUnionpay
| val GHC.Classes.== "unknown" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network'EnumUnknown
| val GHC.Classes.== "visa" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network'EnumVisa
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network'Other val
)
-- | Defines the enum schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_options.properties.card.anyOf.properties.request_three_d_secure@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1RequestThreeDSecure'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1RequestThreeDSecure'Other Data.Aeson.Types.Internal.Value
| -- | This constructor can be used to send values to the server which are not present in the specification yet.
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1RequestThreeDSecure'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"any"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1RequestThreeDSecure'EnumAny
| -- | Represents the JSON value @"automatic"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1RequestThreeDSecure'EnumAutomatic
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1RequestThreeDSecure' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1RequestThreeDSecure'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1RequestThreeDSecure'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1RequestThreeDSecure'EnumAny) = "any"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1RequestThreeDSecure'EnumAutomatic) = "automatic"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1RequestThreeDSecure' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "any" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1RequestThreeDSecure'EnumAny
| val GHC.Classes.== "automatic" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1RequestThreeDSecure'EnumAutomatic
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1RequestThreeDSecure'Other val
)
-- | Defines the oneOf schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_options.properties.card.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'Variants
= -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'EmptyString
| PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1 PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'Variants where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'EmptyString) = ""
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'Variants where
parseJSON val =
if
| val GHC.Classes.== "" -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'EmptyString
| GHC.Base.otherwise -> case (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of
Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a
Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a
-- | Defines the oneOf schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_options.properties.card_present.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent'Variants
= -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent'EmptyString
| PostPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent'Object Data.Aeson.Types.Internal.Object
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent'Variants where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent'Object a) = Data.Aeson.Types.ToJSON.toJSON a
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent'EmptyString) = ""
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent'Variants where
parseJSON val =
if
| val GHC.Classes.== "" -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent'EmptyString
| GHC.Base.otherwise -> case (PostPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent'Object Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of
Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a
Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a
-- | Defines the object schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_options.properties.oxxo.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'OneOf1
{ -- | expires_after_days
postPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'OneOf1ExpiresAfterDays :: (GHC.Maybe.Maybe GHC.Types.Int)
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'OneOf1 where
toJSON obj = Data.Aeson.Types.Internal.object ("expires_after_days" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'OneOf1ExpiresAfterDays obj : GHC.Base.mempty)
toEncoding obj = Data.Aeson.Encoding.Internal.pairs ("expires_after_days" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'OneOf1ExpiresAfterDays obj)
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'OneOf1 where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'OneOf1" (\obj -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "expires_after_days"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'OneOf1' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'OneOf1 :: PostPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'OneOf1
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'OneOf1 {postPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'OneOf1ExpiresAfterDays = GHC.Maybe.Nothing}
-- | Defines the oneOf schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_options.properties.oxxo.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'Variants
= -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'EmptyString
| PostPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'PostPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'OneOf1 PostPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'OneOf1
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'Variants where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'PostPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'EmptyString) = ""
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'Variants where
parseJSON val =
if
| val GHC.Classes.== "" -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'EmptyString
| GHC.Base.otherwise -> case (PostPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'PostPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'OneOf1 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of
Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a
Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a
-- | Defines the object schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_options.properties.p24.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'P24'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'P24'OneOf1
{ -- | tos_shown_and_accepted
postPaymentIntentsRequestBodyPaymentMethodOptions'P24'OneOf1TosShownAndAccepted :: (GHC.Maybe.Maybe GHC.Types.Bool)
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'P24'OneOf1 where
toJSON obj = Data.Aeson.Types.Internal.object ("tos_shown_and_accepted" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'P24'OneOf1TosShownAndAccepted obj : GHC.Base.mempty)
toEncoding obj = Data.Aeson.Encoding.Internal.pairs ("tos_shown_and_accepted" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'P24'OneOf1TosShownAndAccepted obj)
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'P24'OneOf1 where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodOptions'P24'OneOf1" (\obj -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'P24'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "tos_shown_and_accepted"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodOptions'P24'OneOf1' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'P24'OneOf1 :: PostPaymentIntentsRequestBodyPaymentMethodOptions'P24'OneOf1
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'P24'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'P24'OneOf1 {postPaymentIntentsRequestBodyPaymentMethodOptions'P24'OneOf1TosShownAndAccepted = GHC.Maybe.Nothing}
-- | Defines the oneOf schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_options.properties.p24.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'P24'Variants
= -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'P24'EmptyString
| PostPaymentIntentsRequestBodyPaymentMethodOptions'P24'PostPaymentIntentsRequestBodyPaymentMethodOptions'P24'OneOf1 PostPaymentIntentsRequestBodyPaymentMethodOptions'P24'OneOf1
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'P24'Variants where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'P24'PostPaymentIntentsRequestBodyPaymentMethodOptions'P24'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'P24'EmptyString) = ""
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'P24'Variants where
parseJSON val =
if
| val GHC.Classes.== "" -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'P24'EmptyString
| GHC.Base.otherwise -> case (PostPaymentIntentsRequestBodyPaymentMethodOptions'P24'PostPaymentIntentsRequestBodyPaymentMethodOptions'P24'OneOf1 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of
Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a
Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a
-- | Defines the object schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_options.properties.sepa_debit.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1
{ -- | mandate_options
postPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1MandateOptions :: (GHC.Maybe.Maybe Data.Aeson.Types.Internal.Object)
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1 where
toJSON obj = Data.Aeson.Types.Internal.object ("mandate_options" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1MandateOptions obj : GHC.Base.mempty)
toEncoding obj = Data.Aeson.Encoding.Internal.pairs ("mandate_options" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1MandateOptions obj)
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1 where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1" (\obj -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "mandate_options"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1 :: PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1 {postPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1MandateOptions = GHC.Maybe.Nothing}
-- | Defines the oneOf schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_options.properties.sepa_debit.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'Variants
= -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'EmptyString
| PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1 PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'Variants where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'EmptyString) = ""
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'Variants where
parseJSON val =
if
| val GHC.Classes.== "" -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'EmptyString
| GHC.Base.otherwise -> case (PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of
Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a
Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a
-- | Defines the object schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_options.properties.sofort.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1
{ -- | preferred_language
postPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1PreferredLanguage :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1PreferredLanguage')
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1 where
toJSON obj = Data.Aeson.Types.Internal.object ("preferred_language" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1PreferredLanguage obj : GHC.Base.mempty)
toEncoding obj = Data.Aeson.Encoding.Internal.pairs ("preferred_language" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1PreferredLanguage obj)
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1 where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1" (\obj -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "preferred_language"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1 :: PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1 {postPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1PreferredLanguage = GHC.Maybe.Nothing}
-- | Defines the enum schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_options.properties.sofort.anyOf.properties.preferred_language@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1PreferredLanguage'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1PreferredLanguage'Other Data.Aeson.Types.Internal.Value
| -- | This constructor can be used to send values to the server which are not present in the specification yet.
PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1PreferredLanguage'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"de"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1PreferredLanguage'EnumDe
| -- | Represents the JSON value @"en"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1PreferredLanguage'EnumEn
| -- | Represents the JSON value @"es"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1PreferredLanguage'EnumEs
| -- | Represents the JSON value @"fr"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1PreferredLanguage'EnumFr
| -- | Represents the JSON value @"it"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1PreferredLanguage'EnumIt
| -- | Represents the JSON value @"nl"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1PreferredLanguage'EnumNl
| -- | Represents the JSON value @"pl"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1PreferredLanguage'EnumPl
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1PreferredLanguage' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1PreferredLanguage'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1PreferredLanguage'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1PreferredLanguage'EnumDe) = "de"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1PreferredLanguage'EnumEn) = "en"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1PreferredLanguage'EnumEs) = "es"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1PreferredLanguage'EnumFr) = "fr"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1PreferredLanguage'EnumIt) = "it"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1PreferredLanguage'EnumNl) = "nl"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1PreferredLanguage'EnumPl) = "pl"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1PreferredLanguage' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "de" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1PreferredLanguage'EnumDe
| val GHC.Classes.== "en" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1PreferredLanguage'EnumEn
| val GHC.Classes.== "es" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1PreferredLanguage'EnumEs
| val GHC.Classes.== "fr" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1PreferredLanguage'EnumFr
| val GHC.Classes.== "it" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1PreferredLanguage'EnumIt
| val GHC.Classes.== "nl" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1PreferredLanguage'EnumNl
| val GHC.Classes.== "pl" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1PreferredLanguage'EnumPl
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1PreferredLanguage'Other val
)
-- | Defines the oneOf schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_options.properties.sofort.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'Variants
= -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'EmptyString
| PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1 PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'Variants where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'EmptyString) = ""
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'Variants where
parseJSON val =
if
| val GHC.Classes.== "" -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'EmptyString
| GHC.Base.otherwise -> case (PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of
Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a
Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a
-- | Defines the enum schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.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 PostPaymentIntentsRequestBodySetupFutureUsage'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodySetupFutureUsage'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.
PostPaymentIntentsRequestBodySetupFutureUsage'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"off_session"@
PostPaymentIntentsRequestBodySetupFutureUsage'EnumOffSession
| -- | Represents the JSON value @"on_session"@
PostPaymentIntentsRequestBodySetupFutureUsage'EnumOnSession
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodySetupFutureUsage' where
toJSON (PostPaymentIntentsRequestBodySetupFutureUsage'Other val) = val
toJSON (PostPaymentIntentsRequestBodySetupFutureUsage'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodySetupFutureUsage'EnumOffSession) = "off_session"
toJSON (PostPaymentIntentsRequestBodySetupFutureUsage'EnumOnSession) = "on_session"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodySetupFutureUsage' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "off_session" -> PostPaymentIntentsRequestBodySetupFutureUsage'EnumOffSession
| val GHC.Classes.== "on_session" -> PostPaymentIntentsRequestBodySetupFutureUsage'EnumOnSession
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodySetupFutureUsage'Other val
)
-- | Defines the object schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.shipping@ in the specification.
--
-- Shipping information for this PaymentIntent.
data PostPaymentIntentsRequestBodyShipping' = PostPaymentIntentsRequestBodyShipping'
{ -- | address
postPaymentIntentsRequestBodyShipping'Address :: PostPaymentIntentsRequestBodyShipping'Address',
-- | carrier
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyShipping'Carrier :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
-- | name
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyShipping'Name :: Data.Text.Internal.Text,
-- | phone
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyShipping'Phone :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
-- | tracking_number
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyShipping'TrackingNumber :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyShipping' where
toJSON obj = Data.Aeson.Types.Internal.object ("address" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyShipping'Address obj : "carrier" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyShipping'Carrier obj : "name" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyShipping'Name obj : "phone" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyShipping'Phone obj : "tracking_number" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyShipping'TrackingNumber obj : GHC.Base.mempty)
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("address" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyShipping'Address obj) GHC.Base.<> (("carrier" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyShipping'Carrier obj) GHC.Base.<> (("name" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyShipping'Name obj) GHC.Base.<> (("phone" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyShipping'Phone obj) GHC.Base.<> ("tracking_number" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyShipping'TrackingNumber obj)))))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyShipping' where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyShipping'" (\obj -> ((((GHC.Base.pure PostPaymentIntentsRequestBodyShipping' 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 'PostPaymentIntentsRequestBodyShipping'' with all required fields.
mkPostPaymentIntentsRequestBodyShipping' ::
-- | 'postPaymentIntentsRequestBodyShipping'Address'
PostPaymentIntentsRequestBodyShipping'Address' ->
-- | 'postPaymentIntentsRequestBodyShipping'Name'
Data.Text.Internal.Text ->
PostPaymentIntentsRequestBodyShipping'
mkPostPaymentIntentsRequestBodyShipping' postPaymentIntentsRequestBodyShipping'Address postPaymentIntentsRequestBodyShipping'Name =
PostPaymentIntentsRequestBodyShipping'
{ postPaymentIntentsRequestBodyShipping'Address = postPaymentIntentsRequestBodyShipping'Address,
postPaymentIntentsRequestBodyShipping'Carrier = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyShipping'Name = postPaymentIntentsRequestBodyShipping'Name,
postPaymentIntentsRequestBodyShipping'Phone = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyShipping'TrackingNumber = GHC.Maybe.Nothing
}
-- | Defines the object schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.shipping.properties.address@ in the specification.
data PostPaymentIntentsRequestBodyShipping'Address' = PostPaymentIntentsRequestBodyShipping'Address'
{ -- | city
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyShipping'Address'City :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
-- | country
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyShipping'Address'Country :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
-- | line1
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyShipping'Address'Line1 :: Data.Text.Internal.Text,
-- | line2
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyShipping'Address'Line2 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
-- | postal_code
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyShipping'Address'PostalCode :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
-- | state
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyShipping'Address'State :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyShipping'Address' where
toJSON obj = Data.Aeson.Types.Internal.object ("city" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyShipping'Address'City obj : "country" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyShipping'Address'Country obj : "line1" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyShipping'Address'Line1 obj : "line2" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyShipping'Address'Line2 obj : "postal_code" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyShipping'Address'PostalCode obj : "state" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyShipping'Address'State obj : GHC.Base.mempty)
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("city" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyShipping'Address'City obj) GHC.Base.<> (("country" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyShipping'Address'Country obj) GHC.Base.<> (("line1" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyShipping'Address'Line1 obj) GHC.Base.<> (("line2" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyShipping'Address'Line2 obj) GHC.Base.<> (("postal_code" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyShipping'Address'PostalCode obj) GHC.Base.<> ("state" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyShipping'Address'State obj))))))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyShipping'Address' where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyShipping'Address'" (\obj -> (((((GHC.Base.pure PostPaymentIntentsRequestBodyShipping'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 'PostPaymentIntentsRequestBodyShipping'Address'' with all required fields.
mkPostPaymentIntentsRequestBodyShipping'Address' ::
-- | 'postPaymentIntentsRequestBodyShipping'Address'Line1'
Data.Text.Internal.Text ->
PostPaymentIntentsRequestBodyShipping'Address'
mkPostPaymentIntentsRequestBodyShipping'Address' postPaymentIntentsRequestBodyShipping'Address'Line1 =
PostPaymentIntentsRequestBodyShipping'Address'
{ postPaymentIntentsRequestBodyShipping'Address'City = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyShipping'Address'Country = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyShipping'Address'Line1 = postPaymentIntentsRequestBodyShipping'Address'Line1,
postPaymentIntentsRequestBodyShipping'Address'Line2 = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyShipping'Address'PostalCode = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyShipping'Address'State = GHC.Maybe.Nothing
}
-- | Defines the object schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.transfer_data@ in the specification.
--
-- The parameters used to automatically create a Transfer when the payment succeeds.
-- For more information, see the PaymentIntents [use case for connected accounts](https:\/\/stripe.com\/docs\/payments\/connected-accounts).
data PostPaymentIntentsRequestBodyTransferData' = PostPaymentIntentsRequestBodyTransferData'
{ -- | amount
postPaymentIntentsRequestBodyTransferData'Amount :: (GHC.Maybe.Maybe GHC.Types.Int),
-- | destination
postPaymentIntentsRequestBodyTransferData'Destination :: Data.Text.Internal.Text
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyTransferData' where
toJSON obj = Data.Aeson.Types.Internal.object ("amount" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyTransferData'Amount obj : "destination" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyTransferData'Destination obj : GHC.Base.mempty)
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("amount" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyTransferData'Amount obj) GHC.Base.<> ("destination" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyTransferData'Destination obj))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyTransferData' where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyTransferData'" (\obj -> (GHC.Base.pure PostPaymentIntentsRequestBodyTransferData' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "amount")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "destination"))
-- | Create a new 'PostPaymentIntentsRequestBodyTransferData'' with all required fields.
mkPostPaymentIntentsRequestBodyTransferData' ::
-- | 'postPaymentIntentsRequestBodyTransferData'Destination'
Data.Text.Internal.Text ->
PostPaymentIntentsRequestBodyTransferData'
mkPostPaymentIntentsRequestBodyTransferData' postPaymentIntentsRequestBodyTransferData'Destination =
PostPaymentIntentsRequestBodyTransferData'
{ postPaymentIntentsRequestBodyTransferData'Amount = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyTransferData'Destination = postPaymentIntentsRequestBodyTransferData'Destination
}
-- | Represents a response of the operation 'postPaymentIntents'.
--
-- The response constructor is chosen by the status code of the response. If no case matches (no specific case for the response code, no range case, no default case), 'PostPaymentIntentsResponseError' is used.
data PostPaymentIntentsResponse
= -- | Means either no matching case available or a parse error
PostPaymentIntentsResponseError GHC.Base.String
| -- | Successful response.
PostPaymentIntentsResponse200 PaymentIntent
| -- | Error response.
PostPaymentIntentsResponseDefault Error
deriving (GHC.Show.Show, GHC.Classes.Eq)