module Tourmaline::Client::PaymentMethods
#
Direct including types
Tourmaline::Client
Methods#
#answer_pre_checkout_query(pre_checkout_query_id, ok, error_message = nil)
#
(pre_checkout_query_id, ok, error_message = nil)
Once the user has confirmed their payment and shipping details, the Client API sends
the final confirmation in the form of a Update
with the field pre_checkout_query.
Use this method to respond to such pre-checkout queries.
On success, true
is returned.
Note: The Client API must receive an answer within 10 seconds after the pre-checkout query was sent.
#answer_shipping_query(shipping_query_id, ok, shipping_options = nil, error_message = nil)
#
(shipping_query_id, ok, shipping_options = nil, error_message = nil)
If you sent an invoice requesting a shipping address and the parameter is_flexible
was specified, the Client API will send a Update
with a shipping_query field to
the bot. Use this method to reply to shipping queries.
On success, true
is returned.
#create_invoice_link(title, description, payload, provider_token, currency, prices, max_tip_amount = nil, suggested_tip_amounts = nil, provider_data = nil, photo_url = nil, photo_size = nil, photo_width = nil, photo_height = nil, need_name = nil, need_phone_number = nil, need_email = nil, need_shipping_address = nil, send_phone_number_to_provider = nil, send_email_to_provider = nil, is_flexible = nil)
#
(title, description, payload, provider_token, currency, prices, max_tip_amount = nil, suggested_tip_amounts = nil, provider_data = nil, photo_url = nil, photo_size = nil, photo_width = nil, photo_height = nil, need_name = nil, need_phone_number = nil, need_email = nil, need_shipping_address = nil, send_phone_number_to_provider = nil, send_email_to_provider = nil, is_flexible = nil)
Use this method to create a link for an invoice. Returns the created invoice link as String on success.
#labeled_prices(lp : Array(NamedTuple()))
#
(lp : Array(NamedTuple()))
Convenience method to create and Array
of LabledPrice
from an Array
of NamedTuple(label: String, amount: Int32)
.
TODO: Replace with a builder of some kind
#send_invoice(chat, title, description, payload, provider_token, currency, prices, message_thread_id = nil, max_tip_amount = nil, suggested_tip_amounts = nil, start_parameter = nil, provider_data = nil, photo_url = nil, photo_size = nil, photo_width = nil, photo_height = nil, need_name = nil, need_phone_number = nil, need_email = nil, need_shipping_address = nil, send_phone_number_to_provider = nil, send_email_to_provider = nil, is_flexible = nil, disable_notification = nil, reply_to_message = nil, reply_markup = nil)
#
(chat, title, description, payload, provider_token, currency, prices, message_thread_id = nil, max_tip_amount = nil, suggested_tip_amounts = nil, start_parameter = nil, provider_data = nil, photo_url = nil, photo_size = nil, photo_width = nil, photo_height = nil, need_name = nil, need_phone_number = nil, need_email = nil, need_shipping_address = nil, send_phone_number_to_provider = nil, send_email_to_provider = nil, is_flexible = nil, disable_notification = nil, reply_to_message = nil, reply_markup = nil)
Use this method to send invoices.
On success, the sent Message
is returned.
#shipping_options(options : Array(NamedTuple()))
#
(options : Array(NamedTuple()))
Convenience method to create an Array
of ShippingOption
from a
NamedTuple(id: String, title: String, prices: Array(LabeledPrice))
.
TODO: Replace with a builder of some kind