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.77.0 lib/pact_broker/webhooks/webhook_execution_result.rb
pact_broker-2.76.2 lib/pact_broker/webhooks/webhook_execution_result.rb
pact_broker-2.76.1 lib/pact_broker/webhooks/webhook_execution_result.rb
pact_broker-2.76.0 lib/pact_broker/webhooks/webhook_execution_result.rb
pact_broker-2.75.0 lib/pact_broker/webhooks/webhook_execution_result.rb
pact_broker-2.74.1 lib/pact_broker/webhooks/webhook_execution_result.rb
pact_broker-2.74.0 lib/pact_broker/webhooks/webhook_execution_result.rb
pact_broker-2.73.0 lib/pact_broker/webhooks/webhook_execution_result.rb
pact_broker-2.72.0 lib/pact_broker/webhooks/webhook_execution_result.rb
pact_broker-2.71.0 lib/pact_broker/webhooks/webhook_execution_result.rb
pact_broker-2.70.0 lib/pact_broker/webhooks/webhook_execution_result.rb
pact_broker-2.69.0 lib/pact_broker/webhooks/webhook_execution_result.rb
pact_broker-2.68.1 lib/pact_broker/webhooks/webhook_execution_result.rb
pact_broker-2.68.0 lib/pact_broker/webhooks/webhook_execution_result.rb
pact_broker-2.67.0 lib/pact_broker/webhooks/webhook_execution_result.rb
pact_broker-2.66.0 lib/pact_broker/webhooks/webhook_execution_result.rb
pact_broker-2.65.0 lib/pact_broker/webhooks/webhook_execution_result.rb
pact_broker-2.64.0 lib/pact_broker/webhooks/webhook_execution_result.rb
pact_broker-2.63.0 lib/pact_broker/webhooks/webhook_execution_result.rb
pact_broker-2.62.0 lib/pact_broker/webhooks/webhook_execution_result.rb