module TD.Query.CreateOnRampPaymentSession
(CreateOnRampPaymentSession(..)
, defaultCreateOnRampPaymentSession
) 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 CreateOnRampPaymentSession
= CreateOnRampPaymentSession
{ CreateOnRampPaymentSession -> Maybe Text
provider_id :: Maybe T.Text
, CreateOnRampPaymentSession -> Maybe Text
cryptocurrency :: Maybe T.Text
, CreateOnRampPaymentSession -> Maybe Text
address :: Maybe T.Text
, CreateOnRampPaymentSession -> Maybe Text
payment_method_name :: Maybe T.Text
, CreateOnRampPaymentSession -> Maybe Text
base_currency :: Maybe T.Text
, CreateOnRampPaymentSession -> Maybe Text
cryptocurrency_amount :: Maybe T.Text
, CreateOnRampPaymentSession -> Maybe Text
base_currency_amount :: Maybe T.Text
, CreateOnRampPaymentSession -> Maybe Text
memo :: Maybe T.Text
, CreateOnRampPaymentSession -> Maybe Text
theme :: Maybe T.Text
, CreateOnRampPaymentSession -> Maybe Text
success_return_url :: Maybe T.Text
, CreateOnRampPaymentSession -> Maybe Text
fail_return_url :: Maybe T.Text
}
deriving (CreateOnRampPaymentSession -> CreateOnRampPaymentSession -> Bool
(CreateOnRampPaymentSession -> CreateOnRampPaymentSession -> Bool)
-> (CreateOnRampPaymentSession
-> CreateOnRampPaymentSession -> Bool)
-> Eq CreateOnRampPaymentSession
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CreateOnRampPaymentSession -> CreateOnRampPaymentSession -> Bool
== :: CreateOnRampPaymentSession -> CreateOnRampPaymentSession -> Bool
$c/= :: CreateOnRampPaymentSession -> CreateOnRampPaymentSession -> Bool
/= :: CreateOnRampPaymentSession -> CreateOnRampPaymentSession -> Bool
Eq, Int -> CreateOnRampPaymentSession -> ShowS
[CreateOnRampPaymentSession] -> ShowS
CreateOnRampPaymentSession -> String
(Int -> CreateOnRampPaymentSession -> ShowS)
-> (CreateOnRampPaymentSession -> String)
-> ([CreateOnRampPaymentSession] -> ShowS)
-> Show CreateOnRampPaymentSession
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CreateOnRampPaymentSession -> ShowS
showsPrec :: Int -> CreateOnRampPaymentSession -> ShowS
$cshow :: CreateOnRampPaymentSession -> String
show :: CreateOnRampPaymentSession -> String
$cshowList :: [CreateOnRampPaymentSession] -> ShowS
showList :: [CreateOnRampPaymentSession] -> ShowS
Show)
instance I.ShortShow CreateOnRampPaymentSession where
shortShow :: CreateOnRampPaymentSession -> String
shortShow
CreateOnRampPaymentSession
{ provider_id :: CreateOnRampPaymentSession -> Maybe Text
provider_id = Maybe Text
provider_id_
, cryptocurrency :: CreateOnRampPaymentSession -> Maybe Text
cryptocurrency = Maybe Text
cryptocurrency_
, address :: CreateOnRampPaymentSession -> Maybe Text
address = Maybe Text
address_
, payment_method_name :: CreateOnRampPaymentSession -> Maybe Text
payment_method_name = Maybe Text
payment_method_name_
, base_currency :: CreateOnRampPaymentSession -> Maybe Text
base_currency = Maybe Text
base_currency_
, cryptocurrency_amount :: CreateOnRampPaymentSession -> Maybe Text
cryptocurrency_amount = Maybe Text
cryptocurrency_amount_
, base_currency_amount :: CreateOnRampPaymentSession -> Maybe Text
base_currency_amount = Maybe Text
base_currency_amount_
, memo :: CreateOnRampPaymentSession -> Maybe Text
memo = Maybe Text
memo_
, theme :: CreateOnRampPaymentSession -> Maybe Text
theme = Maybe Text
theme_
, success_return_url :: CreateOnRampPaymentSession -> Maybe Text
success_return_url = Maybe Text
success_return_url_
, fail_return_url :: CreateOnRampPaymentSession -> Maybe Text
fail_return_url = Maybe Text
fail_return_url_
}
= String
"CreateOnRampPaymentSession"
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
"address" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
address_
, String
"payment_method_name" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
payment_method_name_
, 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
"memo" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
memo_
, String
"theme" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
theme_
, String
"success_return_url" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
success_return_url_
, String
"fail_return_url" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
fail_return_url_
]
instance AT.ToJSON CreateOnRampPaymentSession where
toJSON :: CreateOnRampPaymentSession -> Value
toJSON
CreateOnRampPaymentSession
{ provider_id :: CreateOnRampPaymentSession -> Maybe Text
provider_id = Maybe Text
provider_id_
, cryptocurrency :: CreateOnRampPaymentSession -> Maybe Text
cryptocurrency = Maybe Text
cryptocurrency_
, address :: CreateOnRampPaymentSession -> Maybe Text
address = Maybe Text
address_
, payment_method_name :: CreateOnRampPaymentSession -> Maybe Text
payment_method_name = Maybe Text
payment_method_name_
, base_currency :: CreateOnRampPaymentSession -> Maybe Text
base_currency = Maybe Text
base_currency_
, cryptocurrency_amount :: CreateOnRampPaymentSession -> Maybe Text
cryptocurrency_amount = Maybe Text
cryptocurrency_amount_
, base_currency_amount :: CreateOnRampPaymentSession -> Maybe Text
base_currency_amount = Maybe Text
base_currency_amount_
, memo :: CreateOnRampPaymentSession -> Maybe Text
memo = Maybe Text
memo_
, theme :: CreateOnRampPaymentSession -> Maybe Text
theme = Maybe Text
theme_
, success_return_url :: CreateOnRampPaymentSession -> Maybe Text
success_return_url = Maybe Text
success_return_url_
, fail_return_url :: CreateOnRampPaymentSession -> Maybe Text
fail_return_url = Maybe Text
fail_return_url_
}
= [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
"createOnRampPaymentSession"
, 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
"address" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
address_
, 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_
, 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
"memo" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
memo_
, Key
"theme" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
theme_
, Key
"success_return_url" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
success_return_url_
, Key
"fail_return_url" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
fail_return_url_
]
defaultCreateOnRampPaymentSession :: CreateOnRampPaymentSession
defaultCreateOnRampPaymentSession :: CreateOnRampPaymentSession
defaultCreateOnRampPaymentSession =
CreateOnRampPaymentSession
{ provider_id :: Maybe Text
provider_id = Maybe Text
forall a. Maybe a
Nothing
, cryptocurrency :: Maybe Text
cryptocurrency = Maybe Text
forall a. Maybe a
Nothing
, address :: Maybe Text
address = Maybe Text
forall a. Maybe a
Nothing
, payment_method_name :: Maybe Text
payment_method_name = 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
, memo :: Maybe Text
memo = Maybe Text
forall a. Maybe a
Nothing
, theme :: Maybe Text
theme = Maybe Text
forall a. Maybe a
Nothing
, success_return_url :: Maybe Text
success_return_url = Maybe Text
forall a. Maybe a
Nothing
, fail_return_url :: Maybe Text
fail_return_url = Maybe Text
forall a. Maybe a
Nothing
}