Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/mtkruto/tl/2_types.ts>Invoice_

Cross-runtime JavaScript library for building Telegram clients
Go to Latest
class Invoice_
extends _Invoice_
import { Invoice_ } from "https://deno.land/x/mtkruto@0.1.190/tl/2_types.ts";

Invoice

Constructors

new
Invoice_(params: { test?: true; name_requested?: true; phone_requested?: true; email_requested?: true; shipping_address_requested?: true; flexible?: true; phone_to_provider?: true; email_to_provider?: true; recurring?: true; currency: string; prices: Array<enums.LabeledPrice>; max_tip_amount?: bigint; suggested_tip_amounts?: Array<bigint>; terms_url?: string; })

Properties

protected
readonly
[id]: number
protected
readonly
[params]: Params
currency: string

Three-letter ISO 4217 currency code

optional
email_requested: true

Set this flag if you require the user's email address to complete the order

optional
email_to_provider: true

Set this flag if user's email address should be sent to provider

optional
flexible: true

Set this flag if the final price depends on the shipping method

optional
max_tip_amount: bigint

The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).

optional
name_requested: true

Set this flag if you require the user's full name to complete the order

optional
phone_requested: true

Set this flag if you require the user's phone number to complete the order

optional
phone_to_provider: true

Set this flag if user's phone number should be sent to provider

prices: Array<enums.LabeledPrice>

Price breakdown, a list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)

optional
recurring: true

Whether this is a recurring payment

optional
shipping_address_requested: true

Set this flag if you require the user's shipping address to complete the order

optional
suggested_tip_amounts: Array<bigint>

A vector of suggested amounts of tips in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount.

optional
terms_url: string

Terms of service URL

optional
test: true

Test invoice

Static Properties

readonly
[name]: string
readonly
[paramDesc]: ParamDesc