{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
module StripeAPI.Types.SourceTypeCard 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 qualified Prelude as GHC.Integer.Type
import qualified Prelude as GHC.Maybe
data SourceTypeCard = SourceTypeCard
{
SourceTypeCard -> Maybe Text
sourceTypeCardAddressLine1Check :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
SourceTypeCard -> Maybe Text
sourceTypeCardAddressZipCheck :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
SourceTypeCard -> Maybe Text
sourceTypeCardBrand :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
SourceTypeCard -> Maybe Text
sourceTypeCardCountry :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
SourceTypeCard -> Maybe Text
sourceTypeCardCvcCheck :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
SourceTypeCard -> Maybe Text
sourceTypeCardDynamicLast4 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
SourceTypeCard -> Maybe Int
sourceTypeCardExpMonth :: (GHC.Maybe.Maybe GHC.Types.Int),
SourceTypeCard -> Maybe Int
sourceTypeCardExpYear :: (GHC.Maybe.Maybe GHC.Types.Int),
SourceTypeCard -> Maybe Text
sourceTypeCardFingerprint :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
SourceTypeCard -> Maybe Text
sourceTypeCardFunding :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
SourceTypeCard -> Maybe Text
sourceTypeCardLast4 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
SourceTypeCard -> Maybe Text
sourceTypeCardName :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
SourceTypeCard -> Maybe Text
sourceTypeCardThreeDSecure :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
SourceTypeCard -> Maybe Text
sourceTypeCardTokenizationMethod :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
}
deriving
( Int -> SourceTypeCard -> ShowS
[SourceTypeCard] -> ShowS
SourceTypeCard -> String
(Int -> SourceTypeCard -> ShowS)
-> (SourceTypeCard -> String)
-> ([SourceTypeCard] -> ShowS)
-> Show SourceTypeCard
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SourceTypeCard] -> ShowS
$cshowList :: [SourceTypeCard] -> ShowS
show :: SourceTypeCard -> String
$cshow :: SourceTypeCard -> String
showsPrec :: Int -> SourceTypeCard -> ShowS
$cshowsPrec :: Int -> SourceTypeCard -> ShowS
GHC.Show.Show,
SourceTypeCard -> SourceTypeCard -> Bool
(SourceTypeCard -> SourceTypeCard -> Bool)
-> (SourceTypeCard -> SourceTypeCard -> Bool) -> Eq SourceTypeCard
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SourceTypeCard -> SourceTypeCard -> Bool
$c/= :: SourceTypeCard -> SourceTypeCard -> Bool
== :: SourceTypeCard -> SourceTypeCard -> Bool
$c== :: SourceTypeCard -> SourceTypeCard -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON SourceTypeCard where
toJSON :: SourceTypeCard -> Value
toJSON SourceTypeCard
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"address_line1_check" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceTypeCard -> Maybe Text
sourceTypeCardAddressLine1Check SourceTypeCard
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"address_zip_check" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceTypeCard -> Maybe Text
sourceTypeCardAddressZipCheck SourceTypeCard
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"brand" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceTypeCard -> Maybe Text
sourceTypeCardBrand SourceTypeCard
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"country" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceTypeCard -> Maybe Text
sourceTypeCardCountry SourceTypeCard
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"cvc_check" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceTypeCard -> Maybe Text
sourceTypeCardCvcCheck SourceTypeCard
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"dynamic_last4" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceTypeCard -> Maybe Text
sourceTypeCardDynamicLast4 SourceTypeCard
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"exp_month" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceTypeCard -> Maybe Int
sourceTypeCardExpMonth SourceTypeCard
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"exp_year" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceTypeCard -> Maybe Int
sourceTypeCardExpYear SourceTypeCard
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"fingerprint" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceTypeCard -> Maybe Text
sourceTypeCardFingerprint SourceTypeCard
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"funding" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceTypeCard -> Maybe Text
sourceTypeCardFunding SourceTypeCard
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"last4" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceTypeCard -> Maybe Text
sourceTypeCardLast4 SourceTypeCard
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"name" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceTypeCard -> Maybe Text
sourceTypeCardName SourceTypeCard
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"three_d_secure" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceTypeCard -> Maybe Text
sourceTypeCardThreeDSecure SourceTypeCard
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"tokenization_method" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceTypeCard -> Maybe Text
sourceTypeCardTokenizationMethod SourceTypeCard
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: SourceTypeCard -> Encoding
toEncoding SourceTypeCard
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"address_line1_check" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceTypeCard -> Maybe Text
sourceTypeCardAddressLine1Check SourceTypeCard
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"address_zip_check" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceTypeCard -> Maybe Text
sourceTypeCardAddressZipCheck SourceTypeCard
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"brand" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceTypeCard -> Maybe Text
sourceTypeCardBrand SourceTypeCard
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"country" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceTypeCard -> Maybe Text
sourceTypeCardCountry SourceTypeCard
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"cvc_check" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceTypeCard -> Maybe Text
sourceTypeCardCvcCheck SourceTypeCard
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"dynamic_last4" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceTypeCard -> Maybe Text
sourceTypeCardDynamicLast4 SourceTypeCard
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"exp_month" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceTypeCard -> Maybe Int
sourceTypeCardExpMonth SourceTypeCard
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"exp_year" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceTypeCard -> Maybe Int
sourceTypeCardExpYear SourceTypeCard
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"fingerprint" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceTypeCard -> Maybe Text
sourceTypeCardFingerprint SourceTypeCard
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"funding" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceTypeCard -> Maybe Text
sourceTypeCardFunding SourceTypeCard
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"last4" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceTypeCard -> Maybe Text
sourceTypeCardLast4 SourceTypeCard
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"name" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceTypeCard -> Maybe Text
sourceTypeCardName SourceTypeCard
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"three_d_secure" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceTypeCard -> Maybe Text
sourceTypeCardThreeDSecure SourceTypeCard
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"tokenization_method" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceTypeCard -> Maybe Text
sourceTypeCardTokenizationMethod SourceTypeCard
obj))))))))))))))
instance Data.Aeson.Types.FromJSON.FromJSON SourceTypeCard where
parseJSON :: Value -> Parser SourceTypeCard
parseJSON = String
-> (Object -> Parser SourceTypeCard)
-> Value
-> Parser SourceTypeCard
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"SourceTypeCard" (\Object
obj -> ((((((((((((((Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SourceTypeCard)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SourceTypeCard)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SourceTypeCard
SourceTypeCard Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SourceTypeCard)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SourceTypeCard)
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
"address_line1_check")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SourceTypeCard)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SourceTypeCard)
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
"address_zip_check")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SourceTypeCard)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SourceTypeCard)
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
"brand")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SourceTypeCard)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SourceTypeCard)
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
"country")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SourceTypeCard)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SourceTypeCard)
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
"cvc_check")) Parser
(Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SourceTypeCard)
-> Parser (Maybe Text)
-> Parser
(Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SourceTypeCard)
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
"dynamic_last4")) Parser
(Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SourceTypeCard)
-> Parser (Maybe Int)
-> Parser
(Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SourceTypeCard)
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
"exp_month")) Parser
(Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SourceTypeCard)
-> Parser (Maybe Int)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SourceTypeCard)
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
"exp_year")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SourceTypeCard)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SourceTypeCard)
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
"fingerprint")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SourceTypeCard)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> SourceTypeCard)
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
"funding")) Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> SourceTypeCard)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> SourceTypeCard)
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
"last4")) Parser (Maybe Text -> Maybe Text -> Maybe Text -> SourceTypeCard)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> SourceTypeCard)
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
"name")) Parser (Maybe Text -> Maybe Text -> SourceTypeCard)
-> Parser (Maybe Text) -> Parser (Maybe Text -> SourceTypeCard)
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
"three_d_secure")) Parser (Maybe Text -> SourceTypeCard)
-> Parser (Maybe Text) -> Parser SourceTypeCard
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
"tokenization_method"))
mkSourceTypeCard :: SourceTypeCard
mkSourceTypeCard :: SourceTypeCard
mkSourceTypeCard =
SourceTypeCard :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SourceTypeCard
SourceTypeCard
{ sourceTypeCardAddressLine1Check :: Maybe Text
sourceTypeCardAddressLine1Check = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
sourceTypeCardAddressZipCheck :: Maybe Text
sourceTypeCardAddressZipCheck = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
sourceTypeCardBrand :: Maybe Text
sourceTypeCardBrand = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
sourceTypeCardCountry :: Maybe Text
sourceTypeCardCountry = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
sourceTypeCardCvcCheck :: Maybe Text
sourceTypeCardCvcCheck = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
sourceTypeCardDynamicLast4 :: Maybe Text
sourceTypeCardDynamicLast4 = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
sourceTypeCardExpMonth :: Maybe Int
sourceTypeCardExpMonth = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
sourceTypeCardExpYear :: Maybe Int
sourceTypeCardExpYear = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
sourceTypeCardFingerprint :: Maybe Text
sourceTypeCardFingerprint = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
sourceTypeCardFunding :: Maybe Text
sourceTypeCardFunding = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
sourceTypeCardLast4 :: Maybe Text
sourceTypeCardLast4 = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
sourceTypeCardName :: Maybe Text
sourceTypeCardName = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
sourceTypeCardThreeDSecure :: Maybe Text
sourceTypeCardThreeDSecure = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
sourceTypeCardTokenizationMethod :: Maybe Text
sourceTypeCardTokenizationMethod = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
}