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.
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 |