class PactBroker::Webhooks::ExecutionConfiguration

Attributes

params[R]

Public Class Methods

new(params = {}) click to toggle source
# File lib/pact_broker/webhooks/execution_configuration.rb, line 8
def initialize(params = {})
  @params = params
end

Public Instance Methods

[](key) click to toggle source
# File lib/pact_broker/webhooks/execution_configuration.rb, line 52
def [](key)
  params[key]
end
retry_schedule() click to toggle source
# File lib/pact_broker/webhooks/execution_configuration.rb, line 48
def retry_schedule
  self[:retry_schedule]
end
to_hash() click to toggle source
# File lib/pact_broker/webhooks/execution_configuration.rb, line 56
def to_hash
  params
end
webhook_context() click to toggle source
# File lib/pact_broker/webhooks/execution_configuration.rb, line 44
def webhook_context
  self[:webhook_context]
end
with_failure_log_message(value) click to toggle source
# File lib/pact_broker/webhooks/execution_configuration.rb, line 24
def with_failure_log_message(value)
  with_updated_attribute(logging_options: { failure_log_message: value })
end
with_http_success_codes(value) click to toggle source
# File lib/pact_broker/webhooks/execution_configuration.rb, line 32
def with_http_success_codes(value)
  with_updated_attribute(http_success_codes: value)
end
with_retry_schedule(value) click to toggle source
# File lib/pact_broker/webhooks/execution_configuration.rb, line 28
def with_retry_schedule(value)
  with_updated_attribute(retry_schedule: value)
end
with_show_response(value) click to toggle source
# File lib/pact_broker/webhooks/execution_configuration.rb, line 16
def with_show_response(value)
  with_updated_attribute(logging_options: { show_response: value })
end
with_success_log_message(value) click to toggle source
# File lib/pact_broker/webhooks/execution_configuration.rb, line 20
def with_success_log_message(value)
  with_updated_attribute(logging_options: { success_log_message: value })
end
with_updated_attribute(new_attribute) click to toggle source
# File lib/pact_broker/webhooks/execution_configuration.rb, line 12
def with_updated_attribute(new_attribute)
  ExecutionConfiguration.new(params.deep_merge(new_attribute))
end
with_user_agent(value) click to toggle source
# File lib/pact_broker/webhooks/execution_configuration.rb, line 40
def with_user_agent(value)
  with_updated_attribute(user_agent: value)
end
with_webhook_context(value) click to toggle source
# File lib/pact_broker/webhooks/execution_configuration.rb, line 36
def with_webhook_context(value)
  with_updated_attribute(webhook_context: value)
end