BotSubscriptionUpdated constructor

const BotSubscriptionUpdated({
  1. @JsonKey.new(name: 'user') required User user,
  2. @JsonKey.new(name: 'invoice_payload') required String invoicePayload,
  3. @JsonKey.new(name: 'state') required String state,
})

Creates a new BotSubscriptionUpdated object.

Implementation

const factory BotSubscriptionUpdated({
  /// User who subscribed for payments toward the bot
  @JsonKey(name: 'user') required User user,

  /// Bot-specified invoice payload
  @JsonKey(name: 'invoice_payload') required String invoicePayload,

  /// The new state of the subscription. Currently, it can be one of “canceled”
  /// if the user canceled the subscription, “active” if the user re-enabled a
  /// previously canceled subscription, or “failed” if payment for the
  /// subscription failed.
  @JsonKey(name: 'state') required String state,
}) = _BotSubscriptionUpdated;