Class: PactBroker::Api::Resources::LatestVerificationsForConsumerVersion
- Inherits:
-
BaseResource
- Object
- PactBroker::Api::Resources::LatestVerificationsForConsumerVersion
- Defined in:
- lib/pact_broker/api/resources/latest_verifications_for_consumer_version.rb
Instance Method Summary collapse
- #allowed_methods ⇒ Object
- #content_types_provided ⇒ Object
- #policy_name ⇒ Object
- #policy_record ⇒ Object
- #resource_exists? ⇒ Boolean
- #to_json ⇒ Object
Instance Method Details
#allowed_methods ⇒ Object
12 13 14 |
# File 'lib/pact_broker/api/resources/latest_verifications_for_consumer_version.rb', line 12 def allowed_methods ["GET", "OPTIONS"] end |
#content_types_provided ⇒ Object
16 17 18 |
# File 'lib/pact_broker/api/resources/latest_verifications_for_consumer_version.rb', line 16 def content_types_provided [["application/hal+json", :to_json]] end |
#policy_name ⇒ Object
29 30 31 |
# File 'lib/pact_broker/api/resources/latest_verifications_for_consumer_version.rb', line 29 def policy_name :'verifications::verifications' end |
#policy_record ⇒ Object
33 34 35 |
# File 'lib/pact_broker/api/resources/latest_verifications_for_consumer_version.rb', line 33 def policy_record version end |
#resource_exists? ⇒ Boolean
20 21 22 |
# File 'lib/pact_broker/api/resources/latest_verifications_for_consumer_version.rb', line 20 def resource_exists? !!version end |
#to_json ⇒ Object
24 25 26 27 |
# File 'lib/pact_broker/api/resources/latest_verifications_for_consumer_version.rb', line 24 def to_json summary = verification_service.verification_summary_for_consumer_version(identifier_from_path) decorator_for(summary).to_json(user_options: decorator_context(identifier_from_path)) end |