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),
-- | automatic_payment_methods: When enabled, this PaymentIntent will accept payment methods that you have enabled in the Dashboard and are compatible with this PaymentIntent\'s other parameters.
postPaymentIntentsRequestBodyAutomaticPaymentMethods :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyAutomaticPaymentMethods'),
-- | 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\"]. Use automatic_payment_methods to manage payment methods from the [Stripe Dashboard](https:\/\/dashboard.stripe.com\/settings\/payment_methods).
postPaymentIntentsRequestBodyPaymentMethodTypes :: (GHC.Maybe.Maybe ([Data.Text.Internal.Text])),
-- | radar_options: Options to configure Radar. See [Radar Session](https:\/\/stripe.com\/docs\/radar\/radar-session) for more information.
postPaymentIntentsRequestBodyRadarOptions :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyRadarOptions'),
-- | 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 (Data.Foldable.concat (["amount" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyAmount obj] : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("application_fee_amount" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyApplicationFeeAmount obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("automatic_payment_methods" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyAutomaticPaymentMethods obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("capture_method" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyCaptureMethod obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("confirm" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyConfirm obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("confirmation_method" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyConfirmationMethod obj) : ["currency" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyCurrency obj] : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("customer" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyCustomer obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("description" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyDescription obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("error_on_requires_action" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyErrorOnRequiresAction obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("expand" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyExpand obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("mandate" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyMandate obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("mandate_data" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyMandateData obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("metadata" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyMetadata obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("off_session" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyOffSession obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("on_behalf_of" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyOnBehalfOf obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("payment_method" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethod obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("payment_method_data" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("payment_method_options" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("payment_method_types" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodTypes obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("radar_options" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyRadarOptions obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("receipt_email" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyReceiptEmail obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("return_url" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyReturnUrl obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodySetupFutureUsage obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("shipping" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyShipping obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("statement_descriptor" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyStatementDescriptor obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("statement_descriptor_suffix" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyStatementDescriptorSuffix obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("transfer_data" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyTransferData obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("transfer_group" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyTransferGroup obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("use_stripe_sdk" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyUseStripeSdk obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (["amount" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyAmount obj] : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("application_fee_amount" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyApplicationFeeAmount obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("automatic_payment_methods" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyAutomaticPaymentMethods obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("capture_method" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyCaptureMethod obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("confirm" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyConfirm obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("confirmation_method" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyConfirmationMethod obj) : ["currency" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyCurrency obj] : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("customer" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyCustomer obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("description" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyDescription obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("error_on_requires_action" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyErrorOnRequiresAction obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("expand" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyExpand obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("mandate" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyMandate obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("mandate_data" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyMandateData obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("metadata" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyMetadata obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("off_session" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyOffSession obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("on_behalf_of" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyOnBehalfOf obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("payment_method" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethod obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("payment_method_data" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("payment_method_options" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("payment_method_types" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodTypes obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("radar_options" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyRadarOptions obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("receipt_email" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyReceiptEmail obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("return_url" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyReturnUrl obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodySetupFutureUsage obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("shipping" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyShipping obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("statement_descriptor" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyStatementDescriptor obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("statement_descriptor_suffix" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyStatementDescriptorSuffix obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("transfer_data" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyTransferData obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("transfer_group" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyTransferGroup obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("use_stripe_sdk" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyUseStripeSdk obj) : GHC.Base.mempty)))
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..:! "automatic_payment_methods")) 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..:! "radar_options")) 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,
postPaymentIntentsRequestBodyAutomaticPaymentMethods = 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,
postPaymentIntentsRequestBodyRadarOptions = 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 object schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.automatic_payment_methods@ in the specification.
--
-- When enabled, this PaymentIntent will accept payment methods that you have enabled in the Dashboard and are compatible with this PaymentIntent\'s other parameters.
data PostPaymentIntentsRequestBodyAutomaticPaymentMethods' = PostPaymentIntentsRequestBodyAutomaticPaymentMethods'
{ -- | enabled
postPaymentIntentsRequestBodyAutomaticPaymentMethods'Enabled :: GHC.Types.Bool
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyAutomaticPaymentMethods' where
toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (["enabled" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyAutomaticPaymentMethods'Enabled obj] : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (["enabled" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyAutomaticPaymentMethods'Enabled obj] : GHC.Base.mempty)))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyAutomaticPaymentMethods' where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyAutomaticPaymentMethods'" (\obj -> GHC.Base.pure PostPaymentIntentsRequestBodyAutomaticPaymentMethods' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "enabled"))
-- | Create a new 'PostPaymentIntentsRequestBodyAutomaticPaymentMethods'' with all required fields.
mkPostPaymentIntentsRequestBodyAutomaticPaymentMethods' ::
-- | 'postPaymentIntentsRequestBodyAutomaticPaymentMethods'Enabled'
GHC.Types.Bool ->
PostPaymentIntentsRequestBodyAutomaticPaymentMethods'
mkPostPaymentIntentsRequestBodyAutomaticPaymentMethods' postPaymentIntentsRequestBodyAutomaticPaymentMethods'Enabled = PostPaymentIntentsRequestBodyAutomaticPaymentMethods' {postPaymentIntentsRequestBodyAutomaticPaymentMethods'Enabled = postPaymentIntentsRequestBodyAutomaticPaymentMethods'Enabled}
-- | 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 (Data.Foldable.concat (["customer_acceptance" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyMandateData'CustomerAcceptance obj] : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (["customer_acceptance" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyMandateData'CustomerAcceptance obj] : GHC.Base.mempty)))
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 (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("accepted_at" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyMandateData'CustomerAcceptance'AcceptedAt obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("offline" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Offline obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("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 (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("accepted_at" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyMandateData'CustomerAcceptance'AcceptedAt obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("offline" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Offline obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("online" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Online obj) : ["type" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyMandateData'CustomerAcceptance'Type obj] : GHC.Base.mempty)))
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 (Data.Foldable.concat (["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 (GHC.Base.mconcat (Data.Foldable.concat (["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)))
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'),
-- | affirm
postPaymentIntentsRequestBodyPaymentMethodData'Affirm :: (GHC.Maybe.Maybe Data.Aeson.Types.Internal.Object),
-- | 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'),
-- | customer_balance
postPaymentIntentsRequestBodyPaymentMethodData'CustomerBalance :: (GHC.Maybe.Maybe Data.Aeson.Types.Internal.Object),
-- | 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),
-- | klarna
postPaymentIntentsRequestBodyPaymentMethodData'Klarna :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodData'Klarna'),
-- | konbini
postPaymentIntentsRequestBodyPaymentMethodData'Konbini :: (GHC.Maybe.Maybe Data.Aeson.Types.Internal.Object),
-- | link
postPaymentIntentsRequestBodyPaymentMethodData'Link :: (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'),
-- | paynow
postPaymentIntentsRequestBodyPaymentMethodData'Paynow :: (GHC.Maybe.Maybe Data.Aeson.Types.Internal.Object),
-- | promptpay
postPaymentIntentsRequestBodyPaymentMethodData'Promptpay :: (GHC.Maybe.Maybe Data.Aeson.Types.Internal.Object),
-- | radar_options
postPaymentIntentsRequestBodyPaymentMethodData'RadarOptions :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodData'RadarOptions'),
-- | sepa_debit
postPaymentIntentsRequestBodyPaymentMethodData'SepaDebit :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodData'SepaDebit'),
-- | sofort
postPaymentIntentsRequestBodyPaymentMethodData'Sofort :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodData'Sofort'),
-- | type
postPaymentIntentsRequestBodyPaymentMethodData'Type :: PostPaymentIntentsRequestBodyPaymentMethodData'Type',
-- | us_bank_account
postPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'),
-- | wechat_pay
postPaymentIntentsRequestBodyPaymentMethodData'WechatPay :: (GHC.Maybe.Maybe Data.Aeson.Types.Internal.Object)
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodData' where
toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("acss_debit" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'AcssDebit obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("affirm" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'Affirm obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("afterpay_clearpay" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'AfterpayClearpay obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("alipay" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'Alipay obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("au_becs_debit" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'AuBecsDebit obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("bacs_debit" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'BacsDebit obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("bancontact" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'Bancontact obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("billing_details" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("boleto" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'Boleto obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("customer_balance" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'CustomerBalance obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("eps" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'Eps obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("fpx" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'Fpx obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("giropay" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'Giropay obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("grabpay" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'Grabpay obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("ideal" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'Ideal obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("interac_present" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'InteracPresent obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("klarna" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'Klarna obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("konbini" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'Konbini obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("link" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'Link obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("metadata" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'Metadata obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("oxxo" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'Oxxo obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("p24" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'P24 obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("paynow" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'Paynow obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("promptpay" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'Promptpay obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("radar_options" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'RadarOptions obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("sepa_debit" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'SepaDebit obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("sofort" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'Sofort obj) : ["type" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Type obj] : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("us_bank_account" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("wechat_pay" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'WechatPay obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("acss_debit" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'AcssDebit obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("affirm" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'Affirm obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("afterpay_clearpay" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'AfterpayClearpay obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("alipay" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'Alipay obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("au_becs_debit" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'AuBecsDebit obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("bacs_debit" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'BacsDebit obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("bancontact" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'Bancontact obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("billing_details" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("boleto" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'Boleto obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("customer_balance" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'CustomerBalance obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("eps" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'Eps obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("fpx" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'Fpx obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("giropay" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'Giropay obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("grabpay" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'Grabpay obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("ideal" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'Ideal obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("interac_present" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'InteracPresent obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("klarna" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'Klarna obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("konbini" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'Konbini obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("link" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'Link obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("metadata" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'Metadata obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("oxxo" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'Oxxo obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("p24" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'P24 obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("paynow" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'Paynow obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("promptpay" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'Promptpay obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("radar_options" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'RadarOptions obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("sepa_debit" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'SepaDebit obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("sofort" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'Sofort obj) : ["type" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Type obj] : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("us_bank_account" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("wechat_pay" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'WechatPay obj) : GHC.Base.mempty)))
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..:! "affirm")) 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..:! "customer_balance")) 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..:! "klarna")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "konbini")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "link")) 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..:! "paynow")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "promptpay")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "radar_options")) 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")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "us_bank_account")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "wechat_pay"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodData'' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodData' ::
-- | 'postPaymentIntentsRequestBodyPaymentMethodData'Type'
PostPaymentIntentsRequestBodyPaymentMethodData'Type' ->
PostPaymentIntentsRequestBodyPaymentMethodData'
mkPostPaymentIntentsRequestBodyPaymentMethodData' postPaymentIntentsRequestBodyPaymentMethodData'Type =
PostPaymentIntentsRequestBodyPaymentMethodData'
{ postPaymentIntentsRequestBodyPaymentMethodData'AcssDebit = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'Affirm = 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'CustomerBalance = 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'Klarna = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'Konbini = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'Link = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'Metadata = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'Oxxo = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'P24 = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'Paynow = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'Promptpay = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'RadarOptions = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'SepaDebit = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'Sofort = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'Type = postPaymentIntentsRequestBodyPaymentMethodData'Type,
postPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'WechatPay = 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.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 (Data.Foldable.concat (["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 (GHC.Base.mconcat (Data.Foldable.concat (["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)))
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 (Data.Foldable.concat (["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 (GHC.Base.mconcat (Data.Foldable.concat (["account_number" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'AuBecsDebit'AccountNumber obj] : ["bsb_number" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'AuBecsDebit'BsbNumber obj] : GHC.Base.mempty)))
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 (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("account_number" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'BacsDebit'AccountNumber obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("sort_code" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'BacsDebit'SortCode obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("account_number" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'BacsDebit'AccountNumber obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("sort_code" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'BacsDebit'SortCode obj) : GHC.Base.mempty)))
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 PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Email'Variants),
-- | 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 (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("address" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("email" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Email obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("name" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Name obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("phone" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Phone obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("address" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("email" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Email obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("name" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Name obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("phone" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Phone obj) : GHC.Base.mempty)))
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 (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("city" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1City obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("country" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1Country obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("line1" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1Line1 obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("line2" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1Line2 obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("postal_code" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1PostalCode obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("state" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1State obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("city" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1City obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("country" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1Country obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("line1" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1Line1 obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("line2" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1Line2 obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("postal_code" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1PostalCode obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("state" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Address'OneOf1State obj) : GHC.Base.mempty)))
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 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.email.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Email'Variants
= -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Email'EmptyString
| PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Email'Text Data.Text.Internal.Text
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Email'Variants where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Email'Text a) = Data.Aeson.Types.ToJSON.toJSON a
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Email'EmptyString) = ""
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Email'Variants where
parseJSON val =
if
| val GHC.Classes.== "" -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Email'EmptyString
| GHC.Base.otherwise -> case (PostPaymentIntentsRequestBodyPaymentMethodData'BillingDetails'Email'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 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 (Data.Foldable.concat (["tax_id" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Boleto'TaxId obj] : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (["tax_id" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Boleto'TaxId obj] : GHC.Base.mempty)))
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 (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("bank" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("bank" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'Eps'Bank obj) : GHC.Base.mempty)))
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 (Data.Foldable.concat (["bank" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank obj] : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (["bank" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank obj] : GHC.Base.mempty)))
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 @"agrobank"@
PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumAgrobank
| -- | 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'EnumAgrobank) = "agrobank"
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.== "agrobank" -> PostPaymentIntentsRequestBodyPaymentMethodData'Fpx'Bank'EnumAgrobank
| 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 (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("bank" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("bank" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'Ideal'Bank obj) : GHC.Base.mempty)))
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.klarna@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodData'Klarna' = PostPaymentIntentsRequestBodyPaymentMethodData'Klarna'
{ -- | dob
postPaymentIntentsRequestBodyPaymentMethodData'Klarna'Dob :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodData'Klarna'Dob')
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodData'Klarna' where
toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("dob" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'Klarna'Dob obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("dob" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'Klarna'Dob obj) : GHC.Base.mempty)))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodData'Klarna' where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodData'Klarna'" (\obj -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodData'Klarna' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "dob"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodData'Klarna'' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodData'Klarna' :: PostPaymentIntentsRequestBodyPaymentMethodData'Klarna'
mkPostPaymentIntentsRequestBodyPaymentMethodData'Klarna' = PostPaymentIntentsRequestBodyPaymentMethodData'Klarna' {postPaymentIntentsRequestBodyPaymentMethodData'Klarna'Dob = 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.klarna.properties.dob@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodData'Klarna'Dob' = PostPaymentIntentsRequestBodyPaymentMethodData'Klarna'Dob'
{ -- | day
postPaymentIntentsRequestBodyPaymentMethodData'Klarna'Dob'Day :: GHC.Types.Int,
-- | month
postPaymentIntentsRequestBodyPaymentMethodData'Klarna'Dob'Month :: GHC.Types.Int,
-- | year
postPaymentIntentsRequestBodyPaymentMethodData'Klarna'Dob'Year :: GHC.Types.Int
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodData'Klarna'Dob' where
toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (["day" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Klarna'Dob'Day obj] : ["month" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Klarna'Dob'Month obj] : ["year" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Klarna'Dob'Year obj] : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (["day" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Klarna'Dob'Day obj] : ["month" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Klarna'Dob'Month obj] : ["year" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Klarna'Dob'Year obj] : GHC.Base.mempty)))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodData'Klarna'Dob' where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodData'Klarna'Dob'" (\obj -> ((GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodData'Klarna'Dob' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "day")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "month")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "year"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodData'Klarna'Dob'' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodData'Klarna'Dob' ::
-- | 'postPaymentIntentsRequestBodyPaymentMethodData'Klarna'Dob'Day'
GHC.Types.Int ->
-- | 'postPaymentIntentsRequestBodyPaymentMethodData'Klarna'Dob'Month'
GHC.Types.Int ->
-- | 'postPaymentIntentsRequestBodyPaymentMethodData'Klarna'Dob'Year'
GHC.Types.Int ->
PostPaymentIntentsRequestBodyPaymentMethodData'Klarna'Dob'
mkPostPaymentIntentsRequestBodyPaymentMethodData'Klarna'Dob' postPaymentIntentsRequestBodyPaymentMethodData'Klarna'Dob'Day postPaymentIntentsRequestBodyPaymentMethodData'Klarna'Dob'Month postPaymentIntentsRequestBodyPaymentMethodData'Klarna'Dob'Year =
PostPaymentIntentsRequestBodyPaymentMethodData'Klarna'Dob'
{ postPaymentIntentsRequestBodyPaymentMethodData'Klarna'Dob'Day = postPaymentIntentsRequestBodyPaymentMethodData'Klarna'Dob'Day,
postPaymentIntentsRequestBodyPaymentMethodData'Klarna'Dob'Month = postPaymentIntentsRequestBodyPaymentMethodData'Klarna'Dob'Month,
postPaymentIntentsRequestBodyPaymentMethodData'Klarna'Dob'Year = postPaymentIntentsRequestBodyPaymentMethodData'Klarna'Dob'Year
}
-- | 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
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 (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("bank" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'P24'Bank obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("bank" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'P24'Bank obj) : GHC.Base.mempty)))
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.radar_options@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodData'RadarOptions' = PostPaymentIntentsRequestBodyPaymentMethodData'RadarOptions'
{ -- | session
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyPaymentMethodData'RadarOptions'Session :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodData'RadarOptions' where
toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("session" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'RadarOptions'Session obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("session" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'RadarOptions'Session obj) : GHC.Base.mempty)))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodData'RadarOptions' where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodData'RadarOptions'" (\obj -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodData'RadarOptions' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "session"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodData'RadarOptions'' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodData'RadarOptions' :: PostPaymentIntentsRequestBodyPaymentMethodData'RadarOptions'
mkPostPaymentIntentsRequestBodyPaymentMethodData'RadarOptions' = PostPaymentIntentsRequestBodyPaymentMethodData'RadarOptions' {postPaymentIntentsRequestBodyPaymentMethodData'RadarOptions'Session = 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.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 (Data.Foldable.concat (["iban" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'SepaDebit'Iban obj] : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (["iban" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'SepaDebit'Iban obj] : GHC.Base.mempty)))
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 (Data.Foldable.concat (["country" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Sofort'Country obj] : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (["country" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodData'Sofort'Country obj] : GHC.Base.mempty)))
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 @"affirm"@
PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumAffirm
| -- | 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 @"customer_balance"@
PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumCustomerBalance
| -- | 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 @"klarna"@
PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumKlarna
| -- | Represents the JSON value @"konbini"@
PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumKonbini
| -- | Represents the JSON value @"link"@
PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumLink
| -- | Represents the JSON value @"oxxo"@
PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumOxxo
| -- | Represents the JSON value @"p24"@
PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumP24
| -- | Represents the JSON value @"paynow"@
PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumPaynow
| -- | Represents the JSON value @"promptpay"@
PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumPromptpay
| -- | Represents the JSON value @"sepa_debit"@
PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumSepaDebit
| -- | Represents the JSON value @"sofort"@
PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumSofort
| -- | Represents the JSON value @"us_bank_account"@
PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumUsBankAccount
| -- | Represents the JSON value @"wechat_pay"@
PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumWechatPay
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'EnumAffirm) = "affirm"
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'EnumCustomerBalance) = "customer_balance"
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'EnumKlarna) = "klarna"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumKonbini) = "konbini"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumLink) = "link"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumOxxo) = "oxxo"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumP24) = "p24"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumPaynow) = "paynow"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumPromptpay) = "promptpay"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumSepaDebit) = "sepa_debit"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumSofort) = "sofort"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumUsBankAccount) = "us_bank_account"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumWechatPay) = "wechat_pay"
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.== "affirm" -> PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumAffirm
| 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.== "customer_balance" -> PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumCustomerBalance
| 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.== "klarna" -> PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumKlarna
| val GHC.Classes.== "konbini" -> PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumKonbini
| val GHC.Classes.== "link" -> PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumLink
| val GHC.Classes.== "oxxo" -> PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumOxxo
| val GHC.Classes.== "p24" -> PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumP24
| val GHC.Classes.== "paynow" -> PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumPaynow
| val GHC.Classes.== "promptpay" -> PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumPromptpay
| val GHC.Classes.== "sepa_debit" -> PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumSepaDebit
| val GHC.Classes.== "sofort" -> PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumSofort
| val GHC.Classes.== "us_bank_account" -> PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumUsBankAccount
| val GHC.Classes.== "wechat_pay" -> PostPaymentIntentsRequestBodyPaymentMethodData'Type'EnumWechatPay
| 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_data.properties.us_bank_account@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount' = PostPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'
{ -- | account_holder_type
postPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'AccountHolderType :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'AccountHolderType'),
-- | account_number
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'AccountNumber :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
-- | account_type
postPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'AccountType :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'AccountType'),
-- | financial_connections_account
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'FinancialConnectionsAccount :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
-- | routing_number
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'RoutingNumber :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount' where
toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("account_holder_type" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'AccountHolderType obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("account_number" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'AccountNumber obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("account_type" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'AccountType obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("financial_connections_account" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'FinancialConnectionsAccount obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("routing_number" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'RoutingNumber obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("account_holder_type" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'AccountHolderType obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("account_number" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'AccountNumber obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("account_type" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'AccountType obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("financial_connections_account" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'FinancialConnectionsAccount obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("routing_number" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'RoutingNumber obj) : GHC.Base.mempty)))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount' where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'" (\obj -> ((((GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "account_holder_type")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "account_number")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "account_type")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "financial_connections_account")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "routing_number"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount' :: PostPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'
mkPostPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount' =
PostPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'
{ postPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'AccountHolderType = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'AccountNumber = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'AccountType = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'FinancialConnectionsAccount = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'RoutingNumber = 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.us_bank_account.properties.account_holder_type@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'AccountHolderType'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'AccountHolderType'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'UsBankAccount'AccountHolderType'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"company"@
PostPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'AccountHolderType'EnumCompany
| -- | Represents the JSON value @"individual"@
PostPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'AccountHolderType'EnumIndividual
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'AccountHolderType' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'AccountHolderType'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'AccountHolderType'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'AccountHolderType'EnumCompany) = "company"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'AccountHolderType'EnumIndividual) = "individual"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'AccountHolderType' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "company" -> PostPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'AccountHolderType'EnumCompany
| val GHC.Classes.== "individual" -> PostPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'AccountHolderType'EnumIndividual
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'AccountHolderType'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.us_bank_account.properties.account_type@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'AccountType'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'AccountType'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'UsBankAccount'AccountType'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"checking"@
PostPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'AccountType'EnumChecking
| -- | Represents the JSON value @"savings"@
PostPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'AccountType'EnumSavings
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'AccountType' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'AccountType'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'AccountType'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'AccountType'EnumChecking) = "checking"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'AccountType'EnumSavings) = "savings"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'AccountType' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "checking" -> PostPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'AccountType'EnumChecking
| val GHC.Classes.== "savings" -> PostPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'AccountType'EnumSavings
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodData'UsBankAccount'AccountType'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),
-- | affirm
postPaymentIntentsRequestBodyPaymentMethodOptions'Affirm :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'Variants),
-- | afterpay_clearpay
postPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'Variants),
-- | alipay
postPaymentIntentsRequestBodyPaymentMethodOptions'Alipay :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'Variants),
-- | au_becs_debit
postPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'Variants),
-- | bacs_debit
postPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'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),
-- | customer_balance
postPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'Variants),
-- | eps
postPaymentIntentsRequestBodyPaymentMethodOptions'Eps :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Eps'Variants),
-- | fpx
postPaymentIntentsRequestBodyPaymentMethodOptions'Fpx :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Fpx'Variants),
-- | giropay
postPaymentIntentsRequestBodyPaymentMethodOptions'Giropay :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Giropay'Variants),
-- | grabpay
postPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay'Variants),
-- | ideal
postPaymentIntentsRequestBodyPaymentMethodOptions'Ideal :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'Variants),
-- | interac_present
postPaymentIntentsRequestBodyPaymentMethodOptions'InteracPresent :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'InteracPresent'Variants),
-- | klarna
postPaymentIntentsRequestBodyPaymentMethodOptions'Klarna :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'Variants),
-- | konbini
postPaymentIntentsRequestBodyPaymentMethodOptions'Konbini :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'Variants),
-- | link
postPaymentIntentsRequestBodyPaymentMethodOptions'Link :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'Variants),
-- | oxxo
postPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'Variants),
-- | p24
postPaymentIntentsRequestBodyPaymentMethodOptions'P24 :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'P24'Variants),
-- | paynow
postPaymentIntentsRequestBodyPaymentMethodOptions'Paynow :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Paynow'Variants),
-- | promptpay
postPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay'Variants),
-- | sepa_debit
postPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'Variants),
-- | sofort
postPaymentIntentsRequestBodyPaymentMethodOptions'Sofort :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'Variants),
-- | us_bank_account
postPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'Variants),
-- | wechat_pay
postPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'Variants)
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions' where
toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("acss_debit" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("affirm" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Affirm obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("afterpay_clearpay" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("alipay" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Alipay obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("au_becs_debit" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("bacs_debit" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("bancontact" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("boleto" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Boleto obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("card" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Card obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("card_present" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("customer_balance" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("eps" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Eps obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("fpx" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Fpx obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("giropay" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Giropay obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("grabpay" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("ideal" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Ideal obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("interac_present" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'InteracPresent obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("klarna" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Klarna obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("konbini" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Konbini obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("link" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Link obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("oxxo" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("p24" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'P24 obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("paynow" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Paynow obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("promptpay" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("sepa_debit" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("sofort" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Sofort obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("us_bank_account" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("wechat_pay" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("acss_debit" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("affirm" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Affirm obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("afterpay_clearpay" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("alipay" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Alipay obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("au_becs_debit" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("bacs_debit" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("bancontact" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("boleto" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Boleto obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("card" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Card obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("card_present" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("customer_balance" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("eps" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Eps obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("fpx" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Fpx obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("giropay" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Giropay obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("grabpay" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("ideal" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Ideal obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("interac_present" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'InteracPresent obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("klarna" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Klarna obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("konbini" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Konbini obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("link" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Link obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("oxxo" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("p24" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'P24 obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("paynow" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Paynow obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("promptpay" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("sepa_debit" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("sofort" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Sofort obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("us_bank_account" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("wechat_pay" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay obj) : GHC.Base.mempty)))
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..:! "affirm")) 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..:! "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..:! "customer_balance")) 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..:! "klarna")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "konbini")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "link")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "oxxo")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "p24")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "paynow")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "promptpay")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "sepa_debit")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "sofort")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "us_bank_account")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "wechat_pay"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodOptions'' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodOptions' :: PostPaymentIntentsRequestBodyPaymentMethodOptions'
mkPostPaymentIntentsRequestBodyPaymentMethodOptions' =
PostPaymentIntentsRequestBodyPaymentMethodOptions'
{ postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Affirm = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Alipay = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Boleto = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Card = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Eps = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Fpx = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Giropay = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Ideal = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'InteracPresent = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Klarna = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Konbini = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Link = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'P24 = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Paynow = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Sofort = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay = 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'),
-- | setup_future_usage
postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1SetupFutureUsage :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1SetupFutureUsage'),
-- | 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 (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("mandate_options" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1SetupFutureUsage obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("verification_method" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1VerificationMethod obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("mandate_options" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1SetupFutureUsage obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("verification_method" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1VerificationMethod obj) : GHC.Base.mempty)))
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..:! "setup_future_usage")) 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'OneOf1SetupFutureUsage = 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 (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("custom_mandate_url" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'CustomMandateUrl obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("interval_description" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'IntervalDescription obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("payment_schedule" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'PaymentSchedule obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("transaction_type" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'TransactionType obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("custom_mandate_url" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'CustomMandateUrl obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("interval_description" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'IntervalDescription obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("payment_schedule" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'PaymentSchedule obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("transaction_type" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1MandateOptions'TransactionType obj) : GHC.Base.mempty)))
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.setup_future_usage@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1SetupFutureUsage'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1SetupFutureUsage'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'OneOf1SetupFutureUsage'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1SetupFutureUsage'EnumEmptyString
| -- | Represents the JSON value @"none"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1SetupFutureUsage'EnumNone
| -- | Represents the JSON value @"off_session"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1SetupFutureUsage'EnumOffSession
| -- | Represents the JSON value @"on_session"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1SetupFutureUsage'EnumOnSession
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1SetupFutureUsage' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1SetupFutureUsage'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1SetupFutureUsage'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1SetupFutureUsage'EnumEmptyString) = ""
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1SetupFutureUsage'EnumNone) = "none"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1SetupFutureUsage'EnumOffSession) = "off_session"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1SetupFutureUsage'EnumOnSession) = "on_session"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1SetupFutureUsage' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1SetupFutureUsage'EnumEmptyString
| val GHC.Classes.== "none" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1SetupFutureUsage'EnumNone
| val GHC.Classes.== "off_session" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1SetupFutureUsage'EnumOffSession
| val GHC.Classes.== "on_session" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1SetupFutureUsage'EnumOnSession
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'AcssDebit'OneOf1SetupFutureUsage'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.affirm.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1
{ -- | capture_method
postPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1CaptureMethod :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1CaptureMethod'),
-- | setup_future_usage
postPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1SetupFutureUsage :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1SetupFutureUsage')
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1 where
toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("capture_method" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1CaptureMethod obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1SetupFutureUsage obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("capture_method" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1CaptureMethod obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1SetupFutureUsage obj) : GHC.Base.mempty)))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1 where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1" (\obj -> (GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "capture_method")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "setup_future_usage"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1 :: PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1 =
PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1
{ postPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1CaptureMethod = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1SetupFutureUsage = 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.affirm.anyOf.properties.capture_method@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1CaptureMethod'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1CaptureMethod'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'Affirm'OneOf1CaptureMethod'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1CaptureMethod'EnumEmptyString
| -- | Represents the JSON value @"manual"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1CaptureMethod'EnumManual
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1CaptureMethod' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1CaptureMethod'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1CaptureMethod'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1CaptureMethod'EnumEmptyString) = ""
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1CaptureMethod'EnumManual) = "manual"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1CaptureMethod' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1CaptureMethod'EnumEmptyString
| val GHC.Classes.== "manual" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1CaptureMethod'EnumManual
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1CaptureMethod'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.affirm.anyOf.properties.setup_future_usage@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1SetupFutureUsage'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1SetupFutureUsage'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'Affirm'OneOf1SetupFutureUsage'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"none"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1SetupFutureUsage'EnumNone
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1SetupFutureUsage' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1SetupFutureUsage'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1SetupFutureUsage'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1SetupFutureUsage'EnumNone) = "none"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1SetupFutureUsage' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "none" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1SetupFutureUsage'EnumNone
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1SetupFutureUsage'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.affirm.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'Variants
= -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'EmptyString
| PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1 PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'Variants where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'EmptyString) = ""
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'Variants where
parseJSON val =
if
| val GHC.Classes.== "" -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'EmptyString
| GHC.Base.otherwise -> case (PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'PostPaymentIntentsRequestBodyPaymentMethodOptions'Affirm'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
{ -- | capture_method
postPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1CaptureMethod :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1CaptureMethod'),
-- | reference
--
-- Constraints:
--
-- * Maximum length of 128
postPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1Reference :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
-- | setup_future_usage
postPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1SetupFutureUsage :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1SetupFutureUsage')
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1 where
toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("capture_method" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1CaptureMethod obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("reference" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1Reference obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1SetupFutureUsage obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("capture_method" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1CaptureMethod obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("reference" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1Reference obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1SetupFutureUsage obj) : GHC.Base.mempty)))
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..:! "capture_method")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "reference")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "setup_future_usage"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1 :: PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1 =
PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1
{ postPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1CaptureMethod = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1Reference = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1SetupFutureUsage = 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.afterpay_clearpay.anyOf.properties.capture_method@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1CaptureMethod'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1CaptureMethod'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'AfterpayClearpay'OneOf1CaptureMethod'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1CaptureMethod'EnumEmptyString
| -- | Represents the JSON value @"manual"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1CaptureMethod'EnumManual
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1CaptureMethod' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1CaptureMethod'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1CaptureMethod'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1CaptureMethod'EnumEmptyString) = ""
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1CaptureMethod'EnumManual) = "manual"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1CaptureMethod' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1CaptureMethod'EnumEmptyString
| val GHC.Classes.== "manual" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1CaptureMethod'EnumManual
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1CaptureMethod'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.afterpay_clearpay.anyOf.properties.setup_future_usage@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1SetupFutureUsage'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1SetupFutureUsage'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'AfterpayClearpay'OneOf1SetupFutureUsage'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"none"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1SetupFutureUsage'EnumNone
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1SetupFutureUsage' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1SetupFutureUsage'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1SetupFutureUsage'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1SetupFutureUsage'EnumNone) = "none"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1SetupFutureUsage' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "none" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1SetupFutureUsage'EnumNone
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'AfterpayClearpay'OneOf1SetupFutureUsage'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.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 object 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'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'OneOf1
{ -- | setup_future_usage
postPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'OneOf1SetupFutureUsage :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'OneOf1SetupFutureUsage')
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'OneOf1 where
toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'OneOf1SetupFutureUsage obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'OneOf1SetupFutureUsage obj) : GHC.Base.mempty)))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'OneOf1 where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'OneOf1" (\obj -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "setup_future_usage"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'OneOf1' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'OneOf1 :: PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'OneOf1
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'OneOf1 {postPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'OneOf1SetupFutureUsage = 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.alipay.anyOf.properties.setup_future_usage@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'OneOf1SetupFutureUsage'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'OneOf1SetupFutureUsage'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'Alipay'OneOf1SetupFutureUsage'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'OneOf1SetupFutureUsage'EnumEmptyString
| -- | Represents the JSON value @"none"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'OneOf1SetupFutureUsage'EnumNone
| -- | Represents the JSON value @"off_session"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'OneOf1SetupFutureUsage'EnumOffSession
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'OneOf1SetupFutureUsage' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'OneOf1SetupFutureUsage'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'OneOf1SetupFutureUsage'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'OneOf1SetupFutureUsage'EnumEmptyString) = ""
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'OneOf1SetupFutureUsage'EnumNone) = "none"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'OneOf1SetupFutureUsage'EnumOffSession) = "off_session"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'OneOf1SetupFutureUsage' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'OneOf1SetupFutureUsage'EnumEmptyString
| val GHC.Classes.== "none" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'OneOf1SetupFutureUsage'EnumNone
| val GHC.Classes.== "off_session" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'OneOf1SetupFutureUsage'EnumOffSession
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'OneOf1SetupFutureUsage'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.alipay.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'Variants
= -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'EmptyString
| PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'OneOf1 PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'OneOf1
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'Variants where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'OneOf1 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'PostPaymentIntentsRequestBodyPaymentMethodOptions'Alipay'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.au_becs_debit.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'OneOf1
{ -- | setup_future_usage
postPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'OneOf1SetupFutureUsage :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'OneOf1SetupFutureUsage')
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'OneOf1 where
toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'OneOf1SetupFutureUsage obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'OneOf1SetupFutureUsage obj) : GHC.Base.mempty)))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'OneOf1 where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'OneOf1" (\obj -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "setup_future_usage"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'OneOf1' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'OneOf1 :: PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'OneOf1
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'OneOf1 {postPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'OneOf1SetupFutureUsage = 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.au_becs_debit.anyOf.properties.setup_future_usage@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'OneOf1SetupFutureUsage'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'OneOf1SetupFutureUsage'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'AuBecsDebit'OneOf1SetupFutureUsage'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'OneOf1SetupFutureUsage'EnumEmptyString
| -- | Represents the JSON value @"none"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'OneOf1SetupFutureUsage'EnumNone
| -- | Represents the JSON value @"off_session"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'OneOf1SetupFutureUsage'EnumOffSession
| -- | Represents the JSON value @"on_session"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'OneOf1SetupFutureUsage'EnumOnSession
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'OneOf1SetupFutureUsage' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'OneOf1SetupFutureUsage'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'OneOf1SetupFutureUsage'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'OneOf1SetupFutureUsage'EnumEmptyString) = ""
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'OneOf1SetupFutureUsage'EnumNone) = "none"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'OneOf1SetupFutureUsage'EnumOffSession) = "off_session"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'OneOf1SetupFutureUsage'EnumOnSession) = "on_session"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'OneOf1SetupFutureUsage' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'OneOf1SetupFutureUsage'EnumEmptyString
| val GHC.Classes.== "none" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'OneOf1SetupFutureUsage'EnumNone
| val GHC.Classes.== "off_session" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'OneOf1SetupFutureUsage'EnumOffSession
| val GHC.Classes.== "on_session" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'OneOf1SetupFutureUsage'EnumOnSession
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'OneOf1SetupFutureUsage'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.au_becs_debit.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'Variants
= -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'EmptyString
| PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'OneOf1 PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'OneOf1
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'Variants where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'EmptyString) = ""
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'Variants where
parseJSON val =
if
| val GHC.Classes.== "" -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'EmptyString
| GHC.Base.otherwise -> case (PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'PostPaymentIntentsRequestBodyPaymentMethodOptions'AuBecsDebit'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.bacs_debit.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'OneOf1
{ -- | setup_future_usage
postPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'OneOf1SetupFutureUsage :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'OneOf1SetupFutureUsage')
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'OneOf1 where
toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'OneOf1SetupFutureUsage obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'OneOf1SetupFutureUsage obj) : GHC.Base.mempty)))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'OneOf1 where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'OneOf1" (\obj -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "setup_future_usage"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'OneOf1' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'OneOf1 :: PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'OneOf1
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'OneOf1 {postPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'OneOf1SetupFutureUsage = 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.bacs_debit.anyOf.properties.setup_future_usage@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'OneOf1SetupFutureUsage'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'OneOf1SetupFutureUsage'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'BacsDebit'OneOf1SetupFutureUsage'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'OneOf1SetupFutureUsage'EnumEmptyString
| -- | Represents the JSON value @"none"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'OneOf1SetupFutureUsage'EnumNone
| -- | Represents the JSON value @"off_session"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'OneOf1SetupFutureUsage'EnumOffSession
| -- | Represents the JSON value @"on_session"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'OneOf1SetupFutureUsage'EnumOnSession
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'OneOf1SetupFutureUsage' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'OneOf1SetupFutureUsage'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'OneOf1SetupFutureUsage'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'OneOf1SetupFutureUsage'EnumEmptyString) = ""
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'OneOf1SetupFutureUsage'EnumNone) = "none"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'OneOf1SetupFutureUsage'EnumOffSession) = "off_session"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'OneOf1SetupFutureUsage'EnumOnSession) = "on_session"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'OneOf1SetupFutureUsage' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'OneOf1SetupFutureUsage'EnumEmptyString
| val GHC.Classes.== "none" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'OneOf1SetupFutureUsage'EnumNone
| val GHC.Classes.== "off_session" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'OneOf1SetupFutureUsage'EnumOffSession
| val GHC.Classes.== "on_session" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'OneOf1SetupFutureUsage'EnumOnSession
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'OneOf1SetupFutureUsage'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.bacs_debit.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'Variants
= -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'EmptyString
| PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'OneOf1 PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'OneOf1
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'Variants where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'EmptyString) = ""
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'Variants where
parseJSON val =
if
| val GHC.Classes.== "" -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'EmptyString
| GHC.Base.otherwise -> case (PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'PostPaymentIntentsRequestBodyPaymentMethodOptions'BacsDebit'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.bancontact.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1
{ -- | preferred_language
postPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1PreferredLanguage :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1PreferredLanguage'),
-- | setup_future_usage
postPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1SetupFutureUsage :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1SetupFutureUsage')
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1 where
toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("preferred_language" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1PreferredLanguage obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1SetupFutureUsage obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("preferred_language" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1PreferredLanguage obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1SetupFutureUsage obj) : GHC.Base.mempty)))
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")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "setup_future_usage"))
-- | 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,
postPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1SetupFutureUsage = 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 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.setup_future_usage@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1SetupFutureUsage'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1SetupFutureUsage'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'OneOf1SetupFutureUsage'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1SetupFutureUsage'EnumEmptyString
| -- | Represents the JSON value @"none"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1SetupFutureUsage'EnumNone
| -- | Represents the JSON value @"off_session"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1SetupFutureUsage'EnumOffSession
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1SetupFutureUsage' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1SetupFutureUsage'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1SetupFutureUsage'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1SetupFutureUsage'EnumEmptyString) = ""
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1SetupFutureUsage'EnumNone) = "none"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1SetupFutureUsage'EnumOffSession) = "off_session"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1SetupFutureUsage' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1SetupFutureUsage'EnumEmptyString
| val GHC.Classes.== "none" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1SetupFutureUsage'EnumNone
| val GHC.Classes.== "off_session" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1SetupFutureUsage'EnumOffSession
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Bancontact'OneOf1SetupFutureUsage'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),
-- | setup_future_usage
postPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1SetupFutureUsage :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1SetupFutureUsage')
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1 where
toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("expires_after_days" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1ExpiresAfterDays obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1SetupFutureUsage obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("expires_after_days" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1ExpiresAfterDays obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1SetupFutureUsage obj) : GHC.Base.mempty)))
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")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "setup_future_usage"))
-- | 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,
postPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1SetupFutureUsage = 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.boleto.anyOf.properties.setup_future_usage@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1SetupFutureUsage'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1SetupFutureUsage'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'Boleto'OneOf1SetupFutureUsage'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1SetupFutureUsage'EnumEmptyString
| -- | Represents the JSON value @"none"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1SetupFutureUsage'EnumNone
| -- | Represents the JSON value @"off_session"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1SetupFutureUsage'EnumOffSession
| -- | Represents the JSON value @"on_session"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1SetupFutureUsage'EnumOnSession
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1SetupFutureUsage' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1SetupFutureUsage'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1SetupFutureUsage'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1SetupFutureUsage'EnumEmptyString) = ""
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1SetupFutureUsage'EnumNone) = "none"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1SetupFutureUsage'EnumOffSession) = "off_session"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1SetupFutureUsage'EnumOnSession) = "on_session"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1SetupFutureUsage' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1SetupFutureUsage'EnumEmptyString
| val GHC.Classes.== "none" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1SetupFutureUsage'EnumNone
| val GHC.Classes.== "off_session" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1SetupFutureUsage'EnumOffSession
| val GHC.Classes.== "on_session" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1SetupFutureUsage'EnumOnSession
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Boleto'OneOf1SetupFutureUsage'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.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
{ -- | capture_method
postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1CaptureMethod :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1CaptureMethod'),
-- | 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'),
-- | mandate_options
postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'),
-- | 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'),
-- | setup_future_usage
postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1SetupFutureUsage :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1SetupFutureUsage'),
-- | statement_descriptor_suffix_kana
postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1StatementDescriptorSuffixKana :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1StatementDescriptorSuffixKana'Variants),
-- | statement_descriptor_suffix_kanji
postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1StatementDescriptorSuffixKanji :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1StatementDescriptorSuffixKanji'Variants)
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1 where
toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("capture_method" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1CaptureMethod obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("cvc_token" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1CvcToken obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("installments" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("mandate_options" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("network" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("request_three_d_secure" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1RequestThreeDSecure obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1SetupFutureUsage obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("statement_descriptor_suffix_kana" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1StatementDescriptorSuffixKana obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("statement_descriptor_suffix_kanji" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1StatementDescriptorSuffixKanji obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("capture_method" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1CaptureMethod obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("cvc_token" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1CvcToken obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("installments" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("mandate_options" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("network" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("request_three_d_secure" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1RequestThreeDSecure obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1SetupFutureUsage obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("statement_descriptor_suffix_kana" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1StatementDescriptorSuffixKana obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("statement_descriptor_suffix_kanji" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1StatementDescriptorSuffixKanji obj) : GHC.Base.mempty)))
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..:! "capture_method")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "cvc_token")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "installments")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "mandate_options")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "network")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "request_three_d_secure")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "setup_future_usage")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "statement_descriptor_suffix_kana")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "statement_descriptor_suffix_kanji"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1 :: PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1 =
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1
{ postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1CaptureMethod = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1CvcToken = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Network = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1RequestThreeDSecure = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1SetupFutureUsage = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1StatementDescriptorSuffixKana = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1StatementDescriptorSuffixKanji = 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.card.anyOf.properties.capture_method@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1CaptureMethod'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1CaptureMethod'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'OneOf1CaptureMethod'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1CaptureMethod'EnumEmptyString
| -- | Represents the JSON value @"manual"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1CaptureMethod'EnumManual
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1CaptureMethod' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1CaptureMethod'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1CaptureMethod'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1CaptureMethod'EnumEmptyString) = ""
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1CaptureMethod'EnumManual) = "manual"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1CaptureMethod' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1CaptureMethod'EnumEmptyString
| val GHC.Classes.== "manual" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1CaptureMethod'EnumManual
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1CaptureMethod'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.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 (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("enabled" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Enabled obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("plan" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Plan obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("enabled" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Enabled obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("plan" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1Installments'Plan obj) : GHC.Base.mempty)))
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 (Data.Foldable.concat (["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 (GHC.Base.mconcat (Data.Foldable.concat (["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)))
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 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.mandate_options@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions' = PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'
{ -- | amount
postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Amount :: GHC.Types.Int,
-- | amount_type
postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'AmountType :: PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'AmountType',
-- | description
--
-- Constraints:
--
-- * Maximum length of 200
postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Description :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
-- | end_date
postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'EndDate :: (GHC.Maybe.Maybe GHC.Types.Int),
-- | interval
postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Interval :: PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Interval',
-- | interval_count
postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'IntervalCount :: (GHC.Maybe.Maybe GHC.Types.Int),
-- | reference
--
-- Constraints:
--
-- * Maximum length of 80
postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Reference :: Data.Text.Internal.Text,
-- | start_date
postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'StartDate :: GHC.Types.Int,
-- | supported_types
postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'SupportedTypes :: (GHC.Maybe.Maybe ([PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'SupportedTypes']))
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions' where
toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (["amount" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Amount obj] : ["amount_type" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'AmountType obj] : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("description" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Description obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("end_date" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'EndDate obj) : ["interval" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Interval obj] : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("interval_count" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'IntervalCount obj) : ["reference" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Reference obj] : ["start_date" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'StartDate obj] : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("supported_types" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'SupportedTypes obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (["amount" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Amount obj] : ["amount_type" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'AmountType obj] : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("description" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Description obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("end_date" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'EndDate obj) : ["interval" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Interval obj] : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("interval_count" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'IntervalCount obj) : ["reference" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Reference obj] : ["start_date" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'StartDate obj] : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("supported_types" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'SupportedTypes obj) : GHC.Base.mempty)))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions' where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'" (\obj -> ((((((((GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "amount")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "amount_type")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "description")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "end_date")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "interval")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "interval_count")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "reference")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "start_date")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "supported_types"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions' ::
-- | 'postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Amount'
GHC.Types.Int ->
-- | 'postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'AmountType'
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'AmountType' ->
-- | 'postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Interval'
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Interval' ->
-- | 'postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Reference'
Data.Text.Internal.Text ->
-- | 'postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'StartDate'
GHC.Types.Int ->
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions' postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Amount postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'AmountType postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Interval postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Reference postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'StartDate =
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'
{ postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Amount = postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Amount,
postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'AmountType = postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'AmountType,
postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Description = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'EndDate = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Interval = postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Interval,
postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'IntervalCount = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Reference = postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Reference,
postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'StartDate = postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'StartDate,
postPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'SupportedTypes = 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.card.anyOf.properties.mandate_options.properties.amount_type@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'AmountType'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'AmountType'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'OneOf1MandateOptions'AmountType'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"fixed"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'AmountType'EnumFixed
| -- | Represents the JSON value @"maximum"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'AmountType'EnumMaximum
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'AmountType' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'AmountType'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'AmountType'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'AmountType'EnumFixed) = "fixed"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'AmountType'EnumMaximum) = "maximum"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'AmountType' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "fixed" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'AmountType'EnumFixed
| val GHC.Classes.== "maximum" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'AmountType'EnumMaximum
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'AmountType'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.mandate_options.properties.interval@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Interval'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Interval'Other Data.Aeson.Types.Internal.Value
| -- | This constructor can be used to send values to the server which are not present in the specification yet.
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Interval'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"day"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Interval'EnumDay
| -- | Represents the JSON value @"month"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Interval'EnumMonth
| -- | Represents the JSON value @"sporadic"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Interval'EnumSporadic
| -- | Represents the JSON value @"week"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Interval'EnumWeek
| -- | Represents the JSON value @"year"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Interval'EnumYear
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Interval' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Interval'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Interval'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Interval'EnumDay) = "day"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Interval'EnumMonth) = "month"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Interval'EnumSporadic) = "sporadic"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Interval'EnumWeek) = "week"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Interval'EnumYear) = "year"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Interval' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "day" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Interval'EnumDay
| val GHC.Classes.== "month" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Interval'EnumMonth
| val GHC.Classes.== "sporadic" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Interval'EnumSporadic
| val GHC.Classes.== "week" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Interval'EnumWeek
| val GHC.Classes.== "year" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Interval'EnumYear
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'Interval'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.mandate_options.properties.supported_types.items@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'SupportedTypes'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'SupportedTypes'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'OneOf1MandateOptions'SupportedTypes'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"india"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'SupportedTypes'EnumIndia
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'SupportedTypes' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'SupportedTypes'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'SupportedTypes'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'SupportedTypes'EnumIndia) = "india"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'SupportedTypes' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "india" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'SupportedTypes'EnumIndia
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1MandateOptions'SupportedTypes'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.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 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.setup_future_usage@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1SetupFutureUsage'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1SetupFutureUsage'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'OneOf1SetupFutureUsage'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1SetupFutureUsage'EnumEmptyString
| -- | Represents the JSON value @"none"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1SetupFutureUsage'EnumNone
| -- | Represents the JSON value @"off_session"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1SetupFutureUsage'EnumOffSession
| -- | Represents the JSON value @"on_session"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1SetupFutureUsage'EnumOnSession
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1SetupFutureUsage' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1SetupFutureUsage'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1SetupFutureUsage'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1SetupFutureUsage'EnumEmptyString) = ""
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1SetupFutureUsage'EnumNone) = "none"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1SetupFutureUsage'EnumOffSession) = "off_session"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1SetupFutureUsage'EnumOnSession) = "on_session"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1SetupFutureUsage' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1SetupFutureUsage'EnumEmptyString
| val GHC.Classes.== "none" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1SetupFutureUsage'EnumNone
| val GHC.Classes.== "off_session" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1SetupFutureUsage'EnumOffSession
| val GHC.Classes.== "on_session" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1SetupFutureUsage'EnumOnSession
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1SetupFutureUsage'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.properties.statement_descriptor_suffix_kana.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1StatementDescriptorSuffixKana'Variants
= -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1StatementDescriptorSuffixKana'EmptyString
| PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1StatementDescriptorSuffixKana'Text Data.Text.Internal.Text
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1StatementDescriptorSuffixKana'Variants where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1StatementDescriptorSuffixKana'Text a) = Data.Aeson.Types.ToJSON.toJSON a
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1StatementDescriptorSuffixKana'EmptyString) = ""
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1StatementDescriptorSuffixKana'Variants where
parseJSON val =
if
| val GHC.Classes.== "" -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1StatementDescriptorSuffixKana'EmptyString
| GHC.Base.otherwise -> case (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1StatementDescriptorSuffixKana'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 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.statement_descriptor_suffix_kanji.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1StatementDescriptorSuffixKanji'Variants
= -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1StatementDescriptorSuffixKanji'EmptyString
| PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1StatementDescriptorSuffixKanji'Text Data.Text.Internal.Text
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1StatementDescriptorSuffixKanji'Variants where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1StatementDescriptorSuffixKanji'Text a) = Data.Aeson.Types.ToJSON.toJSON a
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1StatementDescriptorSuffixKanji'EmptyString) = ""
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1StatementDescriptorSuffixKanji'Variants where
parseJSON val =
if
| val GHC.Classes.== "" -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1StatementDescriptorSuffixKanji'EmptyString
| GHC.Base.otherwise -> case (PostPaymentIntentsRequestBodyPaymentMethodOptions'Card'OneOf1StatementDescriptorSuffixKanji'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 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 object 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'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent'OneOf1
{ -- | request_extended_authorization
postPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent'OneOf1RequestExtendedAuthorization :: (GHC.Maybe.Maybe GHC.Types.Bool),
-- | request_incremental_authorization_support
postPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent'OneOf1RequestIncrementalAuthorizationSupport :: (GHC.Maybe.Maybe GHC.Types.Bool)
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent'OneOf1 where
toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("request_extended_authorization" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent'OneOf1RequestExtendedAuthorization obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("request_incremental_authorization_support" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent'OneOf1RequestIncrementalAuthorizationSupport obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("request_extended_authorization" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent'OneOf1RequestExtendedAuthorization obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("request_incremental_authorization_support" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent'OneOf1RequestIncrementalAuthorizationSupport obj) : GHC.Base.mempty)))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent'OneOf1 where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent'OneOf1" (\obj -> (GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "request_extended_authorization")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "request_incremental_authorization_support"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent'OneOf1' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent'OneOf1 :: PostPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent'OneOf1
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent'OneOf1 =
PostPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent'OneOf1
{ postPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent'OneOf1RequestExtendedAuthorization = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent'OneOf1RequestIncrementalAuthorizationSupport = 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.card_present.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent'Variants
= -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent'EmptyString
| PostPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent'PostPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent'OneOf1 PostPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent'OneOf1
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent'Variants where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent'PostPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent'OneOf1 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'PostPaymentIntentsRequestBodyPaymentMethodOptions'CardPresent'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.customer_balance.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1
{ -- | bank_transfer
postPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'),
-- | funding_type
postPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1FundingType :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1FundingType'),
-- | setup_future_usage
postPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1SetupFutureUsage :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1SetupFutureUsage')
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1 where
toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("bank_transfer" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("funding_type" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1FundingType obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1SetupFutureUsage obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("bank_transfer" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("funding_type" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1FundingType obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1SetupFutureUsage obj) : GHC.Base.mempty)))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1 where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1" (\obj -> ((GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "bank_transfer")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "funding_type")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "setup_future_usage"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1 :: PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1 =
PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1
{ postPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1FundingType = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1SetupFutureUsage = 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.customer_balance.anyOf.properties.bank_transfer@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer' = PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'
{ -- | eu_bank_transfer
postPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer'),
-- | requested_address_types
postPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'RequestedAddressTypes :: (GHC.Maybe.Maybe ([PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'RequestedAddressTypes'])),
-- | type
postPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'Type :: PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'Type'
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer' where
toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("eu_bank_transfer" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("requested_address_types" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'RequestedAddressTypes obj) : ["type" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'Type obj] : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("eu_bank_transfer" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("requested_address_types" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'RequestedAddressTypes obj) : ["type" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'Type obj] : GHC.Base.mempty)))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer' where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'" (\obj -> ((GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "eu_bank_transfer")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "requested_address_types")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "type"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer' ::
-- | 'postPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'Type'
PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'Type' ->
PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer' postPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'Type =
PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'
{ postPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'RequestedAddressTypes = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'Type = postPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'Type
}
-- | Defines the object schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_options.properties.customer_balance.anyOf.properties.bank_transfer.properties.eu_bank_transfer@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer' = PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer'
{ -- | country
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer'Country :: Data.Text.Internal.Text
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer' where
toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (["country" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer'Country obj] : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (["country" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer'Country obj] : GHC.Base.mempty)))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer' where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer'" (\obj -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "country"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer'' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer' ::
-- | 'postPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer'Country'
Data.Text.Internal.Text ->
PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer'
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer' postPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer'Country = PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer' {postPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer'Country = postPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'EuBankTransfer'Country}
-- | Defines the enum schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_options.properties.customer_balance.anyOf.properties.bank_transfer.properties.requested_address_types.items@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'RequestedAddressTypes'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'RequestedAddressTypes'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'CustomerBalance'OneOf1BankTransfer'RequestedAddressTypes'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"iban"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'RequestedAddressTypes'EnumIban
| -- | Represents the JSON value @"sepa"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'RequestedAddressTypes'EnumSepa
| -- | Represents the JSON value @"sort_code"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'RequestedAddressTypes'EnumSortCode
| -- | Represents the JSON value @"spei"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'RequestedAddressTypes'EnumSpei
| -- | Represents the JSON value @"zengin"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'RequestedAddressTypes'EnumZengin
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'RequestedAddressTypes' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'RequestedAddressTypes'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'RequestedAddressTypes'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'RequestedAddressTypes'EnumIban) = "iban"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'RequestedAddressTypes'EnumSepa) = "sepa"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'RequestedAddressTypes'EnumSortCode) = "sort_code"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'RequestedAddressTypes'EnumSpei) = "spei"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'RequestedAddressTypes'EnumZengin) = "zengin"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'RequestedAddressTypes' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "iban" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'RequestedAddressTypes'EnumIban
| val GHC.Classes.== "sepa" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'RequestedAddressTypes'EnumSepa
| val GHC.Classes.== "sort_code" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'RequestedAddressTypes'EnumSortCode
| val GHC.Classes.== "spei" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'RequestedAddressTypes'EnumSpei
| val GHC.Classes.== "zengin" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'RequestedAddressTypes'EnumZengin
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'RequestedAddressTypes'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.customer_balance.anyOf.properties.bank_transfer.properties.type@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'Type'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'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.
PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'Type'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"eu_bank_transfer"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'Type'EnumEuBankTransfer
| -- | Represents the JSON value @"gb_bank_transfer"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'Type'EnumGbBankTransfer
| -- | Represents the JSON value @"jp_bank_transfer"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'Type'EnumJpBankTransfer
| -- | Represents the JSON value @"mx_bank_transfer"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'Type'EnumMxBankTransfer
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'Type' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'Type'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'Type'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'Type'EnumEuBankTransfer) = "eu_bank_transfer"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'Type'EnumGbBankTransfer) = "gb_bank_transfer"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'Type'EnumJpBankTransfer) = "jp_bank_transfer"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'Type'EnumMxBankTransfer) = "mx_bank_transfer"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'Type' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "eu_bank_transfer" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'Type'EnumEuBankTransfer
| val GHC.Classes.== "gb_bank_transfer" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'Type'EnumGbBankTransfer
| val GHC.Classes.== "jp_bank_transfer" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'Type'EnumJpBankTransfer
| val GHC.Classes.== "mx_bank_transfer" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'Type'EnumMxBankTransfer
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1BankTransfer'Type'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.customer_balance.anyOf.properties.funding_type@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1FundingType'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1FundingType'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'CustomerBalance'OneOf1FundingType'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"bank_transfer"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1FundingType'EnumBankTransfer
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1FundingType' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1FundingType'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1FundingType'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1FundingType'EnumBankTransfer) = "bank_transfer"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1FundingType' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "bank_transfer" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1FundingType'EnumBankTransfer
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1FundingType'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.customer_balance.anyOf.properties.setup_future_usage@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1SetupFutureUsage'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1SetupFutureUsage'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'CustomerBalance'OneOf1SetupFutureUsage'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"none"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1SetupFutureUsage'EnumNone
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1SetupFutureUsage' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1SetupFutureUsage'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1SetupFutureUsage'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1SetupFutureUsage'EnumNone) = "none"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1SetupFutureUsage' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "none" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1SetupFutureUsage'EnumNone
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1SetupFutureUsage'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.customer_balance.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'Variants
= -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'EmptyString
| PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1 PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'Variants where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'EmptyString) = ""
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'Variants where
parseJSON val =
if
| val GHC.Classes.== "" -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'EmptyString
| GHC.Base.otherwise -> case (PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'PostPaymentIntentsRequestBodyPaymentMethodOptions'CustomerBalance'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.eps.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Eps'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'Eps'OneOf1
{ -- | setup_future_usage
postPaymentIntentsRequestBodyPaymentMethodOptions'Eps'OneOf1SetupFutureUsage :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Eps'OneOf1SetupFutureUsage')
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Eps'OneOf1 where
toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Eps'OneOf1SetupFutureUsage obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Eps'OneOf1SetupFutureUsage obj) : GHC.Base.mempty)))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Eps'OneOf1 where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodOptions'Eps'OneOf1" (\obj -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Eps'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "setup_future_usage"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodOptions'Eps'OneOf1' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Eps'OneOf1 :: PostPaymentIntentsRequestBodyPaymentMethodOptions'Eps'OneOf1
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Eps'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'Eps'OneOf1 {postPaymentIntentsRequestBodyPaymentMethodOptions'Eps'OneOf1SetupFutureUsage = 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.eps.anyOf.properties.setup_future_usage@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Eps'OneOf1SetupFutureUsage'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'Eps'OneOf1SetupFutureUsage'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'Eps'OneOf1SetupFutureUsage'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"none"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Eps'OneOf1SetupFutureUsage'EnumNone
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Eps'OneOf1SetupFutureUsage' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Eps'OneOf1SetupFutureUsage'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Eps'OneOf1SetupFutureUsage'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Eps'OneOf1SetupFutureUsage'EnumNone) = "none"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Eps'OneOf1SetupFutureUsage' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "none" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Eps'OneOf1SetupFutureUsage'EnumNone
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Eps'OneOf1SetupFutureUsage'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.eps.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Eps'Variants
= -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Eps'EmptyString
| PostPaymentIntentsRequestBodyPaymentMethodOptions'Eps'PostPaymentIntentsRequestBodyPaymentMethodOptions'Eps'OneOf1 PostPaymentIntentsRequestBodyPaymentMethodOptions'Eps'OneOf1
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Eps'Variants where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Eps'PostPaymentIntentsRequestBodyPaymentMethodOptions'Eps'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Eps'EmptyString) = ""
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Eps'Variants where
parseJSON val =
if
| val GHC.Classes.== "" -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Eps'EmptyString
| GHC.Base.otherwise -> case (PostPaymentIntentsRequestBodyPaymentMethodOptions'Eps'PostPaymentIntentsRequestBodyPaymentMethodOptions'Eps'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.fpx.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Fpx'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'Fpx'OneOf1
{ -- | setup_future_usage
postPaymentIntentsRequestBodyPaymentMethodOptions'Fpx'OneOf1SetupFutureUsage :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Fpx'OneOf1SetupFutureUsage')
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Fpx'OneOf1 where
toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Fpx'OneOf1SetupFutureUsage obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Fpx'OneOf1SetupFutureUsage obj) : GHC.Base.mempty)))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Fpx'OneOf1 where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodOptions'Fpx'OneOf1" (\obj -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Fpx'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "setup_future_usage"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodOptions'Fpx'OneOf1' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Fpx'OneOf1 :: PostPaymentIntentsRequestBodyPaymentMethodOptions'Fpx'OneOf1
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Fpx'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'Fpx'OneOf1 {postPaymentIntentsRequestBodyPaymentMethodOptions'Fpx'OneOf1SetupFutureUsage = 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.fpx.anyOf.properties.setup_future_usage@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Fpx'OneOf1SetupFutureUsage'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'Fpx'OneOf1SetupFutureUsage'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'Fpx'OneOf1SetupFutureUsage'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"none"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Fpx'OneOf1SetupFutureUsage'EnumNone
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Fpx'OneOf1SetupFutureUsage' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Fpx'OneOf1SetupFutureUsage'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Fpx'OneOf1SetupFutureUsage'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Fpx'OneOf1SetupFutureUsage'EnumNone) = "none"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Fpx'OneOf1SetupFutureUsage' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "none" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Fpx'OneOf1SetupFutureUsage'EnumNone
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Fpx'OneOf1SetupFutureUsage'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.fpx.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Fpx'Variants
= -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Fpx'EmptyString
| PostPaymentIntentsRequestBodyPaymentMethodOptions'Fpx'PostPaymentIntentsRequestBodyPaymentMethodOptions'Fpx'OneOf1 PostPaymentIntentsRequestBodyPaymentMethodOptions'Fpx'OneOf1
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Fpx'Variants where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Fpx'PostPaymentIntentsRequestBodyPaymentMethodOptions'Fpx'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Fpx'EmptyString) = ""
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Fpx'Variants where
parseJSON val =
if
| val GHC.Classes.== "" -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Fpx'EmptyString
| GHC.Base.otherwise -> case (PostPaymentIntentsRequestBodyPaymentMethodOptions'Fpx'PostPaymentIntentsRequestBodyPaymentMethodOptions'Fpx'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.giropay.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Giropay'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'Giropay'OneOf1
{ -- | setup_future_usage
postPaymentIntentsRequestBodyPaymentMethodOptions'Giropay'OneOf1SetupFutureUsage :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Giropay'OneOf1SetupFutureUsage')
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Giropay'OneOf1 where
toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Giropay'OneOf1SetupFutureUsage obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Giropay'OneOf1SetupFutureUsage obj) : GHC.Base.mempty)))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Giropay'OneOf1 where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodOptions'Giropay'OneOf1" (\obj -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Giropay'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "setup_future_usage"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodOptions'Giropay'OneOf1' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Giropay'OneOf1 :: PostPaymentIntentsRequestBodyPaymentMethodOptions'Giropay'OneOf1
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Giropay'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'Giropay'OneOf1 {postPaymentIntentsRequestBodyPaymentMethodOptions'Giropay'OneOf1SetupFutureUsage = 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.giropay.anyOf.properties.setup_future_usage@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Giropay'OneOf1SetupFutureUsage'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'Giropay'OneOf1SetupFutureUsage'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'Giropay'OneOf1SetupFutureUsage'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"none"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Giropay'OneOf1SetupFutureUsage'EnumNone
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Giropay'OneOf1SetupFutureUsage' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Giropay'OneOf1SetupFutureUsage'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Giropay'OneOf1SetupFutureUsage'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Giropay'OneOf1SetupFutureUsage'EnumNone) = "none"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Giropay'OneOf1SetupFutureUsage' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "none" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Giropay'OneOf1SetupFutureUsage'EnumNone
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Giropay'OneOf1SetupFutureUsage'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.giropay.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Giropay'Variants
= -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Giropay'EmptyString
| PostPaymentIntentsRequestBodyPaymentMethodOptions'Giropay'PostPaymentIntentsRequestBodyPaymentMethodOptions'Giropay'OneOf1 PostPaymentIntentsRequestBodyPaymentMethodOptions'Giropay'OneOf1
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Giropay'Variants where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Giropay'PostPaymentIntentsRequestBodyPaymentMethodOptions'Giropay'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Giropay'EmptyString) = ""
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Giropay'Variants where
parseJSON val =
if
| val GHC.Classes.== "" -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Giropay'EmptyString
| GHC.Base.otherwise -> case (PostPaymentIntentsRequestBodyPaymentMethodOptions'Giropay'PostPaymentIntentsRequestBodyPaymentMethodOptions'Giropay'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.grabpay.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay'OneOf1
{ -- | setup_future_usage
postPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay'OneOf1SetupFutureUsage :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay'OneOf1SetupFutureUsage')
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay'OneOf1 where
toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay'OneOf1SetupFutureUsage obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay'OneOf1SetupFutureUsage obj) : GHC.Base.mempty)))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay'OneOf1 where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay'OneOf1" (\obj -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "setup_future_usage"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay'OneOf1' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay'OneOf1 :: PostPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay'OneOf1
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay'OneOf1 {postPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay'OneOf1SetupFutureUsage = 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.grabpay.anyOf.properties.setup_future_usage@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay'OneOf1SetupFutureUsage'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay'OneOf1SetupFutureUsage'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'Grabpay'OneOf1SetupFutureUsage'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"none"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay'OneOf1SetupFutureUsage'EnumNone
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay'OneOf1SetupFutureUsage' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay'OneOf1SetupFutureUsage'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay'OneOf1SetupFutureUsage'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay'OneOf1SetupFutureUsage'EnumNone) = "none"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay'OneOf1SetupFutureUsage' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "none" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay'OneOf1SetupFutureUsage'EnumNone
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay'OneOf1SetupFutureUsage'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.grabpay.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay'Variants
= -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay'EmptyString
| PostPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay'PostPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay'OneOf1 PostPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay'OneOf1
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay'Variants where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay'PostPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay'EmptyString) = ""
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay'Variants where
parseJSON val =
if
| val GHC.Classes.== "" -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay'EmptyString
| GHC.Base.otherwise -> case (PostPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay'PostPaymentIntentsRequestBodyPaymentMethodOptions'Grabpay'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.ideal.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'OneOf1
{ -- | setup_future_usage
postPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'OneOf1SetupFutureUsage :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'OneOf1SetupFutureUsage')
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'OneOf1 where
toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'OneOf1SetupFutureUsage obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'OneOf1SetupFutureUsage obj) : GHC.Base.mempty)))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'OneOf1 where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'OneOf1" (\obj -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "setup_future_usage"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'OneOf1' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'OneOf1 :: PostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'OneOf1
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'OneOf1 {postPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'OneOf1SetupFutureUsage = 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.ideal.anyOf.properties.setup_future_usage@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'OneOf1SetupFutureUsage'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'OneOf1SetupFutureUsage'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'Ideal'OneOf1SetupFutureUsage'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'OneOf1SetupFutureUsage'EnumEmptyString
| -- | Represents the JSON value @"none"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'OneOf1SetupFutureUsage'EnumNone
| -- | Represents the JSON value @"off_session"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'OneOf1SetupFutureUsage'EnumOffSession
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'OneOf1SetupFutureUsage' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'OneOf1SetupFutureUsage'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'OneOf1SetupFutureUsage'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'OneOf1SetupFutureUsage'EnumEmptyString) = ""
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'OneOf1SetupFutureUsage'EnumNone) = "none"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'OneOf1SetupFutureUsage'EnumOffSession) = "off_session"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'OneOf1SetupFutureUsage' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'OneOf1SetupFutureUsage'EnumEmptyString
| val GHC.Classes.== "none" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'OneOf1SetupFutureUsage'EnumNone
| val GHC.Classes.== "off_session" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'OneOf1SetupFutureUsage'EnumOffSession
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'OneOf1SetupFutureUsage'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.ideal.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'Variants
= -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'EmptyString
| PostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'PostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'OneOf1 PostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'OneOf1
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'Variants where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'PostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'EmptyString) = ""
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'Variants where
parseJSON val =
if
| val GHC.Classes.== "" -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'EmptyString
| GHC.Base.otherwise -> case (PostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'PostPaymentIntentsRequestBodyPaymentMethodOptions'Ideal'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.interac_present.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'InteracPresent'Variants
= -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'InteracPresent'EmptyString
| PostPaymentIntentsRequestBodyPaymentMethodOptions'InteracPresent'Object Data.Aeson.Types.Internal.Object
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'InteracPresent'Variants where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'InteracPresent'Object a) = Data.Aeson.Types.ToJSON.toJSON a
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'InteracPresent'EmptyString) = ""
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'InteracPresent'Variants where
parseJSON val =
if
| val GHC.Classes.== "" -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'InteracPresent'EmptyString
| GHC.Base.otherwise -> case (PostPaymentIntentsRequestBodyPaymentMethodOptions'InteracPresent'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.klarna.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1
{ -- | capture_method
postPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1CaptureMethod :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1CaptureMethod'),
-- | preferred_locale
postPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'),
-- | setup_future_usage
postPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1SetupFutureUsage :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1SetupFutureUsage')
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1 where
toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("capture_method" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1CaptureMethod obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("preferred_locale" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1SetupFutureUsage obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("capture_method" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1CaptureMethod obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("preferred_locale" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1SetupFutureUsage obj) : GHC.Base.mempty)))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1 where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1" (\obj -> ((GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "capture_method")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "preferred_locale")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "setup_future_usage"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1 :: PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1 =
PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1
{ postPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1CaptureMethod = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1SetupFutureUsage = 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.klarna.anyOf.properties.capture_method@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1CaptureMethod'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1CaptureMethod'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'Klarna'OneOf1CaptureMethod'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1CaptureMethod'EnumEmptyString
| -- | Represents the JSON value @"manual"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1CaptureMethod'EnumManual
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1CaptureMethod' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1CaptureMethod'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1CaptureMethod'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1CaptureMethod'EnumEmptyString) = ""
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1CaptureMethod'EnumManual) = "manual"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1CaptureMethod' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1CaptureMethod'EnumEmptyString
| val GHC.Classes.== "manual" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1CaptureMethod'EnumManual
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1CaptureMethod'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.klarna.anyOf.properties.preferred_locale@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'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'Klarna'OneOf1PreferredLocale'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"da-DK"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumDaDK
| -- | Represents the JSON value @"de-AT"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumDeAT
| -- | Represents the JSON value @"de-DE"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumDeDE
| -- | Represents the JSON value @"en-AT"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnAT
| -- | Represents the JSON value @"en-AU"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnAU
| -- | Represents the JSON value @"en-BE"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnBE
| -- | Represents the JSON value @"en-DE"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnDE
| -- | Represents the JSON value @"en-DK"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnDK
| -- | Represents the JSON value @"en-ES"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnES
| -- | Represents the JSON value @"en-FI"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnFI
| -- | Represents the JSON value @"en-FR"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnFR
| -- | Represents the JSON value @"en-GB"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnGB
| -- | Represents the JSON value @"en-IE"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnIE
| -- | Represents the JSON value @"en-IT"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnIT
| -- | Represents the JSON value @"en-NL"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnNL
| -- | Represents the JSON value @"en-NO"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnNO
| -- | Represents the JSON value @"en-NZ"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnNZ
| -- | Represents the JSON value @"en-SE"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnSE
| -- | Represents the JSON value @"en-US"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnUS
| -- | Represents the JSON value @"es-ES"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEsES
| -- | Represents the JSON value @"es-US"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEsUS
| -- | Represents the JSON value @"fi-FI"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumFiFI
| -- | Represents the JSON value @"fr-BE"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumFrBE
| -- | Represents the JSON value @"fr-FR"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumFrFR
| -- | Represents the JSON value @"it-IT"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumItIT
| -- | Represents the JSON value @"nb-NO"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumNbNO
| -- | Represents the JSON value @"nl-BE"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumNlBE
| -- | Represents the JSON value @"nl-NL"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumNlNL
| -- | Represents the JSON value @"sv-FI"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumSvFI
| -- | Represents the JSON value @"sv-SE"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumSvSE
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumDaDK) = "da-DK"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumDeAT) = "de-AT"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumDeDE) = "de-DE"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnAT) = "en-AT"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnAU) = "en-AU"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnBE) = "en-BE"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnDE) = "en-DE"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnDK) = "en-DK"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnES) = "en-ES"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnFI) = "en-FI"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnFR) = "en-FR"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnGB) = "en-GB"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnIE) = "en-IE"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnIT) = "en-IT"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnNL) = "en-NL"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnNO) = "en-NO"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnNZ) = "en-NZ"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnSE) = "en-SE"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnUS) = "en-US"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEsES) = "es-ES"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEsUS) = "es-US"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumFiFI) = "fi-FI"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumFrBE) = "fr-BE"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumFrFR) = "fr-FR"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumItIT) = "it-IT"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumNbNO) = "nb-NO"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumNlBE) = "nl-BE"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumNlNL) = "nl-NL"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumSvFI) = "sv-FI"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumSvSE) = "sv-SE"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "da-DK" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumDaDK
| val GHC.Classes.== "de-AT" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumDeAT
| val GHC.Classes.== "de-DE" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumDeDE
| val GHC.Classes.== "en-AT" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnAT
| val GHC.Classes.== "en-AU" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnAU
| val GHC.Classes.== "en-BE" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnBE
| val GHC.Classes.== "en-DE" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnDE
| val GHC.Classes.== "en-DK" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnDK
| val GHC.Classes.== "en-ES" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnES
| val GHC.Classes.== "en-FI" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnFI
| val GHC.Classes.== "en-FR" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnFR
| val GHC.Classes.== "en-GB" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnGB
| val GHC.Classes.== "en-IE" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnIE
| val GHC.Classes.== "en-IT" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnIT
| val GHC.Classes.== "en-NL" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnNL
| val GHC.Classes.== "en-NO" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnNO
| val GHC.Classes.== "en-NZ" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnNZ
| val GHC.Classes.== "en-SE" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnSE
| val GHC.Classes.== "en-US" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEnUS
| val GHC.Classes.== "es-ES" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEsES
| val GHC.Classes.== "es-US" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumEsUS
| val GHC.Classes.== "fi-FI" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumFiFI
| val GHC.Classes.== "fr-BE" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumFrBE
| val GHC.Classes.== "fr-FR" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumFrFR
| val GHC.Classes.== "it-IT" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumItIT
| val GHC.Classes.== "nb-NO" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumNbNO
| val GHC.Classes.== "nl-BE" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumNlBE
| val GHC.Classes.== "nl-NL" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumNlNL
| val GHC.Classes.== "sv-FI" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumSvFI
| val GHC.Classes.== "sv-SE" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'EnumSvSE
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1PreferredLocale'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.klarna.anyOf.properties.setup_future_usage@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1SetupFutureUsage'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1SetupFutureUsage'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'Klarna'OneOf1SetupFutureUsage'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"none"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1SetupFutureUsage'EnumNone
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1SetupFutureUsage' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1SetupFutureUsage'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1SetupFutureUsage'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1SetupFutureUsage'EnumNone) = "none"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1SetupFutureUsage' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "none" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1SetupFutureUsage'EnumNone
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1SetupFutureUsage'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.klarna.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'Variants
= -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'EmptyString
| PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1 PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'Variants where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'EmptyString) = ""
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'Variants where
parseJSON val =
if
| val GHC.Classes.== "" -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'EmptyString
| GHC.Base.otherwise -> case (PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'PostPaymentIntentsRequestBodyPaymentMethodOptions'Klarna'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.konbini.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1
{ -- | confirmation_number
--
-- Constraints:
--
-- * Maximum length of 11
postPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1ConfirmationNumber :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
-- | expires_after_days
postPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1ExpiresAfterDays :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1ExpiresAfterDays'Variants),
-- | expires_at
postPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1ExpiresAt :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1ExpiresAt'Variants),
-- | product_description
--
-- Constraints:
--
-- * Maximum length of 22
postPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1ProductDescription :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
-- | setup_future_usage
postPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1SetupFutureUsage :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1SetupFutureUsage')
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1 where
toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("confirmation_number" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1ConfirmationNumber obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("expires_after_days" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1ExpiresAfterDays obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("expires_at" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1ExpiresAt obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("product_description" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1ProductDescription obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1SetupFutureUsage obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("confirmation_number" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1ConfirmationNumber obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("expires_after_days" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1ExpiresAfterDays obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("expires_at" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1ExpiresAt obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("product_description" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1ProductDescription obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1SetupFutureUsage obj) : GHC.Base.mempty)))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1 where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1" (\obj -> ((((GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "confirmation_number")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "expires_after_days")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "expires_at")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "product_description")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "setup_future_usage"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1 :: PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1 =
PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1
{ postPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1ConfirmationNumber = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1ExpiresAfterDays = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1ExpiresAt = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1ProductDescription = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1SetupFutureUsage = 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.konbini.anyOf.properties.expires_after_days.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1ExpiresAfterDays'Variants
= -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1ExpiresAfterDays'EmptyString
| PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1ExpiresAfterDays'Int GHC.Types.Int
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1ExpiresAfterDays'Variants where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1ExpiresAfterDays'Int a) = Data.Aeson.Types.ToJSON.toJSON a
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1ExpiresAfterDays'EmptyString) = ""
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1ExpiresAfterDays'Variants where
parseJSON val =
if
| val GHC.Classes.== "" -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1ExpiresAfterDays'EmptyString
| GHC.Base.otherwise -> case (PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1ExpiresAfterDays'Int Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of
Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a
Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a
-- | Defines the oneOf schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_options.properties.konbini.anyOf.properties.expires_at.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1ExpiresAt'Variants
= -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1ExpiresAt'EmptyString
| PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1ExpiresAt'Int GHC.Types.Int
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1ExpiresAt'Variants where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1ExpiresAt'Int a) = Data.Aeson.Types.ToJSON.toJSON a
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1ExpiresAt'EmptyString) = ""
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1ExpiresAt'Variants where
parseJSON val =
if
| val GHC.Classes.== "" -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1ExpiresAt'EmptyString
| GHC.Base.otherwise -> case (PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1ExpiresAt'Int Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of
Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a
Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a
-- | Defines the enum schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_options.properties.konbini.anyOf.properties.setup_future_usage@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1SetupFutureUsage'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1SetupFutureUsage'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'Konbini'OneOf1SetupFutureUsage'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"none"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1SetupFutureUsage'EnumNone
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1SetupFutureUsage' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1SetupFutureUsage'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1SetupFutureUsage'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1SetupFutureUsage'EnumNone) = "none"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1SetupFutureUsage' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "none" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1SetupFutureUsage'EnumNone
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1SetupFutureUsage'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.konbini.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'Variants
= -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'EmptyString
| PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1 PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'Variants where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'EmptyString) = ""
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'Variants where
parseJSON val =
if
| val GHC.Classes.== "" -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'EmptyString
| GHC.Base.otherwise -> case (PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'PostPaymentIntentsRequestBodyPaymentMethodOptions'Konbini'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.link.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1
{ -- | capture_method
postPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1CaptureMethod :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1CaptureMethod'),
-- | persistent_token
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1PersistentToken :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
-- | setup_future_usage
postPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1SetupFutureUsage :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1SetupFutureUsage')
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1 where
toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("capture_method" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1CaptureMethod obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("persistent_token" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1PersistentToken obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1SetupFutureUsage obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("capture_method" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1CaptureMethod obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("persistent_token" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1PersistentToken obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1SetupFutureUsage obj) : GHC.Base.mempty)))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1 where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1" (\obj -> ((GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "capture_method")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "persistent_token")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "setup_future_usage"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1 :: PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1 =
PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1
{ postPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1CaptureMethod = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1PersistentToken = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1SetupFutureUsage = 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.link.anyOf.properties.capture_method@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1CaptureMethod'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1CaptureMethod'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'Link'OneOf1CaptureMethod'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1CaptureMethod'EnumEmptyString
| -- | Represents the JSON value @"manual"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1CaptureMethod'EnumManual
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1CaptureMethod' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1CaptureMethod'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1CaptureMethod'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1CaptureMethod'EnumEmptyString) = ""
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1CaptureMethod'EnumManual) = "manual"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1CaptureMethod' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1CaptureMethod'EnumEmptyString
| val GHC.Classes.== "manual" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1CaptureMethod'EnumManual
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1CaptureMethod'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.link.anyOf.properties.setup_future_usage@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1SetupFutureUsage'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1SetupFutureUsage'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'Link'OneOf1SetupFutureUsage'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1SetupFutureUsage'EnumEmptyString
| -- | Represents the JSON value @"none"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1SetupFutureUsage'EnumNone
| -- | Represents the JSON value @"off_session"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1SetupFutureUsage'EnumOffSession
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1SetupFutureUsage' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1SetupFutureUsage'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1SetupFutureUsage'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1SetupFutureUsage'EnumEmptyString) = ""
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1SetupFutureUsage'EnumNone) = "none"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1SetupFutureUsage'EnumOffSession) = "off_session"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1SetupFutureUsage' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1SetupFutureUsage'EnumEmptyString
| val GHC.Classes.== "none" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1SetupFutureUsage'EnumNone
| val GHC.Classes.== "off_session" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1SetupFutureUsage'EnumOffSession
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1SetupFutureUsage'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.link.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'Variants
= -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'EmptyString
| PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1 PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'Variants where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'EmptyString) = ""
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'Variants where
parseJSON val =
if
| val GHC.Classes.== "" -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'EmptyString
| GHC.Base.otherwise -> case (PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'PostPaymentIntentsRequestBodyPaymentMethodOptions'Link'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.oxxo.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'OneOf1
{ -- | expires_after_days
postPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'OneOf1ExpiresAfterDays :: (GHC.Maybe.Maybe GHC.Types.Int),
-- | setup_future_usage
postPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'OneOf1SetupFutureUsage :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'OneOf1SetupFutureUsage')
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'OneOf1 where
toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("expires_after_days" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'OneOf1ExpiresAfterDays obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'OneOf1SetupFutureUsage obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("expires_after_days" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'OneOf1ExpiresAfterDays obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'OneOf1SetupFutureUsage obj) : GHC.Base.mempty)))
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")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "setup_future_usage"))
-- | 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,
postPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'OneOf1SetupFutureUsage = 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.oxxo.anyOf.properties.setup_future_usage@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'OneOf1SetupFutureUsage'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'OneOf1SetupFutureUsage'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'Oxxo'OneOf1SetupFutureUsage'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"none"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'OneOf1SetupFutureUsage'EnumNone
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'OneOf1SetupFutureUsage' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'OneOf1SetupFutureUsage'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'OneOf1SetupFutureUsage'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'OneOf1SetupFutureUsage'EnumNone) = "none"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'OneOf1SetupFutureUsage' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "none" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'OneOf1SetupFutureUsage'EnumNone
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Oxxo'OneOf1SetupFutureUsage'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.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
{ -- | setup_future_usage
postPaymentIntentsRequestBodyPaymentMethodOptions'P24'OneOf1SetupFutureUsage :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'P24'OneOf1SetupFutureUsage'),
-- | 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 (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'P24'OneOf1SetupFutureUsage obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("tos_shown_and_accepted" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'P24'OneOf1TosShownAndAccepted obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'P24'OneOf1SetupFutureUsage obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("tos_shown_and_accepted" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'P24'OneOf1TosShownAndAccepted obj) : GHC.Base.mempty)))
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..:! "setup_future_usage")) 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'OneOf1SetupFutureUsage = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'P24'OneOf1TosShownAndAccepted = 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.p24.anyOf.properties.setup_future_usage@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'P24'OneOf1SetupFutureUsage'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'P24'OneOf1SetupFutureUsage'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'P24'OneOf1SetupFutureUsage'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"none"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'P24'OneOf1SetupFutureUsage'EnumNone
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'P24'OneOf1SetupFutureUsage' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'P24'OneOf1SetupFutureUsage'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'P24'OneOf1SetupFutureUsage'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'P24'OneOf1SetupFutureUsage'EnumNone) = "none"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'P24'OneOf1SetupFutureUsage' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "none" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'P24'OneOf1SetupFutureUsage'EnumNone
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'P24'OneOf1SetupFutureUsage'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.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.paynow.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Paynow'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'Paynow'OneOf1
{ -- | setup_future_usage
postPaymentIntentsRequestBodyPaymentMethodOptions'Paynow'OneOf1SetupFutureUsage :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Paynow'OneOf1SetupFutureUsage')
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Paynow'OneOf1 where
toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Paynow'OneOf1SetupFutureUsage obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Paynow'OneOf1SetupFutureUsage obj) : GHC.Base.mempty)))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Paynow'OneOf1 where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodOptions'Paynow'OneOf1" (\obj -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Paynow'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "setup_future_usage"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodOptions'Paynow'OneOf1' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Paynow'OneOf1 :: PostPaymentIntentsRequestBodyPaymentMethodOptions'Paynow'OneOf1
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Paynow'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'Paynow'OneOf1 {postPaymentIntentsRequestBodyPaymentMethodOptions'Paynow'OneOf1SetupFutureUsage = 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.paynow.anyOf.properties.setup_future_usage@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Paynow'OneOf1SetupFutureUsage'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'Paynow'OneOf1SetupFutureUsage'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'Paynow'OneOf1SetupFutureUsage'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"none"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Paynow'OneOf1SetupFutureUsage'EnumNone
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Paynow'OneOf1SetupFutureUsage' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Paynow'OneOf1SetupFutureUsage'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Paynow'OneOf1SetupFutureUsage'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Paynow'OneOf1SetupFutureUsage'EnumNone) = "none"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Paynow'OneOf1SetupFutureUsage' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "none" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Paynow'OneOf1SetupFutureUsage'EnumNone
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Paynow'OneOf1SetupFutureUsage'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.paynow.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Paynow'Variants
= -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Paynow'EmptyString
| PostPaymentIntentsRequestBodyPaymentMethodOptions'Paynow'PostPaymentIntentsRequestBodyPaymentMethodOptions'Paynow'OneOf1 PostPaymentIntentsRequestBodyPaymentMethodOptions'Paynow'OneOf1
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Paynow'Variants where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Paynow'PostPaymentIntentsRequestBodyPaymentMethodOptions'Paynow'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Paynow'EmptyString) = ""
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Paynow'Variants where
parseJSON val =
if
| val GHC.Classes.== "" -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Paynow'EmptyString
| GHC.Base.otherwise -> case (PostPaymentIntentsRequestBodyPaymentMethodOptions'Paynow'PostPaymentIntentsRequestBodyPaymentMethodOptions'Paynow'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.promptpay.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay'OneOf1
{ -- | setup_future_usage
postPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay'OneOf1SetupFutureUsage :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay'OneOf1SetupFutureUsage')
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay'OneOf1 where
toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay'OneOf1SetupFutureUsage obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay'OneOf1SetupFutureUsage obj) : GHC.Base.mempty)))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay'OneOf1 where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay'OneOf1" (\obj -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "setup_future_usage"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay'OneOf1' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay'OneOf1 :: PostPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay'OneOf1
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay'OneOf1 {postPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay'OneOf1SetupFutureUsage = 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.promptpay.anyOf.properties.setup_future_usage@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay'OneOf1SetupFutureUsage'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay'OneOf1SetupFutureUsage'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'Promptpay'OneOf1SetupFutureUsage'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"none"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay'OneOf1SetupFutureUsage'EnumNone
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay'OneOf1SetupFutureUsage' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay'OneOf1SetupFutureUsage'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay'OneOf1SetupFutureUsage'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay'OneOf1SetupFutureUsage'EnumNone) = "none"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay'OneOf1SetupFutureUsage' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "none" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay'OneOf1SetupFutureUsage'EnumNone
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay'OneOf1SetupFutureUsage'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.promptpay.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay'Variants
= -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay'EmptyString
| PostPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay'PostPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay'OneOf1 PostPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay'OneOf1
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay'Variants where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay'PostPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay'EmptyString) = ""
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay'Variants where
parseJSON val =
if
| val GHC.Classes.== "" -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay'EmptyString
| GHC.Base.otherwise -> case (PostPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay'PostPaymentIntentsRequestBodyPaymentMethodOptions'Promptpay'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),
-- | setup_future_usage
postPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1SetupFutureUsage :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1SetupFutureUsage')
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1 where
toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("mandate_options" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1MandateOptions obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1SetupFutureUsage obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("mandate_options" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1MandateOptions obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1SetupFutureUsage obj) : GHC.Base.mempty)))
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")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "setup_future_usage"))
-- | 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,
postPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1SetupFutureUsage = 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.sepa_debit.anyOf.properties.setup_future_usage@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1SetupFutureUsage'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1SetupFutureUsage'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'SepaDebit'OneOf1SetupFutureUsage'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1SetupFutureUsage'EnumEmptyString
| -- | Represents the JSON value @"none"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1SetupFutureUsage'EnumNone
| -- | Represents the JSON value @"off_session"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1SetupFutureUsage'EnumOffSession
| -- | Represents the JSON value @"on_session"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1SetupFutureUsage'EnumOnSession
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1SetupFutureUsage' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1SetupFutureUsage'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1SetupFutureUsage'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1SetupFutureUsage'EnumEmptyString) = ""
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1SetupFutureUsage'EnumNone) = "none"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1SetupFutureUsage'EnumOffSession) = "off_session"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1SetupFutureUsage'EnumOnSession) = "on_session"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1SetupFutureUsage' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1SetupFutureUsage'EnumEmptyString
| val GHC.Classes.== "none" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1SetupFutureUsage'EnumNone
| val GHC.Classes.== "off_session" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1SetupFutureUsage'EnumOffSession
| val GHC.Classes.== "on_session" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1SetupFutureUsage'EnumOnSession
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'SepaDebit'OneOf1SetupFutureUsage'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.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'),
-- | setup_future_usage
postPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1SetupFutureUsage :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1SetupFutureUsage')
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1 where
toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("preferred_language" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1PreferredLanguage obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1SetupFutureUsage obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("preferred_language" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1PreferredLanguage obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1SetupFutureUsage obj) : GHC.Base.mempty)))
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")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "setup_future_usage"))
-- | 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,
postPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1SetupFutureUsage = 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 @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1PreferredLanguage'EnumEmptyString
| -- | 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'EnumEmptyString) = ""
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.== "" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1PreferredLanguage'EnumEmptyString
| 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 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.setup_future_usage@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1SetupFutureUsage'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1SetupFutureUsage'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'OneOf1SetupFutureUsage'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1SetupFutureUsage'EnumEmptyString
| -- | Represents the JSON value @"none"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1SetupFutureUsage'EnumNone
| -- | Represents the JSON value @"off_session"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1SetupFutureUsage'EnumOffSession
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1SetupFutureUsage' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1SetupFutureUsage'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1SetupFutureUsage'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1SetupFutureUsage'EnumEmptyString) = ""
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1SetupFutureUsage'EnumNone) = "none"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1SetupFutureUsage'EnumOffSession) = "off_session"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1SetupFutureUsage' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1SetupFutureUsage'EnumEmptyString
| val GHC.Classes.== "none" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1SetupFutureUsage'EnumNone
| val GHC.Classes.== "off_session" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1SetupFutureUsage'EnumOffSession
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'Sofort'OneOf1SetupFutureUsage'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 object schema located at @paths.\/v1\/payment_intents.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.payment_method_options.properties.us_bank_account.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1
{ -- | financial_connections
postPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'),
-- | networks
postPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1Networks :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1Networks'),
-- | setup_future_usage
postPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1SetupFutureUsage :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1SetupFutureUsage'),
-- | verification_method
postPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1VerificationMethod :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1VerificationMethod')
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1 where
toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("financial_connections" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("networks" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1Networks obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1SetupFutureUsage obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("verification_method" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1VerificationMethod obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("financial_connections" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("networks" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1Networks obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1SetupFutureUsage obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("verification_method" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1VerificationMethod obj) : GHC.Base.mempty)))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1 where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1" (\obj -> (((GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "financial_connections")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "networks")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "setup_future_usage")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "verification_method"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1 :: PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1 =
PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1
{ postPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1Networks = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1SetupFutureUsage = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'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.us_bank_account.anyOf.properties.financial_connections@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections' = PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'
{ -- | permissions
postPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions :: (GHC.Maybe.Maybe ([PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions'])),
-- | return_url
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'ReturnUrl :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections' where
toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("permissions" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("return_url" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'ReturnUrl obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("permissions" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("return_url" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'ReturnUrl obj) : GHC.Base.mempty)))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections' where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'" (\obj -> (GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "permissions")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "return_url"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections' :: PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections' =
PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'
{ postPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'ReturnUrl = 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.us_bank_account.anyOf.properties.financial_connections.properties.permissions.items@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions'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'UsBankAccount'OneOf1FinancialConnections'Permissions'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"balances"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions'EnumBalances
| -- | Represents the JSON value @"ownership"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions'EnumOwnership
| -- | Represents the JSON value @"payment_method"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions'EnumPaymentMethod
| -- | Represents the JSON value @"transactions"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions'EnumTransactions
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions'EnumBalances) = "balances"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions'EnumOwnership) = "ownership"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions'EnumPaymentMethod) = "payment_method"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions'EnumTransactions) = "transactions"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "balances" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions'EnumBalances
| val GHC.Classes.== "ownership" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions'EnumOwnership
| val GHC.Classes.== "payment_method" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions'EnumPaymentMethod
| val GHC.Classes.== "transactions" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions'EnumTransactions
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1FinancialConnections'Permissions'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.properties.us_bank_account.anyOf.properties.networks@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1Networks' = PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1Networks'
{ -- | requested
postPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1Networks'Requested :: (GHC.Maybe.Maybe ([PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1Networks'Requested']))
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1Networks' where
toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("requested" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1Networks'Requested obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("requested" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1Networks'Requested obj) : GHC.Base.mempty)))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1Networks' where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1Networks'" (\obj -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1Networks' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "requested"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1Networks'' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1Networks' :: PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1Networks'
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1Networks' = PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1Networks' {postPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1Networks'Requested = 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.us_bank_account.anyOf.properties.networks.properties.requested.items@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1Networks'Requested'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1Networks'Requested'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'UsBankAccount'OneOf1Networks'Requested'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"ach"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1Networks'Requested'EnumAch
| -- | Represents the JSON value @"us_domestic_wire"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1Networks'Requested'EnumUsDomesticWire
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1Networks'Requested' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1Networks'Requested'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1Networks'Requested'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1Networks'Requested'EnumAch) = "ach"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1Networks'Requested'EnumUsDomesticWire) = "us_domestic_wire"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1Networks'Requested' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "ach" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1Networks'Requested'EnumAch
| val GHC.Classes.== "us_domestic_wire" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1Networks'Requested'EnumUsDomesticWire
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1Networks'Requested'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.us_bank_account.anyOf.properties.setup_future_usage@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1SetupFutureUsage'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1SetupFutureUsage'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'UsBankAccount'OneOf1SetupFutureUsage'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1SetupFutureUsage'EnumEmptyString
| -- | Represents the JSON value @"none"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1SetupFutureUsage'EnumNone
| -- | Represents the JSON value @"off_session"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1SetupFutureUsage'EnumOffSession
| -- | Represents the JSON value @"on_session"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1SetupFutureUsage'EnumOnSession
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1SetupFutureUsage' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1SetupFutureUsage'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1SetupFutureUsage'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1SetupFutureUsage'EnumEmptyString) = ""
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1SetupFutureUsage'EnumNone) = "none"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1SetupFutureUsage'EnumOffSession) = "off_session"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1SetupFutureUsage'EnumOnSession) = "on_session"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1SetupFutureUsage' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1SetupFutureUsage'EnumEmptyString
| val GHC.Classes.== "none" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1SetupFutureUsage'EnumNone
| val GHC.Classes.== "off_session" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1SetupFutureUsage'EnumOffSession
| val GHC.Classes.== "on_session" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1SetupFutureUsage'EnumOnSession
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1SetupFutureUsage'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.us_bank_account.anyOf.properties.verification_method@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1VerificationMethod'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'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'UsBankAccount'OneOf1VerificationMethod'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"automatic"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1VerificationMethod'EnumAutomatic
| -- | Represents the JSON value @"instant"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1VerificationMethod'EnumInstant
| -- | Represents the JSON value @"microdeposits"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1VerificationMethod'EnumMicrodeposits
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1VerificationMethod' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1VerificationMethod'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1VerificationMethod'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1VerificationMethod'EnumAutomatic) = "automatic"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1VerificationMethod'EnumInstant) = "instant"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1VerificationMethod'EnumMicrodeposits) = "microdeposits"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1VerificationMethod' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "automatic" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1VerificationMethod'EnumAutomatic
| val GHC.Classes.== "instant" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1VerificationMethod'EnumInstant
| val GHC.Classes.== "microdeposits" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1VerificationMethod'EnumMicrodeposits
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'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.us_bank_account.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'Variants
= -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'EmptyString
| PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1 PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'Variants where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'EmptyString) = ""
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'Variants where
parseJSON val =
if
| val GHC.Classes.== "" -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'EmptyString
| GHC.Base.otherwise -> case (PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'PostPaymentIntentsRequestBodyPaymentMethodOptions'UsBankAccount'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.wechat_pay.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1 = PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1
{ -- | app_id
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1AppId :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
-- | client
postPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1Client :: PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1Client',
-- | setup_future_usage
postPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1SetupFutureUsage :: (GHC.Maybe.Maybe PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1SetupFutureUsage')
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1 where
toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("app_id" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1AppId obj) : ["client" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1Client obj] : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1SetupFutureUsage obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("app_id" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1AppId obj) : ["client" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1Client obj] : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("setup_future_usage" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1SetupFutureUsage obj) : GHC.Base.mempty)))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1 where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1" (\obj -> ((GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "app_id")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "client")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "setup_future_usage"))
-- | Create a new 'PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1' with all required fields.
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1 ::
-- | 'postPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1Client'
PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1Client' ->
PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1
mkPostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1 postPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1Client =
PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1
{ postPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1AppId = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1Client = postPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1Client,
postPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1SetupFutureUsage = 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.wechat_pay.anyOf.properties.client@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1Client'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1Client'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'WechatPay'OneOf1Client'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"android"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1Client'EnumAndroid
| -- | Represents the JSON value @"ios"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1Client'EnumIos
| -- | Represents the JSON value @"web"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1Client'EnumWeb
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1Client' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1Client'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1Client'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1Client'EnumAndroid) = "android"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1Client'EnumIos) = "ios"
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1Client'EnumWeb) = "web"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1Client' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "android" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1Client'EnumAndroid
| val GHC.Classes.== "ios" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1Client'EnumIos
| val GHC.Classes.== "web" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1Client'EnumWeb
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1Client'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.wechat_pay.anyOf.properties.setup_future_usage@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1SetupFutureUsage'
= -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1SetupFutureUsage'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'WechatPay'OneOf1SetupFutureUsage'Typed Data.Text.Internal.Text
| -- | Represents the JSON value @"none"@
PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1SetupFutureUsage'EnumNone
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1SetupFutureUsage' where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1SetupFutureUsage'Other val) = val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1SetupFutureUsage'Typed val) = Data.Aeson.Types.ToJSON.toJSON val
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1SetupFutureUsage'EnumNone) = "none"
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1SetupFutureUsage' where
parseJSON val =
GHC.Base.pure
( if
| val GHC.Classes.== "none" -> PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1SetupFutureUsage'EnumNone
| GHC.Base.otherwise -> PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1SetupFutureUsage'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.wechat_pay.anyOf@ in the specification.
data PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'Variants
= -- | Represents the JSON value @""@
PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'EmptyString
| PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1 PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1
deriving (GHC.Show.Show, GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'Variants where
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'OneOf1 a) = Data.Aeson.Types.ToJSON.toJSON a
toJSON (PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'EmptyString) = ""
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'Variants where
parseJSON val =
if
| val GHC.Classes.== "" -> GHC.Base.pure PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'EmptyString
| GHC.Base.otherwise -> case (PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'PostPaymentIntentsRequestBodyPaymentMethodOptions'WechatPay'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.radar_options@ in the specification.
--
-- Options to configure Radar. See [Radar Session](https:\/\/stripe.com\/docs\/radar\/radar-session) for more information.
data PostPaymentIntentsRequestBodyRadarOptions' = PostPaymentIntentsRequestBodyRadarOptions'
{ -- | session
--
-- Constraints:
--
-- * Maximum length of 5000
postPaymentIntentsRequestBodyRadarOptions'Session :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostPaymentIntentsRequestBodyRadarOptions' where
toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("session" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyRadarOptions'Session obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("session" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyRadarOptions'Session obj) : GHC.Base.mempty)))
instance Data.Aeson.Types.FromJSON.FromJSON PostPaymentIntentsRequestBodyRadarOptions' where
parseJSON = Data.Aeson.Types.FromJSON.withObject "PostPaymentIntentsRequestBodyRadarOptions'" (\obj -> GHC.Base.pure PostPaymentIntentsRequestBodyRadarOptions' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "session"))
-- | Create a new 'PostPaymentIntentsRequestBodyRadarOptions'' with all required fields.
mkPostPaymentIntentsRequestBodyRadarOptions' :: PostPaymentIntentsRequestBodyRadarOptions'
mkPostPaymentIntentsRequestBodyRadarOptions' = PostPaymentIntentsRequestBodyRadarOptions' {postPaymentIntentsRequestBodyRadarOptions'Session = GHC.Maybe.Nothing}
-- | 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 (Data.Foldable.concat (["address" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyShipping'Address obj] : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("carrier" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyShipping'Carrier obj) : ["name" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyShipping'Name obj] : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("phone" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyShipping'Phone obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("tracking_number" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyShipping'TrackingNumber obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (["address" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyShipping'Address obj] : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("carrier" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyShipping'Carrier obj) : ["name" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyShipping'Name obj] : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("phone" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyShipping'Phone obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("tracking_number" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyShipping'TrackingNumber obj) : GHC.Base.mempty)))
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 :: (GHC.Maybe.Maybe 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 (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("city" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyShipping'Address'City obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("country" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyShipping'Address'Country obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("line1" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyShipping'Address'Line1 obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("line2" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyShipping'Address'Line2 obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("postal_code" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyShipping'Address'PostalCode obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("state" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyShipping'Address'State obj) : GHC.Base.mempty))
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("city" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyShipping'Address'City obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("country" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyShipping'Address'Country obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("line1" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyShipping'Address'Line1 obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("line2" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyShipping'Address'Line2 obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("postal_code" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyShipping'Address'PostalCode obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("state" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyShipping'Address'State obj) : GHC.Base.mempty)))
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'
mkPostPaymentIntentsRequestBodyShipping'Address' =
PostPaymentIntentsRequestBodyShipping'Address'
{ postPaymentIntentsRequestBodyShipping'Address'City = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyShipping'Address'Country = GHC.Maybe.Nothing,
postPaymentIntentsRequestBodyShipping'Address'Line1 = GHC.Maybe.Nothing,
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 (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("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 (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("amount" Data.Aeson.Types.ToJSON..=)) (postPaymentIntentsRequestBodyTransferData'Amount obj) : ["destination" Data.Aeson.Types.ToJSON..= postPaymentIntentsRequestBodyTransferData'Destination obj] : GHC.Base.mempty)))
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)