getWebhook method

Future<GetWebhookResult> getWebhook({
  1. required String webhookId,
})

Returns the webhook information that corresponds to a specified webhook ID.

May throw BadRequestException. May throw UnauthorizedException. May throw InternalFailureException. May throw NotFoundException. May throw LimitExceededException.

Parameter webhookId : The unique ID for a webhook.

Implementation

Future<GetWebhookResult> getWebhook({
  required String webhookId,
}) async {
  ArgumentError.checkNotNull(webhookId, 'webhookId');
  _s.validateStringLength(
    'webhookId',
    webhookId,
    0,
    255,
    isRequired: true,
  );
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/webhooks/${Uri.encodeComponent(webhookId)}',
    exceptionFnMap: _exceptionFns,
  );
  return GetWebhookResult.fromJson(response);
}