Class ShippingQuery

Hierarchy (view full)

Constructors

Properties

author: User

User who sent the query

id: string

Unique query identifier

invoicePayload: string

Bot specified invoice payload.

shippingAddress: {
    city: string;
    countryCode: string;
    postCode: string;
    state: string;
    streetLine1: string;
    streetLine2: string;
}

User specified shipping address

Type declaration

  • city: string
    • City
  • countryCode: string
    • Two-letter ISO 3166-1 alpha-2 country code
  • postCode: string
    • Address post code
  • state: string
    • State, if applicable
  • streetLine1: string
    • First line for the address
  • streetLine2: string
    • Second line for the address

Accessors

Methods

  • Protected

    Patches the current instance with new data

    Parameters

    • data: Record<string, any>

      The data to patch the instance with

    Returns Record<string, any>

    The patched data

  • 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

  • If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the Bot API will send an Update with a shipping_query field to the bot. Use this method to reply to shipping queries.

    Parameters

    • ok: boolean

      Pass True if delivery to the specified address is possible and False if there are any problems (for example, if delivery to the specified address is not possible)

    • Optionaloptions: Omit<{
          errorMessage?: string;
          ok: boolean;
          shippingOptions?: readonly ShippingOption[];
          shippingQueryId: string;
      }, "ok" | "shippingQueryId">

      out parameters

    Returns Promise<true>

    On success, True is returned.