Method: Coinbase::Webhook.create
- Defined in:
- lib/coinbase/webhook.rb
.create(network_id:, notification_uri:, event_type:, event_filters:) ⇒ Coinbase::Webhook
Creates a new webhook for a specified network.
34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/coinbase/webhook.rb', line 34 def create(network_id:, notification_uri:, event_type:, event_filters:) model = Coinbase.call_api do webhooks_api.create_webhook( create_webhook_request: { network_id: Coinbase.normalize_network(network_id), notification_uri: notification_uri, event_type: event_type, event_filters: event_filters } ) end new(model) end |