SuggestedPostParameters class abstract

Contains parameters of a post that is being suggested by the bot.

This object is used when suggesting posts through the Telegram Bot API, allowing bots to propose content with specific pricing and scheduling options.

Available extensions
Annotations
  • @freezed

Constructors

SuggestedPostParameters.new({@JsonKey(name: 'price') SuggestedPostPrice? price, @JsonKey(name: 'send_date') int? sendDate})
Creates a new SuggestedPostParameters object.
const
factory
SuggestedPostParameters.fromJson(Map<String, dynamic> json)
Creates a new SuggestedPostParameters object from a JSON Map.
factory

Properties

copyWith → $SuggestedPostParametersCopyWith<SuggestedPostParameters>
Create a copy of SuggestedPostParameters with the given fields replaced by the non-null parameter values.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
isPaidPost bool

Available on SuggestedPostParameters, provided by the SuggestedPostParametersExt extension

Checks if the post has a price set (is a paid post)
no setter
isScheduled bool

Available on SuggestedPostParameters, provided by the SuggestedPostParametersExt extension

Checks if the post has a scheduled send date
no setter
price SuggestedPostPrice?
Optional. Proposed price for the post. If the field is omitted, then the post is unpaid.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sendDate int?
Optional. Proposed send date of the post. If specified, then the date must be between 300 second and 2678400 seconds (30 days) in the future. If the field is omitted, then the post can be published at any time within 30 days at the sole discretion of the user who approves it.
no setterinherited
sendDateTime DateTime?

Available on SuggestedPostParameters, provided by the SuggestedPostParametersExt extension

Gets the send date as a DateTime object, if set
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this SuggestedPostParameters to a JSON map.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited