BusinessConnection class abstract

Represents the connection of the bot with a business account.

Implemented types
Available extensions
Annotations
  • @freezed

Constructors

BusinessConnection({@JsonKey.new(name: 'id') required String id, @JsonKey.new(name: 'user') required User user, @JsonKey.new(name: 'user_chat_id') required int userChatId, @JsonKey.new(name: 'date') required int date, @JsonKey.new(name: 'rights') required BusinessBotRights rights, @JsonKey.new(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

map<TResult extends Object?>(TResult $default(_BusinessConnection value)) → TResult

Available on BusinessConnection, provided by the BusinessConnectionPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_BusinessConnection value)?) → TResult?

Available on BusinessConnection, provided by the BusinessConnectionPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_BusinessConnection value)?, {required TResult orElse()}) → TResult

Available on BusinessConnection, provided by the BusinessConnectionPatterns extension

A variant of map that fallback to returning orElse.
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