{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
module StripeAPI.Types.PaymentMethodDetailsInteracPresent 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.PaymentMethodDetailsInteracPresentReceipt
import qualified Prelude as GHC.Integer.Type
import qualified Prelude as GHC.Maybe
data PaymentMethodDetailsInteracPresent = PaymentMethodDetailsInteracPresent
{
PaymentMethodDetailsInteracPresent -> Maybe Text
paymentMethodDetailsInteracPresentBrand :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PaymentMethodDetailsInteracPresent -> Maybe Text
paymentMethodDetailsInteracPresentCardholderName :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PaymentMethodDetailsInteracPresent -> Maybe Text
paymentMethodDetailsInteracPresentCountry :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PaymentMethodDetailsInteracPresent -> Maybe Text
paymentMethodDetailsInteracPresentEmvAuthData :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PaymentMethodDetailsInteracPresent -> Int
paymentMethodDetailsInteracPresentExpMonth :: GHC.Types.Int,
PaymentMethodDetailsInteracPresent -> Int
paymentMethodDetailsInteracPresentExpYear :: GHC.Types.Int,
PaymentMethodDetailsInteracPresent -> Maybe Text
paymentMethodDetailsInteracPresentFingerprint :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PaymentMethodDetailsInteracPresent -> Maybe Text
paymentMethodDetailsInteracPresentFunding :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PaymentMethodDetailsInteracPresent -> Maybe Text
paymentMethodDetailsInteracPresentGeneratedCard :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PaymentMethodDetailsInteracPresent -> Maybe Text
paymentMethodDetailsInteracPresentLast4 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PaymentMethodDetailsInteracPresent -> Maybe Text
paymentMethodDetailsInteracPresentNetwork :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PaymentMethodDetailsInteracPresent -> Maybe [Text]
paymentMethodDetailsInteracPresentPreferredLocales :: (GHC.Maybe.Maybe ([Data.Text.Internal.Text])),
PaymentMethodDetailsInteracPresent
-> Maybe PaymentMethodDetailsInteracPresentReadMethod'
paymentMethodDetailsInteracPresentReadMethod :: (GHC.Maybe.Maybe PaymentMethodDetailsInteracPresentReadMethod'),
PaymentMethodDetailsInteracPresent
-> Maybe PaymentMethodDetailsInteracPresentReceipt'
paymentMethodDetailsInteracPresentReceipt :: (GHC.Maybe.Maybe PaymentMethodDetailsInteracPresentReceipt')
}
deriving
( Int -> PaymentMethodDetailsInteracPresent -> ShowS
[PaymentMethodDetailsInteracPresent] -> ShowS
PaymentMethodDetailsInteracPresent -> String
(Int -> PaymentMethodDetailsInteracPresent -> ShowS)
-> (PaymentMethodDetailsInteracPresent -> String)
-> ([PaymentMethodDetailsInteracPresent] -> ShowS)
-> Show PaymentMethodDetailsInteracPresent
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PaymentMethodDetailsInteracPresent] -> ShowS
$cshowList :: [PaymentMethodDetailsInteracPresent] -> ShowS
show :: PaymentMethodDetailsInteracPresent -> String
$cshow :: PaymentMethodDetailsInteracPresent -> String
showsPrec :: Int -> PaymentMethodDetailsInteracPresent -> ShowS
$cshowsPrec :: Int -> PaymentMethodDetailsInteracPresent -> ShowS
GHC.Show.Show,
PaymentMethodDetailsInteracPresent
-> PaymentMethodDetailsInteracPresent -> Bool
(PaymentMethodDetailsInteracPresent
-> PaymentMethodDetailsInteracPresent -> Bool)
-> (PaymentMethodDetailsInteracPresent
-> PaymentMethodDetailsInteracPresent -> Bool)
-> Eq PaymentMethodDetailsInteracPresent
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PaymentMethodDetailsInteracPresent
-> PaymentMethodDetailsInteracPresent -> Bool
$c/= :: PaymentMethodDetailsInteracPresent
-> PaymentMethodDetailsInteracPresent -> Bool
== :: PaymentMethodDetailsInteracPresent
-> PaymentMethodDetailsInteracPresent -> Bool
$c== :: PaymentMethodDetailsInteracPresent
-> PaymentMethodDetailsInteracPresent -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PaymentMethodDetailsInteracPresent where
toJSON :: PaymentMethodDetailsInteracPresent -> Value
toJSON PaymentMethodDetailsInteracPresent
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"brand" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsInteracPresent -> Maybe Text
paymentMethodDetailsInteracPresentBrand PaymentMethodDetailsInteracPresent
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"cardholder_name" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsInteracPresent -> Maybe Text
paymentMethodDetailsInteracPresentCardholderName PaymentMethodDetailsInteracPresent
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..= PaymentMethodDetailsInteracPresent -> Maybe Text
paymentMethodDetailsInteracPresentCountry PaymentMethodDetailsInteracPresent
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"emv_auth_data" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsInteracPresent -> Maybe Text
paymentMethodDetailsInteracPresentEmvAuthData PaymentMethodDetailsInteracPresent
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"exp_month" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsInteracPresent -> Int
paymentMethodDetailsInteracPresentExpMonth PaymentMethodDetailsInteracPresent
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"exp_year" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsInteracPresent -> Int
paymentMethodDetailsInteracPresentExpYear PaymentMethodDetailsInteracPresent
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..= PaymentMethodDetailsInteracPresent -> Maybe Text
paymentMethodDetailsInteracPresentFingerprint PaymentMethodDetailsInteracPresent
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..= PaymentMethodDetailsInteracPresent -> Maybe Text
paymentMethodDetailsInteracPresentFunding PaymentMethodDetailsInteracPresent
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"generated_card" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsInteracPresent -> Maybe Text
paymentMethodDetailsInteracPresentGeneratedCard PaymentMethodDetailsInteracPresent
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..= PaymentMethodDetailsInteracPresent -> Maybe Text
paymentMethodDetailsInteracPresentLast4 PaymentMethodDetailsInteracPresent
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"network" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsInteracPresent -> Maybe Text
paymentMethodDetailsInteracPresentNetwork PaymentMethodDetailsInteracPresent
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"preferred_locales" Text -> Maybe [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsInteracPresent -> Maybe [Text]
paymentMethodDetailsInteracPresentPreferredLocales PaymentMethodDetailsInteracPresent
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"read_method" Text -> Maybe PaymentMethodDetailsInteracPresentReadMethod' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsInteracPresent
-> Maybe PaymentMethodDetailsInteracPresentReadMethod'
paymentMethodDetailsInteracPresentReadMethod PaymentMethodDetailsInteracPresent
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"receipt" Text -> Maybe PaymentMethodDetailsInteracPresentReceipt' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsInteracPresent
-> Maybe PaymentMethodDetailsInteracPresentReceipt'
paymentMethodDetailsInteracPresentReceipt PaymentMethodDetailsInteracPresent
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: PaymentMethodDetailsInteracPresent -> Encoding
toEncoding PaymentMethodDetailsInteracPresent
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"brand" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsInteracPresent -> Maybe Text
paymentMethodDetailsInteracPresentBrand PaymentMethodDetailsInteracPresent
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"cardholder_name" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsInteracPresent -> Maybe Text
paymentMethodDetailsInteracPresentCardholderName PaymentMethodDetailsInteracPresent
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..= PaymentMethodDetailsInteracPresent -> Maybe Text
paymentMethodDetailsInteracPresentCountry PaymentMethodDetailsInteracPresent
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"emv_auth_data" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsInteracPresent -> Maybe Text
paymentMethodDetailsInteracPresentEmvAuthData PaymentMethodDetailsInteracPresent
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"exp_month" Text -> Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsInteracPresent -> Int
paymentMethodDetailsInteracPresentExpMonth PaymentMethodDetailsInteracPresent
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"exp_year" Text -> Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsInteracPresent -> Int
paymentMethodDetailsInteracPresentExpYear PaymentMethodDetailsInteracPresent
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..= PaymentMethodDetailsInteracPresent -> Maybe Text
paymentMethodDetailsInteracPresentFingerprint PaymentMethodDetailsInteracPresent
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..= PaymentMethodDetailsInteracPresent -> Maybe Text
paymentMethodDetailsInteracPresentFunding PaymentMethodDetailsInteracPresent
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"generated_card" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsInteracPresent -> Maybe Text
paymentMethodDetailsInteracPresentGeneratedCard PaymentMethodDetailsInteracPresent
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..= PaymentMethodDetailsInteracPresent -> Maybe Text
paymentMethodDetailsInteracPresentLast4 PaymentMethodDetailsInteracPresent
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"network" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsInteracPresent -> Maybe Text
paymentMethodDetailsInteracPresentNetwork PaymentMethodDetailsInteracPresent
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"preferred_locales" Text -> Maybe [Text] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsInteracPresent -> Maybe [Text]
paymentMethodDetailsInteracPresentPreferredLocales PaymentMethodDetailsInteracPresent
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"read_method" Text
-> Maybe PaymentMethodDetailsInteracPresentReadMethod' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsInteracPresent
-> Maybe PaymentMethodDetailsInteracPresentReadMethod'
paymentMethodDetailsInteracPresentReadMethod PaymentMethodDetailsInteracPresent
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"receipt" Text -> Maybe PaymentMethodDetailsInteracPresentReceipt' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsInteracPresent
-> Maybe PaymentMethodDetailsInteracPresentReceipt'
paymentMethodDetailsInteracPresentReceipt PaymentMethodDetailsInteracPresent
obj))))))))))))))
instance Data.Aeson.Types.FromJSON.FromJSON PaymentMethodDetailsInteracPresent where
parseJSON :: Value -> Parser PaymentMethodDetailsInteracPresent
parseJSON = String
-> (Object -> Parser PaymentMethodDetailsInteracPresent)
-> Value
-> Parser PaymentMethodDetailsInteracPresent
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"PaymentMethodDetailsInteracPresent" (\Object
obj -> ((((((((((((((Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PaymentMethodDetailsInteracPresentReadMethod'
-> Maybe PaymentMethodDetailsInteracPresentReceipt'
-> PaymentMethodDetailsInteracPresent)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PaymentMethodDetailsInteracPresentReadMethod'
-> Maybe PaymentMethodDetailsInteracPresentReceipt'
-> PaymentMethodDetailsInteracPresent)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PaymentMethodDetailsInteracPresentReadMethod'
-> Maybe PaymentMethodDetailsInteracPresentReceipt'
-> PaymentMethodDetailsInteracPresent
PaymentMethodDetailsInteracPresent Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PaymentMethodDetailsInteracPresentReadMethod'
-> Maybe PaymentMethodDetailsInteracPresentReceipt'
-> PaymentMethodDetailsInteracPresent)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PaymentMethodDetailsInteracPresentReadMethod'
-> Maybe PaymentMethodDetailsInteracPresentReceipt'
-> PaymentMethodDetailsInteracPresent)
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
-> Int
-> Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PaymentMethodDetailsInteracPresentReadMethod'
-> Maybe PaymentMethodDetailsInteracPresentReceipt'
-> PaymentMethodDetailsInteracPresent)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Int
-> Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PaymentMethodDetailsInteracPresentReadMethod'
-> Maybe PaymentMethodDetailsInteracPresentReceipt'
-> PaymentMethodDetailsInteracPresent)
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
"cardholder_name")) Parser
(Maybe Text
-> Maybe Text
-> Int
-> Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PaymentMethodDetailsInteracPresentReadMethod'
-> Maybe PaymentMethodDetailsInteracPresentReceipt'
-> PaymentMethodDetailsInteracPresent)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Int
-> Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PaymentMethodDetailsInteracPresentReadMethod'
-> Maybe PaymentMethodDetailsInteracPresentReceipt'
-> PaymentMethodDetailsInteracPresent)
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
-> Int
-> Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PaymentMethodDetailsInteracPresentReadMethod'
-> Maybe PaymentMethodDetailsInteracPresentReceipt'
-> PaymentMethodDetailsInteracPresent)
-> Parser (Maybe Text)
-> Parser
(Int
-> Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PaymentMethodDetailsInteracPresentReadMethod'
-> Maybe PaymentMethodDetailsInteracPresentReceipt'
-> PaymentMethodDetailsInteracPresent)
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
"emv_auth_data")) Parser
(Int
-> Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PaymentMethodDetailsInteracPresentReadMethod'
-> Maybe PaymentMethodDetailsInteracPresentReceipt'
-> PaymentMethodDetailsInteracPresent)
-> Parser Int
-> Parser
(Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PaymentMethodDetailsInteracPresentReadMethod'
-> Maybe PaymentMethodDetailsInteracPresentReceipt'
-> PaymentMethodDetailsInteracPresent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Int
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"exp_month")) Parser
(Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PaymentMethodDetailsInteracPresentReadMethod'
-> Maybe PaymentMethodDetailsInteracPresentReceipt'
-> PaymentMethodDetailsInteracPresent)
-> Parser Int
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PaymentMethodDetailsInteracPresentReadMethod'
-> Maybe PaymentMethodDetailsInteracPresentReceipt'
-> PaymentMethodDetailsInteracPresent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Int
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"exp_year")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PaymentMethodDetailsInteracPresentReadMethod'
-> Maybe PaymentMethodDetailsInteracPresentReceipt'
-> PaymentMethodDetailsInteracPresent)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PaymentMethodDetailsInteracPresentReadMethod'
-> Maybe PaymentMethodDetailsInteracPresentReceipt'
-> PaymentMethodDetailsInteracPresent)
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]
-> Maybe PaymentMethodDetailsInteracPresentReadMethod'
-> Maybe PaymentMethodDetailsInteracPresentReceipt'
-> PaymentMethodDetailsInteracPresent)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PaymentMethodDetailsInteracPresentReadMethod'
-> Maybe PaymentMethodDetailsInteracPresentReceipt'
-> PaymentMethodDetailsInteracPresent)
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]
-> Maybe PaymentMethodDetailsInteracPresentReadMethod'
-> Maybe PaymentMethodDetailsInteracPresentReceipt'
-> PaymentMethodDetailsInteracPresent)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PaymentMethodDetailsInteracPresentReadMethod'
-> Maybe PaymentMethodDetailsInteracPresentReceipt'
-> PaymentMethodDetailsInteracPresent)
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
"generated_card")) Parser
(Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PaymentMethodDetailsInteracPresentReadMethod'
-> Maybe PaymentMethodDetailsInteracPresentReceipt'
-> PaymentMethodDetailsInteracPresent)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe [Text]
-> Maybe PaymentMethodDetailsInteracPresentReadMethod'
-> Maybe PaymentMethodDetailsInteracPresentReceipt'
-> PaymentMethodDetailsInteracPresent)
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 PaymentMethodDetailsInteracPresentReadMethod'
-> Maybe PaymentMethodDetailsInteracPresentReceipt'
-> PaymentMethodDetailsInteracPresent)
-> Parser (Maybe Text)
-> Parser
(Maybe [Text]
-> Maybe PaymentMethodDetailsInteracPresentReadMethod'
-> Maybe PaymentMethodDetailsInteracPresentReceipt'
-> PaymentMethodDetailsInteracPresent)
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
"network")) Parser
(Maybe [Text]
-> Maybe PaymentMethodDetailsInteracPresentReadMethod'
-> Maybe PaymentMethodDetailsInteracPresentReceipt'
-> PaymentMethodDetailsInteracPresent)
-> Parser (Maybe [Text])
-> Parser
(Maybe PaymentMethodDetailsInteracPresentReadMethod'
-> Maybe PaymentMethodDetailsInteracPresentReceipt'
-> PaymentMethodDetailsInteracPresent)
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
"preferred_locales")) Parser
(Maybe PaymentMethodDetailsInteracPresentReadMethod'
-> Maybe PaymentMethodDetailsInteracPresentReceipt'
-> PaymentMethodDetailsInteracPresent)
-> Parser (Maybe PaymentMethodDetailsInteracPresentReadMethod')
-> Parser
(Maybe PaymentMethodDetailsInteracPresentReceipt'
-> PaymentMethodDetailsInteracPresent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser (Maybe PaymentMethodDetailsInteracPresentReadMethod')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"read_method")) Parser
(Maybe PaymentMethodDetailsInteracPresentReceipt'
-> PaymentMethodDetailsInteracPresent)
-> Parser (Maybe PaymentMethodDetailsInteracPresentReceipt')
-> Parser PaymentMethodDetailsInteracPresent
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser (Maybe PaymentMethodDetailsInteracPresentReceipt')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"receipt"))
mkPaymentMethodDetailsInteracPresent ::
GHC.Types.Int ->
GHC.Types.Int ->
PaymentMethodDetailsInteracPresent
mkPaymentMethodDetailsInteracPresent :: Int -> Int -> PaymentMethodDetailsInteracPresent
mkPaymentMethodDetailsInteracPresent Int
paymentMethodDetailsInteracPresentExpMonth Int
paymentMethodDetailsInteracPresentExpYear =
PaymentMethodDetailsInteracPresent :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PaymentMethodDetailsInteracPresentReadMethod'
-> Maybe PaymentMethodDetailsInteracPresentReceipt'
-> PaymentMethodDetailsInteracPresent
PaymentMethodDetailsInteracPresent
{ paymentMethodDetailsInteracPresentBrand :: Maybe Text
paymentMethodDetailsInteracPresentBrand = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
paymentMethodDetailsInteracPresentCardholderName :: Maybe Text
paymentMethodDetailsInteracPresentCardholderName = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
paymentMethodDetailsInteracPresentCountry :: Maybe Text
paymentMethodDetailsInteracPresentCountry = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
paymentMethodDetailsInteracPresentEmvAuthData :: Maybe Text
paymentMethodDetailsInteracPresentEmvAuthData = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
paymentMethodDetailsInteracPresentExpMonth :: Int
paymentMethodDetailsInteracPresentExpMonth = Int
paymentMethodDetailsInteracPresentExpMonth,
paymentMethodDetailsInteracPresentExpYear :: Int
paymentMethodDetailsInteracPresentExpYear = Int
paymentMethodDetailsInteracPresentExpYear,
paymentMethodDetailsInteracPresentFingerprint :: Maybe Text
paymentMethodDetailsInteracPresentFingerprint = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
paymentMethodDetailsInteracPresentFunding :: Maybe Text
paymentMethodDetailsInteracPresentFunding = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
paymentMethodDetailsInteracPresentGeneratedCard :: Maybe Text
paymentMethodDetailsInteracPresentGeneratedCard = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
paymentMethodDetailsInteracPresentLast4 :: Maybe Text
paymentMethodDetailsInteracPresentLast4 = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
paymentMethodDetailsInteracPresentNetwork :: Maybe Text
paymentMethodDetailsInteracPresentNetwork = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
paymentMethodDetailsInteracPresentPreferredLocales :: Maybe [Text]
paymentMethodDetailsInteracPresentPreferredLocales = Maybe [Text]
forall a. Maybe a
GHC.Maybe.Nothing,
paymentMethodDetailsInteracPresentReadMethod :: Maybe PaymentMethodDetailsInteracPresentReadMethod'
paymentMethodDetailsInteracPresentReadMethod = Maybe PaymentMethodDetailsInteracPresentReadMethod'
forall a. Maybe a
GHC.Maybe.Nothing,
paymentMethodDetailsInteracPresentReceipt :: Maybe PaymentMethodDetailsInteracPresentReceipt'
paymentMethodDetailsInteracPresentReceipt = Maybe PaymentMethodDetailsInteracPresentReceipt'
forall a. Maybe a
GHC.Maybe.Nothing
}
data PaymentMethodDetailsInteracPresentReadMethod'
=
PaymentMethodDetailsInteracPresentReadMethod'Other Data.Aeson.Types.Internal.Value
|
PaymentMethodDetailsInteracPresentReadMethod'Typed Data.Text.Internal.Text
|
PaymentMethodDetailsInteracPresentReadMethod'EnumContactEmv
|
PaymentMethodDetailsInteracPresentReadMethod'EnumContactlessEmv
|
PaymentMethodDetailsInteracPresentReadMethod'EnumContactlessMagstripeMode
|
PaymentMethodDetailsInteracPresentReadMethod'EnumMagneticStripeFallback
|
PaymentMethodDetailsInteracPresentReadMethod'EnumMagneticStripeTrack2
deriving (Int -> PaymentMethodDetailsInteracPresentReadMethod' -> ShowS
[PaymentMethodDetailsInteracPresentReadMethod'] -> ShowS
PaymentMethodDetailsInteracPresentReadMethod' -> String
(Int -> PaymentMethodDetailsInteracPresentReadMethod' -> ShowS)
-> (PaymentMethodDetailsInteracPresentReadMethod' -> String)
-> ([PaymentMethodDetailsInteracPresentReadMethod'] -> ShowS)
-> Show PaymentMethodDetailsInteracPresentReadMethod'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PaymentMethodDetailsInteracPresentReadMethod'] -> ShowS
$cshowList :: [PaymentMethodDetailsInteracPresentReadMethod'] -> ShowS
show :: PaymentMethodDetailsInteracPresentReadMethod' -> String
$cshow :: PaymentMethodDetailsInteracPresentReadMethod' -> String
showsPrec :: Int -> PaymentMethodDetailsInteracPresentReadMethod' -> ShowS
$cshowsPrec :: Int -> PaymentMethodDetailsInteracPresentReadMethod' -> ShowS
GHC.Show.Show, PaymentMethodDetailsInteracPresentReadMethod'
-> PaymentMethodDetailsInteracPresentReadMethod' -> Bool
(PaymentMethodDetailsInteracPresentReadMethod'
-> PaymentMethodDetailsInteracPresentReadMethod' -> Bool)
-> (PaymentMethodDetailsInteracPresentReadMethod'
-> PaymentMethodDetailsInteracPresentReadMethod' -> Bool)
-> Eq PaymentMethodDetailsInteracPresentReadMethod'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PaymentMethodDetailsInteracPresentReadMethod'
-> PaymentMethodDetailsInteracPresentReadMethod' -> Bool
$c/= :: PaymentMethodDetailsInteracPresentReadMethod'
-> PaymentMethodDetailsInteracPresentReadMethod' -> Bool
== :: PaymentMethodDetailsInteracPresentReadMethod'
-> PaymentMethodDetailsInteracPresentReadMethod' -> Bool
$c== :: PaymentMethodDetailsInteracPresentReadMethod'
-> PaymentMethodDetailsInteracPresentReadMethod' -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PaymentMethodDetailsInteracPresentReadMethod' where
toJSON :: PaymentMethodDetailsInteracPresentReadMethod' -> Value
toJSON (PaymentMethodDetailsInteracPresentReadMethod'Other Value
val) = Value
val
toJSON (PaymentMethodDetailsInteracPresentReadMethod'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (PaymentMethodDetailsInteracPresentReadMethod'
PaymentMethodDetailsInteracPresentReadMethod'EnumContactEmv) = Value
"contact_emv"
toJSON (PaymentMethodDetailsInteracPresentReadMethod'
PaymentMethodDetailsInteracPresentReadMethod'EnumContactlessEmv) = Value
"contactless_emv"
toJSON (PaymentMethodDetailsInteracPresentReadMethod'
PaymentMethodDetailsInteracPresentReadMethod'EnumContactlessMagstripeMode) = Value
"contactless_magstripe_mode"
toJSON (PaymentMethodDetailsInteracPresentReadMethod'
PaymentMethodDetailsInteracPresentReadMethod'EnumMagneticStripeFallback) = Value
"magnetic_stripe_fallback"
toJSON (PaymentMethodDetailsInteracPresentReadMethod'
PaymentMethodDetailsInteracPresentReadMethod'EnumMagneticStripeTrack2) = Value
"magnetic_stripe_track2"
instance Data.Aeson.Types.FromJSON.FromJSON PaymentMethodDetailsInteracPresentReadMethod' where
parseJSON :: Value -> Parser PaymentMethodDetailsInteracPresentReadMethod'
parseJSON Value
val =
PaymentMethodDetailsInteracPresentReadMethod'
-> Parser PaymentMethodDetailsInteracPresentReadMethod'
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
"contact_emv" -> PaymentMethodDetailsInteracPresentReadMethod'
PaymentMethodDetailsInteracPresentReadMethod'EnumContactEmv
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"contactless_emv" -> PaymentMethodDetailsInteracPresentReadMethod'
PaymentMethodDetailsInteracPresentReadMethod'EnumContactlessEmv
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"contactless_magstripe_mode" -> PaymentMethodDetailsInteracPresentReadMethod'
PaymentMethodDetailsInteracPresentReadMethod'EnumContactlessMagstripeMode
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"magnetic_stripe_fallback" -> PaymentMethodDetailsInteracPresentReadMethod'
PaymentMethodDetailsInteracPresentReadMethod'EnumMagneticStripeFallback
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"magnetic_stripe_track2" -> PaymentMethodDetailsInteracPresentReadMethod'
PaymentMethodDetailsInteracPresentReadMethod'EnumMagneticStripeTrack2
| Bool
GHC.Base.otherwise -> Value -> PaymentMethodDetailsInteracPresentReadMethod'
PaymentMethodDetailsInteracPresentReadMethod'Other Value
val
)
data PaymentMethodDetailsInteracPresentReceipt' = PaymentMethodDetailsInteracPresentReceipt'
{
PaymentMethodDetailsInteracPresentReceipt'
-> Maybe PaymentMethodDetailsInteracPresentReceipt'AccountType'
paymentMethodDetailsInteracPresentReceipt'AccountType :: (GHC.Maybe.Maybe PaymentMethodDetailsInteracPresentReceipt'AccountType'),
PaymentMethodDetailsInteracPresentReceipt' -> Maybe Text
paymentMethodDetailsInteracPresentReceipt'ApplicationCryptogram :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PaymentMethodDetailsInteracPresentReceipt' -> Maybe Text
paymentMethodDetailsInteracPresentReceipt'ApplicationPreferredName :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PaymentMethodDetailsInteracPresentReceipt' -> Maybe Text
paymentMethodDetailsInteracPresentReceipt'AuthorizationCode :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PaymentMethodDetailsInteracPresentReceipt' -> Maybe Text
paymentMethodDetailsInteracPresentReceipt'AuthorizationResponseCode :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PaymentMethodDetailsInteracPresentReceipt' -> Maybe Text
paymentMethodDetailsInteracPresentReceipt'CardholderVerificationMethod :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PaymentMethodDetailsInteracPresentReceipt' -> Maybe Text
paymentMethodDetailsInteracPresentReceipt'DedicatedFileName :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PaymentMethodDetailsInteracPresentReceipt' -> Maybe Text
paymentMethodDetailsInteracPresentReceipt'TerminalVerificationResults :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PaymentMethodDetailsInteracPresentReceipt' -> Maybe Text
paymentMethodDetailsInteracPresentReceipt'TransactionStatusInformation :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
}
deriving
( Int -> PaymentMethodDetailsInteracPresentReceipt' -> ShowS
[PaymentMethodDetailsInteracPresentReceipt'] -> ShowS
PaymentMethodDetailsInteracPresentReceipt' -> String
(Int -> PaymentMethodDetailsInteracPresentReceipt' -> ShowS)
-> (PaymentMethodDetailsInteracPresentReceipt' -> String)
-> ([PaymentMethodDetailsInteracPresentReceipt'] -> ShowS)
-> Show PaymentMethodDetailsInteracPresentReceipt'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PaymentMethodDetailsInteracPresentReceipt'] -> ShowS
$cshowList :: [PaymentMethodDetailsInteracPresentReceipt'] -> ShowS
show :: PaymentMethodDetailsInteracPresentReceipt' -> String
$cshow :: PaymentMethodDetailsInteracPresentReceipt' -> String
showsPrec :: Int -> PaymentMethodDetailsInteracPresentReceipt' -> ShowS
$cshowsPrec :: Int -> PaymentMethodDetailsInteracPresentReceipt' -> ShowS
GHC.Show.Show,
PaymentMethodDetailsInteracPresentReceipt'
-> PaymentMethodDetailsInteracPresentReceipt' -> Bool
(PaymentMethodDetailsInteracPresentReceipt'
-> PaymentMethodDetailsInteracPresentReceipt' -> Bool)
-> (PaymentMethodDetailsInteracPresentReceipt'
-> PaymentMethodDetailsInteracPresentReceipt' -> Bool)
-> Eq PaymentMethodDetailsInteracPresentReceipt'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PaymentMethodDetailsInteracPresentReceipt'
-> PaymentMethodDetailsInteracPresentReceipt' -> Bool
$c/= :: PaymentMethodDetailsInteracPresentReceipt'
-> PaymentMethodDetailsInteracPresentReceipt' -> Bool
== :: PaymentMethodDetailsInteracPresentReceipt'
-> PaymentMethodDetailsInteracPresentReceipt' -> Bool
$c== :: PaymentMethodDetailsInteracPresentReceipt'
-> PaymentMethodDetailsInteracPresentReceipt' -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PaymentMethodDetailsInteracPresentReceipt' where
toJSON :: PaymentMethodDetailsInteracPresentReceipt' -> Value
toJSON PaymentMethodDetailsInteracPresentReceipt'
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"account_type" Text
-> Maybe PaymentMethodDetailsInteracPresentReceipt'AccountType'
-> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsInteracPresentReceipt'
-> Maybe PaymentMethodDetailsInteracPresentReceipt'AccountType'
paymentMethodDetailsInteracPresentReceipt'AccountType PaymentMethodDetailsInteracPresentReceipt'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"application_cryptogram" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsInteracPresentReceipt' -> Maybe Text
paymentMethodDetailsInteracPresentReceipt'ApplicationCryptogram PaymentMethodDetailsInteracPresentReceipt'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"application_preferred_name" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsInteracPresentReceipt' -> Maybe Text
paymentMethodDetailsInteracPresentReceipt'ApplicationPreferredName PaymentMethodDetailsInteracPresentReceipt'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"authorization_code" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsInteracPresentReceipt' -> Maybe Text
paymentMethodDetailsInteracPresentReceipt'AuthorizationCode PaymentMethodDetailsInteracPresentReceipt'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"authorization_response_code" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsInteracPresentReceipt' -> Maybe Text
paymentMethodDetailsInteracPresentReceipt'AuthorizationResponseCode PaymentMethodDetailsInteracPresentReceipt'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"cardholder_verification_method" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsInteracPresentReceipt' -> Maybe Text
paymentMethodDetailsInteracPresentReceipt'CardholderVerificationMethod PaymentMethodDetailsInteracPresentReceipt'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"dedicated_file_name" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsInteracPresentReceipt' -> Maybe Text
paymentMethodDetailsInteracPresentReceipt'DedicatedFileName PaymentMethodDetailsInteracPresentReceipt'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"terminal_verification_results" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsInteracPresentReceipt' -> Maybe Text
paymentMethodDetailsInteracPresentReceipt'TerminalVerificationResults PaymentMethodDetailsInteracPresentReceipt'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"transaction_status_information" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsInteracPresentReceipt' -> Maybe Text
paymentMethodDetailsInteracPresentReceipt'TransactionStatusInformation PaymentMethodDetailsInteracPresentReceipt'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: PaymentMethodDetailsInteracPresentReceipt' -> Encoding
toEncoding PaymentMethodDetailsInteracPresentReceipt'
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"account_type" Text
-> Maybe PaymentMethodDetailsInteracPresentReceipt'AccountType'
-> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsInteracPresentReceipt'
-> Maybe PaymentMethodDetailsInteracPresentReceipt'AccountType'
paymentMethodDetailsInteracPresentReceipt'AccountType PaymentMethodDetailsInteracPresentReceipt'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"application_cryptogram" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsInteracPresentReceipt' -> Maybe Text
paymentMethodDetailsInteracPresentReceipt'ApplicationCryptogram PaymentMethodDetailsInteracPresentReceipt'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"application_preferred_name" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsInteracPresentReceipt' -> Maybe Text
paymentMethodDetailsInteracPresentReceipt'ApplicationPreferredName PaymentMethodDetailsInteracPresentReceipt'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"authorization_code" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsInteracPresentReceipt' -> Maybe Text
paymentMethodDetailsInteracPresentReceipt'AuthorizationCode PaymentMethodDetailsInteracPresentReceipt'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"authorization_response_code" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsInteracPresentReceipt' -> Maybe Text
paymentMethodDetailsInteracPresentReceipt'AuthorizationResponseCode PaymentMethodDetailsInteracPresentReceipt'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"cardholder_verification_method" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsInteracPresentReceipt' -> Maybe Text
paymentMethodDetailsInteracPresentReceipt'CardholderVerificationMethod PaymentMethodDetailsInteracPresentReceipt'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"dedicated_file_name" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsInteracPresentReceipt' -> Maybe Text
paymentMethodDetailsInteracPresentReceipt'DedicatedFileName PaymentMethodDetailsInteracPresentReceipt'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"terminal_verification_results" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsInteracPresentReceipt' -> Maybe Text
paymentMethodDetailsInteracPresentReceipt'TerminalVerificationResults PaymentMethodDetailsInteracPresentReceipt'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"transaction_status_information" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsInteracPresentReceipt' -> Maybe Text
paymentMethodDetailsInteracPresentReceipt'TransactionStatusInformation PaymentMethodDetailsInteracPresentReceipt'
obj)))))))))
instance Data.Aeson.Types.FromJSON.FromJSON PaymentMethodDetailsInteracPresentReceipt' where
parseJSON :: Value -> Parser PaymentMethodDetailsInteracPresentReceipt'
parseJSON = String
-> (Object -> Parser PaymentMethodDetailsInteracPresentReceipt')
-> Value
-> Parser PaymentMethodDetailsInteracPresentReceipt'
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"PaymentMethodDetailsInteracPresentReceipt'" (\Object
obj -> (((((((((Maybe PaymentMethodDetailsInteracPresentReceipt'AccountType'
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PaymentMethodDetailsInteracPresentReceipt')
-> Parser
(Maybe PaymentMethodDetailsInteracPresentReceipt'AccountType'
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PaymentMethodDetailsInteracPresentReceipt')
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe PaymentMethodDetailsInteracPresentReceipt'AccountType'
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PaymentMethodDetailsInteracPresentReceipt'
PaymentMethodDetailsInteracPresentReceipt' Parser
(Maybe PaymentMethodDetailsInteracPresentReceipt'AccountType'
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PaymentMethodDetailsInteracPresentReceipt')
-> Parser
(Maybe PaymentMethodDetailsInteracPresentReceipt'AccountType')
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PaymentMethodDetailsInteracPresentReceipt')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser
(Maybe PaymentMethodDetailsInteracPresentReceipt'AccountType')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"account_type")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PaymentMethodDetailsInteracPresentReceipt')
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PaymentMethodDetailsInteracPresentReceipt')
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
"application_cryptogram")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PaymentMethodDetailsInteracPresentReceipt')
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PaymentMethodDetailsInteracPresentReceipt')
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
"application_preferred_name")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PaymentMethodDetailsInteracPresentReceipt')
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PaymentMethodDetailsInteracPresentReceipt')
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
"authorization_code")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PaymentMethodDetailsInteracPresentReceipt')
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PaymentMethodDetailsInteracPresentReceipt')
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
"authorization_response_code")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PaymentMethodDetailsInteracPresentReceipt')
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> PaymentMethodDetailsInteracPresentReceipt')
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
"cardholder_verification_method")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> PaymentMethodDetailsInteracPresentReceipt')
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> PaymentMethodDetailsInteracPresentReceipt')
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
"dedicated_file_name")) Parser
(Maybe Text
-> Maybe Text -> PaymentMethodDetailsInteracPresentReceipt')
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> PaymentMethodDetailsInteracPresentReceipt')
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
"terminal_verification_results")) Parser (Maybe Text -> PaymentMethodDetailsInteracPresentReceipt')
-> Parser (Maybe Text)
-> Parser PaymentMethodDetailsInteracPresentReceipt'
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
"transaction_status_information"))
mkPaymentMethodDetailsInteracPresentReceipt' :: PaymentMethodDetailsInteracPresentReceipt'
mkPaymentMethodDetailsInteracPresentReceipt' :: PaymentMethodDetailsInteracPresentReceipt'
mkPaymentMethodDetailsInteracPresentReceipt' =
PaymentMethodDetailsInteracPresentReceipt' :: Maybe PaymentMethodDetailsInteracPresentReceipt'AccountType'
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PaymentMethodDetailsInteracPresentReceipt'
PaymentMethodDetailsInteracPresentReceipt'
{ paymentMethodDetailsInteracPresentReceipt'AccountType :: Maybe PaymentMethodDetailsInteracPresentReceipt'AccountType'
paymentMethodDetailsInteracPresentReceipt'AccountType = Maybe PaymentMethodDetailsInteracPresentReceipt'AccountType'
forall a. Maybe a
GHC.Maybe.Nothing,
paymentMethodDetailsInteracPresentReceipt'ApplicationCryptogram :: Maybe Text
paymentMethodDetailsInteracPresentReceipt'ApplicationCryptogram = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
paymentMethodDetailsInteracPresentReceipt'ApplicationPreferredName :: Maybe Text
paymentMethodDetailsInteracPresentReceipt'ApplicationPreferredName = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
paymentMethodDetailsInteracPresentReceipt'AuthorizationCode :: Maybe Text
paymentMethodDetailsInteracPresentReceipt'AuthorizationCode = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
paymentMethodDetailsInteracPresentReceipt'AuthorizationResponseCode :: Maybe Text
paymentMethodDetailsInteracPresentReceipt'AuthorizationResponseCode = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
paymentMethodDetailsInteracPresentReceipt'CardholderVerificationMethod :: Maybe Text
paymentMethodDetailsInteracPresentReceipt'CardholderVerificationMethod = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
paymentMethodDetailsInteracPresentReceipt'DedicatedFileName :: Maybe Text
paymentMethodDetailsInteracPresentReceipt'DedicatedFileName = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
paymentMethodDetailsInteracPresentReceipt'TerminalVerificationResults :: Maybe Text
paymentMethodDetailsInteracPresentReceipt'TerminalVerificationResults = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
paymentMethodDetailsInteracPresentReceipt'TransactionStatusInformation :: Maybe Text
paymentMethodDetailsInteracPresentReceipt'TransactionStatusInformation = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
}
data PaymentMethodDetailsInteracPresentReceipt'AccountType'
=
PaymentMethodDetailsInteracPresentReceipt'AccountType'Other Data.Aeson.Types.Internal.Value
|
PaymentMethodDetailsInteracPresentReceipt'AccountType'Typed Data.Text.Internal.Text
|
PaymentMethodDetailsInteracPresentReceipt'AccountType'EnumChecking
|
PaymentMethodDetailsInteracPresentReceipt'AccountType'EnumSavings
|
PaymentMethodDetailsInteracPresentReceipt'AccountType'EnumUnknown
deriving (Int
-> PaymentMethodDetailsInteracPresentReceipt'AccountType' -> ShowS
[PaymentMethodDetailsInteracPresentReceipt'AccountType'] -> ShowS
PaymentMethodDetailsInteracPresentReceipt'AccountType' -> String
(Int
-> PaymentMethodDetailsInteracPresentReceipt'AccountType' -> ShowS)
-> (PaymentMethodDetailsInteracPresentReceipt'AccountType'
-> String)
-> ([PaymentMethodDetailsInteracPresentReceipt'AccountType']
-> ShowS)
-> Show PaymentMethodDetailsInteracPresentReceipt'AccountType'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PaymentMethodDetailsInteracPresentReceipt'AccountType'] -> ShowS
$cshowList :: [PaymentMethodDetailsInteracPresentReceipt'AccountType'] -> ShowS
show :: PaymentMethodDetailsInteracPresentReceipt'AccountType' -> String
$cshow :: PaymentMethodDetailsInteracPresentReceipt'AccountType' -> String
showsPrec :: Int
-> PaymentMethodDetailsInteracPresentReceipt'AccountType' -> ShowS
$cshowsPrec :: Int
-> PaymentMethodDetailsInteracPresentReceipt'AccountType' -> ShowS
GHC.Show.Show, PaymentMethodDetailsInteracPresentReceipt'AccountType'
-> PaymentMethodDetailsInteracPresentReceipt'AccountType' -> Bool
(PaymentMethodDetailsInteracPresentReceipt'AccountType'
-> PaymentMethodDetailsInteracPresentReceipt'AccountType' -> Bool)
-> (PaymentMethodDetailsInteracPresentReceipt'AccountType'
-> PaymentMethodDetailsInteracPresentReceipt'AccountType' -> Bool)
-> Eq PaymentMethodDetailsInteracPresentReceipt'AccountType'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PaymentMethodDetailsInteracPresentReceipt'AccountType'
-> PaymentMethodDetailsInteracPresentReceipt'AccountType' -> Bool
$c/= :: PaymentMethodDetailsInteracPresentReceipt'AccountType'
-> PaymentMethodDetailsInteracPresentReceipt'AccountType' -> Bool
== :: PaymentMethodDetailsInteracPresentReceipt'AccountType'
-> PaymentMethodDetailsInteracPresentReceipt'AccountType' -> Bool
$c== :: PaymentMethodDetailsInteracPresentReceipt'AccountType'
-> PaymentMethodDetailsInteracPresentReceipt'AccountType' -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PaymentMethodDetailsInteracPresentReceipt'AccountType' where
toJSON :: PaymentMethodDetailsInteracPresentReceipt'AccountType' -> Value
toJSON (PaymentMethodDetailsInteracPresentReceipt'AccountType'Other Value
val) = Value
val
toJSON (PaymentMethodDetailsInteracPresentReceipt'AccountType'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (PaymentMethodDetailsInteracPresentReceipt'AccountType'
PaymentMethodDetailsInteracPresentReceipt'AccountType'EnumChecking) = Value
"checking"
toJSON (PaymentMethodDetailsInteracPresentReceipt'AccountType'
PaymentMethodDetailsInteracPresentReceipt'AccountType'EnumSavings) = Value
"savings"
toJSON (PaymentMethodDetailsInteracPresentReceipt'AccountType'
PaymentMethodDetailsInteracPresentReceipt'AccountType'EnumUnknown) = Value
"unknown"
instance Data.Aeson.Types.FromJSON.FromJSON PaymentMethodDetailsInteracPresentReceipt'AccountType' where
parseJSON :: Value
-> Parser PaymentMethodDetailsInteracPresentReceipt'AccountType'
parseJSON Value
val =
PaymentMethodDetailsInteracPresentReceipt'AccountType'
-> Parser PaymentMethodDetailsInteracPresentReceipt'AccountType'
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
"checking" -> PaymentMethodDetailsInteracPresentReceipt'AccountType'
PaymentMethodDetailsInteracPresentReceipt'AccountType'EnumChecking
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"savings" -> PaymentMethodDetailsInteracPresentReceipt'AccountType'
PaymentMethodDetailsInteracPresentReceipt'AccountType'EnumSavings
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"unknown" -> PaymentMethodDetailsInteracPresentReceipt'AccountType'
PaymentMethodDetailsInteracPresentReceipt'AccountType'EnumUnknown
| Bool
GHC.Base.otherwise -> Value -> PaymentMethodDetailsInteracPresentReceipt'AccountType'
PaymentMethodDetailsInteracPresentReceipt'AccountType'Other Value
val
)