Sha256: 2e0ccbcf513bdf553d036eef463cc1380c312b89dbfddf9e597ee7ae5d4127f1
Contents?: true
Size: 837 Bytes
Versions: 28
Compression:
Stored size: 837 Bytes
Contents
require 'pact_broker/services' require 'pact_broker/api/decorators/webhook_decorator' module PactBroker module Api module Resources class Webhook < BaseResource def content_types_provided [["application/hal+json", :to_json]] end def allowed_methods ["GET", "DELETE"] end def resource_exists? webhook end def to_json Decorators::WebhookDecorator.new(webhook).to_json(user_options: { base_url: base_url }) end def delete_resource webhook_service.delete_by_uuid uuid true end private def webhook @webhook ||= webhook_service.find_by_uuid uuid end def uuid identifier_from_path[:uuid] end end end end end
Version data entries
28 entries across 28 versions & 1 rubygems