create method

Create a webhook subscription. The returned CreateWebhookResult.secret is shown ONCE — persist it before this call returns.

Implementation

Future<CreateWebhookResult> create(CreateWebhookOptions opts) async {
  final raw =
      (await _http.request('POST', '/webhooks', body: opts.toJson()))
          as Map<String, dynamic>;
  return CreateWebhookResult.fromJson(raw);
}