Class: PactBroker::Api::Resources::PactWebhooksStatus

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

Instance Method Summary collapse

Instance Method Details

#allowed_methodsObject



9
10
11
# File 'lib/pact_broker/api/resources/pact_webhooks_status.rb', line 9

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

#content_types_providedObject



13
14
15
# File 'lib/pact_broker/api/resources/pact_webhooks_status.rb', line 13

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

#resource_exists?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/pact_broker/api/resources/pact_webhooks_status.rb', line 17

def resource_exists?
  consumer && provider
end

#to_jsonObject



21
22
23
# File 'lib/pact_broker/api/resources/pact_webhooks_status.rb', line 21

def to_json
  decorator_for(latest_triggered_webhooks).to_json(user_options: decorator_context(identifier_from_path))
end