Class: PactBroker::Api::Resources::VerificationTriggeredWebhooks

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

Instance Method Summary collapse

Instance Method Details

#allowed_methodsObject



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

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

#content_types_providedObject



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

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

#resource_exists?Boolean

Returns:

  • (Boolean)


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

def resource_exists?
  !!resource_object
end

#resource_objectObject



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

def resource_object
  verification
end

#to_jsonObject



24
25
26
# File 'lib/pact_broker/api/resources/verification_triggered_webhooks.rb', line 24

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