module Tourmaline::Client::PaymentMethods
Direct including types
Defined in:
tourmaline/client/payment_methods.crInstance Method Summary
-
#answer_pre_checkout_query(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. -
#answer_shipping_query(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. -
#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)
Use this method to create a link for an invoice.
-
#labeled_prices(lp : Array(NamedTuple(label: String, amount: Int32)))
Convenience method to create and
Array
ofLabledPrice
from anArray
ofNamedTuple(label: String, amount: Int32)
. -
#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)
Use this method to send invoices.
-
#shipping_options(options : Array(NamedTuple(id: String, title: String, prices: Array(LabeledPrice))))
Convenience method to create an
Array
ofShippingOption
from aNamedTuple(id: String, title: String, prices: Array(LabeledPrice))
.
Instance Method Detail
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.
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.
Use this method to create a link for an invoice. Returns the created invoice link as String on success.
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
Use this method to send invoices.
On success, the sent Message
is returned.
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