webhook static method
Build a CoffrifyWebhook with overridable fields.
Implementation
static CoffrifyWebhook webhook({
String? id,
String? name,
String? url,
List<String>? events,
bool isActive = true,
}) {
final n = ++_seq;
return CoffrifyWebhook(
id: id ?? 'wh_test_${_pad(n)}',
name: name ?? 'Fixture webhook $n',
url: url ?? 'https://example.com/hook',
events: events ?? const ['transfer.created'],
isActive: isActive,
signingVersion: 'v1',
retryPolicy:
const WebhookRetryPolicy(maxAttempts: 12, backoffBaseSeconds: 30),
successCount: 0,
failureCount: 0,
createdAt: DateTime(2026, 5, 1, 12),
);
}