{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
module StripeAPI.Types.IssuingCardholderIndividual 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.File
import {-# SOURCE #-} StripeAPI.Types.IssuingCardholderIdDocument
import {-# SOURCE #-} StripeAPI.Types.IssuingCardholderIndividualDob
import {-# SOURCE #-} StripeAPI.Types.IssuingCardholderVerification
import qualified Prelude as GHC.Integer.Type
import qualified Prelude as GHC.Maybe
data IssuingCardholderIndividual = IssuingCardholderIndividual
{
IssuingCardholderIndividual
-> Maybe IssuingCardholderIndividualDob'
issuingCardholderIndividualDob :: (GHC.Maybe.Maybe IssuingCardholderIndividualDob'),
IssuingCardholderIndividual -> Text
issuingCardholderIndividualFirstName :: Data.Text.Internal.Text,
IssuingCardholderIndividual -> Text
issuingCardholderIndividualLastName :: Data.Text.Internal.Text,
IssuingCardholderIndividual
-> Maybe IssuingCardholderIndividualVerification'
issuingCardholderIndividualVerification :: (GHC.Maybe.Maybe IssuingCardholderIndividualVerification')
}
deriving
( Int -> IssuingCardholderIndividual -> ShowS
[IssuingCardholderIndividual] -> ShowS
IssuingCardholderIndividual -> String
(Int -> IssuingCardholderIndividual -> ShowS)
-> (IssuingCardholderIndividual -> String)
-> ([IssuingCardholderIndividual] -> ShowS)
-> Show IssuingCardholderIndividual
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IssuingCardholderIndividual] -> ShowS
$cshowList :: [IssuingCardholderIndividual] -> ShowS
show :: IssuingCardholderIndividual -> String
$cshow :: IssuingCardholderIndividual -> String
showsPrec :: Int -> IssuingCardholderIndividual -> ShowS
$cshowsPrec :: Int -> IssuingCardholderIndividual -> ShowS
GHC.Show.Show,
IssuingCardholderIndividual -> IssuingCardholderIndividual -> Bool
(IssuingCardholderIndividual
-> IssuingCardholderIndividual -> Bool)
-> (IssuingCardholderIndividual
-> IssuingCardholderIndividual -> Bool)
-> Eq IssuingCardholderIndividual
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IssuingCardholderIndividual -> IssuingCardholderIndividual -> Bool
$c/= :: IssuingCardholderIndividual -> IssuingCardholderIndividual -> Bool
== :: IssuingCardholderIndividual -> IssuingCardholderIndividual -> Bool
$c== :: IssuingCardholderIndividual -> IssuingCardholderIndividual -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON IssuingCardholderIndividual where
toJSON :: IssuingCardholderIndividual -> Value
toJSON IssuingCardholderIndividual
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"dob" Text -> Maybe IssuingCardholderIndividualDob' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingCardholderIndividual
-> Maybe IssuingCardholderIndividualDob'
issuingCardholderIndividualDob IssuingCardholderIndividual
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"first_name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingCardholderIndividual -> Text
issuingCardholderIndividualFirstName IssuingCardholderIndividual
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"last_name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingCardholderIndividual -> Text
issuingCardholderIndividualLastName IssuingCardholderIndividual
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"verification" Text -> Maybe IssuingCardholderIndividualVerification' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingCardholderIndividual
-> Maybe IssuingCardholderIndividualVerification'
issuingCardholderIndividualVerification IssuingCardholderIndividual
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: IssuingCardholderIndividual -> Encoding
toEncoding IssuingCardholderIndividual
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"dob" Text -> Maybe IssuingCardholderIndividualDob' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingCardholderIndividual
-> Maybe IssuingCardholderIndividualDob'
issuingCardholderIndividualDob IssuingCardholderIndividual
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"first_name" Text -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingCardholderIndividual -> Text
issuingCardholderIndividualFirstName IssuingCardholderIndividual
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"last_name" Text -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingCardholderIndividual -> Text
issuingCardholderIndividualLastName IssuingCardholderIndividual
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"verification" Text -> Maybe IssuingCardholderIndividualVerification' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingCardholderIndividual
-> Maybe IssuingCardholderIndividualVerification'
issuingCardholderIndividualVerification IssuingCardholderIndividual
obj))))
instance Data.Aeson.Types.FromJSON.FromJSON IssuingCardholderIndividual where
parseJSON :: Value -> Parser IssuingCardholderIndividual
parseJSON = String
-> (Object -> Parser IssuingCardholderIndividual)
-> Value
-> Parser IssuingCardholderIndividual
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"IssuingCardholderIndividual" (\Object
obj -> ((((Maybe IssuingCardholderIndividualDob'
-> Text
-> Text
-> Maybe IssuingCardholderIndividualVerification'
-> IssuingCardholderIndividual)
-> Parser
(Maybe IssuingCardholderIndividualDob'
-> Text
-> Text
-> Maybe IssuingCardholderIndividualVerification'
-> IssuingCardholderIndividual)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe IssuingCardholderIndividualDob'
-> Text
-> Text
-> Maybe IssuingCardholderIndividualVerification'
-> IssuingCardholderIndividual
IssuingCardholderIndividual Parser
(Maybe IssuingCardholderIndividualDob'
-> Text
-> Text
-> Maybe IssuingCardholderIndividualVerification'
-> IssuingCardholderIndividual)
-> Parser (Maybe IssuingCardholderIndividualDob')
-> Parser
(Text
-> Text
-> Maybe IssuingCardholderIndividualVerification'
-> IssuingCardholderIndividual)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe IssuingCardholderIndividualDob')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"dob")) Parser
(Text
-> Text
-> Maybe IssuingCardholderIndividualVerification'
-> IssuingCardholderIndividual)
-> Parser Text
-> Parser
(Text
-> Maybe IssuingCardholderIndividualVerification'
-> IssuingCardholderIndividual)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"first_name")) Parser
(Text
-> Maybe IssuingCardholderIndividualVerification'
-> IssuingCardholderIndividual)
-> Parser Text
-> Parser
(Maybe IssuingCardholderIndividualVerification'
-> IssuingCardholderIndividual)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"last_name")) Parser
(Maybe IssuingCardholderIndividualVerification'
-> IssuingCardholderIndividual)
-> Parser (Maybe IssuingCardholderIndividualVerification')
-> Parser IssuingCardholderIndividual
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text -> Parser (Maybe IssuingCardholderIndividualVerification')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"verification"))
mkIssuingCardholderIndividual ::
Data.Text.Internal.Text ->
Data.Text.Internal.Text ->
IssuingCardholderIndividual
mkIssuingCardholderIndividual :: Text -> Text -> IssuingCardholderIndividual
mkIssuingCardholderIndividual Text
issuingCardholderIndividualFirstName Text
issuingCardholderIndividualLastName =
IssuingCardholderIndividual :: Maybe IssuingCardholderIndividualDob'
-> Text
-> Text
-> Maybe IssuingCardholderIndividualVerification'
-> IssuingCardholderIndividual
IssuingCardholderIndividual
{ issuingCardholderIndividualDob :: Maybe IssuingCardholderIndividualDob'
issuingCardholderIndividualDob = Maybe IssuingCardholderIndividualDob'
forall a. Maybe a
GHC.Maybe.Nothing,
issuingCardholderIndividualFirstName :: Text
issuingCardholderIndividualFirstName = Text
issuingCardholderIndividualFirstName,
issuingCardholderIndividualLastName :: Text
issuingCardholderIndividualLastName = Text
issuingCardholderIndividualLastName,
issuingCardholderIndividualVerification :: Maybe IssuingCardholderIndividualVerification'
issuingCardholderIndividualVerification = Maybe IssuingCardholderIndividualVerification'
forall a. Maybe a
GHC.Maybe.Nothing
}
data IssuingCardholderIndividualDob' = IssuingCardholderIndividualDob'
{
IssuingCardholderIndividualDob' -> Maybe Int
issuingCardholderIndividualDob'Day :: (GHC.Maybe.Maybe GHC.Types.Int),
IssuingCardholderIndividualDob' -> Maybe Int
issuingCardholderIndividualDob'Month :: (GHC.Maybe.Maybe GHC.Types.Int),
IssuingCardholderIndividualDob' -> Maybe Int
issuingCardholderIndividualDob'Year :: (GHC.Maybe.Maybe GHC.Types.Int)
}
deriving
( Int -> IssuingCardholderIndividualDob' -> ShowS
[IssuingCardholderIndividualDob'] -> ShowS
IssuingCardholderIndividualDob' -> String
(Int -> IssuingCardholderIndividualDob' -> ShowS)
-> (IssuingCardholderIndividualDob' -> String)
-> ([IssuingCardholderIndividualDob'] -> ShowS)
-> Show IssuingCardholderIndividualDob'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IssuingCardholderIndividualDob'] -> ShowS
$cshowList :: [IssuingCardholderIndividualDob'] -> ShowS
show :: IssuingCardholderIndividualDob' -> String
$cshow :: IssuingCardholderIndividualDob' -> String
showsPrec :: Int -> IssuingCardholderIndividualDob' -> ShowS
$cshowsPrec :: Int -> IssuingCardholderIndividualDob' -> ShowS
GHC.Show.Show,
IssuingCardholderIndividualDob'
-> IssuingCardholderIndividualDob' -> Bool
(IssuingCardholderIndividualDob'
-> IssuingCardholderIndividualDob' -> Bool)
-> (IssuingCardholderIndividualDob'
-> IssuingCardholderIndividualDob' -> Bool)
-> Eq IssuingCardholderIndividualDob'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IssuingCardholderIndividualDob'
-> IssuingCardholderIndividualDob' -> Bool
$c/= :: IssuingCardholderIndividualDob'
-> IssuingCardholderIndividualDob' -> Bool
== :: IssuingCardholderIndividualDob'
-> IssuingCardholderIndividualDob' -> Bool
$c== :: IssuingCardholderIndividualDob'
-> IssuingCardholderIndividualDob' -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON IssuingCardholderIndividualDob' where
toJSON :: IssuingCardholderIndividualDob' -> Value
toJSON IssuingCardholderIndividualDob'
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"day" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingCardholderIndividualDob' -> Maybe Int
issuingCardholderIndividualDob'Day IssuingCardholderIndividualDob'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"month" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingCardholderIndividualDob' -> Maybe Int
issuingCardholderIndividualDob'Month IssuingCardholderIndividualDob'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"year" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingCardholderIndividualDob' -> Maybe Int
issuingCardholderIndividualDob'Year IssuingCardholderIndividualDob'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: IssuingCardholderIndividualDob' -> Encoding
toEncoding IssuingCardholderIndividualDob'
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"day" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingCardholderIndividualDob' -> Maybe Int
issuingCardholderIndividualDob'Day IssuingCardholderIndividualDob'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"month" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingCardholderIndividualDob' -> Maybe Int
issuingCardholderIndividualDob'Month IssuingCardholderIndividualDob'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"year" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingCardholderIndividualDob' -> Maybe Int
issuingCardholderIndividualDob'Year IssuingCardholderIndividualDob'
obj)))
instance Data.Aeson.Types.FromJSON.FromJSON IssuingCardholderIndividualDob' where
parseJSON :: Value -> Parser IssuingCardholderIndividualDob'
parseJSON = String
-> (Object -> Parser IssuingCardholderIndividualDob')
-> Value
-> Parser IssuingCardholderIndividualDob'
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"IssuingCardholderIndividualDob'" (\Object
obj -> (((Maybe Int
-> Maybe Int -> Maybe Int -> IssuingCardholderIndividualDob')
-> Parser
(Maybe Int
-> Maybe Int -> Maybe Int -> IssuingCardholderIndividualDob')
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe Int
-> Maybe Int -> Maybe Int -> IssuingCardholderIndividualDob'
IssuingCardholderIndividualDob' Parser
(Maybe Int
-> Maybe Int -> Maybe Int -> IssuingCardholderIndividualDob')
-> Parser (Maybe Int)
-> Parser
(Maybe Int -> Maybe Int -> IssuingCardholderIndividualDob')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"day")) Parser (Maybe Int -> Maybe Int -> IssuingCardholderIndividualDob')
-> Parser (Maybe Int)
-> Parser (Maybe Int -> IssuingCardholderIndividualDob')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"month")) Parser (Maybe Int -> IssuingCardholderIndividualDob')
-> Parser (Maybe Int) -> Parser IssuingCardholderIndividualDob'
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"year"))
mkIssuingCardholderIndividualDob' :: IssuingCardholderIndividualDob'
mkIssuingCardholderIndividualDob' :: IssuingCardholderIndividualDob'
mkIssuingCardholderIndividualDob' =
IssuingCardholderIndividualDob' :: Maybe Int
-> Maybe Int -> Maybe Int -> IssuingCardholderIndividualDob'
IssuingCardholderIndividualDob'
{ issuingCardholderIndividualDob'Day :: Maybe Int
issuingCardholderIndividualDob'Day = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
issuingCardholderIndividualDob'Month :: Maybe Int
issuingCardholderIndividualDob'Month = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
issuingCardholderIndividualDob'Year :: Maybe Int
issuingCardholderIndividualDob'Year = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing
}
data IssuingCardholderIndividualVerification' = IssuingCardholderIndividualVerification'
{
IssuingCardholderIndividualVerification'
-> Maybe IssuingCardholderIndividualVerification'Document'
issuingCardholderIndividualVerification'Document :: (GHC.Maybe.Maybe IssuingCardholderIndividualVerification'Document')
}
deriving
( Int -> IssuingCardholderIndividualVerification' -> ShowS
[IssuingCardholderIndividualVerification'] -> ShowS
IssuingCardholderIndividualVerification' -> String
(Int -> IssuingCardholderIndividualVerification' -> ShowS)
-> (IssuingCardholderIndividualVerification' -> String)
-> ([IssuingCardholderIndividualVerification'] -> ShowS)
-> Show IssuingCardholderIndividualVerification'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IssuingCardholderIndividualVerification'] -> ShowS
$cshowList :: [IssuingCardholderIndividualVerification'] -> ShowS
show :: IssuingCardholderIndividualVerification' -> String
$cshow :: IssuingCardholderIndividualVerification' -> String
showsPrec :: Int -> IssuingCardholderIndividualVerification' -> ShowS
$cshowsPrec :: Int -> IssuingCardholderIndividualVerification' -> ShowS
GHC.Show.Show,
IssuingCardholderIndividualVerification'
-> IssuingCardholderIndividualVerification' -> Bool
(IssuingCardholderIndividualVerification'
-> IssuingCardholderIndividualVerification' -> Bool)
-> (IssuingCardholderIndividualVerification'
-> IssuingCardholderIndividualVerification' -> Bool)
-> Eq IssuingCardholderIndividualVerification'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IssuingCardholderIndividualVerification'
-> IssuingCardholderIndividualVerification' -> Bool
$c/= :: IssuingCardholderIndividualVerification'
-> IssuingCardholderIndividualVerification' -> Bool
== :: IssuingCardholderIndividualVerification'
-> IssuingCardholderIndividualVerification' -> Bool
$c== :: IssuingCardholderIndividualVerification'
-> IssuingCardholderIndividualVerification' -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON IssuingCardholderIndividualVerification' where
toJSON :: IssuingCardholderIndividualVerification' -> Value
toJSON IssuingCardholderIndividualVerification'
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"document" Text
-> Maybe IssuingCardholderIndividualVerification'Document' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingCardholderIndividualVerification'
-> Maybe IssuingCardholderIndividualVerification'Document'
issuingCardholderIndividualVerification'Document IssuingCardholderIndividualVerification'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: IssuingCardholderIndividualVerification' -> Encoding
toEncoding IssuingCardholderIndividualVerification'
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs (Text
"document" Text
-> Maybe IssuingCardholderIndividualVerification'Document'
-> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingCardholderIndividualVerification'
-> Maybe IssuingCardholderIndividualVerification'Document'
issuingCardholderIndividualVerification'Document IssuingCardholderIndividualVerification'
obj)
instance Data.Aeson.Types.FromJSON.FromJSON IssuingCardholderIndividualVerification' where
parseJSON :: Value -> Parser IssuingCardholderIndividualVerification'
parseJSON = String
-> (Object -> Parser IssuingCardholderIndividualVerification')
-> Value
-> Parser IssuingCardholderIndividualVerification'
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"IssuingCardholderIndividualVerification'" (\Object
obj -> (Maybe IssuingCardholderIndividualVerification'Document'
-> IssuingCardholderIndividualVerification')
-> Parser
(Maybe IssuingCardholderIndividualVerification'Document'
-> IssuingCardholderIndividualVerification')
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe IssuingCardholderIndividualVerification'Document'
-> IssuingCardholderIndividualVerification'
IssuingCardholderIndividualVerification' Parser
(Maybe IssuingCardholderIndividualVerification'Document'
-> IssuingCardholderIndividualVerification')
-> Parser (Maybe IssuingCardholderIndividualVerification'Document')
-> Parser IssuingCardholderIndividualVerification'
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser (Maybe IssuingCardholderIndividualVerification'Document')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"document"))
mkIssuingCardholderIndividualVerification' :: IssuingCardholderIndividualVerification'
mkIssuingCardholderIndividualVerification' :: IssuingCardholderIndividualVerification'
mkIssuingCardholderIndividualVerification' = IssuingCardholderIndividualVerification' :: Maybe IssuingCardholderIndividualVerification'Document'
-> IssuingCardholderIndividualVerification'
IssuingCardholderIndividualVerification' {issuingCardholderIndividualVerification'Document :: Maybe IssuingCardholderIndividualVerification'Document'
issuingCardholderIndividualVerification'Document = Maybe IssuingCardholderIndividualVerification'Document'
forall a. Maybe a
GHC.Maybe.Nothing}
data IssuingCardholderIndividualVerification'Document' = IssuingCardholderIndividualVerification'Document'
{
IssuingCardholderIndividualVerification'Document'
-> Maybe
IssuingCardholderIndividualVerification'Document'Back'Variants
issuingCardholderIndividualVerification'Document'Back :: (GHC.Maybe.Maybe IssuingCardholderIndividualVerification'Document'Back'Variants),
IssuingCardholderIndividualVerification'Document'
-> Maybe
IssuingCardholderIndividualVerification'Document'Front'Variants
issuingCardholderIndividualVerification'Document'Front :: (GHC.Maybe.Maybe IssuingCardholderIndividualVerification'Document'Front'Variants)
}
deriving
( Int -> IssuingCardholderIndividualVerification'Document' -> ShowS
[IssuingCardholderIndividualVerification'Document'] -> ShowS
IssuingCardholderIndividualVerification'Document' -> String
(Int -> IssuingCardholderIndividualVerification'Document' -> ShowS)
-> (IssuingCardholderIndividualVerification'Document' -> String)
-> ([IssuingCardholderIndividualVerification'Document'] -> ShowS)
-> Show IssuingCardholderIndividualVerification'Document'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IssuingCardholderIndividualVerification'Document'] -> ShowS
$cshowList :: [IssuingCardholderIndividualVerification'Document'] -> ShowS
show :: IssuingCardholderIndividualVerification'Document' -> String
$cshow :: IssuingCardholderIndividualVerification'Document' -> String
showsPrec :: Int -> IssuingCardholderIndividualVerification'Document' -> ShowS
$cshowsPrec :: Int -> IssuingCardholderIndividualVerification'Document' -> ShowS
GHC.Show.Show,
IssuingCardholderIndividualVerification'Document'
-> IssuingCardholderIndividualVerification'Document' -> Bool
(IssuingCardholderIndividualVerification'Document'
-> IssuingCardholderIndividualVerification'Document' -> Bool)
-> (IssuingCardholderIndividualVerification'Document'
-> IssuingCardholderIndividualVerification'Document' -> Bool)
-> Eq IssuingCardholderIndividualVerification'Document'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IssuingCardholderIndividualVerification'Document'
-> IssuingCardholderIndividualVerification'Document' -> Bool
$c/= :: IssuingCardholderIndividualVerification'Document'
-> IssuingCardholderIndividualVerification'Document' -> Bool
== :: IssuingCardholderIndividualVerification'Document'
-> IssuingCardholderIndividualVerification'Document' -> Bool
$c== :: IssuingCardholderIndividualVerification'Document'
-> IssuingCardholderIndividualVerification'Document' -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON IssuingCardholderIndividualVerification'Document' where
toJSON :: IssuingCardholderIndividualVerification'Document' -> Value
toJSON IssuingCardholderIndividualVerification'Document'
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"back" Text
-> Maybe
IssuingCardholderIndividualVerification'Document'Back'Variants
-> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingCardholderIndividualVerification'Document'
-> Maybe
IssuingCardholderIndividualVerification'Document'Back'Variants
issuingCardholderIndividualVerification'Document'Back IssuingCardholderIndividualVerification'Document'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"front" Text
-> Maybe
IssuingCardholderIndividualVerification'Document'Front'Variants
-> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingCardholderIndividualVerification'Document'
-> Maybe
IssuingCardholderIndividualVerification'Document'Front'Variants
issuingCardholderIndividualVerification'Document'Front IssuingCardholderIndividualVerification'Document'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: IssuingCardholderIndividualVerification'Document' -> Encoding
toEncoding IssuingCardholderIndividualVerification'Document'
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"back" Text
-> Maybe
IssuingCardholderIndividualVerification'Document'Back'Variants
-> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingCardholderIndividualVerification'Document'
-> Maybe
IssuingCardholderIndividualVerification'Document'Back'Variants
issuingCardholderIndividualVerification'Document'Back IssuingCardholderIndividualVerification'Document'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"front" Text
-> Maybe
IssuingCardholderIndividualVerification'Document'Front'Variants
-> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingCardholderIndividualVerification'Document'
-> Maybe
IssuingCardholderIndividualVerification'Document'Front'Variants
issuingCardholderIndividualVerification'Document'Front IssuingCardholderIndividualVerification'Document'
obj))
instance Data.Aeson.Types.FromJSON.FromJSON IssuingCardholderIndividualVerification'Document' where
parseJSON :: Value -> Parser IssuingCardholderIndividualVerification'Document'
parseJSON = String
-> (Object
-> Parser IssuingCardholderIndividualVerification'Document')
-> Value
-> Parser IssuingCardholderIndividualVerification'Document'
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"IssuingCardholderIndividualVerification'Document'" (\Object
obj -> ((Maybe
IssuingCardholderIndividualVerification'Document'Back'Variants
-> Maybe
IssuingCardholderIndividualVerification'Document'Front'Variants
-> IssuingCardholderIndividualVerification'Document')
-> Parser
(Maybe
IssuingCardholderIndividualVerification'Document'Back'Variants
-> Maybe
IssuingCardholderIndividualVerification'Document'Front'Variants
-> IssuingCardholderIndividualVerification'Document')
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe
IssuingCardholderIndividualVerification'Document'Back'Variants
-> Maybe
IssuingCardholderIndividualVerification'Document'Front'Variants
-> IssuingCardholderIndividualVerification'Document'
IssuingCardholderIndividualVerification'Document' Parser
(Maybe
IssuingCardholderIndividualVerification'Document'Back'Variants
-> Maybe
IssuingCardholderIndividualVerification'Document'Front'Variants
-> IssuingCardholderIndividualVerification'Document')
-> Parser
(Maybe
IssuingCardholderIndividualVerification'Document'Back'Variants)
-> Parser
(Maybe
IssuingCardholderIndividualVerification'Document'Front'Variants
-> IssuingCardholderIndividualVerification'Document')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser
(Maybe
IssuingCardholderIndividualVerification'Document'Back'Variants)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"back")) Parser
(Maybe
IssuingCardholderIndividualVerification'Document'Front'Variants
-> IssuingCardholderIndividualVerification'Document')
-> Parser
(Maybe
IssuingCardholderIndividualVerification'Document'Front'Variants)
-> Parser IssuingCardholderIndividualVerification'Document'
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser
(Maybe
IssuingCardholderIndividualVerification'Document'Front'Variants)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"front"))
mkIssuingCardholderIndividualVerification'Document' :: IssuingCardholderIndividualVerification'Document'
mkIssuingCardholderIndividualVerification'Document' :: IssuingCardholderIndividualVerification'Document'
mkIssuingCardholderIndividualVerification'Document' =
IssuingCardholderIndividualVerification'Document' :: Maybe
IssuingCardholderIndividualVerification'Document'Back'Variants
-> Maybe
IssuingCardholderIndividualVerification'Document'Front'Variants
-> IssuingCardholderIndividualVerification'Document'
IssuingCardholderIndividualVerification'Document'
{ issuingCardholderIndividualVerification'Document'Back :: Maybe
IssuingCardholderIndividualVerification'Document'Back'Variants
issuingCardholderIndividualVerification'Document'Back = Maybe
IssuingCardholderIndividualVerification'Document'Back'Variants
forall a. Maybe a
GHC.Maybe.Nothing,
issuingCardholderIndividualVerification'Document'Front :: Maybe
IssuingCardholderIndividualVerification'Document'Front'Variants
issuingCardholderIndividualVerification'Document'Front = Maybe
IssuingCardholderIndividualVerification'Document'Front'Variants
forall a. Maybe a
GHC.Maybe.Nothing
}
data IssuingCardholderIndividualVerification'Document'Back'Variants
= IssuingCardholderIndividualVerification'Document'Back'Text Data.Text.Internal.Text
| IssuingCardholderIndividualVerification'Document'Back'File File
deriving (Int
-> IssuingCardholderIndividualVerification'Document'Back'Variants
-> ShowS
[IssuingCardholderIndividualVerification'Document'Back'Variants]
-> ShowS
IssuingCardholderIndividualVerification'Document'Back'Variants
-> String
(Int
-> IssuingCardholderIndividualVerification'Document'Back'Variants
-> ShowS)
-> (IssuingCardholderIndividualVerification'Document'Back'Variants
-> String)
-> ([IssuingCardholderIndividualVerification'Document'Back'Variants]
-> ShowS)
-> Show
IssuingCardholderIndividualVerification'Document'Back'Variants
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IssuingCardholderIndividualVerification'Document'Back'Variants]
-> ShowS
$cshowList :: [IssuingCardholderIndividualVerification'Document'Back'Variants]
-> ShowS
show :: IssuingCardholderIndividualVerification'Document'Back'Variants
-> String
$cshow :: IssuingCardholderIndividualVerification'Document'Back'Variants
-> String
showsPrec :: Int
-> IssuingCardholderIndividualVerification'Document'Back'Variants
-> ShowS
$cshowsPrec :: Int
-> IssuingCardholderIndividualVerification'Document'Back'Variants
-> ShowS
GHC.Show.Show, IssuingCardholderIndividualVerification'Document'Back'Variants
-> IssuingCardholderIndividualVerification'Document'Back'Variants
-> Bool
(IssuingCardholderIndividualVerification'Document'Back'Variants
-> IssuingCardholderIndividualVerification'Document'Back'Variants
-> Bool)
-> (IssuingCardholderIndividualVerification'Document'Back'Variants
-> IssuingCardholderIndividualVerification'Document'Back'Variants
-> Bool)
-> Eq
IssuingCardholderIndividualVerification'Document'Back'Variants
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IssuingCardholderIndividualVerification'Document'Back'Variants
-> IssuingCardholderIndividualVerification'Document'Back'Variants
-> Bool
$c/= :: IssuingCardholderIndividualVerification'Document'Back'Variants
-> IssuingCardholderIndividualVerification'Document'Back'Variants
-> Bool
== :: IssuingCardholderIndividualVerification'Document'Back'Variants
-> IssuingCardholderIndividualVerification'Document'Back'Variants
-> Bool
$c== :: IssuingCardholderIndividualVerification'Document'Back'Variants
-> IssuingCardholderIndividualVerification'Document'Back'Variants
-> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON IssuingCardholderIndividualVerification'Document'Back'Variants where
toJSON :: IssuingCardholderIndividualVerification'Document'Back'Variants
-> Value
toJSON (IssuingCardholderIndividualVerification'Document'Back'Text Text
a) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
a
toJSON (IssuingCardholderIndividualVerification'Document'Back'File File
a) = File -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON File
a
instance Data.Aeson.Types.FromJSON.FromJSON IssuingCardholderIndividualVerification'Document'Back'Variants where
parseJSON :: Value
-> Parser
IssuingCardholderIndividualVerification'Document'Back'Variants
parseJSON Value
val = case (Text
-> IssuingCardholderIndividualVerification'Document'Back'Variants
IssuingCardholderIndividualVerification'Document'Back'Text (Text
-> IssuingCardholderIndividualVerification'Document'Back'Variants)
-> Result Text
-> Result
IssuingCardholderIndividualVerification'Document'Back'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
IssuingCardholderIndividualVerification'Document'Back'Variants
-> Result
IssuingCardholderIndividualVerification'Document'Back'Variants
-> Result
IssuingCardholderIndividualVerification'Document'Back'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((File
-> IssuingCardholderIndividualVerification'Document'Back'Variants
IssuingCardholderIndividualVerification'Document'Back'File (File
-> IssuingCardholderIndividualVerification'Document'Back'Variants)
-> Result File
-> Result
IssuingCardholderIndividualVerification'Document'Back'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result File
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result
IssuingCardholderIndividualVerification'Document'Back'Variants
-> Result
IssuingCardholderIndividualVerification'Document'Back'Variants
-> Result
IssuingCardholderIndividualVerification'Document'Back'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> String
-> Result
IssuingCardholderIndividualVerification'Document'Back'Variants
forall a. String -> Result a
Data.Aeson.Types.Internal.Error String
"No variant matched") of
Data.Aeson.Types.Internal.Success IssuingCardholderIndividualVerification'Document'Back'Variants
a -> IssuingCardholderIndividualVerification'Document'Back'Variants
-> Parser
IssuingCardholderIndividualVerification'Document'Back'Variants
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure IssuingCardholderIndividualVerification'Document'Back'Variants
a
Data.Aeson.Types.Internal.Error String
a -> String
-> Parser
IssuingCardholderIndividualVerification'Document'Back'Variants
forall (m :: * -> *) a. MonadFail m => String -> m a
Control.Monad.Fail.fail String
a
data IssuingCardholderIndividualVerification'Document'Front'Variants
= IssuingCardholderIndividualVerification'Document'Front'Text Data.Text.Internal.Text
| IssuingCardholderIndividualVerification'Document'Front'File File
deriving (Int
-> IssuingCardholderIndividualVerification'Document'Front'Variants
-> ShowS
[IssuingCardholderIndividualVerification'Document'Front'Variants]
-> ShowS
IssuingCardholderIndividualVerification'Document'Front'Variants
-> String
(Int
-> IssuingCardholderIndividualVerification'Document'Front'Variants
-> ShowS)
-> (IssuingCardholderIndividualVerification'Document'Front'Variants
-> String)
-> ([IssuingCardholderIndividualVerification'Document'Front'Variants]
-> ShowS)
-> Show
IssuingCardholderIndividualVerification'Document'Front'Variants
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IssuingCardholderIndividualVerification'Document'Front'Variants]
-> ShowS
$cshowList :: [IssuingCardholderIndividualVerification'Document'Front'Variants]
-> ShowS
show :: IssuingCardholderIndividualVerification'Document'Front'Variants
-> String
$cshow :: IssuingCardholderIndividualVerification'Document'Front'Variants
-> String
showsPrec :: Int
-> IssuingCardholderIndividualVerification'Document'Front'Variants
-> ShowS
$cshowsPrec :: Int
-> IssuingCardholderIndividualVerification'Document'Front'Variants
-> ShowS
GHC.Show.Show, IssuingCardholderIndividualVerification'Document'Front'Variants
-> IssuingCardholderIndividualVerification'Document'Front'Variants
-> Bool
(IssuingCardholderIndividualVerification'Document'Front'Variants
-> IssuingCardholderIndividualVerification'Document'Front'Variants
-> Bool)
-> (IssuingCardholderIndividualVerification'Document'Front'Variants
-> IssuingCardholderIndividualVerification'Document'Front'Variants
-> Bool)
-> Eq
IssuingCardholderIndividualVerification'Document'Front'Variants
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IssuingCardholderIndividualVerification'Document'Front'Variants
-> IssuingCardholderIndividualVerification'Document'Front'Variants
-> Bool
$c/= :: IssuingCardholderIndividualVerification'Document'Front'Variants
-> IssuingCardholderIndividualVerification'Document'Front'Variants
-> Bool
== :: IssuingCardholderIndividualVerification'Document'Front'Variants
-> IssuingCardholderIndividualVerification'Document'Front'Variants
-> Bool
$c== :: IssuingCardholderIndividualVerification'Document'Front'Variants
-> IssuingCardholderIndividualVerification'Document'Front'Variants
-> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON IssuingCardholderIndividualVerification'Document'Front'Variants where
toJSON :: IssuingCardholderIndividualVerification'Document'Front'Variants
-> Value
toJSON (IssuingCardholderIndividualVerification'Document'Front'Text Text
a) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
a
toJSON (IssuingCardholderIndividualVerification'Document'Front'File File
a) = File -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON File
a
instance Data.Aeson.Types.FromJSON.FromJSON IssuingCardholderIndividualVerification'Document'Front'Variants where
parseJSON :: Value
-> Parser
IssuingCardholderIndividualVerification'Document'Front'Variants
parseJSON Value
val = case (Text
-> IssuingCardholderIndividualVerification'Document'Front'Variants
IssuingCardholderIndividualVerification'Document'Front'Text (Text
-> IssuingCardholderIndividualVerification'Document'Front'Variants)
-> Result Text
-> Result
IssuingCardholderIndividualVerification'Document'Front'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
IssuingCardholderIndividualVerification'Document'Front'Variants
-> Result
IssuingCardholderIndividualVerification'Document'Front'Variants
-> Result
IssuingCardholderIndividualVerification'Document'Front'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((File
-> IssuingCardholderIndividualVerification'Document'Front'Variants
IssuingCardholderIndividualVerification'Document'Front'File (File
-> IssuingCardholderIndividualVerification'Document'Front'Variants)
-> Result File
-> Result
IssuingCardholderIndividualVerification'Document'Front'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result File
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result
IssuingCardholderIndividualVerification'Document'Front'Variants
-> Result
IssuingCardholderIndividualVerification'Document'Front'Variants
-> Result
IssuingCardholderIndividualVerification'Document'Front'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> String
-> Result
IssuingCardholderIndividualVerification'Document'Front'Variants
forall a. String -> Result a
Data.Aeson.Types.Internal.Error String
"No variant matched") of
Data.Aeson.Types.Internal.Success IssuingCardholderIndividualVerification'Document'Front'Variants
a -> IssuingCardholderIndividualVerification'Document'Front'Variants
-> Parser
IssuingCardholderIndividualVerification'Document'Front'Variants
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure IssuingCardholderIndividualVerification'Document'Front'Variants
a
Data.Aeson.Types.Internal.Error String
a -> String
-> Parser
IssuingCardholderIndividualVerification'Document'Front'Variants
forall (m :: * -> *) a. MonadFail m => String -> m a
Control.Monad.Fail.fail String
a