Sha256: d2450899da2592f400d3733e50bd39d2da653cd0fdb96519257afd2637c86149

Contents?: true

Size: 655 Bytes

Versions: 51

Compression:

Stored size: 655 Bytes

Contents

require 'pact_broker/webhooks/http_request_with_redacted_headers'
require 'pact_broker/webhooks/http_response_with_utf_8_safe_body'

module PactBroker
  module Webhooks
    class WebhookExecutionResult
      attr_reader :request, :response, :logs, :error

      def initialize(request, response, logs, error = nil)
        @request = PactBroker::Webhooks::HttpRequestWithRedactedHeaders.new(request)
        @response = response ? PactBroker::Webhooks::HttpResponseWithUtf8SafeBody.new(response) : nil
        @logs = logs
        @error = error
      end

      def success?
        !response.nil? && response.code.to_i < 300
      end
    end
  end
end

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
pact_broker-2.61.0 lib/pact_broker/webhooks/webhook_execution_result.rb
pact_broker-2.60.1 lib/pact_broker/webhooks/webhook_execution_result.rb
pact_broker-2.60.0 lib/pact_broker/webhooks/webhook_execution_result.rb
pact_broker-2.59.2 lib/pact_broker/webhooks/webhook_execution_result.rb
pact_broker-2.59.1 lib/pact_broker/webhooks/webhook_execution_result.rb
pact_broker-2.59.0 lib/pact_broker/webhooks/webhook_execution_result.rb
pact_broker-2.58.3 lib/pact_broker/webhooks/webhook_execution_result.rb
pact_broker-2.58.2 lib/pact_broker/webhooks/webhook_execution_result.rb
pact_broker-2.58.0 lib/pact_broker/webhooks/webhook_execution_result.rb
pact_broker-2.57.0 lib/pact_broker/webhooks/webhook_execution_result.rb
pact_broker-2.56.1 lib/pact_broker/webhooks/webhook_execution_result.rb
pact_broker-2.56.0 lib/pact_broker/webhooks/webhook_execution_result.rb
pact_broker-2.55.0 lib/pact_broker/webhooks/webhook_execution_result.rb
pact_broker-2.54.0 lib/pact_broker/webhooks/webhook_execution_result.rb
pact_broker-2.53.0 lib/pact_broker/webhooks/webhook_execution_result.rb
pact_broker-2.52.2 lib/pact_broker/webhooks/webhook_execution_result.rb
pact_broker-2.52.1 lib/pact_broker/webhooks/webhook_execution_result.rb
pact_broker-2.52.0 lib/pact_broker/webhooks/webhook_execution_result.rb
pact_broker-2.51.0 lib/pact_broker/webhooks/webhook_execution_result.rb
pact_broker-2.50.1 lib/pact_broker/webhooks/webhook_execution_result.rb