Class: PactBroker::Webhooks::WebhookExecutionResult

Inherits:
Object
  • Object
show all
Defined in:
lib/pact_broker/webhooks/webhook_execution_result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(request, response, success, logs, error = nil) ⇒ WebhookExecutionResult

Returns a new instance of WebhookExecutionResult.



9
10
11
12
13
14
15
# File 'lib/pact_broker/webhooks/webhook_execution_result.rb', line 9

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

Instance Attribute Details

#errorObject (readonly)

Returns the value of attribute error.



7
8
9
# File 'lib/pact_broker/webhooks/webhook_execution_result.rb', line 7

def error
  @error
end

#logsObject (readonly)

Returns the value of attribute logs.



7
8
9
# File 'lib/pact_broker/webhooks/webhook_execution_result.rb', line 7

def logs
  @logs
end

#requestObject (readonly)

Returns the value of attribute request.



7
8
9
# File 'lib/pact_broker/webhooks/webhook_execution_result.rb', line 7

def request
  @request
end

#responseObject (readonly)

Returns the value of attribute response.



7
8
9
# File 'lib/pact_broker/webhooks/webhook_execution_result.rb', line 7

def response
  @response
end

Instance Method Details

#success?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/pact_broker/webhooks/webhook_execution_result.rb', line 17

def success?
  @success
end