{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
module StripeAPI.Types.SetupAttemptPaymentMethodDetailsSofort 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.Mandate
import {-# SOURCE #-} StripeAPI.Types.PaymentMethod
import qualified Prelude as GHC.Integer.Type
import qualified Prelude as GHC.Maybe
data SetupAttemptPaymentMethodDetailsSofort = SetupAttemptPaymentMethodDetailsSofort
{
SetupAttemptPaymentMethodDetailsSofort -> Maybe Text
setupAttemptPaymentMethodDetailsSofortBankCode :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
SetupAttemptPaymentMethodDetailsSofort -> Maybe Text
setupAttemptPaymentMethodDetailsSofortBankName :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
SetupAttemptPaymentMethodDetailsSofort -> Maybe Text
setupAttemptPaymentMethodDetailsSofortBic :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
SetupAttemptPaymentMethodDetailsSofort
-> Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
setupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit :: (GHC.Maybe.Maybe SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants),
SetupAttemptPaymentMethodDetailsSofort
-> Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
setupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate :: (GHC.Maybe.Maybe SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants),
SetupAttemptPaymentMethodDetailsSofort -> Maybe Text
setupAttemptPaymentMethodDetailsSofortIbanLast4 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
SetupAttemptPaymentMethodDetailsSofort
-> Maybe SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
setupAttemptPaymentMethodDetailsSofortPreferredLanguage :: (GHC.Maybe.Maybe SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'),
SetupAttemptPaymentMethodDetailsSofort -> Maybe Text
setupAttemptPaymentMethodDetailsSofortVerifiedName :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
}
deriving
( Int -> SetupAttemptPaymentMethodDetailsSofort -> ShowS
[SetupAttemptPaymentMethodDetailsSofort] -> ShowS
SetupAttemptPaymentMethodDetailsSofort -> String
(Int -> SetupAttemptPaymentMethodDetailsSofort -> ShowS)
-> (SetupAttemptPaymentMethodDetailsSofort -> String)
-> ([SetupAttemptPaymentMethodDetailsSofort] -> ShowS)
-> Show SetupAttemptPaymentMethodDetailsSofort
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SetupAttemptPaymentMethodDetailsSofort] -> ShowS
$cshowList :: [SetupAttemptPaymentMethodDetailsSofort] -> ShowS
show :: SetupAttemptPaymentMethodDetailsSofort -> String
$cshow :: SetupAttemptPaymentMethodDetailsSofort -> String
showsPrec :: Int -> SetupAttemptPaymentMethodDetailsSofort -> ShowS
$cshowsPrec :: Int -> SetupAttemptPaymentMethodDetailsSofort -> ShowS
GHC.Show.Show,
SetupAttemptPaymentMethodDetailsSofort
-> SetupAttemptPaymentMethodDetailsSofort -> Bool
(SetupAttemptPaymentMethodDetailsSofort
-> SetupAttemptPaymentMethodDetailsSofort -> Bool)
-> (SetupAttemptPaymentMethodDetailsSofort
-> SetupAttemptPaymentMethodDetailsSofort -> Bool)
-> Eq SetupAttemptPaymentMethodDetailsSofort
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SetupAttemptPaymentMethodDetailsSofort
-> SetupAttemptPaymentMethodDetailsSofort -> Bool
$c/= :: SetupAttemptPaymentMethodDetailsSofort
-> SetupAttemptPaymentMethodDetailsSofort -> Bool
== :: SetupAttemptPaymentMethodDetailsSofort
-> SetupAttemptPaymentMethodDetailsSofort -> Bool
$c== :: SetupAttemptPaymentMethodDetailsSofort
-> SetupAttemptPaymentMethodDetailsSofort -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON SetupAttemptPaymentMethodDetailsSofort where
toJSON :: SetupAttemptPaymentMethodDetailsSofort -> Value
toJSON SetupAttemptPaymentMethodDetailsSofort
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"bank_code" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SetupAttemptPaymentMethodDetailsSofort -> Maybe Text
setupAttemptPaymentMethodDetailsSofortBankCode SetupAttemptPaymentMethodDetailsSofort
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"bank_name" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SetupAttemptPaymentMethodDetailsSofort -> Maybe Text
setupAttemptPaymentMethodDetailsSofortBankName SetupAttemptPaymentMethodDetailsSofort
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"bic" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SetupAttemptPaymentMethodDetailsSofort -> Maybe Text
setupAttemptPaymentMethodDetailsSofortBic SetupAttemptPaymentMethodDetailsSofort
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"generated_sepa_debit" Text
-> Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
-> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SetupAttemptPaymentMethodDetailsSofort
-> Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
setupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit SetupAttemptPaymentMethodDetailsSofort
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"generated_sepa_debit_mandate" Text
-> Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SetupAttemptPaymentMethodDetailsSofort
-> Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
setupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate SetupAttemptPaymentMethodDetailsSofort
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"iban_last4" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SetupAttemptPaymentMethodDetailsSofort -> Maybe Text
setupAttemptPaymentMethodDetailsSofortIbanLast4 SetupAttemptPaymentMethodDetailsSofort
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"preferred_language" Text
-> Maybe SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
-> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SetupAttemptPaymentMethodDetailsSofort
-> Maybe SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
setupAttemptPaymentMethodDetailsSofortPreferredLanguage SetupAttemptPaymentMethodDetailsSofort
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"verified_name" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SetupAttemptPaymentMethodDetailsSofort -> Maybe Text
setupAttemptPaymentMethodDetailsSofortVerifiedName SetupAttemptPaymentMethodDetailsSofort
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: SetupAttemptPaymentMethodDetailsSofort -> Encoding
toEncoding SetupAttemptPaymentMethodDetailsSofort
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"bank_code" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SetupAttemptPaymentMethodDetailsSofort -> Maybe Text
setupAttemptPaymentMethodDetailsSofortBankCode SetupAttemptPaymentMethodDetailsSofort
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"bank_name" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SetupAttemptPaymentMethodDetailsSofort -> Maybe Text
setupAttemptPaymentMethodDetailsSofortBankName SetupAttemptPaymentMethodDetailsSofort
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"bic" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SetupAttemptPaymentMethodDetailsSofort -> Maybe Text
setupAttemptPaymentMethodDetailsSofortBic SetupAttemptPaymentMethodDetailsSofort
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"generated_sepa_debit" Text
-> Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
-> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SetupAttemptPaymentMethodDetailsSofort
-> Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
setupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit SetupAttemptPaymentMethodDetailsSofort
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"generated_sepa_debit_mandate" Text
-> Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SetupAttemptPaymentMethodDetailsSofort
-> Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
setupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate SetupAttemptPaymentMethodDetailsSofort
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"iban_last4" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SetupAttemptPaymentMethodDetailsSofort -> Maybe Text
setupAttemptPaymentMethodDetailsSofortIbanLast4 SetupAttemptPaymentMethodDetailsSofort
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"preferred_language" Text
-> Maybe SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
-> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SetupAttemptPaymentMethodDetailsSofort
-> Maybe SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
setupAttemptPaymentMethodDetailsSofortPreferredLanguage SetupAttemptPaymentMethodDetailsSofort
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"verified_name" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SetupAttemptPaymentMethodDetailsSofort -> Maybe Text
setupAttemptPaymentMethodDetailsSofortVerifiedName SetupAttemptPaymentMethodDetailsSofort
obj))))))))
instance Data.Aeson.Types.FromJSON.FromJSON SetupAttemptPaymentMethodDetailsSofort where
parseJSON :: Value -> Parser SetupAttemptPaymentMethodDetailsSofort
parseJSON = String
-> (Object -> Parser SetupAttemptPaymentMethodDetailsSofort)
-> Value
-> Parser SetupAttemptPaymentMethodDetailsSofort
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"SetupAttemptPaymentMethodDetailsSofort" (\Object
obj -> ((((((((Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
-> Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> Maybe Text
-> Maybe SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
-> Maybe Text
-> SetupAttemptPaymentMethodDetailsSofort)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
-> Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> Maybe Text
-> Maybe SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
-> Maybe Text
-> SetupAttemptPaymentMethodDetailsSofort)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
-> Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> Maybe Text
-> Maybe SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
-> Maybe Text
-> SetupAttemptPaymentMethodDetailsSofort
SetupAttemptPaymentMethodDetailsSofort Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
-> Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> Maybe Text
-> Maybe SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
-> Maybe Text
-> SetupAttemptPaymentMethodDetailsSofort)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
-> Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> Maybe Text
-> Maybe SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
-> Maybe Text
-> SetupAttemptPaymentMethodDetailsSofort)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"bank_code")) Parser
(Maybe Text
-> Maybe Text
-> Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
-> Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> Maybe Text
-> Maybe SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
-> Maybe Text
-> SetupAttemptPaymentMethodDetailsSofort)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
-> Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> Maybe Text
-> Maybe SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
-> Maybe Text
-> SetupAttemptPaymentMethodDetailsSofort)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"bank_name")) Parser
(Maybe Text
-> Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
-> Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> Maybe Text
-> Maybe SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
-> Maybe Text
-> SetupAttemptPaymentMethodDetailsSofort)
-> Parser (Maybe Text)
-> Parser
(Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
-> Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> Maybe Text
-> Maybe SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
-> Maybe Text
-> SetupAttemptPaymentMethodDetailsSofort)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"bic")) Parser
(Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
-> Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> Maybe Text
-> Maybe SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
-> Maybe Text
-> SetupAttemptPaymentMethodDetailsSofort)
-> Parser
(Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants)
-> Parser
(Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> Maybe Text
-> Maybe SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
-> Maybe Text
-> SetupAttemptPaymentMethodDetailsSofort)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser
(Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"generated_sepa_debit")) Parser
(Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> Maybe Text
-> Maybe SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
-> Maybe Text
-> SetupAttemptPaymentMethodDetailsSofort)
-> Parser
(Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants)
-> Parser
(Maybe Text
-> Maybe SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
-> Maybe Text
-> SetupAttemptPaymentMethodDetailsSofort)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser
(Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"generated_sepa_debit_mandate")) Parser
(Maybe Text
-> Maybe SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
-> Maybe Text
-> SetupAttemptPaymentMethodDetailsSofort)
-> Parser (Maybe Text)
-> Parser
(Maybe SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
-> Maybe Text -> SetupAttemptPaymentMethodDetailsSofort)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"iban_last4")) Parser
(Maybe SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
-> Maybe Text -> SetupAttemptPaymentMethodDetailsSofort)
-> Parser
(Maybe SetupAttemptPaymentMethodDetailsSofortPreferredLanguage')
-> Parser (Maybe Text -> SetupAttemptPaymentMethodDetailsSofort)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser
(Maybe SetupAttemptPaymentMethodDetailsSofortPreferredLanguage')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"preferred_language")) Parser (Maybe Text -> SetupAttemptPaymentMethodDetailsSofort)
-> Parser (Maybe Text)
-> Parser SetupAttemptPaymentMethodDetailsSofort
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"verified_name"))
mkSetupAttemptPaymentMethodDetailsSofort :: SetupAttemptPaymentMethodDetailsSofort
mkSetupAttemptPaymentMethodDetailsSofort :: SetupAttemptPaymentMethodDetailsSofort
mkSetupAttemptPaymentMethodDetailsSofort =
SetupAttemptPaymentMethodDetailsSofort :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
-> Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> Maybe Text
-> Maybe SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
-> Maybe Text
-> SetupAttemptPaymentMethodDetailsSofort
SetupAttemptPaymentMethodDetailsSofort
{ setupAttemptPaymentMethodDetailsSofortBankCode :: Maybe Text
setupAttemptPaymentMethodDetailsSofortBankCode = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
setupAttemptPaymentMethodDetailsSofortBankName :: Maybe Text
setupAttemptPaymentMethodDetailsSofortBankName = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
setupAttemptPaymentMethodDetailsSofortBic :: Maybe Text
setupAttemptPaymentMethodDetailsSofortBic = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
setupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit :: Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
setupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit = Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
forall a. Maybe a
GHC.Maybe.Nothing,
setupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate :: Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
setupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate = Maybe
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
forall a. Maybe a
GHC.Maybe.Nothing,
setupAttemptPaymentMethodDetailsSofortIbanLast4 :: Maybe Text
setupAttemptPaymentMethodDetailsSofortIbanLast4 = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
setupAttemptPaymentMethodDetailsSofortPreferredLanguage :: Maybe SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
setupAttemptPaymentMethodDetailsSofortPreferredLanguage = Maybe SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
forall a. Maybe a
GHC.Maybe.Nothing,
setupAttemptPaymentMethodDetailsSofortVerifiedName :: Maybe Text
setupAttemptPaymentMethodDetailsSofortVerifiedName = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
}
data SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
= SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Text Data.Text.Internal.Text
| SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'PaymentMethod PaymentMethod
deriving (Int
-> SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
-> ShowS
[SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants]
-> ShowS
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
-> String
(Int
-> SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
-> ShowS)
-> (SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
-> String)
-> ([SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants]
-> ShowS)
-> Show
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants]
-> ShowS
$cshowList :: [SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants]
-> ShowS
show :: SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
-> String
$cshow :: SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
-> String
showsPrec :: Int
-> SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
-> ShowS
$cshowsPrec :: Int
-> SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
-> ShowS
GHC.Show.Show, SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
-> SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
-> Bool
(SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
-> SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
-> Bool)
-> (SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
-> SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
-> Bool)
-> Eq
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
-> SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
-> Bool
$c/= :: SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
-> SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
-> Bool
== :: SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
-> SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
-> Bool
$c== :: SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
-> SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
-> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants where
toJSON :: SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
-> Value
toJSON (SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Text Text
a) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
a
toJSON (SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'PaymentMethod PaymentMethod
a) = PaymentMethod -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON PaymentMethod
a
instance Data.Aeson.Types.FromJSON.FromJSON SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants where
parseJSON :: Value
-> Parser
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
parseJSON Value
val = case (Text
-> SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Text (Text
-> SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants)
-> Result Text
-> Result
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Text
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
-> Result
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
-> Result
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((PaymentMethod
-> SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'PaymentMethod (PaymentMethod
-> SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants)
-> Result PaymentMethod
-> Result
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result PaymentMethod
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
-> Result
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
-> Result
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> String
-> Result
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
forall a. String -> Result a
Data.Aeson.Types.Internal.Error String
"No variant matched") of
Data.Aeson.Types.Internal.Success SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
a -> SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
-> Parser
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
a
Data.Aeson.Types.Internal.Error String
a -> String
-> Parser
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebit'Variants
forall (m :: * -> *) a. MonadFail m => String -> m a
Control.Monad.Fail.fail String
a
data SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
= SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Text Data.Text.Internal.Text
| SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Mandate Mandate
deriving (Int
-> SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> ShowS
[SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants]
-> ShowS
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> String
(Int
-> SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> ShowS)
-> (SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> String)
-> ([SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants]
-> ShowS)
-> Show
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants]
-> ShowS
$cshowList :: [SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants]
-> ShowS
show :: SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> String
$cshow :: SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> String
showsPrec :: Int
-> SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> ShowS
$cshowsPrec :: Int
-> SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> ShowS
GHC.Show.Show, SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> Bool
(SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> Bool)
-> (SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> Bool)
-> Eq
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> Bool
$c/= :: SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> Bool
== :: SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> Bool
$c== :: SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants where
toJSON :: SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> Value
toJSON (SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Text Text
a) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
a
toJSON (SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Mandate Mandate
a) = Mandate -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Mandate
a
instance Data.Aeson.Types.FromJSON.FromJSON SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants where
parseJSON :: Value
-> Parser
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
parseJSON Value
val = case (Text
-> SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Text (Text
-> SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants)
-> Result Text
-> Result
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Text
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> Result
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> Result
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((Mandate
-> SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Mandate (Mandate
-> SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants)
-> Result Mandate
-> Result
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Mandate
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> Result
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> Result
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> String
-> Result
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
forall a. String -> Result a
Data.Aeson.Types.Internal.Error String
"No variant matched") of
Data.Aeson.Types.Internal.Success SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
a -> SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
-> Parser
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
a
Data.Aeson.Types.Internal.Error String
a -> String
-> Parser
SetupAttemptPaymentMethodDetailsSofortGeneratedSepaDebitMandate'Variants
forall (m :: * -> *) a. MonadFail m => String -> m a
Control.Monad.Fail.fail String
a
data SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
=
SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'Other Data.Aeson.Types.Internal.Value
|
SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'Typed Data.Text.Internal.Text
|
SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'EnumDe
|
SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'EnumEn
|
SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'EnumFr
|
SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'EnumNl
deriving (Int
-> SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
-> ShowS
[SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'] -> ShowS
SetupAttemptPaymentMethodDetailsSofortPreferredLanguage' -> String
(Int
-> SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
-> ShowS)
-> (SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
-> String)
-> ([SetupAttemptPaymentMethodDetailsSofortPreferredLanguage']
-> ShowS)
-> Show SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'] -> ShowS
$cshowList :: [SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'] -> ShowS
show :: SetupAttemptPaymentMethodDetailsSofortPreferredLanguage' -> String
$cshow :: SetupAttemptPaymentMethodDetailsSofortPreferredLanguage' -> String
showsPrec :: Int
-> SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
-> ShowS
$cshowsPrec :: Int
-> SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
-> ShowS
GHC.Show.Show, SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
-> SetupAttemptPaymentMethodDetailsSofortPreferredLanguage' -> Bool
(SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
-> SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
-> Bool)
-> (SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
-> SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
-> Bool)
-> Eq SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
-> SetupAttemptPaymentMethodDetailsSofortPreferredLanguage' -> Bool
$c/= :: SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
-> SetupAttemptPaymentMethodDetailsSofortPreferredLanguage' -> Bool
== :: SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
-> SetupAttemptPaymentMethodDetailsSofortPreferredLanguage' -> Bool
$c== :: SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
-> SetupAttemptPaymentMethodDetailsSofortPreferredLanguage' -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON SetupAttemptPaymentMethodDetailsSofortPreferredLanguage' where
toJSON :: SetupAttemptPaymentMethodDetailsSofortPreferredLanguage' -> Value
toJSON (SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'Other Value
val) = Value
val
toJSON (SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'EnumDe) = Value
"de"
toJSON (SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'EnumEn) = Value
"en"
toJSON (SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'EnumFr) = Value
"fr"
toJSON (SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'EnumNl) = Value
"nl"
instance Data.Aeson.Types.FromJSON.FromJSON SetupAttemptPaymentMethodDetailsSofortPreferredLanguage' where
parseJSON :: Value
-> Parser SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
parseJSON Value
val =
SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
-> Parser SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
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
"de" -> SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'EnumDe
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"en" -> SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'EnumEn
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"fr" -> SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'EnumFr
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"nl" -> SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'EnumNl
| Bool
GHC.Base.otherwise -> Value -> SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'
SetupAttemptPaymentMethodDetailsSofortPreferredLanguage'Other Value
val
)