Method: NgrokAPI::Services::EventSourcesClient#delete!

Defined in:
lib/ngrokapi/services/event_sources_client.rb

#delete!(subscription_id: "", type: "") ⇒ NgrokAPI::Models::Empty

Remove a type for which this event subscription will trigger Throws an exception if API error.

https://ngrok.com/docs/api#api-event-sources-delete

Parameters:

  • subscription_id (string) (defaults to: "")

    The unique identifier for the Event Subscription that this Event Source is attached to.

  • type (string) (defaults to: "")

    Type of event for which an event subscription will trigger

Returns:

  • (NgrokAPI::Models::Empty)

    result from the API request



84
85
86
87
88
89
90
91
# File 'lib/ngrokapi/services/event_sources_client.rb', line 84

def delete!(subscription_id: "", type: "")
  path = '/event_subscriptions/%{subscription_id}/sources/%{type}'
  replacements = {
    subscription_id: subscription_id,
    type: type,
  }
  @client.delete(path % replacements, danger: true)
end