Class: VerifyVspClient::RedactedResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/verify_vsp_client/redacted_response.rb

Overview

Used to report a response from Verify without revealing any Personally Identifiable Information by replacing any string “values” with the “X” character. For example:

VerifyVspClient::RedactedResponse.new({"value" => "Secret"}).parameters
=> {"value" => "XXXXXX"}

Constant Summary collapse

KEYS_TO_REDACT =
%w[value postCode from].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parameters) ⇒ RedactedResponse

Returns a new instance of RedactedResponse.



14
15
16
# File 'lib/verify_vsp_client/redacted_response.rb', line 14

def initialize(parameters)
  @parameters = redact_values(parameters.deep_dup)
end

Instance Attribute Details

#parametersObject (readonly)

Returns the value of attribute parameters.



12
13
14
# File 'lib/verify_vsp_client/redacted_response.rb', line 12

def parameters
  @parameters
end