Module: Webhooks::Outgoing::EndpointSupport

Extended by:
ActiveSupport::Concern
Includes:
UriFiltering
Included in:
Endpoint
Defined in:
app/models/concerns/webhooks/outgoing/endpoint_support.rb

Instance Method Summary collapse

Methods included from UriFiltering

#_allowed_uri?, #allowed_uri?, #resolve_ip_from_authoritative

Instance Method Details

#creative_conceptsObject



34
35
36
# File 'app/models/concerns/webhooks/outgoing/endpoint_support.rb', line 34

def creative_concepts
  team.scaffolding_absolutely_abstract_creative_concepts
end

#event_typesObject



38
39
40
# File 'app/models/concerns/webhooks/outgoing/endpoint_support.rb', line 38

def event_types
  Webhooks::Outgoing::EventType.where(id: event_type_ids)
end

#generate_webhook_secretObject



46
47
48
# File 'app/models/concerns/webhooks/outgoing/endpoint_support.rb', line 46

def generate_webhook_secret
  self.webhook_secret ||= SecureRandom.hex(32)
end

#rotate_webhook_secret!Object



50
51
52
# File 'app/models/concerns/webhooks/outgoing/endpoint_support.rb', line 50

def rotate_webhook_secret!
  update!(webhook_secret: SecureRandom.hex(32))
end

#touch_parentObject



42
43
44
# File 'app/models/concerns/webhooks/outgoing/endpoint_support.rb', line 42

def touch_parent
  send(BulletTrain::OutgoingWebhooks.parent_association).touch
end

#valid_event_typesObject



30
31
32
# File 'app/models/concerns/webhooks/outgoing/endpoint_support.rb', line 30

def valid_event_types
  Webhooks::Outgoing::EventType.all
end