Class TransactionPartner

Hierarchy (view full)

  • Base
    • TransactionPartner

Constructors

Properties

gift?: string

The gift sent to the user by the bot.

paidMedia?: PaidMedia[]

Information about the paid media bought by the user

paidMediaPayload?: string

Bot-specified paid media payload

payload?: string

Bot-specified invoice payload

requestCount?: number

The number of successful requests that exceeded regular limits and were therefore billed

subscriptionPeriod?: number

The duration of the paid subscription.

type:
    | "other"
    | "user"
    | "fragment"
    | "telegram_api"
    | "telegram_ads"

Type of the transaction partner

user?: User

Information about the user

State of the transaction if the transaction is outgoing

Accessors

Methods

  • Protected

    Creates a clone of the current instance

    Returns Base

    A clone of the current instance

  • Parameters

    • data: TransactionPartner

      Data about the describes the source of a transaction, or its recipient for outgoing transactions

    Returns TransactionPartner

  • Protected

    Updates the current instance with new data and returns a clone of the updated instance

    Parameters

    • data: Record<string, any>

      The data to update the instance with

    Returns Base

    A clone of the updated instance

  • Returns this is TransactionPartner & {
        gift?: undefined;
        paidMedia?: undefined;
        paidMediaPayload?: undefined;
        requestCount?: undefined;
        subscriptionPeriod?: undefined;
        user?: undefined;
        withdrawal: RevenueWithdrawalState;
    }

  • Returns this is TransactionPartner & {
        gift?: undefined;
        paidMedia?: undefined;
        paidMediaPayload?: undefined;
        requestCount: number;
        subscriptionPeriod?: undefined;
        user?: undefined;
        withdrawal?: undefined;
    }

  • Returns this is TransactionPartner & {
        gift?: string;
        paidMedia?: PaidMedia[];
        paidMediaPayload?: string;
        requestCount?: undefined;
        subscriptionPeriod?: number;
        user: User;
        withdrawal?: undefined;
    }

  • Flatten an object. Any properties that are collections will get converted to an array of keys.

    Parameters

    • OptionalpropsRecursive: boolean

      Optional. If true, calls toJSON method on nested objects.

    • Rest...props: Record<string, string | boolean>[]

      Optional. Specific properties to include/exclude, or rename.

    Returns Record<string, any>

    Flattened object.

  • Returns the id instance Chat, User, ChatMember and other

    Returns null | string