Webhook.fromMap constructor

Webhook.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory Webhook.fromMap(Map<String, dynamic> map) {
  return Webhook(
    $id: map['\$id'].toString(),
    $createdAt: map['\$createdAt'].toString(),
    $updatedAt: map['\$updatedAt'].toString(),
    name: map['name'].toString(),
    url: map['url'].toString(),
    events: List.from(map['events'] ?? []),
    security: map['security'],
    httpUser: map['httpUser'].toString(),
    httpPass: map['httpPass'].toString(),
    signatureKey: map['signatureKey'].toString(),
    enabled: map['enabled'],
    logs: map['logs'].toString(),
    attempts: map['attempts'],
  );
}