AccountSession.fromJson constructor

AccountSession.fromJson(
  1. Object? json
)

Implementation

factory AccountSession.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return AccountSession(
    account: (map['account'] as String),
    clientSecret: (map['client_secret'] as String),
    components: ConnectEmbeddedAccountSessionCreateComponents.fromJson(
        map['components']),
    expiresAt: DateTime.fromMillisecondsSinceEpoch(
        (map['expires_at'] as int).toInt()),
    livemode: (map['livemode'] as bool),
  );
}