Class: PactBroker::Webhooks::WebhookEvent

Inherits:
Sequel::Model
  • Object
show all
Defined in:
lib/pact_broker/webhooks/webhook_event.rb

Constant Summary collapse

CONTRACT_PUBLISHED =
'contract_published'
CONTRACT_CONTENT_CHANGED =
'contract_content_changed'
VERIFICATION_PUBLISHED =
'provider_verification_published'
DEFAULT_EVENT_NAME =
CONTRACT_CONTENT_CHANGED
EVENT_NAMES =

CONTRACT_VERIFIABLE_CONTENT_CHANGED = ‘contract_verifiable_content_changed’ VERIFICATION_STATUS_CHANGED = ‘verification_status_changed’

[CONTRACT_PUBLISHED, CONTRACT_CONTENT_CHANGED, VERIFICATION_PUBLISHED]

Instance Method Summary collapse

Instance Method Details

#contract_content_changed?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/pact_broker/webhooks/webhook_event.rb', line 25

def contract_content_changed?
  name == CONTRACT_CONTENT_CHANGED
end

#contract_published?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/pact_broker/webhooks/webhook_event.rb', line 21

def contract_published?
  name == CONTRACT_PUBLISHED
end

#provider_verification_published?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/pact_broker/webhooks/webhook_event.rb', line 29

def provider_verification_published?
  name == VERIFICATION_PUBLISHED
end