Class: PactBroker::Api::Resources::PactTriggeredWebhooks

Inherits:
BaseResource
  • Object
show all
Defined in:
lib/pact_broker/api/resources/pact_triggered_webhooks.rb

Instance Method Summary collapse

Instance Method Details

#allowed_methodsObject



8
9
10
# File 'lib/pact_broker/api/resources/pact_triggered_webhooks.rb', line 8

def allowed_methods
  ["GET", "OPTIONS"]
end

#content_types_providedObject



12
13
14
# File 'lib/pact_broker/api/resources/pact_triggered_webhooks.rb', line 12

def content_types_provided
  [["application/hal+json", :to_json]]
end

#resource_exists?Boolean



16
17
18
# File 'lib/pact_broker/api/resources/pact_triggered_webhooks.rb', line 16

def resource_exists?
  !!pact
end

#to_jsonObject



20
21
22
# File 'lib/pact_broker/api/resources/pact_triggered_webhooks.rb', line 20

def to_json
  Decorators::TriggeredWebhooksDecorator.new(triggered_webhooks).to_json(decorator_options(resource_title: resource_title))
end