module TD.Query.GetBankCardInfo
(GetBankCardInfo(..)
) where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I
import qualified Data.Text as T
data GetBankCardInfo
= GetBankCardInfo
{ GetBankCardInfo -> Maybe Text
bank_card_number :: Maybe T.Text
}
deriving (GetBankCardInfo -> GetBankCardInfo -> Bool
(GetBankCardInfo -> GetBankCardInfo -> Bool)
-> (GetBankCardInfo -> GetBankCardInfo -> Bool)
-> Eq GetBankCardInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GetBankCardInfo -> GetBankCardInfo -> Bool
== :: GetBankCardInfo -> GetBankCardInfo -> Bool
$c/= :: GetBankCardInfo -> GetBankCardInfo -> Bool
/= :: GetBankCardInfo -> GetBankCardInfo -> Bool
Eq, Int -> GetBankCardInfo -> ShowS
[GetBankCardInfo] -> ShowS
GetBankCardInfo -> String
(Int -> GetBankCardInfo -> ShowS)
-> (GetBankCardInfo -> String)
-> ([GetBankCardInfo] -> ShowS)
-> Show GetBankCardInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GetBankCardInfo -> ShowS
showsPrec :: Int -> GetBankCardInfo -> ShowS
$cshow :: GetBankCardInfo -> String
show :: GetBankCardInfo -> String
$cshowList :: [GetBankCardInfo] -> ShowS
showList :: [GetBankCardInfo] -> ShowS
Show)
instance I.ShortShow GetBankCardInfo where
shortShow :: GetBankCardInfo -> String
shortShow
GetBankCardInfo
{ bank_card_number :: GetBankCardInfo -> Maybe Text
bank_card_number = Maybe Text
bank_card_number_
}
= String
"GetBankCardInfo"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"bank_card_number" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
bank_card_number_
]
instance AT.ToJSON GetBankCardInfo where
toJSON :: GetBankCardInfo -> Value
toJSON
GetBankCardInfo
{ bank_card_number :: GetBankCardInfo -> Maybe Text
bank_card_number = Maybe Text
bank_card_number_
}
= [Pair] -> Value
A.object
[ Key
"@type" Key -> Value -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Text -> Value
AT.String Text
"getBankCardInfo"
, Key
"bank_card_number" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
bank_card_number_
]