{-# LANGUAGE DeriveGeneric #-}
module Telegram.Bot.API.Types.Invoice where
import Data.Aeson (FromJSON (..), ToJSON (..))
import Data.Text (Text)
import GHC.Generics (Generic)
import Telegram.Bot.API.Internal.Utils
data Invoice = Invoice
{ Invoice -> Text
invoiceTitle :: Text
, Invoice -> Text
invoiceDescription :: Text
, Invoice -> Text
invoiceStartParameter :: Text
, Invoice -> Text
invoiceCurrency :: Text
, Invoice -> Int
invoiceTotalAmount :: Int
}
deriving (forall x. Rep Invoice x -> Invoice
forall x. Invoice -> Rep Invoice x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Invoice x -> Invoice
$cfrom :: forall x. Invoice -> Rep Invoice x
Generic, Int -> Invoice -> ShowS
[Invoice] -> ShowS
Invoice -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Invoice] -> ShowS
$cshowList :: [Invoice] -> ShowS
show :: Invoice -> String
$cshow :: Invoice -> String
showsPrec :: Int -> Invoice -> ShowS
$cshowsPrec :: Int -> Invoice -> ShowS
Show)
instance ToJSON Invoice where toJSON :: Invoice -> Value
toJSON = forall a (d :: Meta) (f :: * -> *).
(Generic a, GToJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
a -> Value
gtoJSON
instance FromJSON Invoice where parseJSON :: Value -> Parser Invoice
parseJSON = forall a (d :: Meta) (f :: * -> *).
(Generic a, GFromJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
Value -> Parser a
gparseJSON