BusinessConnection class abstract

Represents the connection of the bot with a business account.

Implemented types
Annotations
  • @freezed

Constructors

BusinessConnection.new({@JsonKey(name: 'id') required String id, @JsonKey(name: 'user') required User user, @JsonKey(name: 'user_chat_id') required int userChatId, @JsonKey(name: 'date') required int date, @JsonKey(name: 'rights') required BusinessBotRights rights, @JsonKey(name: 'is_enabled') required bool isEnabled})
Constructs a new BusinessConnection instance with the provided parameters.
const
factory
BusinessConnection.fromJson(Map<String, dynamic> json)
Constructs a BusinessConnection instance from a JSON map.
factory

Properties

copyWith → $BusinessConnectionCopyWith<BusinessConnection>
Create a copy of BusinessConnection with the given fields replaced by the non-null parameter values.
no setterinherited
date int
Date the connection was established in Unix time.
no setterinherited
from User
Business account user that created the business connection.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
id String
Unique identifier of the business connection.
no setterinherited
isEnabled bool
Indicates whether the connection is active.
no setterinherited
rights → BusinessBotRights
Indicates whether the bot can act on behalf of the business account in chats that were active in the last 24 hours.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
user User
Business account user that created the business connection.
no setterinherited
userChatId int
Identifier of a private chat with the user who created the business connection. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.
no setterinherited

Methods

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

Operators

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