telegram-bot-simple-0.5.2: Easy to use library for building Telegram bots.
Safe HaskellNone
LanguageHaskell2010

Telegram.Bot.API.Payments

Synopsis

Methods

sendInvoice

data SendInvoiceRequest Source #

Constructors

SendInvoiceRequest 

Fields

Instances

Instances details
Show SendInvoiceRequest Source # 
Instance details

Defined in Telegram.Bot.API.Payments

Generic SendInvoiceRequest Source # 
Instance details

Defined in Telegram.Bot.API.Payments

Associated Types

type Rep SendInvoiceRequest :: Type -> Type #

FromJSON SendInvoiceRequest Source # 
Instance details

Defined in Telegram.Bot.API.Payments

Methods

parseJSON :: Value -> Parser SendInvoiceRequest

parseJSONList :: Value -> Parser [SendInvoiceRequest]

ToJSON SendInvoiceRequest Source # 
Instance details

Defined in Telegram.Bot.API.Payments

type Rep SendInvoiceRequest Source # 
Instance details

Defined in Telegram.Bot.API.Payments

type Rep SendInvoiceRequest = D1 ('MetaData "SendInvoiceRequest" "Telegram.Bot.API.Payments" "telegram-bot-simple-0.5.2-inplace" 'False) (C1 ('MetaCons "SendInvoiceRequest" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "sendInvoiceRequestChatId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ChatId) :*: (S1 ('MetaSel ('Just "sendInvoiceRequestTitle") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "sendInvoiceRequestDescription") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) :*: (S1 ('MetaSel ('Just "sendInvoiceRequestPayload") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "sendInvoiceRequestProviderToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "sendInvoiceRequestCurrency") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))) :*: ((S1 ('MetaSel ('Just "sendInvoiceRequestPrices") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [LabeledPrice]) :*: (S1 ('MetaSel ('Just "sendInvoiceRequestMaxTipAmount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Integer)) :*: S1 ('MetaSel ('Just "sendInvoiceRequestSuggestedTipAmounts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [Integer])))) :*: ((S1 ('MetaSel ('Just "sendInvoiceRequestStartParameter") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "sendInvoiceRequestProviderData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "sendInvoiceRequestPhotoUrl") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "sendInvoiceRequestPhotoSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)))))) :*: (((S1 ('MetaSel ('Just "sendInvoiceRequestPhotoWidth") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)) :*: (S1 ('MetaSel ('Just "sendInvoiceRequestPhotoHeight") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "sendInvoiceRequestNeedName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)))) :*: ((S1 ('MetaSel ('Just "sendInvoiceRequestNeedPhoneNumber") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "sendInvoiceRequestNeedEmail") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool))) :*: (S1 ('MetaSel ('Just "sendInvoiceRequestNeedShippingAddress") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "sendInvoiceRequestSendPhoneNumberToProvider") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool))))) :*: ((S1 ('MetaSel ('Just "sendInvoiceRequestSendEmailToProvider") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: (S1 ('MetaSel ('Just "sendInvoiceRequestIsFlexible") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "sendInvoiceRequestDisableNotification") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)))) :*: ((S1 ('MetaSel ('Just "sendInvoiceRequestProtectContent") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "sendInvoiceRequestReplyToMessageId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe MessageId))) :*: (S1 ('MetaSel ('Just "sendInvoiceRequestAllowSendingWithoutReply") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "sendInvoiceRequestReplyMarkup") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe InlineKeyboardMarkup))))))))

type SendInvoice = "sendInvoice" :> (ReqBody '[JSON] SendInvoiceRequest :> Post '[JSON] (Response Message)) Source #

sendInvoice :: SendInvoiceRequest -> ClientM (Response Message) Source #

Use this method to send invoices. On success, the sent Message is returned.

answerShippingQuery

data AnswerShippingQueryRequest Source #

Constructors

AnswerShippingQueryRequest 

Fields

Instances

Instances details
Show AnswerShippingQueryRequest Source # 
Instance details

Defined in Telegram.Bot.API.Payments

Generic AnswerShippingQueryRequest Source # 
Instance details

Defined in Telegram.Bot.API.Payments

Associated Types

type Rep AnswerShippingQueryRequest :: Type -> Type #

FromJSON AnswerShippingQueryRequest Source # 
Instance details

Defined in Telegram.Bot.API.Payments

ToJSON AnswerShippingQueryRequest Source # 
Instance details

Defined in Telegram.Bot.API.Payments

type Rep AnswerShippingQueryRequest Source # 
Instance details

Defined in Telegram.Bot.API.Payments

type Rep AnswerShippingQueryRequest = D1 ('MetaData "AnswerShippingQueryRequest" "Telegram.Bot.API.Payments" "telegram-bot-simple-0.5.2-inplace" 'False) (C1 ('MetaCons "AnswerShippingQueryRequest" 'PrefixI 'True) ((S1 ('MetaSel ('Just "answerShippingQueryRequestShippingQueryId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "answerShippingQueryRequestOk") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "answerShippingQueryRequestShippingOptions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [ShippingOption])) :*: S1 ('MetaSel ('Just "answerShippingQueryRequestErrorMessage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)))))

type AnswerShippingQuery = "answerShippingQuery" :> (ReqBody '[JSON] AnswerShippingQueryRequest :> Post '[JSON] (Response Bool)) Source #

answerShippingQuery :: AnswerShippingQueryRequest -> ClientM (Response Bool) Source #

If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the Bot API will send an Update with a shipping_query field to the bot. Use this method to reply to shipping queries. On success, True is returned.

answerPreCheckoutQuery

data AnswerPreCheckoutQueryRequest Source #

Constructors

AnswerPreCheckoutQueryRequest 

Fields

Instances

Instances details
Show AnswerPreCheckoutQueryRequest Source # 
Instance details

Defined in Telegram.Bot.API.Payments

Generic AnswerPreCheckoutQueryRequest Source # 
Instance details

Defined in Telegram.Bot.API.Payments

Associated Types

type Rep AnswerPreCheckoutQueryRequest :: Type -> Type #

FromJSON AnswerPreCheckoutQueryRequest Source # 
Instance details

Defined in Telegram.Bot.API.Payments

ToJSON AnswerPreCheckoutQueryRequest Source # 
Instance details

Defined in Telegram.Bot.API.Payments

type Rep AnswerPreCheckoutQueryRequest Source # 
Instance details

Defined in Telegram.Bot.API.Payments

type Rep AnswerPreCheckoutQueryRequest = D1 ('MetaData "AnswerPreCheckoutQueryRequest" "Telegram.Bot.API.Payments" "telegram-bot-simple-0.5.2-inplace" 'False) (C1 ('MetaCons "AnswerPreCheckoutQueryRequest" 'PrefixI 'True) (S1 ('MetaSel ('Just "answerPreCheckoutQueryRequestPreCheckoutQueryId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "answerPreCheckoutQueryRequestOk") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "answerPreCheckoutQueryRequestErrorMessage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)))))

type AnswerPreCheckoutQuery = "answerPreCheckoutQuery" :> (ReqBody '[JSON] AnswerPreCheckoutQueryRequest :> Post '[JSON] (Response Bool)) Source #

answerPreCheckoutQuery :: AnswerPreCheckoutQueryRequest -> ClientM (Response Bool) Source #

Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an Update with the field pre_checkout_query. Use this method to respond to such pre-checkout queries. On success, True is returned. Note: The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent.