Method: NgrokAPI::Services::EventSourcesClient#update!

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

#update!(subscription_id: "", type: "", filter: nil, fields: nil) ⇒ NgrokAPI::Models::EventSource

Update the type for which this event subscription will trigger Throws an exception if API error.

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

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:



195
196
197
198
199
200
201
202
203
204
# File 'lib/ngrokapi/services/event_sources_client.rb', line 195

def update!(subscription_id: "", type: "", filter: nil, fields: nil)
  path = '/event_subscriptions/%{subscription_id}/sources/%{type}'
  replacements = {
    subscription_id: subscription_id,
    type: type,
  }
  data = {}
  result = @client.patch(path % replacements, data: data, danger: true)
  NgrokAPI::Models::EventSource.new(client: self, attrs: result)
end