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

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:



175
176
177
178
179
180
181
182
183
184
# File 'lib/ngrokapi/services/event_sources_client.rb', line 175

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)
  NgrokAPI::Models::EventSource.new(client: self, attrs: result)
end