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'
VERIFICATION_SUCCEEDED =
'provider_verification_succeeded'
VERIFICATION_FAILED =
'provider_verification_failed'
DEFAULT_EVENT_NAME =
CONTRACT_CONTENT_CHANGED
EVENT_NAMES =
[CONTRACT_PUBLISHED, CONTRACT_CONTENT_CHANGED, VERIFICATION_PUBLISHED, VERIFICATION_SUCCEEDED, VERIFICATION_FAILED]

Instance Method Summary collapse

Instance Method Details

#contract_content_changed?Boolean

Returns:

  • (Boolean)


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

def contract_content_changed?
  name == CONTRACT_CONTENT_CHANGED
end

#contract_published?Boolean

Returns:

  • (Boolean)


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

def contract_published?
  name == CONTRACT_PUBLISHED
end

#provider_verification_failed?Boolean

Returns:

  • (Boolean)


38
39
40
# File 'lib/pact_broker/webhooks/webhook_event.rb', line 38

def provider_verification_failed?
  name == VERIFICATION_FAILED
end

#provider_verification_published?Boolean

Returns:

  • (Boolean)


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

def provider_verification_published?
  name == VERIFICATION_PUBLISHED
end

#provider_verification_succeeded?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/pact_broker/webhooks/webhook_event.rb', line 34

def provider_verification_succeeded?
  name == VERIFICATION_SUCCEEDED
end