module TD.Query.GetOnRampPaymentQuote
(GetOnRampPaymentQuote(..)
, defaultGetOnRampPaymentQuote
) 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 GetOnRampPaymentQuote
= GetOnRampPaymentQuote
{ GetOnRampPaymentQuote -> Maybe Text
provider_id :: Maybe T.Text
, GetOnRampPaymentQuote -> Maybe Text
cryptocurrency :: Maybe T.Text
, GetOnRampPaymentQuote -> Maybe Text
base_currency :: Maybe T.Text
, GetOnRampPaymentQuote -> Maybe Text
cryptocurrency_amount :: Maybe T.Text
, GetOnRampPaymentQuote -> Maybe Text
base_currency_amount :: Maybe T.Text
, GetOnRampPaymentQuote -> Maybe Text
payment_method_name :: Maybe T.Text
}
deriving (GetOnRampPaymentQuote -> GetOnRampPaymentQuote -> Bool
(GetOnRampPaymentQuote -> GetOnRampPaymentQuote -> Bool)
-> (GetOnRampPaymentQuote -> GetOnRampPaymentQuote -> Bool)
-> Eq GetOnRampPaymentQuote
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GetOnRampPaymentQuote -> GetOnRampPaymentQuote -> Bool
== :: GetOnRampPaymentQuote -> GetOnRampPaymentQuote -> Bool
$c/= :: GetOnRampPaymentQuote -> GetOnRampPaymentQuote -> Bool
/= :: GetOnRampPaymentQuote -> GetOnRampPaymentQuote -> Bool
Eq, Int -> GetOnRampPaymentQuote -> ShowS
[GetOnRampPaymentQuote] -> ShowS
GetOnRampPaymentQuote -> String
(Int -> GetOnRampPaymentQuote -> ShowS)
-> (GetOnRampPaymentQuote -> String)
-> ([GetOnRampPaymentQuote] -> ShowS)
-> Show GetOnRampPaymentQuote
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GetOnRampPaymentQuote -> ShowS
showsPrec :: Int -> GetOnRampPaymentQuote -> ShowS
$cshow :: GetOnRampPaymentQuote -> String
show :: GetOnRampPaymentQuote -> String
$cshowList :: [GetOnRampPaymentQuote] -> ShowS
showList :: [GetOnRampPaymentQuote] -> ShowS
Show)
instance I.ShortShow GetOnRampPaymentQuote where
shortShow :: GetOnRampPaymentQuote -> String
shortShow
GetOnRampPaymentQuote
{ provider_id :: GetOnRampPaymentQuote -> Maybe Text
provider_id = Maybe Text
provider_id_
, cryptocurrency :: GetOnRampPaymentQuote -> Maybe Text
cryptocurrency = Maybe Text
cryptocurrency_
, base_currency :: GetOnRampPaymentQuote -> Maybe Text
base_currency = Maybe Text
base_currency_
, cryptocurrency_amount :: GetOnRampPaymentQuote -> Maybe Text
cryptocurrency_amount = Maybe Text
cryptocurrency_amount_
, base_currency_amount :: GetOnRampPaymentQuote -> Maybe Text
base_currency_amount = Maybe Text
base_currency_amount_
, payment_method_name :: GetOnRampPaymentQuote -> Maybe Text
payment_method_name = Maybe Text
payment_method_name_
}
= String
"GetOnRampPaymentQuote"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"provider_id" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
provider_id_
, String
"cryptocurrency" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
cryptocurrency_
, String
"base_currency" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
base_currency_
, String
"cryptocurrency_amount" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
cryptocurrency_amount_
, String
"base_currency_amount" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
base_currency_amount_
, String
"payment_method_name" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
payment_method_name_
]
instance AT.ToJSON GetOnRampPaymentQuote where
toJSON :: GetOnRampPaymentQuote -> Value
toJSON
GetOnRampPaymentQuote
{ provider_id :: GetOnRampPaymentQuote -> Maybe Text
provider_id = Maybe Text
provider_id_
, cryptocurrency :: GetOnRampPaymentQuote -> Maybe Text
cryptocurrency = Maybe Text
cryptocurrency_
, base_currency :: GetOnRampPaymentQuote -> Maybe Text
base_currency = Maybe Text
base_currency_
, cryptocurrency_amount :: GetOnRampPaymentQuote -> Maybe Text
cryptocurrency_amount = Maybe Text
cryptocurrency_amount_
, base_currency_amount :: GetOnRampPaymentQuote -> Maybe Text
base_currency_amount = Maybe Text
base_currency_amount_
, payment_method_name :: GetOnRampPaymentQuote -> Maybe Text
payment_method_name = Maybe Text
payment_method_name_
}
= [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
"getOnRampPaymentQuote"
, Key
"provider_id" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
provider_id_
, Key
"cryptocurrency" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
cryptocurrency_
, Key
"base_currency" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
base_currency_
, Key
"cryptocurrency_amount" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
cryptocurrency_amount_
, Key
"base_currency_amount" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
base_currency_amount_
, Key
"payment_method_name" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
payment_method_name_
]
defaultGetOnRampPaymentQuote :: GetOnRampPaymentQuote
defaultGetOnRampPaymentQuote :: GetOnRampPaymentQuote
defaultGetOnRampPaymentQuote =
GetOnRampPaymentQuote
{ provider_id :: Maybe Text
provider_id = Maybe Text
forall a. Maybe a
Nothing
, cryptocurrency :: Maybe Text
cryptocurrency = Maybe Text
forall a. Maybe a
Nothing
, base_currency :: Maybe Text
base_currency = Maybe Text
forall a. Maybe a
Nothing
, cryptocurrency_amount :: Maybe Text
cryptocurrency_amount = Maybe Text
forall a. Maybe a
Nothing
, base_currency_amount :: Maybe Text
base_currency_amount = Maybe Text
forall a. Maybe a
Nothing
, payment_method_name :: Maybe Text
payment_method_name = Maybe Text
forall a. Maybe a
Nothing
}