telegram-bot-api-6.7: Easy to use library for building Telegram bots. Exports Telegram Bot API.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Telegram.Bot.API.Payments

Synopsis

Methods

sendInvoice

data SendInvoiceRequest Source #

Constructors

SendInvoiceRequest 

Fields

Instances

Instances details
FromJSON SendInvoiceRequest Source # 
Instance details

Defined in Telegram.Bot.API.Payments

ToJSON 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 #

Show 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-api-6.7-8B5O9jcStFh8aacJiwZZeM" 'False) (C1 ('MetaCons "SendInvoiceRequest" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "sendInvoiceChatId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ChatId) :*: (S1 ('MetaSel ('Just "sendInvoiceMessageThreadId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe MessageThreadId)) :*: S1 ('MetaSel ('Just "sendInvoiceTitle") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) :*: ((S1 ('MetaSel ('Just "sendInvoiceDescription") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "sendInvoicePayload") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "sendInvoiceProviderToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "sendInvoiceCurrency") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))) :*: ((S1 ('MetaSel ('Just "sendInvoicePrices") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [LabeledPrice]) :*: (S1 ('MetaSel ('Just "sendInvoiceMaxTipAmount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Integer)) :*: S1 ('MetaSel ('Just "sendInvoiceequestSuggestedTipAmounts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [Integer])))) :*: ((S1 ('MetaSel ('Just "sendInvoiceStartParameter") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "sendInvoiceProviderData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "sendInvoicePhotoUrl") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "sendInvoicePhotoSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)))))) :*: (((S1 ('MetaSel ('Just "sendInvoicePhotoWidth") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)) :*: (S1 ('MetaSel ('Just "sendInvoicePhotoHeight") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "sendInvoiceNeedName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)))) :*: ((S1 ('MetaSel ('Just "sendInvoiceNeedPhoneNumber") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "sendInvoiceNeedEmail") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool))) :*: (S1 ('MetaSel ('Just "sendInvoiceNeedShippingAddress") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "sendInvoiceSendPhoneNumberToProvider") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool))))) :*: ((S1 ('MetaSel ('Just "sendInvoiceSendEmailToProvider") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: (S1 ('MetaSel ('Just "sendInvoiceIsFlexible") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "sendInvoiceDisableNotification") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)))) :*: ((S1 ('MetaSel ('Just "sendInvoiceProtectContent") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "sendInvoiceReplyToMessageId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe MessageId))) :*: (S1 ('MetaSel ('Just "sendInvoiceAllowSendingWithoutReply") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "sendInvoiceReplyMarkup") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe InlineKeyboardMarkup))))))))

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

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

createInvoiceLink

data CreateInvoiceLinkRequest Source #

Constructors

CreateInvoiceLinkRequest 

Fields

Instances

Instances details
FromJSON CreateInvoiceLinkRequest Source # 
Instance details

Defined in Telegram.Bot.API.Payments

ToJSON CreateInvoiceLinkRequest Source # 
Instance details

Defined in Telegram.Bot.API.Payments

Generic CreateInvoiceLinkRequest Source # 
Instance details

Defined in Telegram.Bot.API.Payments

Associated Types

type Rep CreateInvoiceLinkRequest :: Type -> Type #

Show CreateInvoiceLinkRequest Source # 
Instance details

Defined in Telegram.Bot.API.Payments

type Rep CreateInvoiceLinkRequest Source # 
Instance details

Defined in Telegram.Bot.API.Payments

type Rep CreateInvoiceLinkRequest = D1 ('MetaData "CreateInvoiceLinkRequest" "Telegram.Bot.API.Payments" "telegram-bot-api-6.7-8B5O9jcStFh8aacJiwZZeM" 'False) (C1 ('MetaCons "CreateInvoiceLinkRequest" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "createInvoiceLinkTitle") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "createInvoiceLinkDescription") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "createInvoiceLinkPayload") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "createInvoiceLinkProviderToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "createInvoiceLinkCurrency") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))) :*: ((S1 ('MetaSel ('Just "createInvoiceLinkPrices") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [LabeledPrice]) :*: S1 ('MetaSel ('Just "createInvoiceLinkMaxTipAmount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Integer))) :*: (S1 ('MetaSel ('Just "createInvoiceLinkSuggestedTipAmounts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [Integer])) :*: (S1 ('MetaSel ('Just "createInvoiceLinkProviderData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "createInvoiceLinkPhotoUrl") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)))))) :*: (((S1 ('MetaSel ('Just "createInvoiceLinkPhotoSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "createInvoiceLinkPhotoWidth") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int))) :*: (S1 ('MetaSel ('Just "createInvoiceLinkPhotoHeight") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)) :*: (S1 ('MetaSel ('Just "createInvoiceLinkNeedName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "createInvoiceLinkNeedPhoneNumber") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool))))) :*: ((S1 ('MetaSel ('Just "createInvoiceLinkNeedEmail") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "createInvoiceLinkNeedShippingAddress") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool))) :*: (S1 ('MetaSel ('Just "createInvoiceLinkSendPhoneNumberToProvider") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: (S1 ('MetaSel ('Just "createInvoiceLinkSendEmailToProvider") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "createInvoiceLinkIsFlexible") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool))))))))

createInvoiceLink :: CreateInvoiceLinkRequest -> ClientM (Response Text) Source #

Use this method to create a link for an invoice. Returns the created invoice link as Text on success.

answerShippingQuery

data AnswerShippingQueryRequest Source #

Constructors

AnswerShippingQueryRequest 

Fields

Instances

Instances details
FromJSON AnswerShippingQueryRequest Source # 
Instance details

Defined in Telegram.Bot.API.Payments

ToJSON 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 #

Show 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-api-6.7-8B5O9jcStFh8aacJiwZZeM" 'False) (C1 ('MetaCons "AnswerShippingQueryRequest" 'PrefixI 'True) ((S1 ('MetaSel ('Just "answerShippingQueryShippingQueryId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "answerShippingQueryOk") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "answerShippingQueryShippingOptions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [ShippingOption])) :*: S1 ('MetaSel ('Just "answerShippingQueryErrorMessage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)))))

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

  • answerPreCheckoutQueryPreCheckoutQueryId :: Text

    Unique identifier for the query to be answered.

  • answerPreCheckoutQueryOk :: Bool

    Specify True if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use False if there are any problems.

  • answerPreCheckoutQueryErrorMessage :: Maybe Text

    Required if ok is False. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. "Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!"). Telegram will display this message to the user.

Instances

Instances details
FromJSON AnswerPreCheckoutQueryRequest Source # 
Instance details

Defined in Telegram.Bot.API.Payments

ToJSON 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 #

Show 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-api-6.7-8B5O9jcStFh8aacJiwZZeM" 'False) (C1 ('MetaCons "AnswerPreCheckoutQueryRequest" 'PrefixI 'True) (S1 ('MetaSel ('Just "answerPreCheckoutQueryPreCheckoutQueryId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "answerPreCheckoutQueryOk") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "answerPreCheckoutQueryErrorMessage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)))))

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.