TransactionPartner.chat constructor
- @Assert('type == TransactionPartnerType.chat', 'type must be TransactionPartnerType.chat')
- @JsonKey(name: 'type') @Default(TransactionPartnerType.chat) TransactionPartnerType type,
- @JsonKey(name: 'chat') required Chat chat,
- @JsonKey(name: 'gift') Gift? gift,
Describes a transaction with a chat
Implementation
@Assert(
'type == TransactionPartnerType.chat',
'type must be TransactionPartnerType.chat',
)
const factory TransactionPartner.chat({
/// Type of the transaction partner, must be "chat"
@JsonKey(name: 'type')
@Default(TransactionPartnerType.chat)
TransactionPartnerType type,
/// Information about the chat.
@JsonKey(name: 'chat') required final Chat chat,
/// The gift sent to the chat by the bot.
@JsonKey(name: 'gift') final Gift? gift,
}) = TransactionPartnerChat;