SuggestedPostPrice constructor

const SuggestedPostPrice({
  1. @JsonKey.new(name: 'currency') required String currency,
  2. @JsonKey.new(name: 'amount') required int amount,
})

Creates a new SuggestedPostPrice object.

Implementation

const factory SuggestedPostPrice({
  /// Currency in which the post will be paid.
  ///
  /// Currently, must be one of:
  /// - "XTR" for Telegram Stars
  /// - "TON" for toncoins
  @JsonKey(name: 'currency') required String currency,

  /// The amount of the currency that will be paid for the post in the smallest units of the currency.
  ///
  /// This means:
  /// - For Telegram Stars: the actual number of stars (must be between 5 and 100000)
  /// - For toncoins: nanotoncoins (must be between 10000000 and 10000000000000)
  @JsonKey(name: 'amount') required int amount,
}) = _SuggestedPostPrice;