class PactBroker::Api::Resources::VerificationTriggeredWebhooks
Public Instance Methods
allowed_methods()
click to toggle source
# File lib/pact_broker/api/resources/verification_triggered_webhooks.rb, line 8 def allowed_methods ["GET", "OPTIONS"] end
content_types_provided()
click to toggle source
# File lib/pact_broker/api/resources/verification_triggered_webhooks.rb, line 12 def content_types_provided [["application/hal+json", :to_json]] end
policy_name()
click to toggle source
# File lib/pact_broker/api/resources/verification_triggered_webhooks.rb, line 24 def policy_name :'verifications::verification' end
policy_record()
click to toggle source
# File lib/pact_broker/api/resources/verification_triggered_webhooks.rb, line 28 def policy_record verification end
resource_exists?()
click to toggle source
# File lib/pact_broker/api/resources/verification_triggered_webhooks.rb, line 16 def resource_exists? !!verification end
to_json()
click to toggle source
# File lib/pact_broker/api/resources/verification_triggered_webhooks.rb, line 20 def to_json decorator_class(:triggered_webhooks_decorator).new(triggered_webhooks).to_json(**decorator_options(resource_title: resource_title)) end
Private Instance Methods
resource_title()
click to toggle source
# File lib/pact_broker/api/resources/verification_triggered_webhooks.rb, line 38 def resource_title "Webhooks triggered by the publication of verification result #{verification.number}" end
triggered_webhooks()
click to toggle source
# File lib/pact_broker/api/resources/verification_triggered_webhooks.rb, line 34 def triggered_webhooks @triggered_webhooks ||= webhook_service.find_triggered_webhooks_for_verification(verification) end
verification()
click to toggle source
# File lib/pact_broker/api/resources/verification_triggered_webhooks.rb, line 42 def verification @verification ||= verification_service.find(identifier_from_path) end