ShippingQuery¶
- class aiogram.types.shipping_query.ShippingQuery(*, id: str, from_user: User, invoice_payload: str, shipping_address: ShippingAddress, **extra_data: Any)[source]¶
This object contains information about an incoming shipping query.
Source: https://core.telegram.org/bots/api#shippingquery
- id: str¶
Unique query identifier
- invoice_payload: str¶
Bot-specified invoice payload
- shipping_address: ShippingAddress¶
User specified shipping address
- answer(ok: bool, shipping_options: list[ShippingOption] | None = None, error_message: str | None = None, **kwargs: Any) AnswerShippingQuery[source]¶
Shortcut for method
aiogram.methods.answer_shipping_query.AnswerShippingQuerywill automatically fill method attributes:shipping_query_id
If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the Bot API will send an
aiogram.types.update.Updatewith a shipping_query field to the bot. Use this method to reply to shipping queries. On success,Trueis returned.Source: https://core.telegram.org/bots/api#answershippingquery
- Parameters:
ok – Pass
Trueif delivery to the specified address is possible andFalseif there are any problems (for example, if delivery to the specified address is not possible)shipping_options – Required if ok is
True. A JSON-serialized array of available shipping options.error_message – Required if ok is
False. Error message in human readable form that explains why it is impossible to complete the order (e.g. ‘Sorry, delivery to your desired address is unavailable’). Telegram will display this message to the user.
- Returns:
instance of method
aiogram.methods.answer_shipping_query.AnswerShippingQuery