From 02e1c3cdfa508cafa66254632d38d30142e7621c Mon Sep 17 00:00:00 2001 From: Maxim Lebedev Date: Fri, 6 Oct 2017 13:49:23 +0500 Subject: [PATCH] :sparkles: Added NewInvoice helper --- toolbox.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/toolbox.go b/toolbox.go index f033579..d300d6d 100644 --- a/toolbox.go +++ b/toolbox.go @@ -25,6 +25,19 @@ func NewMessage(chatID int64, text string) *SendMessageParameters { return &SendMessageParameters{ChatID: chatID, Text: text} } +func NewInvoice(chatID int64, title, description, payload, providerToken, startParameter, currency string, prices ...LabeledPrice) *SendInvoiceParameters { + return &SendInvoiceParameters{ + ChatID: chatID, + Title: title, + Description: description, + Payload: payload, + ProviderToken: providerToken, + StartParameter: startParameter, + Currency: currency, + Prices: prices, + } +} + func NewReplyKeyboard(rows ...[]KeyboardButton) *ReplyKeyboardMarkup { var keyboard [][]KeyboardButton keyboard = append(keyboard, rows...)