{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
module StripeAPI.Types.SetupIntentPaymentMethodOptionsAcssDebit where
import qualified Control.Monad.Fail
import qualified Data.Aeson
import qualified Data.Aeson as Data.Aeson.Encoding.Internal
import qualified Data.Aeson as Data.Aeson.Types
import qualified Data.Aeson as Data.Aeson.Types.FromJSON
import qualified Data.Aeson as Data.Aeson.Types.Internal
import qualified Data.Aeson as Data.Aeson.Types.ToJSON
import qualified Data.ByteString.Char8
import qualified Data.ByteString.Char8 as Data.ByteString.Internal
import qualified Data.Functor
import qualified Data.Scientific
import qualified Data.Text
import qualified Data.Text.Internal
import qualified Data.Time.Calendar as Data.Time.Calendar.Days
import qualified Data.Time.LocalTime as Data.Time.LocalTime.Internal.ZonedTime
import qualified GHC.Base
import qualified GHC.Classes
import qualified GHC.Int
import qualified GHC.Show
import qualified GHC.Types
import qualified StripeAPI.Common
import StripeAPI.TypeAlias
import {-# SOURCE #-} StripeAPI.Types.SetupIntentPaymentMethodOptionsMandateOptionsAcssDebit
import qualified Prelude as GHC.Integer.Type
import qualified Prelude as GHC.Maybe
data SetupIntentPaymentMethodOptionsAcssDebit = SetupIntentPaymentMethodOptionsAcssDebit
{
SetupIntentPaymentMethodOptionsAcssDebit
-> Maybe SetupIntentPaymentMethodOptionsAcssDebitCurrency'
setupIntentPaymentMethodOptionsAcssDebitCurrency :: (GHC.Maybe.Maybe SetupIntentPaymentMethodOptionsAcssDebitCurrency'),
SetupIntentPaymentMethodOptionsAcssDebit
-> Maybe SetupIntentPaymentMethodOptionsMandateOptionsAcssDebit
setupIntentPaymentMethodOptionsAcssDebitMandateOptions :: (GHC.Maybe.Maybe SetupIntentPaymentMethodOptionsMandateOptionsAcssDebit),
SetupIntentPaymentMethodOptionsAcssDebit
-> Maybe
SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
setupIntentPaymentMethodOptionsAcssDebitVerificationMethod :: (GHC.Maybe.Maybe SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod')
}
deriving
( Int -> SetupIntentPaymentMethodOptionsAcssDebit -> ShowS
[SetupIntentPaymentMethodOptionsAcssDebit] -> ShowS
SetupIntentPaymentMethodOptionsAcssDebit -> String
(Int -> SetupIntentPaymentMethodOptionsAcssDebit -> ShowS)
-> (SetupIntentPaymentMethodOptionsAcssDebit -> String)
-> ([SetupIntentPaymentMethodOptionsAcssDebit] -> ShowS)
-> Show SetupIntentPaymentMethodOptionsAcssDebit
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SetupIntentPaymentMethodOptionsAcssDebit] -> ShowS
$cshowList :: [SetupIntentPaymentMethodOptionsAcssDebit] -> ShowS
show :: SetupIntentPaymentMethodOptionsAcssDebit -> String
$cshow :: SetupIntentPaymentMethodOptionsAcssDebit -> String
showsPrec :: Int -> SetupIntentPaymentMethodOptionsAcssDebit -> ShowS
$cshowsPrec :: Int -> SetupIntentPaymentMethodOptionsAcssDebit -> ShowS
GHC.Show.Show,
SetupIntentPaymentMethodOptionsAcssDebit
-> SetupIntentPaymentMethodOptionsAcssDebit -> Bool
(SetupIntentPaymentMethodOptionsAcssDebit
-> SetupIntentPaymentMethodOptionsAcssDebit -> Bool)
-> (SetupIntentPaymentMethodOptionsAcssDebit
-> SetupIntentPaymentMethodOptionsAcssDebit -> Bool)
-> Eq SetupIntentPaymentMethodOptionsAcssDebit
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SetupIntentPaymentMethodOptionsAcssDebit
-> SetupIntentPaymentMethodOptionsAcssDebit -> Bool
$c/= :: SetupIntentPaymentMethodOptionsAcssDebit
-> SetupIntentPaymentMethodOptionsAcssDebit -> Bool
== :: SetupIntentPaymentMethodOptionsAcssDebit
-> SetupIntentPaymentMethodOptionsAcssDebit -> Bool
$c== :: SetupIntentPaymentMethodOptionsAcssDebit
-> SetupIntentPaymentMethodOptionsAcssDebit -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON SetupIntentPaymentMethodOptionsAcssDebit where
toJSON :: SetupIntentPaymentMethodOptionsAcssDebit -> Value
toJSON SetupIntentPaymentMethodOptionsAcssDebit
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"currency" Text
-> Maybe SetupIntentPaymentMethodOptionsAcssDebitCurrency' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SetupIntentPaymentMethodOptionsAcssDebit
-> Maybe SetupIntentPaymentMethodOptionsAcssDebitCurrency'
setupIntentPaymentMethodOptionsAcssDebitCurrency SetupIntentPaymentMethodOptionsAcssDebit
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"mandate_options" Text
-> Maybe SetupIntentPaymentMethodOptionsMandateOptionsAcssDebit
-> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SetupIntentPaymentMethodOptionsAcssDebit
-> Maybe SetupIntentPaymentMethodOptionsMandateOptionsAcssDebit
setupIntentPaymentMethodOptionsAcssDebitMandateOptions SetupIntentPaymentMethodOptionsAcssDebit
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"verification_method" Text
-> Maybe
SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
-> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SetupIntentPaymentMethodOptionsAcssDebit
-> Maybe
SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
setupIntentPaymentMethodOptionsAcssDebitVerificationMethod SetupIntentPaymentMethodOptionsAcssDebit
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: SetupIntentPaymentMethodOptionsAcssDebit -> Encoding
toEncoding SetupIntentPaymentMethodOptionsAcssDebit
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"currency" Text
-> Maybe SetupIntentPaymentMethodOptionsAcssDebitCurrency'
-> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SetupIntentPaymentMethodOptionsAcssDebit
-> Maybe SetupIntentPaymentMethodOptionsAcssDebitCurrency'
setupIntentPaymentMethodOptionsAcssDebitCurrency SetupIntentPaymentMethodOptionsAcssDebit
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"mandate_options" Text
-> Maybe SetupIntentPaymentMethodOptionsMandateOptionsAcssDebit
-> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SetupIntentPaymentMethodOptionsAcssDebit
-> Maybe SetupIntentPaymentMethodOptionsMandateOptionsAcssDebit
setupIntentPaymentMethodOptionsAcssDebitMandateOptions SetupIntentPaymentMethodOptionsAcssDebit
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"verification_method" Text
-> Maybe
SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
-> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SetupIntentPaymentMethodOptionsAcssDebit
-> Maybe
SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
setupIntentPaymentMethodOptionsAcssDebitVerificationMethod SetupIntentPaymentMethodOptionsAcssDebit
obj)))
instance Data.Aeson.Types.FromJSON.FromJSON SetupIntentPaymentMethodOptionsAcssDebit where
parseJSON :: Value -> Parser SetupIntentPaymentMethodOptionsAcssDebit
parseJSON = String
-> (Object -> Parser SetupIntentPaymentMethodOptionsAcssDebit)
-> Value
-> Parser SetupIntentPaymentMethodOptionsAcssDebit
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"SetupIntentPaymentMethodOptionsAcssDebit" (\Object
obj -> (((Maybe SetupIntentPaymentMethodOptionsAcssDebitCurrency'
-> Maybe SetupIntentPaymentMethodOptionsMandateOptionsAcssDebit
-> Maybe
SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
-> SetupIntentPaymentMethodOptionsAcssDebit)
-> Parser
(Maybe SetupIntentPaymentMethodOptionsAcssDebitCurrency'
-> Maybe SetupIntentPaymentMethodOptionsMandateOptionsAcssDebit
-> Maybe
SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
-> SetupIntentPaymentMethodOptionsAcssDebit)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe SetupIntentPaymentMethodOptionsAcssDebitCurrency'
-> Maybe SetupIntentPaymentMethodOptionsMandateOptionsAcssDebit
-> Maybe
SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
-> SetupIntentPaymentMethodOptionsAcssDebit
SetupIntentPaymentMethodOptionsAcssDebit Parser
(Maybe SetupIntentPaymentMethodOptionsAcssDebitCurrency'
-> Maybe SetupIntentPaymentMethodOptionsMandateOptionsAcssDebit
-> Maybe
SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
-> SetupIntentPaymentMethodOptionsAcssDebit)
-> Parser (Maybe SetupIntentPaymentMethodOptionsAcssDebitCurrency')
-> Parser
(Maybe SetupIntentPaymentMethodOptionsMandateOptionsAcssDebit
-> Maybe
SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
-> SetupIntentPaymentMethodOptionsAcssDebit)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser (Maybe SetupIntentPaymentMethodOptionsAcssDebitCurrency')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"currency")) Parser
(Maybe SetupIntentPaymentMethodOptionsMandateOptionsAcssDebit
-> Maybe
SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
-> SetupIntentPaymentMethodOptionsAcssDebit)
-> Parser
(Maybe SetupIntentPaymentMethodOptionsMandateOptionsAcssDebit)
-> Parser
(Maybe SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
-> SetupIntentPaymentMethodOptionsAcssDebit)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser
(Maybe SetupIntentPaymentMethodOptionsMandateOptionsAcssDebit)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"mandate_options")) Parser
(Maybe SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
-> SetupIntentPaymentMethodOptionsAcssDebit)
-> Parser
(Maybe SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod')
-> Parser SetupIntentPaymentMethodOptionsAcssDebit
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser
(Maybe SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"verification_method"))
mkSetupIntentPaymentMethodOptionsAcssDebit :: SetupIntentPaymentMethodOptionsAcssDebit
mkSetupIntentPaymentMethodOptionsAcssDebit :: SetupIntentPaymentMethodOptionsAcssDebit
mkSetupIntentPaymentMethodOptionsAcssDebit =
SetupIntentPaymentMethodOptionsAcssDebit :: Maybe SetupIntentPaymentMethodOptionsAcssDebitCurrency'
-> Maybe SetupIntentPaymentMethodOptionsMandateOptionsAcssDebit
-> Maybe
SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
-> SetupIntentPaymentMethodOptionsAcssDebit
SetupIntentPaymentMethodOptionsAcssDebit
{ setupIntentPaymentMethodOptionsAcssDebitCurrency :: Maybe SetupIntentPaymentMethodOptionsAcssDebitCurrency'
setupIntentPaymentMethodOptionsAcssDebitCurrency = Maybe SetupIntentPaymentMethodOptionsAcssDebitCurrency'
forall a. Maybe a
GHC.Maybe.Nothing,
setupIntentPaymentMethodOptionsAcssDebitMandateOptions :: Maybe SetupIntentPaymentMethodOptionsMandateOptionsAcssDebit
setupIntentPaymentMethodOptionsAcssDebitMandateOptions = Maybe SetupIntentPaymentMethodOptionsMandateOptionsAcssDebit
forall a. Maybe a
GHC.Maybe.Nothing,
setupIntentPaymentMethodOptionsAcssDebitVerificationMethod :: Maybe SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
setupIntentPaymentMethodOptionsAcssDebitVerificationMethod = Maybe SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
forall a. Maybe a
GHC.Maybe.Nothing
}
data SetupIntentPaymentMethodOptionsAcssDebitCurrency'
=
SetupIntentPaymentMethodOptionsAcssDebitCurrency'Other Data.Aeson.Types.Internal.Value
|
SetupIntentPaymentMethodOptionsAcssDebitCurrency'Typed Data.Text.Internal.Text
|
SetupIntentPaymentMethodOptionsAcssDebitCurrency'EnumCad
|
SetupIntentPaymentMethodOptionsAcssDebitCurrency'EnumUsd
deriving (Int -> SetupIntentPaymentMethodOptionsAcssDebitCurrency' -> ShowS
[SetupIntentPaymentMethodOptionsAcssDebitCurrency'] -> ShowS
SetupIntentPaymentMethodOptionsAcssDebitCurrency' -> String
(Int -> SetupIntentPaymentMethodOptionsAcssDebitCurrency' -> ShowS)
-> (SetupIntentPaymentMethodOptionsAcssDebitCurrency' -> String)
-> ([SetupIntentPaymentMethodOptionsAcssDebitCurrency'] -> ShowS)
-> Show SetupIntentPaymentMethodOptionsAcssDebitCurrency'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SetupIntentPaymentMethodOptionsAcssDebitCurrency'] -> ShowS
$cshowList :: [SetupIntentPaymentMethodOptionsAcssDebitCurrency'] -> ShowS
show :: SetupIntentPaymentMethodOptionsAcssDebitCurrency' -> String
$cshow :: SetupIntentPaymentMethodOptionsAcssDebitCurrency' -> String
showsPrec :: Int -> SetupIntentPaymentMethodOptionsAcssDebitCurrency' -> ShowS
$cshowsPrec :: Int -> SetupIntentPaymentMethodOptionsAcssDebitCurrency' -> ShowS
GHC.Show.Show, SetupIntentPaymentMethodOptionsAcssDebitCurrency'
-> SetupIntentPaymentMethodOptionsAcssDebitCurrency' -> Bool
(SetupIntentPaymentMethodOptionsAcssDebitCurrency'
-> SetupIntentPaymentMethodOptionsAcssDebitCurrency' -> Bool)
-> (SetupIntentPaymentMethodOptionsAcssDebitCurrency'
-> SetupIntentPaymentMethodOptionsAcssDebitCurrency' -> Bool)
-> Eq SetupIntentPaymentMethodOptionsAcssDebitCurrency'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SetupIntentPaymentMethodOptionsAcssDebitCurrency'
-> SetupIntentPaymentMethodOptionsAcssDebitCurrency' -> Bool
$c/= :: SetupIntentPaymentMethodOptionsAcssDebitCurrency'
-> SetupIntentPaymentMethodOptionsAcssDebitCurrency' -> Bool
== :: SetupIntentPaymentMethodOptionsAcssDebitCurrency'
-> SetupIntentPaymentMethodOptionsAcssDebitCurrency' -> Bool
$c== :: SetupIntentPaymentMethodOptionsAcssDebitCurrency'
-> SetupIntentPaymentMethodOptionsAcssDebitCurrency' -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON SetupIntentPaymentMethodOptionsAcssDebitCurrency' where
toJSON :: SetupIntentPaymentMethodOptionsAcssDebitCurrency' -> Value
toJSON (SetupIntentPaymentMethodOptionsAcssDebitCurrency'Other Value
val) = Value
val
toJSON (SetupIntentPaymentMethodOptionsAcssDebitCurrency'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (SetupIntentPaymentMethodOptionsAcssDebitCurrency'
SetupIntentPaymentMethodOptionsAcssDebitCurrency'EnumCad) = Value
"cad"
toJSON (SetupIntentPaymentMethodOptionsAcssDebitCurrency'
SetupIntentPaymentMethodOptionsAcssDebitCurrency'EnumUsd) = Value
"usd"
instance Data.Aeson.Types.FromJSON.FromJSON SetupIntentPaymentMethodOptionsAcssDebitCurrency' where
parseJSON :: Value -> Parser SetupIntentPaymentMethodOptionsAcssDebitCurrency'
parseJSON Value
val =
SetupIntentPaymentMethodOptionsAcssDebitCurrency'
-> Parser SetupIntentPaymentMethodOptionsAcssDebitCurrency'
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure
( if
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"cad" -> SetupIntentPaymentMethodOptionsAcssDebitCurrency'
SetupIntentPaymentMethodOptionsAcssDebitCurrency'EnumCad
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"usd" -> SetupIntentPaymentMethodOptionsAcssDebitCurrency'
SetupIntentPaymentMethodOptionsAcssDebitCurrency'EnumUsd
| Bool
GHC.Base.otherwise -> Value -> SetupIntentPaymentMethodOptionsAcssDebitCurrency'
SetupIntentPaymentMethodOptionsAcssDebitCurrency'Other Value
val
)
data SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
=
SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'Other Data.Aeson.Types.Internal.Value
|
SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'Typed Data.Text.Internal.Text
|
SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'EnumAutomatic
|
SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'EnumInstant
|
SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'EnumMicrodeposits
deriving (Int
-> SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
-> ShowS
[SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod']
-> ShowS
SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
-> String
(Int
-> SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
-> ShowS)
-> (SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
-> String)
-> ([SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod']
-> ShowS)
-> Show SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod']
-> ShowS
$cshowList :: [SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod']
-> ShowS
show :: SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
-> String
$cshow :: SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
-> String
showsPrec :: Int
-> SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
-> ShowS
$cshowsPrec :: Int
-> SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
-> ShowS
GHC.Show.Show, SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
-> SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
-> Bool
(SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
-> SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
-> Bool)
-> (SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
-> SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
-> Bool)
-> Eq SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
-> SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
-> Bool
$c/= :: SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
-> SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
-> Bool
== :: SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
-> SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
-> Bool
$c== :: SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
-> SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
-> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod' where
toJSON :: SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
-> Value
toJSON (SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'Other Value
val) = Value
val
toJSON (SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'EnumAutomatic) = Value
"automatic"
toJSON (SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'EnumInstant) = Value
"instant"
toJSON (SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'EnumMicrodeposits) = Value
"microdeposits"
instance Data.Aeson.Types.FromJSON.FromJSON SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod' where
parseJSON :: Value
-> Parser
SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
parseJSON Value
val =
SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
-> Parser
SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure
( if
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"automatic" -> SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'EnumAutomatic
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"instant" -> SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'EnumInstant
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"microdeposits" -> SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'EnumMicrodeposits
| Bool
GHC.Base.otherwise -> Value
-> SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'
SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod'Other Value
val
)